autonomous-coding-toolkit 1.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 (324) hide show
  1. package/.claude-plugin/marketplace.json +22 -0
  2. package/.claude-plugin/plugin.json +13 -0
  3. package/LICENSE +21 -0
  4. package/Makefile +21 -0
  5. package/README.md +140 -0
  6. package/SECURITY.md +28 -0
  7. package/agents/bash-expert.md +113 -0
  8. package/agents/dependency-auditor.md +138 -0
  9. package/agents/integration-tester.md +120 -0
  10. package/agents/lesson-scanner.md +149 -0
  11. package/agents/python-expert.md +179 -0
  12. package/agents/service-monitor.md +141 -0
  13. package/agents/shell-expert.md +147 -0
  14. package/benchmarks/runner.sh +147 -0
  15. package/benchmarks/tasks/01-rest-endpoint/rubric.sh +29 -0
  16. package/benchmarks/tasks/01-rest-endpoint/task.md +17 -0
  17. package/benchmarks/tasks/02-refactor-module/task.md +8 -0
  18. package/benchmarks/tasks/03-fix-integration-bug/task.md +8 -0
  19. package/benchmarks/tasks/04-add-test-coverage/task.md +8 -0
  20. package/benchmarks/tasks/05-multi-file-feature/task.md +8 -0
  21. package/bin/act.js +238 -0
  22. package/commands/autocode.md +6 -0
  23. package/commands/cancel-ralph.md +18 -0
  24. package/commands/code-factory.md +53 -0
  25. package/commands/create-prd.md +55 -0
  26. package/commands/ralph-loop.md +18 -0
  27. package/commands/run-plan.md +117 -0
  28. package/commands/submit-lesson.md +122 -0
  29. package/docs/ARCHITECTURE.md +630 -0
  30. package/docs/CONTRIBUTING.md +125 -0
  31. package/docs/lessons/0001-bare-exception-swallowing.md +34 -0
  32. package/docs/lessons/0002-async-def-without-await.md +28 -0
  33. package/docs/lessons/0003-create-task-without-callback.md +28 -0
  34. package/docs/lessons/0004-hardcoded-test-counts.md +28 -0
  35. package/docs/lessons/0005-sqlite-without-closing.md +33 -0
  36. package/docs/lessons/0006-venv-pip-path.md +27 -0
  37. package/docs/lessons/0007-runner-state-self-rejection.md +35 -0
  38. package/docs/lessons/0008-quality-gate-blind-spot.md +33 -0
  39. package/docs/lessons/0009-parser-overcount-empty-batches.md +36 -0
  40. package/docs/lessons/0010-local-outside-function-bash.md +33 -0
  41. package/docs/lessons/0011-batch-tests-for-unimplemented-code.md +36 -0
  42. package/docs/lessons/0012-api-markdown-unescaped-chars.md +33 -0
  43. package/docs/lessons/0013-export-prefix-env-parsing.md +33 -0
  44. package/docs/lessons/0014-decorator-registry-import-side-effect.md +43 -0
  45. package/docs/lessons/0015-frontend-backend-schema-drift.md +43 -0
  46. package/docs/lessons/0016-event-driven-cold-start-seeding.md +44 -0
  47. package/docs/lessons/0017-copy-paste-logic-diverges.md +43 -0
  48. package/docs/lessons/0018-layer-passes-pipeline-broken.md +45 -0
  49. package/docs/lessons/0019-systemd-envfile-ignores-export.md +41 -0
  50. package/docs/lessons/0020-persist-state-incrementally.md +44 -0
  51. package/docs/lessons/0021-dual-axis-testing.md +48 -0
  52. package/docs/lessons/0022-jsx-factory-shadowing.md +43 -0
  53. package/docs/lessons/0023-static-analysis-spiral.md +51 -0
  54. package/docs/lessons/0024-shared-pipeline-implementation.md +55 -0
  55. package/docs/lessons/0025-defense-in-depth-all-entry-points.md +65 -0
  56. package/docs/lessons/0026-linter-no-rules-false-enforcement.md +54 -0
  57. package/docs/lessons/0027-jsx-silent-prop-drop.md +64 -0
  58. package/docs/lessons/0028-no-infrastructure-in-client-code.md +49 -0
  59. package/docs/lessons/0029-never-write-secrets-to-files.md +61 -0
  60. package/docs/lessons/0030-cache-merge-not-replace.md +62 -0
  61. package/docs/lessons/0031-verify-units-at-boundaries.md +66 -0
  62. package/docs/lessons/0032-module-lifecycle-subscribe-unsubscribe.md +89 -0
  63. package/docs/lessons/0033-async-iteration-mutable-snapshot.md +72 -0
  64. package/docs/lessons/0034-caller-missing-await-silent-discard.md +65 -0
  65. package/docs/lessons/0035-duplicate-registration-silent-overwrite.md +85 -0
  66. package/docs/lessons/0036-websocket-dirty-disconnect.md +33 -0
  67. package/docs/lessons/0037-parallel-agents-worktree-corruption.md +31 -0
  68. package/docs/lessons/0038-subscribe-no-stored-ref.md +36 -0
  69. package/docs/lessons/0039-fallback-or-default-hides-bugs.md +34 -0
  70. package/docs/lessons/0040-event-firehose-filter-first.md +36 -0
  71. package/docs/lessons/0041-ambiguous-base-dir-path-nesting.md +32 -0
  72. package/docs/lessons/0042-spec-compliance-insufficient.md +36 -0
  73. package/docs/lessons/0043-exact-count-extensible-collections.md +32 -0
  74. package/docs/lessons/0044-relative-file-deps-worktree.md +39 -0
  75. package/docs/lessons/0045-iterative-design-improvement.md +33 -0
  76. package/docs/lessons/0046-plan-assertion-math-bugs.md +38 -0
  77. package/docs/lessons/0047-pytest-single-threaded-default.md +37 -0
  78. package/docs/lessons/0048-integration-wiring-batch.md +40 -0
  79. package/docs/lessons/0049-ab-verification.md +41 -0
  80. package/docs/lessons/0050-editing-sourced-files-during-execution.md +33 -0
  81. package/docs/lessons/0051-infrastructure-fixes-cant-self-heal.md +30 -0
  82. package/docs/lessons/0052-uncommitted-changes-poison-quality-gates.md +31 -0
  83. package/docs/lessons/0053-jq-compact-flag-inconsistency.md +31 -0
  84. package/docs/lessons/0054-parser-matches-inside-code-blocks.md +30 -0
  85. package/docs/lessons/0055-agents-compensate-for-garbled-prompts.md +31 -0
  86. package/docs/lessons/0056-grep-count-exit-code-on-zero.md +42 -0
  87. package/docs/lessons/0057-new-artifacts-break-git-clean-gates.md +42 -0
  88. package/docs/lessons/0058-dead-config-keys-never-consumed.md +49 -0
  89. package/docs/lessons/0059-contract-test-shared-structures.md +53 -0
  90. package/docs/lessons/0060-set-e-silent-death-in-runners.md +53 -0
  91. package/docs/lessons/0061-context-injection-dirty-state.md +50 -0
  92. package/docs/lessons/0062-sibling-bug-neighborhood-scan.md +29 -0
  93. package/docs/lessons/0063-one-flag-two-lifetimes.md +31 -0
  94. package/docs/lessons/0064-test-passes-wrong-reason.md +31 -0
  95. package/docs/lessons/0065-pipefail-grep-count-double-output.md +39 -0
  96. package/docs/lessons/0066-local-keyword-outside-function.md +37 -0
  97. package/docs/lessons/0067-stdin-hang-non-interactive-shell.md +36 -0
  98. package/docs/lessons/0068-agent-builds-wrong-thing-correctly.md +31 -0
  99. package/docs/lessons/0069-plan-quality-dominates-execution.md +30 -0
  100. package/docs/lessons/0070-spec-echo-back-prevents-drift.md +31 -0
  101. package/docs/lessons/0071-positive-instructions-outperform-negative.md +30 -0
  102. package/docs/lessons/0072-lost-in-the-middle-context-placement.md +30 -0
  103. package/docs/lessons/0073-unscoped-lessons-cause-false-positives.md +30 -0
  104. package/docs/lessons/0074-stale-context-injection-wrong-batch.md +32 -0
  105. package/docs/lessons/0075-research-artifacts-must-persist.md +32 -0
  106. package/docs/lessons/0076-wrong-decomposition-contaminates-downstream.md +30 -0
  107. package/docs/lessons/0077-cherry-pick-merges-need-manual-resolution.md +30 -0
  108. package/docs/lessons/0078-static-review-without-live-test.md +30 -0
  109. package/docs/lessons/0079-integration-wiring-batch-required.md +32 -0
  110. package/docs/lessons/FRAMEWORK.md +161 -0
  111. package/docs/lessons/SUMMARY.md +201 -0
  112. package/docs/lessons/TEMPLATE.md +85 -0
  113. package/docs/plans/2026-02-21-code-factory-v2-design.md +204 -0
  114. package/docs/plans/2026-02-21-code-factory-v2-implementation-plan.md +2189 -0
  115. package/docs/plans/2026-02-21-code-factory-v2-phase4-design.md +537 -0
  116. package/docs/plans/2026-02-21-code-factory-v2-phase4-implementation-plan.md +2012 -0
  117. package/docs/plans/2026-02-21-hardening-pass-design.md +108 -0
  118. package/docs/plans/2026-02-21-hardening-pass-plan.md +1378 -0
  119. package/docs/plans/2026-02-21-mab-research-report.md +406 -0
  120. package/docs/plans/2026-02-21-marketplace-restructure-design.md +240 -0
  121. package/docs/plans/2026-02-21-marketplace-restructure-plan.md +832 -0
  122. package/docs/plans/2026-02-21-phase4-completion-plan.md +697 -0
  123. package/docs/plans/2026-02-21-validator-suite-design.md +148 -0
  124. package/docs/plans/2026-02-21-validator-suite-plan.md +540 -0
  125. package/docs/plans/2026-02-22-mab-research-round2.md +556 -0
  126. package/docs/plans/2026-02-22-mab-run-design.md +462 -0
  127. package/docs/plans/2026-02-22-mab-run-plan.md +2046 -0
  128. package/docs/plans/2026-02-22-operations-design-methodology-research.md +681 -0
  129. package/docs/plans/2026-02-22-research-agent-failure-taxonomy.md +532 -0
  130. package/docs/plans/2026-02-22-research-code-guideline-policies.md +886 -0
  131. package/docs/plans/2026-02-22-research-codebase-audit-refactoring.md +908 -0
  132. package/docs/plans/2026-02-22-research-coding-standards-documentation.md +541 -0
  133. package/docs/plans/2026-02-22-research-competitive-landscape.md +687 -0
  134. package/docs/plans/2026-02-22-research-comprehensive-testing.md +1076 -0
  135. package/docs/plans/2026-02-22-research-context-utilization.md +459 -0
  136. package/docs/plans/2026-02-22-research-cost-quality-tradeoff.md +548 -0
  137. package/docs/plans/2026-02-22-research-lesson-transferability.md +508 -0
  138. package/docs/plans/2026-02-22-research-multi-agent-coordination.md +312 -0
  139. package/docs/plans/2026-02-22-research-phase-integration.md +602 -0
  140. package/docs/plans/2026-02-22-research-plan-quality.md +428 -0
  141. package/docs/plans/2026-02-22-research-prompt-engineering.md +558 -0
  142. package/docs/plans/2026-02-22-research-unconventional-perspectives.md +528 -0
  143. package/docs/plans/2026-02-22-research-user-adoption.md +638 -0
  144. package/docs/plans/2026-02-22-research-verification-effectiveness.md +433 -0
  145. package/docs/plans/2026-02-23-agent-suite-design.md +299 -0
  146. package/docs/plans/2026-02-23-agent-suite-plan.md +578 -0
  147. package/docs/plans/2026-02-23-phase3-cost-infrastructure-design.md +148 -0
  148. package/docs/plans/2026-02-23-phase3-cost-infrastructure-plan.md +1062 -0
  149. package/docs/plans/2026-02-23-research-bash-expert-agent.md +543 -0
  150. package/docs/plans/2026-02-23-research-dependency-auditor-agent.md +564 -0
  151. package/docs/plans/2026-02-23-research-improving-existing-agents.md +503 -0
  152. package/docs/plans/2026-02-23-research-integration-tester-agent.md +454 -0
  153. package/docs/plans/2026-02-23-research-python-expert-agent.md +429 -0
  154. package/docs/plans/2026-02-23-research-service-monitor-agent.md +425 -0
  155. package/docs/plans/2026-02-23-research-shell-expert-agent.md +533 -0
  156. package/docs/plans/2026-02-23-roadmap-to-completion.md +530 -0
  157. package/docs/plans/2026-02-24-headless-module-split-design.md +98 -0
  158. package/docs/plans/2026-02-24-headless-module-split.md +443 -0
  159. package/docs/plans/2026-02-24-lesson-scope-metadata-design.md +228 -0
  160. package/docs/plans/2026-02-24-lesson-scope-metadata-plan.md +968 -0
  161. package/docs/plans/2026-02-24-npm-packaging-design.md +841 -0
  162. package/docs/plans/2026-02-24-npm-packaging-plan.md +1965 -0
  163. package/docs/plans/audit-findings.md +186 -0
  164. package/docs/telegram-notification-format.md +98 -0
  165. package/examples/example-plan.md +51 -0
  166. package/examples/example-prd.json +72 -0
  167. package/examples/example-roadmap.md +33 -0
  168. package/examples/quickstart-plan.md +63 -0
  169. package/hooks/hooks.json +26 -0
  170. package/hooks/setup-symlinks.sh +48 -0
  171. package/hooks/stop-hook.sh +135 -0
  172. package/package.json +47 -0
  173. package/policies/bash.md +71 -0
  174. package/policies/python.md +71 -0
  175. package/policies/testing.md +61 -0
  176. package/policies/universal.md +60 -0
  177. package/scripts/analyze-report.sh +97 -0
  178. package/scripts/architecture-map.sh +145 -0
  179. package/scripts/auto-compound.sh +273 -0
  180. package/scripts/batch-audit.sh +42 -0
  181. package/scripts/batch-test.sh +101 -0
  182. package/scripts/entropy-audit.sh +221 -0
  183. package/scripts/failure-digest.sh +51 -0
  184. package/scripts/generate-ast-rules.sh +96 -0
  185. package/scripts/init.sh +112 -0
  186. package/scripts/lesson-check.sh +428 -0
  187. package/scripts/lib/common.sh +61 -0
  188. package/scripts/lib/cost-tracking.sh +153 -0
  189. package/scripts/lib/ollama.sh +60 -0
  190. package/scripts/lib/progress-writer.sh +128 -0
  191. package/scripts/lib/run-plan-context.sh +215 -0
  192. package/scripts/lib/run-plan-echo-back.sh +231 -0
  193. package/scripts/lib/run-plan-headless.sh +396 -0
  194. package/scripts/lib/run-plan-notify.sh +57 -0
  195. package/scripts/lib/run-plan-parser.sh +81 -0
  196. package/scripts/lib/run-plan-prompt.sh +215 -0
  197. package/scripts/lib/run-plan-quality-gate.sh +132 -0
  198. package/scripts/lib/run-plan-routing.sh +315 -0
  199. package/scripts/lib/run-plan-sampling.sh +170 -0
  200. package/scripts/lib/run-plan-scoring.sh +146 -0
  201. package/scripts/lib/run-plan-state.sh +142 -0
  202. package/scripts/lib/run-plan-team.sh +199 -0
  203. package/scripts/lib/telegram.sh +54 -0
  204. package/scripts/lib/thompson-sampling.sh +176 -0
  205. package/scripts/license-check.sh +74 -0
  206. package/scripts/mab-run.sh +575 -0
  207. package/scripts/module-size-check.sh +146 -0
  208. package/scripts/patterns/async-no-await.yml +5 -0
  209. package/scripts/patterns/bare-except.yml +6 -0
  210. package/scripts/patterns/empty-catch.yml +6 -0
  211. package/scripts/patterns/hardcoded-localhost.yml +9 -0
  212. package/scripts/patterns/retry-loop-no-backoff.yml +12 -0
  213. package/scripts/pipeline-status.sh +197 -0
  214. package/scripts/policy-check.sh +226 -0
  215. package/scripts/prior-art-search.sh +133 -0
  216. package/scripts/promote-mab-lessons.sh +126 -0
  217. package/scripts/prompts/agent-a-superpowers.md +29 -0
  218. package/scripts/prompts/agent-b-ralph.md +29 -0
  219. package/scripts/prompts/judge-agent.md +61 -0
  220. package/scripts/prompts/planner-agent.md +44 -0
  221. package/scripts/pull-community-lessons.sh +90 -0
  222. package/scripts/quality-gate.sh +266 -0
  223. package/scripts/research-gate.sh +90 -0
  224. package/scripts/run-plan.sh +329 -0
  225. package/scripts/scope-infer.sh +159 -0
  226. package/scripts/setup-ralph-loop.sh +155 -0
  227. package/scripts/telemetry.sh +230 -0
  228. package/scripts/tests/run-all-tests.sh +52 -0
  229. package/scripts/tests/test-act-cli.sh +46 -0
  230. package/scripts/tests/test-agents-md.sh +87 -0
  231. package/scripts/tests/test-analyze-report.sh +114 -0
  232. package/scripts/tests/test-architecture-map.sh +89 -0
  233. package/scripts/tests/test-auto-compound.sh +169 -0
  234. package/scripts/tests/test-batch-test.sh +65 -0
  235. package/scripts/tests/test-benchmark-runner.sh +25 -0
  236. package/scripts/tests/test-common.sh +168 -0
  237. package/scripts/tests/test-cost-tracking.sh +158 -0
  238. package/scripts/tests/test-echo-back.sh +180 -0
  239. package/scripts/tests/test-entropy-audit.sh +146 -0
  240. package/scripts/tests/test-failure-digest.sh +66 -0
  241. package/scripts/tests/test-generate-ast-rules.sh +145 -0
  242. package/scripts/tests/test-helpers.sh +82 -0
  243. package/scripts/tests/test-init.sh +47 -0
  244. package/scripts/tests/test-lesson-check.sh +278 -0
  245. package/scripts/tests/test-lesson-local.sh +55 -0
  246. package/scripts/tests/test-license-check.sh +109 -0
  247. package/scripts/tests/test-mab-run.sh +182 -0
  248. package/scripts/tests/test-ollama-lib.sh +49 -0
  249. package/scripts/tests/test-ollama.sh +60 -0
  250. package/scripts/tests/test-pipeline-status.sh +198 -0
  251. package/scripts/tests/test-policy-check.sh +124 -0
  252. package/scripts/tests/test-prior-art-search.sh +96 -0
  253. package/scripts/tests/test-progress-writer.sh +140 -0
  254. package/scripts/tests/test-promote-mab-lessons.sh +110 -0
  255. package/scripts/tests/test-pull-community-lessons.sh +149 -0
  256. package/scripts/tests/test-quality-gate.sh +241 -0
  257. package/scripts/tests/test-research-gate.sh +132 -0
  258. package/scripts/tests/test-run-plan-cli.sh +86 -0
  259. package/scripts/tests/test-run-plan-context.sh +305 -0
  260. package/scripts/tests/test-run-plan-e2e.sh +153 -0
  261. package/scripts/tests/test-run-plan-headless.sh +424 -0
  262. package/scripts/tests/test-run-plan-notify.sh +124 -0
  263. package/scripts/tests/test-run-plan-parser.sh +217 -0
  264. package/scripts/tests/test-run-plan-prompt.sh +254 -0
  265. package/scripts/tests/test-run-plan-quality-gate.sh +222 -0
  266. package/scripts/tests/test-run-plan-routing.sh +178 -0
  267. package/scripts/tests/test-run-plan-scoring.sh +148 -0
  268. package/scripts/tests/test-run-plan-state.sh +261 -0
  269. package/scripts/tests/test-run-plan-team.sh +157 -0
  270. package/scripts/tests/test-scope-infer.sh +150 -0
  271. package/scripts/tests/test-setup-ralph-loop.sh +63 -0
  272. package/scripts/tests/test-telegram-env.sh +38 -0
  273. package/scripts/tests/test-telegram.sh +121 -0
  274. package/scripts/tests/test-telemetry.sh +46 -0
  275. package/scripts/tests/test-thompson-sampling.sh +139 -0
  276. package/scripts/tests/test-validate-all.sh +60 -0
  277. package/scripts/tests/test-validate-commands.sh +89 -0
  278. package/scripts/tests/test-validate-hooks.sh +98 -0
  279. package/scripts/tests/test-validate-lessons.sh +150 -0
  280. package/scripts/tests/test-validate-plan-quality.sh +235 -0
  281. package/scripts/tests/test-validate-plans.sh +187 -0
  282. package/scripts/tests/test-validate-plugin.sh +106 -0
  283. package/scripts/tests/test-validate-prd.sh +184 -0
  284. package/scripts/tests/test-validate-skills.sh +134 -0
  285. package/scripts/validate-all.sh +57 -0
  286. package/scripts/validate-commands.sh +67 -0
  287. package/scripts/validate-hooks.sh +89 -0
  288. package/scripts/validate-lessons.sh +98 -0
  289. package/scripts/validate-plan-quality.sh +369 -0
  290. package/scripts/validate-plans.sh +120 -0
  291. package/scripts/validate-plugin.sh +86 -0
  292. package/scripts/validate-policies.sh +42 -0
  293. package/scripts/validate-prd.sh +118 -0
  294. package/scripts/validate-skills.sh +96 -0
  295. package/skills/autocode/SKILL.md +285 -0
  296. package/skills/autocode/ab-verification.md +51 -0
  297. package/skills/autocode/code-quality-standards.md +37 -0
  298. package/skills/autocode/competitive-mode.md +364 -0
  299. package/skills/brainstorming/SKILL.md +97 -0
  300. package/skills/capture-lesson/SKILL.md +187 -0
  301. package/skills/check-lessons/SKILL.md +116 -0
  302. package/skills/dispatching-parallel-agents/SKILL.md +110 -0
  303. package/skills/executing-plans/SKILL.md +85 -0
  304. package/skills/finishing-a-development-branch/SKILL.md +201 -0
  305. package/skills/receiving-code-review/SKILL.md +72 -0
  306. package/skills/requesting-code-review/SKILL.md +59 -0
  307. package/skills/requesting-code-review/code-reviewer.md +82 -0
  308. package/skills/research/SKILL.md +145 -0
  309. package/skills/roadmap/SKILL.md +115 -0
  310. package/skills/subagent-driven-development/SKILL.md +98 -0
  311. package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +18 -0
  312. package/skills/subagent-driven-development/implementer-prompt.md +73 -0
  313. package/skills/subagent-driven-development/spec-reviewer-prompt.md +57 -0
  314. package/skills/systematic-debugging/SKILL.md +134 -0
  315. package/skills/systematic-debugging/condition-based-waiting.md +64 -0
  316. package/skills/systematic-debugging/defense-in-depth.md +32 -0
  317. package/skills/systematic-debugging/root-cause-tracing.md +55 -0
  318. package/skills/test-driven-development/SKILL.md +167 -0
  319. package/skills/using-git-worktrees/SKILL.md +219 -0
  320. package/skills/using-superpowers/SKILL.md +54 -0
  321. package/skills/verification-before-completion/SKILL.md +140 -0
  322. package/skills/verify/SKILL.md +82 -0
  323. package/skills/writing-plans/SKILL.md +128 -0
  324. package/skills/writing-skills/SKILL.md +93 -0
