@softspark/ai-toolkit 2.11.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/AGENTS.md +21 -21
  2. package/CHANGELOG.md +62 -0
  3. package/README.md +16 -9
  4. package/app/.claude-plugin/plugin.json +1 -1
  5. package/app/agents/meta-architect.md +44 -0
  6. package/app/skills/agent-creator/SKILL.md +22 -6
  7. package/app/skills/analyze/SKILL.md +21 -1
  8. package/app/skills/api-patterns/SKILL.md +27 -0
  9. package/app/skills/app-builder/SKILL.md +24 -0
  10. package/app/skills/architecture-audit/SKILL.md +24 -0
  11. package/app/skills/architecture-decision/SKILL.md +24 -0
  12. package/app/skills/biz-scan/SKILL.md +24 -0
  13. package/app/skills/brand-voice/SKILL.md +36 -0
  14. package/app/skills/briefing/SKILL.md +41 -1
  15. package/app/skills/build/SKILL.md +24 -1
  16. package/app/skills/chaos/SKILL.md +22 -1
  17. package/app/skills/ci/SKILL.md +22 -1
  18. package/app/skills/ci-cd-patterns/SKILL.md +25 -0
  19. package/app/skills/command-creator/SKILL.md +31 -2
  20. package/app/skills/content-moderation-patterns/SKILL.md +25 -0
  21. package/app/skills/database-patterns/SKILL.md +25 -0
  22. package/app/skills/debug/SKILL.md +23 -1
  23. package/app/skills/design-engineering/SKILL.md +25 -0
  24. package/app/skills/docker-devops/SKILL.md +26 -0
  25. package/app/skills/ecommerce-patterns/SKILL.md +26 -0
  26. package/app/skills/evaluate/SKILL.md +22 -1
  27. package/app/skills/evolve/SKILL.md +25 -0
  28. package/app/skills/explain/SKILL.md +26 -1
  29. package/app/skills/explore/SKILL.md +25 -0
  30. package/app/skills/fix/SKILL.md +26 -1
  31. package/app/skills/git-mastery/SKILL.md +26 -0
  32. package/app/skills/grill-me/SKILL.md +22 -7
  33. package/app/skills/health/SKILL.md +22 -1
  34. package/app/skills/hipaa-validate/SKILL.md +25 -8
  35. package/app/skills/hook-creator/SKILL.md +107 -14
  36. package/app/skills/index/SKILL.md +22 -1
  37. package/app/skills/instinct-review/SKILL.md +25 -1
  38. package/app/skills/introspect/SKILL.md +26 -1
  39. package/app/skills/lint/SKILL.md +27 -1
  40. package/app/skills/mcp-builder/SKILL.md +27 -0
  41. package/app/skills/mem-search/SKILL.md +40 -0
  42. package/app/skills/migrate/SKILL.md +27 -1
  43. package/app/skills/migration-patterns/SKILL.md +26 -0
  44. package/app/skills/night-watch/SKILL.md +22 -1
  45. package/app/skills/observability-patterns/SKILL.md +26 -0
  46. package/app/skills/onboard/SKILL.md +22 -1
  47. package/app/skills/panic/SKILL.md +21 -1
  48. package/app/skills/performance-profiling/SKILL.md +34 -0
  49. package/app/skills/persona/SKILL.md +21 -4
  50. package/app/skills/plan/SKILL.md +26 -0
  51. package/app/skills/plan-writing/SKILL.md +26 -0
  52. package/app/skills/plugin-creator/SKILL.md +23 -6
  53. package/app/skills/pr/SKILL.md +24 -1
  54. package/app/skills/prd-to-issues/SKILL.md +22 -6
  55. package/app/skills/prd-to-plan/SKILL.md +22 -4
  56. package/app/skills/predict/SKILL.md +25 -0
  57. package/app/skills/qa-session/SKILL.md +23 -7
  58. package/app/skills/rag-patterns/SKILL.md +26 -0
  59. package/app/skills/refactor/SKILL.md +26 -0
  60. package/app/skills/refactor-plan/SKILL.md +23 -6
  61. package/app/skills/rollback/SKILL.md +27 -1
  62. package/app/skills/security-patterns/SKILL.md +27 -0
  63. package/app/skills/skill-audit/SKILL.md +22 -5
  64. package/app/skills/skill-creator/SKILL.md +58 -13
  65. package/app/skills/swift-patterns/SKILL.md +27 -107
  66. package/app/skills/swift-patterns/reference/frameworks.md +111 -0
  67. package/app/skills/test/SKILL.md +23 -1
  68. package/app/skills/testing-patterns/SKILL.md +26 -0
  69. package/app/skills/triage-issue/SKILL.md +22 -4
  70. package/app/skills/ubiquitous-language/SKILL.md +23 -8
  71. package/benchmarks/ecosystem-doctor-snapshot.json +395 -0
  72. package/kb/history/completed/deep-coverage-v3-20260423.md +160 -0
  73. package/kb/history/completed/ecosystem-deep-sweep-20260423.md +273 -0
  74. package/kb/procedures/ecosystem-sync-sop.md +255 -0
  75. package/kb/procedures/maintenance-sop.md +13 -2
  76. package/kb/procedures/release-preparation-sop.md +91 -12
  77. package/kb/procedures/release-verification-sop.md +24 -6
  78. package/kb/reference/global-install-model.md +15 -2
  79. package/kb/reference/supported-tools-registry.md +229 -0
  80. package/llms-full.txt +1105 -43
  81. package/llms.txt +4 -0
  82. package/manifest.json +1 -1
  83. package/package.json +4 -1
  84. package/scripts/ecosystem_doctor.py +348 -0
  85. package/scripts/ecosystem_tools.json +500 -0
  86. package/scripts/evaluate_skills.py +84 -0
  87. package/scripts/generate_aider_conf.py +26 -1
  88. package/scripts/generate_antigravity.py +77 -8
  89. package/scripts/generate_augment_agents.py +161 -0
  90. package/scripts/generate_augment_commands.py +160 -0
  91. package/scripts/generate_augment_hooks.py +162 -0
  92. package/scripts/generate_augment_skills.py +98 -0
  93. package/scripts/generate_cline_rules.py +96 -9
  94. package/scripts/generate_codex_hooks.py +13 -2
  95. package/scripts/generate_codex_skills.py +195 -0
  96. package/scripts/generate_copilot.py +296 -18
  97. package/scripts/generate_cursor_agents.py +144 -0
  98. package/scripts/generate_cursor_hooks.py +155 -0
  99. package/scripts/generate_cursor_mdc.py +20 -8
  100. package/scripts/generate_gemini_commands.py +158 -0
  101. package/scripts/generate_gemini_hooks.py +159 -0
  102. package/scripts/generate_gemini_skills.py +98 -0
  103. package/scripts/generate_roo_modes.py +42 -1
  104. package/scripts/generate_windsurf_hooks.py +143 -0
  105. package/scripts/generate_windsurf_rules.py +162 -10
  106. package/scripts/install.py +11 -2
  107. package/scripts/install_steps/ai_tools.py +120 -5
  108. package/scripts/validate.py +20 -3
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: night-watch
3
- description: "Run autonomous maintenance and dependency updates"
3
+ description: "Run autonomous maintenance tasks (dependency updates, dead code removal, small refactors) in an isolated branch. Use only when the user triggers it explicitly — typically off-hours; never auto-invoked."
4
4
  effort: medium
