Commit 09f2bae
feat(ci): unify /review-until-clean (Phase A+B+C) + cron suppression marker
Port the unified /review-until-clean design proven on
vuls-saas/vuls-reach#21. Single skill drives a PR from local agent
review through Copilot review convergence to merge-ready state.
- .claude/skills/review-until-clean/SKILL.md: rewritten as Phase A+B+C
pipeline.
* Phase A: 5 agents in parallel — `code-reviewer` + `architect`
(named subagents) + 3 `general-purpose` Task calls (Code Reuse /
Code Quality / PR Hygiene). Iterate to 0 findings, build/vet/
test/lint per round (`golangci-lint run` included so the local
round matches the CI Go Lint gate).
* Phase B: push (after marker) → Copilot review iteration with
`<!-- copilot-fix-local:<HEAD> -->` marker (1 comment per HEAD,
PATCH heartbeat refreshes `updated_at`, 15-min freshness lock
enforces "max 1 active per PR", 30-min TTL hands off to cron on
skill crash). Identity gate to kotakanbe (only relevant for
Phase B/C; no-PR / draft branches push and exit). PR detection
via `$PR_NUMBER` env in CI / `gh pr view` no-arg locally.
`git push origin HEAD:$BRANCH` explicit refspec (CI's detached
HEAD has no upstream). Empty-stage commit guard. Marker posted
BEFORE push to close push-vs-marker race window.
* Phase C: paginated GraphQL discovery, classify (FIX /
ALREADY_FIXED / WONT_FIX), reply + resolve (WONT_FIX is replied
only, kept open for further discussion). Step 11.9 marker
cleanup: `B_CLEAN` re-tags marker to
`copilot-fix-local-converged:<HEAD>` (cron permanent suppress
so CI doesn't repeat Phase C); `B_ABORTED` deletes marker (cron
takes over next tick).
- .claude/skills/review/: directory deleted. Folded into
/review-until-clean as the canonical 1-shot skill (this repo
previously had a separate `/review` with --copilot-only / --dry-run
flags; both flags removed, --copilot-only superseded by always-on
Phase A which CI now runs too).
- .github/prompts/review.prompt.md: deleted (was the prompt for the
removed /review skill).
- .github/instructions/agent-orchestration.instructions.md (source
for .claude/rules/agents.md): document Task tool invocation +
general-purpose subagent_type explicitly. Available Skills table
now lists /review-until-clean as the merge-ready skill. Code
Review Policy rewritten to point at /review-until-clean Phase A+B+C
(5 agents, no flag). All `Agent(...)` examples rewritten to
`Task(...)`. agents.md regenerated via `make sync-instructions`.
- .github/workflows/copilot-clean-label.yml:
* `cron: '*/5'` → `'*/30'` (skill is the primary path; cron is
safety net).
* `STUCK_THRESHOLD_MIN: '7'` → `'25'` (refire every cron cycle in
the new cadence).
* `LOCAL_MARKER_MAX_AGE_MIN: '30'` env added.
* Add suppression marker check (active marker 30-min TTL with
`startswith()` filter and `.updated_at` age + converged marker
no-TTL permanent suppression, both kotakanbe-authored).
`local_in_progress` defaults to 1 (fail-CLOSED) so a comments-
fetch failure suppresses @claude rather than racing the local
skill. `already_triggered` filter extended to also count
`copilot-fix-local-converged:<HEAD>` markers.
* @claude trigger comment template rewritten to invoke
/review-until-clean directly: "Run /review-until-clean for this
PR (full Phase A+B+C ...)".
- .github/workflows/copilot-review-fix.yml: same @claude trigger
comment template update (manual `copilot-review` label path).
- .github/workflows/claude.yml:
* `timeout-minutes: 30` → `60` (Phase A 5-10 min + Phase B max 5
rounds × ~15 min + Phase C 1-3 min).
* `claude_args --allowedTools` adds `Task` (Phase A subagent
spawning).
* Resolve PR head ref in a new step; expose `PR_NUMBER` and
`PR_HEAD_REF` env to claude-code-action so the skill's Phase B
Step 7 can detect the PR / push refspec without relying on
detached-HEAD-incompatible `gh pr view` (no-arg form) and plain
`git push`.
Verification: GOWORK=off go build/vet/test ./... + golangci-lint run
./... — all green (0 lint issues).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 92d38fb commit 09f2bae
8 files changed
Lines changed: 835 additions & 623 deletions
File tree
- .claude
- rules
- skills
- review-until-clean
- review
- .github
- instructions
- prompts
- workflows
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments