@lvlup-sw/exarchos 2.4.3 → 2.6.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 (605) hide show
  1. package/.claude-plugin/plugin.json +7 -2
  2. package/AGENTS.md +2 -2
  3. package/README.md +91 -57
  4. package/agents/.gitkeep +0 -0
  5. package/agents/fixer.md +62 -0
  6. package/agents/implementer.md +68 -0
  7. package/agents/reviewer.md +50 -0
  8. package/commands/dogfood.md +31 -0
  9. package/commands/ideate.md +1 -1
  10. package/commands/oneshot.md +178 -0
  11. package/commands/plan.md +1 -1
  12. package/commands/prune.md +90 -0
  13. package/commands/review.md +58 -0
  14. package/dist/exarchos.js +582 -142
  15. package/hooks/hooks.json +8 -0
  16. package/package.json +18 -6
  17. package/scripts/sync-versions.sh +31 -22
  18. package/skills/{brainstorming → claude/brainstorming}/SKILL.md +16 -0
  19. package/skills/{brainstorming → claude/brainstorming}/references/design-template.md +9 -0
  20. package/skills/{cleanup → claude/cleanup}/SKILL.md +6 -0
  21. package/skills/{debug → claude/debug}/SKILL.md +41 -0
  22. package/skills/{debug → claude/debug}/references/hotfix-track.md +12 -49
  23. package/skills/{debug → claude/debug}/references/investigation-checklist.md +3 -3
  24. package/skills/{debug → claude/debug}/references/thorough-track.md +12 -42
  25. package/skills/{delegation → claude/delegation}/SKILL.md +128 -40
  26. package/skills/{delegation → claude/delegation}/references/agent-teams-saga.md +4 -1
  27. package/skills/claude/delegation/references/fix-mode.md +118 -0
  28. package/skills/{delegation → claude/delegation}/references/implementer-prompt.md +29 -1
  29. package/skills/{delegation → claude/delegation}/references/parallel-strategy.md +1 -1
  30. package/skills/{delegation → claude/delegation}/references/state-management.md +33 -0
  31. package/skills/{delegation → claude/delegation}/references/troubleshooting.md +2 -2
  32. package/skills/{delegation → claude/delegation}/references/workflow-steps.md +6 -10
  33. package/skills/{delegation → claude/delegation}/references/worktree-enforcement.md +13 -7
  34. package/skills/claude/dogfood/SKILL.md +235 -0
  35. package/skills/claude/dogfood/references/report-template.md +109 -0
  36. package/skills/claude/dogfood/references/root-cause-patterns.md +227 -0
  37. package/skills/{git-worktrees → claude/git-worktrees}/SKILL.md +6 -9
  38. package/skills/{implementation-planning → claude/implementation-planning}/SKILL.md +32 -27
  39. package/skills/claude/implementation-planning/references/task-template.md +63 -0
  40. package/skills/{implementation-planning → claude/implementation-planning}/references/testing-strategy-guide.md +22 -1
  41. package/skills/{implementation-planning → claude/implementation-planning}/references/worked-example.md +2 -2
  42. package/skills/claude/oneshot-workflow/SKILL.md +468 -0
  43. package/skills/claude/oneshot-workflow/references/choice-state.md +65 -0
  44. package/skills/claude/prune-workflows/SKILL.md +290 -0
  45. package/skills/claude/prune-workflows/references/safeguards.md +74 -0
  46. package/skills/{quality-review → claude/quality-review}/SKILL.md +105 -10
  47. package/skills/{quality-review → claude/quality-review}/references/auto-transition.md +1 -1
  48. package/skills/claude/quality-review/references/axiom-integration.md +135 -0
  49. package/skills/{refactor → claude/refactor}/SKILL.md +32 -39
  50. package/skills/{refactor → claude/refactor}/references/doc-update-checklist.md +2 -3
  51. package/skills/{refactor → claude/refactor}/references/explore-checklist.md +4 -6
  52. package/skills/{refactor → claude/refactor}/references/overhaul-track.md +20 -50
  53. package/skills/{refactor → claude/refactor/references}/phases/polish-implement.md +2 -2
  54. package/skills/{refactor → claude/refactor/references}/phases/polish-validate.md +1 -1
  55. package/skills/{refactor → claude/refactor}/references/polish-track.md +18 -46
  56. package/skills/{shepherd → claude/shepherd}/SKILL.md +42 -10
  57. package/skills/{shepherd → claude/shepherd}/references/fix-strategies.md +1 -2
  58. package/skills/claude/shepherd/references/shepherd-event-schemas.md +56 -0
  59. package/skills/{spec-review → claude/spec-review}/SKILL.md +48 -10
  60. package/skills/{spec-review → claude/spec-review}/references/worked-example.md +1 -1
  61. package/skills/{synthesis → claude/synthesis}/SKILL.md +72 -10
  62. package/skills/{synthesis → claude/synthesis}/references/github-native-stacking.md +3 -4
  63. package/skills/{synthesis → claude/synthesis}/references/synthesis-steps.md +11 -13
  64. package/skills/{workflow-state → claude/workflow-state}/SKILL.md +50 -6
  65. package/skills/{workflow-state → claude/workflow-state}/references/mcp-tool-reference.md +5 -5
  66. package/skills/{workflow-state → claude/workflow-state}/references/phase-transitions.md +28 -3
  67. package/skills/codex/brainstorming/SKILL.md +182 -0
  68. package/skills/codex/brainstorming/references/design-template.md +107 -0
  69. package/skills/codex/brainstorming/references/worked-example.md +58 -0
  70. package/skills/codex/cleanup/SKILL.md +169 -0
  71. package/skills/codex/cleanup/references/merge-verification.md +40 -0
  72. package/skills/codex/debug/SKILL.md +247 -0
  73. package/skills/codex/debug/references/hotfix-track.md +105 -0
  74. package/skills/codex/debug/references/investigation-checklist.md +217 -0
  75. package/skills/codex/debug/references/rca-template.md +150 -0
  76. package/skills/codex/debug/references/state-schema.md +294 -0
  77. package/skills/codex/debug/references/thorough-track.md +171 -0
  78. package/skills/codex/debug/references/triage-questions.md +155 -0
  79. package/skills/codex/debug/references/troubleshooting.md +47 -0
  80. package/skills/codex/delegation/SKILL.md +353 -0
  81. package/skills/codex/delegation/references/adaptive-orchestration.md +31 -0
  82. package/skills/codex/delegation/references/agent-teams-saga.md +254 -0
  83. package/skills/codex/delegation/references/fix-mode.md +118 -0
  84. package/skills/codex/delegation/references/fixer-prompt.md +174 -0
  85. package/skills/codex/delegation/references/implementer-prompt.md +401 -0
  86. package/skills/codex/delegation/references/parallel-strategy.md +124 -0
  87. package/skills/codex/delegation/references/pbt-patterns.md +172 -0
  88. package/skills/codex/delegation/references/pr-fixes-mode.md +155 -0
  89. package/skills/codex/delegation/references/rationalization-refutation.md +15 -0
  90. package/skills/codex/delegation/references/state-management.md +84 -0
  91. package/skills/codex/delegation/references/testing-patterns.md +146 -0
  92. package/skills/codex/delegation/references/troubleshooting.md +109 -0
  93. package/skills/codex/delegation/references/worked-example.md +104 -0
  94. package/skills/codex/delegation/references/workflow-steps.md +131 -0
  95. package/skills/codex/delegation/references/worktree-enforcement.md +71 -0
  96. package/skills/codex/dogfood/SKILL.md +235 -0
  97. package/skills/codex/dogfood/references/report-template.md +109 -0
  98. package/skills/codex/dogfood/references/root-cause-patterns.md +227 -0
  99. package/skills/codex/git-worktrees/SKILL.md +193 -0
  100. package/skills/codex/git-worktrees/references/commands-reference.md +78 -0
  101. package/skills/codex/implementation-planning/SKILL.md +289 -0
  102. package/skills/codex/implementation-planning/references/plan-document-template.md +42 -0
  103. package/skills/codex/implementation-planning/references/rationalization-refutation.md +13 -0
  104. package/skills/codex/implementation-planning/references/spec-tracing-guide.md +51 -0
  105. package/skills/codex/implementation-planning/references/task-template.md +63 -0
  106. package/skills/codex/implementation-planning/references/testing-strategy-guide.md +109 -0
  107. package/skills/codex/implementation-planning/references/worked-example.md +76 -0
  108. package/skills/codex/oneshot-workflow/SKILL.md +468 -0
  109. package/skills/codex/oneshot-workflow/references/choice-state.md +65 -0
  110. package/skills/codex/prune-workflows/SKILL.md +290 -0
  111. package/skills/codex/prune-workflows/references/safeguards.md +74 -0
  112. package/skills/codex/quality-review/SKILL.md +371 -0
  113. package/skills/codex/quality-review/references/auto-transition.md +47 -0
  114. package/skills/codex/quality-review/references/axiom-integration.md +135 -0
  115. package/skills/codex/quality-review/references/code-quality-checklist.md +171 -0
  116. package/skills/codex/quality-review/references/convergence-and-verdict.md +48 -0
  117. package/skills/codex/quality-review/references/gate-execution.md +60 -0
  118. package/skills/codex/quality-review/references/rationalization-refutation.md +13 -0
  119. package/skills/codex/quality-review/references/review-report-template.md +65 -0
  120. package/skills/codex/quality-review/references/security-checklist.md +79 -0
  121. package/skills/codex/quality-review/references/typescript-standards.md +24 -0
  122. package/skills/codex/refactor/SKILL.md +196 -0
  123. package/skills/codex/refactor/references/brief-template.md +81 -0
  124. package/skills/codex/refactor/references/doc-update-checklist.md +113 -0
  125. package/skills/codex/refactor/references/explore-checklist.md +79 -0
  126. package/skills/codex/refactor/references/overhaul-track.md +194 -0
  127. package/skills/codex/refactor/references/phases/auto-chain.md +267 -0
  128. package/skills/codex/refactor/references/phases/brief.md +176 -0
  129. package/skills/codex/refactor/references/phases/explore.md +132 -0
  130. package/skills/codex/refactor/references/phases/overhaul-delegate.md +136 -0
  131. package/skills/codex/refactor/references/phases/overhaul-plan.md +312 -0
  132. package/skills/codex/refactor/references/phases/overhaul-review.md +304 -0
  133. package/skills/codex/refactor/references/phases/polish-implement.md +347 -0
  134. package/skills/codex/refactor/references/phases/polish-validate.md +218 -0
  135. package/skills/codex/refactor/references/phases/update-docs.md +234 -0
  136. package/skills/codex/refactor/references/polish-track.md +152 -0
  137. package/skills/codex/shepherd/SKILL.md +251 -0
  138. package/skills/codex/shepherd/references/assess-checklist.md +170 -0
  139. package/skills/codex/shepherd/references/escalation-criteria.md +53 -0
  140. package/skills/codex/shepherd/references/fix-strategies.md +289 -0
  141. package/skills/codex/shepherd/references/gate-event-emission.md +47 -0
  142. package/skills/codex/shepherd/references/shepherd-event-schemas.md +56 -0
  143. package/skills/codex/spec-review/SKILL.md +294 -0
  144. package/skills/codex/spec-review/references/rationalization-refutation.md +13 -0
  145. package/skills/codex/spec-review/references/review-checklist.md +79 -0
  146. package/skills/codex/spec-review/references/worked-example.md +72 -0
  147. package/skills/codex/synthesis/SKILL.md +217 -0
  148. package/skills/codex/synthesis/references/github-native-stacking.md +135 -0
  149. package/skills/codex/synthesis/references/merge-ordering.md +50 -0
  150. package/skills/codex/synthesis/references/pr-descriptions.md +87 -0
  151. package/skills/codex/synthesis/references/synthesis-steps.md +145 -0
  152. package/skills/codex/synthesis/references/troubleshooting.md +115 -0
  153. package/skills/codex/workflow-state/SKILL.md +254 -0
  154. package/skills/codex/workflow-state/references/mcp-tool-reference.md +89 -0
  155. package/skills/codex/workflow-state/references/phase-transitions.md +206 -0
  156. package/skills/copilot/brainstorming/SKILL.md +182 -0
  157. package/skills/copilot/brainstorming/references/design-template.md +107 -0
  158. package/skills/copilot/brainstorming/references/worked-example.md +58 -0
  159. package/skills/copilot/cleanup/SKILL.md +169 -0
  160. package/skills/copilot/cleanup/references/merge-verification.md +40 -0
  161. package/skills/copilot/debug/SKILL.md +247 -0
  162. package/skills/copilot/debug/references/hotfix-track.md +105 -0
  163. package/skills/copilot/debug/references/investigation-checklist.md +217 -0
  164. package/skills/copilot/debug/references/rca-template.md +150 -0
  165. package/skills/copilot/debug/references/state-schema.md +294 -0
  166. package/skills/copilot/debug/references/thorough-track.md +171 -0
  167. package/skills/copilot/debug/references/triage-questions.md +155 -0
  168. package/skills/copilot/debug/references/troubleshooting.md +47 -0
  169. package/skills/copilot/delegation/SKILL.md +345 -0
  170. package/skills/copilot/delegation/references/adaptive-orchestration.md +31 -0
  171. package/skills/copilot/delegation/references/agent-teams-saga.md +254 -0
  172. package/skills/copilot/delegation/references/fix-mode.md +118 -0
  173. package/skills/copilot/delegation/references/fixer-prompt.md +174 -0
  174. package/skills/copilot/delegation/references/implementer-prompt.md +401 -0
  175. package/skills/copilot/delegation/references/parallel-strategy.md +124 -0
  176. package/skills/copilot/delegation/references/pbt-patterns.md +172 -0
  177. package/skills/copilot/delegation/references/pr-fixes-mode.md +155 -0
  178. package/skills/copilot/delegation/references/rationalization-refutation.md +15 -0
  179. package/skills/copilot/delegation/references/state-management.md +84 -0
  180. package/skills/copilot/delegation/references/testing-patterns.md +146 -0
  181. package/skills/copilot/delegation/references/troubleshooting.md +109 -0
  182. package/skills/copilot/delegation/references/worked-example.md +104 -0
  183. package/skills/copilot/delegation/references/workflow-steps.md +131 -0
  184. package/skills/copilot/delegation/references/worktree-enforcement.md +71 -0
  185. package/skills/copilot/dogfood/SKILL.md +235 -0
  186. package/skills/copilot/dogfood/references/report-template.md +109 -0
  187. package/skills/copilot/dogfood/references/root-cause-patterns.md +227 -0
  188. package/skills/copilot/git-worktrees/SKILL.md +193 -0
  189. package/skills/copilot/git-worktrees/references/commands-reference.md +78 -0
  190. package/skills/copilot/implementation-planning/SKILL.md +289 -0
  191. package/skills/copilot/implementation-planning/references/plan-document-template.md +42 -0
  192. package/skills/copilot/implementation-planning/references/rationalization-refutation.md +13 -0
  193. package/skills/copilot/implementation-planning/references/spec-tracing-guide.md +51 -0
  194. package/skills/copilot/implementation-planning/references/task-template.md +63 -0
  195. package/skills/copilot/implementation-planning/references/testing-strategy-guide.md +109 -0
  196. package/skills/copilot/implementation-planning/references/worked-example.md +76 -0
  197. package/skills/copilot/oneshot-workflow/SKILL.md +468 -0
  198. package/skills/copilot/oneshot-workflow/references/choice-state.md +65 -0
  199. package/skills/copilot/prune-workflows/SKILL.md +290 -0
  200. package/skills/copilot/prune-workflows/references/safeguards.md +74 -0
  201. package/skills/copilot/quality-review/SKILL.md +371 -0
  202. package/skills/copilot/quality-review/references/auto-transition.md +47 -0
  203. package/skills/copilot/quality-review/references/axiom-integration.md +135 -0
  204. package/skills/copilot/quality-review/references/code-quality-checklist.md +171 -0
  205. package/skills/copilot/quality-review/references/convergence-and-verdict.md +48 -0
  206. package/skills/copilot/quality-review/references/gate-execution.md +60 -0
  207. package/skills/copilot/quality-review/references/rationalization-refutation.md +13 -0
  208. package/skills/copilot/quality-review/references/review-report-template.md +65 -0
  209. package/skills/copilot/quality-review/references/security-checklist.md +79 -0
  210. package/skills/copilot/quality-review/references/typescript-standards.md +24 -0
  211. package/skills/copilot/refactor/SKILL.md +196 -0
  212. package/skills/copilot/refactor/references/brief-template.md +81 -0
  213. package/skills/copilot/refactor/references/doc-update-checklist.md +113 -0
  214. package/skills/copilot/refactor/references/explore-checklist.md +79 -0
  215. package/skills/copilot/refactor/references/overhaul-track.md +194 -0
  216. package/skills/copilot/refactor/references/phases/auto-chain.md +267 -0
  217. package/skills/copilot/refactor/references/phases/brief.md +176 -0
  218. package/skills/copilot/refactor/references/phases/explore.md +132 -0
  219. package/skills/copilot/refactor/references/phases/overhaul-delegate.md +136 -0
  220. package/skills/copilot/refactor/references/phases/overhaul-plan.md +312 -0
  221. package/skills/copilot/refactor/references/phases/overhaul-review.md +304 -0
  222. package/skills/copilot/refactor/references/phases/polish-implement.md +347 -0
  223. package/skills/copilot/refactor/references/phases/polish-validate.md +218 -0
  224. package/skills/copilot/refactor/references/phases/update-docs.md +234 -0
  225. package/skills/copilot/refactor/references/polish-track.md +152 -0
  226. package/skills/copilot/shepherd/SKILL.md +251 -0
  227. package/skills/copilot/shepherd/references/assess-checklist.md +170 -0
  228. package/skills/copilot/shepherd/references/escalation-criteria.md +53 -0
  229. package/skills/copilot/shepherd/references/fix-strategies.md +289 -0
  230. package/skills/copilot/shepherd/references/gate-event-emission.md +47 -0
  231. package/skills/copilot/shepherd/references/shepherd-event-schemas.md +56 -0
  232. package/skills/copilot/spec-review/SKILL.md +294 -0
  233. package/skills/copilot/spec-review/references/rationalization-refutation.md +13 -0
  234. package/skills/copilot/spec-review/references/review-checklist.md +79 -0
  235. package/skills/copilot/spec-review/references/worked-example.md +72 -0
  236. package/skills/copilot/synthesis/SKILL.md +217 -0
  237. package/skills/copilot/synthesis/references/github-native-stacking.md +135 -0
  238. package/skills/copilot/synthesis/references/merge-ordering.md +50 -0
  239. package/skills/copilot/synthesis/references/pr-descriptions.md +87 -0
  240. package/skills/copilot/synthesis/references/synthesis-steps.md +145 -0
  241. package/skills/copilot/synthesis/references/troubleshooting.md +115 -0
  242. package/skills/copilot/workflow-state/SKILL.md +254 -0
  243. package/skills/copilot/workflow-state/references/mcp-tool-reference.md +89 -0
  244. package/skills/copilot/workflow-state/references/phase-transitions.md +206 -0
  245. package/skills/cursor/brainstorming/SKILL.md +182 -0
  246. package/skills/cursor/brainstorming/references/design-template.md +107 -0
  247. package/skills/cursor/brainstorming/references/worked-example.md +58 -0
  248. package/skills/cursor/cleanup/SKILL.md +169 -0
  249. package/skills/cursor/cleanup/references/merge-verification.md +40 -0
  250. package/skills/cursor/debug/SKILL.md +247 -0
  251. package/skills/cursor/debug/references/hotfix-track.md +105 -0
  252. package/skills/cursor/debug/references/investigation-checklist.md +217 -0
  253. package/skills/cursor/debug/references/rca-template.md +150 -0
  254. package/skills/cursor/debug/references/state-schema.md +294 -0
  255. package/skills/cursor/debug/references/thorough-track.md +171 -0
  256. package/skills/cursor/debug/references/triage-questions.md +155 -0
  257. package/skills/cursor/debug/references/troubleshooting.md +47 -0
  258. package/skills/cursor/delegation/SKILL.md +351 -0
  259. package/skills/cursor/delegation/references/adaptive-orchestration.md +31 -0
  260. package/skills/cursor/delegation/references/agent-teams-saga.md +254 -0
  261. package/skills/cursor/delegation/references/fix-mode.md +118 -0
  262. package/skills/cursor/delegation/references/fixer-prompt.md +174 -0
  263. package/skills/cursor/delegation/references/implementer-prompt.md +401 -0
  264. package/skills/cursor/delegation/references/parallel-strategy.md +124 -0
  265. package/skills/cursor/delegation/references/pbt-patterns.md +172 -0
  266. package/skills/cursor/delegation/references/pr-fixes-mode.md +155 -0
  267. package/skills/cursor/delegation/references/rationalization-refutation.md +15 -0
  268. package/skills/cursor/delegation/references/state-management.md +84 -0
  269. package/skills/cursor/delegation/references/testing-patterns.md +146 -0
  270. package/skills/cursor/delegation/references/troubleshooting.md +109 -0
  271. package/skills/cursor/delegation/references/worked-example.md +104 -0
  272. package/skills/cursor/delegation/references/workflow-steps.md +131 -0
  273. package/skills/cursor/delegation/references/worktree-enforcement.md +71 -0
  274. package/skills/cursor/dogfood/SKILL.md +235 -0
  275. package/skills/cursor/dogfood/references/report-template.md +109 -0
  276. package/skills/cursor/dogfood/references/root-cause-patterns.md +227 -0
  277. package/skills/cursor/git-worktrees/SKILL.md +193 -0
  278. package/skills/cursor/git-worktrees/references/commands-reference.md +78 -0
  279. package/skills/cursor/implementation-planning/SKILL.md +289 -0
  280. package/skills/cursor/implementation-planning/references/plan-document-template.md +42 -0
  281. package/skills/cursor/implementation-planning/references/rationalization-refutation.md +13 -0
  282. package/skills/cursor/implementation-planning/references/spec-tracing-guide.md +51 -0
  283. package/skills/cursor/implementation-planning/references/task-template.md +63 -0
  284. package/skills/cursor/implementation-planning/references/testing-strategy-guide.md +109 -0
  285. package/skills/cursor/implementation-planning/references/worked-example.md +76 -0
  286. package/skills/cursor/oneshot-workflow/SKILL.md +468 -0
  287. package/skills/cursor/oneshot-workflow/references/choice-state.md +65 -0
  288. package/skills/cursor/prune-workflows/SKILL.md +290 -0
  289. package/skills/cursor/prune-workflows/references/safeguards.md +74 -0
  290. package/skills/cursor/quality-review/SKILL.md +371 -0
  291. package/skills/cursor/quality-review/references/auto-transition.md +47 -0
  292. package/skills/cursor/quality-review/references/axiom-integration.md +135 -0
  293. package/skills/cursor/quality-review/references/code-quality-checklist.md +171 -0
  294. package/skills/cursor/quality-review/references/convergence-and-verdict.md +48 -0
  295. package/skills/cursor/quality-review/references/gate-execution.md +60 -0
  296. package/skills/cursor/quality-review/references/rationalization-refutation.md +13 -0
  297. package/skills/cursor/quality-review/references/review-report-template.md +65 -0
  298. package/skills/cursor/quality-review/references/security-checklist.md +79 -0
  299. package/skills/cursor/quality-review/references/typescript-standards.md +24 -0
  300. package/skills/cursor/refactor/SKILL.md +196 -0
  301. package/skills/cursor/refactor/references/brief-template.md +81 -0
  302. package/skills/cursor/refactor/references/doc-update-checklist.md +113 -0
  303. package/skills/cursor/refactor/references/explore-checklist.md +79 -0
  304. package/skills/cursor/refactor/references/overhaul-track.md +194 -0
  305. package/skills/cursor/refactor/references/phases/auto-chain.md +267 -0
  306. package/skills/cursor/refactor/references/phases/brief.md +176 -0
  307. package/skills/cursor/refactor/references/phases/explore.md +132 -0
  308. package/skills/cursor/refactor/references/phases/overhaul-delegate.md +136 -0
  309. package/skills/cursor/refactor/references/phases/overhaul-plan.md +312 -0
  310. package/skills/cursor/refactor/references/phases/overhaul-review.md +304 -0
  311. package/skills/cursor/refactor/references/phases/polish-implement.md +347 -0
  312. package/skills/cursor/refactor/references/phases/polish-validate.md +218 -0
  313. package/skills/cursor/refactor/references/phases/update-docs.md +234 -0
  314. package/skills/cursor/refactor/references/polish-track.md +152 -0
  315. package/skills/cursor/shepherd/SKILL.md +251 -0
  316. package/skills/cursor/shepherd/references/assess-checklist.md +170 -0
  317. package/skills/cursor/shepherd/references/escalation-criteria.md +53 -0
  318. package/skills/cursor/shepherd/references/fix-strategies.md +289 -0
  319. package/skills/cursor/shepherd/references/gate-event-emission.md +47 -0
  320. package/skills/cursor/shepherd/references/shepherd-event-schemas.md +56 -0
  321. package/skills/cursor/spec-review/SKILL.md +294 -0
  322. package/skills/cursor/spec-review/references/rationalization-refutation.md +13 -0
  323. package/skills/cursor/spec-review/references/review-checklist.md +79 -0
  324. package/skills/cursor/spec-review/references/worked-example.md +72 -0
  325. package/skills/cursor/synthesis/SKILL.md +217 -0
  326. package/skills/cursor/synthesis/references/github-native-stacking.md +135 -0
  327. package/skills/cursor/synthesis/references/merge-ordering.md +50 -0
  328. package/skills/cursor/synthesis/references/pr-descriptions.md +87 -0
  329. package/skills/cursor/synthesis/references/synthesis-steps.md +145 -0
  330. package/skills/cursor/synthesis/references/troubleshooting.md +115 -0
  331. package/skills/cursor/workflow-state/SKILL.md +254 -0
  332. package/skills/cursor/workflow-state/references/mcp-tool-reference.md +89 -0
  333. package/skills/cursor/workflow-state/references/phase-transitions.md +206 -0
  334. package/skills/generic/brainstorming/SKILL.md +182 -0
  335. package/skills/generic/brainstorming/references/design-template.md +107 -0
  336. package/skills/generic/brainstorming/references/worked-example.md +58 -0
  337. package/skills/generic/cleanup/SKILL.md +169 -0
  338. package/skills/generic/cleanup/references/merge-verification.md +40 -0
  339. package/skills/generic/debug/SKILL.md +247 -0
  340. package/skills/generic/debug/references/hotfix-track.md +105 -0
  341. package/skills/generic/debug/references/investigation-checklist.md +217 -0
  342. package/skills/generic/debug/references/rca-template.md +150 -0
  343. package/skills/generic/debug/references/state-schema.md +294 -0
  344. package/skills/generic/debug/references/thorough-track.md +171 -0
  345. package/skills/generic/debug/references/triage-questions.md +155 -0
  346. package/skills/generic/debug/references/troubleshooting.md +47 -0
  347. package/skills/generic/delegation/SKILL.md +345 -0
  348. package/skills/generic/delegation/references/adaptive-orchestration.md +31 -0
  349. package/skills/generic/delegation/references/agent-teams-saga.md +254 -0
  350. package/skills/generic/delegation/references/fix-mode.md +118 -0
  351. package/skills/generic/delegation/references/fixer-prompt.md +174 -0
  352. package/skills/generic/delegation/references/implementer-prompt.md +401 -0
  353. package/skills/generic/delegation/references/parallel-strategy.md +124 -0
  354. package/skills/generic/delegation/references/pbt-patterns.md +172 -0
  355. package/skills/generic/delegation/references/pr-fixes-mode.md +155 -0
  356. package/skills/generic/delegation/references/rationalization-refutation.md +15 -0
  357. package/skills/generic/delegation/references/state-management.md +84 -0
  358. package/skills/generic/delegation/references/testing-patterns.md +146 -0
  359. package/skills/generic/delegation/references/troubleshooting.md +109 -0
  360. package/skills/generic/delegation/references/worked-example.md +104 -0
  361. package/skills/generic/delegation/references/workflow-steps.md +131 -0
  362. package/skills/generic/delegation/references/worktree-enforcement.md +71 -0
  363. package/skills/generic/dogfood/SKILL.md +235 -0
  364. package/skills/generic/dogfood/references/report-template.md +109 -0
  365. package/skills/generic/dogfood/references/root-cause-patterns.md +227 -0
  366. package/skills/generic/git-worktrees/SKILL.md +193 -0
  367. package/skills/generic/git-worktrees/references/commands-reference.md +78 -0
  368. package/skills/generic/implementation-planning/SKILL.md +289 -0
  369. package/skills/generic/implementation-planning/references/plan-document-template.md +42 -0
  370. package/skills/generic/implementation-planning/references/rationalization-refutation.md +13 -0
  371. package/skills/generic/implementation-planning/references/spec-tracing-guide.md +51 -0
  372. package/skills/generic/implementation-planning/references/task-template.md +63 -0
  373. package/skills/generic/implementation-planning/references/testing-strategy-guide.md +109 -0
  374. package/skills/generic/implementation-planning/references/worked-example.md +76 -0
  375. package/skills/generic/oneshot-workflow/SKILL.md +468 -0
  376. package/skills/generic/oneshot-workflow/references/choice-state.md +65 -0
  377. package/skills/generic/prune-workflows/SKILL.md +290 -0
  378. package/skills/generic/prune-workflows/references/safeguards.md +74 -0
  379. package/skills/generic/quality-review/SKILL.md +371 -0
  380. package/skills/generic/quality-review/references/auto-transition.md +47 -0
  381. package/skills/generic/quality-review/references/axiom-integration.md +135 -0
  382. package/skills/generic/quality-review/references/code-quality-checklist.md +171 -0
  383. package/skills/generic/quality-review/references/convergence-and-verdict.md +48 -0
  384. package/skills/generic/quality-review/references/gate-execution.md +60 -0
  385. package/skills/generic/quality-review/references/rationalization-refutation.md +13 -0
  386. package/skills/generic/quality-review/references/review-report-template.md +65 -0
  387. package/skills/generic/quality-review/references/security-checklist.md +79 -0
  388. package/skills/generic/quality-review/references/typescript-standards.md +24 -0
  389. package/skills/generic/refactor/SKILL.md +196 -0
  390. package/skills/generic/refactor/references/brief-template.md +81 -0
  391. package/skills/generic/refactor/references/doc-update-checklist.md +113 -0
  392. package/skills/generic/refactor/references/explore-checklist.md +79 -0
  393. package/skills/generic/refactor/references/overhaul-track.md +194 -0
  394. package/skills/generic/refactor/references/phases/auto-chain.md +267 -0
  395. package/skills/generic/refactor/references/phases/brief.md +176 -0
  396. package/skills/generic/refactor/references/phases/explore.md +132 -0
  397. package/skills/generic/refactor/references/phases/overhaul-delegate.md +136 -0
  398. package/skills/generic/refactor/references/phases/overhaul-plan.md +312 -0
  399. package/skills/generic/refactor/references/phases/overhaul-review.md +304 -0
  400. package/skills/generic/refactor/references/phases/polish-implement.md +347 -0
  401. package/skills/generic/refactor/references/phases/polish-validate.md +218 -0
  402. package/skills/generic/refactor/references/phases/update-docs.md +234 -0
  403. package/skills/generic/refactor/references/polish-track.md +152 -0
  404. package/skills/generic/shepherd/SKILL.md +251 -0
  405. package/skills/generic/shepherd/references/assess-checklist.md +170 -0
  406. package/skills/generic/shepherd/references/escalation-criteria.md +53 -0
  407. package/skills/generic/shepherd/references/fix-strategies.md +289 -0
  408. package/skills/generic/shepherd/references/gate-event-emission.md +47 -0
  409. package/skills/generic/shepherd/references/shepherd-event-schemas.md +56 -0
  410. package/skills/generic/spec-review/SKILL.md +294 -0
  411. package/skills/generic/spec-review/references/rationalization-refutation.md +13 -0
  412. package/skills/generic/spec-review/references/review-checklist.md +79 -0
  413. package/skills/generic/spec-review/references/worked-example.md +72 -0
  414. package/skills/generic/synthesis/SKILL.md +217 -0
  415. package/skills/generic/synthesis/references/github-native-stacking.md +135 -0
  416. package/skills/generic/synthesis/references/merge-ordering.md +50 -0
  417. package/skills/generic/synthesis/references/pr-descriptions.md +87 -0
  418. package/skills/generic/synthesis/references/synthesis-steps.md +145 -0
  419. package/skills/generic/synthesis/references/troubleshooting.md +115 -0
  420. package/skills/generic/workflow-state/SKILL.md +254 -0
  421. package/skills/generic/workflow-state/references/mcp-tool-reference.md +89 -0
  422. package/skills/generic/workflow-state/references/phase-transitions.md +206 -0
  423. package/skills/opencode/brainstorming/SKILL.md +182 -0
  424. package/skills/opencode/brainstorming/references/design-template.md +107 -0
  425. package/skills/opencode/brainstorming/references/worked-example.md +58 -0
  426. package/skills/opencode/cleanup/SKILL.md +169 -0
  427. package/skills/opencode/cleanup/references/merge-verification.md +40 -0
  428. package/skills/opencode/debug/SKILL.md +247 -0
  429. package/skills/opencode/debug/references/hotfix-track.md +105 -0
  430. package/skills/opencode/debug/references/investigation-checklist.md +217 -0
  431. package/skills/opencode/debug/references/rca-template.md +150 -0
  432. package/skills/opencode/debug/references/state-schema.md +294 -0
  433. package/skills/opencode/debug/references/thorough-track.md +171 -0
  434. package/skills/opencode/debug/references/triage-questions.md +155 -0
  435. package/skills/opencode/debug/references/troubleshooting.md +47 -0
  436. package/skills/opencode/delegation/SKILL.md +353 -0
  437. package/skills/opencode/delegation/references/adaptive-orchestration.md +31 -0
  438. package/skills/opencode/delegation/references/agent-teams-saga.md +254 -0
  439. package/skills/opencode/delegation/references/fix-mode.md +118 -0
  440. package/skills/opencode/delegation/references/fixer-prompt.md +174 -0
  441. package/skills/opencode/delegation/references/implementer-prompt.md +401 -0
  442. package/skills/opencode/delegation/references/parallel-strategy.md +124 -0
  443. package/skills/opencode/delegation/references/pbt-patterns.md +172 -0
  444. package/skills/opencode/delegation/references/pr-fixes-mode.md +155 -0
  445. package/skills/opencode/delegation/references/rationalization-refutation.md +15 -0
  446. package/skills/opencode/delegation/references/state-management.md +84 -0
  447. package/skills/opencode/delegation/references/testing-patterns.md +146 -0
  448. package/skills/opencode/delegation/references/troubleshooting.md +109 -0
  449. package/skills/opencode/delegation/references/worked-example.md +104 -0
  450. package/skills/opencode/delegation/references/workflow-steps.md +131 -0
  451. package/skills/opencode/delegation/references/worktree-enforcement.md +71 -0
  452. package/skills/opencode/dogfood/SKILL.md +235 -0
  453. package/skills/opencode/dogfood/references/report-template.md +109 -0
  454. package/skills/opencode/dogfood/references/root-cause-patterns.md +227 -0
  455. package/skills/opencode/git-worktrees/SKILL.md +193 -0
  456. package/skills/opencode/git-worktrees/references/commands-reference.md +78 -0
  457. package/skills/opencode/implementation-planning/SKILL.md +289 -0
  458. package/skills/opencode/implementation-planning/references/plan-document-template.md +42 -0
  459. package/skills/opencode/implementation-planning/references/rationalization-refutation.md +13 -0
  460. package/skills/opencode/implementation-planning/references/spec-tracing-guide.md +51 -0
  461. package/skills/opencode/implementation-planning/references/task-template.md +63 -0
  462. package/skills/opencode/implementation-planning/references/testing-strategy-guide.md +109 -0
  463. package/skills/opencode/implementation-planning/references/worked-example.md +76 -0
  464. package/skills/opencode/oneshot-workflow/SKILL.md +468 -0
  465. package/skills/opencode/oneshot-workflow/references/choice-state.md +65 -0
  466. package/skills/opencode/prune-workflows/SKILL.md +290 -0
  467. package/skills/opencode/prune-workflows/references/safeguards.md +74 -0
  468. package/skills/opencode/quality-review/SKILL.md +371 -0
  469. package/skills/opencode/quality-review/references/auto-transition.md +47 -0
  470. package/skills/opencode/quality-review/references/axiom-integration.md +135 -0
  471. package/skills/opencode/quality-review/references/code-quality-checklist.md +171 -0
  472. package/skills/opencode/quality-review/references/convergence-and-verdict.md +48 -0
  473. package/skills/opencode/quality-review/references/gate-execution.md +60 -0
  474. package/skills/opencode/quality-review/references/rationalization-refutation.md +13 -0
  475. package/skills/opencode/quality-review/references/review-report-template.md +65 -0
  476. package/skills/opencode/quality-review/references/security-checklist.md +79 -0
  477. package/skills/opencode/quality-review/references/typescript-standards.md +24 -0
  478. package/skills/opencode/refactor/SKILL.md +196 -0
  479. package/skills/opencode/refactor/references/brief-template.md +81 -0
  480. package/skills/opencode/refactor/references/doc-update-checklist.md +113 -0
  481. package/skills/opencode/refactor/references/explore-checklist.md +79 -0
  482. package/skills/opencode/refactor/references/overhaul-track.md +194 -0
  483. package/skills/opencode/refactor/references/phases/auto-chain.md +267 -0
  484. package/skills/opencode/refactor/references/phases/brief.md +176 -0
  485. package/skills/opencode/refactor/references/phases/explore.md +132 -0
  486. package/skills/opencode/refactor/references/phases/overhaul-delegate.md +136 -0
  487. package/skills/opencode/refactor/references/phases/overhaul-plan.md +312 -0
  488. package/skills/opencode/refactor/references/phases/overhaul-review.md +304 -0
  489. package/skills/opencode/refactor/references/phases/polish-implement.md +347 -0
  490. package/skills/opencode/refactor/references/phases/polish-validate.md +218 -0
  491. package/skills/opencode/refactor/references/phases/update-docs.md +234 -0
  492. package/skills/opencode/refactor/references/polish-track.md +152 -0
  493. package/skills/opencode/shepherd/SKILL.md +251 -0
  494. package/skills/opencode/shepherd/references/assess-checklist.md +170 -0
  495. package/skills/opencode/shepherd/references/escalation-criteria.md +53 -0
  496. package/skills/opencode/shepherd/references/fix-strategies.md +289 -0
  497. package/skills/opencode/shepherd/references/gate-event-emission.md +47 -0
  498. package/skills/opencode/shepherd/references/shepherd-event-schemas.md +56 -0
  499. package/skills/opencode/spec-review/SKILL.md +294 -0
  500. package/skills/opencode/spec-review/references/rationalization-refutation.md +13 -0
  501. package/skills/opencode/spec-review/references/review-checklist.md +79 -0
  502. package/skills/opencode/spec-review/references/worked-example.md +72 -0
  503. package/skills/opencode/synthesis/SKILL.md +217 -0
  504. package/skills/opencode/synthesis/references/github-native-stacking.md +135 -0
  505. package/skills/opencode/synthesis/references/merge-ordering.md +50 -0
  506. package/skills/opencode/synthesis/references/pr-descriptions.md +87 -0
  507. package/skills/opencode/synthesis/references/synthesis-steps.md +145 -0
  508. package/skills/opencode/synthesis/references/troubleshooting.md +115 -0
  509. package/skills/opencode/workflow-state/SKILL.md +254 -0
  510. package/skills/opencode/workflow-state/references/mcp-tool-reference.md +89 -0
  511. package/skills/opencode/workflow-state/references/phase-transitions.md +206 -0
  512. package/.claude-plugin/marketplace.json +0 -34
  513. package/dist/node_modules/electron/index.js +0 -1
  514. package/dist/node_modules/electron/package.json +0 -1
  515. package/dist/node_modules/playwright-core/index.js +0 -1
  516. package/dist/node_modules/playwright-core/package.json +0 -1
  517. package/scripts/assess-refactor-scope.sh +0 -239
  518. package/scripts/check-coderabbit.sh +0 -288
  519. package/scripts/check-context-economy.sh +0 -405
  520. package/scripts/check-coverage-thresholds.sh +0 -194
  521. package/scripts/check-operational-resilience.sh +0 -306
  522. package/scripts/check-polish-scope.sh +0 -245
  523. package/scripts/check-post-merge.sh +0 -185
  524. package/scripts/check-pr-comments.sh +0 -127
  525. package/scripts/check-task-decomposition.sh +0 -451
  526. package/scripts/check-tdd-compliance.sh +0 -265
  527. package/scripts/check-workflow-determinism.sh +0 -312
  528. package/scripts/debug-review-gate.sh +0 -201
  529. package/scripts/extract-fix-tasks.sh +0 -179
  530. package/scripts/extract-task.sh +0 -67
  531. package/scripts/generate-traceability.sh +0 -209
  532. package/scripts/investigation-timer.sh +0 -171
  533. package/scripts/needs-schema-sync.sh +0 -174
  534. package/scripts/new-project.sh +0 -103
  535. package/scripts/post-delegation-check.sh +0 -317
  536. package/scripts/pre-synthesis-check.sh +0 -475
  537. package/scripts/reconcile-state.sh +0 -346
  538. package/scripts/review-diff.sh +0 -63
  539. package/scripts/review-verdict.sh +0 -169
  540. package/scripts/security-scan.sh +0 -248
  541. package/scripts/select-debug-track.sh +0 -186
  542. package/scripts/setup-worktree.sh +0 -323
  543. package/scripts/spec-coverage-check.sh +0 -230
  544. package/scripts/static-analysis-gate.sh +0 -261
  545. package/scripts/validate-companion.sh +0 -161
  546. package/scripts/validate-pr-body.sh +0 -158
  547. package/scripts/validate-pr-stack.sh +0 -146
  548. package/scripts/verify-delegation-saga.sh +0 -240
  549. package/scripts/verify-doc-links.sh +0 -211
  550. package/scripts/verify-ideate-artifacts.sh +0 -296
  551. package/scripts/verify-plan-coverage.sh +0 -408
  552. package/scripts/verify-provenance-chain.sh +0 -310
  553. package/scripts/verify-review-triage.sh +0 -219
  554. package/scripts/verify-worktree-baseline.sh +0 -159
  555. package/scripts/verify-worktree.sh +0 -84
  556. package/skills/delegation/references/fix-mode.md +0 -78
  557. package/skills/implementation-planning/references/task-template.md +0 -43
  558. package/skills/shared/prompts/context-reading.md +0 -66
  559. package/skills/shared/prompts/report-format.md +0 -54
  560. package/skills/shared/prompts/tdd-requirements.md +0 -39
  561. package/skills/shared/references/coding-standards.md +0 -46
  562. package/skills/shared/references/mcp-tool-guidance.md +0 -26
  563. package/skills/shared/references/skill-path-resolution.md +0 -10
  564. package/skills/shared/references/tdd.md +0 -41
  565. package/skills/shared/references/telemetry-awareness.md +0 -9
  566. /package/skills/{brainstorming → claude/brainstorming}/references/worked-example.md +0 -0
  567. /package/skills/{cleanup → claude/cleanup}/references/merge-verification.md +0 -0
  568. /package/skills/{debug → claude/debug}/references/rca-template.md +0 -0
  569. /package/skills/{debug → claude/debug}/references/state-schema.md +0 -0
  570. /package/skills/{debug → claude/debug}/references/triage-questions.md +0 -0
  571. /package/skills/{debug → claude/debug}/references/troubleshooting.md +0 -0
  572. /package/skills/{delegation → claude/delegation}/references/adaptive-orchestration.md +0 -0
  573. /package/skills/{delegation → claude/delegation}/references/fixer-prompt.md +0 -0
  574. /package/skills/{delegation → claude/delegation}/references/pbt-patterns.md +0 -0
  575. /package/skills/{delegation → claude/delegation}/references/pr-fixes-mode.md +0 -0
  576. /package/skills/{delegation → claude/delegation}/references/rationalization-refutation.md +0 -0
  577. /package/skills/{delegation → claude/delegation}/references/testing-patterns.md +0 -0
  578. /package/skills/{delegation → claude/delegation}/references/worked-example.md +0 -0
  579. /package/skills/{git-worktrees → claude/git-worktrees}/references/commands-reference.md +0 -0
  580. /package/skills/{implementation-planning → claude/implementation-planning}/references/plan-document-template.md +0 -0
  581. /package/skills/{implementation-planning → claude/implementation-planning}/references/rationalization-refutation.md +0 -0
  582. /package/skills/{implementation-planning → claude/implementation-planning}/references/spec-tracing-guide.md +0 -0
  583. /package/skills/{quality-review → claude/quality-review}/references/code-quality-checklist.md +0 -0
  584. /package/skills/{quality-review → claude/quality-review}/references/convergence-and-verdict.md +0 -0
  585. /package/skills/{quality-review → claude/quality-review}/references/gate-execution.md +0 -0
  586. /package/skills/{quality-review → claude/quality-review}/references/rationalization-refutation.md +0 -0
  587. /package/skills/{quality-review → claude/quality-review}/references/review-report-template.md +0 -0
  588. /package/skills/{quality-review → claude/quality-review}/references/security-checklist.md +0 -0
  589. /package/skills/{quality-review → claude/quality-review}/references/typescript-standards.md +0 -0
  590. /package/skills/{refactor → claude/refactor}/references/brief-template.md +0 -0
  591. /package/skills/{refactor → claude/refactor/references}/phases/auto-chain.md +0 -0
  592. /package/skills/{refactor → claude/refactor/references}/phases/brief.md +0 -0
  593. /package/skills/{refactor → claude/refactor/references}/phases/explore.md +0 -0
  594. /package/skills/{refactor → claude/refactor/references}/phases/overhaul-delegate.md +0 -0
  595. /package/skills/{refactor → claude/refactor/references}/phases/overhaul-plan.md +0 -0
  596. /package/skills/{refactor → claude/refactor/references}/phases/overhaul-review.md +0 -0
  597. /package/skills/{refactor → claude/refactor/references}/phases/update-docs.md +0 -0
  598. /package/skills/{shepherd → claude/shepherd}/references/assess-checklist.md +0 -0
  599. /package/skills/{shepherd → claude/shepherd}/references/escalation-criteria.md +0 -0
  600. /package/skills/{shepherd → claude/shepherd}/references/gate-event-emission.md +0 -0
  601. /package/skills/{spec-review → claude/spec-review}/references/rationalization-refutation.md +0 -0
  602. /package/skills/{spec-review → claude/spec-review}/references/review-checklist.md +0 -0
  603. /package/skills/{synthesis → claude/synthesis}/references/merge-ordering.md +0 -0
  604. /package/skills/{synthesis → claude/synthesis}/references/pr-descriptions.md +0 -0
  605. /package/skills/{synthesis → claude/synthesis}/references/troubleshooting.md +0 -0
