fix(init): the skill it writes ignores itself, as a generated directory

A repository that ignores .claude wholesale, as Crafter.Build does,
never sees in git the prepush skill init writes, and the question was
whether it should: it should not. The skill is generated
from the shipped text with init's marker and refreshed by every init, a
tracked copy lags the installed binary whenever the shipped skill
changes, and every refresh would be a diff in the consumer's own ranges.
Jorijn's ruling: every consumer leaves it untracked, one init per
checkout.

When init owns the skill - wrote or refreshed it - it writes a
.gitignore of `*` beside it, as Python's venv and pytest's cache do for
theirs: the directory ignores itself, that file included, on every
checkout that runs init, whatever the repository's own rules or one
machine's say, and nothing of the repository's is edited for it. A copy
init wrote that the repository tracks gets the step that untracks it, in
the output and in the README's migration. A skill the repository wrote
itself is kept and not ignored - the ignore file an earlier init wrote
beside it goes - and an ignore file init did not write is kept unless
--force; a link there, dangling or not, is refused like the skill's
other links unless --force, which replaces it (the old setup's exemption
- a link that resolves into the review-gates submodule at the toplevel,
not one that merely names it - is the skill directory's and SKILL.md's
alone), and nothing is written through it: the links go before anything
is written, and one init cannot remove refuses. The procedure's log
records the ruling.
This commit is contained in:
Jorijn van der Graaf 2026-11-01 17:24:03 +01:00
commit ddf32a8c02
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
4 changed files with 185 additions and 20 deletions

View file

@ -666,3 +666,12 @@ repository.
smoke config, this file, the shipped skill and the manifest template:
every reader of a setting must agree (2026-10-12), and the run lock still
keyed on the mode's name where the gate-state is the kind's.
- 2026-11-01 — **the generated skill stays untracked** (Jorijn, as
Crafter.Build was set up: a consumer that ignored `.claude` wholesale
never saw the skill in git, and whether it should was the question):
every consumer leaves `.claude/skills/prepush/SKILL.md` out of git, one
`init` per checkout. `init` writes a `.gitignore` of `*` beside the
skill, as a generated directory does, and edits nothing of the
repository's for it: the first self-review's gate on the repository's
own ignore rules was reworked twice in one range (a tracked path, one
machine's rule) before the gate itself went (2026-10-31's rule).