5
5
  disable-model-invocation: true
6
6
  context: fork
@@ -26,3 +26,24 @@ Triggers the autonomous maintenance agent.
26
26
  2. **Execute**: Run `night-watchman` agent skills.
27
27
  3. **Verify**: Run full test suite.
28
28
  4. **Report**: Generate Shift Report.
29
+
30
+ ## Rules
31
+
32
+ - **MUST** work on a dedicated `maintenance/` branch — never commit to `main` or the user's active branch
33
+ - **NEVER** push without the full test suite passing
34
+ - **CRITICAL**: stop on the first failing test and surface it — do not try to "fix" tests opportunistically
35
+ - **MANDATORY**: every change lands in a discrete commit with a conventional message
36
+
37
+ ## Gotchas
38
+
39
+ - `npm audit fix` bumps to the latest **major** version when `--force` is set — quietly introducing breaking changes. Always use plain `npm audit fix` first and only escalate to `--force` after the user approves each named package.
40
+ - `pip install --upgrade` without a constraints file resolves differently each run due to transitive dependencies. Pin via `pip-compile` and commit the lockfile, otherwise maintenance runs produce "mysterious" unrelated changes.
41
+ - `git add -A` on a maintenance run can pull in build artifacts and IDE caches if `.gitignore` is incomplete. Prefer explicit `git add <path>` per change category (deps, docs, lint-fixes) to keep commits attributable.
42
+ - Pre-commit hooks that format on commit may re-modify files AFTER your edit — the resulting commit may differ from the planned diff. Run the formatter as a separate step and verify `git diff --staged` before committing.
43
+
44
+ ## When NOT to Use
45
+
46
+ - For planned refactors with a known scope — use `/refactor-plan`
47
+ - For immediate bug fixes — use `/fix` or `/debug`
48
+ - In a repo the user is actively working in — wait for idle time
49
+ - When there are uncommitted changes on the current branch — abort until clean
@@ -202,3 +202,29 @@ groups:
202
202
  - Include runbook links in annotations
203
203
  - Set appropriate severity: page only for user-impacting issues
204
204
  - Use `for` duration to avoid flapping
205
+
206
+ ## Rules
207
+
208
+ - **MUST** emit logs as structured JSON with a `trace_id` (or correlation ID) propagated across service boundaries — unstructured logs are unsearchable at scale
209
+ - **MUST** alert on symptoms (user-visible latency/errors), not causes (high CPU, queue depth) — causes change, symptoms are stable
210
+ - **NEVER** log PII, PHI, or credentials — even at debug level. Logs leak to aggregation systems, backups, and disk snapshots.
211
+ - **NEVER** use histograms without explicit buckets tuned to the expected range — default buckets either miss the p99 or waste cardinality
212
+ - **CRITICAL**: SLOs define alerts, not metrics. An SLO of "99.9% of requests under 200ms" produces one alert ("burn rate exceeded") — not six alerts on each constituent metric.
213
+ - **MANDATORY**: every alert includes a runbook link in its annotations. An alert without a runbook pages someone who then has to invent a response at 3am.
214
+
215
+ ## Gotchas
216
+
217
+ - `trace_id` must propagate via headers (`traceparent` / `X-Correlation-ID`) AND be added to every log line AND span. Partial propagation produces broken traces — one missing middleware and the span disappears from the UI.
218
+ - OpenTelemetry SDK defaults to `otlp/grpc` on port 4317. Many corporate networks block it; `otlp/http` on 4318 with `traces` path works through proxies. Check connectivity before debugging app-level issues.
219
+ - High-cardinality labels (user IDs, request IDs) on Prometheus metrics explode the time-series database. Prefer exemplars or traces for per-request data; keep metric labels to bounded categorical values.
220
+ - `for: 5m` in Prometheus delays alerts by 5 minutes AND requires the condition to hold throughout — a 4m59s spike does not alert, even if it re-occurs. Use shorter `for` on critical alerts with a higher severity threshold.
221
+ - Log-based metrics (counting log lines matching a regex) are expensive and brittle. A log format change silently breaks the metric; prefer direct instrumentation from the code.
222
+ - Sampled traces (probability = 0.1) miss rare errors by design. For error-path visibility, use "always-sample on error" (tail sampling or head-based with error flag).
223
+
224
+ ## When NOT to Load
225
+
226
+ - For **implementing** an alert rule or log aggregator — use the tool's docs (Prometheus, Grafana, Datadog); this skill is pattern-level
227
+ - For performance tuning (profiling, flame graphs) — use `/performance-profiling`
228
+ - For incident response mechanics during an outage — use `/workflow incident-response`
229
+ - For generic logging library choice in a new project — use `/app-builder` which handles scaffolding
230
+ - For security auditing of log content (PII leaks) — use `/security-patterns` and `/hipaa-validate`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: onboard
3
- description: "Generate project onboarding materials"
3
+ description: "Guide setup of ai-toolkit in a new project: install symlinks, create CLAUDE.md, capture undocumented intent via interview. Use when the user starts a fresh project or migrates an existing one to ai-toolkit."
4
4
  effort: medium
5
5
  disable-model-invocation: true
6
6
  argument-hint: "[project-path]"
@@ -91,3 +91,24 @@ Edit `.claude/settings.local.json` for project-specific settings:
91
91
  /onboard verify # Just verify existing installation
92
92
  /onboard update # Update toolkit symlinks
