debug
Investigation-first debugging — gather evidence, form confirmed root-cause hypothesis, hand off to fix mode with diagnosis file. TRIGGER when: user reports a…
Independently review and fix a scoped diff through bounded convergence rounds, with evidence-backed closure and explicit stop/recovery decisions. Use for requested adversarial review-and-fix loops, not a single read-only review.
$ npx -y skills add Borda/AI-Rig --skill challenge-resolve --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/challenge-resolveContext preview
The summary Claude sees to decide when to auto-load this skill.
Independently review and fix a scoped diff through bounded convergence rounds, with evidence-backed closure and explicit stop/recovery decisions. Use for requested adversarial review-and-fix loops, not a single read-only review.
name: challenge-resolve description: Independently review and fix a scoped diff through bounded convergence rounds, with evidence-backed closure and explicit stop/recovery decisions. Use for requested adversarial review-and-fix loops, not a single read-only review.
> Before asking, read [User Questions](../../shared/codex-user-questions.md).
Read, apply `../../shared/adversarial-loop.md` before dispatch or edits. That shared procedure owns the algorithm; this entrypoint owns Codex artifacts, the closing gate. Read `evidence-contract.md` before source capture or reviewer dispatch. Also read `../../shared/native-skill-contract.md` and `../../shared/specialist-orchestration.md` for authority, recurrence, reviewer admission, evidence limits.
{
"goal": "required review-and-fix objective",
"scope_files": ["bounded files or diff scope"],
"specification": "required behavior or acceptance criteria",
"symptom": "reported failure, or explicit preventive review",
"caller_run": "optional existing workflow run to resume",
"done_when": "independent final review is clean and normal checks pass"
}Use default max 3 review rounds, including initial W_0. In-scope feasible fixes are authorized by a review-and-fix request; a structural finding does not authorize scope expansion, public API changes, commits, installs, network access or publication. A caller's stricter scope or admission still applies.
Read `../../shared/helper-cli-contract.md`; create a run with `create_run.py --skill challenge-resolve`. Record `caller_run` when supplied, without overwriting its artifacts. Retain baseline source and acceptance evidence. Write `loop-report.md` with `Scope`, `Rounds`, `Findings`, `Recovery`, and `Verification` sections. Identify implementation author and allowed reviewer route before dispatch.
Follow the shared five-step procedure: challenge and collect findings; report the old/new table once after each validated round; resolve every feasible in-scope finding; escalate unresolved `security`, `critical` or `high`; repeat until clean, three rounds, plateau or a non-converging score. Retain `loop-ledger.json`, `loop-actions.json`, `round-<index>.diff`, current snapshot `current.diff` and each independent report. Read `adversarial_loop.py --help`, validate the ledger after each round, and invoke `adversarial_loop.py --ledger <run-directory>/loop-ledger.json --progress` only after a newly completed challenge, before the next fix, review or stop. Show its full cumulative stderr table with `Iteration | Critical | High | Medium | Low | Nits | Weighted score` and literal `old + new` cells. Never show a placeholder progress table before a validated round or repeat the table in unrelated status updates. Keep the final canonical `Results` table unchanged. Structural or repeated findings alone do not stop an authorized feasible fix; scope, authority, recurrence, plateau, missing independence, stale evidence and exhausted rounds retain their shared stop rules. A `fixed-pending-verification` finding remains open. After resolution/escalation, bind every open finding to an action and run `adversarial_loop.py --ledger <run-directory>/loop-ledger.json --actions <run-directory>/loop-actions.json` before another challenge or final handoff. The helper validates recorded actions, not their truth; the parent must inspect feasibility and fix evidence.
Collect scoped source snapshots with the existing `collect_diff.py` snapshot mode, retain `loop-evidence.json` per `evidence-contract.md`. Use existing Code Review routing, frozen contexts, specialist manifests for reviewer provenance; never manufacture a second runtime evidence format. Every participating reviewer receives the exact snapshot contents, diff, response contract, returns one structured response containing every finding, with only the route-required provenance header outside it. Preserve original reports and runtime evidence.
This explicitly requested loop uses the shared orchestration policy's bounded serial-review exception, not additional parallel waves or write delegation. Set a 1,500-output-token hard reviewer limit when the runtime supports it; otherwise request that target, record its advisory status, and never truncate findings. Re-plan and request a decision only when the next round needs new scope, authority, or a caller-specific approval. There is no fake independence fallback: parent-serial inspection stays labeled non-independent and cannot satisfy this skill's clean outcome.
Require independent final current-diff coverage before reporting clean. Run `adversarial_loop.py --ledger <run-directory>/loop-ledger.json` for the computed stop decision, then this skill's `validate_evidence.py` for existing reviewer provenance, returned findings, dispatched source contents, freshly recaptured current source. Derive the runtime log root and active `CODEX_THREAD_ID` from the observed host configuration, never from review input or the ledger. A declared identity or saved hash alone is insufficient. Never turn rejected evidence into accepted coverage.
Use `run_gates.py` for actual project lint, format, types, tests, review, with explicit reasons for genuinely inapplicable checks. Include `adversarial_loop.py --ledger <run-directory>/loop-ledger.json --require-clean` in the review gate, along with checks of independent coverage, current source, request conformance. The flag exits nonzero for a valid but non-clean loop, so a stopped ledger cannot masquerade as a passing review gate. Report `status=fail` with the concrete reason when the loop is not clean. For a supplied caller, resume its first unmet checkpoint, complete its ordinary gates and artifact contract too; neither result substitutes for the other.
Store the ch
Practical agent workflows for Python, ML, and open-source maintenance. AI-Rig turns recurring work—scoping a change, reproducing a bug, reviewing a pull request, running an experiment, or checking release readiness—into explicit workflows with specialist
Repo: Borda/AI-Rig
Investigation-first debugging — gather evidence, form confirmed root-cause hypothesis, hand off to fix mode with diagnosis file. TRIGGER when: user reports a…
TDD-first feature development — crystallise API as a demo test, drive implementation to pass it, run quality stack and progressive review loop. TRIGGER when:…
Reproduce-first bug resolution — capture bug in failing regression test, apply minimal fix, run quality stack and review loop. TRIGGER when: user reports a…
Analysis-only planning — classify and scope a task without writing code; outputs a structured plan to .plans/active/. TRIGGER when: user wants to understand…
Test-first refactoring — audit coverage, add characterization tests, apply changes with safety net, run quality stack and review loop. TRIGGER when: user wants…
Multi-agent code review of local Python files, directories, or the current git diff covering architecture, tests, performance, docs, lint, security, and API…