cc-codeconductor 1.1.0 → 1.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 (355) hide show
  1. package/README.md +34 -12
  2. package/dist/core/config/codeconductor-config.d.ts +2 -1
  3. package/dist/core/presets/package-paths.d.ts +1 -0
  4. package/dist/core/runner/runner-target.d.ts +32 -0
  5. package/dist/core/verification/verification-runner.d.ts +7 -0
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.js +2934 -761
  8. package/dist/library.js +103 -14
  9. package/dist/validation/schemas.d.ts +294 -61
  10. package/package.json +4 -1
  11. package/presets/agy/AGENTS.md +11 -10
  12. package/presets/agy/hooks.json +3 -3
  13. package/presets/agy/scripts/invoke-hook.cjs +119 -0
  14. package/presets/agy/skills/backlog/SKILL.md +40 -70
  15. package/presets/agy/skills/cc-spec-mutation/SKILL.md +165 -0
  16. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +3 -0
  17. package/presets/agy/skills/evaluation/SKILL.md +61 -2
  18. package/presets/agy/skills/openspec/SKILL.md +49 -19
  19. package/presets/agy/skills/testing-tdd/SKILL.md +53 -0
  20. package/presets/agy/skills/using-cc-skills/SKILL.md +48 -0
  21. package/presets/agy/workflows/cc-api-contract.md +18 -0
  22. package/presets/agy/workflows/cc-ask.md +10 -10
  23. package/presets/agy/workflows/cc-council.md +4 -0
  24. package/presets/agy/workflows/cc-db-migration.md +18 -0
  25. package/presets/agy/workflows/cc-explore.md +2 -2
  26. package/presets/agy/workflows/cc-feature.md +22 -0
  27. package/presets/agy/workflows/cc-fix.md +18 -0
  28. package/presets/agy/workflows/cc-handoff.md +1 -1
  29. package/presets/agy/workflows/cc-iterative.md +14 -0
  30. package/presets/agy/workflows/cc-openspec.md +14 -0
  31. package/presets/agy/workflows/cc-prototype.md +1 -1
  32. package/presets/agy/workflows/cc-refactor.md +5 -1
  33. package/presets/agy/workflows/cc-review.md +5 -1
  34. package/presets/agy/workflows/cc-scorecard.md +2 -0
  35. package/presets/agy/workflows/cc-security.md +4 -0
  36. package/presets/agy/workflows/cc-spec-mutation.md +195 -0
  37. package/presets/agy/workflows/cc-tdd-cycle.md +15 -1
  38. package/presets/agy/workflows/cc-test-plan.md +5 -1
  39. package/presets/claude/commands/cc/api-contract.md +19 -1
  40. package/presets/claude/commands/cc/ask.md +1 -1
  41. package/presets/claude/commands/cc/backlog.md +1 -1
  42. package/presets/claude/commands/cc/clarify.md +1 -1
  43. package/presets/claude/commands/cc/council.md +4 -0
  44. package/presets/claude/commands/cc/db-migration.md +19 -1
  45. package/presets/claude/commands/cc/explore.md +1 -1
  46. package/presets/claude/commands/cc/feature.md +23 -1
  47. package/presets/claude/commands/cc/fix.md +22 -1
  48. package/presets/claude/commands/cc/handoff.md +1 -1
  49. package/presets/claude/commands/cc/iterative.md +15 -1
  50. package/presets/claude/commands/cc/openspec.md +15 -1
  51. package/presets/claude/commands/cc/prototype.md +1 -1
  52. package/presets/claude/commands/cc/refactor.md +5 -1
  53. package/presets/claude/commands/cc/review.md +8 -1
  54. package/presets/claude/commands/cc/scorecard.md +3 -1
  55. package/presets/claude/commands/cc/security.md +5 -1
  56. package/presets/claude/commands/cc/spec-mutation.md +194 -0
  57. package/presets/claude/commands/cc/tdd-cycle.md +18 -1
  58. package/presets/claude/commands/cc/test-plan.md +5 -1
  59. package/presets/claude/commands/cc/triage.md +1 -1
  60. package/presets/claude/settings.json +13 -11
  61. package/presets/claude/skills/android/SKILL.md +0 -1
  62. package/presets/claude/skills/api-versioning/SKILL.md +0 -1
  63. package/presets/claude/skills/backlog/SKILL.md +40 -70
  64. package/presets/claude/skills/django-orm/SKILL.md +0 -1
  65. package/presets/claude/skills/django-testing/SKILL.md +0 -1
  66. package/presets/claude/skills/evaluation/SKILL.md +47 -24
  67. package/presets/claude/skills/jpa-postgres/SKILL.md +0 -1
  68. package/presets/claude/skills/openspec/SKILL.md +46 -38
  69. package/presets/claude/skills/pagespeed-perf/SKILL.md +1 -2
  70. package/presets/claude/skills/python/SKILL.md +0 -1
  71. package/presets/claude/skills/python-django-stack/SKILL.md +0 -1
  72. package/presets/claude/skills/python-fastapi-stack/SKILL.md +0 -1
  73. package/presets/claude/skills/security/SKILL.md +0 -1
  74. package/presets/claude/skills/spring-boot-feature/SKILL.md +0 -1
  75. package/presets/claude/skills/spring-boot-kotlin/SKILL.md +0 -1
  76. package/presets/claude/skills/sqlalchemy/SKILL.md +0 -1
  77. package/presets/claude/skills/testing-strategy/SKILL.md +0 -1
  78. package/presets/claude/skills/testing-tdd/SKILL.md +53 -0
  79. package/presets/claude/skills/using-cc-skills/SKILL.md +48 -0
  80. package/presets/codex/AGENTS.md +19 -14
  81. package/presets/codex/commands/cc-ask.md +10 -10
  82. package/presets/codex/skills/android/SKILL.md +0 -1
  83. package/presets/codex/skills/api-versioning/SKILL.md +0 -1
  84. package/presets/codex/skills/backlog/SKILL.md +61 -0
  85. package/presets/codex/skills/cc-api-contract/SKILL.md +91 -0
  86. package/presets/codex/skills/cc-backlog/SKILL.md +108 -0
  87. package/presets/codex/skills/cc-clarify/SKILL.md +36 -0
  88. package/presets/codex/skills/cc-council/SKILL.md +96 -0
  89. package/presets/codex/skills/cc-db-migration/SKILL.md +92 -0
  90. package/presets/codex/skills/cc-explore/SKILL.md +40 -0
  91. package/presets/codex/skills/cc-feature/SKILL.md +162 -0
  92. package/presets/codex/skills/cc-fix/SKILL.md +172 -0
  93. package/presets/codex/skills/cc-handoff/SKILL.md +45 -0
  94. package/presets/codex/skills/cc-iterative/SKILL.md +150 -0
  95. package/presets/codex/skills/cc-openspec/SKILL.md +191 -0
  96. package/presets/codex/skills/cc-pagespeed/SKILL.md +124 -0
  97. package/presets/codex/skills/cc-prototype/SKILL.md +42 -0
  98. package/presets/codex/skills/cc-refactor/SKILL.md +167 -0
  99. package/presets/codex/skills/cc-review/SKILL.md +156 -0
  100. package/presets/codex/skills/cc-scorecard/SKILL.md +82 -0
  101. package/presets/codex/skills/cc-security/SKILL.md +186 -0
  102. package/presets/codex/skills/cc-spec-mutation/SKILL.md +196 -0
  103. package/presets/codex/skills/cc-tdd-cycle/SKILL.md +266 -0
  104. package/presets/codex/skills/cc-test-plan/SKILL.md +157 -0
  105. package/presets/codex/skills/cc-triage/SKILL.md +38 -0
  106. package/presets/codex/skills/django-orm/SKILL.md +0 -1
  107. package/presets/codex/skills/django-testing/SKILL.md +0 -1
  108. package/presets/codex/skills/evaluation/SKILL.md +65 -0
  109. package/presets/codex/skills/jpa-postgres/SKILL.md +0 -1
  110. package/presets/codex/skills/openspec/SKILL.md +66 -0
  111. package/presets/codex/skills/pagespeed-perf/SKILL.md +1 -2
  112. package/presets/codex/skills/python/SKILL.md +0 -1
  113. package/presets/codex/skills/python-django-stack/SKILL.md +0 -1
  114. package/presets/codex/skills/python-fastapi-stack/SKILL.md +0 -1
  115. package/presets/codex/skills/spring-boot-feature/SKILL.md +0 -1
  116. package/presets/codex/skills/spring-boot-kotlin/SKILL.md +0 -1
  117. package/presets/codex/skills/sqlalchemy/SKILL.md +0 -1
  118. package/presets/codex/skills/testing-strategy/SKILL.md +0 -1
  119. package/presets/codex/skills/testing-tdd/SKILL.md +53 -0
  120. package/presets/codex/skills/using-cc-skills/SKILL.md +48 -0
  121. package/presets/cursor/agents/architect.md +1 -1
  122. package/presets/cursor/agents/complexity-auditor.md +1 -1
  123. package/presets/cursor/agents/contract-builder.md +1 -1
  124. package/presets/cursor/agents/docs.md +1 -1
  125. package/presets/cursor/agents/goal-planner.md +1 -1
  126. package/presets/cursor/agents/implementer.md +2 -2
  127. package/presets/cursor/agents/orchestrator.md +3 -3
  128. package/presets/cursor/agents/reviewer.md +4 -4
  129. package/presets/cursor/agents/security-reviewer.md +1 -1
  130. package/presets/cursor/agents/task-coach.md +1 -1
  131. package/presets/cursor/agents/tester.md +1 -1
  132. package/presets/cursor/commands/cc/api-contract.md +19 -1
  133. package/presets/cursor/commands/cc/ask.md +1 -1
  134. package/presets/cursor/commands/cc/backlog.md +1 -1
  135. package/presets/cursor/commands/cc/clarify.md +1 -1
  136. package/presets/cursor/commands/cc/council.md +4 -0
  137. package/presets/cursor/commands/cc/db-migration.md +19 -1
  138. package/presets/cursor/commands/cc/explore.md +1 -1
  139. package/presets/cursor/commands/cc/feature.md +23 -1
  140. package/presets/cursor/commands/cc/fix.md +22 -1
  141. package/presets/cursor/commands/cc/handoff.md +1 -1
  142. package/presets/cursor/commands/cc/iterative.md +15 -1
  143. package/presets/cursor/commands/cc/openspec.md +15 -1
  144. package/presets/cursor/commands/cc/prototype.md +1 -1
  145. package/presets/cursor/commands/cc/refactor.md +5 -1
  146. package/presets/cursor/commands/cc/review.md +5 -1
  147. package/presets/cursor/commands/cc/scorecard.md +3 -1
  148. package/presets/cursor/commands/cc/security.md +5 -1
  149. package/presets/cursor/commands/cc/spec-mutation.md +194 -0
  150. package/presets/cursor/commands/cc/tdd-cycle.md +15 -1
  151. package/presets/cursor/commands/cc/test-plan.md +5 -1
  152. package/presets/cursor/commands/cc/triage.md +1 -1
  153. package/presets/cursor/skills/android/SKILL.md +0 -1
  154. package/presets/cursor/skills/api-versioning/SKILL.md +0 -1
  155. package/presets/cursor/skills/astro/SKILL.md +0 -1
  156. package/presets/cursor/skills/auth-token-inspector/SKILL.md +0 -1
  157. package/presets/cursor/skills/backlog/SKILL.md +40 -70
  158. package/presets/cursor/skills/code-review/SKILL.md +0 -1
  159. package/presets/cursor/skills/django-orm/SKILL.md +0 -1
  160. package/presets/cursor/skills/django-testing/SKILL.md +0 -1
  161. package/presets/cursor/skills/django-uv/SKILL.md +0 -1
  162. package/presets/cursor/skills/drizzle-schema-architect/SKILL.md +0 -1
  163. package/presets/cursor/skills/evaluation/SKILL.md +61 -4
  164. package/presets/cursor/skills/fastapi-pydantic-strict/SKILL.md +0 -1
  165. package/presets/cursor/skills/jpa-nplusone-detector/SKILL.md +0 -1
  166. package/presets/cursor/skills/jpa-postgres/SKILL.md +0 -1
  167. package/presets/cursor/skills/livewire-alpine-bridge/SKILL.md +0 -1
  168. package/presets/cursor/skills/nextjs-typescript/SKILL.md +0 -1
  169. package/presets/cursor/skills/openspec/SKILL.md +46 -36
  170. package/presets/cursor/skills/pagespeed-perf/SKILL.md +1 -2
  171. package/presets/cursor/skills/python/SKILL.md +0 -1
  172. package/presets/cursor/skills/python-django-stack/SKILL.md +0 -1
  173. package/presets/cursor/skills/python-fastapi-stack/SKILL.md +0 -1
  174. package/presets/cursor/skills/security/SKILL.md +0 -1
  175. package/presets/cursor/skills/seo-analytics-injector/SKILL.md +0 -1
  176. package/presets/cursor/skills/spring-auth-auditor/SKILL.md +0 -1
  177. package/presets/cursor/skills/spring-boot-feature/SKILL.md +0 -1
  178. package/presets/cursor/skills/spring-boot-kotlin/SKILL.md +0 -1
  179. package/presets/cursor/skills/spring-boot-testing-strategy/SKILL.md +0 -1
  180. package/presets/cursor/skills/sqlalchemy/SKILL.md +0 -1
  181. package/presets/cursor/skills/tailwind-responsive-auditor/SKILL.md +0 -1
  182. package/presets/cursor/skills/tdd-mutation-tester/SKILL.md +0 -1
  183. package/presets/cursor/skills/testing-tdd/SKILL.md +35 -574
  184. package/presets/cursor/skills/using-cc-skills/SKILL.md +48 -0
  185. package/presets/gemini/GEMINI.md +38 -0
  186. package/presets/gemini/commands/cc/api-contract.toml +86 -0
  187. package/presets/gemini/commands/cc/ask.toml +54 -0
  188. package/presets/gemini/commands/cc/backlog.toml +103 -0
  189. package/presets/gemini/commands/cc/clarify.toml +31 -0
  190. package/presets/gemini/commands/cc/council.toml +91 -0
  191. package/presets/gemini/commands/cc/db-migration.toml +87 -0
  192. package/presets/gemini/commands/cc/explore.toml +35 -0
  193. package/presets/gemini/commands/cc/feature.toml +157 -0
  194. package/presets/gemini/commands/cc/fix.toml +167 -0
  195. package/presets/gemini/commands/cc/handoff.toml +40 -0
  196. package/presets/gemini/commands/cc/iterative.toml +145 -0
  197. package/presets/gemini/commands/cc/openspec.toml +186 -0
  198. package/presets/gemini/commands/cc/pagespeed.toml +119 -0
  199. package/presets/gemini/commands/cc/prototype.toml +37 -0
  200. package/presets/gemini/commands/cc/refactor.toml +162 -0
  201. package/presets/gemini/commands/cc/review.toml +151 -0
  202. package/presets/gemini/commands/cc/scorecard.toml +77 -0
  203. package/presets/gemini/commands/cc/security.toml +181 -0
  204. package/presets/gemini/commands/cc/spec-mutation.toml +191 -0
  205. package/presets/gemini/commands/cc/tdd-cycle.toml +261 -0
  206. package/presets/gemini/commands/cc/test-plan.toml +152 -0
  207. package/presets/gemini/commands/cc/triage.toml +33 -0
  208. package/presets/gemini/settings.json +3 -0
  209. package/presets/opencode/README.md +24 -21
  210. package/presets/opencode/agents/architect.md +6 -0
  211. package/presets/opencode/agents/docs.md +1 -1
  212. package/presets/opencode/agents/implementer.md +7 -0
  213. package/presets/opencode/agents/reviewer.md +7 -1
  214. package/presets/opencode/agents/tester.md +6 -0
  215. package/presets/opencode/commands/cc-api-contract.md +18 -0
  216. package/presets/opencode/commands/cc-ask.md +10 -10
  217. package/presets/opencode/commands/cc-council.md +4 -0
  218. package/presets/opencode/commands/cc-db-migration.md +18 -0
  219. package/presets/opencode/commands/cc-explore.md +2 -2
  220. package/presets/opencode/commands/cc-feature.md +22 -0
  221. package/presets/opencode/commands/cc-fix.md +21 -0
  222. package/presets/opencode/commands/cc-handoff.md +1 -1
  223. package/presets/opencode/commands/cc-iterative.md +14 -0
  224. package/presets/opencode/commands/cc-openspec.md +14 -0
  225. package/presets/opencode/commands/cc-prototype.md +1 -1
  226. package/presets/opencode/commands/cc-refactor.md +5 -1
  227. package/presets/opencode/commands/cc-review.md +5 -1
  228. package/presets/opencode/commands/cc-scorecard.md +2 -0
  229. package/presets/opencode/commands/cc-security.md +4 -0
  230. package/presets/opencode/commands/cc-spec-mutation.md +194 -0
  231. package/presets/opencode/commands/cc-tdd-cycle.md +15 -1
  232. package/presets/opencode/commands/cc-test-plan.md +5 -1
  233. package/presets/opencode/opencode.jsonc +1 -1
  234. package/presets/opencode/prompts/v1.0.0/README.md +1 -1
  235. package/presets/opencode/prompts/v1.0.0/architect.md +6 -0
  236. package/presets/opencode/prompts/v1.0.0/docs.md +1 -1
  237. package/presets/opencode/prompts/v1.0.0/implementer.md +7 -0
  238. package/presets/opencode/prompts/v1.0.0/reviewer.md +7 -1
  239. package/presets/opencode/prompts/v1.0.0/tester.md +6 -0
  240. package/presets/opencode/skills/android/SKILL.md +0 -1
  241. package/presets/opencode/skills/api-versioning/SKILL.md +0 -1
  242. package/presets/opencode/skills/astro/SKILL.md +0 -1
  243. package/presets/opencode/skills/auth-token-inspector/SKILL.md +0 -1
  244. package/presets/opencode/skills/backlog/SKILL.md +40 -70
  245. package/presets/opencode/skills/code-review/SKILL.md +0 -1
  246. package/presets/opencode/skills/django-orm/SKILL.md +0 -1
  247. package/presets/opencode/skills/django-testing/SKILL.md +0 -1
  248. package/presets/opencode/skills/django-uv/SKILL.md +0 -1
  249. package/presets/opencode/skills/drizzle-schema-architect/SKILL.md +0 -1
  250. package/presets/opencode/skills/evaluation/SKILL.md +61 -2
  251. package/presets/opencode/skills/fastapi-pydantic-strict/SKILL.md +0 -1
  252. package/presets/opencode/skills/jpa-nplusone-detector/SKILL.md +0 -1
  253. package/presets/opencode/skills/jpa-postgres/SKILL.md +0 -1
  254. package/presets/opencode/skills/livewire-alpine-bridge/SKILL.md +0 -1
  255. package/presets/opencode/skills/nextjs-typescript/SKILL.md +0 -1
  256. package/presets/opencode/skills/openspec/SKILL.md +46 -34
  257. package/presets/opencode/skills/pagespeed-perf/SKILL.md +1 -2
  258. package/presets/opencode/skills/python/SKILL.md +0 -1
  259. package/presets/opencode/skills/python-django-stack/SKILL.md +0 -1
  260. package/presets/opencode/skills/python-fastapi-stack/SKILL.md +0 -1
  261. package/presets/opencode/skills/security/SKILL.md +0 -1
  262. package/presets/opencode/skills/seo-analytics-injector/SKILL.md +0 -1
  263. package/presets/opencode/skills/spring-auth-auditor/SKILL.md +0 -1
  264. package/presets/opencode/skills/spring-boot-feature/SKILL.md +0 -1
  265. package/presets/opencode/skills/spring-boot-kotlin/SKILL.md +0 -1
  266. package/presets/opencode/skills/spring-boot-testing-strategy/SKILL.md +0 -1
  267. package/presets/opencode/skills/sqlalchemy/SKILL.md +0 -1
  268. package/presets/opencode/skills/tailwind-responsive-auditor/SKILL.md +0 -1
  269. package/presets/opencode/skills/tdd-mutation-tester/SKILL.md +0 -1
  270. package/presets/opencode/skills/testing-tdd/SKILL.md +35 -574
  271. package/presets/opencode/skills/using-cc-skills/SKILL.md +48 -0
  272. package/presets/pi/AGENTS.md +43 -0
  273. package/presets/pi/settings.json +3 -0
  274. package/presets/seo-hotel/skills/astro-seo/SKILL.md +0 -1
  275. package/presets/seo-hotel/skills/geo-readiness/SKILL.md +0 -1
  276. package/presets/seo-hotel/skills/off-page/SKILL.md +0 -1
  277. package/presets/seo-hotel/skills/schema-validator/SKILL.md +0 -1
  278. package/presets/seo-hotel/skills/seo-audit/SKILL.md +0 -1
  279. package/presets/shared/invoke-hook.cjs +119 -0
  280. package/presets/shared/mutation_runner.py +273 -0
  281. package/src/presets/council/council.yml +12 -9
  282. package/src/presets/manifests/agy.yml +3 -1
  283. package/src/presets/manifests/claude.yml +3 -0
  284. package/src/presets/manifests/gemini.yml +15 -0
  285. package/src/presets/manifests/pi.yml +25 -0
  286. package/src/presets/models/agy.yml +2 -128
  287. package/src/presets/models/claude.yml +2 -144
  288. package/src/presets/models/codex.yml +2 -144
  289. package/src/presets/models/cursor.yml +2 -144
  290. package/src/presets/models/gemini.yml +2 -144
  291. package/src/presets/models/opencode.yml +3 -101
  292. package/src/presets/models/pi.yml +5 -0
  293. package/src/presets/models/roles.yml +193 -0
  294. package/src/presets/shared-skills.yml +64 -0
  295. package/src/presets/targets/agy.yml +11 -0
  296. package/src/presets/targets/claude.yml +12 -0
  297. package/src/presets/targets/codex.yml +14 -0
  298. package/src/presets/targets/cursor.yml +11 -0
  299. package/src/presets/targets/gemini.yml +15 -0
  300. package/src/presets/targets/opencode.yml +13 -0
  301. package/src/presets/targets/pi.yml +12 -0
  302. package/presets/agy/scripts/post-tool.sh +0 -25
  303. package/presets/agy/scripts/pre-tool.sh +0 -56
  304. package/presets/opencode/prompts/v0.1.0/DEPRECATED.md +0 -11
  305. package/presets/opencode/prompts/v0.1.0/architect.md +0 -213
  306. package/presets/opencode/prompts/v0.1.0/docs.md +0 -181
  307. package/presets/opencode/prompts/v0.1.0/implementer.md +0 -154
  308. package/presets/opencode/prompts/v0.1.0/orchestrator.md +0 -169
  309. package/presets/opencode/prompts/v0.1.0/repo-explorer.md +0 -102
  310. package/presets/opencode/prompts/v0.1.0/reviewer.md +0 -183
  311. package/presets/opencode/prompts/v0.1.0/task-coach.md +0 -142
  312. package/presets/opencode/prompts/v0.1.0/tester.md +0 -160
  313. package/presets/opencode/prompts/v0.2.0/DEPRECATED.md +0 -11
  314. package/presets/opencode/prompts/v0.2.0/architect.md +0 -219
  315. package/presets/opencode/prompts/v0.2.0/docs.md +0 -187
  316. package/presets/opencode/prompts/v0.2.0/implementer.md +0 -160
  317. package/presets/opencode/prompts/v0.2.0/orchestrator.md +0 -238
  318. package/presets/opencode/prompts/v0.2.0/repo-explorer.md +0 -108
  319. package/presets/opencode/prompts/v0.2.0/reviewer.md +0 -190
  320. package/presets/opencode/prompts/v0.2.0/task-coach.md +0 -153
  321. package/presets/opencode/prompts/v0.2.0/tester.md +0 -249
  322. package/presets/opencode/prompts/v0.3.0/DEPRECATED.md +0 -11
  323. package/presets/opencode/prompts/v0.3.0/architect.md +0 -221
  324. package/presets/opencode/prompts/v0.3.0/docs.md +0 -189
  325. package/presets/opencode/prompts/v0.3.0/implementer.md +0 -162
  326. package/presets/opencode/prompts/v0.3.0/orchestrator.md +0 -360
  327. package/presets/opencode/prompts/v0.3.0/repo-explorer.md +0 -110
  328. package/presets/opencode/prompts/v0.3.0/reviewer.md +0 -225
  329. package/presets/opencode/prompts/v0.3.0/task-coach.md +0 -155
  330. package/presets/opencode/prompts/v0.3.0/tester.md +0 -251
  331. package/presets/opencode/prompts/v0.4.0/DEPRECATED.md +0 -11
  332. package/presets/opencode/prompts/v0.4.0/architect.md +0 -221
  333. package/presets/opencode/prompts/v0.4.0/complexity-auditor.md +0 -89
  334. package/presets/opencode/prompts/v0.4.0/docs.md +0 -189
  335. package/presets/opencode/prompts/v0.4.0/implementer.md +0 -162
  336. package/presets/opencode/prompts/v0.4.0/orchestrator.md +0 -348
  337. package/presets/opencode/prompts/v0.4.0/repo-explorer.md +0 -110
  338. package/presets/opencode/prompts/v0.4.0/reviewer.md +0 -225
  339. package/presets/opencode/prompts/v0.4.0/task-coach.md +0 -155
  340. package/presets/opencode/prompts/v0.4.0/tester.md +0 -251
  341. package/presets/opencode/prompts/v0.5.0/architect.md +0 -222
  342. package/presets/opencode/prompts/v0.5.0/complexity-auditor.md +0 -91
  343. package/presets/opencode/prompts/v0.5.0/contract-builder.md +0 -84
  344. package/presets/opencode/prompts/v0.5.0/docs.md +0 -190
  345. package/presets/opencode/prompts/v0.5.0/goal-planner.md +0 -80
  346. package/presets/opencode/prompts/v0.5.0/implementer.md +0 -171
  347. package/presets/opencode/prompts/v0.5.0/orchestrator.md +0 -388
  348. package/presets/opencode/prompts/v0.5.0/repo-explorer.md +0 -111
  349. package/presets/opencode/prompts/v0.5.0/reviewer.md +0 -248
  350. package/presets/opencode/prompts/v0.5.0/security-reviewer.md +0 -123
  351. package/presets/opencode/prompts/v0.5.0/task-coach.md +0 -156
  352. package/presets/opencode/prompts/v0.5.0/tester.md +0 -252
  353. package/presets/opencode/prompts/v0.6.0/implementer.md +0 -35
  354. package/presets/opencode/prompts/v0.6.0/planner.md +0 -36
  355. package/presets/opencode/prompts/v0.6.0/reviewer.md +0 -40
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-codeconductor",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "A multi-agent orchestration framework for AI-assisted software engineering workflows.",
5
5
  "keywords": [
6
6
  "ai",
@@ -54,6 +54,9 @@
54
54
  "lint": "bun run scripts/lint.ts",
55
55
  "check:coverage": "bun run scripts/check-coverage.ts",
56
56
  "check:prompt-changelog": "bun run scripts/check-prompt-changelog.ts",
57
+ "check:drift": "bun run scripts/check-drift.ts",
58
+ "render:commands": "bun run scripts/render-agent-commands.ts",
59
+ "sync:skills": "bun run scripts/sync-shared-skills.ts",
57
60
  "release:patch": "bash release.sh patch",
58
61
  "release:minor": "bash release.sh minor",
59
62
  "release:major": "bash release.sh major",
@@ -72,10 +72,11 @@ Antigravity CLI loads custom slash commands from `.agents/workflows/*.md`. The f
72
72
  | `/cc-review` | Runs a structured, multi-perspective code review and audit |
73
73
  | `/cc-test-plan` | Generates a structured test plan for a given scope |
74
74
  | `/cc-tdd-cycle` | Runs a Test-Driven Development (TDD) cycle |
75
+ | `/cc-spec-mutation` | Spec-locked TDD with SHA-256 freeze and mutation-testing gate |
75
76
  | `/cc-api-contract`| Handles API contract modification and validation |
76
77
  | `/cc-db-migration`| Coordinates database schema migrations safely |
77
78
  | `/cc-iterative` | Advanced iterative workflow — wayfinding, grilling, TDD, council |
78
- | `/cc-explore` | Map the repo and recommend the next `/cc:` command |
79
+ | `/cc-explore` | Map the repo and recommend the next `/cc-` command |
79
80
  | `/cc-triage` | Classify type, risk, and destination workflow |
80
81
  | `/cc-prototype` | Disposable spike in an isolated worktree |
81
82
  | `/cc-handoff` | Compact the session to `.codeconductor/` Markdown |
@@ -141,7 +142,7 @@ When multiple signals apply, take the highest risk level. Do not average.
141
142
 
142
143
  **Does not:** Write code. Execute tests. Push to any branch.
143
144
 
144
- **Model:** `{{MODEL_GEMINI}}`
145
+ **Model:** `{{MODEL}}`
145
146
 
146
147
  **Responsibilities:**
147
148
  1. Validate the Task Card before doing anything else.
@@ -189,7 +190,7 @@ High-risk checkpoint: [yes | no — if yes, describe what triggers a stop]
189
190
  - bash: `deny`
190
191
  - network: `deny`
191
192
 
192
- **Model:** `{{MODEL_GEMINI}}`
193
+ **Model:** `{{MODEL}}`
193
194
 
194
195
  **Intake process:**
195
196
  1. Read the entire request before asking anything.
@@ -234,7 +235,7 @@ High-risk checkpoint: [yes | no — if yes, describe what triggers a stop]
234
235
  - bash: `allow` (git log, git diff, git status)
235
236
  - network: `deny`
236
237
 
237
- **Model:** `{{MODEL_GEMINI}}`
238
+ **Model:** `{{MODEL}}`
238
239
 
239
240
  **Repo Map format:**
240
241
  ```markdown
@@ -269,7 +270,7 @@ High-risk checkpoint: [yes | no — if yes, describe what triggers a stop]
269
270
  - bash: `deny`
270
271
  - network: `deny`
271
272
 
272
- **Model:** `{{MODEL_GEMINI}}`
273
+ **Model:** `{{MODEL}}`
273
274
 
274
275
  **Does not:** Write files. Execute commands. Make routing decisions.
275
276
 
@@ -293,7 +294,7 @@ When the orchestrator receives a GoalGraph, it delegates tasks in dependency ord
293
294
  - bash: `deny`
294
295
  - network: `deny`
295
296
 
296
- **Model:** `{{MODEL_GEMINI}}`
297
+ **Model:** `{{MODEL}}`
297
298
 
298
299
  **Technical Plan format:**
299
300
  ```markdown
@@ -330,7 +331,7 @@ When the orchestrator receives a GoalGraph, it delegates tasks in dependency ord
330
331
  - bash: `allow` (build, test, and lint commands only)
331
332
  - network: `deny`
332
333
 
333
- **Model:** `{{MODEL_GEMINI}}`
334
+ **Model:** `{{MODEL}}`
334
335
 
335
336
  **Pre-implementation checklist:**
336
337
  1. Create a Git Worktree: `git worktree add ../<branch>-session <branch>`
@@ -371,7 +372,7 @@ When the orchestrator receives a GoalGraph, it delegates tasks in dependency ord
371
372
  - bash: `allow` (test commands only)
372
373
  - network: `deny`
373
374
 
374
- **Model:** `{{MODEL_GEMINI}}`
375
+ **Model:** `{{MODEL}}`
375
376
 
376
377
  **Coverage Summary format:**
377
378
  ```markdown
@@ -400,7 +401,7 @@ When the orchestrator receives a GoalGraph, it delegates tasks in dependency ord
400
401
  - bash: `allow` (git diff, git status, test commands)
401
402
  - network: `deny`
402
403
 
403
- **Model:** `{{MODEL_GEMINI}}`
404
+ **Model:** `{{MODEL}}`
404
405
 
405
406
  **Review Axes & Gates:**
406
407
  - **Simplicity Gate**: Flag overcomplicated/speculative code. Ask: "Would a senior engineer say this is overbuilt?"
@@ -458,7 +459,7 @@ When the orchestrator receives a GoalGraph, it delegates tasks in dependency ord
458
459
  - bash: `deny`
459
460
  - network: `deny`
460
461
 
461
- **Model:** `{{MODEL_GEMINI}}`
462
+ **Model:** `{{MODEL}}`
462
463
 
463
464
  ---
464
465
 
@@ -7,7 +7,7 @@
7
7
  "hooks": [
8
8
  {
9
9
  "type": "command",
10
- "command": "if [ -f \"./.agents/scripts/post-tool.sh\" ]; then bash ./.agents/scripts/post-tool.sh; else bash \"$HOME/.gemini/config/scripts/post-tool.sh\"; fi"
10
+ "command": "node -e \"const fs=require('fs');const c=['scripts/invoke-hook.cjs','.agents/scripts/invoke-hook.cjs'];const p=c.find(f=>fs.existsSync(f));if(p){require(require('path').resolve(p));}else{const body=process.argv.includes('post-tool')?{}:{decision:'allow'};process.stdout.write(JSON.stringify(body)+'\\n');process.exit(0);}\" post-tool --format=agy"
11
11
  }
12
12
  ]
13
13
  }
@@ -17,11 +17,11 @@
17
17
  "enabled": true,
18
18
  "PreToolUse": [
19
19
  {
20
- "matcher": "run_command|write_to_file|replace_file_content|multi_replace_file_content|view_file",
20
+ "matcher": "run_command|write_to_file|replace_file_content|multi_replace_file_content",
21
21
  "hooks": [
22
22
  {
23
23
  "type": "command",
24
- "command": "if [ -f \"./.agents/scripts/pre-tool.sh\" ]; then bash ./.agents/scripts/pre-tool.sh; else bash \"$HOME/.gemini/config/scripts/pre-tool.sh\"; fi"
24
+ "command": "node -e \"const fs=require('fs');const c=['scripts/invoke-hook.cjs','.agents/scripts/invoke-hook.cjs'];const p=c.find(f=>fs.existsSync(f));if(p){require(require('path').resolve(p));}else{const body=process.argv.includes('post-tool')?{}:{decision:'allow'};process.stdout.write(JSON.stringify(body)+'\\n');process.exit(0);}\" pre-tool --format=agy"
25
25
  }
26
26
  ]
27
27
  }
@@ -0,0 +1,119 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { spawnSync } = require('node:child_process');
5
+ const { existsSync } = require('node:fs');
6
+ const { join, resolve } = require('node:path');
7
+
8
+ const VALID_EVENTS = ['pre-tool', 'post-tool', 'session-start'];
9
+ const SPAWN_TIMEOUT = 10000;
10
+
11
+ const rawArgs = process.argv.slice(1);
12
+ const args = rawArgs.filter((arg) => {
13
+ if (VALID_EVENTS.includes(arg) || arg.startsWith('-')) return true;
14
+ return false;
15
+ });
16
+
17
+ const event = args.find((a) => VALID_EVENTS.includes(a)) || 'pre-tool';
18
+ const extra = args.filter((a) => a !== event);
19
+ const isAgy = process.argv.some((a) => a === '--format=agy') || extra.includes('--format=agy');
20
+
21
+ function findProjectRoot() {
22
+ const candidates = [
23
+ process.env.PROJECT_ROOT,
24
+ process.env.WORKSPACE_DIR,
25
+ resolve(__dirname, '..', '..'),
26
+ process.cwd(),
27
+ ].filter(Boolean);
28
+
29
+ for (const dir of candidates) {
30
+ if (
31
+ existsSync(join(dir, 'package.json')) ||
32
+ existsSync(join(dir, '.git')) ||
33
+ existsSync(join(dir, '.agents')) ||
34
+ existsSync(join(dir, '.claude'))
35
+ ) {
36
+ return dir;
37
+ }
38
+ }
39
+ return resolve(__dirname, '..', '..');
40
+ }
41
+
42
+ const projectRoot = findProjectRoot();
43
+
44
+ /**
45
+ * Run one candidate runner. Stdout/stderr are captured (not inherited) so a
46
+ * candidate that writes partial output before failing can never leak onto
47
+ * this process's real stdout ahead of a later candidate's output or the
48
+ * fallback JSON — every event this process ever emits on stdout must be a
49
+ * single clean document. Stderr is diagnostic-only and safe to relay
50
+ * unconditionally; stdout is only ever relayed on the two branches that
51
+ * immediately exit, so nothing else can write to stdout afterward.
52
+ */
53
+ function tryRun(bin, runArgs) {
54
+ try {
55
+ const result = spawnSync(bin, runArgs, {
56
+ cwd: projectRoot,
57
+ stdio: ['inherit', 'pipe', 'pipe'],
58
+ windowsHide: true,
59
+ env: process.env,
60
+ encoding: 'utf8',
61
+ timeout: SPAWN_TIMEOUT,
62
+ });
63
+ if (result.error) {
64
+ return false;
65
+ }
66
+ if (result.stderr) {
67
+ process.stderr.write(result.stderr);
68
+ }
69
+ if (result.status === 0) {
70
+ if (result.stdout) process.stdout.write(result.stdout);
71
+ process.exit(0);
72
+ }
73
+ if (!isAgy && result.status === 2) {
74
+ process.exit(2);
75
+ }
76
+ return false;
77
+ } catch {
78
+ return false;
79
+ }
80
+ }
81
+
82
+ function fallback() {
83
+ if (isAgy) {
84
+ if (event === 'post-tool' || event === 'session-start') {
85
+ process.stdout.write('{}\n');
86
+ } else {
87
+ process.stdout.write('{"decision":"allow"}\n');
88
+ }
89
+ }
90
+ process.exit(0);
91
+ }
92
+
93
+ try {
94
+ // spawnSync('bun', ['--version']) as a pre-check before every real attempt
95
+ // used to cost a second subprocess on every single hook invocation. A
96
+ // missing/unrunnable 'bun' already surfaces as `result.error` inside
97
+ // tryRun(), so the pre-check is redundant — dropping it halves the spawn
98
+ // count (and the worst-case latency) for the common case where bun exists.
99
+ const srcMain = join(projectRoot, 'src', 'cli', 'main.ts');
100
+ if (existsSync(srcMain)) {
101
+ tryRun('bun', ['run', srcMain, 'hook', event, ...extra]);
102
+ }
103
+
104
+ const packaged = join(projectRoot, 'node_modules', 'cc-codeconductor', 'dist', 'index.js');
105
+ if (existsSync(packaged)) {
106
+ tryRun(process.execPath, [packaged, 'hook', event, ...extra]);
107
+ }
108
+
109
+ const localDist = join(projectRoot, 'dist', 'index.js');
110
+ if (existsSync(localDist)) {
111
+ tryRun(process.execPath, [localDist, 'hook', event, ...extra]);
112
+ }
113
+
114
+ tryRun('npx', ['--no-install', 'cc-codeconductor', 'hook', event, ...extra]);
115
+ } catch {
116
+ // Ignore errors in runner attempts
117
+ }
118
+
119
+ fallback();
@@ -1,91 +1,61 @@
1
1
  ---
2
2
  name: backlog
3
3
  description: >
4
- Author BACKLOG.md and OpenSpec change folders for CodeConductor.
5
- Trigger: /cc-backlog, /cc:backlog, creating or appending backlog items,
6
- writing BACKLOG.md, or preparing work for /cc-openspec.
4
+ Guides agents through authoring BACKLOG.md and OpenSpec change folders.
5
+ Use when running /cc-backlog or /cc:backlog, creating or appending backlog
6
+ items, or preparing work for /cc-openspec. Delivery is skill openspec.
7
7
  ---
8
8
 
9
9
  # Backlog authoring
10
10
 
11
- Use this skill to **create or append** `BACKLOG.md` and generate OpenSpec
12
- change docs. Delivery of an existing item is `/cc-openspec` (skill `openspec`).
11
+ ## Overview
13
12
 
14
- ## BACKLOG.md contract
13
+ Create or append `BACKLOG.md`, then `openspec validate` / `plan`. Do not deliver
14
+ the item here.
15
15
 
16
- Canonical template: `presets/templates/BACKLOG.md` (or the installed copy).
17
- Required sections:
16
+ ## When to Use
18
17
 
19
- - `## Global` — Product, Strategy, Policy, Review required, TDD required
20
- - `## Items` — active entries
21
- - `## Archive` — completed entries (never re-execute; never rewrite)
18
+ - `/cc-backlog`, first backlog in a repo, or appending `### BC-xxx` items
22
19
 
23
- Each item: `### BC-001 | Short title` with Priority (P0–P3), Status, Type,
24
- Depends on, Description, Scope, Out of scope, Acceptance (measurable checklist).
20
+ **NOT** for executing an item (`openspec`) or for scorecards (`evaluation`).
25
21
 
26
- Status after grilling: `READY`. `openspec plan` then moves the item to `PLANNED`.
22
+ ## Process
27
23
 
28
- ## Create vs append
24
+ 1. If `graphify-out/graph.json` exists, `graphify query "<objectives>"`. Then
25
+ `repo-explorer`. Scope names real files.
26
+ 2. Invoke `task-coach`. One grilling question per assumption. Reject vague
27
+ acceptance ("improve UX"). At most 3 `[NEEDS CLARIFICATION]`.
28
+ 3. `ccep evaluate --command backlog`. If `stop`, wait for the human.
29
+ 4. Create `BACKLOG.md` from `presets/templates/BACKLOG.md` or append under
30
+ `## Items`. Do not rewrite `## Global` or `## Archive`.
31
+ 5. Next ID = max numeric suffix in Items + Archive + 1, zero-padded (`BC-013`).
32
+ 6. `bun run dev openspec validate` (or `npx cc-codeconductor`). Fix until valid.
33
+ 7. `openspec plan BC-xxx` for each **new** item this run. Then tell the user
34
+ to run `/cc-openspec`.
29
35
 
30
- - **No `BACKLOG.md`:** create it from the template. Set Global `Product` from
31
- `package.json` `name` when present.
32
- - **File exists:** append new `### BC-xxx` blocks under `## Items`. Do not
33
- rewrite `## Global` or `## Archive`.
36
+ Required sections: `## Global`, `## Items`, `## Archive`. Each item:
37
+ `### BC-001 | Title` with Priority, Status (`READY` after grilling), Type,
38
+ Depends on, Description, Scope, Out of scope, Acceptance.
34
39
 
35
- Next ID = max numeric suffix across Items and Archive, plus one, zero-padded
36
- to three digits (`BC-013` after `BC-012`).
40
+ Local artifacts (`BACKLOG.md`, `openspec/`, `.codeconductor/openspec-state.json`)
41
+ are gitignored in consumer projects. Do not `git add` them.
37
42
 
38
- ## Wayfinding (before Scope)
43
+ ## Common Rationalizations
39
44
 
40
- If `graphify-out/graph.json` exists, run `graphify query "<objectives>"` (and
41
- `graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`.
42
- Scope must name real files or modules. Do not write `BACKLOG.md` in this step.
45
+ | Rationalization | Reality |
46
+ | --- | --- |
47
+ | This fix is small; skip the Task Card | Every item needs measurable acceptance. |
48
+ | I'll validate later | Do not plan until `openspec validate` passes. |
49
+ | Archive can be rewritten | Archive is history. Never rewrite or re-execute. |
43
50
 
44
- ## Grilling (before write)
51
+ ## Red Flags
45
52
 
46
- Invoke `task-coach`. One grilling question per assumption. Reject vague
47
- acceptance ("improve UX", "fix bugs"). Criteria must be measurable (same rules
48
- as `openspec validate` / `VAGUE_ACCEPTANCE`).
53
+ - Acceptance that cannot fail a check
54
+ - Editing `openspec-state.json` by hand
55
+ - Planning an invalid backlog
49
56
 
50
- Unresolved questions go in `questionsForUser`. Run `ccep evaluate --command
51
- backlog`. If `stop` is true, **STOP** and wait for the human.
57
+ ## Verification
52
58
 
53
- Do not write items until the gate passes.
54
-
55
- ## Validate loop
56
-
57
- After writing:
58
-
59
- ```bash
60
- npx cc-codeconductor openspec validate
61
- ```
62
-
63
- Local CodeConductor dogfood: `bun run dev openspec validate`.
64
-
65
- If invalid: list errors and recommendations, show the canonical structure,
66
- fix the file, re-validate. Do not plan until valid.
67
-
68
- ## Plan new items only
69
-
70
- For each **new** `BC-xxx` this run:
71
-
72
- ```bash
73
- npx cc-codeconductor openspec plan BC-xxx
74
- ```
75
-
76
- That writes `openspec/changes/<slug>/` (`proposal.md`, `design.md`, `tasks.md`,
77
- `specs/`). Then tell the user to run `/cc-openspec` (optionally with the ID).
78
-
79
- ## Local artifacts — do not version
80
-
81
- In consumer projects these paths are gitignored (see `init`):
82
-
83
- - `BACKLOG.md`
84
- - `openspec/`
85
- - `.codeconductor/openspec-state.json`
86
-
87
- Do **not** `git add` them. Do not edit `openspec-state.json` by hand.
88
-
89
- ## Delivery
90
-
91
- Format and state machine: skill `openspec`. Authoring is this skill.
59
+ - [ ] `openspec validate` exit 0
60
+ - [ ] New items have `FR`/`SC`-ready measurable acceptance
61
+ - [ ] User pointed at `/cc-openspec` for delivery
@@ -0,0 +1,165 @@
1
+ ---
2
+ name: cc-spec-mutation
3
+ description: >-
4
+ Spec-locked TDD with a mutation-testing gate — refine the intent
5
+ into an immutable Gherkin contract (SHA-256 frozen), implement under the
6
+ three laws of TDD, pass a judge audit, and merge only if every mutant dies.
7
+ ---
8
+
9
+ # Spec-Mutation — Hard Spec → TDD → Judge → Mutation Gate
10
+
11
+ Scope: $ARGUMENTS
12
+
13
+ Describe what behavior you want to implement. Include:
14
+
15
+ - The function, method, or feature to implement
16
+ - The expected behavior (inputs, outputs, invariants, edge cases)
17
+ - The allowed file scope (production files that may change)
18
+ - The test command for the affected suite (e.g. `pytest tests/test_billing.py`)
19
+
20
+ ---
21
+
22
+ ## Contract
23
+
24
+ The Gherkin specification is the **immutable contract** of the system. No code
25
+ merges unless it survives intentional source mutations. The loop is closed:
26
+
27
+ ```
28
+ [Human + spec_partner] ──> [gherkin_author] ──> [Test Freeze: SHA-256]
29
+ │
30
+ ┌──────────────────────────────────────────────────────┘
31
+ ▼
32
+ [tdd_craftsman] <───────────────┐ (surviving mutant)
33
+ (Red-Green-Refactor) │
34
+ │ │
35
+ ▼ │
36
+ [judge] ───────────> [mutation_testing] ───> [Safe Merge]
37
+ ```
38
+
39
+ Role mapping onto Conductor Agents (AGENTS.md):
40
+
41
+ | Workflow role | Conductor Agent | Deliverable |
42
+ | ------------------ | ----------------- | ------------------------------------------ |
43
+ | `craftsman_lead` | `orchestrator` | Routed Task Cards, per-stage scorecards |
44
+ | `spec_partner` | `task-coach` | Spec draft with invariants and boundaries |
45
+ | `gherkin_author` | `contract-builder`| Strict `.feature` file (Given/When/Then) |
46
+ | `tdd_craftsman` | `tester` → `implementer` | Failing test, then minimal production code |
47
+ | `judge` | `reviewer` | Binary verdict (PASS/REJECT) with scoring |
48
+ | `mutation_testing` | `tester` (runner) | Killed/survived mutant report |
49
+
50
+ ## Stage 1 — Interactive refinement (`spec_partner` / task-coach)
51
+
52
+ Do not jump to implementation. Apply Socratic questioning to the initial intent:
53
+
54
+ - Preconditions, postconditions, and edge cases.
55
+ - Invariant matrix: what must always be true.
56
+ - Scope boundaries: explicit `Scope / Files` and `Scope / Out` for the Task Card.
57
+
58
+ Stop gate: human confirms the draft before formalization.
59
+
60
+ ## Stage 2 — Hard Spec formalization (`gherkin_author` / contract-builder)
61
+
62
+ Formalize the agreed draft into `specs/<task>.feature` using strict Gherkin:
63
+
64
+ - No vague language ("must respond fast" is forbidden — use measurable Then steps).
65
+ - Every scenario declares preconditions (`Given`), actions (`When`), and
66
+ observable states (`Then`).
67
+ - Once the human approves the `.feature`, freeze it:
68
+
69
+ ```bash
70
+ shasum -a 256 specs/<task>.feature tests/ > .codeconductor/tasks/<task_id>.lock
71
+ ```
72
+
73
+ From this point `specs/` and `tests/` are **read-only** for implementation
74
+ agents. Before every later gate, recompute the hash; any single-byte difference
75
+ aborts the pipeline with scorecard 0 (Specification Gaming).
76
+
77
+ ## Stage 3 — TDD under the three laws (`tdd_craftsman`)
78
+
79
+ Delegates to the `/cc-tdd-cycle` state machine (`tddCycleStateMachine` in
80
+ `domain/loop`). Evidence must be captured with `captureTddSuiteEvidence` — do
81
+ not hand-edit JSON under `.codeconductor/evidence/`.
82
+
83
+ 1. **Law 1 (RED):** no production code except to make a failing test pass. A
84
+ compile error from a missing interface counts as a failure.
85
+ 2. **Law 2:** write exactly one failing assertion or scenario at a time.
86
+ 3. **Law 3 (GREEN):** write only the minimal production code to pass. No
87
+ speculative code, no preventive heuristics, stdlib-first.
88
+
89
+ Hard rule: any write attempt against `specs/` or `tests/` during GREEN/REFACTOR
90
+ is a harness violation — stop execution and report.
91
+
92
+ ## Stage 4 — Judge audit (`judge` / reviewer)
93
+
94
+ Deterministic gates before spending compute on mutation:
95
+
96
+ - Clean compile / diagnostics exit code 0.
97
+ - Traceability: every Gherkin step maps to an implemented test step.
98
+ - Scope Gaming audit: `git diff --name-only` must match the Task Card
99
+ `Scope / Files` exactly. Relaxed types, weakened assertions, or out-of-scope
100
+ edits → REJECT with findings.
101
+
102
+ Verdict is binary: PASS continues to the mutation gate; REJECT returns to the
103
+ `implement` phase with the findings attached.
104
+
105
+ ## Stage 5 — Mutation gate (`mutation_testing`)
106
+
107
+ Run the deterministic AST mutator shipped with this preset:
108
+
109
+ ```bash
110
+ python3 presets/shared/mutation_runner.py \
111
+ --target <production_file.py> \
112
+ --test-command "<test command>" \
113
+ --spec-folder specs
114
+ ```
115
+
116
+ The runner applies deterministic operator mutations (`>` → `<=`, `==` → `!=`,
117
+ `is` → `is not`, …) one at a time, re-runs the suite per mutant, and restores
118
+ the original source unconditionally (`finally` rollback).
119
+
120
+ - **Mutant killed (tests fail):** the suite detects the corruption. Continue.
121
+ - **Mutant survived (tests pass):** the tests are blind to this branch. The
122
+ runner writes `specs/handover.md` + appends to
123
+ `specs/implementation-summary.md` and exits with code **2**.
124
+
125
+ Non-Python stacks: substitute Stryker (JS/TS), PITest (JVM), or Mutmut
126
+ (Python full-suite) with the same contract — 100% kill rate or hands-off.
127
+
128
+ ### Hands-off protocol (exit code 2)
129
+
130
+ 1. Do NOT modify production code to "fix" a surviving mutant.
131
+ 2. Route back to `tdd_craftsman` with `specs/handover.md` as input: write the
132
+ missing failing test (Law 1 & 2) that asserts the mutated branch.
133
+ 3. Re-run stages 3–5.
134
+
135
+ ### Circuit breaker (max 3 loops)
136
+
137
+ The orchestrator keeps a persistent counter per Task Card. If the
138
+ `tdd_craftsman ↔ mutation_testing` loop does not reach a 100% kill rate after
139
+ **3 iterations**:
140
+
141
+ - Cancel active subagents (stop token/context spend).
142
+ - `git checkout -- <scope>` rollback to the last clean state.
143
+ - Scorecard: `STATUS = BLOCKED`; escalate to a human operator. The branch stays
144
+ frozen until human arbitration.
145
+
146
+ ## Guardrails (harness-enforced, not prompt-enforced)
147
+
148
+ - **Test Freezing:** SHA-256 of `specs/` + `tests/` stored in
149
+ `.codeconductor/tasks/<task_id>.lock`; hash mismatch aborts the pipeline.
150
+ - **Scope Guardian:** `fs_write`/`fs_patch` paths are validated against the Task
151
+ Card `Scope / Files`; path escapes (`../`) and critical files (`**/.env*`,
152
+ `**/credentials*`, infrastructure roots) are denied per `policy.yml`.
153
+ - **RBAC per role:** `gherkin_author` writes only `specs/`; `tdd_craftsman`
154
+ reads specs/tests and writes only scoped `src/`; `judge` and
155
+ `mutation_testing` are read-only except the runner's rolled-back patch.
156
+ - **Worktree isolation:** run the whole flow in a dedicated `git worktree`;
157
+ protected branches (`main`, `master`, `develop`) are never touched.
158
+
159
+ ## Completion criteria
160
+
161
+ - [ ] `.feature` approved and frozen (SHA-256 lock file exists and matches).
162
+ - [ ] RED → GREEN → REFACTOR evidence captured per phase.
163
+ - [ ] Judge verdict PASS (compile clean, traceability complete, scope clean).
164
+ - [ ] Mutation runner exits 0 with `total_mutants_killed == total_points`.
165
+ - [ ] Scorecard records the kill rate and iteration count (≤ 3).
@@ -41,6 +41,9 @@ runner) — do not hand-edit JSON under `.codeconductor/evidence/`.
41
41
 
42
42
  Do not advance phases until that evidence exists.
43
43
 
44
+ When delivering a BACKLOG item, `openspec done` on the test or implement card
45
+ uses the same runner evidence.
46
+
44
47
  ---
45
48
 
46
49
  ## Phase 1 — RED (Tester role)
@@ -1,6 +1,65 @@
1
1
  ---
2
2
  name: evaluation
3
- description: Scorecard and outcome tracking for CodeConductor workflows.
3
+ description:
4
+ Guides agents through scorecards, outcomes, model profiles, and eval suites.
5
+ Use when running /cc-scorecard or /cc:scorecard, measuring a deliverable, or
6
+ checking workflow gates with suite-run.
4
7
  ---
5
8
 
6
- Record outcomes via `scorecard record`. Use `scorecard models` before OpenSpec phases.
9
+ # Evaluation
10
+
11
+ ## Overview
12
+
13
+ A scorecard measures the deliverable against eight weighted criteria. Spec
14
+ quality checklists are reviewer-owned. "Seems right" is not a verdict.
15
+
16
+ Pass threshold: weighted score >= 2.0 and no criterion at 0.
17
+
18
+ ## When to Use
19
+
20
+ - After implement/review, before `openspec archive`
21
+ - Comparing models or prompt versions
22
+ - Proving the workflow tools still work (`suite-run`)
23
+
24
+ **NOT** for rewriting specs (reviewer checklist) or for implementing code.
25
+
26
+ ## Process
27
+
28
+ Local: `bun run dev`. Published: `npx cc-codeconductor`.
29
+
30
+ ```text
31
+ scorecard create --task BC-001 --from-diff
32
+ scorecard record --task BC-001 --verdict PASS --score 2.5
33
+ scorecard list | aggregate | models | regression | matrix | compare-models
34
+ scorecard prompt-diff 0.4.0 0.5.0 --agent architect
35
+ scorecard experiment start --suite harness-v1
36
+ scorecard suite-run --suite workflow-gates
37
+ scorecard suite-run --suite hook-guardrails
38
+ scorecard suite-run --suite scorecard-signals
39
+ ```
40
+
41
+ `openspec analyze` can auto-suggest `acceptance` / `tests` on `--from-diff`.
42
+ Archive needs PASS when review is required.
43
+
44
+ Outcomes append to `.codeconductor/evaluation/outcomes.jsonl`.
45
+
46
+ ## Common Rationalizations
47
+
48
+ | Rationalization | Reality |
49
+ | --- | --- |
50
+ | I'll fill the scorecard by hand without a diff | Use `--from-diff` and runner evidence. |
51
+ | Suites are optional toys | `suite-run` is the workflow tool that proves gates. |
52
+ | Handmade TDD JSON is fine | The runner rejects it. |
53
+
54
+ ## Red Flags
55
+
56
+ - PASS with a criterion at 0
57
+ - Archive without a recorded scorecard when review is required
58
+ - Declaring the workflow ready without `suite-run` or `scorecard record`
59
+
60
+ ## Verification
61
+
62
+ - [ ] Scorecard created from diff (or explicit scores)
63
+ - [ ] Verdict PASS / REVISE / REJECT recorded
64
+ - [ ] For process changes: `scorecard suite-run --suite hook-guardrails` (and
65
+ `workflow-gates` / `scorecard-signals` when those gates changed)