93
93
  ```
94
+
95
+ ## Rules
96
+
97
+ - **MUST** run the intent-capture interview before creating any files — skip only if the user provides answers up front
98
+ - **NEVER** overwrite an existing `CLAUDE.md` without confirming
99
+ - **CRITICAL**: prefer project-local installation (`--local`) unless the user asks for global
100
+ - **MANDATORY**: verify installation at the end with the toolkit's validate script
101
+
102
+ ## Gotchas
103
+
104
+ - On Windows without WSL, symlink creation requires either Developer Mode or admin privileges. The installer **silently skips** agents and skills that cannot be linked — verify with `ai-toolkit doctor` after install on Windows hosts.
105
+ - If `.claude/` already exists as a real directory (not a symlink), `ai-toolkit install` will not replace it. Old files linger. Check `ls -la .claude/` for mixed symlink + real-file state before onboarding.
106
+ - `settings.local.json` is per-user and gitignored, but `settings.json` is shared. Users who edit the wrong file lose their overrides on `git pull`.
107
+ - When the target project is a **git submodule**, the toolkit's notion of "project root" (outermost `.git`) differs from the developer's — symlinks may land in the parent repo instead of the submodule. Confirm `git rev-parse --show-toplevel` before installing.
108
+
109
+ ## When NOT to Use
110
+
111
+ - To update an already-onboarded project — use `/onboard update`
112
+ - To scaffold a new app from scratch — use `/app-builder`
113
+ - For plugin development inside ai-toolkit — use `/plugin-creator`
114
+ - When the project already has its own CLAUDE.md conventions — discuss migration before overwriting
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: panic
3
- description: "Emergency stabilization via system-governor agent"
3
+ description: "Emergency kill switch that halts all agent activity via a lockfile gate. Use when agents are looping, misbehaving, or the user wants to stop everything NOW — not for normal workflow interruptions."
4
4
  effort: low
5
5
  disable-model-invocation: true
6
6
  agent: system-governor
@@ -28,3 +28,23 @@ To resume operations:
28
28
  ```bash
29
29
  rm .claude/HALT
30
30
  ```
31
+
32
+ ## Rules
33
+
34
+ - **MUST** create the lockfile at `.claude/HALT` — agents check this path to gate execution
35
+ - **NEVER** bypass the lockfile silently once it exists
36
+ - **CRITICAL**: emit a clear, single-line notification so the user knows the system is halted
37
+ - **MANDATORY**: include the provided reason (if any) in the notification
38
+
39
+ ## Gotchas
40
+
41
+ - The lockfile is **project-local** (`./.claude/HALT`). Agents running in a different working directory, or globally-invoked tools, will not see it and will keep running. `/panic` is not a system-wide kill switch.
42
+ - The lockfile check relies on the `PreToolUse` hook from `ai-toolkit`; if the user disabled hooks in `settings.json` or ejected without keeping hooks, `touch .claude/HALT` does nothing. Verify the hook is present after invocation.
43
+ - Removing `.claude/HALT` mid-task resumes agents that were blocked, but they resume with potentially **stale context** (conversation moved on, tool results orphaned). Prefer restarting the session cleanly if possible.
44
+
45
+ ## When NOT to Use
46
+
47
+ - For cancelling a single agent — use the task's own stop mechanism
48
+ - For a production incident — use `/workflow incident-response`
49
+ - As a rollback tool — use `/rollback`
50
+ - To pause for a short clarification — just ask the question, do not halt the system
@@ -67,3 +67,37 @@ Always measure -> change -> measure.
67
67
  | "Caching will fix it" | Caching masks problems and adds complexity — fix the root cause first |
68
68
  | "It's fast enough in dev" | Dev has 1 user — production has thousands and cold caches |
69
69
  | "We'll optimize later" | Performance debt compounds — a 100ms regression per sprint = 5s in a year |
70
+
71
+ ## Example
72
+
73
+ ```bash
74
+ # Capture a 30-second CPU flamegraph from a running Python service
75
+ py-spy record -o profile.svg --duration 30 --pid "$(pgrep -f my-service)"
76
+
77
+ # Identify top 3 hot functions
78
+ py-spy top --pid "$(pgrep -f my-service)"
79
+ ```
80
+
81
+ Then, per the optimization hierarchy, start with DB/IO fixes (indexing, batching, caching the right layer) before touching algorithm-level changes.
82
+
83
+ ## Rules
84
+
85
+ - **MUST** capture a baseline measurement before proposing any change
86
+ - **NEVER** optimize code without profiler data pointing at it as the bottleneck
87
+ - **CRITICAL**: report p95/p99, not just p50 — averages hide real user pain
88
+ - **MANDATORY**: follow the hierarchy — DB/IO before algorithm before micro-optimization
89
+
90
+ ## Gotchas
91
+
92
+ - `py-spy` needs `CAP_SYS_PTRACE` on Linux and SIP-disabled codesigning on macOS to attach to another process. Containerized services usually run without ptrace privileges — profiling requires a `--cap-add=SYS_PTRACE` on the container or an in-process alternative (`cProfile`, `yappi`).
93
+ - Production hosts frequently set `/proc/sys/kernel/perf_event_paranoid=2` or higher, which disables user-space perf events. Tools that rely on perf (`perf`, `bcc`, `bpftrace`) silently produce empty output — check `cat /proc/sys/kernel/perf_event_paranoid` first.
94
+ - Node.js `--prof` output gets interleaved across worker threads and child processes. A single `isolate-*.log` mixes samples from multiple isolates unless each worker writes its own — filter by PID or use `clinic flame` which handles the split.
95
+ - Chrome DevTools samples at ~1kHz; operations faster than ~1ms vanish. For microbenchmarks, prefer `performance.now()` with manual markers, not the Performance tab.
96
+ - `EXPLAIN ANALYZE` on Postgres **executes** the query, including `INSERT`/`UPDATE`/`DELETE` — wrap write queries in a transaction that you roll back, or use `EXPLAIN (ANALYZE, BUFFERS) ... ; ROLLBACK;` in one statement.
97
+
98
+ ## When NOT to Use
99
+
100
+ - For correctness bugs (wrong output) — use `/debug`
101
+ - For frontend render bugs without timing data — measure with DevTools first
102
+ - For infrastructure capacity planning — use load testing, not profiling
103
+ - For generic code quality — use `/analyze`
@@ -51,7 +51,24 @@ Unlike `--persona` at install time (which injects into CLAUDE.md permanently), `
51
51
 
