specialist-agent 2.13.0 → 3.2.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 (323) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +33 -207
  3. package/dist/catalog.json +15529 -0
  4. package/dist/hw-worker.mjs +254 -0
  5. package/dist/icones/icone.ico +0 -0
  6. package/dist/icones/icone.png +0 -0
  7. package/dist/interface/assets/figtree-latin-400-normal-g7Dtegnw.woff2 +0 -0
  8. package/dist/interface/assets/figtree-latin-500-normal-BWnGEVsr.woff2 +0 -0
  9. package/dist/interface/assets/figtree-latin-600-normal-Cv_xCTDl.woff2 +0 -0
  10. package/dist/interface/assets/figtree-latin-700-normal-th6qEP7c.woff2 +0 -0
  11. package/dist/interface/assets/figtree-latin-ext-400-normal-CXAzuTZb.woff2 +0 -0
  12. package/dist/interface/assets/figtree-latin-ext-500-normal-Du0rIuHj.woff2 +0 -0
  13. package/dist/interface/assets/figtree-latin-ext-600-normal-DJlfifZj.woff2 +0 -0
  14. package/dist/interface/assets/figtree-latin-ext-700-normal-CS4sQkGV.woff2 +0 -0
  15. package/dist/interface/assets/index-BIyqZkro.css +1 -0
  16. package/dist/interface/assets/index-zAegy908.js +13 -0
  17. package/dist/interface/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  18. package/dist/interface/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  19. package/dist/interface/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
  20. package/dist/interface/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  21. package/dist/interface/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
  22. package/dist/interface/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
  23. package/dist/interface/assets/unbounded-latin-500-normal-4slEIF53.woff2 +0 -0
  24. package/dist/interface/assets/unbounded-latin-700-normal-CaoNriVp.woff2 +0 -0
  25. package/dist/interface/assets/unbounded-latin-ext-500-normal-BTIpesyw.woff2 +0 -0
  26. package/dist/interface/assets/unbounded-latin-ext-700-normal-BLzWLLjG.woff2 +0 -0
  27. package/dist/interface/icones/apple-touch-icon.png +0 -0
  28. package/dist/interface/icones/favicon-32.png +0 -0
  29. package/dist/interface/icones/icone-192.png +0 -0
  30. package/dist/interface/icones/icone-512.png +0 -0
  31. package/dist/interface/icones/icone-mascara-512.png +0 -0
  32. package/dist/interface/index.html +19 -0
  33. package/dist/interface/manifest.webmanifest +19 -0
  34. package/dist/interface/sw.js +63 -0
  35. package/dist/specialist-agent.mjs +6919 -0
  36. package/dist/usage-worker.mjs +174 -0
  37. package/package.json +32 -57
  38. package/.claude-plugin/marketplace.json +0 -52
  39. package/.claude-plugin/plugin.json +0 -37
  40. package/.codex/INSTALL.md +0 -145
  41. package/.cursor-plugin/marketplace.json +0 -52
  42. package/.cursor-plugin/plugin.json +0 -37
  43. package/.opencode/INSTALL.md +0 -127
  44. package/.opencode/opencode.json +0 -186
  45. package/agents/analyst-lite.md +0 -48
  46. package/agents/analyst.md +0 -396
  47. package/agents/api-lite.md +0 -43
  48. package/agents/api.md +0 -427
  49. package/agents/architect-lite.md +0 -104
  50. package/agents/architect.md +0 -571
  51. package/agents/autopilot-lite.md +0 -46
  52. package/agents/autopilot.md +0 -196
  53. package/agents/cloud-lite.md +0 -75
  54. package/agents/cloud.md +0 -213
  55. package/agents/data-lite.md +0 -67
  56. package/agents/data.md +0 -306
  57. package/agents/debugger-lite.md +0 -46
  58. package/agents/debugger.md +0 -410
  59. package/agents/deps-lite.md +0 -41
  60. package/agents/deps.md +0 -363
  61. package/agents/designer-lite.md +0 -67
  62. package/agents/designer.md +0 -195
  63. package/agents/devops-lite.md +0 -67
  64. package/agents/devops.md +0 -205
  65. package/agents/docs-lite.md +0 -42
  66. package/agents/docs.md +0 -454
  67. package/agents/executor-lite.md +0 -61
  68. package/agents/executor.md +0 -695
  69. package/agents/explorer-lite.md +0 -55
  70. package/agents/explorer.md +0 -152
  71. package/agents/finance-lite.md +0 -66
  72. package/agents/finance.md +0 -255
  73. package/agents/i18n-lite.md +0 -44
  74. package/agents/i18n.md +0 -594
  75. package/agents/legal-lite.md +0 -113
  76. package/agents/legal.md +0 -302
  77. package/agents/marketing-lite.md +0 -25
  78. package/agents/marketing.md +0 -188
  79. package/agents/memory.md +0 -166
  80. package/agents/orchestrator-lite.md +0 -40
  81. package/agents/orchestrator.md +0 -512
  82. package/agents/pair-lite.md +0 -38
  83. package/agents/pair.md +0 -310
  84. package/agents/perf-lite.md +0 -42
  85. package/agents/perf.md +0 -320
  86. package/agents/planner-lite.md +0 -59
  87. package/agents/planner.md +0 -272
  88. package/agents/product-lite.md +0 -25
  89. package/agents/product.md +0 -195
  90. package/agents/refactor-lite.md +0 -42
  91. package/agents/refactor.md +0 -467
  92. package/agents/ripple-lite.md +0 -106
  93. package/agents/ripple.md +0 -166
  94. package/agents/scout-lite.md +0 -37
  95. package/agents/scout.md +0 -224
  96. package/agents/security-lite.md +0 -66
  97. package/agents/security.md +0 -252
  98. package/agents/sentry-triage-lite.md +0 -54
  99. package/agents/sentry-triage.md +0 -217
  100. package/agents/starter-lite.md +0 -80
  101. package/agents/starter.md +0 -300
  102. package/agents/support-lite.md +0 -24
  103. package/agents/support.md +0 -191
  104. package/agents/tdd-lite.md +0 -43
  105. package/agents/tdd.md +0 -329
  106. package/agents/tester-lite.md +0 -71
  107. package/agents/tester.md +0 -237
  108. package/cli/architectures.mjs +0 -713
  109. package/cli/detect-architecture.mjs +0 -752
  110. package/cli/generate-architecture.mjs +0 -1096
  111. package/cli/index.mjs +0 -1217
  112. package/cli/recommend-architecture.mjs +0 -870
  113. package/hooks/after-review.mjs +0 -130
  114. package/hooks/after-task.mjs +0 -117
  115. package/hooks/before-plan.mjs +0 -155
  116. package/hooks/before-review.mjs +0 -139
  117. package/hooks/hooks.json +0 -66
  118. package/hooks/lifecycle.json +0 -91
  119. package/hooks/native/auto-dispatch.mjs +0 -207
  120. package/hooks/native/auto-format.mjs +0 -176
  121. package/hooks/native/mcp-discovery.mjs +0 -168
  122. package/hooks/native/security-config.json +0 -38
  123. package/hooks/native/security-guard.mjs +0 -323
  124. package/hooks/native/session-context.mjs +0 -179
  125. package/hooks/native/session-end.mjs +0 -42
  126. package/hooks/native/utils.mjs +0 -62
  127. package/hooks/on-error.mjs +0 -129
  128. package/hooks/session-end.mjs +0 -185
  129. package/hooks/session-start.mjs +0 -154
  130. package/packs/angular/ARCHITECTURE.md +0 -814
  131. package/packs/angular/CLAUDE.md +0 -105
  132. package/packs/angular/agents/builder.md +0 -113
  133. package/packs/angular/agents/doctor.md +0 -187
  134. package/packs/angular/agents/migrator.md +0 -101
  135. package/packs/angular/agents/reviewer.md +0 -252
  136. package/packs/angular/agents-lite/builder.md +0 -65
  137. package/packs/angular/agents-lite/doctor.md +0 -64
  138. package/packs/angular/agents-lite/migrator.md +0 -75
  139. package/packs/angular/agents-lite/reviewer.md +0 -69
  140. package/packs/angular/skills/dev-create-component/SKILL.md +0 -56
  141. package/packs/angular/skills/dev-create-injectable/SKILL.md +0 -60
  142. package/packs/angular/skills/dev-create-module/SKILL.md +0 -49
  143. package/packs/angular/skills/dev-create-service/SKILL.md +0 -34
  144. package/packs/angular/skills/dev-create-test/SKILL.md +0 -78
  145. package/packs/angular/skills/dev-generate-types/SKILL.md +0 -37
  146. package/packs/angular/skills/docs-onboard/SKILL.md +0 -42
  147. package/packs/angular/skills/migration-migrate-component/SKILL.md +0 -42
  148. package/packs/angular/skills/migration-migrate-module/SKILL.md +0 -25
  149. package/packs/angular/skills/review-check-architecture/SKILL.md +0 -67
  150. package/packs/angular/skills/review-fix-violations/SKILL.md +0 -43
  151. package/packs/angular/skills/review-review/SKILL.md +0 -43
  152. package/packs/astro/ARCHITECTURE.md +0 -718
  153. package/packs/astro/CLAUDE.md +0 -106
  154. package/packs/astro/agents/builder.md +0 -123
  155. package/packs/astro/agents/doctor.md +0 -200
  156. package/packs/astro/agents/migrator.md +0 -105
  157. package/packs/astro/agents/reviewer.md +0 -253
  158. package/packs/astro/agents-lite/builder.md +0 -71
  159. package/packs/astro/agents-lite/doctor.md +0 -66
  160. package/packs/astro/agents-lite/migrator.md +0 -71
  161. package/packs/astro/agents-lite/reviewer.md +0 -70
  162. package/packs/astro/skills/dev-create-component/SKILL.md +0 -50
  163. package/packs/astro/skills/dev-create-island/SKILL.md +0 -63
  164. package/packs/astro/skills/dev-create-module/SKILL.md +0 -49
  165. package/packs/astro/skills/dev-create-service/SKILL.md +0 -34
  166. package/packs/astro/skills/dev-create-test/SKILL.md +0 -76
  167. package/packs/astro/skills/dev-generate-types/SKILL.md +0 -37
  168. package/packs/astro/skills/docs-onboard/SKILL.md +0 -51
  169. package/packs/astro/skills/migration-migrate-component/SKILL.md +0 -48
  170. package/packs/astro/skills/migration-migrate-module/SKILL.md +0 -25
  171. package/packs/astro/skills/review-check-architecture/SKILL.md +0 -72
  172. package/packs/astro/skills/review-fix-violations/SKILL.md +0 -43
  173. package/packs/astro/skills/review-review/SKILL.md +0 -45
  174. package/packs/nextjs/ARCHITECTURE.md +0 -1033
  175. package/packs/nextjs/CLAUDE.md +0 -106
  176. package/packs/nextjs/agents/builder.md +0 -132
  177. package/packs/nextjs/agents/doctor.md +0 -226
  178. package/packs/nextjs/agents/migrator.md +0 -101
  179. package/packs/nextjs/agents/reviewer.md +0 -243
  180. package/packs/nextjs/agents-lite/builder.md +0 -74
  181. package/packs/nextjs/agents-lite/doctor.md +0 -74
  182. package/packs/nextjs/agents-lite/migrator.md +0 -75
  183. package/packs/nextjs/agents-lite/reviewer.md +0 -73
  184. package/packs/nextjs/skills/dev-create-component/SKILL.md +0 -82
  185. package/packs/nextjs/skills/dev-create-hook/SKILL.md +0 -90
  186. package/packs/nextjs/skills/dev-create-module/SKILL.md +0 -63
  187. package/packs/nextjs/skills/dev-create-service/SKILL.md +0 -35
  188. package/packs/nextjs/skills/dev-create-test/SKILL.md +0 -106
  189. package/packs/nextjs/skills/dev-generate-types/SKILL.md +0 -37
  190. package/packs/nextjs/skills/docs-onboard/SKILL.md +0 -55
  191. package/packs/nextjs/skills/migration-migrate-component/SKILL.md +0 -58
  192. package/packs/nextjs/skills/migration-migrate-module/SKILL.md +0 -25
  193. package/packs/nextjs/skills/review-check-architecture/SKILL.md +0 -101
  194. package/packs/nextjs/skills/review-fix-violations/SKILL.md +0 -48
  195. package/packs/nextjs/skills/review-review/SKILL.md +0 -47
  196. package/packs/nuxt/ARCHITECTURE.md +0 -831
  197. package/packs/nuxt/CLAUDE.md +0 -111
  198. package/packs/nuxt/agents/builder.md +0 -120
  199. package/packs/nuxt/agents/doctor.md +0 -198
  200. package/packs/nuxt/agents/migrator.md +0 -101
  201. package/packs/nuxt/agents/reviewer.md +0 -255
  202. package/packs/nuxt/agents-lite/builder.md +0 -67
  203. package/packs/nuxt/agents-lite/doctor.md +0 -67
  204. package/packs/nuxt/agents-lite/migrator.md +0 -80
  205. package/packs/nuxt/agents-lite/reviewer.md +0 -71
  206. package/packs/nuxt/skills/dev-create-component/SKILL.md +0 -60
  207. package/packs/nuxt/skills/dev-create-composable/SKILL.md +0 -33
  208. package/packs/nuxt/skills/dev-create-module/SKILL.md +0 -49
  209. package/packs/nuxt/skills/dev-create-service/SKILL.md +0 -34
  210. package/packs/nuxt/skills/dev-create-test/SKILL.md +0 -61
  211. package/packs/nuxt/skills/dev-generate-types/SKILL.md +0 -37
  212. package/packs/nuxt/skills/docs-onboard/SKILL.md +0 -49
  213. package/packs/nuxt/skills/migration-migrate-component/SKILL.md +0 -48
  214. package/packs/nuxt/skills/migration-migrate-module/SKILL.md +0 -25
  215. package/packs/nuxt/skills/review-check-architecture/SKILL.md +0 -71
  216. package/packs/nuxt/skills/review-fix-violations/SKILL.md +0 -43
  217. package/packs/nuxt/skills/review-review/SKILL.md +0 -45
  218. package/packs/react/ARCHITECTURE.md +0 -991
  219. package/packs/react/CLAUDE.md +0 -102
  220. package/packs/react/agents/builder.md +0 -113
  221. package/packs/react/agents/doctor.md +0 -203
  222. package/packs/react/agents/migrator.md +0 -101
  223. package/packs/react/agents/reviewer.md +0 -252
  224. package/packs/react/agents-lite/builder.md +0 -65
  225. package/packs/react/agents-lite/doctor.md +0 -64
  226. package/packs/react/agents-lite/migrator.md +0 -74
  227. package/packs/react/agents-lite/reviewer.md +0 -69
  228. package/packs/react/skills/dev-create-component/SKILL.md +0 -53
  229. package/packs/react/skills/dev-create-hook/SKILL.md +0 -78
  230. package/packs/react/skills/dev-create-module/SKILL.md +0 -51
  231. package/packs/react/skills/dev-create-service/SKILL.md +0 -34
  232. package/packs/react/skills/dev-create-test/SKILL.md +0 -92
  233. package/packs/react/skills/dev-generate-types/SKILL.md +0 -37
  234. package/packs/react/skills/docs-onboard/SKILL.md +0 -42
  235. package/packs/react/skills/migration-migrate-component/SKILL.md +0 -44
  236. package/packs/react/skills/migration-migrate-module/SKILL.md +0 -25
  237. package/packs/react/skills/review-check-architecture/SKILL.md +0 -73
  238. package/packs/react/skills/review-fix-violations/SKILL.md +0 -45
  239. package/packs/react/skills/review-review/SKILL.md +0 -44
  240. package/packs/svelte/ARCHITECTURE.md +0 -975
  241. package/packs/svelte/CLAUDE.md +0 -102
  242. package/packs/svelte/agents/builder.md +0 -114
  243. package/packs/svelte/agents/doctor.md +0 -174
  244. package/packs/svelte/agents/migrator.md +0 -101
  245. package/packs/svelte/agents/reviewer.md +0 -238
  246. package/packs/svelte/agents-lite/builder.md +0 -66
  247. package/packs/svelte/agents-lite/doctor.md +0 -67
  248. package/packs/svelte/agents-lite/migrator.md +0 -82
  249. package/packs/svelte/agents-lite/reviewer.md +0 -70
  250. package/packs/svelte/skills/dev-create-component/SKILL.md +0 -77
  251. package/packs/svelte/skills/dev-create-module/SKILL.md +0 -59
  252. package/packs/svelte/skills/dev-create-service/SKILL.md +0 -35
  253. package/packs/svelte/skills/dev-create-store/SKILL.md +0 -94
  254. package/packs/svelte/skills/dev-create-test/SKILL.md +0 -98
  255. package/packs/svelte/skills/dev-generate-types/SKILL.md +0 -37
  256. package/packs/svelte/skills/docs-onboard/SKILL.md +0 -47
  257. package/packs/svelte/skills/migration-migrate-component/SKILL.md +0 -51
  258. package/packs/svelte/skills/migration-migrate-module/SKILL.md +0 -25
  259. package/packs/svelte/skills/review-check-architecture/SKILL.md +0 -79
  260. package/packs/svelte/skills/review-fix-violations/SKILL.md +0 -47
  261. package/packs/svelte/skills/review-review/SKILL.md +0 -45
  262. package/packs/vue/ARCHITECTURE.md +0 -798
  263. package/packs/vue/CLAUDE.md +0 -102
  264. package/packs/vue/agents/builder.md +0 -112
  265. package/packs/vue/agents/doctor.md +0 -185
  266. package/packs/vue/agents/migrator.md +0 -101
  267. package/packs/vue/agents/reviewer.md +0 -249
  268. package/packs/vue/agents-lite/builder.md +0 -65
  269. package/packs/vue/agents-lite/doctor.md +0 -63
  270. package/packs/vue/agents-lite/migrator.md +0 -73
  271. package/packs/vue/agents-lite/reviewer.md +0 -68
  272. package/packs/vue/skills/dev-create-component/SKILL.md +0 -58
  273. package/packs/vue/skills/dev-create-composable/SKILL.md +0 -31
  274. package/packs/vue/skills/dev-create-module/SKILL.md +0 -50
  275. package/packs/vue/skills/dev-create-service/SKILL.md +0 -34
  276. package/packs/vue/skills/dev-create-test/SKILL.md +0 -62
  277. package/packs/vue/skills/dev-generate-types/SKILL.md +0 -37
  278. package/packs/vue/skills/docs-onboard/SKILL.md +0 -42
  279. package/packs/vue/skills/migration-migrate-component/SKILL.md +0 -41
  280. package/packs/vue/skills/migration-migrate-module/SKILL.md +0 -25
  281. package/packs/vue/skills/review-check-architecture/SKILL.md +0 -73
  282. package/packs/vue/skills/review-fix-violations/SKILL.md +0 -42
  283. package/packs/vue/skills/review-review/SKILL.md +0 -43
  284. package/skills/audit/SKILL.md +0 -231
  285. package/skills/autofix/SKILL.md +0 -166
  286. package/skills/autopilot/SKILL.md +0 -286
  287. package/skills/brainstorm/SKILL.md +0 -298
  288. package/skills/checkpoint/SKILL.md +0 -217
  289. package/skills/codereview/SKILL.md +0 -268
  290. package/skills/commit/SKILL.md +0 -150
  291. package/skills/copywriting/SKILL.md +0 -218
  292. package/skills/cro/SKILL.md +0 -234
  293. package/skills/debug/SKILL.md +0 -210
  294. package/skills/design-review/SKILL.md +0 -217
  295. package/skills/discovery/SKILL.md +0 -218
  296. package/skills/estimate/SKILL.md +0 -154
  297. package/skills/finish/SKILL.md +0 -220
  298. package/skills/grill/SKILL.md +0 -270
  299. package/skills/health/SKILL.md +0 -251
  300. package/skills/improve-architecture/SKILL.md +0 -205
  301. package/skills/learn/SKILL.md +0 -260
  302. package/skills/lint/SKILL.md +0 -126
  303. package/skills/migrate-architecture/SKILL.md +0 -242
  304. package/skills/migrate-framework/SKILL.md +0 -172
  305. package/skills/onboard/SKILL.md +0 -168
  306. package/skills/plan/SKILL.md +0 -141
  307. package/skills/prd/SKILL.md +0 -241
  308. package/skills/recall/SKILL.md +0 -112
  309. package/skills/remember/SKILL.md +0 -108
  310. package/skills/seo-audit/SKILL.md +0 -240
  311. package/skills/tdd/SKILL.md +0 -201
  312. package/skills/tutorial/SKILL.md +0 -346
  313. package/skills/verify/SKILL.md +0 -168
  314. package/skills/worktree/SKILL.md +0 -168
  315. package/skills/write-skill/SKILL.md +0 -225
  316. package/templates/autopilot/PROMPT.md +0 -39
  317. package/templates/autopilot/README.md +0 -122
  318. package/templates/autopilot/devcontainer.json +0 -21
  319. package/templates/industry/ecommerce.md +0 -127
  320. package/templates/industry/fintech.md +0 -161
  321. package/templates/industry/saas.md +0 -134
  322. package/templates/session-memory.json +0 -48
  323. package/templates/skill-template/SKILL.md +0 -90
