Skip to content

surebeli/SpecTeam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

58 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SpecTeam logo

SpecTeam

Stage: prompt-first workflow (stable) Β· platform foundation (W1 in progress) β€” see Roadmap.

SpecTeam keeps specs, decisions, and AI agents aligned.

δΈ­ζ–‡ζ–‡ζ‘£: README.zh-CN.md

SpecTeam VS Code extension β€” Divergence Review sidebar

Overview

SpecTeam is a Git-native workflow for AI-native spec review and decision alignment.

SpecTeam is the current market-facing wedge: AI-native spec review and decision alignment for product and engineering teams using multiple AI tools. It helps teams detect divergence across PRDs, architecture docs, and AI-generated proposals, make decisions quickly, and sync the outcome back into a shared source of truth.

SpecTeam now uses one consistent name across the repository, prompt skills, commands, and product story.

Product Docs

Installation

Claude Code β€” .claude/commands/ (recommended)

git clone https://github.com/surebeli/SpecTeam.git /tmp/spec-team

# Install to current project
mkdir -p .claude/commands
for skill in /tmp/spec-team/plugin/skills/*/SKILL.md; do
  cp "$skill" ".claude/commands/$(basename $(dirname $skill)).md"
done

# Or install globally (applies to all projects)
mkdir -p ~/.claude/commands
for skill in /tmp/spec-team/plugin/skills/*/SKILL.md; do
  cp "$skill" ~/.claude/commands/$(basename $(dirname $skill)).md
done

Claude Code β€” /plugin marketplace

/plugin marketplace add surebeli/SpecTeam
/plugin install spec-team@SpecTeam

Codex CLI

git clone https://github.com/surebeli/SpecTeam.git ~/.codex/skills/spec-team

Any AI tool β€” standalone prompt

Copy SPECTEAM.md to your project root, then tell your AI tool:

You are now the SpecTeam Workflow. Follow all rules in ./SPECTEAM.md strictly.
Skill: init

Quick Start

1-minute Demo (Local)

We provide a simulated scenario to let you experience SpecTeam's conflict detection and resolution in 1 minute.

# 1. Clone and install skills
git clone https://github.com/surebeli/SpecTeam.git
cd SpecTeam

# 2. Init and point to mock data
# When asked for document directories, enter: ./tests/mock-scenarios/demo-1-conflict/alice, ./tests/mock-scenarios/demo-1-conflict/bob
/spec-init

# 3. Detect conflicts between alice (REST) and bob (GraphQL)
/spec-review

# 4. Resolve a conflict (e.g., D-001)
/spec-align D-001

Core Workflow

                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚       First use (One-time)      β”‚
                        β”‚       /spec-init             β”‚
                        β”‚  Create .spec/, bind identityβ”‚
                        β”‚  Write THESIS, normalize docs   β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                       β”‚
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚           Daily Collaboration          β”‚
                  β”‚                                        β”‚
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”‚
   β”‚ /spec-pull               β”‚                       β”‚
   β”‚ Pull remote + auto-parse    β”‚                       β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚
                  β”‚                                       β”‚
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”‚
   β”‚ Edit source docs             β”‚                       β”‚
   β”‚ (Human or AI edits code/doc) β”‚                       β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚
                  β”‚                                       β”‚
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”‚
   β”‚ /spec-push               β”‚                       β”‚
   β”‚ Sync to .spec/ + push    β”‚                       β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚
                  β”‚                                       β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                      β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚           Conflict Resolution Flow            β”‚
              β”‚                                               β”‚
              β”‚ 1. /spec-review (Find divergences)         β”‚
              β”‚ 2. /spec-align (Propose/Approve decision)  β”‚
              β”‚ 3. /spec-update (Verify implementation)    β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Skill Reference

Command Description
/spec-init Initialize or join a project
/spec-whoami Check or bind local identity
/spec-pull Pull remote changes and auto-parse
/spec-update Sync source documents to .spec/
/spec-push Push changes to remote after divergence check
/spec-review Analyze all docs for divergences vs THESIS
/spec-align Resolve divergences via Propose β†’ Approve
/spec-status Comprehensive collaboration dashboard
/spec-suggest AI-driven suggestions based on diffs
/spec-diff View structured diff grouped by collaborator
/spec-parse Scan documents and update INDEX.md
/spec-archive Freeze and archive a design proposal
/spec-import Import external docs via MCP/HTTP
/spec-sos Emergency auto-resolution of Git merge conflicts in .spec/

