feat(harness): per-worktree setup/teardown lifecycle hooks (#9) - #30
Merged
Merged
Conversation
Rebased onto current main to resolve the conflict on .claude/agents/implementer.md that blocked the approved PR #29 (its branch was cut from a stale base). Content is identical to #29 — merged cleanly onto main: keeps the GitHub-identity + explicit-staging rules already on main and layers the worktree bootstrap step + teardown + renumbering. - .claude/scripts/worktree.sh — gate.sh-style setup/teardown runner (GATES_FILE-aware). - .claude/gates.json + .claude/self/gates.json — new "worktree" {setup,teardown} block. - implementer.md — step 1 bootstrap + teardown after PR; steps renumbered. - test-runner.md — run worktree.sh setup first when gating a fresh worktree. Supersedes #29. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011HosUeuSvhetARboEfDW6K
robercano
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per-worktree
setup/teardownlifecycle hooks so isolated implementer/reviewer worktrees can bootstrap toolchain state (node_modules,forge install, caches) and run all gates in-worktree..claude/scripts/worktree.sh—gate.sh-style runner: reads.worktree.<phase>from the adapter, honorsGATES_FILE, resolves root from its own location (installs into the worktree), skips (exit 0) when empty, exits 2 on bad phase, propagates a failing hook's code..claude/gates.json+.claude/self/gates.json— new"worktree": {setup, teardown}block.implementer.md— step 1 Bootstrap your worktree + teardown after PR; steps renumbered.test-runner.md— runworktree.sh setupfirst when gating a fresh worktree.This supersedes #29 — identical content, but rebased onto current
mainso it merges cleanly. #29's branch was cut from a stale base and wentCONFLICTINGonimplementer.md; this branch'simplementer.mdkeeps main's GitHub-identity + explicit-staging rules and layers the worktree changes on top (verified: no main content dropped).Reviewer lenses (correctness, tests) both approved the identical change on #29; self-gates green. Docs coverage of the hook is a
module:docsfollow-up.Closes #9.
🤖 Generated with Claude Code