Spec Vibe
A CLI-free, Markdown-only spec-driven development skill. It lands a versioned specs/ tree that humans read and coding agents consume, with no database, no generator, and no extra tooling beyond rg/fd/git.
The dual goal: keep specs as the durable memory of what the system does (the source of truth), and keep every change traceable from intent → spec → design → tasks → code → archive.
What this skill produces
A specs/ tree at the project root (or wherever the project keeps it):
specs/
├── current/ # source of truth — how the system behaves TODAY
│ └── <domain>.spec.md
├── changes/
│ ├── 0-draft/ # spec/proposal being written (or reverse-spec in progress)
│ ├── 1-wip/ # implementation in progress
│ ├── 2-done/ # implemented, pending verify + archive
│ └── 3-archive/ # merged & preserved for history
│ └── <id>/ # id = YYYY-MM-DD-<slug>
│ ├── proposal.md
│ ├── design.md
│ ├── tasks.md
│ └── specs/<domain>.delta.md
└── decisions/ # ADRs
└── NNNN-<slug>.md
Status is the folder, not a field. Moving a change forward is a git mv between state folders; the change's content never changes on a transition, so history stays clean.
There is intentionally no INDEX.md to maintain. The dashboard is generated on demand:
rg -n '^#' -g '*.md' specs/ # full outline of every spec, change, decision
rg -n '^#' -g '*.md' specs/changes/1-wip/ # what is in progress right now
This only works because the heading taxonomy is strict — see references/artifacts.md.
When to use this skill
Use it when the work changes behavior a user or downstream system relies on:
- building, modifying, or refactoring a feature, capability, or user-facing behavior
- changing an API, data schema, contract, protocol, or config that other code consumes
- a bug fix that alters an observable contract (not a pure typo fix)
- the user asks to "spec", "propose", "write requirements", "add an ADR", or "formalize" something
- code is already being changed and no spec/change folder exists for it (the reverse path — see below)
- auditing a repo for drift between code and specs
Do not use it for:
- prose, docs, marketing copy, or content creation with no behavior change
- formatting, renaming, comments, import sorting
- throwaway experiments the user explicitly marks as throwaway
- config tweaks with no contract impact
When in doubt about whether work is spec-worthy, ask — see the Stop-and-Ask checkpoints.
Entry points
Four prompt templates load this skill and follow its workflow:
/spec <idea> — propose and scaffold a new change (forward path).
/spec-audit — find spec drift: code changed without a spec, or specs without code; the entry point for the reverse path.
/spec-verify [id] — check spec↔code alignment for a change before archive.
/spec-archive <id> — run the verify gate, merge deltas into current/, move the change to 3-archive/.
The skill also triggers contextually when none of these commands is used.
Task matrix
Route to the right reference before producing output:
| Task |
Load first |
Output |
| Create a change (forward) |
references/structure.md, references/artifacts.md |
A 0-draft/<id>/ folder with proposal + delta + design + tasks |
| Reverse-spec from existing code |
references/triggers.md, references/artifacts.md |
A 0-draft/<id>/ folder with origin: vibe, validated by Q&A |
| Audit spec drift |
references/triggers.md, references/unix-queries.md |
A drift report: code without spec, spec without code, stale deltas |
| Verify before archive |
references/workflow.md |
A gap list (spec ↔ code), questions for the user |
| Archive a change |
references/workflow.md |
Merged current/<domain>.spec.md, folder moved to 3-archive/ |
| Write an ADR |
references/artifacts.md |
A decisions/NNNN-<slug>.md linked from the relevant proposal/design |
Do not load every reference by default. Load only what the task needs.
Reference loading
references/structure.md — the full folder tree, file-naming rules, the ID model (stable, path-independent), the frontmatter schema, and the status-as-folder convention. Read this before creating any file.
references/artifacts.md — the strict heading taxonomy that makes rg '^#' a real dashboard, plus copy-ready templates for proposal, design, tasks, delta, spec, and ADR. Read this before writing any artifact.
references/triggers.md — the full trigger matrix (forward, reverse, non-triggers), the reverse-detection signals, and the exact procedure for retroactively generating a spec from vibe-coded work. Read this for any audit or reverse-path task.
references/workflow.md — the state machine (0-draft → 1-wip → 2-done → 3-archive), git mv transitions, the archive merge procedure, and the verify gate. Read this for verify/archive tasks.
references/unix-queries.md — the rg/fd cookbook: the dashboard queries, per-state listings, cross-references by ID, requirement/scenario/task extraction. Read this to answer "what is the state of X" without an index file.
Core workflow
The virtuous cycle, mirroring OpenSpec's mental model but without its CLI:
- Specify — capture intent, scope, and acceptance as behavior-first requirements + scenarios.
- Plan — keep the technical approach in
design.md, the steps in tasks.md; keep behavior out of them.
- Implement — work through
tasks.md, checking items off; update artifacts as you learn.
- Verify — confirm the implementation matches the spec; surface gaps; let the human decide.
- Archive — merge the delta (
ADDED/MODIFIED/REMOVED) into current/<domain>.spec.md, move the folder to 3-archive/.
- Repeat — the next change builds on the updated source of truth.
Specs describe what (observable behavior). Design describes how (approach, decisions). Tasks describe steps. Never leak implementation detail into a spec — if the implementation can change without changing externally visible behavior, it does not belong in the spec.
The two paths
This skill is bidirectional. Most work is forward; some is reverse.
Forward path (default — spec-driven). Intent first. Create 0-draft/<id>/, write proposal → delta → design → tasks, get the plan approved, then implement. This is the default because it prevents requirements drift and keeps a reviewable contract between human intent and agent output.
Reverse path (vibe → spec). Sometimes code is written or explored first without a spec. That is allowed. The skill's triggers detect this (see references/triggers.md) and the agent then:
- Creates
0-draft/<id>/ with origin: vibe.
- Reverse-engineers proposal + delta + design + tasks from what was already built.
- Validates the reconstructed spec with the user via Q&A — never silently invent requirements.
- Once approved, advances normally toward archive, so
current/ ends up truthful.
Provenance is recorded in the frontmatter origin field (spec-driven or vibe) so a future reader knows whether a spec led the code or followed it.
The reverse path is intelligent about scope: it fires for behavior/contract changes, and stays silent for pure content/docs work that carries no behavior change.
Folder, status, and ID model (essentials)
- ID =
YYYY-MM-DD-<slug>, e.g. 2026-01-15-add-dark-mode. It is the folder name, the frontmatter id, and the single token used in every cross-reference. It never changes, even when the folder moves between states. Reference by ID, never by relative path — paths shift across state folders.
- Status = the state folder (
0-draft / 1-wip / 2-done / 3-archive). There is no status frontmatter field on purpose: a single source of truth, no drift. To advance a change, git mv its folder; content is unchanged, so Git tracks it as a rename.
- Domain = a short kebab slug (
auth, payments, ui). Specs are current/<domain>.spec.md; deltas are <change>/specs/<domain>.delta.md. Same domain on both sides makes the archive merge unambiguous.
- ADRs =
decisions/NNNN-<slug>.md, zero-padded for chronological ls. Reference them from proposal.md and design.md by their ID.
Full rules and edge cases live in references/structure.md.
Decision order
Apply this order to avoid wasted work and invented content:
- Read before writing. Check
current/ for the domain's existing spec, decisions/ for prior ADRs, and changes/ for in-flight work touching the same area. rg '<domain>' specs/ and rg '^### Requirement:' specs/current/<domain>.spec.md are the fastest entries.
- Reuse existing decisions. Do not re-litigate an architecture choice that an ADR already settled; link it.
- Specify behavior, not implementation. Land requirements + scenarios first; push "how" to design.
- Scope tightly. State explicit non-goals. A thin correct change beats a thick speculative one. Defer with
Open question rather than inventing.
- Capture decisions as ADRs when a choice is durable and non-obvious — during design, not after.
- Get approval before code on the forward path; reconstruct + validate on the reverse path.
Stop-and-Ask checkpoints
Pause and confirm with the user before:
- inventing requirements, constraints, or acceptance criteria the user has not stated — ask instead of filling gaps; mark undecided items
Open question
- silently picking one version of the truth when conflicting material exists (two behaviors, two contracts) — surface the conflict
- promoting reverse-path work: always validate the reconstructed spec via Q&A before recording it
- creating, editing, or correcting a project-level
AGENTS.md to point at specs/ — ask whether the change is critical before applying it
- archiving a change whose verify gate surfaced real gaps — let the human decide whether to fix code, fix spec, or accept the gap
- exposing sensitive material (secrets, unreleased names, internal-only context) in a file that may be shared or fed to third-party agents
If none of these apply, proceed with the conservative option that preserves existing truth and defers undecided items.
Default rules
current/ is the source of truth. Everything else (changes/, archive/, decisions/) is context that either proposes, records, or explains.
- Reference by ID, never by relative path. Paths move; IDs do not.
- Status is the folder. Do not add a
status field; do not rename a folder to encode status — the state folder already does.
- Keep the heading taxonomy strict.
rg '^#' is the dashboard; loose headings break it for everyone.
- Separate behavior (spec) from approach (design) from steps (tasks). A spec that names internal functions or libraries has leaked.
- Use RFC 2119 keywords deliberately:
MUST/SHALL (absolute), SHOULD (recommended), MAY (optional).
- One change = one folder. Keep changes small enough to archive independently.
- Preserve history: archive, never delete. The archive is the audit trail.
- Keep
AGENTS.md pointing at specs/ so other agents find it.
Failure modes
Handle these explicitly instead of improvising:
- No
specs/ tree exists yet. Propose scaffolding it (current/, changes/0-draft..3-archive/, decisions/) and adding a one-line pointer in AGENTS.md. Ask before creating a project-level AGENTS.md.
- Two changes touch the same requirement. Sequence them with
depends_on; if both are already in flight, surface the overlap and let the user order them.
- Spec and code have drifted apart. Run
/spec-audit; do not silently rewrite either side. Present the drift, let the user pick which is canonical, and record the choice (an ADR if it is architectural).
- Reverse-path work is ambiguous. Generate the most conservative spec that matches what was observably built; mark assumptions
Open question and validate via Q&A.
- A change has grown too large. Split it: parent change with
depends_on children, each archivable on its own.
- An ADR contradicts a new proposal. Flag it explicitly; either supersede the ADR (new ADR referencing the old) or align the proposal — never ignore the contradiction.
Output contracts
Match the response shape to the task:
- Create (forward): a
0-draft/<id>/ folder with proposal + delta + design + tasks, a short list of fields to confirm, and any Open question items.
- Reverse-spec: the same folder with
origin: vibe, plus the Q&A used to validate it, plus the list of assumptions that need confirmation.
- Audit: a drift report — code without spec, spec without code, stale requirements, contradicting ADRs — not a rewrite.
- Verify: a gap list (spec ↔ code) with severity, and the questions the human must answer before archive.
- Archive: the merged
current/<domain>.spec.md diff, the git mv to 3-archive/, and a one-line summary of what the source of truth now says.
Always end with the cold-agent test: list the questions a brand-new agent would still need to ask after reading only current/. Those are the source of truth's remaining gaps.
1---2name: spec-vibe3description: Run a CLI-free, Markdown-only spec-driven workflow over a specs/ tree — propose changes, write behavior-first specs and deltas, design, implement, then archive by merging deltas into the source of truth. Bidirectional workflow with a forward path (spec first) and a reverse path (vibe-code first, then retroactively generate and validate specs). Use whenever building, modifying, or refactoring a feature, behavior, API, schema, or contract; when code changes without an associated spec; when the user mentions specs, proposals, deltas, ADRs, acceptance criteria, living specs, or a spec-driven / vibe-coding workflow; or when auditing a repo for spec drift. Déclenche aussi en français, par exemple créer ou rédiger une spec, une proposition, un delta ou un ADR, formaliser une fonctionnalité, générer des specs depuis du code existant, auditer la dérive specs/code, workflow spec-driven ou vibe coding sans CLI ni base de données.4---56# Spec Vibe78A CLI-free, Markdown-only spec-driven development skill. It lands a versioned `specs/` tree that humans read and coding agents consume, with no database, no generator, and no extra tooling beyond `rg`/`fd`/`git`.910The dual goal: keep specs as the durable memory of *what the system does* (the source of truth), and keep every change traceable from intent → spec → design → tasks → code → archive.1112## What this skill produces1314A `specs/` tree at the project root (or wherever the project keeps it):1516```text17specs/18├── current/ # source of truth — how the system behaves TODAY19│ └── <domain>.spec.md20├── changes/21│ ├── 0-draft/ # spec/proposal being written (or reverse-spec in progress)22│ ├── 1-wip/ # implementation in progress23│ ├── 2-done/ # implemented, pending verify + archive24│ └── 3-archive/ # merged & preserved for history25│ └── <id>/ # id = YYYY-MM-DD-<slug>26│ ├── proposal.md27│ ├── design.md28│ ├── tasks.md29│ └── specs/<domain>.delta.md30└── decisions/ # ADRs31 └── NNNN-<slug>.md32```3334Status is the **folder**, not a field. Moving a change forward is a `git mv` between state folders; the change's content never changes on a transition, so history stays clean.3536There is intentionally **no `INDEX.md` to maintain**. The dashboard is generated on demand:3738```bash39rg -n '^#' -g '*.md' specs/ # full outline of every spec, change, decision40rg -n '^#' -g '*.md' specs/changes/1-wip/ # what is in progress right now41```4243This only works because the heading taxonomy is strict — see `references/artifacts.md`.4445## When to use this skill4647Use it when the work changes **behavior a user or downstream system relies on**:4849- building, modifying, or refactoring a feature, capability, or user-facing behavior50- changing an API, data schema, contract, protocol, or config that other code consumes51- a bug fix that alters an observable contract (not a pure typo fix)52- the user asks to "spec", "propose", "write requirements", "add an ADR", or "formalize" something53- code is already being changed and no spec/change folder exists for it (the **reverse path** — see below)54- auditing a repo for drift between code and specs5556Do **not** use it for:5758- prose, docs, marketing copy, or content creation with no behavior change59- formatting, renaming, comments, import sorting60- throwaway experiments the user explicitly marks as throwaway61- config tweaks with no contract impact6263When in doubt about whether work is spec-worthy, ask — see the Stop-and-Ask checkpoints.6465## Entry points6667Four prompt templates load this skill and follow its workflow:6869- `/spec <idea>` — propose and scaffold a new change (forward path).70- `/spec-audit` — find spec drift: code changed without a spec, or specs without code; the entry point for the reverse path.71- `/spec-verify [id]` — check spec↔code alignment for a change before archive.72- `/spec-archive <id>` — run the verify gate, merge deltas into `current/`, move the change to `3-archive/`.7374The skill also triggers contextually when none of these commands is used.7576## Task matrix7778Route to the right reference before producing output:7980| Task | Load first | Output |81|---|---|---|82| Create a change (forward) | `references/structure.md`, `references/artifacts.md` | A `0-draft/<id>/` folder with proposal + delta + design + tasks |83| Reverse-spec from existing code | `references/triggers.md`, `references/artifacts.md` | A `0-draft/<id>/` folder with `origin: vibe`, validated by Q&A |84| Audit spec drift | `references/triggers.md`, `references/unix-queries.md` | A drift report: code without spec, spec without code, stale deltas |85| Verify before archive | `references/workflow.md` | A gap list (spec ↔ code), questions for the user |86| Archive a change | `references/workflow.md` | Merged `current/<domain>.spec.md`, folder moved to `3-archive/` |87| Write an ADR | `references/artifacts.md` | A `decisions/NNNN-<slug>.md` linked from the relevant proposal/design |8889Do not load every reference by default. Load only what the task needs.9091## Reference loading9293- **`references/structure.md`** — the full folder tree, file-naming rules, the ID model (stable, path-independent), the frontmatter schema, and the status-as-folder convention. Read this before creating any file.94- **`references/artifacts.md`** — the strict heading taxonomy that makes `rg '^#'` a real dashboard, plus copy-ready templates for proposal, design, tasks, delta, spec, and ADR. Read this before writing any artifact.95- **`references/triggers.md`** — the full trigger matrix (forward, reverse, non-triggers), the reverse-detection signals, and the exact procedure for retroactively generating a spec from vibe-coded work. Read this for any audit or reverse-path task.96- **`references/workflow.md`** — the state machine (`0-draft → 1-wip → 2-done → 3-archive`), `git mv` transitions, the archive merge procedure, and the verify gate. Read this for verify/archive tasks.97- **`references/unix-queries.md`** — the `rg`/`fd` cookbook: the dashboard queries, per-state listings, cross-references by ID, requirement/scenario/task extraction. Read this to answer "what is the state of X" without an index file.9899## Core workflow100101The virtuous cycle, mirroring OpenSpec's mental model but without its CLI:1021031. **Specify** — capture intent, scope, and acceptance as behavior-first requirements + scenarios.1042. **Plan** — keep the technical approach in `design.md`, the steps in `tasks.md`; keep behavior out of them.1053. **Implement** — work through `tasks.md`, checking items off; update artifacts as you learn.1064. **Verify** — confirm the implementation matches the spec; surface gaps; let the human decide.1075. **Archive** — merge the delta (`ADDED`/`MODIFIED`/`REMOVED`) into `current/<domain>.spec.md`, move the folder to `3-archive/`.1086. **Repeat** — the next change builds on the updated source of truth.109110Specs describe **what** (observable behavior). Design describes **how** (approach, decisions). Tasks describe **steps**. Never leak implementation detail into a spec — if the implementation can change without changing externally visible behavior, it does not belong in the spec.111112## The two paths113114This skill is **bidirectional**. Most work is forward; some is reverse.115116**Forward path (default — spec-driven).** Intent first. Create `0-draft/<id>/`, write proposal → delta → design → tasks, get the plan approved, then implement. This is the default because it prevents requirements drift and keeps a reviewable contract between human intent and agent output.117118**Reverse path (vibe → spec).** Sometimes code is written or explored first without a spec. That is allowed. The skill's triggers detect this (see `references/triggers.md`) and the agent then:1191201. Creates `0-draft/<id>/` with `origin: vibe`.1212. Reverse-engineers proposal + delta + design + tasks from what was already built.1223. Validates the reconstructed spec with the user via Q&A — never silently invent requirements.1234. Once approved, advances normally toward archive, so `current/` ends up truthful.124125Provenance is recorded in the frontmatter `origin` field (`spec-driven` or `vibe`) so a future reader knows whether a spec led the code or followed it.126127The reverse path is intelligent about scope: it fires for behavior/contract changes, and stays silent for pure content/docs work that carries no behavior change.128129## Folder, status, and ID model (essentials)130131- **ID** = `YYYY-MM-DD-<slug>`, e.g. `2026-01-15-add-dark-mode`. It is the folder name, the frontmatter `id`, and the single token used in every cross-reference. It **never** changes, even when the folder moves between states. Reference by ID, never by relative path — paths shift across state folders.132- **Status** = the state folder (`0-draft` / `1-wip` / `2-done` / `3-archive`). There is no `status` frontmatter field on purpose: a single source of truth, no drift. To advance a change, `git mv` its folder; content is unchanged, so Git tracks it as a rename.133- **Domain** = a short kebab slug (`auth`, `payments`, `ui`). Specs are `current/<domain>.spec.md`; deltas are `<change>/specs/<domain>.delta.md`. Same domain on both sides makes the archive merge unambiguous.134- **ADRs** = `decisions/NNNN-<slug>.md`, zero-padded for chronological `ls`. Reference them from `proposal.md` and `design.md` by their ID.135136Full rules and edge cases live in `references/structure.md`.137138## Decision order139140Apply this order to avoid wasted work and invented content:1411421. **Read before writing.** Check `current/` for the domain's existing spec, `decisions/` for prior ADRs, and `changes/` for in-flight work touching the same area. `rg '<domain>' specs/` and `rg '^### Requirement:' specs/current/<domain>.spec.md` are the fastest entries.1432. **Reuse existing decisions.** Do not re-litigate an architecture choice that an ADR already settled; link it.1443. **Specify behavior, not implementation.** Land requirements + scenarios first; push "how" to design.1454. **Scope tightly.** State explicit non-goals. A thin correct change beats a thick speculative one. Defer with `Open question` rather than inventing.1465. **Capture decisions as ADRs** when a choice is durable and non-obvious — during design, not after.1476. **Get approval before code** on the forward path; reconstruct + validate on the reverse path.148149## Stop-and-Ask checkpoints150151Pause and confirm with the user before:152153- inventing requirements, constraints, or acceptance criteria the user has not stated — ask instead of filling gaps; mark undecided items `Open question`154- silently picking one version of the truth when conflicting material exists (two behaviors, two contracts) — surface the conflict155- promoting reverse-path work: always validate the reconstructed spec via Q&A before recording it156- creating, editing, or correcting a project-level `AGENTS.md` to point at `specs/` — ask whether the change is critical before applying it157- archiving a change whose verify gate surfaced real gaps — let the human decide whether to fix code, fix spec, or accept the gap158- exposing sensitive material (secrets, unreleased names, internal-only context) in a file that may be shared or fed to third-party agents159160If none of these apply, proceed with the conservative option that preserves existing truth and defers undecided items.161162## Default rules163164- `current/` is the source of truth. Everything else (`changes/`, `archive/`, `decisions/`) is context that either proposes, records, or explains.165- Reference by **ID**, never by relative path. Paths move; IDs do not.166- Status is the folder. Do not add a `status` field; do not rename a folder to encode status — the state folder already does.167- Keep the heading taxonomy strict. `rg '^#'` is the dashboard; loose headings break it for everyone.168- Separate behavior (spec) from approach (design) from steps (tasks). A spec that names internal functions or libraries has leaked.169- Use RFC 2119 keywords deliberately: `MUST`/`SHALL` (absolute), `SHOULD` (recommended), `MAY` (optional).170- One change = one folder. Keep changes small enough to archive independently.171- Preserve history: archive, never delete. The archive is the audit trail.172- Keep `AGENTS.md` pointing at `specs/` so other agents find it.173174## Failure modes175176Handle these explicitly instead of improvising:177178- **No `specs/` tree exists yet.** Propose scaffolding it (`current/`, `changes/0-draft..3-archive/`, `decisions/`) and adding a one-line pointer in `AGENTS.md`. Ask before creating a project-level `AGENTS.md`.179- **Two changes touch the same requirement.** Sequence them with `depends_on`; if both are already in flight, surface the overlap and let the user order them.180- **Spec and code have drifted apart.** Run `/spec-audit`; do not silently rewrite either side. Present the drift, let the user pick which is canonical, and record the choice (an ADR if it is architectural).181- **Reverse-path work is ambiguous.** Generate the most conservative spec that matches what was observably built; mark assumptions `Open question` and validate via Q&A.182- **A change has grown too large.** Split it: parent change with `depends_on` children, each archivable on its own.183- **An ADR contradicts a new proposal.** Flag it explicitly; either supersede the ADR (new ADR referencing the old) or align the proposal — never ignore the contradiction.184185## Output contracts186187Match the response shape to the task:188189- **Create (forward):** a `0-draft/<id>/` folder with proposal + delta + design + tasks, a short list of fields to confirm, and any `Open question` items.190- **Reverse-spec:** the same folder with `origin: vibe`, plus the Q&A used to validate it, plus the list of assumptions that need confirmation.191- **Audit:** a drift report — code without spec, spec without code, stale requirements, contradicting ADRs — not a rewrite.192- **Verify:** a gap list (spec ↔ code) with severity, and the questions the human must answer before archive.193- **Archive:** the merged `current/<domain>.spec.md` diff, the `git mv` to `3-archive/`, and a one-line summary of what the source of truth now says.194195Always end with the cold-agent test: list the questions a brand-new agent would still need to ask after reading only `current/`. Those are the source of truth's remaining gaps.