Docs-First (Spec-Driven)
Overview
Use this skill when a task needs a spec-driven workflow. The objective is to create or refresh PRD + TECH_SPEC + ACTION_PLAN + the task checklist before editing code or docs, capture a brief translation of the user’s request in the PRD for context retention, and keep task mirrors and review evidence in sync as understanding evolves.
Workflow
- •Draft or refresh PRD + TECH_SPEC + ACTION_PLAN
- •PRD: capture intent and user-request translation (use
.agent/task/templates/prd-template.md). - •TECH_SPEC: capture technical requirements (use
.agent/task/templates/tech-spec-template.md; stored undertasks/specs/<id>-<slug>.md). - •ACTION_PLAN: capture sequencing/milestones (use
.agent/task/templates/action-plan-template.md). - •Depth scales with scope, but all three docs are required.
- •Register the TECH_SPEC and task
- •Add the TECH_SPEC to
tasks/index.json(includinglast_review). - •Create/refresh the task checklist (
tasks/tasks-*.md) and mirror to.agent/task/. - •Update
docs/TASKS.mdwith the snapshot entry. - •When you need machine-readable artifacts, use a consistent template or structured output format.
- •Run docs-review before implementation
- •
npx codex-orchestrator start docs-review --format json --no-interactive --task <task-id> - •Link the manifest path in the checklists.
- •Implement and validate
- •Keep PRD/TECH_SPEC/ACTION_PLAN, checklists, and manifests aligned.
- •Update PRD/TECH_SPEC/ACTION_PLAN when new constraints, risks, or scope changes are discovered during implementation.
- •If docs are missing or stale, stop and request approval before proceeding.
Output expectations
- •PRD + TECH_SPEC + ACTION_PLAN + task checklist created/refreshed.
- •TECH_SPEC linked in task registry and mirrors updated.
- •Docs-review evidence captured before implementation.
Related docs
- •
docs/AGENTS.md - •
docs/guides/instructions.md