spike
Opens a throwaway spike of this project in its own git worktree, beside the project directory, with every hook off there except the audit trail — no format, check, tests, compose gate or guard — so ex
Files1
View on GitHubSKILL.md.claude/skills/spike/SKILL.md
GitHubspike — a throwaway worktree where only the audit trail stays on
/spike <slug> creates ../<project>-spike-<slug> on branch spike/<slug> and reduces that
worktree's .claude/settings.json to the hooks spike.keep_modes lists. The main checkout
never relaxes, and this session stays enforced; the person opens claude in the worktree.
Why this is a skill (Form 2) and not an agent
Form 2 because the trigger is the person deciding to explore (axis 2) and its effect — a worktree with enforcement off — must never start on the model's own decision. It is not an agent: none of the three reasons applies, the output is two lines and the work is three commands. Not disableAllHooks in a settings.local.json, which turns the audit trail off with everything else (0198, option 2).
Contract
- Class: ops —
skill_classes.opsin@.claude/schemas/extensions.json: writes no file of this project with a tool; its effect is a sibling worktree, made bygit worktree addandArchHook.jar spike. - Reads the project root (
git rev-parse --show-toplevel) and the argument. - Writes nothing inside the project. Outside it: the worktree
../<project>-spike-<slug>on branchspike/<slug>, whose.claude/settings.jsonArchHook.jar spikereduces to thespike.keep_modesentries and marksskip-worktree. - Does not merge, commit or push the spike, nor delete it —
endprints the commands. Promoting spike code is a/new-featurerun in the main checkout. - Design:
@.claude/decisions/0198-spike-worktree-with-hooks-off.md.
Procedure
- Preconditions. Run from the main checkout:
git rev-parse --git-direqualsgit rev-parse --git-common-dir; otherwise stop (failure mode 1). The argument is a slug matching[a-z0-9][a-z0-9-]*; missing → ask once withAskUserQuestion, then stop. end <slug>— print, do not run:git worktree remove ../<project>-spike-<slug>andgit branch -D spike/<slug>, plus one line: the spike's spend is already in/audit-usage. Stop.- Create.
git worktree add ../<project>-spike-<slug> -b spike/<slug>, where<project>is the basename of the root. Exists already → failure mode 2. - Relax.
java -jar .claude/hooks/ArchHook.jar spike ../<project>-spike-<slug>and relay its stdout line verbatim. Non-zero → failure mode 3. - Report, then stop:
✅ Spike <slug> — ../<project>-spike-<slug> on spike/<slug> Hooks ....... audit only (format, check, tests, compose gate, guard off there) Next ........ open `claude` in that directory; this session stays enforced End ......... /spike end <slug>
Failure modes
- Not the main checkout:
❌ /spike runs from the main checkout; this is a linked worktree. Open the project root and run it there. - Worktree or branch exists:
❌ ../<project>-spike-<slug> or spike/<slug> already exists. Pick another slug, or /spike end <slug> first. spikemode refused:❌ ArchHook spike refused: <its stderr first line>. The worktree exists with every hook on — remove it with git worktree remove ../<project>-spike-<slug>.