@@ -0,0 +1,82 @@
1
+ # Code Review Agent
2
+
3
+ You are reviewing code changes for production readiness.
4
+
5
+ **Your task:**
6
+ 1. Review {WHAT_WAS_IMPLEMENTED}
7
+ 2. Compare against {PLAN_OR_REQUIREMENTS}
8
+ 3. Check code quality, architecture, testing
9
+ 4. Categorize issues by severity
10
+ 5. Assess production readiness
11
+
12
+ ## What Was Implemented
13
+
14
+ {DESCRIPTION}
15
+
16
+ ## Requirements/Plan
17
+
18
+ {PLAN_REFERENCE}
19
+
20
+ ## Git Range to Review
21
+
22
+ **Base:** {BASE_SHA}
23
+ **Head:** {HEAD_SHA}
24
+
25
+ ```bash
26
+ git diff --stat {BASE_SHA}..{HEAD_SHA}
27
+ git diff {BASE_SHA}..{HEAD_SHA}
28
+ ```
29
+
30
+ ## Review Checklist
31
+
32
+ **Code Quality:**
33
+ - Clean separation of concerns?
34
+ - Proper error handling?
35
+ - Type safety (if applicable)?
36
+ - DRY principle followed?
37
+ - Edge cases handled?
38
+
39
+ **Architecture:**
40
+ - Sound design decisions?
41
+ - Scalability considerations?
42
+ - Performance implications?
43
+ - Security concerns?
44
+
45
+ **Testing:**
46
+ - Tests actually test logic (not mocks)?
47
+ - Edge cases covered?
48
+ - Integration tests where needed?
49
+ - All tests passing?
50
+
51
+ **Requirements:**
52
+ - All plan requirements met?
53
+ - Implementation matches spec?
54
+ - No scope creep?
55
+
56
+ ## Output Format
57
+
58
+ ### Strengths
59
+ [What's well done? Be specific.]
60
+
61
+ ### Issues
62
+
63
+ #### Critical (Must Fix)
64
+ [Bugs, security issues, data loss risks]
65
+
66
+ #### Important (Should Fix)
67
+ [Architecture problems, missing features, test gaps]
68
+
69
+ #### Minor (Nice to Have)
70
+ [Code style, optimization, documentation]
71
+
72
+ **For each issue:**
73
+ - File:line reference
74
+ - What's wrong
75
+ - Why it matters
76
+ - How to fix (if not obvious)
77
+
78
+ ### Assessment
79
+
80
+ **Ready to merge?** [Yes/No/With fixes]
81
+
82
+ **Reasoning:** [Technical assessment in 1-2 sentences]
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: research
3
+ description: "Structured investigation between brainstorming and PRD. Produces durable research artifacts that inform implementation decisions."
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Research — Structured Investigation Protocol
8
+
9
+ ## Overview
10
+
11
+ Research fills the gap between design intent (brainstorming) and technical specification (PRD). It investigates existing code, external libraries, potential blockers, and implementation options before committing to an approach.
12
+
13
+ **When to invoke:** After brainstorming produces an approved design, before PRD generation.
14
+
15
+ ## Inputs
16
+
17
+ - Approved design doc from brainstorming (e.g., `docs/plans/YYYY-MM-DD-<topic>-design.md`)
18
+ - Feature description or scope from the user
19
+
20
+ ## Steps
21
+
22
+ ### Step 1: Extract Research Questions
23
+
24
+ Read the design doc and identify:
25
+ - Technical unknowns ("does library X support feature Y?")
26
+ - Existing code dependencies ("what module handles auth today?")
27
+ - Integration points ("what interface does the consumer expect?")
28
+ - Performance constraints ("can we process N items in M seconds?")
29
+
30
+ List 3-8 concrete research questions.
31
+
32
+ ### Step 2: Search Existing Code
33
+
34
+ For each question about the current codebase:
35
+ - Use Grep/Glob to find relevant files and patterns
36
+ - Read key files to understand current implementations
37
+ - Document: file paths, function signatures, data structures
38
+
39
+ ### Step 3: Search Documentation
40
+
41
+ For each question about libraries or frameworks:
42
+ - Check project docs (README, ARCHITECTURE.md, CLAUDE.md)
43
+ - Search for existing patterns in the codebase
44
+ - Check docs/lessons/ for relevant lessons
45
+
46
+ ### Step 4: External Research
47
+
48
+ For each question requiring external knowledge:
49
+ - Search for library documentation, API references
50
+ - Look for known issues, migration guides, compatibility notes
51
+ - Document version constraints and breaking changes
52
+
53
+ ### Step 5: Identify Blockers
54
+
55
+ Categorize findings as:
56
+ - **Blocking:** Cannot proceed without resolving (missing dependency, incompatible API, no viable approach)
57
+ - **Warning:** Proceed with caution (deprecated API, performance concern, partial support)
58
+ - **Dependency:** Requires work in another module/project first
59
+
60
+ ### Step 6: Synthesize Findings
61
+
62
+ Write a human-readable summary with:
63
+ - Answer to each research question
64
+ - Recommended approach (with confidence level: high/medium/low)
65
+ - Blocking issues and proposed resolutions
66
+ - Warnings that the PRD should account for
67
+
68
+ ### Step 7: Produce Artifacts
69
+
70
+ Create two files:
71
+
72
+ **`tasks/research-<slug>.md`** — Human-readable research report:
73
+ ```markdown
74
+ # Research: <Feature Name>
75
+
76
+ ## Questions Investigated
77
+ 1. <question> — <answer summary>
78
+ ...
79
+
80
+ ## Recommended Approach
81
+ <1-2 paragraphs with confidence level>
82
+
83
+ ## Blocking Issues
84
+ - [ ] <issue> — <proposed resolution>
85
+
86
+ ## Warnings
87
+ - <warning that PRD should account for>
88
+
89
+ ## Dependencies
90
+ - <module/project that needs work first>
91
+
92
+ ## Evidence
93
+ - <file:line references, documentation links>
94
+ ```
95
+
96
+ **`tasks/research-<slug>.json`** — Machine-readable for pipeline consumption:
97
+ ```json
98
+ {
99
+ "feature": "<name>",
100
+ "timestamp": "<ISO 8601>",
101
+ "questions": ["<q1>", "<q2>"],
102
+ "blocking_issues": [
103
+ {"issue": "<description>", "resolved": false, "resolution": "<proposed>"}
104
+ ],
105
+ "warnings": ["<w1>", "<w2>"],
106
+ "dependencies": ["<dep1>"],
107
+ "confidence_ratings": {
108
+ "approach": "high|medium|low",
109
+ "effort_estimate": "high|medium|low"
110
+ },
111
+ "recommended_approach": "<summary>"
112
+ }
113
+ ```
114
+
115
+ ### Step 8: Gate Check
116
+
117
+ If any `blocking_issues` have `resolved: false`:
118
+ - Present them to the user
119
+ - Wait for resolution or override
120
+ - Do NOT proceed to PRD with unresolved blockers
121
+
122
+ ### Step 9: Update Progress
123
+
124
+ Append research summary to `progress.txt`.
125
+
126
+ ### Step 10: Handoff
127
+
128
+ Pass `tasks/research-<slug>.json` to PRD generation. The PRD should:
129
+ - Account for all warnings
130
+ - Include tasks that resolve blocking issues
131
+ - Reference research findings in acceptance criteria
132
+
133
+ ## Exit Criteria
134
+
135
+ - `tasks/research-<slug>.md` exists with all sections
136
+ - `tasks/research-<slug>.json` is valid JSON with all required fields
137
+ - All blocking issues are resolved OR user has explicitly overridden
138
+ - `progress.txt` updated with research summary
139
+
140
+ ## Rules
141
+
142
+ - **Always make a file.** Research that exists only in conversation is lost on context reset.
143
+ - **Cite evidence.** Every finding should reference a specific file:line, documentation URL, or command output.
144
+ - **Confidence levels are mandatory.** Express high/medium/low confidence on every recommendation.
145
+ - **Don't over-research.** 30-60 minutes maximum. If a question can't be answered in that time, flag it as a blocking issue for the user.
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: roadmap
3
+ description: "Decompose a multi-feature epic into a dependency-ordered, phased roadmap with effort estimates."
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Roadmap — Multi-Feature Decomposition
8
+
9
+ ## Overview
10
+
11
+ When the input to `/autocode` is a multi-feature epic (3+ distinct features or the keyword "roadmap"), this skill decomposes it into an ordered sequence of features, each ready for brainstorming as a standalone unit.
12
+
13
+ <HARD-GATE>
14
+ Do NOT brainstorm individual features until the roadmap is approved. Feature ordering determines dependency flow — changing order mid-execution causes rework.
15
+ </HARD-GATE>
16
+
17
+ ## When to Use
18
+
19
+ - Input contains 3+ distinct features
20
+ - Input uses "roadmap", "epic", or "multi-feature" keywords
21
+ - Input references a large body of work spanning multiple PRs
22
+
23
+ Skip this stage when:
24
+ - Input is a single feature (even a complex one — brainstorming handles that)
25
+ - Input is a bug fix or small enhancement
26
+
27
+ ## Process
28
+
29
+ ### Step 1: Extract Features
30
+
31
+ Read the input and identify distinct features. Each feature must be:
32
+ - **Independent enough** to be brainstormed, PRD'd, and implemented as a standalone unit
33
+ - **Ordered by dependency** — if Feature B needs Feature A's output, A comes first
34
+ - **Sized for 1-3 sessions** — if a feature takes more, it's an epic, not a feature; decompose further
35
+
36
+ ### Step 2: Identify Dependencies
37
+
38
+ For each pair of features, determine:
39
+ - **Hard dependency** — B cannot start until A is merged (shared interfaces, schema changes)
40
+ - **Soft dependency** — B benefits from A being done first (shared patterns, learning)
41
+ - **Independent** — no relationship
42
+
43
+ ### Step 3: Order and Phase
44
+
45
+ Group features into phases based on dependencies:
46
+
47
+ | Phase | Features | Why this order |
48
+ |-------|----------|---------------|
49
+ | 1 | Foundation features | No dependencies, enable later work |
50
+ | 2 | Dependent features | Require Phase 1 outputs |
51
+ | 3 | Polish features | Require Phase 1+2, add refinement |
52
+
53
+ ### Step 4: Estimate Effort
54
+
55
+ For each feature, estimate:
56
+ - **Complexity** — simple (1 batch) / moderate (2-3 batches) / complex (4+ batches)
57
+ - **Risk** — low / medium / high (based on unknowns, integration surface, external deps)
58
+
59
+ ### Step 5: Produce Artifact
60
+
61
+ Write `tasks/roadmap.md` with this structure:
62
+
63
+ ```markdown
64
+ # Roadmap: <Epic Title>
65
+
66
+ Generated: YYYY-MM-DD
67
+
68
+ ## Features (dependency order)
69
+
70
+ ### Phase 1: <Phase Name>
71
+ | # | Feature | Complexity | Risk | Dependencies |
72
+ |---|---------|-----------|------|-------------|
73
+ | 1 | Feature A | moderate | low | none |
74
+ | 2 | Feature B | simple | low | none |
75
+
76
+ ### Phase 2: <Phase Name>
77
+ | # | Feature | Complexity | Risk | Dependencies |
78
+ |---|---------|-----------|------|-------------|
79
+ | 3 | Feature C | complex | medium | #1 |
80
+
81
+ ## Dependency Graph
82
+ 1 → 3
83
+ 2 (independent)
84
+
85
+ ## Total Estimate
86
+ - Features: N
87
+ - Phases: M
88
+ - Estimated sessions: X-Y
89
+ ```
90
+
91
+ ### Step 6: Get Approval
92
+
93
+ Present the roadmap to the user. Ask:
94
+ - **"Does this feature ordering make sense?"**
95
+ - **"Should any features be cut, combined, or reordered?"**
96
+
97
+ Minimum 1 round of refinement before proceeding.
98
+
99
+ **Exit criteria:** `tasks/roadmap.md` exists, user approves feature ordering.
100
+
101
+ ## After Approval
102
+
103
+ The autocode pipeline loops through features in roadmap order:
104
+ 1. Pick next feature from roadmap
105
+ 2. Run Stage 1 (Brainstorm) through Stage 6 (Finish) for that feature
106
+ 3. Mark feature complete in roadmap
107
+ 4. Repeat until all features done
108
+
109
+ Each feature gets its own branch, PRD, plan, and verification cycle.
110
+
111
+ ## Integration
112
+
113
+ **Called by:** `autocode` skill (Stage 0.5, conditional)
114
+ **Produces:** `tasks/roadmap.md`
115
+ **Consumed by:** `autocode` pipeline (iterates features in order)
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: subagent-driven-development
3
+ description: Use when executing implementation plans with independent tasks in the current session
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Subagent-Driven Development
8
+
9
+ Execute plan by dispatching fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review.
10
+
11
+ **Core principle:** Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration
12
+
13
+ ## When to Use
14
+
15
+ **vs. Executing Plans (parallel session):**
16
+ - Same session (no context switch)
17
+ - Fresh subagent per task (no context pollution)
18
+ - Two-stage review after each task: spec compliance first, then code quality
19
+ - Faster iteration (no human-in-loop between tasks)
20
+
21
+ ## The Process
22
+
23
+ ```dot
24
+ digraph process {
25
+ rankdir=TB;
26
+
27
+ subgraph cluster_per_task {
28
+ label="Per Task";
29
+ "Dispatch implementer subagent (./implementer-prompt.md)" [shape=box];
30
+ "Implementer subagent asks questions?" [shape=diamond];
31
+ "Answer questions, provide context" [shape=box];
32
+ "Implementer subagent implements, tests, commits, self-reviews" [shape=box];
33
+ "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" [shape=box];
34
+ "Spec reviewer subagent confirms code matches spec?" [shape=diamond];
35
+ "Implementer subagent fixes spec gaps" [shape=box];
36
+ "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [shape=box];
37
+ "Code quality reviewer subagent approves?" [shape=diamond];
38
+ "Implementer subagent fixes quality issues" [shape=box];
39
+ "Mark task complete in TodoWrite" [shape=box];
40
+ }
41
+
42
+ "Read plan, extract all tasks with full text, note context, create TodoWrite" [shape=box];
43
+ "More tasks remain?" [shape=diamond];
44
+ "Dispatch final code reviewer subagent for entire implementation" [shape=box];
45
+ "Use superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
46
+
47
+ "Read plan, extract all tasks with full text, note context, create TodoWrite" -> "Dispatch implementer subagent (./implementer-prompt.md)";
48
+ "Dispatch implementer subagent (./implementer-prompt.md)" -> "Implementer subagent asks questions?";
49
+ "Implementer subagent asks questions?" -> "Answer questions, provide context" [label="yes"];
50
+ "Answer questions, provide context" -> "Dispatch implementer subagent (./implementer-prompt.md)";
51
+ "Implementer subagent asks questions?" -> "Implementer subagent implements, tests, commits, self-reviews" [label="no"];
52
+ "Implementer subagent implements, tests, commits, self-reviews" -> "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)";
53
+ "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" -> "Spec reviewer subagent confirms code matches spec?";
54
+ "Spec reviewer subagent confirms code matches spec?" -> "Implementer subagent fixes spec gaps" [label="no"];
55
+ "Implementer subagent fixes spec gaps" -> "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" [label="re-review"];
56
+ "Spec reviewer subagent confirms code matches spec?" -> "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [label="yes"];
57
+ "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" -> "Code quality reviewer subagent approves?";
58
+ "Code quality reviewer subagent approves?" -> "Implementer subagent fixes quality issues" [label="no"];
59
+ "Implementer subagent fixes quality issues" -> "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [label="re-review"];
60
+ "Code quality reviewer subagent approves?" -> "Mark task complete in TodoWrite" [label="yes"];
61
+ "Mark task complete in TodoWrite" -> "More tasks remain?";
62
+ "More tasks remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"];
63
+ "More tasks remain?" -> "Dispatch final code reviewer subagent for entire implementation" [label="no"];
64
+ "Dispatch final code reviewer subagent for entire implementation" -> "Use superpowers:finishing-a-development-branch";
65
+ }
66
+ ```
67
+
68
+ ## Prompt Templates
69
+
70
+ - `./implementer-prompt.md` - Dispatch implementer subagent
71
+ - `./spec-reviewer-prompt.md` - Dispatch spec compliance reviewer subagent
72
+ - `./code-quality-reviewer-prompt.md` - Dispatch code quality reviewer subagent
73
+
74
+ ## Red Flags
75
+
76
+ **Never:**
77
+ - Start implementation on main/master branch without explicit user consent
78
+ - Skip reviews (spec compliance OR code quality)
79
+ - Dispatch multiple implementation subagents in parallel (conflicts)
80
+ - Make subagent read plan file (provide full text instead)
81
+ - **Start code quality review before spec compliance is ✅** (wrong order)
82
+
83
+ **If subagent asks questions:**
84
+ - Answer clearly and completely
85
+ - Don't rush them into implementation
86
+
87
+ **If reviewer finds issues:**
88
+ - Implementer (same subagent) fixes them
89
+ - Reviewer reviews again
90
+ - Repeat until approved
91
+
92
+ ## Integration
93
+
94
+ **Required workflow skills:**
95
+ - **superpowers:using-git-worktrees** - REQUIRED: Set up isolated workspace before starting
96
+ - **superpowers:writing-plans** - Creates the plan this skill executes
97
+ - **superpowers:requesting-code-review** - Code review template for reviewer subagents
98
+ - **superpowers:finishing-a-development-branch** - Complete development after all tasks
@@ -0,0 +1,18 @@
1
+ # Code Quality Reviewer Prompt Template
2
+
3
+ **Purpose:** Verify implementation is well-built (clean, tested, maintainable)
4
+
5
+ **Only dispatch after spec compliance review passes.**
6
+
7
+ ```
8
+ Task tool (superpowers:code-reviewer):
9
+ Use template at requesting-code-review/code-reviewer.md
10
+
11
+ WHAT_WAS_IMPLEMENTED: [from implementer's report]
12
+ PLAN_OR_REQUIREMENTS: Task N from [plan-file]
13
+ BASE_SHA: [commit before task]
14
+ HEAD_SHA: [current commit]
15
+ DESCRIPTION: [task summary]
16
+ ```
17
+
18
+ **Code reviewer returns:** Strengths, Issues (Critical/Important/Minor), Assessment
@@ -0,0 +1,73 @@
1
+ # Implementer Subagent Prompt Template
2
+
3
+ Use this template when dispatching an implementer subagent.
4
+
5
+ ```
6
+ Task tool (general-purpose):
7
+ description: "Implement Task N: [task name]"
8
+ prompt: |
9
+ You are implementing Task N: [task name]
10
+
11
+ ## Task Description
12
+
13
+ [FULL TEXT of task from plan - paste it here, don't make subagent read file]
14
+
15
+ ## Context
16
+
17
+ [Scene-setting: where this fits, dependencies, architectural context]
18
+
19
+ ## Before You Begin
20
+
21
+ If you have questions about:
22
+ - The requirements or acceptance criteria
23
+ - The approach or implementation strategy
24
+ - Dependencies or assumptions
25
+ - Anything unclear in the task description
26
+
27
+ **Ask them now.** Raise any concerns before starting work.
28
+
29
+ ## Your Job
30
+
31
+ Once you're clear on requirements:
32
+ 1. Implement exactly what the task specifies
33
+ 2. Write tests (following TDD if task says to)
34
+ 3. Verify implementation works
35
+ 4. Commit your work
36
+ 5. Self-review (see below)
37
+ 6. Report back
38
+
39
+ Work from: [directory]
40
+
41
+ **While you work:** If you encounter something unexpected or unclear, **ask questions**.
42
+
43
+ ## Before Reporting Back: Self-Review
44
+
45
+ Review your work with fresh eyes. Ask yourself:
46
+
47
+ **Completeness:**
48
+ - Did I fully implement everything in the spec?
49
+ - Did I miss any requirements?
50
+
51
+ **Quality:**
52
+ - Is this my best work?
53
+ - Are names clear and accurate?
54
+
55
+ **Discipline:**
56
+ - Did I avoid overbuilding (YAGNI)?
57
+ - Did I follow existing patterns?
58
+
59
+ **Testing:**
60
+ - Do tests actually verify behavior?
61
+ - Did I follow TDD if required?
62
+
63
+ If you find issues during self-review, fix them now before reporting.
64
+
65
+ ## Report Format
66
+
67
+ When done, report:
68
+ - What you implemented
69
+ - What you tested and test results
70
+ - Files changed
71
+ - Self-review findings (if any)
72
+ - Any issues or concerns
73
+ ```
@@ -0,0 +1,57 @@
1
+ # Spec Compliance Reviewer Prompt Template
2
+
3
+ Use this template when dispatching a spec compliance reviewer subagent.
4
+
5
+ **Purpose:** Verify implementer built what was requested (nothing more, nothing less)
6
+
7
+ ```
8
+ Task tool (general-purpose):
9
+ description: "Review spec compliance for Task N"
10
+ prompt: |
11
+ You are reviewing whether an implementation matches its specification.
12
+
13
+ ## What Was Requested
14
+
15
+ [FULL TEXT of task requirements]
16
+
17
+ ## What Implementer Claims They Built
18
+
19
+ [From implementer's report]
20
+
21
+ ## CRITICAL: Do Not Trust the Report
22
+
23
+ The implementer finished suspiciously quickly. Their report may be incomplete,
24
+ inaccurate, or optimistic. You MUST verify everything independently.
25
+
26
+ **DO NOT:**
27
+ - Take their word for what they implemented
28
+ - Trust their claims about completeness
29
+ - Accept their interpretation of requirements
30
+
31
+ **DO:**
32
+ - Read the actual code they wrote
33
+ - Compare actual implementation to requirements line by line
34
+ - Check for missing pieces they claimed to implement
35
+ - Look for extra features they didn't mention
36
+
37
+ ## Your Job
38
+
39
+ Read the implementation code and verify:
40
+
41
+ **Missing requirements:**
42
+ - Did they implement everything that was requested?
43
+ - Are there requirements they skipped or missed?
44
+
45
+ **Extra/unneeded work:**
46
+ - Did they build things that weren't requested?
47
+ - Did they over-engineer or add unnecessary features?
48
+
49
+ **Misunderstandings:**
50
+ - Did they interpret requirements differently than intended?
51
+
52
+ **Verify by reading code, not by trusting report.**
53
+
54
+ Report:
55
+ - ✅ Spec compliant (if everything matches after code inspection)
56
+ - ❌ Issues found: [list specifically what's missing or extra, with file:line references]
57
+ ```