Follow-up to #94 — Layer 2: protected-paths guard (deterministic).
No agent-authored diff may touch .claude/** (except its own worktree state), .github/workflows/**, gates.json, hooks, or scripts. Enforce in TWO places:
- (a) a check in
merge-ready.sh that refuses to merge and labels the PR needs-human when the diff touches protected paths;
- (b) a reviewer hard-reject rule.
Decision point (from #94): self-hosted repos (this one — harness files ARE the product) must let agents edit harness files. Recommend a per-adapter protectedPaths config (array of globs) in gates.json, defaulting to the protected set for downstream adopters, with the self-adapter (.claude/self/gates.json) supplying a permissive override. Document the override in docs/HARDENING.md. (Prefer configurable default + self-adapter override over hardcoding.)
Acceptance (from #94): "A PR diff touching protected paths is never auto-merged and is flagged, with a documented self-hosting override."
Follow-up to #94 — Layer 2: protected-paths guard (deterministic).
No agent-authored diff may touch
.claude/**(except its own worktree state),.github/workflows/**,gates.json, hooks, or scripts. Enforce in TWO places:merge-ready.shthat refuses to merge and labels the PRneeds-humanwhen the diff touches protected paths;Decision point (from #94): self-hosted repos (this one — harness files ARE the product) must let agents edit harness files. Recommend a per-adapter
protectedPathsconfig (array of globs) ingates.json, defaulting to the protected set for downstream adopters, with the self-adapter (.claude/self/gates.json) supplying a permissive override. Document the override indocs/HARDENING.md. (Prefer configurable default + self-adapter override over hardcoding.)Acceptance (from #94): "A PR diff touching protected paths is never auto-merged and is flagged, with a documented self-hosting override."