Skip to content

feat(harness): per-worktree setup/teardown lifecycle hooks (#9) - #30

Merged
robercano-ghbot merged 1 commit into
mainfrom
feat/issue-9-worktree-lifecycle-rebased
Jul 2, 2026
Merged

feat(harness): per-worktree setup/teardown lifecycle hooks (#9)#30
robercano-ghbot merged 1 commit into
mainfrom
feat/issue-9-worktree-lifecycle-rebased

Conversation

@robercano-ghbot

Copy link
Copy Markdown
Collaborator

Per-worktree setup/teardown lifecycle hooks so isolated implementer/reviewer worktrees can bootstrap toolchain state (node_modules, forge install, caches) and run all gates in-worktree.

  • .claude/scripts/worktree.shgate.sh-style runner: reads .worktree.<phase> from the adapter, honors GATES_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 — run worktree.sh setup first when gating a fresh worktree.

This supersedes #29 — identical content, but rebased onto current main so it merges cleanly. #29's branch was cut from a stale base and went CONFLICTING on implementer.md; this branch's implementer.md keeps 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:docs follow-up.

Closes #9.

🤖 Generated with Claude Code

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-ghbot
robercano-ghbot merged commit d2666ea into main Jul 2, 2026
6 checks passed
@robercano-ghbot
robercano-ghbot deleted the feat/issue-9-worktree-lifecycle-rebased branch July 2, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Per-worktree setup/teardown lifecycle hooks so isolated workers can run all gates

2 participants