52
52
  ## Rules
53
53
 
54
- - This skill is READ-ONLYit never writes files
55
- - Persona stays active for the current session only
56
- - Only one persona active at a timeswitching replaces the previous one
57
- - Valid personas are defined by `.md` files in `app/personas/`
54
+ - **MUST** remain read-onlythis skill never writes files, only loads persona content into the session
55
+ - **MUST** state the active persona explicitly at switch time so the user knows which lens is in effect
56
+ - **NEVER** keep the previous persona active after a switchreplace, do not stack
57
+ - **NEVER** mix personas in a single response each persona has internally consistent priorities that clash if blended
58
+ - **CRITICAL**: personas apply for the **current session only**. `/persona --clear` resets; a new session starts from default.
59
+ - **MANDATORY**: valid personas are defined by `.md` files in `app/personas/` — do not invent or describe a persona that has no file
60
+
61
+ ## Gotchas
62
+
63
+ - The persona file lives in `app/personas/<name>.md` relative to the toolkit root. When the toolkit is globally installed, that root is at `~/.claude/skills/persona/../../../app/personas/` — fallback paths matter.
64
+ - Switching personas mid-task can produce a jarring tone shift in the user's output. Announce the switch, briefly restate the current task in the new persona, then continue.
65
+ - `/persona --clear` only resets the **in-session** persona. If the user ran `ai-toolkit install --persona <name>` at install time, that persona is injected into CLAUDE.md and survives session clears. Clearing requires editing CLAUDE.md directly.
66
+ - Personas are **style overlays**, not skill enablers. Activating `devops-eng` does not give access to `/deploy` if it was not already installed; it only biases which skills the agent reaches for first.
67
+ - A persona that contradicts project-level CLAUDE.md rules (e.g. `junior-dev` asking for explanations in a project that says "no pleasantries") creates a tone conflict. Project rules win; adjust the persona or the project rules, not both silently.
68
+
69
+ ## When NOT to Use
70
+
71
+ - For **permanent** persona injection at install time — use `ai-toolkit install --persona <name>` (project or global)
72
+ - For multi-agent parallel work with different specialists — use `/orchestrate` or `/teams`
73
+ - For a specific language or framework context (not a general engineering stance) — use the language-pattern skills (`/typescript-patterns`, etc.)
74
+ - To edit or create a persona file — edit `app/personas/<name>.md` directly; this skill only switches between existing ones
@@ -52,3 +52,29 @@ hybrid_search_kb("architecture {pattern}")
52
52
  - Need requirements first? -> `/write-a-prd` for structured product requirements
53
53
  - Want to stress-test the plan? -> `/grill-me` for Socratic questioning
54
54
  - Ready to break into issues? -> `/prd-to-plan` -> `/triage-issue`
55
+
56
+ ## Rules
57
+
58
+ - **MUST** break work into phases where each phase is independently shippable (tracer-bullet discipline) — waterfall phases defer all risk to the end
59
+ - **MUST** define measurable success criteria per phase before proposing tasks — "the user is happy" is not a criterion
60
+ - **NEVER** write code in this skill — the output is a plan document, not a patch
61
+ - **NEVER** invent an agent; every task lists a real agent from `app/agents/` or a real skill from `app/skills/` with a reason for the choice
62
+ - **CRITICAL**: every phase has an explicit rollback or scope-cut option. A plan with no way to stop mid-project is a sunk-cost trap.
63
+ - **MANDATORY**: dependencies between phases are explicit edges (`Phase 1 → Phase 2`). Circular dependencies are always a planning bug, not a valid state.
64
+
65
+ ## Gotchas
66
+
67
+ - "SMART" tasks are often too small to be strategic and too vague to be tactical. Tasks at the plan level should be phase-aligned outcomes ("authentication ships behind a feature flag"), not implementation steps ("add JWT middleware").
68
+ - Agent assignment drifts during execution — the agent named in the plan may be unavailable or wrong when the work starts. Document the **role** (`backend-specialist`) alongside the assigned agent, so a substitute is unambiguous.
69
+ - Plans that start with a Research phase often consume 80% of the timeline without producing shippable output. If research is truly needed, cap it with a timebox and a concrete artifact (ADR, spike doc).
70
+ - Dependency graphs with diamond patterns (A→B, A→C, B→D, C→D) silently serialize D. If parallel phases feel slow, check for an unintended diamond.
71
+ - Success criteria based on code metrics (coverage, lint count) incentivize gaming them. Prefer user-facing criteria (p95 latency, first-time-success rate on the happy path).
72
+
73
+ ## When NOT to Use
74
+
75
+ - For writing a **PRD** (product requirements) first — use `/write-a-prd`
76
+ - For breaking a PRD into phases — use `/prd-to-plan`
77
+ - For filing issues against a plan — use `/prd-to-issues`
78
+ - For stress-testing an existing plan — use `/grill-me`
79
+ - For executing a plan with agents — use `/orchestrate` or `/workflow`
80
+ - For a refactor with incremental commits — use `/refactor-plan`
@@ -200,3 +200,29 @@ Before finalizing plan:
200
200
  - [ ] Agents assigned
201
201
  - [ ] Risks documented
202
202
  - [ ] Success criteria defined
