agentleFS
komlukkomluk/scaffolding/skills/spec-workflow/SKILL.md

spec-workflow

Skill16 starsChanged 5 days agoMITView on GitHub

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).

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always read and write through .scaffolding/conversations/...

    line 36
  2. Very specific:

    Read-merge-write, always: Read the existing file, change only the keys you own, write the whole object back.

    line 126

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 python3 -c "import uuid; print(uuid.uuid4())". 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:

StatusMeaningTransition
exploringResearch phase-> drafting when proposal done
draftingDesign + tasks-> implementing when tasks done
implementingCode changes-> reviewing when tasks complete
reviewingVerification-> complete when verified
completeDone-> archived on request
archivedHistoricalTerminal state

Agent Routing in /workflow

PhaseAgentReadsWritesGate
1. Analyzeanalystrequirementsproposal.mdproposal written
1b. Research (conditional)researcherrequirementsResearchPackscore >= 80
2. Designarchitectproposal.mddesign.md, tasks.mdscore >= 85
3. Applydevelopertasks.md, design.mdsource codevalidation passes
4. Verifyreviewerdesign.md, tasks.mdreview reportno 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 TypeUse Specs?Reason
New featureYesNeeds design, multi-file
Architecture changeYesNeeds decisions documented
Multi-agent workflowYesNeeds coordination
Bug fix (simple)NoDirect to developer
Typo / config tweakNoDirect to developer
Single-file refactorNoDirect 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_updated a number. There is no version field. When the file does not exist yet, create it with conversation_id plus the keys you own.

Minimal merge (jq):

f=".scaffolding/conversations/$CONV_ID/context.json"
[ -f "$f" ] || echo "{\"conversation_id\": \"$CONV_ID\"}" > "$f"
jq '.status = "implementing"' "$f" > "$f.tmp" && mv "$f.tmp" "$f"

Schema Reference

Custom schema: .scaffolding/openspec/schemas/scaffolding-workflow/schema.yaml Config: .scaffolding/openspec/config.yaml Templates: .scaffolding/openspec/schemas/scaffolding-workflow/templates/

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.