Clawsweeper until clean
Use this skill when the source of truth is the Clawsweeper bot acting on the
GitHub PR, not a local review command. Trigger Clawsweeper, wait for the fresh
review, fix actionable findings, push, and repeat.
First establish three consecutive ClawSweeper re-reviews with zero
actionable findings on one head and a platinum-or-better rating label.
Then use the completed reviews to make up to three honest attempts at diamond.
Platinum is successful; diamond is a bounded stretch goal, not a second gate.
Do not use this skill for a one-shot trigger. A single /clawsweeper re-review
comment is enough for that. Use this skill when you want the loop run to
convergence.
Non-negotiables
trigger: comment exactly `/clawsweeper re-review` on an eligible PR via `gh pr comment`; no other comment text is authorized
review_source: must be a clawsweeper review/comment posted AFTER your trigger comment
fix_tool: apply targeted fixes directly, or use the repo-specific fix workflow when one exists
stop_condition: 3 consecutive clawsweeper re-reviews with zero actionable findings
minimum_readiness: one of `rating: 🐚 platinum hermit`, `rating: 🦞 diamond lobster`, or `rating: 🦀 challenger crab` must be present after the clean streak
diamond_timing: inspect rank-up moves only after the clean platinum-or-better baseline
diamond_attempt_limit: 3 across the entire workflow, including any resumed run
platinum_result: success only with a concrete explanation of why diamond was not reached
counter_reset: any clawsweeper re-review that lists actionable findings resets the consecutive-clean counter to 0
no_early_exit: do not stop on 1 or 2 clean re-reviews
no_self_review: do not skip a re-trigger because you "already know it's clean"
no_self_label: never add, edit, or preserve the readiness label on Clawsweeper's behalf
Pre-flight
- Confirm the target PR number and repo. Pin those values; reuse them every
iteration.
- Confirm
gh is authenticated against the right account and gh pr view <pr>
returns the expected PR. The command-comment exception applies only when the
authenticated user authored the PR or the task contains explicit evidence
that the user substantially contributed to it. If neither can be verified,
ask before commenting.
- Capture a baseline timestamp and head SHA using
polling-and-freshness.md.
- Recover
diamond_attempts from the current workflow state and PR history.
Count each prior clean platinum baseline followed by an author-controlled
rank-up change. If the history is ambiguous, use the highest plausible count
instead of risking a fourth attempt.
- Decide a safety cap. Defaults: 6 re-review cycles per clean-convergence
phase, at most 4 phases, and 20 min wall-clock per wait for any
single Clawsweeper response. The first phase establishes the baseline; each
later phase exists only after one diamond attempt changes review input.
- Confirm the working tree is clean enough that fixes will land on the right
branch. Note any untracked/local changes that might confuse targeted fixes.
Loop
Maintain across the whole session:
consecutive_clean = 0
phase_iterations = 0
total_iterations = 0
diamond_attempts = <recovered integer from 0 through 3>
last_trigger_at = <ISO timestamp of your most recent /clawsweeper re-review comment>
last_head_sha = <PR head SHA at trigger time>
Repeat:
- Increment
phase_iterations and total_iterations.
- Trigger Clawsweeper with
gh pr comment <pr> --body "/clawsweeper re-review".
- Record
last_trigger_at and last_head_sha.
- Monitor for a fresh, finished response using
polling-and-freshness.md.
- Classify the response with verdicts.md.
- If clean, increment
consecutive_clean; stop only at 3/3.
- If it has findings, reset
consecutive_clean to 0, fix only those findings
with fixing.md, push, and re-trigger.
- If ambiguous, do not count it as clean. Re-trigger once; if ambiguity
remains, stop and report.
- If a safety cap is hit, stop and report unresolved state honestly.
- After
3/3, wait for ClawSweeper's label update and verify a
platinum-or-better label with
polling-and-freshness.md. If it is
absent at the wall-clock cap, stop incomplete. Do not apply it yourself.
- Continue to After clean: try for diamond. Do not report final success
before that step returns a terminal outcome.
Between consecutive clean re-reviews, do not edit code or push commits. The
streak is only meaningful when Clawsweeper agrees with itself three times on the
same tree.
After clean: try for diamond
Read rank-up.md and
rating-rubric.md, then apply the post-clean
decision. If it selects an author-controlled improvement, increment
diamond_attempts before the mutation, reset consecutive_clean and
phase_iterations, and return to the loop for another clean-convergence phase.
After that phase, use the newest result to decide whether to stop or spend
another attempt. Preserve diamond_attempts across any caller-driven resume so
the workflow can never start a fourth rank-up cycle.
This step finishes as already-diamond-or-better, diamond-achieved, or
platinum-with-explanation. A platinum result must name the concrete evidence,
environment, scope, residual-risk, or owner-decision ceiling. Do not rerun an
unchanged review merely in hope of a different rating.
Completion criteria
- Final stop reason is
already-diamond-or-better, diamond-achieved,
platinum-with-explanation, safety-cap-hit, or wall-clock-cap-hit.
- Success requires three consecutive fresh Clawsweeper verdicts with zero
actionable findings on the same PR head SHA and one platinum-or-better
rating label after that streak.
- Every actionable finding resets the clean counter, even on the third
re-review.
- Every counted response is fresh, finished, and from Clawsweeper.
- The readiness label was observed rather than added by the agent, and no push
occurred after the final counted review.
- At most three post-clean diamond attempts occurred across the complete
workflow. Each attempted a distinct concrete improvement, and a final
platinum result includes the specific reason it did not reach diamond.
- The final report follows reporting.md.
Context pointers
- Use polling-and-freshness.md for the
baseline command, polling command, response identity, finished-response rules,
and head-SHA discipline.
- Use verdicts.md for clean, findings, and ambiguous
classification.
- Use fixing.md for targeted fix and push rules.
- Use rank-up.md only after the first clean
platinum-or-better baseline, for the bounded diamond attempts and their
stopping explanation.
- Use rating-rubric.md with rank-up.md to read
the awarded label, tiers, and rank-up moves.
- Use reporting.md for iteration narration, final
report fields, hard rules, and common mistakes.
1---2name: clawsweeper-until-clean3description: Re-review ClawSweeper PRs until three clean passes and a platinum-or-better label, then make up to three bounded attempts at diamond and explain the ceiling when platinum remains.4---56# Clawsweeper until clean78Use this skill when the source of truth is the Clawsweeper bot acting on the9GitHub PR, not a local review command. Trigger Clawsweeper, wait for the fresh10review, fix actionable findings, push, and repeat.1112First establish **three consecutive ClawSweeper re-reviews** with **zero13actionable findings** on one head and a **platinum-or-better** rating label.14Then use the completed reviews to make up to three honest attempts at diamond.15Platinum is successful; diamond is a bounded stretch goal, not a second gate.1617Do not use this skill for a one-shot trigger. A single `/clawsweeper re-review`18comment is enough for that. Use this skill when you want the loop run to19convergence.2021## Non-negotiables2223```yaml24trigger: comment exactly `/clawsweeper re-review` on an eligible PR via `gh pr comment`; no other comment text is authorized25review_source: must be a clawsweeper review/comment posted AFTER your trigger comment26fix_tool: apply targeted fixes directly, or use the repo-specific fix workflow when one exists27stop_condition: 3 consecutive clawsweeper re-reviews with zero actionable findings28minimum_readiness: one of `rating: 🐚 platinum hermit`, `rating: 🦞 diamond lobster`, or `rating: 🦀 challenger crab` must be present after the clean streak29diamond_timing: inspect rank-up moves only after the clean platinum-or-better baseline30diamond_attempt_limit: 3 across the entire workflow, including any resumed run31platinum_result: success only with a concrete explanation of why diamond was not reached32counter_reset: any clawsweeper re-review that lists actionable findings resets the consecutive-clean counter to 033no_early_exit: do not stop on 1 or 2 clean re-reviews34no_self_review: do not skip a re-trigger because you "already know it's clean"35no_self_label: never add, edit, or preserve the readiness label on Clawsweeper's behalf36```3738## Pre-flight39401. Confirm the target PR number and repo. Pin those values; reuse them every41 iteration.422. Confirm `gh` is authenticated against the right account and `gh pr view <pr>`43 returns the expected PR. The command-comment exception applies only when the44 authenticated user authored the PR or the task contains explicit evidence45 that the user substantially contributed to it. If neither can be verified,46 ask before commenting.473. Capture a baseline timestamp and head SHA using48 [polling-and-freshness.md](references/polling-and-freshness.md).494. Recover `diamond_attempts` from the current workflow state and PR history.50 Count each prior clean platinum baseline followed by an author-controlled51 rank-up change. If the history is ambiguous, use the highest plausible count52 instead of risking a fourth attempt.535. Decide a safety cap. Defaults: **6 re-review cycles per clean-convergence54 phase**, at most **4 phases**, and **20 min wall-clock per wait** for any55 single Clawsweeper response. The first phase establishes the baseline; each56 later phase exists only after one diamond attempt changes review input.576. Confirm the working tree is clean enough that fixes will land on the right58 branch. Note any untracked/local changes that might confuse targeted fixes.5960## Loop6162Maintain across the whole session:6364```text65consecutive_clean = 066phase_iterations = 067total_iterations = 068diamond_attempts = <recovered integer from 0 through 3>69last_trigger_at = <ISO timestamp of your most recent /clawsweeper re-review comment>70last_head_sha = <PR head SHA at trigger time>71```7273Repeat:74751. Increment `phase_iterations` and `total_iterations`.762. Trigger Clawsweeper with `gh pr comment <pr> --body "/clawsweeper re-review"`.773. Record `last_trigger_at` and `last_head_sha`.784. Monitor for a fresh, finished response using79 [polling-and-freshness.md](references/polling-and-freshness.md).805. Classify the response with [verdicts.md](references/verdicts.md).816. If clean, increment `consecutive_clean`; stop only at `3/3`.827. If it has findings, reset `consecutive_clean` to 0, fix only those findings83 with [fixing.md](references/fixing.md), push, and re-trigger.848. If ambiguous, do not count it as clean. Re-trigger once; if ambiguity85 remains, stop and report.869. If a safety cap is hit, stop and report unresolved state honestly.8710. After `3/3`, wait for ClawSweeper's label update and verify a88 platinum-or-better label with89 [polling-and-freshness.md](references/polling-and-freshness.md). If it is90 absent at the wall-clock cap, stop incomplete. Do not apply it yourself.9111. Continue to **After clean: try for diamond**. Do not report final success92 before that step returns a terminal outcome.9394Between consecutive clean re-reviews, do not edit code or push commits. The95streak is only meaningful when Clawsweeper agrees with itself three times on the96same tree.9798## After clean: try for diamond99100Read [rank-up.md](references/rank-up.md) and101[rating-rubric.md](references/rating-rubric.md), then apply the post-clean102decision. If it selects an author-controlled improvement, increment103`diamond_attempts` before the mutation, reset `consecutive_clean` and104`phase_iterations`, and return to the loop for another clean-convergence phase.105After that phase, use the newest result to decide whether to stop or spend106another attempt. Preserve `diamond_attempts` across any caller-driven resume so107the workflow can never start a fourth rank-up cycle.108109This step finishes as `already-diamond-or-better`, `diamond-achieved`, or110`platinum-with-explanation`. A platinum result must name the concrete evidence,111environment, scope, residual-risk, or owner-decision ceiling. Do not rerun an112unchanged review merely in hope of a different rating.113114## Completion criteria115116- Final stop reason is `already-diamond-or-better`, `diamond-achieved`,117 `platinum-with-explanation`, `safety-cap-hit`, or `wall-clock-cap-hit`.118- Success requires three consecutive fresh Clawsweeper verdicts with zero119 actionable findings on the same PR head SHA and one platinum-or-better120 rating label after that streak.121- Every actionable finding resets the clean counter, even on the third122 re-review.123- Every counted response is fresh, finished, and from Clawsweeper.124- The readiness label was observed rather than added by the agent, and no push125 occurred after the final counted review.126- At most three post-clean diamond attempts occurred across the complete127 workflow. Each attempted a distinct concrete improvement, and a final128 platinum result includes the specific reason it did not reach diamond.129- The final report follows [reporting.md](references/reporting.md).130131## Context pointers132133- Use [polling-and-freshness.md](references/polling-and-freshness.md) for the134 baseline command, polling command, response identity, finished-response rules,135 and head-SHA discipline.136- Use [verdicts.md](references/verdicts.md) for clean, findings, and ambiguous137 classification.138- Use [fixing.md](references/fixing.md) for targeted fix and push rules.139- Use [rank-up.md](references/rank-up.md) only after the first clean140 platinum-or-better baseline, for the bounded diamond attempts and their141 stopping explanation.142- Use [rating-rubric.md](references/rating-rubric.md) with rank-up.md to read143 the awarded label, tiers, and rank-up moves.144- Use [reporting.md](references/reporting.md) for iteration narration, final145 report fields, hard rules, and common mistakes.