203
+
204
+ ## Rules
205
+
206
+ - **MUST** include a Success Criteria section with measurable, verifiable conditions — subjective criteria are not criteria
207
+ - **MUST** include a Rollback Plan for any work that touches production data or shared infrastructure
208
+ - **MUST** write a Pre-Mortem when estimated effort exceeds 1 day — "what could go wrong" surfaces real risks cheaply
209
+ - **NEVER** estimate in hours for work longer than a week. Use T-shirt sizes (S/M/L/XL) or tracer-bullet slices — precise long-horizon estimates are false confidence
210
+ - **CRITICAL**: every risk has an owner AND a mitigation. A risk register with named risks but no mitigations is decorative.
211
+ - **MANDATORY**: explicit scope boundaries — "not in this plan" is as important as "in this plan"
212
+
213
+ ## Gotchas
214
+
215
+ - SMART criteria look complete but often omit the "relevant" dimension — a task can be Specific, Measurable, Achievable, Time-bound and still irrelevant to the outcome. Check relevance explicitly.
216
+ - Pre-mortems feel pessimistic and get shortened under deadline pressure. Make the pre-mortem a first-class section with at least 5 named failure modes — a 2-bullet pre-mortem is theater.
217
+ - Risk registers bloat when stakeholders add low-probability items to be safe. Cap the register at 10 risks ranked by (probability × impact); everything below line 10 is noise.
218
+ - Plans authored by the person who will execute them are biased toward feasibility (they want to do it). Plans authored by someone who won't execute are biased toward ambition (they don't pay the cost). Mix both perspectives.
219
+ - "Success criteria: deploy to production" is the weakest criterion — it measures effort, not outcome. Replace with user-facing or metric-based criteria ("20% reduction in p95 latency sustained for 7 days").
220
+
221
+ ## When NOT to Use
222
+
223
+ - For **actually generating** a plan with phases and task breakdown — use `/plan`
224
+ - For requirements capture before planning — use `/write-a-prd`
225
+ - For turning a plan into filed issues — use `/prd-to-issues`
226
+ - For stress-testing a plan's assumptions — use `/grill-me`
227
+ - For executing plans with agents — use `/orchestrate` or `/workflow`
228
+ - For a single-step fix that does not warrant a document — skip the plan entirely
@@ -60,12 +60,21 @@ app/plugins/<plugin-name>/
60
60
 
61
61
  ## Authoring Rules
62
62
 
63
- - Keep packs **domain-scoped**, not generic junk drawers
64
- - Prefer referencing existing toolkit assets before duplicating them
65
- - Pack manifests must be valid JSON with `name`, `description`, `version`, `domain`, `type`, `status`, and `includes`
66
- - Optional hooks must be executable and documented in the pack README
67
- - If the pack introduces policy or hook behavior, document install/opt-in semantics clearly, including supported runtimes (`claude`, `codex`, or `all`) and that the pack is not part of the default install
68
- - Experimental packs should remain opt-in and must not silently alter default global install behavior
63
+ - **MUST** keep packs domain-scoped "security-pack", "mobile-pack", not "misc-pack"
64
+ - **MUST** reference existing toolkit assets before duplicating — packs extend, they do not fork
65
+ - **MUST** ship a valid `plugin.json` with `name`, `description`, `version`, `domain`, `type`, `status`, and `includes`
66
+ - **NEVER** have a pack silently alter default global install behavior — experimental packs are **opt-in only**
67
+ - **NEVER** copy an agent or skill file into a pack when referencing the toolkit-level version suffices; duplication creates drift
68
+ - **CRITICAL**: optional hooks bundled in a pack must be executable (`chmod +x`) and documented in the pack README with their install semantics
69
+ - **MANDATORY**: the pack README names supported runtimes (`claude`, `codex`, or `all`) and explains that the pack is not part of the default install
70
+
71
+ ## Gotchas
72
+
73
+ - Plugin packs are discovered by scanning `app/plugins/*/plugin.json`. A pack with a missing or malformed `plugin.json` is silently ignored — no error surfaces. Check with `ls app/plugins/*/plugin.json` and `jq . app/plugins/*/plugin.json`.
74
+ - The `status: experimental` flag gates visibility in some install paths — marking a pack "stable" before it is audited can make it install by default for every user. Keep `experimental` until the pack has eaten its own dogfood.
75
+ - Packs that include hooks inherit the toolkit's hook merge rules (`_source: "ai-toolkit"`). Hooks without the `_source` tag survive `ai-toolkit update` and can leak into other packs' merge pools.
76
+ - Versions in `plugin.json` are separate from the toolkit version. A pack at v1.2 running inside toolkit v2.11 may still satisfy `requires.ai-toolkit: >=1.0.0` but mean nothing about actual compatibility — test against the current toolkit before tagging.
77
+ - Codex-runtime packs need matching `.agents/rules/` and `.codex/hooks.json` variants; a plugin that only ships Claude assets looks broken under Codex CLI. Declare runtime support explicitly.
69
78
 
70
79
  ## Validation Checklist
71
80
 
@@ -75,3 +84,11 @@ app/plugins/<plugin-name>/
75
84
  - [ ] Optional hooks are executable and use `#!/bin/bash`
76
85
  - [ ] `scripts/validate.py` passes
77
86
  - [ ] Public docs mention the pack only after the manifest and README exist
87
+
88
+ ## When NOT to Use
89
+
90
+ - For an individual **skill** (slash command or knowledge doc) — use `/skill-creator`
91
+ - For an individual **agent** — use `/agent-creator`
92
+ - For a single **hook** (not a pack) — use `/hook-creator`
93
+ - For an MCP server — use `/mcp-builder`
94
+ - For modifying an existing plugin pack — edit its files directly; this skill is create-only
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pr
3
- description: "Create pull requests with pre-flight validation"
3
+ description: "Create a GitHub pull request after running pre-flight checks (lint, typecheck, tests) and generating a structured summary from commit history. Use when the branch is ready to merge — not for drafting work-in-progress."
4
4
  effort: medium
5
5
  disable-model-invocation: true
6
6
  argument-hint: "[title or branch]"
@@ -127,3 +127,26 @@ gh pr edit --add-reviewer username
127
127
  # Merge PR
128
128
  gh pr merge --squash
