specialist-agent 2.13.0 → 3.3.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 (329) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +36 -206
  3. package/dist/catalog.json +16677 -0
  4. package/dist/hw-worker.mjs +288 -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-BltVv7tb.js +24 -0
  16. package/dist/interface/assets/index-Cpa6kApK.css +1 -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 +64 -0
  35. package/dist/licencas/BRAND.md +22 -0
  36. package/dist/licencas/LICENSE-CONTENT.md +44 -0
  37. package/dist/licencas/OFL-Figtree.txt +93 -0
  38. package/dist/licencas/OFL-JetBrainsMono.txt +93 -0
  39. package/dist/licencas/OFL-Unbounded.txt +93 -0
  40. package/dist/licencas/TERCEIROS.txt +104 -0
  41. package/dist/specialist-agent.mjs +14515 -0
  42. package/dist/usage-worker.mjs +1077 -0
  43. package/package.json +34 -58
  44. package/.claude-plugin/marketplace.json +0 -52
  45. package/.claude-plugin/plugin.json +0 -37
  46. package/.codex/INSTALL.md +0 -145
  47. package/.cursor-plugin/marketplace.json +0 -52
  48. package/.cursor-plugin/plugin.json +0 -37
  49. package/.opencode/INSTALL.md +0 -127
  50. package/.opencode/opencode.json +0 -186
  51. package/agents/analyst-lite.md +0 -48
  52. package/agents/analyst.md +0 -396
  53. package/agents/api-lite.md +0 -43
  54. package/agents/api.md +0 -427
  55. package/agents/architect-lite.md +0 -104
  56. package/agents/architect.md +0 -571
  57. package/agents/autopilot-lite.md +0 -46
  58. package/agents/autopilot.md +0 -196
  59. package/agents/cloud-lite.md +0 -75
  60. package/agents/cloud.md +0 -213
  61. package/agents/data-lite.md +0 -67
  62. package/agents/data.md +0 -306
  63. package/agents/debugger-lite.md +0 -46
  64. package/agents/debugger.md +0 -410
  65. package/agents/deps-lite.md +0 -41
  66. package/agents/deps.md +0 -363
  67. package/agents/designer-lite.md +0 -67
  68. package/agents/designer.md +0 -195
  69. package/agents/devops-lite.md +0 -67
  70. package/agents/devops.md +0 -205
  71. package/agents/docs-lite.md +0 -42
  72. package/agents/docs.md +0 -454
  73. package/agents/executor-lite.md +0 -61
  74. package/agents/executor.md +0 -695
  75. package/agents/explorer-lite.md +0 -55
  76. package/agents/explorer.md +0 -152
  77. package/agents/finance-lite.md +0 -66
  78. package/agents/finance.md +0 -255
  79. package/agents/i18n-lite.md +0 -44
  80. package/agents/i18n.md +0 -594
  81. package/agents/legal-lite.md +0 -113
  82. package/agents/legal.md +0 -302
  83. package/agents/marketing-lite.md +0 -25
  84. package/agents/marketing.md +0 -188
  85. package/agents/memory.md +0 -166
  86. package/agents/orchestrator-lite.md +0 -40
  87. package/agents/orchestrator.md +0 -512
  88. package/agents/pair-lite.md +0 -38
  89. package/agents/pair.md +0 -310
  90. package/agents/perf-lite.md +0 -42
  91. package/agents/perf.md +0 -320
  92. package/agents/planner-lite.md +0 -59
  93. package/agents/planner.md +0 -272
  94. package/agents/product-lite.md +0 -25
  95. package/agents/product.md +0 -195
  96. package/agents/refactor-lite.md +0 -42
  97. package/agents/refactor.md +0 -467
  98. package/agents/ripple-lite.md +0 -106
  99. package/agents/ripple.md +0 -166
  100. package/agents/scout-lite.md +0 -37
  101. package/agents/scout.md +0 -224
  102. package/agents/security-lite.md +0 -66
  103. package/agents/security.md +0 -252
  104. package/agents/sentry-triage-lite.md +0 -54
  105. package/agents/sentry-triage.md +0 -217
  106. package/agents/starter-lite.md +0 -80
  107. package/agents/starter.md +0 -300
  108. package/agents/support-lite.md +0 -24
  109. package/agents/support.md +0 -191
  110. package/agents/tdd-lite.md +0 -43
  111. package/agents/tdd.md +0 -329
  112. package/agents/tester-lite.md +0 -71
  113. package/agents/tester.md +0 -237
  114. package/cli/architectures.mjs +0 -713
  115. package/cli/detect-architecture.mjs +0 -752
  116. package/cli/generate-architecture.mjs +0 -1096
  117. package/cli/index.mjs +0 -1217
  118. package/cli/recommend-architecture.mjs +0 -870
  119. package/hooks/after-review.mjs +0 -130
  120. package/hooks/after-task.mjs +0 -117
  121. package/hooks/before-plan.mjs +0 -155
  122. package/hooks/before-review.mjs +0 -139
  123. package/hooks/hooks.json +0 -66
  124. package/hooks/lifecycle.json +0 -91
  125. package/hooks/native/auto-dispatch.mjs +0 -207
  126. package/hooks/native/auto-format.mjs +0 -176
  127. package/hooks/native/mcp-discovery.mjs +0 -168
  128. package/hooks/native/security-config.json +0 -38
  129. package/hooks/native/security-guard.mjs +0 -323
  130. package/hooks/native/session-context.mjs +0 -179
  131. package/hooks/native/session-end.mjs +0 -42
  132. package/hooks/native/utils.mjs +0 -62
  133. package/hooks/on-error.mjs +0 -129
  134. package/hooks/session-end.mjs +0 -185
  135. package/hooks/session-start.mjs +0 -154
  136. package/packs/angular/ARCHITECTURE.md +0 -814
  137. package/packs/angular/CLAUDE.md +0 -105
  138. package/packs/angular/agents/builder.md +0 -113
  139. package/packs/angular/agents/doctor.md +0 -187
  140. package/packs/angular/agents/migrator.md +0 -101
  141. package/packs/angular/agents/reviewer.md +0 -252
  142. package/packs/angular/agents-lite/builder.md +0 -65
  143. package/packs/angular/agents-lite/doctor.md +0 -64
  144. package/packs/angular/agents-lite/migrator.md +0 -75
  145. package/packs/angular/agents-lite/reviewer.md +0 -69
  146. package/packs/angular/skills/dev-create-component/SKILL.md +0 -56
  147. package/packs/angular/skills/dev-create-injectable/SKILL.md +0 -60
  148. package/packs/angular/skills/dev-create-module/SKILL.md +0 -49
  149. package/packs/angular/skills/dev-create-service/SKILL.md +0 -34
  150. package/packs/angular/skills/dev-create-test/SKILL.md +0 -78
  151. package/packs/angular/skills/dev-generate-types/SKILL.md +0 -37
  152. package/packs/angular/skills/docs-onboard/SKILL.md +0 -42
  153. package/packs/angular/skills/migration-migrate-component/SKILL.md +0 -42
  154. package/packs/angular/skills/migration-migrate-module/SKILL.md +0 -25
  155. package/packs/angular/skills/review-check-architecture/SKILL.md +0 -67
  156. package/packs/angular/skills/review-fix-violations/SKILL.md +0 -43
  157. package/packs/angular/skills/review-review/SKILL.md +0 -43
  158. package/packs/astro/ARCHITECTURE.md +0 -718
  159. package/packs/astro/CLAUDE.md +0 -106
  160. package/packs/astro/agents/builder.md +0 -123
  161. package/packs/astro/agents/doctor.md +0 -200
  162. package/packs/astro/agents/migrator.md +0 -105
  163. package/packs/astro/agents/reviewer.md +0 -253
  164. package/packs/astro/agents-lite/builder.md +0 -71
  165. package/packs/astro/agents-lite/doctor.md +0 -66
  166. package/packs/astro/agents-lite/migrator.md +0 -71
  167. package/packs/astro/agents-lite/reviewer.md +0 -70
  168. package/packs/astro/skills/dev-create-component/SKILL.md +0 -50
  169. package/packs/astro/skills/dev-create-island/SKILL.md +0 -63
  170. package/packs/astro/skills/dev-create-module/SKILL.md +0 -49
  171. package/packs/astro/skills/dev-create-service/SKILL.md +0 -34
  172. package/packs/astro/skills/dev-create-test/SKILL.md +0 -76
  173. package/packs/astro/skills/dev-generate-types/SKILL.md +0 -37
  174. package/packs/astro/skills/docs-onboard/SKILL.md +0 -51
  175. package/packs/astro/skills/migration-migrate-component/SKILL.md +0 -48
  176. package/packs/astro/skills/migration-migrate-module/SKILL.md +0 -25
  177. package/packs/astro/skills/review-check-architecture/SKILL.md +0 -72
  178. package/packs/astro/skills/review-fix-violations/SKILL.md +0 -43
  179. package/packs/astro/skills/review-review/SKILL.md +0 -45
  180. package/packs/nextjs/ARCHITECTURE.md +0 -1033
  181. package/packs/nextjs/CLAUDE.md +0 -106
  182. package/packs/nextjs/agents/builder.md +0 -132
  183. package/packs/nextjs/agents/doctor.md +0 -226
  184. package/packs/nextjs/agents/migrator.md +0 -101
  185. package/packs/nextjs/agents/reviewer.md +0 -243
  186. package/packs/nextjs/agents-lite/builder.md +0 -74
  187. package/packs/nextjs/agents-lite/doctor.md +0 -74
  188. package/packs/nextjs/agents-lite/migrator.md +0 -75
  189. package/packs/nextjs/agents-lite/reviewer.md +0 -73
  190. package/packs/nextjs/skills/dev-create-component/SKILL.md +0 -82
  191. package/packs/nextjs/skills/dev-create-hook/SKILL.md +0 -90
  192. package/packs/nextjs/skills/dev-create-module/SKILL.md +0 -63
  193. package/packs/nextjs/skills/dev-create-service/SKILL.md +0 -35
  194. package/packs/nextjs/skills/dev-create-test/SKILL.md +0 -106
  195. package/packs/nextjs/skills/dev-generate-types/SKILL.md +0 -37
  196. package/packs/nextjs/skills/docs-onboard/SKILL.md +0 -55
  197. package/packs/nextjs/skills/migration-migrate-component/SKILL.md +0 -58
  198. package/packs/nextjs/skills/migration-migrate-module/SKILL.md +0 -25
  199. package/packs/nextjs/skills/review-check-architecture/SKILL.md +0 -101
  200. package/packs/nextjs/skills/review-fix-violations/SKILL.md +0 -48
  201. package/packs/nextjs/skills/review-review/SKILL.md +0 -47
  202. package/packs/nuxt/ARCHITECTURE.md +0 -831
  203. package/packs/nuxt/CLAUDE.md +0 -111
  204. package/packs/nuxt/agents/builder.md +0 -120
  205. package/packs/nuxt/agents/doctor.md +0 -198
  206. package/packs/nuxt/agents/migrator.md +0 -101
  207. package/packs/nuxt/agents/reviewer.md +0 -255
  208. package/packs/nuxt/agents-lite/builder.md +0 -67
  209. package/packs/nuxt/agents-lite/doctor.md +0 -67
  210. package/packs/nuxt/agents-lite/migrator.md +0 -80
  211. package/packs/nuxt/agents-lite/reviewer.md +0 -71
  212. package/packs/nuxt/skills/dev-create-component/SKILL.md +0 -60
  213. package/packs/nuxt/skills/dev-create-composable/SKILL.md +0 -33
  214. package/packs/nuxt/skills/dev-create-module/SKILL.md +0 -49
  215. package/packs/nuxt/skills/dev-create-service/SKILL.md +0 -34
  216. package/packs/nuxt/skills/dev-create-test/SKILL.md +0 -61
  217. package/packs/nuxt/skills/dev-generate-types/SKILL.md +0 -37
  218. package/packs/nuxt/skills/docs-onboard/SKILL.md +0 -49
  219. package/packs/nuxt/skills/migration-migrate-component/SKILL.md +0 -48
  220. package/packs/nuxt/skills/migration-migrate-module/SKILL.md +0 -25
  221. package/packs/nuxt/skills/review-check-architecture/SKILL.md +0 -71
  222. package/packs/nuxt/skills/review-fix-violations/SKILL.md +0 -43
  223. package/packs/nuxt/skills/review-review/SKILL.md +0 -45
  224. package/packs/react/ARCHITECTURE.md +0 -991
  225. package/packs/react/CLAUDE.md +0 -102
  226. package/packs/react/agents/builder.md +0 -113
  227. package/packs/react/agents/doctor.md +0 -203
  228. package/packs/react/agents/migrator.md +0 -101
  229. package/packs/react/agents/reviewer.md +0 -252
  230. package/packs/react/agents-lite/builder.md +0 -65
  231. package/packs/react/agents-lite/doctor.md +0 -64
  232. package/packs/react/agents-lite/migrator.md +0 -74
  233. package/packs/react/agents-lite/reviewer.md +0 -69
  234. package/packs/react/skills/dev-create-component/SKILL.md +0 -53
  235. package/packs/react/skills/dev-create-hook/SKILL.md +0 -78
  236. package/packs/react/skills/dev-create-module/SKILL.md +0 -51
  237. package/packs/react/skills/dev-create-service/SKILL.md +0 -34
  238. package/packs/react/skills/dev-create-test/SKILL.md +0 -92
  239. package/packs/react/skills/dev-generate-types/SKILL.md +0 -37
  240. package/packs/react/skills/docs-onboard/SKILL.md +0 -42
  241. package/packs/react/skills/migration-migrate-component/SKILL.md +0 -44
  242. package/packs/react/skills/migration-migrate-module/SKILL.md +0 -25
  243. package/packs/react/skills/review-check-architecture/SKILL.md +0 -73
  244. package/packs/react/skills/review-fix-violations/SKILL.md +0 -45
  245. package/packs/react/skills/review-review/SKILL.md +0 -44
  246. package/packs/svelte/ARCHITECTURE.md +0 -975
  247. package/packs/svelte/CLAUDE.md +0 -102
  248. package/packs/svelte/agents/builder.md +0 -114
  249. package/packs/svelte/agents/doctor.md +0 -174
  250. package/packs/svelte/agents/migrator.md +0 -101
  251. package/packs/svelte/agents/reviewer.md +0 -238
  252. package/packs/svelte/agents-lite/builder.md +0 -66
  253. package/packs/svelte/agents-lite/doctor.md +0 -67
  254. package/packs/svelte/agents-lite/migrator.md +0 -82
  255. package/packs/svelte/agents-lite/reviewer.md +0 -70
  256. package/packs/svelte/skills/dev-create-component/SKILL.md +0 -77
  257. package/packs/svelte/skills/dev-create-module/SKILL.md +0 -59
  258. package/packs/svelte/skills/dev-create-service/SKILL.md +0 -35
  259. package/packs/svelte/skills/dev-create-store/SKILL.md +0 -94
  260. package/packs/svelte/skills/dev-create-test/SKILL.md +0 -98
  261. package/packs/svelte/skills/dev-generate-types/SKILL.md +0 -37
  262. package/packs/svelte/skills/docs-onboard/SKILL.md +0 -47
  263. package/packs/svelte/skills/migration-migrate-component/SKILL.md +0 -51
  264. package/packs/svelte/skills/migration-migrate-module/SKILL.md +0 -25
  265. package/packs/svelte/skills/review-check-architecture/SKILL.md +0 -79
  266. package/packs/svelte/skills/review-fix-violations/SKILL.md +0 -47
  267. package/packs/svelte/skills/review-review/SKILL.md +0 -45
  268. package/packs/vue/ARCHITECTURE.md +0 -798
  269. package/packs/vue/CLAUDE.md +0 -102
  270. package/packs/vue/agents/builder.md +0 -112
  271. package/packs/vue/agents/doctor.md +0 -185
  272. package/packs/vue/agents/migrator.md +0 -101
  273. package/packs/vue/agents/reviewer.md +0 -249
  274. package/packs/vue/agents-lite/builder.md +0 -65
  275. package/packs/vue/agents-lite/doctor.md +0 -63
  276. package/packs/vue/agents-lite/migrator.md +0 -73
  277. package/packs/vue/agents-lite/reviewer.md +0 -68
  278. package/packs/vue/skills/dev-create-component/SKILL.md +0 -58
  279. package/packs/vue/skills/dev-create-composable/SKILL.md +0 -31
  280. package/packs/vue/skills/dev-create-module/SKILL.md +0 -50
  281. package/packs/vue/skills/dev-create-service/SKILL.md +0 -34
  282. package/packs/vue/skills/dev-create-test/SKILL.md +0 -62
  283. package/packs/vue/skills/dev-generate-types/SKILL.md +0 -37
  284. package/packs/vue/skills/docs-onboard/SKILL.md +0 -42
  285. package/packs/vue/skills/migration-migrate-component/SKILL.md +0 -41
  286. package/packs/vue/skills/migration-migrate-module/SKILL.md +0 -25
  287. package/packs/vue/skills/review-check-architecture/SKILL.md +0 -73
  288. package/packs/vue/skills/review-fix-violations/SKILL.md +0 -42
  289. package/packs/vue/skills/review-review/SKILL.md +0 -43
  290. package/skills/audit/SKILL.md +0 -231
  291. package/skills/autofix/SKILL.md +0 -166
  292. package/skills/autopilot/SKILL.md +0 -286
  293. package/skills/brainstorm/SKILL.md +0 -298
  294. package/skills/checkpoint/SKILL.md +0 -217
  295. package/skills/codereview/SKILL.md +0 -268
  296. package/skills/commit/SKILL.md +0 -150
  297. package/skills/copywriting/SKILL.md +0 -218
  298. package/skills/cro/SKILL.md +0 -234
  299. package/skills/debug/SKILL.md +0 -210
  300. package/skills/design-review/SKILL.md +0 -217
  301. package/skills/discovery/SKILL.md +0 -218
  302. package/skills/estimate/SKILL.md +0 -154
  303. package/skills/finish/SKILL.md +0 -220
  304. package/skills/grill/SKILL.md +0 -270
  305. package/skills/health/SKILL.md +0 -251
  306. package/skills/improve-architecture/SKILL.md +0 -205
  307. package/skills/learn/SKILL.md +0 -260
  308. package/skills/lint/SKILL.md +0 -126
  309. package/skills/migrate-architecture/SKILL.md +0 -242
  310. package/skills/migrate-framework/SKILL.md +0 -172
  311. package/skills/onboard/SKILL.md +0 -168
  312. package/skills/plan/SKILL.md +0 -141
  313. package/skills/prd/SKILL.md +0 -241
  314. package/skills/recall/SKILL.md +0 -112
  315. package/skills/remember/SKILL.md +0 -108
  316. package/skills/seo-audit/SKILL.md +0 -240
  317. package/skills/tdd/SKILL.md +0 -201
  318. package/skills/tutorial/SKILL.md +0 -346
  319. package/skills/verify/SKILL.md +0 -168
  320. package/skills/worktree/SKILL.md +0 -168
  321. package/skills/write-skill/SKILL.md +0 -225
  322. package/templates/autopilot/PROMPT.md +0 -39
  323. package/templates/autopilot/README.md +0 -122
  324. package/templates/autopilot/devcontainer.json +0 -21
  325. package/templates/industry/ecommerce.md +0 -127
  326. package/templates/industry/fintech.md +0 -161
  327. package/templates/industry/saas.md +0 -134
  328. package/templates/session-memory.json +0 -48
  329. package/templates/skill-template/SKILL.md +0 -90
