Skip to content
Development
Skill

/spec-workflow

OpenSpec lifecycle orchestration for /workflow chains. TRIGGER when: coordinating the analyst-architect-developer-reviewer chain or managing spec status transitions. SKIP: writing an individual spec artifact (use spec-research, spec-design, or spec-review).

From plugin
scaffolding
1639 skills13 agents21 commands25 hooks

Claude Code

$ npx -y skills add komluk/scaffolding --skill spec-workflow --agent claude-code

SKILL.md

spec-workflow.SKILL.md
name: spec-workflow
description: "OpenSpec lifecycle orchestration for /workflow chains. TRIGGER when: coordinating the analyst-architect-developer-reviewer chain or managing spec status transitions. SKIP: writing an individual spec artifact (use spec-research, spec-design, or spec-review)."

OpenSpec Workflow Orchestration

Spec-driven development protocol for coordinating multi-agent workflows.

UUID Enforcement

**CRITICAL**: The `conversation_id` MUST always be a UUID (format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`). NEVER use descriptive names, slugs, or human-readable strings. If no UUID is available, generate one with `uuidgen` or `node -p 'require("crypto").randomUUID()'`. Self-check: does the conversation_id match the pattern `[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`? If not, STOP and use a real UUID.

Directory Structure

Canonical layout (identical on every machine and in every project):

<repo>/.scaffolding/
  conversations -> <share>/projects/<repo-name>/conversations   (symlink to the NFS share)
  worktrees/                      LOCAL real dir, never on NFS
  openspec/  workflows/           git-tracked
  agent-memory/  project-id  ...  local

<share>/projects/<repo-name>/conversations/{conversation_id}/
  context.json                    status + history (merged schema below)
  specs/
    proposal.md   -- WHY + WHAT (analyst)
    design.md     -- WHAT + HOW (architect)
    tasks.md      -- checklist (architect)
  agent-memory/context.md         conversation-tier memory
  attachments/{attId}/{name}      + {attId}.json
  tasks/{taskId}/                 meta.json, output.md, output.jsonl, summary.json, state.json

Always read and write through `.scaffolding/conversations/...` (the symlink); never hardcode the share path. `<share>` differs per machine (`/mnt/scaffolding-data` or `/mnt/scaffolding`). `nfs-sync.sh` creates the link at SessionStart or via `nfs-sync.sh link <dir>`; `<share>/platform/conversations` holds notes only and is never a link target.

Status Lifecycle

Tracked in `status` of `.scaffolding/conversations/{conversation_id}/context.json`:

| Status | Meaning | Transition | |--------|---------|------------| | `exploring` | Research phase | -> `drafting` when proposal done | | `drafting` | Design + tasks | -> `implementing` when tasks done | | `implementing` | Code changes | -> `reviewing` when tasks complete | | `reviewing` | Verification | -> `complete` when verified | | `complete` | Done | -> `archived` on request | | `archived` | Historical | Terminal state |

Agent Routing in /workflow

| Phase | Agent | Reads | Writes | Gate | |-------|-------|-------|--------|------| | 1. Analyze | analyst | requirements | `proposal.md` | proposal written | | 1b. Research (conditional) | researcher | requirements | ResearchPack | score >= 80 | | 2. Design | architect | `proposal.md` | `design.md`, `tasks.md` | score >= 85 | | 3. Apply | developer | `tasks.md`, `design.md` | source code | validation passes | | 4. Verify | reviewer | `design.md`, `tasks.md` | review report | no criticals |

When Researcher Is Needed

Analyst flags need for research in proposal.md. Researcher is invoked ONLY when the task involves:

  • New external API integration (e.g., Stripe, Twilio)
  • Unfamiliar library not yet in the project
  • Best practices requiring current internet research
  • Version-specific documentation for upgrades/migrations

Analyst writes proposal directly (no researcher) for:

  • Internal codebase refactoring
  • UI/styling changes
  • Bug fixes with known root cause
  • Configuration changes
  • Features using only existing project dependencies

When to Create vs Skip Specs

| Task Type | Use Specs? | Reason | |-----------|-----------|--------| | New feature | Yes | Needs design, multi-file | | Architecture change | Yes | Needs decisions documented | | Multi-agent workflow | Yes | Needs coordination | | Bug fix (simple) | No | Direct to developer | | Typo / config tweak | No | Direct to developer | | Single-file refactor | No | Direct to developer |

Orchestration Steps

1. **Obtain conversation_id UUID**: From prompt context or generate via `uuidgen`. **MUST be a UUID, never a descriptive name** (validate against the regex above before creating any directory). 2. **Create specs directory**: `mkdir -p .scaffolding/conversations/{conversation_id}/specs/` 3. **Set specs_path**: `.scaffolding/conversations/{conversation_id}/specs/` 4. **Analyst writes proposal.md** (requirements, scope, impact, feasibility) 5. **If research needed**: analyst flags in proposal.md, researcher is invoked (score >= 80) 6. **Architect writes design.md + tasks.md** (incorporating proposal.md and ResearchPack if available) 7. **Pass specs_path** in every agent delegation prompt 8. **Update context.json** status after each phase transition (read-merge-write, see schema) 9. **Gate enforcement**: Block next phase if quality gate fails

Context JSON Schema

One merged schema shared with the platform. **Every field is optional**; readers treat a missing key as empty.

{
  "conversation_id": "uuid",                  // always a UUID
  // plugin (this workflow)
  "status": "exploring|drafting|implementing|reviewing|complete|archived",
  "description": "string",
  "created_at": "ISO-8601 string",
  "agents_involved": ["architect", "developer"],
  // platform
  "original_intent": "string",
  "task_history": [ { "task_id": "..." } ],
  "cumulative_files_changed": ["path"],
  "cumulative_decisions": ["string"],
  "last_updated": 1760000000,                 // epoch seconds (number)
  "openspec": { "status": "archived" }        // or null
}

**Read-merge-write, always.** Read the existing file, change only the keys you own, write the whole object back. Never recreate the file from scratch and never drop keys you do not know (e.g. keep `original_intent` and `task_history` when setting `status`). Keep existing types: `created_at` is an ISO string, `last_

Read more
@komluk
Ships withscaffolding

Spec-driven multi-agent orchestration for Claude Code — pure markdown, zero backend, runs on the stock runtime. 13 agents, 39 skills, 21 commands, 20 hooks, per-phase model tiers, opt-in lifecycle hooks, optional cross-device semantic memory.

1639 skills13 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
16
Star history of komluk/scaffolding on GitHub, a chart by star-history.com

Other skills on scaffolding.

agent-comms

agent-comms

SendMessage recipient validation and worktreePath safety (CWE-59). TRIGGER when: validating a SendMessage `to:` recipient against…

@komluk@komlukInstall Skill
agent-memory

agent-memory

Repo-local file memory under .scaffolding/ (shared/agent/conversation tiers). TRIGGER when: reading or writing .scaffolding/…

@komluk@komlukInstall Skill
api-design

api-design

RESTful API design standards: resource naming, HTTP methods, status codes, pagination, versioning. TRIGGER when: designing new…

@komluk@komlukInstall Skill
context-engineering

context-engineering

Optimize Claude Code context-window usage for accuracy and cost. TRIGGER when: hitting context limits, structuring prompts for an…

@komluk@komlukInstall Skill
database-optimization

database-optimization

Schema design, index strategy, migration safety, and query analysis. TRIGGER when: designing tables or indexes, writing a…

@komluk@komlukInstall Skill
distill

distill

Knowledge distillation: candidate extraction, confidence scoring, tier routing. Invoked by /learn and the memory-ingest Stop…

@komluk@komlukInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills12d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about spec-workflow.

Which coding agents can use spec-workflow?
spec-workflow installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.