129
129
  ```
130
+
131
+ ## Rules
132
+
133
+ - **MUST** run lint + typecheck + tests locally before opening the PR
134
+ - **NEVER** force-push `main` or `master`
135
+ - **NEVER** add `Co-Authored-By: Claude` or other AI attribution to commits
136
+ - **CRITICAL**: PR body must include a Test plan checklist — no exceptions
137
+ - **MANDATORY**: commit messages follow conventional commits (`feat:`, `fix:`, `docs:` etc.)
138
+
139
+ ## Gotchas
140
+
141
+ - `gh pr merge --squash` **drops** all original commit trailers, including `Co-Authored-By:` lines. If the PR had legitimate co-authors, note them in the squashed commit body or use `--rebase` instead.
142
+ - `gh` defaults to `github.com`; for GitHub Enterprise the host must be set per-repo with `gh auth login --hostname <host>` and `gh repo set-default`. Silent failures on enterprise usually mean the wrong host.
143
+ - Running `gh pr create` without `--body` opens an editor (`$EDITOR` or `vi`) — in non-interactive contexts this hangs indefinitely. Always pass `--body` or `--body-file`.
144
+ - The pre-flight `ruff check .` walks respecting `.gitignore` by default but `mypy src/` does not — if `src/` contains generated code excluded from git, mypy will still scan it and report spurious errors.
145
+ - `git diff main...HEAD` (triple dot) shows commits on HEAD since the merge-base; `git diff main..HEAD` (double dot) shows all differences including main's newer commits. Use triple-dot for PR-scope diffs.
146
+
147
+ ## When NOT to Use
148
+
149
+ - For creating a commit (without a PR) — use `/commit`
150
+ - For reviewing a PR someone else opened — use `/review`
151
+ - For drafting release notes across many PRs — use `/docs` or a release script
152
+ - When the branch has uncommitted changes — commit first, then open the PR
@@ -100,9 +100,25 @@ Reference by number from the parent PRD:
100
100
 
101
101
  ## Rules
102
102
 
103
- - Every issue must be a VERTICAL slice never horizontal
104
- - Create in dependency order for real issue number references
105
- - Do NOT close or modify the parent PRD issue
106
- - Do NOT ask user to review before creatingfile and share URLs
107
- - Maximize parallelism independent issues should have no blockers
108
- - No file paths or line numbers in issue bodies
103
+ - **MUST** slice vertically — every issue cuts through schema, API, UI, tests end-to-end. Horizontal slices (all-schema, then all-API) defer integration risk.
104
+ - **MUST** create issues in dependency order so blockers have real issue numbers to reference
105
+ - **NEVER** close or modify the parent PRD issue — it is the reference anchor for every child issue
106
+ - **NEVER** include file paths, line numbers, or function names in issue bodies they go stale before the issue is picked up
107
+ - **CRITICAL**: maximize parallelism. Independent issues have zero `Blocked by` entries; if every issue has blockers, the slicing is wrong.
108
+ - **MANDATORY**: every issue lists the user stories it addresses by number from the parent PRD — traceability matters more than brevity
109
+
110
+ ## Gotchas
111
+
112
+ - `gh issue create` opens `$EDITOR` without `--body` or `--body-file`. In automation, this hangs silently. Always pass the body explicitly.
113
+ - Dependency chains longer than 3 hops (A blocks B blocks C blocks D) almost always mean the slicing is too thin. Collapse the chain into fewer, wider slices.
114
+ - GitHub issue numbers increment globally in the repo. Creating 5 issues with forward references (#124 blocks #125) requires the blocker to land before the blocked — order matters, and a mid-batch failure leaves dangling references.
115
+ - AFK issues (no human interaction) appear attractive but the label is aspirational. Real AFK requires green CI, clear acceptance criteria, and no design ambiguity — misclassifying HITL as AFK creates reopens.
116
+ - User stories referenced by "number from the PRD" drift if the PRD gets edited. Quote the story text inline if it is short, or pin to a PRD anchor (`#issue-42 > User Story 7`) to resist drift.
117
+
118
+ ## When NOT to Use
119
+
120
+ - For breaking a PRD into a **plan** (phases, no issues yet) — use `/prd-to-plan`
121
+ - For writing the PRD itself — use `/write-a-prd`
122
+ - For filing a single bug — use `/qa-session` or `/triage-issue`
123
+ - For a plan that exists but has no PRD — use `/plan` then revisit this skill
124
+ - For triaging existing issues (not creating new ones) — this skill is create-only
@@ -114,7 +114,25 @@ Concise description of this vertical slice. End-to-end behavior, not layer-by-la
114
114
 
115
115
  ## Rules
116
116
 
117
- - Every phase must be a VERTICAL slice (all layers), never HORIZONTAL (one layer)
118
- - No file paths or implementation details that couple to current code
119
- - Each phase must be independently demoable
120
- - Get user approval before writing the plan file
117
+ - **MUST** slice vertically every phase cuts through all layers (schema, API, UI, tests). Horizontal layer-by-layer phases defer integration risk to the end.
118
+ - **MUST** identify Architectural Decisions **before** slicing — decisions that apply across phases live in their own section, not repeated in each phase
119
+ - **NEVER** embed file paths, function names, or implementation details that couple the plan to current code — the plan outlives the code it describes
120
+ - **NEVER** write the plan file before the user approves the slicing — drafts burn tokens and invite scope drift
121
+ - **CRITICAL**: each phase is independently demoable on its own. If phase N only makes sense in combination with phase N+1, merge them.
122
+ - **MANDATORY**: the first phase ships **end-to-end** (however thin). Deferring any layer to a later phase defeats tracer-bullet discipline.
123
+
124
+ ## Gotchas
125
+
126
+ - Architectural Decisions feel like premature commitment — "we can decide routes later". In practice, every phase needs a route to hit, so postponing them creates conflicting guesses across phases. Decide once, apply everywhere.
127
+ - PRDs with long lists of user stories tempt the planner to make each story a phase. User stories are requirements, not phases — group several stories into one vertical slice when they share architecture.
128
+ - "Demoable" means an external stakeholder can watch the feature work, not that a unit test passes. If a phase only ships backend API with no UI to exercise it, it is not demoable.
129
+ - Fetching the PRD with `gh issue view <n>` captures the body but not the comments. Crucial clarifications often live in the comments — include `--comments` or remind the user to paste important threads.
130
+ - Plans written against a moving PRD (the PRD is still being edited) invalidate on every edit. Freeze the PRD snapshot at plan-write time, reference the snapshot commit or comment ID.
131
+
132
+ ## When NOT to Use
133
+
134
+ - For filing GitHub issues from a plan — use `/prd-to-issues`
135
+ - For writing the PRD itself — use `/write-a-prd`
136
+ - For planning without a PRD — use `/plan` (general-purpose)
137
+ - For stress-testing a plan that already exists — use `/grill-me`
138
+ - For refactor planning — use `/refactor-plan` (incremental commits, not tracer bullets)
@@ -76,3 +76,28 @@ Output a markdown report:
76
76
  - [ ] Review [high-dependent file] with extra scrutiny
77
77
  - [ ] Run integration tests covering [affected area]