@@ -0,0 +1,401 @@
1
+ # Implementer Prompt Template
2
+
3
+ **Note:** On Claude Code, this template is compiled into `servers/exarchos-mcp/src/agents/definitions.ts` (IMPLEMENTER spec) and the native agent file `agents/exarchos-implementer.md` is generated from the registry at build time. This reference document is the canonical prompt evolution record and is used directly by cross-platform clients (Cursor, Copilot CLI, etc.) that lack native agent support.
4
+
5
+ Use this template when dispatching tasks via the Task tool.
6
+
7
+ ## Quality Hints Integration
8
+
9
+ Before dispatch, query `exarchos_view` with `action: 'quality_hints'` and `skill: '<skill-name>'` to retrieve quality signals for the target skill. If the returned `hints` array is non-empty, include the **Quality Signals** section in the prompt. If empty, omit it entirely.
10
+
11
+ ## Template
12
+
13
+ ```markdown
14
+ # Task: [Task Title]
15
+
16
+ ## Working Directory
17
+ [Absolute path to worktree or project root]
18
+
19
+ ## CRITICAL: Worktree Verification (MANDATORY)
20
+
21
+ Before making ANY file changes, you MUST verify you are in a worktree:
22
+
23
+ 1. Run: `pwd`
24
+ 2. Verify the path contains `.worktrees/`
25
+ 3. If NOT in a worktree directory:
26
+ - STOP immediately
27
+ - Report: "ERROR: Working directory is not a worktree. Aborting task."
28
+ - DO NOT proceed with any file modifications
29
+
30
+ **Example verification:**
31
+ ```bash
32
+ pwd | grep -q "\.worktrees" || { echo "ERROR: Not in worktree!"; exit 1; }
33
+ ```
34
+
35
+ This check prevents accidental modifications to the main project root, which would cause merge conflicts with other parallel tasks.
36
+
37
+ ## Task Description
38
+ [Full task description from implementation plan - never reference external files]
39
+
40
+ ## Files to Modify
41
+
42
+ ### Create/Modify:
43
+ - `[path/to/file.ts]` - [Brief description of changes]
44
+
45
+ ### Test Files:
46
+ - `[path/to/file.test.ts]` - [Test file to create/modify]
47
+
48
+ ## TDD Requirements (MANDATORY)
49
+
50
+ You MUST follow strict Test-Driven Development:
51
+
52
+ ### Phase 1: RED - Write Failing Test
53
+
54
+ 1. Create test file at the specified path
55
+ 2. Write test with name: `[MethodName]_[Scenario]_[ExpectedOutcome]`
56
+ 3. Run tests: `npm run test:run`
57
+ 4. **VERIFY test fails for the expected reason**
58
+ 5. Do NOT proceed until you've witnessed the failure
59
+
60
+ ### Phase 2: GREEN - Minimum Implementation
61
+
62
+ 1. Write the minimum code to make the test pass
63
+ 2. No additional features or optimizations
64
+ 3. Run tests: `npm run test:run`
65
+ 4. **VERIFY test passes**
66
+
67
+ ### Phase 3: REFACTOR - Clean Up
68
+
69
+ 1. Apply SOLID principles if applicable
70
+ 2. Extract helpers for clarity
71
+ 3. Run tests after each change
72
+ 4. **VERIFY tests stay green**
73
+
74
+ ## Testing Approach (Testing Trophy)
75
+
76
+ Prefer **integration tests with real collaborators** (sociable tests). Mock only at infrastructure boundaries (HTTP, database, filesystem). This gives the best confidence-per-effort ratio.
77
+
78
+ - **Acceptance test tasks** (`testLayer: acceptance`): Use real collaborators throughout. No mocks except true external boundaries. This test stays RED until inner tasks complete — it is the "north star."
79
+ - **Integration test tasks** (`testLayer: integration`): Default layer. Use real collaborators, mock only infrastructure boundaries.
80
+ - **Unit test tasks** (`testLayer: unit`): For isolated complex logic only. Mocking is acceptable here.
81
+
82
+ ## Characterization Testing
83
+
84
+ When a task has `characterizationRequired: true`, capture existing behavior BEFORE modifying code:
85
+
86
+ 1. Write tests that document what the code **currently does** (not what it should do)
87
+ 2. Use snapshot-style assertions: capture output, assert it matches
88
+ 3. Make your changes — any characterization test failure means behavior changed
89
+ 4. Document which characterization test failures are intentional vs accidental
90
+
91
+ ## Acceptance Test Completion Check
92
+
93
+ When a task has `acceptanceTestRef`, run the parent acceptance test after completing your inner task:
94
+ - Still failing → expected (other inner tasks may not be complete yet)
95
+ - Now passing → the feature may be complete; report this in your completion output
96
+
97
+ ## Property-Based Testing Patterns
98
+
99
+ When this task has `testingStrategy.propertyTests: true`, write property tests alongside example tests during the RED phase. Use the patterns from `@skills/delegation/references/pbt-patterns.md`:
100
+
101
+ - **Roundtrip:** For encode/decode pairs, verify `decode(encode(x)) === x` for all inputs
102
+ - **Invariant:** For operations with business rules, verify bounds/constraints hold for all inputs
103
+ - **Idempotence:** For normalization/formatting, verify `f(f(x)) === f(x)` for all inputs
104
+ - **Commutativity:** For order-independent operations, verify `f(a, b) === f(b, a)` for all inputs
105
+
106
+ **TypeScript:** Use `fast-check` with `fc.property`, `fc.assert`, or `it.prop`
107
+ **C#:** Use `FsCheck` with `Prop.ForAll` or `[Property]` attribute
108
+
109
+ Property tests complement example tests -- write both in the RED phase.
110
+
111
+ ## Expected Test
112
+
113
+ ```typescript
114
+ describe('[ComponentName]', () => {
115
+ it('should [expected behavior] when [condition]', async () => {
116
+ // Arrange
117
+ [Setup code]
118
+
119
+ // Act
120
+ [Execution code]
121
+
122
+ // Assert
123
+ expect(result).[matcher](expected);
124
+ });
125
+ });
126
+ ```
127
+
128
+ ## Success Criteria
129
+
130
+ - [ ] Test written BEFORE implementation
131
+ - [ ] Test fails for the right reason
132
+ - [ ] Implementation passes test
133
+ - [ ] No extra code beyond requirements
134
+ - [ ] All tests in worktree pass
135
+
136
+ ## Coordination (Native APIs)
137
+ <!-- Agent Teams mode only. Remove this section for subagent mode. -->
138
+ - Use `TaskList` to see available tasks and their statuses
139
+ - Use `TaskUpdate` to mark tasks `in_progress` when you start and `completed` when done
140
+ - Use `SendMessage` to communicate findings to teammates or the lead
141
+
142
+ ## Workflow Intelligence (Exarchos MCP)
143
+ <!-- Agent Teams mode only. Remove this section for subagent mode. -->
144
+ - Use `exarchos_workflow get` to query current workflow state
145
+ - Use `exarchos_view tasks` to see task details across the team
146
+ - Use `exarchos_event append` to report TDD phase transitions:
147
+ stream: "{featureId}"
148
+ event: { type: "task.progress", taskId: "{taskId}", tddPhase: "red|green|refactor" }
149
+
150
+ ## Team Context
151
+ <!-- Agent Teams mode only. Populated at spawn time by orchestrator. -->
152
+ {teamComposition}
153
+
154
+ > This data is injected at spawn time. The SubagentStart hook provides only live coordination updates (task status changes, newly unblocked tasks).
155
+
156
+ ## Historical Context
157
+ <!-- Agent Teams mode only. Populated at spawn time by orchestrator. -->
158
+ {historicalIntelligence}
159
+
160
+ > This data is injected at spawn time. The SubagentStart hook provides only live coordination updates.
161
+
162
+ ## Quality Signals
163
+ <!-- Populated at dispatch time by orchestrator when quality hints are available. -->
164
+ <!-- Query: exarchos_view with action: 'quality_hints' and skill: '<skill-name>' -->
165
+ <!-- If hints array is non-empty, include this section. If empty, omit entirely. -->
166
+
167
+ Based on historical quality data for this skill:
168
+
169
+ {{#each hints}}
170
+ - **{{category}}** ({{severity}}): {{hint}}
171
+ {{/each}}
172
+
173
+ Use these signals to guide your implementation. Address warnings proactively.
174
+
175
+ ## Code Exploration Tools
176
+
177
+ For navigating and understanding code:
178
+ - `Grep` — Search for patterns across the codebase
179
+ - `Glob` — Find files by name pattern
180
+ - `Read` — Read file contents (prefer targeted reads over full-file reads)
181
+
182
+ When Serena MCP is available, prefer semantic tools for precision:
183
+ - `mcp__plugin_serena_serena__find_symbol` — Locate classes, functions, methods by name
184
+ - `mcp__plugin_serena_serena__get_symbols_overview` — Understand file structure without reading entire files
185
+ - `mcp__plugin_serena_serena__search_for_pattern` — Regex search across the codebase
186
+ - `mcp__plugin_serena_serena__find_referencing_symbols` — Find all callers/users of a symbol
187
+
188
+ ## Schema Sync (If Modifying API Files)
189
+
190
+ If this task modifies any of these file patterns, run schema sync after implementation:
191
+ - `*Endpoints.cs` - API endpoint definitions
192
+ - `Models/*.cs`, `Requests/*.cs`, `Responses/*.cs`, `Dtos/*.cs` - DTOs
193
+
194
+ ```bash
195
+ # From worktree root
196
+ npm run sync:schemas
197
+ npm run typecheck
198
+ ```
199
+
200
+ This regenerates TypeScript types from the OpenAPI spec. Include generated files in your commit.
201
+
202
+ ## Commit Strategy
203
+ <!-- REQUIRED in both Agent Teams and Subagent modes. Never omit this section. -->
204
+
205
+ After completing each logical task within your assignment:
206
+
207
+ 1. Stage the relevant files: `git add <files>`
208
+ 2. Commit with a descriptive message: `git commit -m "feat: <task summary>"`
209
+ 3. Continue to the next task
210
+
211
+ After all tasks are complete:
212
+ 4. Push your branch: `git push -u origin <branch-name>`
213
+
214
+ PR creation is handled during the synthesis phase — do not create PRs from implementation tasks.
215
+
216
+ ### Grouping Guidance
217
+
218
+ Commits should match logical review units, not individual TDD test cycles. Group related changes that form a coherent feature into one commit. For example, if you implement types + config + tests for a module, that's one commit, not three.
219
+
220
+ ## Provenance Reporting
221
+
222
+ When completing a task, include structured provenance data in your completion report. This data flows into the `task.completed` event for traceability through the provenance chain.
223
+
224
+ ### Required Fields
225
+
226
+ 1. **implements** — Design requirement IDs you implemented (e.g., `["DR-1", "DR-3"]`)
227
+ 2. **tests** — Tests written, each with name and file path
228
+ 3. **files** — Files created or modified
229
+ 4. **acceptanceTestRef** — (optional) Task ID of the parent acceptance test, if this task has an `acceptanceTestRef` field
230
+
231
+ ### Structured Format
232
+
233
+ Report provenance as a JSON object in your task completion call:
234
+
235
+ ```json
236
+ {
237
+ "implements": ["DR-1", "DR-3"],
238
+ "acceptanceTestRef": "task-000",
239
+ "tests": [
240
+ { "name": "validateEmail_InvalidFormat_ReturnsError", "file": "src/validators/email.test.ts" },
241
+ { "name": "validateEmail_ValidFormat_ReturnsSuccess", "file": "src/validators/email.test.ts" }
242
+ ],
243
+ "files": ["src/validators/email.ts", "src/validators/email.test.ts"]
244
+ }
245
+ ```
246
+
247
+ ### Passing Provenance in Task Completion
248
+
249
+ When using Exarchos MCP to mark a task complete, pass provenance fields in the `result` parameter:
250
+
251
+ ```typescript
252
+ exarchos_orchestrate({
253
+ action: "task_complete",
254
+ taskId: "task-001",
255
+ streamId: "<featureId>",
256
+ result: {
257
+ summary: "Implemented email validation with TDD",
258
+ implements: ["DR-1"],
259
+ acceptanceTestRef: "task-000",
260
+ tests: [{ name: "validateEmail_InvalidFormat_ReturnsError", file: "src/validators/email.test.ts" }],
261
+ files: ["src/validators/email.ts", "src/validators/email.test.ts"]
262
+ }
263
+ })
264
+ ```
265
+
266
+ These fields are extracted by `handleTaskComplete` and included in the `task.completed` event, enabling the ProvenanceView to trace requirements through to implementation.
267
+
268
+ ## Completion
269
+
270
+ When done, report:
271
+ 1. Test file path and test name
272
+ 2. Implementation file path
273
+ 3. Test results (pass/fail)
274
+ 4. Provenance: implements (requirement IDs), acceptanceTestRef (if present), tests (name + file), files (paths)
275
+ 5. Any issues encountered
276
+ ```
277
+
278
+ ## Usage Example
279
+
280
+ ```typescript
281
+ Task({
282
+ subagent_type: "general-purpose",
283
+ model: "opus",
284
+ description: "Implement user validation",
285
+ prompt: `
286
+ # Task: Implement User Email Validation
287
+
288
+ ## Working Directory
289
+ /home/user/project/.worktrees/task-003
290
+
291
+ ## CRITICAL: Worktree Verification (MANDATORY)
292
+
293
+ Before making ANY file changes, you MUST verify you are in a worktree:
294
+
295
+ 1. Run: \`pwd\`
296
+ 2. Verify the path contains \`.worktrees/\`
297
+ 3. If NOT in a worktree directory:
298
+ - STOP immediately
299
+ - Report: "ERROR: Working directory is not a worktree. Aborting task."
300
+ - DO NOT proceed with any file modifications
301
+
302
+ **Example verification:**
303
+ \`\`\`bash
304
+ pwd | grep -q "\\.worktrees" || { echo "ERROR: Not in worktree!"; exit 1; }
305
+ \`\`\`
306
+
307
+ This check prevents accidental modifications to the main project root, which would cause merge conflicts with other parallel tasks.
308
+
309
+ ## Task Description
310
+ Implement email validation for user registration. The validator should:
311
+ - Check email format using regex
312
+ - Verify domain has MX record (mock in tests)
313
+ - Return validation result with error messages
314
+
315
+ ## Files to Modify
316
+
317
+ ### Create/Modify:
318
+ - \`src/validators/email.ts\` - Email validation function
319
+
320
+ ### Test Files:
321
+ - \`src/validators/email.test.ts\` - Validation tests
322
+
323
+ ## TDD Requirements (MANDATORY)
324
+
325
+ You MUST follow strict Test-Driven Development:
326
+
327
+ ### Phase 1: RED - Write Failing Test
328
+
329
+ 1. Create test file at src/validators/email.test.ts
330
+ 2. Write test: \`validateEmail_InvalidFormat_ReturnsError\`
331
+ 3. Run tests: \`npm run test:run\`
332
+ 4. VERIFY test fails for the expected reason
333
+
334
+ ### Phase 2: GREEN - Minimum Implementation
335
+
336
+ 1. Write minimum code in src/validators/email.ts
337
+ 2. Run tests: \`npm run test:run\`
338
+ 3. VERIFY test passes
339
+
340
+ ### Phase 3: REFACTOR - Clean Up
341
+
342
+ 1. Extract regex to constant
343
+ 2. Run tests after change
344
+ 3. VERIFY tests stay green
345
+
346
+ ## Expected Test
347
+
348
+ \`\`\`typescript
349
+ describe('validateEmail', () => {
350
+ it('should return error when email format is invalid', async () => {
351
+ // Arrange
352
+ const invalidEmail = 'not-an-email';
353
+
354
+ // Act
355
+ const result = validateEmail(invalidEmail);
356
+
357
+ // Assert
358
+ expect(result.valid).toBe(false);
359
+ expect(result.error).toContain('format');
360
+ });
361
+ });
362
+ \`\`\`
363
+
364
+ ## Success Criteria
365
+
366
+ - [ ] Test written BEFORE implementation
367
+ - [ ] Test fails for the right reason
368
+ - [ ] Implementation passes test
369
+ - [ ] No extra code beyond requirements
370
+ - [ ] All tests in worktree pass
371
+ `
372
+ })
373
+ ```
374
+
375
+ ## Key Principles
376
+
377
+ 1. **Full Context** - Include everything the implementer needs
378
+ 2. **No File References** - Don't say "see plan.md" - paste content
379
+ 3. **Explicit Paths** - Absolute paths to working directory and files
380
+ 4. **TDD Mandatory** - Always include TDD requirements
381
+ 5. **Git-First** - Standard git commit + push. PR creation handled by synthesis phase.
382
+ 6. **Clear Success Criteria** - Checkboxes for completion
383
+
384
+ ## Agent Teams vs Subagent Mode
385
+
386
+ The table below shows which sections to include per dispatch mode. Unmarked sections (TDD Requirements, Files, Success Criteria, Completion) are **always included** in both modes.
387
+
388
+ | Section | Agent Teams Mode | Subagent Mode |
389
+ |---------|-----------------|---------------|
390
+ | Coordination (Native APIs) | Include in spawn prompt | Omit (not applicable) |
391
+ | Workflow Intelligence (Exarchos MCP) | Include in spawn prompt | Omit (hook injects) |
392
+ | Team Context | Include -- populated at spawn time | Omit (hook injects) |
393
+ | Historical Context | Include -- populated at spawn time | Omit (hook injects) |
394
+ | Quality Signals | Conditional -- include if hints non-empty | Conditional -- include if hints non-empty |
395
+ | Code Exploration Tools | Include | Include |
396
+ | Schema Sync | Include if task modifies API files | Include if task modifies API files |
397
+ | **Commit Strategy** | **Include -- REQUIRED** | **Include -- REQUIRED** |
398
+
399
+ ## MCP Auto-Loading
400
+
401
+ Teammates automatically load project MCP servers (including Exarchos). The Coordination and Workflow Intelligence sections guide WHICH tools to use, not HOW to access them. Do not include MCP connection instructions or tool registration details in the spawn prompt.
@@ -0,0 +1,124 @@
1
+ # Parallel Execution Strategy
2
+
3
+ ## Identifying Parallel Groups
4
+
5
+ From implementation plan:
6
+ ```markdown
7
+ ## Parallel Groups
8
+
9
+ Group A (can run simultaneously):
10
+ - Task 001: Types
11
+ - Task 002: Interfaces
12
+
13
+ Group B (depends on Group A):
14
+ - Task 003: Implementation
15
+ - Task 004: API handlers
16
+ ```
17
+
18
+ ## Dispatching Parallel Tasks
19
+
20
+ **Critical:** Use single message with multiple Task calls:
21
+
22
+ ```typescript
23
+ // CORRECT: Single message, parallel execution
24
+ Task({ model: "opus", description: "Task 001", prompt: "..." })
25
+ Task({ model: "opus", description: "Task 002", prompt: "..." })
26
+
27
+ // WRONG: Separate messages = sequential
28
+ ```
29
+
30
+ ## Agent Teams Dispatch
31
+
32
+ When using `--mode agent-team`, parallel execution uses named teammates instead of Task tool calls:
33
+
34
+ ### Creating the Team
35
+
36
+ Orchestrator activates delegate mode and describes the parallel work:
37
+
38
+ ```text
39
+ "Create a team with 3 teammates:
40
+ - teammate-1: Work in /path/.worktrees/group-a on tasks 1-2 (settings)
41
+ - teammate-2: Work in /path/.worktrees/group-b on tasks 3-5 (gate bridge)
42
+ - teammate-3: Work in /path/.worktrees/group-c on tasks 6-8 (content)"
43
+ ```
44
+
45
+ Each teammate receives the full implementer prompt content as context.
46
+
47
+ ### Self-Coordination
48
+
49
+ Teammates use Claude Code's native shared task list for claim/complete tracking. When a teammate becomes idle after completing its tasks, the `TeammateIdle` quality gate hook fires automatically, running quality checks and updating Exarchos workflow state (see SKILL.md State Bridge section).
50
+
51
+ ### One Team Per Session
52
+
53
+ Agent Teams supports one team per session. If you need more parallel groups than teammates, assign multiple tasks per teammate (sequential within the group).
54
+
55
+ ## Dispatch Mode Comparison
56
+
57
+ | Aspect | Task Tool (Subagent) | Agent Teams (Teammate) |
58
+ |--------|---------------------|----------------------|
59
+ | Parallel dispatch | Multiple `Task()` in one message | Named teammates in agent team |
60
+ | Waiting | `TaskOutput({ block: true })` | `TeammateIdle` hook (fires when teammate idle) |
61
+ | Visibility | None (background) | tmux split panes |
62
+ | Model control | `model: "opus"` per task | Session model for all |
63
+ | Max parallelism | Unlimited | One team, N teammates |
64
+ | Resume on crash | Task results preserved | Teammates lost (worktrees survive) |
65
+
66
+ ## Waiting for Parallel Completion
67
+
68
+ ```typescript
69
+ // Wait for all background tasks
70
+ TaskOutput({ task_id: "task-001-id" })
71
+ TaskOutput({ task_id: "task-002-id" })
72
+ ```
73
+
74
+ ## Model Selection Guide
75
+
76
+ | Task Type | Model | Reason |
77
+ |-----------|-------|--------|
78
+ | Code implementation | `opus` | Best quality for coding |
79
+ | Code review | `opus` | Thorough analysis |
80
+ | File search/exploration | (default) | Speed over quality |
81
+ | Simple queries | `haiku` | Fast, low cost |
82
+
83
+ **Note:** When using Agent Teams, all teammates inherit the session's model. Use Task tool dispatch if you need per-task model selection (e.g., `haiku` for simple queries, `opus` for implementation).
84
+
85
+ ## Agent Teams Dispatch Pattern
86
+
87
+ When using `--mode agent-team`, the orchestrator creates named teammates and delegates via natural language:
88
+
89
+ ### Dispatch Example
90
+
91
+ ```text
92
+ "Create a team with 4 teammates:
93
+ - wt1-schemas-views: Work in .worktrees/group-ab-schemas-views on Tasks 1-5 (event schemas + CQRS views)
94
+ - wt2-subagent: Work in .worktrees/group-c-subagent-context on Tasks 6-7 (SubagentStart enrichment)
95
+ - wt3-gates: Work in .worktrees/group-de-gates-lifecycle on Tasks 8-11 (TeammateIdle + lifecycle hooks)
96
+ - wt4-content: Work in .worktrees/group-f-skill-content on Tasks 12-13 (documentation updates)"
97
+ ```
98
+
99
+ Each teammate receives the full implementer prompt including TDD requirements, file paths, and commit strategy.
100
+
101
+ ### Subagent vs Agent Teams Parallelism
102
+
103
+ | Aspect | Task Tool (Subagent) | Agent Teams (Teammate) |
104
+ |--------|---------------------|----------------------|
105
+ | Parallelism | Multiple `Task()` calls in one message | Named teammates in one team |
106
+ | Cross-task deps | Orchestrator manages phases | Shared task list + unblocked task detection |
107
+ | Monitoring | `TaskOutput` polling | tmux panes + `TeammateIdle` hook |
108
+ | State updates | Orchestrator updates state | Hook auto-updates via state bridge |
109
+ | Model per task | Yes (`model: "opus"` per Task) | No (session model for all) |
110
+ | Quality gates | Manual via `post_delegation_check` action | Automatic via `TeammateIdle` hook |
111
+ | Recovery | Task results preserved | Worktrees survive, teammates lost |
112
+
113
+ ### Shared Task List Coordination
114
+
115
+ In Agent Teams mode, teammates coordinate via Claude Code's native shared task list:
116
+ 1. Orchestrator creates tasks with dependencies
117
+ 2. Teammates claim available (unblocked) tasks
118
+ 3. On task completion, `TeammateIdle` hook runs quality gates
119
+ 4. Hook scans task graph for newly unblocked work (dependencies all completed)
120
+ 5. Teammate picks up next task or goes idle
121
+
122
+ ### One Team Per Session
123
+
124
+ Agent Teams supports one team per session. For more parallel groups than teammates, assign sequential task chains to each teammate (e.g., "Do Task 1, then Task 2, then Task 3").
@@ -0,0 +1,172 @@
1
+ # Property-Based Testing Patterns
2
+
3
+ When a task has `testingStrategy.propertyTests: true`, write property tests alongside example tests during the TDD RED phase. Property tests use generators to produce random inputs and invariant assertions to verify that properties hold across the entire input space.
4
+
5
+ ## Roundtrip Pattern
6
+
7
+ For any encode/decode, serialize/deserialize, or transform/inverse-transform pair, the roundtrip property ensures no data is lost.
8
+
9
+ **TypeScript (fast-check):**
10
+
11
+ ```typescript
12
+ import { fc } from '@fast-check/vitest';
13
+
14
+ describe('codec', () => {
15
+ it.prop([fc.anything()], (input) => {
16
+ expect(decode(encode(input))).toEqual(input);
17
+ });
18
+
19
+ // Or with fc.assert:
20
+ it('roundtrip for strings', () => {
21
+ fc.assert(
22
+ fc.property(fc.string(), (s) => {
23
+ expect(decode(encode(s))).toBe(s);
24
+ })
25
+ );
26
+ });
27
+ });
28
+ ```
29
+
30
+ **C# (FsCheck):**
31
+
32
+ ```csharp
33
+ using FsCheck;
34
+
35
+ [Property]
36
+ public void Roundtrip_EncodeDecode(string input)
37
+ {
38
+ var encoded = Encode(input);
39
+ var decoded = Decode(encoded);
40
+ Assert.Equal(input, decoded);
41
+ }
42
+
43
+ // Or with Prop.ForAll:
44
+ [Test]
45
+ public void Roundtrip_SerializeDeserialize()
46
+ {
47
+ Prop.ForAll<MyRecord>(record =>
48
+ {
49
+ var json = Serialize(record);
50
+ var result = Deserialize(json);
51
+ return result.Equals(record);
52
+ }).QuickCheck();
53
+ }
54
+ ```
55
+
56
+ ## Invariant Pattern
57
+
58
+ For operations with mathematical or business invariants that must hold for all inputs.
59
+
60
+ **TypeScript (fast-check):**
61
+
62
+ ```typescript
63
+ describe('scoring', () => {
64
+ it.prop([fc.integer(), fc.integer()], (a, b) => {
65
+ const result = calculateScore(a, b);
66
+ expect(result).toBeGreaterThanOrEqual(0);
67
+ expect(result).toBeLessThanOrEqual(1);
68
+ });
69
+
70
+ it.prop([fc.array(fc.integer())], (items) => {
71
+ const result = computeTotal(items);
72
+ expect(result).toBeGreaterThanOrEqual(0);
73
+ });
74
+ });
75
+ ```
76
+
77
+ **C# (FsCheck):**
78
+
79
+ ```csharp
80
+ [Property]
81
+ public void Score_AlwaysInRange(int a, int b)
82
+ {
83
+ var score = CalculateScore(a, b);
84
+ Assert.InRange(score, 0.0, 1.0);
85
+ }
86
+
87
+ [Property]
88
+ public void Collection_SizeNeverNegative(List<int> items)
89
+ {
90
+ var result = ProcessItems(items);
91
+ Assert.True(result.Count >= 0);
92
+ }
93
+ ```
94
+
95
+ ## Idempotence Pattern
96
+
97
+ For operations where applying the function twice produces the same result as applying it once: `f(f(x)) === f(x)`.
98
+
99
+ **TypeScript (fast-check):**
100
+
101
+ ```typescript
102
+ describe('normalization', () => {
103
+ it.prop([fc.array(fc.integer())], (arr) => {
104
+ expect(sort(sort(arr))).toEqual(sort(arr));
105
+ });
106
+
107
+ it.prop([fc.string()], (input) => {
108
+ expect(normalize(normalize(input))).toBe(normalize(input));
109
+ });
110
+ });
111
+ ```
112
+
113
+ **C# (FsCheck):**
114
+
115
+ ```csharp
116
+ [Property]
117
+ public void Sort_Idempotent(List<int> items)
118
+ {
119
+ var once = Sort(items);
120
+ var twice = Sort(once);
121
+ Assert.Equal(once, twice);
122
+ }
123
+
124
+ [Property]
125
+ public void Normalize_Idempotent(string input)
126
+ {
127
+ var once = Normalize(input);
128
+ var twice = Normalize(once);
129
+ Assert.Equal(once, twice);
130
+ }
131
+ ```
132
+
133
+ ## Commutativity Pattern
134
+
135
+ For operations where order should not affect the result.
136
+
137
+ **TypeScript (fast-check):**
138
+
139
+ ```typescript
140
+ describe('event materialization', () => {
141
+ it.prop(
142
+ [fc.array(eventArb()), fc.array(eventArb())],
143
+ (eventsA, eventsB) => {
144
+ const resultAB = materialize([...eventsA, ...eventsB]);
145
+ const resultBA = materialize([...eventsB, ...eventsA]);
146
+ expect(resultAB).toEqual(resultBA);
147
+ }
148
+ );
149
+ });
150
+ ```
151
+
152
+ **C# (FsCheck):**
153
+
154
+ ```csharp
155
+ [Property]
156
+ public void Merge_Commutative(List<int> a, List<int> b)
157
+ {
158
+ var resultAB = Merge(a, b);
159
+ var resultBA = Merge(b, a);
160
+ Assert.Equal(resultAB, resultBA);
161
+ }
162
+ ```
163
+
164
+ ## Integration with TDD RED Phase
165
+
166
+ Property tests are written as part of the TDD RED phase, alongside example tests:
167
+
168
+ 1. **RED:** Write example test (specific case) AND property test (general invariant)
169
+ 2. **GREEN:** Implement minimum code to pass both
170
+ 3. **REFACTOR:** Extract generators, improve property descriptions
171
+
172
+ Property tests complement example tests -- they do not replace them. Example tests document specific behaviors; property tests verify invariants across the input domain.