refactor(pipeline): ignore specs/plans via project-local docs/.gitignore

Replace the global ~/.config/git/ignore mechanism with a committed,
per-project docs/.gitignore whose entries `specs/` and `plans/` are
relative to docs/. The ignore now travels with each repo instead of
living in the user's global excludes.

specify (Step 3) and planner (intro) create docs/.gitignore on demand
if a project has not set it up yet, so a spec/plan can never become
committable. conventions.md § File layout is the single source; the
onboarding fragment tells a new project to set it up.

The global ~/.config/git/ignore block is removed separately (it is
outside this repo).
This commit is contained in:
2026-07-02 11:53:59 +02:00
parent 2bc0cf025f
commit ea54be6535
4 changed files with 32 additions and 20 deletions
+11 -7
View File
@@ -28,13 +28,17 @@ elsewhere is the rare exception and states the override in its
`CLAUDE.md` project facts.
Both directories are **git-ignored** — their contents are transient
working files, never committed (see § Lifecycle). The plugin ignores
them **globally**: `docs/specs/` and `docs/plans/` live in the user's
global git excludes (`~/.config/git/ignore`, the XDG default that
applies to every repo), next to the other plugin-wide ignores. One
entry set covers every project — no per-project `.gitignore` line is
needed, though a project MAY add its own if it wants the ignore to
travel with the repo.
working files, never committed (see § Lifecycle). The ignore is
**project-local**: each project commits a `docs/.gitignore` whose two
entries, `specs/` and `plans/`, are relative to `docs/` and so match
`docs/specs/` and `docs/plans/`. That `docs/.gitignore` is the one
committed thing — it travels with the repo; the spec and plan files it
covers never are. It is created once (whichever skill first writes a
working file — `specify`, or `planner` on a direct tidy dispatch —
creates it if absent) and committed like any other repo file, after
which both directories are invisible to git for every future cycle. A
new project sets this up as part of adopting the plugin
(`../templates/CLAUDE.md.fragment`).
## Lifecycle