78
78
  ```
79
+
80
+ ## Rules
81
+
82
+ - **MUST** base risk scores on measurable signals (dependent count, coverage, diff size) — not vibes or adjective scales
83
+ - **MUST** name at least one specific action per high-risk file — "review carefully" is not an action
84
+ - **NEVER** predict regressions beyond what the signals justify. A single file with 20 dependents is a signal; a generic "this might break things" is noise.
85
+ - **NEVER** skip the test-coverage factor — a high-dependent file with 100% coverage is lower risk than a low-dependent file with none
86
+ - **CRITICAL**: the report ranks files by weighted risk score, not alphabetically. Readers will stop after the first 5 entries.
87
+ - **MANDATORY**: state the confidence level explicitly. Predictions from a 5-line diff are HIGH confidence; predictions from 500-line refactors are LOW.
88
+
89
+ ## Gotchas
90
+
91
+ - `grep -rl "import.*from.*[target]"` is easily fooled by comments and string literals. Use the language's real AST tools (`ts-morph`, `ast-grep`, `pyflakes`) for accurate dependency graphs on anything beyond trivial diffs.
92
+ - Dynamic imports (`importlib.import_module`, `require(variable)`, JavaScript `await import()`) are invisible to grep. Flag explicitly when the target uses them.
93
+ - Test coverage reported by CI may exclude generated code, migrations, and `__init__.py`. "Has dedicated test = score 1" assumes a real assertion exists — check the test file rather than just the path match.
94
+ - A 5-line diff in a "core" file is often more dangerous than a 500-line diff in a leaf file. The `change_surface` weight alone is misleading; combine with `shared/core` weight for meaningful signals.
95
+ - Predictions about regressions are calibrated against the current test suite, not unknown production behaviors. A "low-risk" verdict means "tests likely pass", not "users will not notice".
96
+
97
+ ## When NOT to Use
98
+
99
+ - For **executing** a change after prediction — use `/fix`, `/refactor`, or the relevant skill
100
+ - For PR review of logic quality — use `/review`
101
+ - For CI pipeline risk analysis — use `/ci-cd-patterns`
102
+ - For code quality metrics (complexity, duplication) — use `/analyze`
103
+ - For a brand-new codebase with no change history — this skill needs dependents to measure; use `/explore` first
@@ -101,10 +101,26 @@ After filing, share URLs and ask: "Next issue, or are we done?"
101
101
 
102
102
  ## Rules
103
103
 
104
- - **No file paths or line numbers** in issues they go stale
105
- - **Use project domain language** (check UBIQUITOUS_LANGUAGE.md)
106
- - **Describe behaviors, not code**"sync service fails to apply patch" not "applyPatch() throws"
107
- - **Reproduction steps mandatory**ask if you can't determine them
108
- - **Keep concise** developer should read issue in 30 seconds
109
- - **Maximize parallelism** independent issues have no blockers
110
- - **Create in dependency order** blockers first for real issue numbers
104
+ - **MUST** use the project's domain language from `UBIQUITOUS_LANGUAGE.md` — framework jargon in issues excludes non-engineering stakeholders
105
+ - **MUST** describe behaviors, not code — "sync service fails to apply patch" not "applyPatch() throws"
106
+ - **MUST** include reproduction stepsif they are not clear, ask the user rather than guess
107
+ - **NEVER** include file paths, line numbers, or function names in issue bodies they go stale before triage
108
+ - **NEVER** over-interview. Cap clarifying questions at 2-3 per bug; more than that is signal the bug needs a QA session with a product owner, not more questions.
109
+ - **CRITICAL**: the developer who picks up the issue should understand it in 30 seconds. Wall-of-text reports get reopened for clarification.
110
+ - **MANDATORY**: when breaking one report into multiple issues, file them in dependency order so blockers have real issue numbers to reference
111
+
112
+ ## Gotchas
113
+
114
+ - Domain language in `UBIQUITOUS_LANGUAGE.md` may be out of date. If it was last updated months ago and new features have shipped, the glossary is an input hint, not a source of truth — confirm terms with the user when unsure.
115
+ - "Intermittent" reports are often environmental (one user's browser, one region's data) rather than truly random. Always ask for "how often" and "when did it start" before labeling as race condition.
116
+ - `gh issue create` opens `$EDITOR` without `--body`. In automation this hangs — always pass the body file or inline body.
117
+ - Users often describe the **workaround** as if it were the bug ("I have to refresh the page"). Drill to the underlying behavior — "what fails before the refresh?" — otherwise the fix targets the symptom.
118
+ - Independent sub-issues from one bug report can duplicate work if each gets a different developer. Mention the parent QA session in every sub-issue so reviewers notice the pattern.
119
+
120
+ ## When NOT to Use
121
+
122
+ - For triaging a **single** known bug with a proposed fix — use `/triage-issue`
123
+ - For creating issues from a PRD — use `/prd-to-issues`
124
+ - For debugging a reproducible error — use `/debug`
125
+ - For code review of a PR that addresses a bug — use `/review`
126
+ - For architecture-level problems — use `/architecture-audit`, not bug reports
@@ -202,3 +202,29 @@ docker exec {api-container} python3 scripts/evaluate_rag.py
202
202
  # Detect gaps
203
203
  docker exec {api-container} python3 scripts/knowledge_gaps.py --detect
204
204
  ```
205
+
206
+ ## Rules
207
+
208
+ - **MUST** chunk by document structure (headers, lists, code fences), not by fixed byte/token count — structure-aware chunking recovers 20-40% of retrieval quality on technical docs
209
+ - **MUST** always use **hybrid search** (BM25 + vector) for keyword-heavy queries — pure vector search misses exact identifiers (function names, config keys)
210
+ - **NEVER** trust a single embedding model on multilingual corpora; pair with a bilingual model or translate queries at the edge
211
+ - **NEVER** index without content-hash change detection — full rebuilds on every change waste embedding budget and corrupt orphan tracking
212
+ - **CRITICAL**: every response includes verifiable citations (source path + exact chunk). A RAG answer without traceable sources is a hallucination wearing a badge.
213
+ - **MANDATORY**: evaluate with a golden dataset (faithfulness, relevancy, context precision) before promoting any pipeline change to production
214
+
215
+ ## Gotchas
216
+
217
+ - Top-k cosine similarity is **not** relevance — semantically close chunks may be topically wrong. Always compare hybrid vs pure-vector scores on a held-out set before committing to one.
218
+ - Default embedding models (e.g., `text-embedding-ada-002`) underperform on long technical docs (>8k tokens). For long-form content consider chunking before embedding, not embedding then slicing.
219
+ - Chunk overlap (10-20%) helps narrative text but duplicates storage and token cost. Code and structured tables do not benefit from overlap — disable per content type.
220
+ - Cross-encoder rerankers (e.g., `bge-reranker`) add 100-300ms per query. For real-time UX, rerank only the top-20 candidates, not the top-100.
221
+ - RAG failure modes are structural (retrieval, routing, chunking), not prompt-level. Before "tuning the prompt", check retrieval metrics — a prompt fix on top of broken retrieval is theater.
222
+ - Query rewriting (HyDE, hypothetical doc generation) improves some queries and degrades others. A/B test before enabling globally; a blanket "always rewrite" often regresses simple lookups.
223
+
224
+ ## When NOT to Load
225
+
226
+ - For **executing** a reindex — use `/index` (task skill)
227
+ - For measuring RAG quality — use `/evaluate` (task skill)
228
+ - For chunking documentation strategy without an index — this skill assumes you already have a vector store; use `/architecture-decision` for pipeline choice
229
+ - For MCP-specific retrieval via `smart_query()` — the tool is already built; reach for this skill only when tuning the underlying index
230
+ - For prompt engineering alone without retrieval concerns — use `/prompt-caching-patterns` or the relevant language skill
@@ -138,3 +138,29 @@ Teammate 1 completes first, then Teammate 2 acts on the plan.
138
138
  - Want to validate architecture? → `/analyze` for code quality metrics