Skill Dependency Graph

graph LR
    subgraph Daily[Daily Workflow]
        pull[pull]
        update[update]
        push[push]
    end

    subgraph Resolve[Review and Resolve]
        review[review]
        align[align]
    end

    subgraph Auto[Auto-triggered]
        parse[parse]
    end

    subgraph Util[Utility]
        init[init]
        status[status]
        suggest[suggest]
        diff[diff]
        whoami[whoami]
        importSkill[import]
        sos[sos]
    end

    init -->|triggers| parse
    pull -->|triggers| parse
    update -->|triggers| parse
    importSkill -->|triggers| parse

    review -.->|feeds| align
    align -.->|enables| push
    status -.->|recommends| review
    suggest -.->|recommends| align

    style parse fill:#4CAF50,color:#fff
    style align fill:#E55B3C,color:#fff
    style review fill:#FF9800,color:#fff
    style init fill:#2196F3,color:#fff
Loading

Legend: Solid arrows = auto-triggers. Dotted arrows = workflow recommendations.

Collaboration Flow

Alice (Claude Code)                    Bob (Codex CLI)
       β”‚                                     β”‚
 /spec-init (founder)              /spec-init (join)
 Set project goal β†’ THESIS.md         Review goal β†’ join
       β”‚                                     β”‚
 Edit .spec/design/alice/          Edit .spec/design/bob/
       β”‚                                     β”‚
 /spec-push ──────→ Git ◄───────── /spec-push
       β”‚                                     β”‚
 /spec-pull                        /spec-pull
       β”‚                                     β”‚
       └──────────── divergence found ───────→
                          β”‚
                  /spec-review
                  Analyze docs vs THESIS β†’ generate D-001
                  Write DIVERGENCES.md + commit anchors
                          β”‚
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚                                            β”‚
  Alice: /spec-align D-001                  β”‚
  Pick resolution β†’ proposed 🟑               β”‚
  ⚠️ THESIS not updated yet                    β”‚
  /spec-push                                β”‚
  β”‚                                            β”‚
  β”‚                             Bob: /spec-pull
  β”‚                             🟑 "D-001 awaiting your confirmation"
  β”‚                             Bob: /spec-align D-001
  β”‚                             β†’ Agree β†’ resolved βœ…
  β”‚                             Generate decisions/D-001.md
  β”‚                             Update THESIS Decision Log
  β”‚                             /spec-push
  β”‚                                            β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
       ╔══════════════════╧══════════════════════════════════════════╗
       β•‘ [Side flow] Apply decision to source documents              β•‘
       β•‘                                                             β•‘
       β•‘ decisions/D-001.md contains per-party instruction blocks    β•‘
       β•‘ (background / required changes / acceptance criterion)      β•‘
       β•‘                                                             β•‘
       β•‘ Alice                            Bob                        β•‘
       β•‘ Read decisions/D-001.md          Read decisions/D-001.md    β•‘
       β•‘ Pass to own model β†’              Pass to own model β†’       β•‘
       β•‘ Model edits source doc           Model edits source doc     β•‘
       β•‘      β”‚                               β”‚                    β•‘
       β•‘ /spec-update                  /spec-update            β•‘
       β•‘ AI verifies acceptance           AI verifies acceptance     β•‘
       β•‘ criterion                        criterion                  β•‘
       β•‘ β†’ Pass                           β†’ Pass                    β•‘
       β•‘      β”‚                               β”‚                    β•‘
       β•‘      └─────────── all βœ… β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β•‘
       β•‘                       β”‚                                     β•‘
       β•‘              D-001 fully-closed πŸ”’                          β•‘
       β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•€β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
                          β”‚
              /spec-push (no open/proposed, push directly)

Divergence Handling

Four divergence states

State Meaning Who can act
open πŸ”΄ Unresolved Either party can propose
proposed 🟑 One party proposed, awaiting other's confirmation Other party confirms/rejects/modifies; proposer can withdraw
resolved βœ… Both parties agreed, source documents being updated Each party runs update to complete source doc updates
fully-closed πŸ”’ All source documents updated per decision Read-only, fully archived