@@ -1,166 +0,0 @@
1
- ---
2
- name: autofix
3
- description: "Use when you want to automatically triage errors from Sentry (or error logs), cross-reference them against the codebase and open PRs, prioritize by severity, and optionally create fix PRs."
4
- user-invocable: true
5
- argument-hint: "[sentry|logs|--timeframe=24h|--auto-pr]"
6
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
- ---
8
-
9
- # /autofix - Automated Error Triage & Fix
10
-
11
- Pull production errors, check if they're already fixed, prioritize what matters, and ship fixes — all in one command.
12
-
13
- **Target:** $ARGUMENTS
14
-
15
- ## Workflow
16
-
17
- ### Step 1: Detect Error Source
18
-
19
- **If using Sentry**, first inform the user and verify the Sentry CLI is installed:
20
- > "This workflow requires the Sentry CLI. Checking if `sentry-cli` is available..."
21
-
22
- ```bash
23
- sentry-cli --version
24
- ```
25
-
26
- If not installed, stop and instruct: `npm install -g @sentry/cli` or see https://docs.sentry.io/cli/installation/
27
-
28
- Then check which error source is available:
29
-
30
- ```bash
31
- # Check for Sentry
32
- echo $SENTRY_AUTH_TOKEN | head -c 4
33
-
34
- # Check for error log files
35
- ls logs/ error.log *.log 2>/dev/null
36
- ```
37
-
38
- | Source | Detection |
39
- |--------|-----------|
40
- | **Sentry** | `$SENTRY_AUTH_TOKEN` + `$SENTRY_ORG` + `$SENTRY_PROJECT` set |
41
- | **Log files** | `logs/` directory or `*.log` files present |
42
- | **Manual** | User provides error text or screenshot |
43
-
44
- If no source detected, ask user:
45
- > "No error source detected. Set `SENTRY_AUTH_TOKEN`, `SENTRY_ORG`, `SENTRY_PROJECT` for Sentry, or provide error logs."
46
-
47
- ### Step 2: Fetch Errors
48
-
49
- **Sentry mode:**
50
- ```bash
51
- curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
52
- "https://sentry.io/api/0/projects/$SENTRY_ORG/$SENTRY_PROJECT/issues/?query=is:unresolved&statsPeriod=${TIMEFRAME:-24h}&sort=freq"
53
- ```
54
-
55
- **Log mode:**
56
- ```bash
57
- # Extract unique errors from logs
58
- grep -E "(Error|Exception|FATAL|CRITICAL)" logs/*.log | sort -u
59
- ```
60
-
61
- Parse each error: message, stack trace, frequency, timestamp.
62
-
63
- ### Step 3: Cross-Reference
64
-
65
- For each error, run three checks in parallel:
66
-
67
- 1. **Git history** — `git log --since="${TIMEFRAME:-24 hours ago}" --all -- {file}` for recent fixes
68
- 2. **Open PRs** — `gh pr list --state open --search "{error-keyword}"` for in-progress fixes
69
- 3. **Codebase** — `Grep` for the exact error location to verify it still exists
70
-
71
- Classify:
72
- - `FIXED` — Recent commit addresses the error
73
- - `PR_OPEN` — Open PR targets the file/error
74
- - `NEEDS_FIX` — No existing fix
75
-
76
- ### Step 4: Prioritize into 3 Tiers
77
-
78
- | Tier | Criteria | Recommended Action |
79
- |------|----------|-------------------|
80
- | **P0 Critical** | >100 events OR >50 users OR security/data-loss | Fix now, create PR immediately |
81
- | **P1 Important** | >10 events OR >5 users OR broken UX flow | Fix this sprint |
82
- | **P2 Low** | <10 events AND edge-case/cosmetic | Add to backlog |
83
-
84
- For log-based errors without event counts, use recency and frequency in log file.
85
-
86
- ### Step 5: Present Report
87
-
88
- Display the triage to the user:
89
-
90
- ```
91
- ## Autofix Report — {date}
92
-
93
- Period: Last {timeframe}
94
- Source: {sentry|logs}
95
-
96
- ALREADY FIXED (3):
97
- - "Connection timeout" → fixed in abc1234
98
- - "Null ref in CartService" → PR #42 open
99
-
100
- P0 CRITICAL (1):
101
- 1. TypeError in src/api/users.ts:45 — 342 events, 89 users
102
- Root cause: Missing null check on user.profile
103
-
104
- P1 IMPORTANT (2):
105
- 2. UnhandledRejection in src/services/payment.ts:112 — 28 events
106
- 3. RangeError in src/utils/date.ts:67 — 15 events
107
-
108
- P2 LOW (4):
109
- 4-7. [listed with brief descriptions]
110
-
111
- Select issues to fix: [1,2,3] or "all-p0" or "all"
112
- ```
113
-
114
- ### Step 6: Auto-Fix Selected Issues
115
-
116
- For each selected issue:
117
-
118
- 1. Create branch: `fix/autofix-{id}-{short-desc}`
119
- 2. Analyze stack trace + surrounding code (read 50 lines above/below)
120
- 3. Implement fix with proper error handling
121
- 4. Run tests: `npm test` or detected test runner
122
- 5. If `--auto-pr` flag set, create PR automatically:
123
- ```bash
124
- gh pr create --title "fix: {error-title}" --body "..."
125
- ```
126
- 6. Otherwise, show diff and ask user to confirm
127
-
128
- ## Output
129
-
130
- ```markdown
131
- ## /autofix Results
132
-
133
- **Source:** {sentry|logs}
134
- **Period:** {timeframe}
135
- **Triaged:** {n} issues
136
-
137
- | Tier | Count | Fixed | PR Created |
138
- |------|-------|-------|------------|
139
- | P0 | {n} | {n} | {n} |
140
- | P1 | {n} | {n} | {n} |
141
- | P2 | {n} | {n} | {n} |
142
-
143
- ### PRs Created
144
- - `fix/autofix-123-null-check` → PR #45
145
- - `fix/autofix-456-timeout-handler` → PR #46
146
- ```
147
-
148
- ## Anti-Rationalization
149
-
150
- | Excuse | Reality |
151
- |--------|---------|
152
- | "I'll check Sentry later" | Later never comes. Errors compound. Triage now takes 2 minutes. |
153
- | "Low event count = not important" | Low count can mean high severity for specific users. Check `userCount`. |
154
- | "The fix might break something" | A tested fix in a PR is safer than an unhandled production error. |
155
- | "It's already been reported" | Reported != fixed. Check the PR status. |
156
-
157
- ## Rules
158
-
159
- 1. Never store auth tokens in files — environment variables only
160
- 2. Never auto-merge — all PRs require human review
161
- 3. Never resolve/dismiss Sentry issues — only create fixes
162
- 4. Always run the existing test suite before creating a PR
163
- 5. Always include the error source link (Sentry URL or log reference) in PRs
164
- 6. Respect `--timeframe` flag (default: 24h)
165
- 7. If `--auto-pr` is not set, always ask before creating PRs
166
- 8. Group related errors (same root cause) into a single fix when possible
@@ -1,286 +0,0 @@
1
- ---
2
- name: autopilot
3
- description: "Use when you want to iteratively build a feature using a PRD as source of truth, with progress tracking and fresh-context iterations - the Autopilot technique for autonomous development."
4
- user-invocable: true
5
- argument-hint: "[PRD path or description] [--max-iterations=N]"
6
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, TodoWrite
7
- ---
8
-
9
- # /autopilot - Iterative Autonomous Development
10
-
11
- Execute complex features autonomously using the Autopilot technique: PRD as source of truth, progress file for state persistence, and fresh-context iterations to avoid context rot.
12
-
13
- **Target:** $ARGUMENTS
14
-
15
- ## When to Use
16
-
17
- - Features that require 5+ tasks to implement
18
- - Overnight or unattended batch execution
19
- - Migrations (database, framework, architecture)
20
- - Building MVPs from a PRD
21
- - Any task where context rot degrades quality over long sessions
22
- - NOT for: single-file changes (use `@builder`)
23
- - NOT for: subjective design decisions (need human feedback)
24
- - NOT for: tasks without clear completion criteria
25
-
26
- ## Workflow
27
-
28
- ### Step 1: PRD Resolution
29
-
30
- 1. **If argument is a file path** (ends in `.md`): Read it as the PRD
31
- 2. **If argument is a description**: Delegate to `/prd` to generate `docs/PRD-[name].md`
32
- 3. **If PRD already exists** at `.claude/autopilot/progress.md` with a PRD reference: Resume from where it left off
33
-
34
- ```bash
35
- # Check for existing progress
36
- cat .claude/autopilot/progress.md 2>/dev/null
37
- ```
38
-
39
- **BLOCKED** until a PRD file exists and is readable.
40
-
41
- ### Step 2: Task Extraction & Progress Initialization
42
-
43
- 1. **Parse the PRD** for implementable tasks (look for issue breakdown, task lists, or feature sections)
44
- 2. **Create progress file** at `.claude/autopilot/progress.md`:
45
-
46
- ```markdown
47
- # Autopilot Progress
48
-
49
- ## Config
50
- - PRD: [path/to/PRD.md]
51
- - Max iterations: [N, default 10]
52
- - Current iteration: 0
53
- - Status: IN_PROGRESS
54
- - Started: [timestamp]
55
-
56
- ## Tasks
57
- | # | Task | Status | Iteration | Notes |
58
- |---|------|--------|-----------|-------|
59
- | 1 | [task from PRD] | PENDING | - | - |
60
- | 2 | [task from PRD] | PENDING | - | - |
61
- | 3 | [task from PRD] | PENDING | - | - |
62
-
63
- ## Iteration Log
64
- ```
65
-
66
- 3. **Create git restore point:**
67
-
68
- ```bash
69
- git add -A 2>/dev/null
70
- git tag restore-point/ralf-$(date +%Y%m%d-%H%M%S) 2>/dev/null
71
- ```
72
-
73
- 4. **Initialize TodoWrite** with all tasks for live progress tracking.
74
-
75
- ### Step 3: Iteration Loop
76
-
77
- For each iteration until completion:
78
-
79
- #### 3a. Read State
80
- ```
81
- 1. READ the PRD (source of truth - may have been updated)
82
- 2. READ .claude/autopilot/progress.md
83
- 3. IDENTIFY next task with Status = PENDING
84
- 4. If no PENDING tasks remain → go to Step 4 (Completion)
85
- ```
86
-
87
- #### 3b. Execute Task via Fresh-Context Subagent
88
-
89
- **Critical:** Delegate each task to a subagent using the `Agent` tool. This gives the task a fresh context window, preventing context rot.
90
-
91
- ```
92
- Agent(
93
- description: "RALF iteration N - task description",
94
- prompt: "
95
- You are executing a Autopilot task.
96
-
97
- ## PRD (Source of Truth)
98
- [inline PRD content]
99
-
100
- ## Current Progress
101
- [inline progress.md content]
102
-
103
- ## Your Task
104
- Task #N: [task description]
105
-
106
- ## Instructions
107
- 1. Implement this task completely
108
- 2. Follow existing codebase patterns
109
- 3. Run tests if available
110
- 4. Create a git commit: git add -A && git commit -m 'autopilot: task-N - [description]'
111
- 5. Report what you did and what files changed
112
- "
113
- )
114
- ```
115
-
116
- #### 3c. Verify Result
117
-
118
- After the subagent returns:
119
-
120
- ```
121
- 1. CHECK git log for the commit
122
- 2. RUN tests (if test command exists in package.json)
123
- 3. RUN type check (tsc --noEmit, if TypeScript project)
124
- 4. If PASS → mark task DONE in progress.md
125
- 5. If FAIL → retry (max 2 retries per task)
126
- 6. If still FAIL after retries → mark task BLOCKED, add error notes
127
- ```
128
-
129
- #### 3d. Update Progress
130
-
131
- ```markdown
132
- ## Update in progress.md:
133
- - Increment "Current iteration" counter
134
- - Update task status (DONE / BLOCKED)
135
- - Add iteration log entry:
136
-
137
- ### Iteration [N]
138
- - Task: #[X] [description]
139
- - Result: DONE | BLOCKED
140
- - Files changed: [list]
141
- - Notes: [what happened]
142
- ```
143
-
144
- #### 3e. Create Checkpoint
145
-
146
- ```bash
147
- git tag checkpoint/ralf-task-[N] 2>/dev/null
148
- ```
149
-
150
- #### 3f. Check Completion
151
-
152
- ```
153
- - All tasks DONE or BLOCKED? → Exit loop
154
- - Current iteration >= max iterations? → Exit loop
155
- - Otherwise → Continue to next iteration (3a)
156
- ```
157
-
158
- ### Step 4: Completion
159
-
160
- 1. **Update progress.md** status to `COMPLETE` or `MAX_ITERATIONS_REACHED`
161
- 2. **Generate summary report**
162
- 3. **Suggest next steps** (`/verify` for validation, `/finish` for branch finalization)
163
-
164
- ## Progress File Format
165
-
166
- The progress file at `.claude/autopilot/progress.md` is the **state persistence layer** between iterations. It MUST follow this exact format for reliable parsing:
167
-
168
- ```markdown
169
- # Autopilot Progress
170
-
171
- ## Config
172
- - PRD: docs/PRD-feature-name.md
173
- - Max iterations: 10
174
- - Current iteration: 3
175
- - Status: IN_PROGRESS | COMPLETE | MAX_ITERATIONS_REACHED
176
- - Started: 2026-03-16T14:30:00
177
-
178
- ## Tasks
179
- | # | Task | Status | Iteration | Notes |
180
- |---|------|--------|-----------|-------|
181
- | 1 | Create data models | DONE | 1 | Created User, Task models |
182
- | 2 | Implement API endpoints | DONE | 2 | REST endpoints for CRUD |
183
- | 3 | Build frontend components | IN_PROGRESS | 3 | Started TaskList component |
184
- | 4 | Add authentication | PENDING | - | - |
185
- | 5 | Write integration tests | PENDING | - | - |
186
-
187
- ## Iteration Log
188
-
189
- ### Iteration 1
190
- - Task: #1 Create data models
191
- - Result: DONE
192
- - Files: src/models/user.ts, src/models/task.ts
193
- - Notes: Followed existing Prisma schema patterns
194
-
195
- ### Iteration 2
196
- - Task: #2 Implement API endpoints
197
- - Result: DONE
198
- - Files: src/api/users.ts, src/api/tasks.ts
199
- - Notes: RESTful CRUD with validation
200
-
201
- ### Iteration 3
202
- - Task: #3 Build frontend components
203
- - Result: IN_PROGRESS
204
- - Files: src/components/TaskList.tsx
205
- - Notes: Component created, needs styling
206
- ```
207
-
208
- ## Execution Modes
209
-
210
- ### Plugin Mode (Default)
211
-
212
- Runs inside Claude Code using `Agent` tool for fresh-context subagents. Easier to use but doesn't fully reset the outer context window.
213
-
214
- ```
215
- /autopilot docs/PRD-my-feature.md --max-iterations=10
216
- ```
217
-
218
- ### Script Mode (Maximum Performance)
219
-
220
- For the true Autopilot experience with full context reset between iterations, use the bash script:
221
-
222
- ```bash
223
- ./scripts/autopilot.sh docs/PRD-my-feature.md --max-iterations=10 --model=claude-opus-4-6
224
- ```
225
-
226
- The script kills and restarts Claude Code between iterations, giving each iteration a completely fresh context window. Best for:
227
- - Long-running overnight builds
228
- - Complex migrations where context rot is noticeable
229
- - Running inside a DevContainer with `--dangerously-skip-permissions`
230
-
231
- See `templates/autopilot/README.md` for DevContainer setup.
232
-
233
- ## Integration with Specialist Agent
234
-
235
- | Component | How Autopilot Uses It |
236
- |-----------|----------------------|
237
- | `/prd` | Generates the PRD if user provides a description instead of a file |
238
- | `/checkpoint` | Creates restore points and per-task checkpoints |
239
- | `@executor` | Pattern reference for self-healing (max 2 retries) |
240
- | `@builder` | Subagent for implementation tasks |
241
- | `after-task` hook | Fires after each iteration completes |
242
- | TodoWrite | Live progress tracking during plugin mode |
243
-
244
- ## Anti-Rationalization
245
-
246
- | Excuse | Reality |
247
- |--------|---------|
248
- | "I'll just do it in one long session" | Context rot is real. After ~50K tokens, quality degrades measurably. Fresh iterations produce better code. |
249
- | "The PRD is too detailed, I'll wing it" | Vague PRDs produce vague code. The PRD is the contract. If it's wrong, fix the PRD first. |
250
- | "I don't need progress tracking" | You are a goldfish with a notepad. Without progress.md, you'll redo completed work or skip critical tasks. |
251
- | "One more retry will fix it" | After 2 retries, the approach is wrong, not the execution. Mark BLOCKED and move on. A human needs to look at it. |
252
- | "I can combine multiple tasks per iteration" | One task per iteration. Combining tasks creates entangled commits and makes rollback impossible. |
253
- | "Script mode is overkill" | For 3 tasks, maybe. For 10+ tasks or overnight runs, script mode's clean context pays for itself in fewer total iterations. |
254
-
255
- ## Rules
256
-
257
- 1. **One task per iteration** - Never combine tasks. Each iteration handles exactly one task.
258
- 2. **PRD is sacred** - Never modify the PRD during execution. If the PRD is wrong, stop and fix it first.
259
- 3. **Progress file is the single source of state** - All iteration state lives in progress.md. No in-memory state.
260
- 4. **Fresh context per task** - Always delegate to a subagent (plugin mode) or restart Claude (script mode).
261
- 5. **Max 2 retries per task** - After 2 failures, mark BLOCKED and continue with the next task.
262
- 6. **Always checkpoint** - Every successful task gets a git tag. No exceptions.
263
- 7. **Verify before marking DONE** - Run tests/type-check. No "should work" claims.
264
- 8. **Resume-safe** - If interrupted, running `/autopilot` again reads progress.md and continues from where it stopped.
265
-
266
- ## Output
267
-
268
- ```
269
- ──── /autopilot ────
270
- PRD: docs/PRD-[name].md
271
- Mode: Plugin | Script
272
- Max Iterations: N
273
-
274
- [1/N] Task 1: [description]... DONE (iteration 1)
275
- [2/N] Task 2: [description]... DONE (iteration 2)
276
- [3/N] Task 3: [description]... BLOCKED (iteration 3-5, retried 2x)
277
- [4/N] Task 4: [description]... DONE (iteration 6)
278
- [5/N] Task 5: [description]... PENDING
279
-
280
- Status: IN_PROGRESS | COMPLETE | MAX_ITERATIONS_REACHED
281
- Iterations used: X/N
282
- Tasks: Y DONE, Z BLOCKED, W PENDING
283
- Progress: .claude/autopilot/progress.md
284
-
285
- ──── Next: /verify or /finish ────
286
- ```