139
139
  - Need tests before refactoring? → `/tdd` to build safety net first
140
140
  - Architecture decision needed? → `/council` for multi-perspective evaluation
141
+
142
+ ## Rules
143
+
144
+ - **MUST** run the full test suite before starting — a green baseline is the only way to tell the refactor did not break anything
145
+ - **MUST** preserve behavior end-to-end; if behavior must change, stop and ask — "while we're here" changes are how refactors introduce bugs
146
+ - **NEVER** mix refactoring with feature changes in the same commit — they fail review and rollback differently
147
+ - **NEVER** refactor untested code without adding tests first — the refactor has nothing to assert against
148
+ - **CRITICAL**: commits stay small and individually reversible. A 2000-line refactor commit cannot be code-reviewed and cannot be bisected.
149
+ - **MANDATORY**: dead-code cleanup is part of the refactor per Constitution Art. VI.1 — orphaned references left behind from a refactor are a quality regression, not "later work"
150
+
151
+ ## Gotchas
152
+
153
+ - "Behavior-preserving" refactors still change **observable** things: timing, memory allocation, error message text, log line format. Downstream consumers may rely on these — scan for log parsers or monitoring rules before changing prose in exceptions.
154
+ - IDE rename refactors miss dynamic references (string-keyed dicts, reflection, `getattr`, dynamic imports). After a rename, grep for the old name in strings and comments — the IDE will not.
155
+ - Git history diffing is confused by combined move + content changes. Split moves into their own commit (`git mv` + tiny commit) so later reviewers can use `git log --follow`.
156
+ - Preserving backward compatibility is a spectrum. "Keep the old function as a thin wrapper" sounds safe but often defers the cleanup forever — prefer deprecate-with-warning followed by a scheduled removal.
157
+ - Refactor-to-DRY abstractions made from 2 use cases often need to be torn down when the 3rd use case arrives (Rule of Three). Resist abstracting until the third repetition makes the shape obvious.
158
+ - Test suites that rely on mocks frequently pass during refactors that silently break real behavior (the mock reflects the old shape). Run integration tests, not just unit, before marking done.
159
+
160
+ ## When NOT to Use
161
+
162
+ - For **planning** a refactor (no execution) — use `/refactor-plan`
163
+ - For architectural audit of shallow modules — use `/architecture-audit`
164
+ - For fixing a specific bug — use `/fix` or `/debug`
165
+ - For adding a feature — use `/plan` then the relevant language skill
166
+ - When tests do not exist or are red — write tests first (`/tdd`) before refactoring
@@ -105,9 +105,26 @@ What is explicitly NOT part of this refactor.
105
105
 
106
106
  ## Rules
107
107
 
108
- - Present >=3 alternatives before committing to an approach
109
- - Tiny commits — each step keeps codebase working
110
- - No file paths or code snippets in the issue (durability)
111
- - File immediately via `gh issue create`don't ask for review
112
- - Interview thoroughly before planning
113
- - **Dead code cleanup is mandatory per step, not deferred** (Constitution Art. VI.1): every refactor step must leave the repo with zero orphaned references. "We'll delete the old code in a later step" is only acceptable for transitional double-write / expand-contract phases where both paths are temporarily live — and the cleanup step must be explicitly listed in the plan, not implied.
108
+ - **MUST** present >=3 alternative approaches with trade-offs before committing to one
109
+ - **MUST** break the refactor into commits small enough to roll back individually a commit that cannot be reverted is not tiny
110
+ - **MUST** verify test coverage of the affected area before planning; insufficient coverage is a blocker, not a warning
111
+ - **NEVER** embed file paths, code snippets, or function names in the issue bodythe plan outlives the code
112
+ - **NEVER** ask for review after creating the issue — file it immediately, share the URL, iterate in comments
113
+ - **CRITICAL**: dead-code cleanup is **per step**, not deferred (Constitution Art. VI.1). "We'll delete the old code later" is only acceptable during explicit expand-contract phases, and the cleanup step must be in the plan.
114
+ - **MANDATORY**: the Out of Scope section names what is NOT part of this refactor — scope clarity prevents reviewer confusion
115
+
116
+ ## Gotchas
117
+
118
+ - "Tiny" is relative to the reviewer's context. A 20-line commit that touches the hot path is not tiny in practice — tiny means **tractable**, not short.
119
+ - Tests for refactors are often omitted with "the existing tests cover it". Verify by running the suite with coverage in the affected area, not by asking.
120
+ - Rebasing a long chain of tiny commits is painful when the target branch moves. Recommend landing the chain weekly and rebasing on `main` before each review round.
121
+ - GitHub issue RFCs tend to get stale if the refactor drags. Add a "Status" line that updates with each landed commit so readers see progress without scrolling through comments.
122
+ - Expand-contract refactors with double-writes silently leak cost — both paths are live, both pay resources. Set a hard deadline in the plan for when the old path is removed.
123
+
124
+ ## When NOT to Use
125
+
126
+ - For **executing** a refactor directly — use `/refactor`
127
+ - For architecture-level audit without a specific refactor in mind — use `/architecture-audit`
128
+ - For creating a PRD (product requirements) — use `/write-a-prd`
129
+ - For a plan without the GitHub RFC step — use `/plan` or `/plan-writing`
130
+ - For interface design of a single module — use `/design-an-interface`