Spec Workflow
Use this skill for complex engineering work that should be shaped before broad implementation.
Default posture: inspect the repository first, clarify only the decisions that materially affect scope or design, then drive the work through reusable spec artifacts.
When to use
Use this skill when at least one of these is true:
- The request is likely to touch multiple files, modules, or systems.
- Product behavior, API shape, data contracts, migration, rollout, or regression risk matters.
- The user asks for a spec, design, plan, task breakdown, roadmap, or careful phased execution.
- The work will likely span more than one implementation turn.
Do not use this skill for:
- Tiny edits with obvious scope.
- Straightforward single-function fixes with no meaningful design tradeoff.
- Pure Q&A or explanation requests.
Default operating model
Follow a hybrid Spec Kit flow adapted for Codex:
- Ground in repo reality first.
- Choose a mode:
requirements-first,design-first, orbugfix. - Produce the core artifacts before broad implementation:
spec.mdplan.mdtasks.md
- Add optional artifacts only when the work needs them:
research.mddata-model.mdcontracts/quickstart.md
- Keep execution state in
tasks.md. Do not createprogress.md.
Treat repository AGENTS.md as the Spec Kit constitution equivalent. Reuse repo conventions instead of inventing parallel rules.
Mode selection
Choose exactly one mode up front:
requirements-first: default when desired behavior is clearer than implementation.design-first: use when the technical approach or architectural boundary is already constrained.bugfix: use when the primary job is correcting broken behavior and proving regression safety.
See references/playbook.md for the detailed decision rules and per-mode workflow.
Artifact location
Prefer continuing an existing matching spec folder.
If the repo has no stronger convention, use:
specs/<NNN>-<slug>/- Start numbering at
001. - Reuse the numbering style already present in
specs/if one exists.
Checkpoint-style interaction
This skill is not a strict stop-after-every-phase workflow.
Proceed autonomously by default, but stop for user confirmation when:
- A high-impact product ambiguity changes acceptance criteria or scope.
- Multiple materially different designs are plausible and the tradeoff is user-facing or expensive.
- A migration, external dependency, rollout risk, or destructive change lacks clear direction.
- The user explicitly asks to approve each phase.
Otherwise:
- Record assumptions directly in the artifacts.
- Keep moving.
- Surface open questions in concise chat updates.
Execution rules
Before implementation:
- Read
AGENTS.md, relevant manifests, existing specs, and nearby tests. - Pull in domain skills only when the task area clearly needs them.
- Keep requirements focused on behavior and constraints, not code structure.
- Keep plan content focused on implementation approach, contracts, and validation.
During implementation:
- Work from
tasks.mdin order unless dependency discovery requires a change. - Update the status block, decisions, blockers, and validation log inside
tasks.md. - If the plan changes materially, update the artifact first, then the code.
- Reuse repository commands and validation gates instead of inventing new ones.
Chat output pattern
When using this skill, keep chat summaries compact:
- Mode
- Assumptions or decisions locked this turn
- Artifacts created or updated
- Current or next task
- Validation status
- Open risks, if any
Durable detail belongs in the artifact files, not repeated in chat.
Naming and replacement
This skill intentionally keeps the canonical name $spec-workflow.
If an older spec-workflow/ skill exists in an installation target, replace it with this one instead of creating a parallel variant. Icons and brand metadata only help humans distinguish UI entries; they do not resolve skill-name collisions.
Resource map
references/playbook.md: detailed workflow, decision gates, and artifact policy.assets/templates/spec-template.md: core specification template.assets/templates/plan-template.md: implementation plan template.assets/templates/tasks-template.md: execution and status template.assets/templates/research-template.md: discovery and option analysis template.assets/templates/data-model-template.md: schema and migration template.assets/templates/quickstart-template.md: manual validation template.assets/templates/agents-snippet.md: optional repository rule snippet.