feat(skills): machine-wide gate for heavy test runs

Parallel yolo/nightshift/blitz sessions each ran the full suite and OOMed
the box. gate.sh caps concurrency, memory and build parallelism; skills now
run scoped checks in the loop and one gated full run per push.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015YUXS63P1WCdC6bEKWcnAE
This commit is contained in:
naps62
2026-07-27 12:41:03 +00:00
parent c8de8bcb5a
commit 999f759691
6 changed files with 167 additions and 10 deletions
+3 -2
View File
@@ -34,12 +34,13 @@ Autonomous workflow: tracking issue -> worktree -> implementation -> PR -> revie
Follow the implementation guidelines from COMMON.md.
After implementation is complete:
1. Run the `buildCommand` from the config. All checks must pass before opening a PR.
1. Run the `buildCommand` from the config through the gate — `<skills-root>/linear-common/scripts/gate.sh -- <buildCommand>` (see "Local verification budget" in COMMON.md). All checks must pass before opening a PR. Exit 75 = the machine was busy and it never ran: open the PR and let CI be the check, saying so in the PR body. Exit 137 = memory cap, not a failing test.
2. If tests fail, fix them. Do not ship broken code.
3. During implementation, check only the module you touched. This is the one full run.
### 3.5 Self-review gate (before opening the PR)
Spawn the **`cavecrew-reviewer`** subagent on your own diff (Agent tool, `subagent_type: caveman:cavecrew-reviewer`; point it at `git diff <defaultBranch>...HEAD`). It returns one line per finding, severity-tagged, no praise. Fix anything real it surfaces, then re-run the `buildCommand`. This catches obvious issues before `/land` waits on human/bot review — cheaper than a review round-trip.
Spawn the **`cavecrew-reviewer`** subagent on your own diff (Agent tool, `subagent_type: caveman:cavecrew-reviewer`; point it at `git diff <defaultBranch>...HEAD`). It returns one line per finding, severity-tagged, no praise. Fix anything real it surfaces, then re-check **only the modules those fixes touched** — don't run the whole suite a second time; CI covers the rest. This catches obvious issues before `/land` waits on human/bot review — cheaper than a review round-trip.
Advisory, not a hard gate: for a trivial diff (typo, one-liner, config bump) skip it. Don't loop on it — one pass, address the genuine findings, move on.