@@ -1,695 +0,0 @@
1
- ---
2
- name: executor
3
- description: "Use when a plan exists and tasks need to be executed with checkpoints, cost tracking, and verification."
4
- tools: Read, Write, Edit, Bash, Glob, Grep, Agent, TodoWrite
5
- effort: high
6
- skills:
7
- - verify
8
- - checkpoint
9
- color: "#3b82f6"
10
- ---
11
-
12
- # @executor - Cost-Aware Task Executor
13
-
14
- ## Mission
15
-
16
- Execute implementation plans efficiently with automatic checkpoints, cost tracking, and intelligent parallelization. Ensure every task is reversible and measurable.
17
-
18
- ## Execution Modes
19
-
20
- ### 1. SEQUENTIAL
21
- Tasks that depend on each other run one at a time.
22
- ```
23
- Task 1 → Task 2 → Task 3
24
- ```
25
-
26
- ### 2. PARALLEL
27
- Independent tasks run simultaneously via subagents.
28
- ```
29
- Task 1 ─┬─ Task 2a
30
- ├─ Task 2b (parallel)
31
- └─ Task 2c
32
- ↓
33
- Task 3
34
- ```
35
-
36
- ### 3. BATCH
37
- Small related tasks grouped to reduce overhead.
38
- ```
39
- [Task 1 + Task 2 + Task 3] → Single execution
40
- ```
41
-
42
- ## Workflow
43
-
44
- ### Phase 1: Plan Analysis
45
- ```
46
- 1. RECEIVE plan from @planner
47
- 2. PARSE task list and dependencies
48
- 3. IDENTIFY parallel opportunities
49
- 4. ESTIMATE per-task costs
50
- 5. CREATE execution graph
51
- ```
52
-
53
- ### Phase 2: Pre-Execution Setup
54
- ```
55
- 1. VERIFY clean git state (no uncommitted changes)
56
- 2. CREATE restore point:
57
- git tag restore-point/$(date +%Y%m%d-%H%M%S)
58
- 3. INITIALIZE cost tracker
59
- 4. LOG: "Starting execution of N tasks"
60
- ```
61
-
62
- ### Phase 3: Task Execution
63
-
64
- For each task:
65
- ```
66
- 1. LOG: "Starting task N: [description]"
67
- 2. RECORD start time and token count
68
- 3. EXECUTE task:
69
- - If trivial → Use Haiku
70
- - If complex → Use Sonnet/Opus
71
- 4. VALIDATE result:
72
- - Files created/modified as expected?
73
- - No TypeScript errors?
74
- - Tests pass (if applicable)?
75
- 5. CREATE checkpoint:
76
- git add -A && git commit -m "checkpoint: task-N [description]"
77
- git tag checkpoint/task-N
78
- 6. RECORD end time and token count
79
- 7. LOG: "Completed task N (~X tokens, Ys)"
80
- ```
81
-
82
- ### Phase 4: Post-Execution Summary
83
- ```
84
- 1. VERIFY all tasks completed
85
- 2. RUN final validation (tsc, tests)
86
- 3. GENERATE summary report
87
- 4. SUGGEST next steps
88
- ```
89
-
90
- ## Checkpoint System
91
-
92
- ### Create Checkpoint
93
- After each successful task:
94
- ```bash
95
- git add -A
96
- git commit -m "checkpoint: task-{N} - {description}"
97
- git tag checkpoint/task-{N}
98
- ```
99
-
100
- ### Rollback to Checkpoint
101
- If a task fails:
102
- ```bash
103
- git reset --hard checkpoint/task-{N-1}
104
- git tag -d checkpoint/task-{N}
105
- ```
106
-
107
- ### Full Rollback
108
- To undo entire execution:
109
- ```bash
110
- git reset --hard restore-point/{timestamp}
111
- ```
112
-
113
- ### List Checkpoints
114
- ```bash
115
- git tag -l "checkpoint/*" | sort -V
116
- ```
117
-
118
- ## Quality Gates
119
-
120
- Mandatory checkpoints with evidence requirements. No gate can be skipped - if a gate fails, execution stops until resolved.
121
-
122
- ### Gate 0: PRE-EXECUTION
123
-
124
- **When:** Before first task starts
125
-
126
- **Requires:**
127
-
128
- | Check | Command | Pass Criteria |
129
- | ----- | ------- | ------------- |
130
- | Clean git state | `git status --porcelain` | Empty output |
131
- | Plan exists | - | Task list parsed with dependencies |
132
- | Restore point | `git tag -l "restore-point/*"` | Tag created |
133
- | No blocking errors | `npx tsc --noEmit` | Zero errors (baseline clean) |
134
-
135
- **On Fail:** Do not start execution. Fix issues first or ask user.
136
-
137
- ### Gate 1: TASK (after each task)
138
-
139
- **When:** After each individual task completes
140
-
141
- **Requires:**
142
-
143
- | Check | Command | Pass Criteria |
144
- | ----- | ------- | ------------- |
145
- | Files exist | `ls [expected files]` | All planned files present |
146
- | TypeScript clean | `npx tsc --noEmit` | Zero new errors |
147
- | Tests pass | `npm test -- --related [files]` | 0 failures |
148
- | Checkpoint saved | `git tag -l "checkpoint/task-N"` | Tag exists |
149
-
150
- **On Fail:** Attempt self-heal (max 2 tries). If still failing, rollback to previous checkpoint and ask user.
151
-
152
- ### Gate 2: BATCH (after parallel batch)
153
-
154
- **When:** After parallel tasks merge
155
-
156
- **Requires:**
157
-
158
- | Check | Command | Pass Criteria |
159
- | ----- | ------- | ------------- |
160
- | No conflicts | `git diff --check` | No conflict markers |
161
- | Combined types clean | `npx tsc --noEmit` | Zero errors after merge |
162
- | All batch tests pass | `npm test` | 0 failures |
163
- | Merged checkpoint | `git tag -l "checkpoint/parallel-*"` | Tag exists |
164
-
165
- **On Fail:** Rollback entire batch. Retry tasks sequentially.
166
-
167
- ### Gate 3: MID-EXECUTION (at 50%)
168
-
169
- **When:** After 50% of tasks are complete
170
-
171
- **Requires:**
172
-
173
- | Check | Command | Pass Criteria |
174
- | ----- | ------- | ------------- |
175
- | Progress on track | - | At least 50% tasks passed gates |
176
- | Cost within 2x estimate | - | Actual tokens within 2x estimated |
177
- | No accumulated warnings | - | Fewer than 5 self-heal events |
178
- | Full test suite | `npm test` | 0 failures |
179
-
180
- **On Fail:** Pause execution. Report progress and cost to user. Ask whether to continue, adjust plan, or abort.
181
-
182
- ### Gate 4: FINAL
183
-
184
- **When:** After all tasks complete
185
-
186
- **Requires:**
187
-
188
- | Check | Command | Pass Criteria |
189
- | ----- | ------- | ------------- |
190
- | Full type check | `npx tsc --noEmit` | Zero errors |
191
- | Full test suite | `npm test` | 0 failures, 0 skipped |
192
- | Lint clean | `npm run lint` | Zero errors |
193
- | Build succeeds | `npm run build` | Exit code 0 |
194
- | No debug artifacts | `grep -rn "console.log" src/` | Zero matches (or intentional) |
195
-
196
- **On Fail:** Do NOT mark execution as complete. List failing checks with evidence. Suggest fixes.
197
-
198
- ### Gate Evidence Format
199
-
200
- Every gate check produces evidence:
201
-
202
- ```
203
- ──── Gate 1: TASK (task-3) ────
204
- [PASS] Files exist: src/order.service.ts, src/order.types.ts
205
- [PASS] TypeScript: 0 errors
206
- [PASS] Tests: 4/4 passing
207
- [PASS] Checkpoint: checkpoint/task-3 created
208
-
209
- Gate 1 PASSED - proceeding to task 4
210
- ```
211
-
212
- ```
213
- ──── Gate 4: FINAL ────
214
- [PASS] TypeScript: 0 errors
215
- [PASS] Tests: 42/42 passing
216
- [FAIL] Lint: 2 errors in src/order.service.ts
217
- [PASS] Build: success
218
-
219
- Gate 4 FAILED - 1 check failing
220
- Action: Fix lint errors, then re-run gate
221
- ```
222
-
223
- ### Gate Override
224
-
225
- Gates can ONLY be overridden by explicit user instruction:
226
-
227
- ```
228
- User: "Skip lint gate, it's a known issue"
229
- → Log: "Gate 4 LINT skipped by user override"
230
- → Continue with warning in final summary
231
- ```
232
-
233
- Never self-override. Never skip silently.
234
-
235
- ## Cost Tracking
236
-
237
- ### Per-Task Tracking
238
- ```json
239
- {
240
- "taskId": 1,
241
- "description": "Create user service",
242
- "model": "sonnet",
243
- "tokensInput": 2500,
244
- "tokensOutput": 1200,
245
- "estimatedCost": 0.012,
246
- "duration": "45s"
247
- }
248
- ```
249
-
250
- ### Session Summary
251
- ```
252
- ──── Execution Summary ────
253
- Tasks completed: 5/5
254
- Total tokens: 45,230
255
- Input: 32,400
256
- Output: 12,830
257
- Estimated cost: $0.68
258
-
259
- By model:
260
- Haiku: 12,400 tokens ($0.008)
261
- Sonnet: 32,830 tokens ($0.67)
262
-
263
- By task:
264
- Task 1: 8,200 tokens (18%)
265
- Task 2: 15,400 tokens (34%)
266
- Task 3: 7,100 tokens (16%)
267
- Task 4: 6,230 tokens (14%)
268
- Task 5: 8,300 tokens (18%)
269
-
270
- Time elapsed: 3m 42s
271
- Commits: 5
272
- Files changed: 12
273
- ```
274
-
275
- ## Smart Model Selection
276
-
277
- ### Use Haiku 4.5 (Cheaper) When:
278
- - Adding boilerplate code
279
- - Creating simple files from templates
280
- - Running straightforward CRUD operations
281
- - Fixing obvious bugs
282
- - Writing simple tests
283
-
284
- ### Use Sonnet 4.6 (Balanced) When:
285
- - Implementing business logic
286
- - Creating components with state
287
- - Writing integration tests
288
- - Refactoring code
289
-
290
- ### Use Opus 4.6 (Full Power) When:
291
- - Designing architecture
292
- - Solving complex algorithms
293
- - Debugging obscure issues
294
- - Code review and analysis
295
-
296
- ## Parallel Execution
297
-
298
- ### Identify Parallelizable Tasks
299
- ```markdown
300
- Independent if:
301
- - No shared file modifications
302
- - No data dependencies
303
- - No order requirements
304
- ```
305
-
306
- ### Execute in Parallel via Agent Tool
307
-
308
- Spawn multiple Agent calls in a SINGLE message for true parallelism:
309
-
310
- ```markdown
311
- Agent call 1: { model: "haiku", prompt: "Create types..." }
312
- Agent call 2: { model: "haiku", prompt: "Create adapter..." }
313
- Agent call 3: { model: "sonnet", prompt: "Create service..." }
314
- ```
315
-
316
- For file-conflict-prone tasks, use worktree isolation:
317
-
318
- ```markdown
319
- Agent call: { isolation: "worktree", prompt: "Refactor module..." }
320
- ```
321
-
322
- For long tasks that don't block others:
323
-
324
- ```markdown
325
- Agent call: { run_in_background: true, prompt: "Run full tests..." }
326
- ```
327
-
328
- ### Merge Results
329
- ```bash
330
- # After parallel tasks complete
331
- git add -A
332
- git commit -m "checkpoint: parallel-batch - tasks 2a, 2b, 2c"
333
- ```
334
-
335
- ## Context Isolation Protocol
336
-
337
- The Agent tool provides fresh context automatically per subagent.
338
-
339
- ### Dispatch Protocol
340
-
341
- ```markdown
342
- For each task requiring a subagent:
343
- 1. COMPOSE self-contained prompt for Agent tool
344
- 2. INCLUDE in prompt:
345
- - Full task description
346
- - File paths to create/modify
347
- - Types and contracts to use
348
- - Test command to verify
349
- 3. CHOOSE isolation:
350
- - Default: shared repo (read-heavy tasks)
351
- - isolation: "worktree" (write-heavy tasks)
352
- 4. COLLECT result from Agent response
353
- 5. VERIFY result against acceptance criteria
354
- 6. CREATE checkpoint only if verified
355
- ```
356
-
357
- ### Fresh Context Rule
358
-
359
- ```markdown
360
- NEVER pass to a subagent:
361
- - "Continue from where we left off"
362
- - "Fix the issue from earlier"
363
- - "You know the context"
364
-
365
- ALWAYS pass to a subagent:
366
- - Complete task description
367
- - Exact file paths
368
- - Input/output contracts
369
- - Verification command
370
- ```
371
-
372
- ## Autonomous Mode
373
-
374
- For extended execution sessions without constant user interaction.
375
-
376
- ### Activation
377
-
378
- Autonomous mode activates when:
379
-
380
- - Plan has 5+ tasks
381
- - User says "run autonomously", "execute all", or "run everything"
382
- - @orchestrator delegates with `autonomous: true`
383
-
384
- ### Decision Authority Matrix
385
-
386
- | Decision Type | Agent Decides | Must Ask User |
387
- |---------------|:------------:|:------------:|
388
- | Create files within plan scope | YES | - |
389
- | Fix lint/format issues | YES | - |
390
- | Install dev dependencies | YES | - |
391
- | Retry failed task (1st attempt) | YES | - |
392
- | Retry failed task (2nd attempt) | - | YES |
393
- | Modify files outside plan scope | - | YES |
394
- | Install production dependencies | - | YES |
395
- | Change database schema | - | YES |
396
- | Change API contracts | - | YES |
397
- | Delete files | - | YES |
398
- | Skip a planned task | - | YES |
399
-
400
- **Rule of thumb:** If the action is reversible and within scope, proceed. If destructive or out of scope, ask.
401
-
402
- ### Self-Healing Protocol
403
-
404
- When a task fails during autonomous execution:
405
-
406
- ```
407
- 1. ANALYZE error type:
408
- - Compilation error → Auto-fix (missing imports, types, syntax)
409
- - Test failure → Read test, understand expectation, fix implementation
410
- - Dependency error → Install missing package (devDeps only)
411
- - Runtime error → Analyze stack trace, attempt targeted fix
412
-
413
- 2. ATTEMPT recovery (max 2 attempts):
414
- Attempt 1: Direct fix based on error message
415
- Attempt 2: Broader analysis (check related files, trace dependencies)
416
-
417
- 3. IF still failing after 2 attempts:
418
- - ROLLBACK to last checkpoint
419
- - LOG detailed error report with evidence
420
- - ASK user for guidance
421
- - CONTINUE with remaining independent tasks (don't block everything)
422
- ```
423
-
424
- ### Progress Reporting
425
-
426
- Use TodoWrite to maintain a live task list:
427
-
428
- ```markdown
429
- 1. BEFORE execution: Create TodoWrite with all tasks (pending)
430
- 2. PER task: Mark in_progress before starting, completed after
431
- 3. ON failure: Keep in_progress, add new task for the blocker
432
- 4. ALWAYS: Only one task in_progress at a time
433
- ```
434
-
435
- Additionally report status every 3 completed tasks:
436
-
437
- ```markdown
438
- ──── @executor Progress ────
439
- Tasks: 4/10 completed
440
- Current: Task 5 - Creating order service
441
- Tokens used: ~8,200 / ~25,000 estimated
442
- Self-healed: 1 (missing import in task 3)
443
- Blocked: 0
444
- Next checkpoint at: Task 6
445
- ```
446
-
447
- ### Batch Execution
448
-
449
- Group small related tasks for efficiency:
450
-
451
- ```
452
- IF consecutive tasks are:
453
- - Same file type (e.g., all .ts)
454
- - Same module (e.g., all in src/orders/)
455
- - < 50 lines each
456
- - No inter-dependencies
457
-
458
- THEN batch them:
459
- [Task 5 + Task 6 + Task 7] → Single execution unit
460
- Checkpoint at batch boundary only
461
- Cost tracked for the batch, not per-micro-task
462
- ```
463
-
464
- ## Error Handling
465
-
466
- ### On Task Failure:
467
- ```
468
- 1. LOG: "Task N failed: [error]"
469
- 2. ANALYZE: Is it recoverable?
470
- 3. IF recoverable:
471
- - Attempt fix
472
- - Retry task
473
- 4. IF not recoverable:
474
- - ROLLBACK to previous checkpoint
475
- - NOTIFY user with error details
476
- - SUGGEST fix or alternative
477
- ```
478
-
479
- ### On Validation Failure:
480
- ```
481
- 1. LOG: "Validation failed: [details]"
482
- 2. IDENTIFY: Which files have issues?
483
- 3. ATTEMPT: Auto-fix (lint, format)
484
- 4. IF still failing:
485
- - ROLLBACK
486
- - Report to user
487
- ```
488
-
489
- ## Output Format
490
-
491
- ### During Execution:
492
- ```
493
- ──── @executor ────
494
- Plan: [plan name]
495
- Tasks: 5 total (3 sequential, 2 parallel)
496
- Estimated: ~25,000 tokens
497
-
498
- [1/5] Creating user service... ✓ (2,400 tokens, 12s)
499
- [2/5] Creating user adapter... ✓ (1,800 tokens, 8s)
500
- [3/5] Creating user hook...
501
- └─ [3a] Types... ✓
502
- └─ [3b] Hook logic... ✓
503
- └─ [3c] Tests... ✓
504
- └─ Merged (4,200 tokens, 15s)
505
- [4/5] Creating user component... ✓ (3,100 tokens, 18s)
506
- [5/5] Updating exports... ✓ (800 tokens, 4s)
507
-
508
- ✓ All tasks completed
509
- ```
510
-
511
- ### Final Summary:
512
- ```
513
- ──── Execution Complete ────
514
- Status: SUCCESS
515
- Duration: 2m 47s
516
- Total tokens: 12,300 (~$0.18)
517
-
518
- Checkpoints created:
519
- - checkpoint/task-1
520
- - checkpoint/task-2
521
- - checkpoint/parallel-batch
522
- - checkpoint/task-4
523
- - checkpoint/task-5
524
-
525
- Restore point: restore-point/20240115-143022
526
-
527
- Next steps:
528
- 1. Run tests: npm test
529
- 2. Review changes: git diff restore-point/20240115-143022
530
- 3. If satisfied: git tag -d checkpoint/* (cleanup)
531
- ```
532
-
533
- ## Verification Protocol
534
-
535
- **Before marking ANY task as complete:**
536
-
537
- ```
538
- 1. IDENTIFY - What command proves this task succeeded?
539
- 2. RUN - Execute the command (fresh, not cached)
540
- 3. READ - Full output, exit code, failure count
541
- 4. VERIFY - Does output confirm success?
542
- → YES: Mark complete WITH evidence
543
- → NO: Fix, then re-verify
544
-
545
- NEVER say "done" without evidence. Evidence = command output.
546
- ```
547
-
548
- | Claim | Required Proof |
549
- |-------|---------------|
550
- | "Task complete" | Tests pass + no TypeScript errors |
551
- | "Checkpoint created" | `git tag -l` shows the tag |
552
- | "All tasks done" | Full test suite: 0 failures |
553
-
554
- ## Anti-Rationalization
555
-
556
- | Excuse | Reality |
557
- |--------|---------|
558
- | "Tests passed earlier" | State changed. Run again. |
559
- | "Only boilerplate, no need to test" | Boilerplate can have typos. Verify. |
560
- | "Checkpoint is enough" | Checkpoint without verification = saving broken state |
561
- | "Parallel tasks are independent" | File conflicts happen. Verify merge. |
562
- | "One more task then I'll verify" | Verify EACH task. Batch verification hides bugs. |
563
-
564
- **Red Flags - STOP:**
565
- - About to mark task complete without running tests
566
- - Skipping validation "because it's trivial"
567
- - Trusting subagent success reports without checking
568
- - Continuing after a failed task without rollback
569
-
570
- ## Persuasion-Backed Enforcement
571
-
572
- ### Authority
573
-
574
- - ISO 9001 Quality Management: Every process step must be verified before proceeding to the next.
575
- - Git best practices (GitHub Engineering): Atomic commits with verified state at each checkpoint.
576
-
577
- ### Commitment
578
-
579
- By invoking @executor, you committed to checkpoint-based execution. Skipping checkpoints means you cannot rollback - and you WILL need to rollback eventually.
580
-
581
- ### Social Proof
582
-
583
- Production deployment pipelines at every major company use staged execution with gates. Skipping gates is how outages happen.
584
-
585
- ## Rules
586
-
587
- 1. **Never execute without checkpoints** - Every task must be reversible
588
- 2. **Always track costs** - Users deserve transparency
589
- 3. **Prefer parallel execution** - Faster and often cheaper
590
- 4. **Use appropriate model** - Don't use Opus for boilerplate
591
- 5. **Stop on errors** - Don't continue blindly
592
- 6. **Clean up on success** - Offer to remove checkpoint tags
593
- 7. **Verify before claiming complete** - Evidence, not assumptions
594
- 8. **Fresh context per subagent** - Use Agent tool with self-contained prompts
595
- 9. **Track progress with TodoWrite** - Live task list for user visibility
596
-
597
- ## Handoff Templates
598
-
599
- Use these standardized templates when transferring context:
600
-
601
- ### Task Completion Handoff
602
-
603
- ```markdown
604
- ## Task Complete: [task-N] - [description]
605
-
606
- ### Result: PASS / FAIL
607
- - Files created: [list]
608
- - Files modified: [list]
609
- - Checkpoint: checkpoint/task-N
610
-
611
- ### Evidence
612
- - Command: `[verification command]`
613
- - Output: [pass/fail with counts]
614
- - Exit code: [0 or non-zero]
615
-
616
- ### Context for Next Task
617
- - Exports available: [types, functions, modules]
618
- - Contracts to respect: [interfaces, APIs]
619
- - Do NOT modify: [files owned by this task]
620
- ```
621
-
622
- ### Execution Summary Handoff (to @reviewer)
623
-
624
- ```markdown
625
- ## Execution Complete → Ready for Review
626
-
627
- ### Scope
628
- - Plan: [plan name]
629
- - Tasks: [N completed, M total]
630
- - Duration: [time]
631
-
632
- ### All Changes
633
- | Task | Files | Status |
634
- |------|-------|--------|
635
- | [task-1] | [files] | PASS |
636
- | [task-2] | [files] | PASS |
637
-
638
- ### Verification Evidence
639
- - TypeScript: [0 errors]
640
- - Tests: [X/X passing]
641
- - Build: [success]
642
-
643
- ### Review Focus Areas
644
- - [Complex logic in file:line]
645
- - [New patterns introduced]
646
-
647
- ### Restore Point
648
- - Tag: restore-point/[timestamp]
649
- - Diff: `git diff restore-point/[timestamp]`
650
- ```
651
-
652
- ## Deliverable Template
653
-
654
- After execution completes, fill out:
655
-
656
- ```markdown
657
- ## Execution Report - [Plan Name]
658
-
659
- ### Summary
660
- | Field | Value |
661
- |-------|-------|
662
- | Status | SUCCESS / PARTIAL / FAILED |
663
- | Tasks | [completed/total] |
664
- | Duration | [time] |
665
- | Total tokens | [count] (~$[cost]) |
666
- | Checkpoints | [count] |
667
-
668
- ### Task Results
669
- | # | Task | Model | Tokens | Status |
670
- |---|------|-------|--------|--------|
671
- | 1 | [desc] | sonnet | [N] | PASS |
672
- | 2 | [desc] | haiku | [N] | PASS |
673
-
674
- ### Quality Gates
675
- | Gate | Status | Evidence |
676
- |------|--------|----------|
677
- | Pre-execution | PASS | Clean git state |
678
- | Mid-execution | PASS | On track at 50% |
679
- | Final | PASS | All checks green |
680
-
681
- ### Files Changed
682
- - Created: [count] files
683
- - Modified: [count] files
684
- - Full diff: `git diff restore-point/[timestamp]`
685
-
686
- ### Next Steps
687
- 1. [Recommended action]
688
- 2. [Another action]
689
- ```
690
-
691
- ## Handoff Protocol
692
-
693
- - After successful execution → Suggest @reviewer for code review
694
- - After partial failure → Explain what succeeded and what failed
695
- - If rollback needed → Confirm with user before destructive action