Quickstart: red-first reproductions
Run every recipe in a scratch repository with an isolated HOME/XDG_*. Use spec-kitty from this checkout's .venv/bin, with a fresh pip install -e . so the merge driver subprocess is current. Each recipe must fail on main @ b7ada760 and pass after the fix.
1. #4919: init → agent mission create → agent decision open → agent decision defer → agent decision resolve → rm kitty-specs/<m>/decisions/index.json → doctor decisions --mission <m> --repair.
2. #4900:
3. #4933:
4. #4940:
5. #4998:
6. #4964: for each registered migrate subcommand, run migrate --dry-run <sub> on a legacy fixture. Expected: the tree is unchanged, and repin-hooks → exit 2. Also migrate --force <sub> → exit 2.
- Today:
malformed_folds:[D], count 0, exit 0. - Expected: D rebuilt as resolved.
- Second fixture: the issue's on-disk event pair written directly to
status.events.jsonl. - Third fixture: two
DecisionPointOpenedevents for one id. Expected:clean:falseon diagnose, and exit 1 on repair with the decision kept. - Create two missions, then
consolidateboth. Expected:meta.jsonon the target has 1 and 2. - Driver unit:
spec-kitty merge-driver-metawith oursnull, theirs1→1; ours3, theirs1→3. - Commit
src/app/meta.jsonand edit it without committing, thenconsolidate. Expected: exit 1 withMERGE_UNSAFE_PRIMARY_DIRTYnaming the file, and the edit intact. - Repeat inside a lane worktree. Expected:
MERGE_UNSAFE_WORKTREE_DIRTY. - Control: a dirty
kitty-specs/<m>/meta.jsonand a dirtysub/kitty-specs/<m>/meta.jsonstay exempt. agent config set lint_on_edit true, then write.claude/settings.jsonwith permissions, env"OWNER":"José", a userPreToolUsehook and theSessionStart/Stophooks, encoded as (a) UTF-8 BOM, (b) UTF-16 BOM and (c) cp1252. Runagent config sync --sync-hooks.- Expected: (a) and (b) are merged with every entry kept and the original bytes backed up; (c) is byte-identical, exit 1.
- Repeat (c) with
live-work install claude. - Monkeypatch
SkillRegistry.from_packageto CRLF copies of the skill sources, and render CRLF command templates. Install into a scratch project. Expected: byte-identical to the LF install, anddoctor tool-surfaces --kind doctrine-skill --fix/doctor skills --fix/ verifier report 0 drifts. - Seed a doubled-frontmatter install whose manifest records the corrupted hash, then run
upgrade. Expected: files restored, and the second run is a no-op.