$npx -y skills add Borda/AI-Rig --skill fixReproduce-first bug resolution — capture bug in failing regression test, apply minimal fix, run quality stack and review loop. TRIGGER when: user reports a bug, regression, or unexpected behaviour in Python code with a traceback, failing test, or issue number; phrases: \"fix this
| 1 | <objective> |
| 2 | |
| 3 | Reproduce-first bug resolution. Capture bug in failing regression test, apply minimal fix, verify via quality stack and review loop. |
| 4 | |
| 5 | NOT for: |
| 6 | - CI-only failures with no local traceback — use `/develop:debug` first (`--ci-run <run-id>` for GitHub Actions logs) |
| 7 | - production incidents without any CI run or traceback (use `/foundry:investigate` (requires foundry plugin)) |
| 8 | - `.claude/` config issues (use `/foundry:audit` (requires foundry plugin)) |
| 9 | - non-Python projects (JS/TS/Go/Rust) — toolchain assumes pytest; use language-native toolchain instead |
| 10 | - CSS/JS-only frontend changes (no Python source touched) — use `/develop:feature` for new frontend work or direct editing for surgical CSS/JS fixes; this skill's regression-test gate assumes pytest |
| 11 | |
| 12 | </objective> |
| 13 | |
| 14 | <compaction> |
| 15 | |
| 16 | Key boundary: end of Step 2 — reproduction test written and failing, before Step 3 code edits. |
| 17 | Second boundary: end of Step 3 — fix applied and regression test passing, before Step 4 review stack. |
| 18 | Preserve at boundary 1: dev-dir, regression test path, root cause summary, plan-file, --keep items. |
| 19 | Preserve at boundary 2: dev-dir, changed files list, test outcomes, regression test path. |
| 20 | |
| 21 | </compaction> |
| 22 | |
| 23 | <workflow> |
| 24 | |
| 25 | <!-- Agent Resolution: resolved at runtime via $_DEV_SHARED; source at plugins/cc_develop/skills/_shared/agent-resolution.md --> |
| 26 | |
| 27 | ## Agent Resolution |
| 28 | |
| 29 | ```bash |
| 30 | _PATHS=$(python "${CLAUDE_PLUGIN_ROOT:-plugins/cc_develop}/bin/dev_shared_resolve.py" --foundry 2>/dev/null) # timeout: 5000 |
| 31 | _DEV_SHARED=$(echo "$_PATHS" | head -1) |
| 32 | _FOUNDRY_SHARED=$(echo "$_PATHS" | tail -1) |
| 33 | # loads: compaction-contract.md |
| 34 | cat "$_DEV_SHARED/agent-resolution.md" |
| 35 | ``` |
| 36 | |
| 37 | Contains: foundry check + fallback table. If foundry not installed: substitute each `foundry:X` with `general-purpose` per table. Agents this skill uses: `foundry:sw-engineer`, `foundry:qa-specialist` (conditional — outcome C only), `foundry:challenger`. |
| 38 | |
| 39 | ```bash |
| 40 | _DEV_SHARED=$(python "${CLAUDE_PLUGIN_ROOT:-plugins/cc_develop}/bin/dev_shared_resolve.py" 2>/dev/null) # timeout: 5000 |
| 41 | cat "$_DEV_SHARED/task-hygiene.md" |
| 42 | ``` |
| 43 | |
| 44 | ## Project Detection |
| 45 | |
| 46 | ```bash |
| 47 | _DEV_SHARED=$(python "${CLAUDE_PLUGIN_ROOT:-plugins/cc_develop}/bin/dev_shared_resolve.py" 2>/dev/null) # timeout: 5000 |
| 48 | cat "$_DEV_SHARED/runner-detection.md" |
| 49 | ``` |
| 50 | Sets `$TEST_CMD` (full suite) and `$PYTEST_CMD` (pytest flags). Run at skill start. |
| 51 | |
| 52 | **Language preflight gate**: after runner-detection.md, check project type: |
| 53 | |
| 54 | ```bash |
| 55 | # timeout: 5000 |
| 56 | if [ ! -f "pyproject.toml" ] && [ ! -f "setup.py" ] && [ ! -f "setup.cfg" ]; then |
| 57 | NON_PY=$(ls package.json Cargo.toml go.mod 2>/dev/null | head -1) |
| 58 | fi |
| 59 | ``` |
| 60 | |
| 61 | If `NON_PY` non-empty: invoke `AskUserQuestion` — "Non-Python project detected (`$NON_PY` present, no pyproject.toml/setup.py). This toolchain assumes pytest. How to proceed?" · (a) **Abort** — use language-native toolchain · (b) **Continue** — I know what I'm doing (project has Python). On Abort: stop. |
| 62 | |
| 63 | **Optional `--plan <path>`**: if `$ARGUMENTS` contains `--plan <path>` (at any position), read plan file first. Extract `Affected files`, `Risks`, `Suggested approach` — use to populate Step 1 analysis instead of cold codebase exploration. Skip agent feasibility re-check (already done in `/develop:plan`). Store plan path as `PLAN_FILE`. |
| 64 | |
| 65 | ```bash |
| 66 | _DEV_SHARED=$(python "${CLAUDE_PLUGIN_ROOT:-plugins/cc_develop}/bin/dev_shared_resolve.py" 2>/dev/null) # timeout: 5000 |
| 67 | cat "$_DEV_SHARED/preflight-helpers.md" |
| 68 | ``` |
| 69 | Execute --plan path extraction; sets `$PLAN_FILE`. |
| 70 | |
| 71 | **Checkpoint init**: run `DEV_DIR=$(python "${CLAUDE_PLUGIN_ROOT:-plugins/cc_develop}/bin/dev_run_dir.py" 2>/dev/null) # timeout: 5000` to create `.developments/<TS>/` and capture path. Write `checkpoint.md` inside `$DEV_DIR`. After each major step (1, 2, 3, 4), append `step: N — completed` to `$DEV_DIR/checkpoint.md`. On skill start, check for existing `.developments/*/checkpoint.md` — offer resume from last completed step if found. |
| 72 | |
| 73 | ```bash |
| 74 | # persist DEV_DIR for compaction recovery — bash state lost between Bash() calls # timeout: 5000 |
| 75 | export |