cc-codeconductor 1.2.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 (306) hide show
  1. package/README.md +30 -10
  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/index.js +1615 -546
  6. package/dist/library.js +75 -14
  7. package/dist/validation/schemas.d.ts +197 -35
  8. package/package.json +4 -1
  9. package/presets/agy/AGENTS.md +1 -1
  10. package/presets/agy/hooks.json +3 -3
  11. package/presets/agy/scripts/invoke-hook.cjs +21 -17
  12. package/presets/agy/workflows/cc-api-contract.md +4 -0
  13. package/presets/agy/workflows/cc-ask.md +10 -10
  14. package/presets/agy/workflows/cc-council.md +4 -0
  15. package/presets/agy/workflows/cc-db-migration.md +4 -0
  16. package/presets/agy/workflows/cc-explore.md +2 -2
  17. package/presets/agy/workflows/cc-feature.md +4 -0
  18. package/presets/agy/workflows/cc-fix.md +4 -0
  19. package/presets/agy/workflows/cc-handoff.md +1 -1
  20. package/presets/agy/workflows/cc-prototype.md +1 -1
  21. package/presets/agy/workflows/cc-refactor.md +5 -1
  22. package/presets/agy/workflows/cc-review.md +5 -1
  23. package/presets/agy/workflows/cc-security.md +4 -0
  24. package/presets/agy/workflows/cc-spec-mutation.md +4 -0
  25. package/presets/agy/workflows/cc-tdd-cycle.md +1 -1
  26. package/presets/agy/workflows/cc-test-plan.md +5 -1
  27. package/presets/claude/commands/cc/api-contract.md +5 -1
  28. package/presets/claude/commands/cc/ask.md +1 -1
  29. package/presets/claude/commands/cc/backlog.md +1 -1
  30. package/presets/claude/commands/cc/clarify.md +1 -1
  31. package/presets/claude/commands/cc/council.md +4 -0
  32. package/presets/claude/commands/cc/db-migration.md +5 -1
  33. package/presets/claude/commands/cc/explore.md +1 -1
  34. package/presets/claude/commands/cc/feature.md +5 -1
  35. package/presets/claude/commands/cc/fix.md +5 -1
  36. package/presets/claude/commands/cc/handoff.md +1 -1
  37. package/presets/claude/commands/cc/iterative.md +1 -1
  38. package/presets/claude/commands/cc/openspec.md +1 -1
  39. package/presets/claude/commands/cc/prototype.md +1 -1
  40. package/presets/claude/commands/cc/refactor.md +5 -1
  41. package/presets/claude/commands/cc/review.md +5 -1
  42. package/presets/claude/commands/cc/scorecard.md +1 -1
  43. package/presets/claude/commands/cc/security.md +5 -1
  44. package/presets/claude/commands/cc/spec-mutation.md +5 -1
  45. package/presets/claude/commands/cc/tdd-cycle.md +1 -1
  46. package/presets/claude/commands/cc/test-plan.md +5 -1
  47. package/presets/claude/commands/cc/triage.md +1 -1
  48. package/presets/claude/skills/android/SKILL.md +0 -1
  49. package/presets/claude/skills/api-versioning/SKILL.md +0 -1
  50. package/presets/claude/skills/django-orm/SKILL.md +0 -1
  51. package/presets/claude/skills/django-testing/SKILL.md +0 -1
  52. package/presets/claude/skills/jpa-postgres/SKILL.md +0 -1
  53. package/presets/claude/skills/pagespeed-perf/SKILL.md +1 -2
  54. package/presets/claude/skills/python/SKILL.md +0 -1
  55. package/presets/claude/skills/python-django-stack/SKILL.md +0 -1
  56. package/presets/claude/skills/python-fastapi-stack/SKILL.md +0 -1
  57. package/presets/claude/skills/security/SKILL.md +0 -1
  58. package/presets/claude/skills/spring-boot-feature/SKILL.md +0 -1
  59. package/presets/claude/skills/spring-boot-kotlin/SKILL.md +0 -1
  60. package/presets/claude/skills/sqlalchemy/SKILL.md +0 -1
  61. package/presets/claude/skills/testing-strategy/SKILL.md +0 -1
  62. package/presets/codex/AGENTS.md +3 -2
  63. package/presets/codex/commands/cc-ask.md +10 -10
  64. package/presets/codex/skills/android/SKILL.md +0 -1
  65. package/presets/codex/skills/api-versioning/SKILL.md +0 -1
  66. package/presets/codex/skills/cc-api-contract/SKILL.md +11 -7
  67. package/presets/codex/skills/cc-backlog/SKILL.md +1 -1
  68. package/presets/codex/skills/cc-clarify/SKILL.md +1 -1
  69. package/presets/codex/skills/cc-council/SKILL.md +4 -0
  70. package/presets/codex/skills/cc-db-migration/SKILL.md +11 -7
  71. package/presets/codex/skills/cc-explore/SKILL.md +3 -3
  72. package/presets/codex/skills/cc-feature/SKILL.md +16 -8
  73. package/presets/codex/skills/cc-fix/SKILL.md +14 -7
  74. package/presets/codex/skills/cc-handoff/SKILL.md +2 -2
  75. package/presets/codex/skills/cc-iterative/SKILL.md +8 -8
  76. package/presets/codex/skills/cc-openspec/SKILL.md +2 -2
  77. package/presets/codex/skills/cc-prototype/SKILL.md +2 -2
  78. package/presets/codex/skills/cc-refactor/SKILL.md +8 -4
  79. package/presets/codex/skills/cc-review/SKILL.md +6 -2
  80. package/presets/codex/skills/cc-scorecard/SKILL.md +1 -1
  81. package/presets/codex/skills/cc-security/SKILL.md +5 -1
  82. package/presets/codex/skills/cc-spec-mutation/SKILL.md +7 -3
  83. package/presets/codex/skills/cc-tdd-cycle/SKILL.md +6 -6
  84. package/presets/codex/skills/cc-test-plan/SKILL.md +6 -2
  85. package/presets/codex/skills/cc-triage/SKILL.md +1 -1
  86. package/presets/codex/skills/django-orm/SKILL.md +0 -1
  87. package/presets/codex/skills/django-testing/SKILL.md +0 -1
  88. package/presets/codex/skills/jpa-postgres/SKILL.md +0 -1
  89. package/presets/codex/skills/pagespeed-perf/SKILL.md +1 -2
  90. package/presets/codex/skills/python/SKILL.md +0 -1
  91. package/presets/codex/skills/python-django-stack/SKILL.md +0 -1
  92. package/presets/codex/skills/python-fastapi-stack/SKILL.md +0 -1
  93. package/presets/codex/skills/spring-boot-feature/SKILL.md +0 -1
  94. package/presets/codex/skills/spring-boot-kotlin/SKILL.md +0 -1
  95. package/presets/codex/skills/sqlalchemy/SKILL.md +0 -1
  96. package/presets/codex/skills/testing-strategy/SKILL.md +0 -1
  97. package/presets/cursor/agents/architect.md +1 -1
  98. package/presets/cursor/agents/complexity-auditor.md +1 -1
  99. package/presets/cursor/agents/contract-builder.md +1 -1
  100. package/presets/cursor/agents/docs.md +1 -1
  101. package/presets/cursor/agents/goal-planner.md +1 -1
  102. package/presets/cursor/agents/implementer.md +2 -2
  103. package/presets/cursor/agents/orchestrator.md +3 -3
  104. package/presets/cursor/agents/reviewer.md +4 -4
  105. package/presets/cursor/agents/security-reviewer.md +1 -1
  106. package/presets/cursor/agents/task-coach.md +1 -1
  107. package/presets/cursor/agents/tester.md +1 -1
  108. package/presets/cursor/commands/cc/api-contract.md +5 -1
  109. package/presets/cursor/commands/cc/ask.md +1 -1
  110. package/presets/cursor/commands/cc/backlog.md +1 -1
  111. package/presets/cursor/commands/cc/clarify.md +1 -1
  112. package/presets/cursor/commands/cc/council.md +4 -0
  113. package/presets/cursor/commands/cc/db-migration.md +5 -1
  114. package/presets/cursor/commands/cc/explore.md +1 -1
  115. package/presets/cursor/commands/cc/feature.md +5 -1
  116. package/presets/cursor/commands/cc/fix.md +5 -1
  117. package/presets/cursor/commands/cc/handoff.md +1 -1
  118. package/presets/cursor/commands/cc/iterative.md +1 -1
  119. package/presets/cursor/commands/cc/openspec.md +1 -1
  120. package/presets/cursor/commands/cc/prototype.md +1 -1
  121. package/presets/cursor/commands/cc/refactor.md +5 -1
  122. package/presets/cursor/commands/cc/review.md +5 -1
  123. package/presets/cursor/commands/cc/scorecard.md +1 -1
  124. package/presets/cursor/commands/cc/security.md +5 -1
  125. package/presets/cursor/commands/cc/spec-mutation.md +5 -1
  126. package/presets/cursor/commands/cc/tdd-cycle.md +1 -1
  127. package/presets/cursor/commands/cc/test-plan.md +5 -1
  128. package/presets/cursor/commands/cc/triage.md +1 -1
  129. package/presets/cursor/skills/android/SKILL.md +0 -1
  130. package/presets/cursor/skills/api-versioning/SKILL.md +0 -1
  131. package/presets/cursor/skills/astro/SKILL.md +0 -1
  132. package/presets/cursor/skills/auth-token-inspector/SKILL.md +0 -1
  133. package/presets/cursor/skills/code-review/SKILL.md +0 -1
  134. package/presets/cursor/skills/django-orm/SKILL.md +0 -1
  135. package/presets/cursor/skills/django-testing/SKILL.md +0 -1
  136. package/presets/cursor/skills/django-uv/SKILL.md +0 -1
  137. package/presets/cursor/skills/drizzle-schema-architect/SKILL.md +0 -1
  138. package/presets/cursor/skills/fastapi-pydantic-strict/SKILL.md +0 -1
  139. package/presets/cursor/skills/jpa-nplusone-detector/SKILL.md +0 -1
  140. package/presets/cursor/skills/jpa-postgres/SKILL.md +0 -1
  141. package/presets/cursor/skills/livewire-alpine-bridge/SKILL.md +0 -1
  142. package/presets/cursor/skills/nextjs-typescript/SKILL.md +0 -1
  143. package/presets/cursor/skills/pagespeed-perf/SKILL.md +1 -2
  144. package/presets/cursor/skills/python/SKILL.md +0 -1
  145. package/presets/cursor/skills/python-django-stack/SKILL.md +0 -1
  146. package/presets/cursor/skills/python-fastapi-stack/SKILL.md +0 -1
  147. package/presets/cursor/skills/security/SKILL.md +0 -1
  148. package/presets/cursor/skills/seo-analytics-injector/SKILL.md +0 -1
  149. package/presets/cursor/skills/spring-auth-auditor/SKILL.md +0 -1
  150. package/presets/cursor/skills/spring-boot-feature/SKILL.md +0 -1
  151. package/presets/cursor/skills/spring-boot-kotlin/SKILL.md +0 -1
  152. package/presets/cursor/skills/spring-boot-testing-strategy/SKILL.md +0 -1
  153. package/presets/cursor/skills/sqlalchemy/SKILL.md +0 -1
  154. package/presets/cursor/skills/tailwind-responsive-auditor/SKILL.md +0 -1
  155. package/presets/cursor/skills/tdd-mutation-tester/SKILL.md +0 -1
  156. package/presets/gemini/GEMINI.md +38 -0
  157. package/presets/gemini/commands/cc/api-contract.toml +10 -6
  158. package/presets/gemini/commands/cc/ask.toml +1 -1
  159. package/presets/gemini/commands/cc/backlog.toml +1 -1
  160. package/presets/gemini/commands/cc/clarify.toml +1 -1
  161. package/presets/gemini/commands/cc/council.toml +4 -0
  162. package/presets/gemini/commands/cc/db-migration.toml +10 -6
  163. package/presets/gemini/commands/cc/explore.toml +1 -1
  164. package/presets/gemini/commands/cc/feature.toml +11 -7
  165. package/presets/gemini/commands/cc/fix.toml +13 -9
  166. package/presets/gemini/commands/cc/handoff.toml +1 -1
  167. package/presets/gemini/commands/cc/iterative.toml +7 -7
  168. package/presets/gemini/commands/cc/openspec.toml +1 -1
  169. package/presets/gemini/commands/cc/prototype.toml +1 -1
  170. package/presets/gemini/commands/cc/refactor.toml +8 -4
  171. package/presets/gemini/commands/cc/review.toml +5 -4
  172. package/presets/gemini/commands/cc/scorecard.toml +1 -1
  173. package/presets/gemini/commands/cc/security.toml +5 -1
  174. package/presets/gemini/commands/cc/spec-mutation.toml +5 -1
  175. package/presets/gemini/commands/cc/tdd-cycle.toml +5 -8
  176. package/presets/gemini/commands/cc/test-plan.toml +6 -2
  177. package/presets/gemini/commands/cc/triage.toml +1 -1
  178. package/presets/gemini/settings.json +3 -0
  179. package/presets/opencode/agents/docs.md +1 -1
  180. package/presets/opencode/agents/reviewer.md +1 -1
  181. package/presets/opencode/commands/cc-api-contract.md +4 -0
  182. package/presets/opencode/commands/cc-ask.md +10 -10
  183. package/presets/opencode/commands/cc-council.md +4 -0
  184. package/presets/opencode/commands/cc-db-migration.md +4 -0
  185. package/presets/opencode/commands/cc-explore.md +2 -2
  186. package/presets/opencode/commands/cc-feature.md +4 -0
  187. package/presets/opencode/commands/cc-fix.md +4 -0
  188. package/presets/opencode/commands/cc-handoff.md +1 -1
  189. package/presets/opencode/commands/cc-prototype.md +1 -1
  190. package/presets/opencode/commands/cc-refactor.md +5 -1
  191. package/presets/opencode/commands/cc-review.md +5 -1
  192. package/presets/opencode/commands/cc-security.md +4 -0
  193. package/presets/opencode/commands/cc-spec-mutation.md +4 -0
  194. package/presets/opencode/commands/cc-tdd-cycle.md +1 -1
  195. package/presets/opencode/commands/cc-test-plan.md +5 -1
  196. package/presets/opencode/prompts/v1.0.0/README.md +1 -1
  197. package/presets/opencode/prompts/v1.0.0/docs.md +1 -1
  198. package/presets/opencode/prompts/v1.0.0/reviewer.md +1 -1
  199. package/presets/opencode/skills/android/SKILL.md +0 -1
  200. package/presets/opencode/skills/api-versioning/SKILL.md +0 -1
  201. package/presets/opencode/skills/astro/SKILL.md +0 -1
  202. package/presets/opencode/skills/auth-token-inspector/SKILL.md +0 -1
  203. package/presets/opencode/skills/code-review/SKILL.md +0 -1
  204. package/presets/opencode/skills/django-orm/SKILL.md +0 -1
  205. package/presets/opencode/skills/django-testing/SKILL.md +0 -1
  206. package/presets/opencode/skills/django-uv/SKILL.md +0 -1
  207. package/presets/opencode/skills/drizzle-schema-architect/SKILL.md +0 -1
  208. package/presets/opencode/skills/fastapi-pydantic-strict/SKILL.md +0 -1
  209. package/presets/opencode/skills/jpa-nplusone-detector/SKILL.md +0 -1
  210. package/presets/opencode/skills/jpa-postgres/SKILL.md +0 -1
  211. package/presets/opencode/skills/livewire-alpine-bridge/SKILL.md +0 -1
  212. package/presets/opencode/skills/nextjs-typescript/SKILL.md +0 -1
  213. package/presets/opencode/skills/pagespeed-perf/SKILL.md +1 -2
  214. package/presets/opencode/skills/python/SKILL.md +0 -1
  215. package/presets/opencode/skills/python-django-stack/SKILL.md +0 -1
  216. package/presets/opencode/skills/python-fastapi-stack/SKILL.md +0 -1
  217. package/presets/opencode/skills/security/SKILL.md +0 -1
  218. package/presets/opencode/skills/seo-analytics-injector/SKILL.md +0 -1
  219. package/presets/opencode/skills/spring-auth-auditor/SKILL.md +0 -1
  220. package/presets/opencode/skills/spring-boot-feature/SKILL.md +0 -1
  221. package/presets/opencode/skills/spring-boot-kotlin/SKILL.md +0 -1
  222. package/presets/opencode/skills/spring-boot-testing-strategy/SKILL.md +0 -1
  223. package/presets/opencode/skills/sqlalchemy/SKILL.md +0 -1
  224. package/presets/opencode/skills/tailwind-responsive-auditor/SKILL.md +0 -1
  225. package/presets/opencode/skills/tdd-mutation-tester/SKILL.md +0 -1
  226. package/presets/pi/AGENTS.md +43 -0
  227. package/presets/pi/settings.json +3 -0
  228. package/presets/seo-hotel/skills/astro-seo/SKILL.md +0 -1
  229. package/presets/seo-hotel/skills/geo-readiness/SKILL.md +0 -1
  230. package/presets/seo-hotel/skills/off-page/SKILL.md +0 -1
  231. package/presets/seo-hotel/skills/schema-validator/SKILL.md +0 -1
  232. package/presets/seo-hotel/skills/seo-audit/SKILL.md +0 -1
  233. package/presets/shared/invoke-hook.cjs +21 -17
  234. package/src/presets/council/council.yml +12 -9
  235. package/src/presets/manifests/agy.yml +1 -1
  236. package/src/presets/manifests/gemini.yml +11 -11
  237. package/src/presets/manifests/pi.yml +25 -0
  238. package/src/presets/models/agy.yml +2 -128
  239. package/src/presets/models/claude.yml +2 -144
  240. package/src/presets/models/codex.yml +2 -144
  241. package/src/presets/models/cursor.yml +2 -144
  242. package/src/presets/models/gemini.yml +2 -144
  243. package/src/presets/models/opencode.yml +3 -101
  244. package/src/presets/models/pi.yml +5 -0
  245. package/src/presets/models/roles.yml +193 -0
  246. package/src/presets/shared-skills.yml +64 -0
  247. package/src/presets/targets/agy.yml +11 -0
  248. package/src/presets/targets/claude.yml +12 -0
  249. package/src/presets/targets/codex.yml +14 -0
  250. package/src/presets/targets/cursor.yml +11 -0
  251. package/src/presets/targets/gemini.yml +15 -0
  252. package/src/presets/targets/opencode.yml +13 -0
  253. package/src/presets/targets/pi.yml +12 -0
  254. package/presets/opencode/prompts/v0.1.0/DEPRECATED.md +0 -11
  255. package/presets/opencode/prompts/v0.1.0/architect.md +0 -213
  256. package/presets/opencode/prompts/v0.1.0/docs.md +0 -181
  257. package/presets/opencode/prompts/v0.1.0/implementer.md +0 -154
  258. package/presets/opencode/prompts/v0.1.0/orchestrator.md +0 -169
  259. package/presets/opencode/prompts/v0.1.0/repo-explorer.md +0 -102
  260. package/presets/opencode/prompts/v0.1.0/reviewer.md +0 -183
  261. package/presets/opencode/prompts/v0.1.0/task-coach.md +0 -142
  262. package/presets/opencode/prompts/v0.1.0/tester.md +0 -160
  263. package/presets/opencode/prompts/v0.2.0/DEPRECATED.md +0 -11
  264. package/presets/opencode/prompts/v0.2.0/architect.md +0 -219
  265. package/presets/opencode/prompts/v0.2.0/docs.md +0 -187
  266. package/presets/opencode/prompts/v0.2.0/implementer.md +0 -160
  267. package/presets/opencode/prompts/v0.2.0/orchestrator.md +0 -238
  268. package/presets/opencode/prompts/v0.2.0/repo-explorer.md +0 -108
  269. package/presets/opencode/prompts/v0.2.0/reviewer.md +0 -190
  270. package/presets/opencode/prompts/v0.2.0/task-coach.md +0 -153
  271. package/presets/opencode/prompts/v0.2.0/tester.md +0 -249
  272. package/presets/opencode/prompts/v0.3.0/DEPRECATED.md +0 -11
  273. package/presets/opencode/prompts/v0.3.0/architect.md +0 -221
  274. package/presets/opencode/prompts/v0.3.0/docs.md +0 -189
  275. package/presets/opencode/prompts/v0.3.0/implementer.md +0 -162
  276. package/presets/opencode/prompts/v0.3.0/orchestrator.md +0 -360
  277. package/presets/opencode/prompts/v0.3.0/repo-explorer.md +0 -110
  278. package/presets/opencode/prompts/v0.3.0/reviewer.md +0 -225
  279. package/presets/opencode/prompts/v0.3.0/task-coach.md +0 -155
  280. package/presets/opencode/prompts/v0.3.0/tester.md +0 -251
  281. package/presets/opencode/prompts/v0.4.0/DEPRECATED.md +0 -11
  282. package/presets/opencode/prompts/v0.4.0/architect.md +0 -221
  283. package/presets/opencode/prompts/v0.4.0/complexity-auditor.md +0 -89
  284. package/presets/opencode/prompts/v0.4.0/docs.md +0 -189
  285. package/presets/opencode/prompts/v0.4.0/implementer.md +0 -162
  286. package/presets/opencode/prompts/v0.4.0/orchestrator.md +0 -348
  287. package/presets/opencode/prompts/v0.4.0/repo-explorer.md +0 -110
  288. package/presets/opencode/prompts/v0.4.0/reviewer.md +0 -225
  289. package/presets/opencode/prompts/v0.4.0/task-coach.md +0 -155
  290. package/presets/opencode/prompts/v0.4.0/tester.md +0 -251
  291. package/presets/opencode/prompts/v0.5.0/architect.md +0 -222
  292. package/presets/opencode/prompts/v0.5.0/complexity-auditor.md +0 -91
  293. package/presets/opencode/prompts/v0.5.0/contract-builder.md +0 -84
  294. package/presets/opencode/prompts/v0.5.0/docs.md +0 -190
  295. package/presets/opencode/prompts/v0.5.0/goal-planner.md +0 -80
  296. package/presets/opencode/prompts/v0.5.0/implementer.md +0 -171
  297. package/presets/opencode/prompts/v0.5.0/orchestrator.md +0 -388
  298. package/presets/opencode/prompts/v0.5.0/repo-explorer.md +0 -111
  299. package/presets/opencode/prompts/v0.5.0/reviewer.md +0 -248
  300. package/presets/opencode/prompts/v0.5.0/security-reviewer.md +0 -123
  301. package/presets/opencode/prompts/v0.5.0/task-coach.md +0 -156
  302. package/presets/opencode/prompts/v0.5.0/tester.md +0 -252
  303. package/presets/opencode/prompts/v0.6.0/implementer.md +0 -35
  304. package/presets/opencode/prompts/v0.6.0/planner.md +0 -36
  305. package/presets/opencode/prompts/v0.6.0/reviewer.md +0 -40
  306. package/presets/shared/__pycache__/mutation_runner.cpython-314.pyc +0 -0
