docs: make specs/plans git-tracked and transient — retired via git rm at cycle close

docs/specs and docs/plans hold only the active cycle's artefacts: a spec/plan is committed while its cycle is live and git-rm'd in the cycle-close commit (after audit drift-clean), so HEAD shows only in-flight work while git history keeps the full text. No issue-posting, no gitignore branch — git history + the design ledger are the durable record.

Rewrites conventions.md § Lifecycle as the single source of truth; pipeline.md, design.md, README.md, specify, planner, glossary, brainstorm, issue, and the CLAUDE.md fragment follow it. Naming stays NNNN-slug.md (a within-cycle handle; recycling on an emptied directory is fine).
This commit is contained in:
2026-06-18 11:59:45 +02:00
parent c5da79f8fc
commit 012e70b058
10 changed files with 68 additions and 13 deletions
+30 -3
View File
@@ -27,14 +27,41 @@ These directories are fixed. A project that keeps specs and plans
elsewhere is the rare exception and states the override in its
`CLAUDE.md` project facts.
## Lifecycle
`docs/specs/` and `docs/plans/` hold **only the active cycle's
artefacts** — they are working space, not an archive. A spec or plan is
valid for the cycle that produces it; its code shapes drift the moment
the code moves, so a stale one left lying around reads as a live API
reference and misleads the next agent that opens it.
The two directories stay **git-tracked** — never git-ignored. A
spec/plan is committed while its cycle is live, and at **cycle close**
after `audit` is drift-clean — the orchestrator **retires** it: `git rm`
the spec and plan in the cycle-close commit. The deletion rides in that
commit, so at `HEAD` the directories hold only what is still in flight,
while the full text stays recoverable from git history
(`git show <rev>:<path>`).
A spec/plan is therefore **transient in the repo**: present for its own
cycle, gone from `HEAD` afterwards. The durable record of a past cycle
is the design ledger (where the rationale is lifted during audit) + the
git history of the spec, plan, and code — never a live file under
`docs/specs` / `docs/plans`.
## Naming
Counter-prefixed, per directory: `NNNN-slug.md`, 4-digit
zero-padded. The counter is per directory, assigned in creation
order, and stable for the life of the file. New files take the
next-higher number; deleted files retire their number (numbers are
not recycled). `brainstorm` / `specify` / `planner` scan the target
directory for the next free number before writing.
next-higher number; `brainstorm` / `specify` / `planner` scan the
target directory for the next free number before writing.
The number is a within-cycle handle, not a stable archival ID.
Because the directories hold only active artefacts (see § Lifecycle),
an emptied directory restarts at `0001` and a number freed by a
retired file may be reused — that recycling is fine, since the durable
record is git history, not the filename.
The slug separator is `-`.
+5
View File
@@ -87,6 +87,11 @@ standing reading (`CLAUDE.md` + `git log -10`), git discipline
(only-orchestrator commits, main sacrosanct), Gitea + `closes #N`,
and the whole pipeline graph (see `pipeline.md`).
Specs and plans are ephemeral active-cycle artefacts — the two
directories stay git-tracked and hold only what is in flight; at cycle
close each is `git rm`'d from the repo, kept only in git history, never
as a durable file (see `conventions.md` § Lifecycle).
## Project facts (project-specific)
The handful of facts that genuinely vary per project live in the
+9 -4
View File
@@ -123,8 +123,9 @@ Hard-gate before plan — the spec-production core and the carrier of the
"no plan without an approved spec" invariant. Takes a settled design
(directly from sources, or a ratified design handed over by
`brainstorm`), applies the feature-acceptance criterion, writes the
spec to `docs/specs`, runs the `grounding-check` gate, and takes user
sign-off — with review but no interview. Bounces to `brainstorm` the moment the sources do not
spec to `docs/specs` (an ephemeral active-cycle artefact, git-tracked
and `git rm`'d at cycle close — see `conventions.md` § Lifecycle), runs
the `grounding-check` gate, and takes user sign-off — with review but no interview. Bounces to `brainstorm` the moment the sources do not
resolve a load-bearing design decision. A core node — the
spec-production gate before `planner` on every design path.
@@ -148,7 +149,8 @@ juror can ratify the resolution instead of blocking for lack of one. See
### planner
Hard-gate before implement. Produces a placeholder-free,
bite-sized implementation plan in `docs/plans`
bite-sized implementation plan in `docs/plans` (ephemeral, retired
alongside the spec at cycle close — see `conventions.md` § Lifecycle)
that the implement skill can execute task-by-task. Dispatches
the plan-recon agent for read-only file-structure mapping.
@@ -188,7 +190,10 @@ review-and-commit discipline; the orchestrator inspects and commits.
Runs at cycle close. Dispatches the architect agent (read-only
drift review against the design ledger) and the bencher agent
(regression diagnostics). Reports drift and regress.
(regression diagnostics). Reports drift and regress. Once it is
drift-clean, the orchestrator retires the cycle's spec and plan —
`git rm`'ing them in the cycle-close commit (see `conventions.md`
§ Lifecycle).
### debug