$npx -y skills add Borda/AI-Rig --skill featureTDD-first feature development — crystallise API as a demo test, drive implementation to pass it, run quality stack and progressive review loop. TRIGGER when: user asks to build new functionality, add a capability, or implement a feature in a Python project; phrases: \"add X\", \"
| 1 | <objective> |
| 2 | |
| 3 | TDD-first feature development. Crystallise API as demo use-case test, drive implementation to pass it, close quality gaps with review, docs, quality stack. |
| 4 | |
| 5 | NOT for: |
| 6 | - bug fixes (use `/develop:fix`) |
| 7 | - `.claude/` config changes (use `/foundry:manage` (requires foundry plugin)) |
| 8 | - non-Python projects (JS/TS/Go/Rust) — toolchain assumes pytest; use language-native toolchain instead |
| 9 | - mixed refactor+feature tasks — run /develop:refactor first, then /develop:feature |
| 10 | |
| 11 | </objective> |
| 12 | |
| 13 | <compaction> |
| 14 | |
| 15 | Key boundary: end of Step 1 — scope analysis and plan complete, before Step 2 demo test writing. |
| 16 | Second boundary: end of Step 3 — TDD loop complete, before Step 4 review/close gaps. |
| 17 | Preserve at boundary 1: dev-dir (checkpoint.md), plan-file, scope from sw-engineer analysis, PYTEST_CMD, --keep items. |
| 18 | Mid-loop refresh: after each Step 3 TDD cycle contract is rewritten with changed-files + checkpoint.md path — so mid-loop compaction resumes loop (re-run suite for green state) instead of restarting Step 2 demo. |
| 19 | Preserve at boundary 2: dev-dir, changed files list, test outcomes, PYTEST_CMD. |
| 20 | |
| 21 | </compaction> |
| 22 | |
| 23 | <workflow> |
| 24 | |
| 25 | <!-- Agent resolution: see _DEV_SHARED/agent-resolution.md (mounted by develop plugin init) --> |
| 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`, `foundry:doc-scribe`, `foundry:linting-expert`, `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 | <!-- |
| 64 | NON_PY and MULTI_LANG gates are mutually exclusive — NON_PY fires only when no Python markers exist; |
| 65 | MULTI_LANG fires only when Python markers AND non-Python markers coexist. Both cannot be true on the |
| 66 | same repo; never reorder so MULTI_LANG runs before NON_PY. |
| 67 | --> |
| 68 | **Monorepo language-target gate**: if `NON_PY` empty (Python markers found) but non-Python markers also exist, confirm target language: |
| 69 | |
| 70 | ```bash |
| 71 | # timeout: 5000 |
| 72 | MULTI_LANG=false |
| 73 | [ -f "pyproject.toml" ] && [ -f "package.json" ] && MULTI_LANG=true |
| 74 | [ -f "pyproject.toml" ] && [ -f "go.mod" ] && MULTI_LANG=true |
| 75 | [ -f "pyproject.toml" ] && [ -f "Cargo.toml" ] && MULTI_LANG=true |
| 76 | ``` |
| 77 | |
| 78 | If `MULTI_LANG=true`: invoke `AskUserQuestion` — "Monorepo detected (Python + non-Python markers coexist). This skill targets Python/pytest. Is the feature you're building Python-only?" · (a) **Yes — Python only** — proceed · (b) **No — involves non-Python code too** — abort; use a language-native toolchain for the non-Python portion. On (b): stop. |
| 79 | |
| 80 | **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 feasi |