DIVERGENCES.md β€” Divergence registry

Written by review, read/written by align, read by push/status:

## Open

### D-001: API style choice
Status: open πŸ”΄ | Parties: alice vs bob | Priority: blocking

## Proposed

### D-002: Deployment strategy
Status: proposed 🟑 | Proposer: alice | Awaiting bob's confirmation
Proposed decision: adopt Kubernetes (bob's approach) | Reasoning: ...

## Resolved

### D-003: Data model βœ…
Status: resolved | Proposer: alice | Confirmer: bob
Decision: adopt NoSQL | Resolved at: 2026-04-09
Change instructions: See .spec/decisions/D-003.md

Propose β†’ Approve two-phase confirmation

align automatically switches behavior based on divergence state:

  • Divergence is open β†’ show comparison table + AI recommendation; user picks resolution β†’ status becomes proposed, THESIS not updated yet
  • Divergence is proposed, awaiting my confirmation β†’ show proposer's resolution and reasoning:
    • βœ… Agree β†’ resolved; AI generates per-party change instruction blocks (with acceptance criteria); update THESIS Decision Log
    • ❌ Reject (with reason) β†’ revert to open
    • πŸ“ Modify and counter-propose β†’ still proposed, proposer changes to me
  • Divergence is proposed, I am proposer β†’ show waiting state; option to withdraw

decisions/ β€” Decision instruction files

When align confirms a resolution, it creates .spec/decisions/D-{N}.md containing:

  • Full decision + reasoning
  • Per-party change instruction blocks: what to change, in which file, and an acceptance criterion for automated verification by update

Users can pass decisions/D-001.md directly to their own model to execute source document changes.

review commit anchor deduplication

last-review.json records each collaborator's commit hash at last analysis time:

  • New commits β†’ re-analyze
  • No new commits β†’ skip
  • resolved / proposed β†’ not disrupted

pull auto-alerts

After pulling: detects proposed divergences awaiting your confirmation, and resolved divergences with pending Action Items for you.

push divergence soft gate

Before pushing, distinguishes:

  • 🟑 Proposals awaiting my confirmation β†’ suggest confirming first
  • πŸ”΄ Unresolved divergences β†’ warn and wait
  • 🟑 Awaiting other party's confirmation β†’ inform (non-blocking)

Emergency & Safety Mechanisms

Conflict Fallback (/spec-sos)

If you encounter a Git tree conflict (e.g., <<<<<<< HEAD markers) while running /spec-pull or /spec-push, do not manually edit the .spec/ metadata. Simply run /spec-sos to automatically parse and intelligently merge conflicting divergences and JSON state safely.

Dry-run (--dry-run)

For any destructive or global write actions, you can append --dry-run to preview the AI's intended actions without touching the file system:

/spec-review --dry-run
/spec-align --dry-run D-001
/spec-update --dry-run

Ecosystem & Companion Tools

While SpecTeam is "Prompt-First", we provide lightweight companion tools to enhance your workflow.

SpecTeam CLI (cli/)

A zero-logic Node.js CLI that assists with installation and provides a local status dashboard.

  • spec install: Auto-copies skills to your .claude/commands directory.
  • spec status: Displays a visual summary of DIVERGENCES.md and repository state (zero-token cost).
  • spec init: Scaffolds the .spec/ directory and guides you to the AI /spec-init prompt.
  • spec sos: Detects Git tree conflicts and provides emergency instructions.

VS Code Extension (vscode-extension/)

A visual dashboard integrated into your IDE sidebar.

  • Sidebar Dashboard: View all Open πŸ”΄, Proposed 🟑, and Resolved βœ… divergences at a glance.
  • Quick Action: Click the "Play" icon next to any open divergence to instantly open a terminal and trigger /spec-align in your AI assistant.

Source Document Sync

Background

init does a one-time copy. If source documents (e.g. ./design/spec.md) change afterward, the copies in .spec/design/{code}/ are not automatically updated.

spec-update solution

update records source file hashes in last-sync.json, detecting changes incrementally on each run:

/spec-update           # Detect and sync all changes
/spec-update --dry-run # Preview changes without writing
/spec-update --force   # Skip divergence confirmation, force sync

Post-resolution source document updates (Action Items)

When align confirms a resolution, AI analyzes both parties' documents against the decision and generates Action Items written to decisions/D-{N}.md:

## Source Document Action Items
| Collaborator | Source file | Required changes | Status |
|--------------|-------------|-----------------|--------|
| alice | ./design/api.md | Keep REST design unchanged | βœ… No changes needed |
| bob | ./design/api-proposal.md | Replace GraphQL with REST, update interface examples | ⏳ Pending update |

After each party updates their source documents and runs update, AI auto-verifies against the acceptance criterion:

  • βœ… Satisfied β†’ Action Item marked complete
  • ❌ Not satisfied β†’ specific guidance (e.g. "GraphQL description still present in section 3")
  • All complete β†’ divergence upgrades to fully-closed πŸ”’

Branch protection

init records the current branch as the protected SpecTeam main branch (git config spec.main-branch). All other skills enforce a branch guard β€” operations on any other branch are rejected:

❌ Current branch 'feature-x' is not the SpecTeam main branch 'main'.
   Switch with: git checkout main

.spec/ Directory Structure

Generated in the target project after initialization:

.spec/
β”œβ”€β”€ COLLABORATORS.md    # Identity map: member codes β†’ doc directories; Main Branch metadata
β”œβ”€β”€ THESIS.md           # Project design constitution (North Star) + Decision Log
β”œβ”€β”€ RULES.md            # Code conventions
β”œβ”€β”€ SIGNALS.md          # Runtime status & blockers
β”œβ”€β”€ INDEX.md            # Auto-generated document index
β”œβ”€β”€ DIVERGENCES.md      # Divergence registry (D-001…status summary): written by review, read by align/push/status
β”œβ”€β”€ last-parse.json     # Parse cache (file hashes)
β”œβ”€β”€ last-review.json    # Review anchor: per-collaborator commit hashes + source file hashes at last review
β”œβ”€β”€ last-sync.json      # Source document sync state: source file hashes, maintained by update skill
β”œβ”€β”€ design/
β”‚   β”œβ”€β”€ alice/          # alice's normalized documents
β”‚   β”œβ”€β”€ bob/
β”‚   └── shared/         # Jointly maintained (optional)
β”œβ”€β”€ decisions/          # Per-divergence decision files (created by align on resolution)
β”‚   β”œβ”€β”€ D-001.md        # Full decision + per-party change instruction blocks + acceptance criteria
β”‚   └── D-002.md
└── archive/            # Frozen proposals

Repository Structure

SpecTeam/
β”œβ”€β”€ .claude-plugin/
β”‚   β”œβ”€β”€ marketplace.json          # Marketplace manifest
β”‚   └── plugin.json               # Claude Code plugin definition
β”œβ”€β”€ .codex-plugin/plugin.json     # Codex CLI plugin manifest
β”œβ”€β”€ plugin/                       # Plugin core
β”‚   β”œβ”€β”€ skills/                   # 13 Skills (shared across platforms)
β”‚   β”‚   β”œβ”€β”€ spec-init/
β”‚   β”‚   β”œβ”€β”€ spec-whoami/
β”‚   β”‚   β”œβ”€β”€ spec-pull/
β”‚   β”‚   β”œβ”€β”€ spec-push/
β”‚   β”‚   β”œβ”€β”€ spec-update/
β”‚   β”‚   β”œβ”€β”€ spec-parse/
β”‚   β”‚   β”œβ”€β”€ spec-status/
β”‚   β”‚   β”œβ”€β”€ spec-suggest/
β”‚   β”‚   β”œβ”€β”€ spec-diff/
β”‚   β”‚   β”œβ”€β”€ spec-review/
β”‚   β”‚   β”œβ”€β”€ spec-align/
β”‚   β”‚   β”œβ”€β”€ spec-archive/
β”‚   β”‚   └── spec-import/
β”‚   β”œβ”€β”€ CLAUDE.md                 # Shared context (Claude Code)
β”‚   └── AGENTS.md                 # Shared context (Codex CLI)
β”œβ”€β”€ SPECTEAM.md                # Standalone prompt version (manual mode)
β”œβ”€β”€ README.md                     # This file (English)
β”œβ”€β”€ README.zh-CN.md               # Chinese translation
└── docs/design/                  # Example design documents

License

MIT

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors