$npx -y skills add Borda/AI-Rig --skill planAnalysis-only planning — classify and scope a task without writing code; outputs a structured plan to .plans/active/. TRIGGER when: user wants to understand scope and risks before implementation; phrases: \"plan this\", \"scope out X\", \"what would it take to Y\", \"analyse befo
| 1 | <objective> |
| 2 | |
| 3 | Analysis-only. Produces structured plan, no code. Use to understand scope, risks, effort before `/develop:feature`, `/develop:fix`, `/develop:refactor`. |
| 4 | |
| 5 | NOT for: code/tests (use develop mode); `.claude/` config (use `/foundry:manage` (requires foundry plugin)). |
| 6 | - non-Python-only projects (JS/TS/Go/Rust with no Python source) — downstream develop skills assume pytest; planning analysis language-agnostic but downstream implementation needs language-native toolchain |
| 7 | - mixed refactor+feature tasks — run /develop:refactor first, then /develop:feature |
| 8 | |
| 9 | </objective> |
| 10 | |
| 11 | <workflow> |
| 12 | |
| 13 | <!-- Agent resolution: see _DEV_SHARED/agent-resolution.md (resolved via dev_shared_resolve.py and explicitly Read in workflow) --> |
| 14 | |
| 15 | ## Agent Resolution |
| 16 | |
| 17 | ```bash |
| 18 | _PATHS=$(python "${CLAUDE_PLUGIN_ROOT:-plugins/cc_develop}/bin/dev_shared_resolve.py" --foundry 2>/dev/null) # timeout: 5000 |
| 19 | _DEV_SHARED=$(echo "$_PATHS" | head -1) |
| 20 | _FOUNDRY_SHARED=$(echo "$_PATHS" | tail -1) |
| 21 | cat "$_DEV_SHARED/agent-resolution.md" |
| 22 | ``` |
| 23 | |
| 24 | 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:challenger`. |
| 25 | |
| 26 | **Checkpoint**: plan single-pass — `.plans/active/<slug>` file existence = implicit resume signal. No `.developments/` checkpoint needed; if interrupted, re-run `/develop:plan` to regenerate (no code changes made). |
| 27 | |
| 28 | ```bash |
| 29 | _DEV_SHARED=$(python "${CLAUDE_PLUGIN_ROOT:-plugins/cc_develop}/bin/dev_shared_resolve.py" 2>/dev/null) # timeout: 5000 |
| 30 | cat "$_DEV_SHARED/task-hygiene.md" |
| 31 | ``` |
| 32 | |
| 33 | ## Flag parsing |
| 34 | |
| 35 | Parse flags into shell variables (not prose) so downstream blocks see correct values. Persist to **per-invocation namespaced** temp dir for cross-block access (bash state lost between Bash() calls). Namespace by PID to prevent collision when two `/develop:plan` invocations run concurrently: |
| 36 | |
| 37 | ```bash |
| 38 | # timeout: 5000 |
| 39 | export CSID="${CLAUDE_CODE_SESSION_ID:-$PPID}" |
| 40 | PLAN_NS="${TMPDIR:-/tmp}/dev-plan-$$-${CSID}" |
| 41 | mkdir -p "$PLAN_NS" |
| 42 | echo "$PLAN_NS" > "${TMPDIR:-/tmp}/dev-plan-ns-current-${CSID}" # downstream blocks read back namespace |
| 43 | python "${CLAUDE_PLUGIN_ROOT:-plugins/cc_develop}/bin/dev_parse_args.py" --skill plan --write-files "$ARGUMENTS" |
| 44 | # values written to ${TMPDIR:-/tmp}/dev-plan-<flag>-${CSID} (legacy paths: see SKILL_SPECS["plan"]) |
| 45 | cp "${TMPDIR:-/tmp}/dev-challenge-enabled-${CSID}" "$PLAN_NS/challenge-enabled" 2>/dev/null || echo "true" > "$PLAN_NS/challenge-enabled" |
| 46 | cp "${TMPDIR:-/tmp}/dev-codemap-raw-${CSID}" "$PLAN_NS/codemap-raw" 2>/dev/null || echo "auto" > "$PLAN_NS/codemap-raw" |
| 47 | cp "${TMPDIR:-/tmp}/dev-semble-enabled-${CSID}" "$PLAN_NS/semble-enabled" 2>/dev/null || echo "false" > "$PLAN_NS/semble-enabled" |
| 48 | cp "${TMPDIR:-/tmp}/dev-plan-max-depth-${CSID}" "$PLAN_NS/max-depth" 2>/dev/null || echo "3" > "$PLAN_NS/max-depth" |
| 49 | ``` |
| 50 | |
| 51 | Downstream blocks recover namespace then read back, e.g. `PLAN_NS=$(cat ${TMPDIR:-/tmp}/dev-plan-ns-current-${CSID} 2>/dev/null); CODEMAP_ENABLED=$(cat "$PLAN_NS/codemap-enabled" 2>/dev/null || echo false)`. |
| 52 | |
| 53 | **Unsupported flag check** — after all supported flags extracted, scan `$ARGUMENTS` for remaining `--<token>` tokens. If found: print `! Unknown flag(s): \`--<token>\`. Supported: \`--no-challenge\`, \`--codemap\`, \`--no-codemap\`, \`--semble\`, \`--max-depth\`.` then invoke `AskUserQuestion` — (a) **Abort** (stop, re-invoke with correct flags) · (b) **Continue ignoring** (skip unknown flags, proceed). On Abort: stop. |
| 54 | |
| 55 | **Codemap auto-detection** — normalize `CODEMAP_RAW` to `true`/`false`; strict mode hard-fails when codemap unavailable: |
| 56 | |
| 57 | ```bash |
| 58 | # timeout: 5000 |
| 59 | export CSID="${CLAUDE_CODE_SESSION_ID:-$PPID}" |
| 60 | PLAN_NS=$(cat ${TMPDIR:-/tmp}/dev-plan-ns-current-${CSID} 2>/dev/null) |
| 61 | [ -n "$PLAN_NS" ] || { echo "! PLAN_NS empty — dev-plan-ns-current not found; re-run /develop:plan"; exit 1; } |
| 62 | CODEMAP_RAW=$(cat "$PLAN_NS/codemap-raw" 2>/dev/null || echo auto) |
| 63 | CODEMAP_ENABLED=$("${CLAUDE_PLUGIN_ROOT:-plugins/cc_develop}/bin/codemap-resolve" "$CODEMAP_RAW") |
| 64 | RESOLVE_EXIT=$? |
| 65 | if [ "$RESOLVE_EXIT" -ne 0 ]; then |
| 66 | if [ "$CODEMAP_RAW" = "strict" ]; then |
| 67 | echo "! BLOCKED — codemap |