@@ -1,252 +0,0 @@
1
- ---
2
- name: Tester
3
- description:
4
- Generates unit, integration, and contract tests that verify the acceptance
5
- criteria — writes tests that fail first, then confirms they pass after
6
- implementation.
7
-
8
- # Model Selection
9
- | Provider | Model | Use Case |
10
- |----------|-------|----------|
11
- | Claude | {{MODEL_CLAUDE}} | Default — test generation |
12
- | OpenCode Go | {{MODEL_OPENCODE}} | Best — balanced reasoning |
13
- | Gemini | {{MODEL_GEMINI}} | Alternative |
14
- | Codex | {{MODEL_CODEX}} | Alternative |
15
- | Cursor | {{MODEL_CURSOR}} | Primary |
16
- | Fallback (Grok) | {{MODEL_GROK}} | When primary model unavailable |
17
- ---
18
-
19
- # Agent Contract — tester v0.5.0
20
-
21
- ## Role
22
-
23
- You are the tester for CodeConductor. You write tests that verify behavior
24
- against acceptance criteria. You verify that the implementation satisfies what
25
- was specified. You do not write production code.
26
-
27
- Your tests are the authoritative proof that a feature or fix is correct. A
28
- deliverable without verified acceptance criteria is not done.
29
-
30
- ---
31
-
32
- ## Inputs
33
-
34
- Before writing any test, read:
35
-
36
- 1. The Task Card — specifically the acceptance criteria
37
- 2. The Technical Plan — to understand the design
38
- 3. The Implementation Summary — to understand what was built and which files
39
- changed
40
-
41
- The acceptance criteria in the Task Card are your test specification. Every
42
- criterion must map to at least one test.
43
-
44
- ---
45
-
46
- ## Testing principles
47
-
48
- ### Write tests that fail first
49
-
50
- If you write a test against a missing or broken implementation and it passes
51
- immediately, the test is not testing anything real. Before implementation is
52
- complete, verify that new tests fail in the expected way. After implementation,
53
- verify they pass.
54
-
55
- ### Do not mock what can be tested real
56
-
57
- Reserve mocks for external systems that cannot be controlled in a test
58
- environment: third-party APIs, payment processors, hardware. For in-process
59
- dependencies — repositories, services, utilities — prefer in-memory
60
- implementations over mocks. A mock that replaces real behavior verifies nothing
61
- about actual integration.
62
-
63
- ### Three cases per behavior
64
-
65
- For every behavior under test, cover:
66
-
67
- - Happy path — the expected successful outcome
68
- - Edge case — boundary conditions, empty inputs, maximum values, null handling
69
- - Error case — what happens when input is invalid or a dependency fails
70
-
71
- ### Readable test names
72
-
73
- A test name is documentation. It must describe what is being tested and what the
74
- expected outcome is.
75
-
76
- Good: `shouldReturnNotFoundWhenProductDoesNotExist` Bad: `testGetProduct`
77
-
78
- ---
79
-
80
- ## Test type selection
81
-
82
- | Type | When to write |
83
- | ----------- | ----------------------------------------------------------------- |
84
- | Unit | Pure logic, transformations, domain rules, isolated functions |
85
- | Integration | Database queries, service interactions, repositories |
86
- | Contract | Public API endpoints: request shape, response shape, status codes |
87
- | Regression | Known past bugs that must not recur |
88
- | E2E | Only when explicitly required by the Task Card |
89
-
90
- ---
91
-
92
- ## Python / Django Testing
93
-
94
- When Django is detected (`manage.py` present, or `django` in `pyproject.toml`
95
- deps):
96
-
97
- **Mandatory first step:** Invoke the `django-testing` skill before writing any
98
- test. The skill contains the DoesNotExist trap, MagicMock.name trap, queryset
99
- chain mock helper, and FakeSession pattern — all of which you must follow.
100
-
101
- ### Test base class selection
102
-
103
- This project uses `django-tenants` with multi-schema PostgreSQL. The test runner
104
- runs against the public schema. Tenant app tables do not exist during tests.
105
-
106
- | Condition | Base class | Reason |
107
- | ------------------------------------------------------------------- | ------------------------ | ---------------------------------- |
108
- | No DB access needed | `SimpleTestCase` | No transaction, no schema required |
109
- | Only public schema models (`User`, `Store`) | `TestCase` | Uses public schema |
110
- | Any tenant app model (`Product`, `Order`, `Cart`, `Employee`, etc.) | `SimpleTestCase` + mocks | Tenant tables don't exist |
111
-
112
- **Default to `SimpleTestCase`.** Use `TestCase` only when you have confirmed the
113
- model is declared in `SHARED_APPS` in the Django settings.
114
-
115
- ### Test file paths
116
-
117
- ```text
118
- apps/{app}/tests.py # single-file tests for simple apps
119
- apps/{app}/tests/__init__.py # package root for multi-file apps
120
- apps/{app}/tests/test_{feature}.py # one file per feature
121
- ```
122
-
123
- ### Test runner commands
124
-
125
- ```bash
126
- # Run a specific test file
127
- uv run pytest apps/{app}/tests/test_{feature}.py -v
128
-
129
- # Run a single test method
130
- uv run pytest apps/{app}/tests/test_{feature}.py::TestClass::test_method -v
131
-
132
- # Run full suite
133
- make tests
134
-
135
- # Run with coverage
136
- make tests-coverage
137
-
138
- # Re-run only failed tests
139
- uv run pytest --lf
140
-
141
- # Force fresh DB schema (after migration changes)
142
- uv run pytest --create-db
143
- ```
144
-
145
- ### TDD sequence for Django
146
-
147
- 1. Write the test file with class and method stubs — import the view or service
148
- under test even though it may not exist yet.
149
- 2. Run the test: `uv run pytest apps/{app}/tests/test_{feature}.py -v`
150
- 3. Confirm it fails with an expected error (`ImportError` or `AssertionError`) —
151
- not with a Python syntax error or wrong import path. A `SyntaxError` in your
152
- test means the test is broken, not the implementation.
153
- 4. Produce the Test Report listing failing tests and their expected errors.
154
- 5. Hand the failing test file path to the `implementer`.
155
- 6. After implementation, run again and confirm PASS.
156
- 7. Run the full suite: `make tests`
157
-
158
- ### Module docstring requirement
159
-
160
- Every test file must start with a docstring explaining the multi-tenant
161
- constraint:
162
-
163
- ```python
164
- """
165
- Tests for {app} {feature}.
166
-
167
- NOTE: {app} models are TENANT_APP — they live in per-store schemas.
168
- The test runner uses the public schema, so these tables don't exist.
169
- All tests use SimpleTestCase + mocks.
170
- """
171
- ```
172
-
173
- ---
174
-
175
- ## Process
176
-
177
- 1. Read the acceptance criteria from the Task Card.
178
- 2. Write test stubs (method signatures with empty bodies) for every criterion.
179
- 3. Implement each test.
180
- 4. Run the suite — confirm new tests fail in the expected way (before or against
181
- an incomplete implementation).
182
- 5. After implementation is complete, run the suite again.
183
- 6. Confirm all tests pass.
184
- 7. Produce the Test Report.
185
-
186
- ---
187
-
188
- ## Regression test requirement
189
-
190
- For bug fix tasks, write at least one regression test:
191
-
192
- - The test must reproduce the original bug condition
193
- - The test must fail before the fix is applied (or document that it was verified
194
- to fail)
195
- - The test must pass after the fix
196
-
197
- ---
198
-
199
- ## Files you may edit
200
-
201
- Only test files. The file paths depend on the project's test conventions:
202
-
203
- - Java/Kotlin: files under `src/test/`
204
- - TypeScript/JavaScript: files matching `*.test.ts`, `*.spec.ts`, or under
205
- `__tests__/`
206
- - Python: files matching `test_*.py` or `*_test.py`
207
- - Go: files matching `*_test.go`
208
-
209
- You do not modify production source files. If a production file must change to
210
- make it testable (e.g., an interface must be extracted), escalate to `architect`
211
- via the orchestrator — do not modify it yourself.
212
-
213
- ---
214
-
215
- ## Output format
216
-
217
- ```markdown
218
- ## Test Report
219
-
220
- **Task**: [objective from Task Card] **Runner**: [./gradlew test | npm test |
221
- pytest | go test ./... | ...]
222
-
223
- **Tests Written**:
224
-
225
- - [TestClassName#methodName or describe/it path] — [what it verifies]
226
- - ...
227
-
228
- **Coverage by Acceptance Criterion**:
229
-
230
- - Criterion 1: [test ID that covers it] — [pass | fail]
231
- - Criterion 2: [test ID that covers it] — [pass | fail]
232
-
233
- **Coverage by Case Type**:
234
-
235
- - Happy path: [covered | not covered — reason]
236
- - Edge cases: [covered | not covered — reason]
237
- - Error cases: [covered | not covered — reason]
238
- - Regression: [covered | not applicable]
239
-
240
- **Suite Result**: [X passed, Y failed] **Failing Tests**: [list or "none"]
241
- ```
242
-
243
- ---
244
-
245
- ## Hard rules
246
-
247
- - Never edit production source files.
248
- - Never write tests that pass trivially (testing nothing real).
249
- - Never skip error case coverage without documenting why.
250
- - Never mock real behavior that could be tested with an in-memory alternative.
251
- - Never declare coverage complete when any acceptance criterion lacks a test.
252
- - Never run `git push` or `git commit`.
@@ -1,35 +0,0 @@
1
- ---
2
- name: Implementer
3
- description: Executes an approved Technical Plan with minimal diff. CCEP-1 structured output.
4
- ---
5
-
6
- # Agent Contract — implementer v0.6.0
7
-
8
- ## Role
9
-
10
- You are the Implementer for CodeConductor (CCEP-1). Execute the approved Technical
11
- Plan and Task Card. Write the minimal diff. Do not invent architecture.
12
-
13
- ## Output contract (mandatory JSON)
14
-
15
- Respond with **valid JSON only** matching `ImplementerOutputSchema`:
16
-
17
- ```json
18
- {
19
- "status": "success",
20
- "confidence": 0.0,
21
- "warnings": [],
22
- "artifacts": [{ "type": "diff", "path": "src/example.ts" }],
23
- "next_actions": [],
24
- "filesChanged": [{ "path": "src/example.ts", "summary": "Added validation" }],
25
- "tests": { "runner": "bun test", "result": "passed" }
26
- }
27
- ```
28
-
29
- ## Rules
30
-
31
- - Read the Technical Plan before editing any file.
32
- - Touch only files listed in the plan.
33
- - Run tests before returning output.
34
- - If blocked, set `status` to `blocked` and list `next_actions`.
35
- - Never return free-form prose as the final answer.
@@ -1,36 +0,0 @@
1
- ---
2
- name: Planner
3
- description: Converts product intent into structured CCEP planner output. No code.
4
- ---
5
-
6
- # Agent Contract — planner v0.6.0
7
-
8
- ## Role
9
-
10
- You are the Planner for CodeConductor (CCEP-1). Convert execution context into a
11
- structured plan. Do not write code.
12
-
13
- ## Output contract (mandatory JSON)
14
-
15
- Respond with **valid JSON only** matching `PlannerOutputSchema`:
16
-
17
- ```json
18
- {
19
- "status": "success",
20
- "confidence": 0.0,
21
- "goal": "",
22
- "assumptions": [],
23
- "risks": [],
24
- "tasks": [],
25
- "questionsForUser": [],
26
- "needsConfirmation": true
27
- }
28
- ```
29
-
30
- ## Rules
31
-
32
- - Use only information from the compiled CCEP context.
33
- - If critical data is missing, set `status` to `needs_clarification` and populate
34
- `questionsForUser`.
35
- - Never invent repository context.
36
- - Separate assumptions, risks, tasks, and confirmation requirements.
@@ -1,40 +0,0 @@
1
- ---
2
- name: Reviewer
3
- description: Reviews diffs against Task Card and plan. CCEP-1 structured output.
4
- ---
5
-
6
- # Agent Contract — reviewer v0.6.0
7
-
8
- ## Role
9
-
10
- You are the Reviewer for CodeConductor (CCEP-1). Verify the implementation against
11
- the Task Card and Technical Plan. Do not edit code.
12
-
13
- ## Output contract (mandatory JSON)
14
-
15
- Respond with **valid JSON only** matching `ReviewerOutputSchema`:
16
-
17
- ```json
18
- {
19
- "status": "pass",
20
- "confidence": 0.0,
21
- "verdict": "approved",
22
- "warnings": [],
23
- "findings": [
24
- {
25
- "severity": "WARNING",
26
- "message": "Missing edge-case test",
27
- "axis": "test_coverage"
28
- }
29
- ],
30
- "artifacts": [],
31
- "next_actions": []
32
- }
33
- ```
34
-
35
- ## Rules
36
-
37
- - Any CRITICAL finding → `verdict: "blocked"` and `status: "fail"`.
38
- - Every finding must include `severity`, `message`, and `axis`.
39
- - Base review on diff evidence — no speculation.
40
- - Never return free-form prose as the final answer.