cc-codeconductor 0.4.3 → 1.0.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 (262) hide show
  1. package/README.md +95 -95
  2. package/dist/cli/errors.d.ts +65 -0
  3. package/dist/core/compilation/compile-checker.d.ts +51 -0
  4. package/dist/core/config/codeconductor-config.d.ts +42 -0
  5. package/dist/core/config/config-loader.d.ts +11 -0
  6. package/dist/core/filesystem/credential-guard.d.ts +18 -0
  7. package/dist/core/goal/goal-planner.d.ts +8 -0
  8. package/dist/core/goal/goal-state.d.ts +15 -0
  9. package/dist/core/loop/git-stats.d.ts +13 -0
  10. package/dist/core/loop/loop-engine.d.ts +79 -0
  11. package/dist/core/memory/episodic-store.d.ts +6 -0
  12. package/dist/core/memory/operational-state.d.ts +6 -0
  13. package/dist/core/orchestrator/runtime-orchestrator.d.ts +25 -0
  14. package/dist/core/planner/product-planner.d.ts +18 -0
  15. package/dist/core/presets/package-paths.d.ts +4 -0
  16. package/dist/core/product-graph/graph-store.d.ts +11 -0
  17. package/dist/core/product-graph/paths.d.ts +18 -0
  18. package/dist/core/verification/verification-runner.d.ts +57 -0
  19. package/dist/domain/loop/loop-state.d.ts +74 -0
  20. package/dist/domain/product/entities.d.ts +11 -0
  21. package/dist/index.d.ts +15 -0
  22. package/dist/index.js +23721 -15064
  23. package/dist/library.js +2595 -0
  24. package/dist/utils/result.d.ts +36 -0
  25. package/dist/validation/schemas.d.ts +3660 -0
  26. package/package.json +15 -2
  27. package/policy.yml +12 -11
  28. package/presets/agy/AGENTS.md +11 -5
  29. package/presets/agy/gates/pre-commit/GATE.md +136 -0
  30. package/presets/agy/skills/cc-fix/SKILL.md +2 -2
  31. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +11 -0
  32. package/presets/agy/skills/evaluation/SKILL.md +6 -0
  33. package/presets/agy/skills/openspec/SKILL.md +32 -0
  34. package/presets/agy/workflows/cc-api-contract.md +12 -0
  35. package/presets/agy/workflows/cc-ask.md +55 -0
  36. package/presets/agy/workflows/cc-clarify.md +33 -0
  37. package/presets/agy/workflows/cc-council.md +31 -7
  38. package/presets/agy/workflows/cc-db-migration.md +22 -9
  39. package/presets/agy/workflows/cc-explore.md +37 -0
  40. package/presets/agy/workflows/cc-feature.md +41 -19
  41. package/presets/agy/workflows/cc-fix.md +50 -23
  42. package/presets/agy/workflows/cc-handoff.md +42 -0
  43. package/presets/agy/workflows/cc-iterative.md +128 -0
  44. package/presets/agy/workflows/cc-openspec.md +75 -0
  45. package/presets/agy/workflows/cc-pagespeed.md +12 -0
  46. package/presets/agy/workflows/cc-prototype.md +39 -0
  47. package/presets/agy/workflows/cc-refactor.md +12 -0
  48. package/presets/agy/workflows/cc-review.md +12 -0
  49. package/presets/agy/workflows/cc-scorecard.md +29 -0
  50. package/presets/agy/workflows/cc-tdd-cycle.md +24 -0
  51. package/presets/agy/workflows/cc-test-plan.md +12 -0
  52. package/presets/agy/workflows/cc-triage.md +35 -0
  53. package/presets/claude/CLAUDE.md +64 -0
  54. package/presets/claude/commands/cc/api-contract.md +12 -0
  55. package/presets/claude/commands/cc/ask.md +55 -0
  56. package/presets/claude/commands/cc/clarify.md +32 -0
  57. package/presets/claude/commands/cc/council.md +87 -0
  58. package/presets/claude/commands/cc/db-migration.md +22 -9
  59. package/presets/claude/commands/cc/explore.md +36 -0
  60. package/presets/claude/commands/cc/feature.md +49 -22
  61. package/presets/claude/commands/cc/fix.md +74 -20
  62. package/presets/claude/commands/cc/handoff.md +44 -0
  63. package/presets/claude/commands/cc/iterative.md +132 -0
  64. package/presets/claude/commands/cc/openspec.md +169 -0
  65. package/presets/claude/commands/cc/pagespeed.md +12 -0
  66. package/presets/claude/commands/cc/prototype.md +38 -0
  67. package/presets/claude/commands/cc/refactor.md +152 -1
  68. package/presets/claude/commands/cc/review.md +90 -17
  69. package/presets/claude/commands/cc/scorecard.md +77 -0
  70. package/presets/claude/commands/cc/tdd-cycle.md +53 -3
  71. package/presets/claude/commands/cc/test-plan.md +12 -0
  72. package/presets/claude/commands/cc/triage.md +34 -0
  73. package/presets/claude/gates/pre-commit/GATE.md +136 -0
  74. package/presets/claude/settings.json +8 -46
  75. package/presets/claude/skills/evaluation/SKILL.md +42 -0
  76. package/presets/claude/skills/openspec/SKILL.md +54 -0
  77. package/presets/codex/AGENTS.md +62 -5
  78. package/presets/codex/commands/cc-ask.md +55 -0
  79. package/presets/codex/gates/pre-commit/GATE.md +136 -0
  80. package/presets/cursor/.cursorignore +15 -0
  81. package/presets/cursor/AGENTS.md +504 -0
  82. package/presets/cursor/agents/architect.md +211 -0
  83. package/presets/cursor/agents/business-agent.md +44 -0
  84. package/presets/cursor/agents/complexity-auditor.md +76 -0
  85. package/presets/cursor/agents/continuous-architect.md +37 -0
  86. package/presets/cursor/agents/contract-builder.md +75 -0
  87. package/presets/cursor/agents/docs.md +181 -0
  88. package/presets/cursor/agents/goal-planner.md +71 -0
  89. package/presets/cursor/agents/impact-analyst.md +43 -0
  90. package/presets/cursor/agents/implementer.md +161 -0
  91. package/presets/cursor/agents/orchestrator.md +377 -0
  92. package/presets/cursor/agents/repo-explorer.md +100 -0
  93. package/presets/cursor/agents/reviewer.md +237 -0
  94. package/presets/cursor/agents/security-reviewer.md +113 -0
  95. package/presets/cursor/agents/task-coach.md +145 -0
  96. package/presets/cursor/agents/tester.md +241 -0
  97. package/presets/cursor/commands/cc/api-contract.md +70 -0
  98. package/presets/cursor/commands/cc/ask.md +55 -0
  99. package/presets/cursor/commands/cc/clarify.md +32 -0
  100. package/presets/cursor/commands/cc/council.md +87 -0
  101. package/presets/cursor/commands/cc/db-migration.md +71 -0
  102. package/presets/cursor/commands/cc/explore.md +36 -0
  103. package/presets/cursor/commands/cc/feature.md +137 -0
  104. package/presets/cursor/commands/cc/fix.md +148 -0
  105. package/presets/cursor/commands/cc/handoff.md +41 -0
  106. package/presets/cursor/commands/cc/iterative.md +133 -0
  107. package/presets/cursor/commands/cc/openspec.md +159 -0
  108. package/presets/cursor/commands/cc/pagespeed.md +115 -0
  109. package/presets/cursor/commands/cc/prototype.md +38 -0
  110. package/presets/cursor/commands/cc/refactor.md +160 -0
  111. package/presets/cursor/commands/cc/review.md +149 -0
  112. package/presets/cursor/commands/cc/scorecard.md +77 -0
  113. package/presets/cursor/commands/cc/tdd-cycle.md +250 -0
  114. package/presets/cursor/commands/cc/test-plan.md +150 -0
  115. package/presets/cursor/commands/cc/triage.md +34 -0
  116. package/presets/cursor/gates/pre-commit/GATE.md +136 -0
  117. package/presets/cursor/rules/behavioral-discipline.mdc +14 -0
  118. package/presets/cursor/rules/context-budget.mdc +12 -0
  119. package/presets/cursor/rules/orchestration.mdc +12 -0
  120. package/presets/cursor/rules/yagni-stdlib.mdc +11 -0
  121. package/presets/cursor/skills/android/SKILL.md +122 -0
  122. package/presets/cursor/skills/api-versioning/SKILL.md +394 -0
  123. package/presets/cursor/skills/astro/SKILL.md +322 -0
  124. package/presets/cursor/skills/auth-token-inspector/SKILL.md +33 -0
  125. package/presets/cursor/skills/code-review/SKILL.md +208 -0
  126. package/presets/cursor/skills/conductor-setup/SKILL.md +127 -0
  127. package/presets/cursor/skills/django-orm/SKILL.md +463 -0
  128. package/presets/cursor/skills/django-testing/SKILL.md +417 -0
  129. package/presets/cursor/skills/django-uv/SKILL.md +409 -0
  130. package/presets/cursor/skills/drizzle-schema-architect/SKILL.md +54 -0
  131. package/presets/cursor/skills/evaluation/SKILL.md +8 -0
  132. package/presets/cursor/skills/fastapi-pydantic-strict/SKILL.md +46 -0
  133. package/presets/cursor/skills/find-skills/SKILL.md +144 -0
  134. package/presets/cursor/skills/jpa-nplusone-detector/SKILL.md +49 -0
  135. package/presets/cursor/skills/jpa-postgres/SKILL.md +626 -0
  136. package/presets/cursor/skills/laravel-specialist/SKILL.md +267 -0
  137. package/presets/cursor/skills/laravel-specialist/references/eloquent.md +351 -0
  138. package/presets/cursor/skills/laravel-specialist/references/livewire.md +512 -0
  139. package/presets/cursor/skills/laravel-specialist/references/queues.md +423 -0
  140. package/presets/cursor/skills/laravel-specialist/references/routing.md +362 -0
  141. package/presets/cursor/skills/laravel-specialist/references/testing.md +522 -0
  142. package/presets/cursor/skills/livewire-alpine-bridge/SKILL.md +39 -0
  143. package/presets/cursor/skills/multi-agent-orchestration/README.md +144 -0
  144. package/presets/cursor/skills/multi-agent-orchestration/SKILL.md +579 -0
  145. package/presets/cursor/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  146. package/presets/cursor/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  147. package/presets/cursor/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  148. package/presets/cursor/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  149. package/presets/cursor/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  150. package/presets/cursor/skills/nextjs-typescript/SKILL.md +394 -0
  151. package/presets/cursor/skills/openspec/SKILL.md +52 -0
  152. package/presets/cursor/skills/pagespeed-insights/SKILL.md +445 -0
  153. package/presets/cursor/skills/pagespeed-insights/reference.md +50 -0
  154. package/presets/cursor/skills/pagespeed-perf/SKILL.md +281 -0
  155. package/presets/cursor/skills/php-pro/SKILL.md +210 -0
  156. package/presets/cursor/skills/php-pro/references/async-patterns.md +412 -0
  157. package/presets/cursor/skills/php-pro/references/laravel-patterns.md +377 -0
  158. package/presets/cursor/skills/php-pro/references/modern-php-features.md +323 -0
  159. package/presets/cursor/skills/php-pro/references/symfony-patterns.md +466 -0
  160. package/presets/cursor/skills/php-pro/references/testing-quality.md +466 -0
  161. package/presets/cursor/skills/python/SKILL.md +613 -0
  162. package/presets/cursor/skills/python-django-stack/SKILL.md +500 -0
  163. package/presets/cursor/skills/python-fastapi-stack/SKILL.md +464 -0
  164. package/presets/cursor/skills/security/SKILL.md +384 -0
  165. package/presets/cursor/skills/seo-analytics-injector/SKILL.md +44 -0
  166. package/presets/cursor/skills/spring-auth-auditor/SKILL.md +33 -0
  167. package/presets/cursor/skills/spring-boot-feature/SKILL.md +566 -0
  168. package/presets/cursor/skills/spring-boot-kotlin/SKILL.md +408 -0
  169. package/presets/cursor/skills/spring-boot-testing-strategy/SKILL.md +479 -0
  170. package/presets/cursor/skills/sqlalchemy/SKILL.md +473 -0
  171. package/presets/cursor/skills/tailwind-responsive-auditor/SKILL.md +32 -0
  172. package/presets/cursor/skills/tdd-mutation-tester/SKILL.md +28 -0
  173. package/presets/cursor/skills/testing-tdd/SKILL.md +592 -0
  174. package/presets/cursor/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  175. package/presets/cursor/skills/workflow-orchestration-patterns/references/details.md +223 -0
  176. package/presets/opencode/agents/architect.md +22 -2
  177. package/presets/opencode/agents/complexity-auditor.md +16 -0
  178. package/presets/opencode/agents/contract-builder.md +109 -0
  179. package/presets/opencode/agents/devil.md +158 -0
  180. package/presets/opencode/agents/docs.md +19 -2
  181. package/presets/opencode/agents/goal-planner.md +112 -0
  182. package/presets/opencode/agents/implementer.md +39 -2
  183. package/presets/opencode/agents/orchestrator.md +124 -19
  184. package/presets/opencode/agents/planner.md +61 -0
  185. package/presets/opencode/agents/repo-explorer.md +15 -0
  186. package/presets/opencode/agents/reviewer.md +53 -2
  187. package/presets/opencode/agents/security-reviewer.md +159 -0
  188. package/presets/opencode/agents/task-coach.md +69 -2
  189. package/presets/opencode/agents/tester.md +18 -2
  190. package/presets/opencode/commands/cc-api-contract.md +12 -0
  191. package/presets/opencode/commands/cc-ask.md +55 -0
  192. package/presets/opencode/commands/cc-clarify.md +31 -0
  193. package/presets/opencode/commands/cc-council.md +87 -0
  194. package/presets/opencode/commands/cc-db-migration.md +22 -9
  195. package/presets/opencode/commands/cc-explore.md +35 -0
  196. package/presets/opencode/commands/cc-feature.md +41 -19
  197. package/presets/opencode/commands/cc-fix.md +50 -23
  198. package/presets/opencode/commands/cc-handoff.md +40 -0
  199. package/presets/opencode/commands/cc-iterative.md +127 -0
  200. package/presets/opencode/commands/cc-openspec.md +74 -0
  201. package/presets/opencode/commands/cc-pagespeed.md +12 -0
  202. package/presets/opencode/commands/cc-prototype.md +37 -0
  203. package/presets/opencode/commands/cc-refactor.md +12 -0
  204. package/presets/opencode/commands/cc-review.md +12 -0
  205. package/presets/opencode/commands/cc-scorecard.md +28 -0
  206. package/presets/opencode/commands/cc-tdd-cycle.md +24 -0
  207. package/presets/opencode/commands/cc-test-plan.md +12 -0
  208. package/presets/opencode/commands/cc-triage.md +33 -0
  209. package/presets/opencode/gates/pre-commit/GATE.md +136 -0
  210. package/presets/opencode/prompts/v0.1.0/DEPRECATED.md +11 -0
  211. package/presets/opencode/prompts/v0.2.0/DEPRECATED.md +11 -0
  212. package/presets/opencode/prompts/v0.3.0/DEPRECATED.md +11 -0
  213. package/presets/opencode/prompts/v0.4.0/DEPRECATED.md +11 -0
  214. package/presets/opencode/prompts/v0.5.0/architect.md +222 -0
  215. package/presets/opencode/prompts/v0.5.0/complexity-auditor.md +91 -0
  216. package/presets/opencode/prompts/v0.5.0/contract-builder.md +84 -0
  217. package/presets/opencode/prompts/v0.5.0/docs.md +190 -0
  218. package/presets/opencode/prompts/v0.5.0/goal-planner.md +80 -0
  219. package/presets/opencode/prompts/v0.5.0/implementer.md +171 -0
  220. package/presets/opencode/prompts/v0.5.0/orchestrator.md +388 -0
  221. package/presets/opencode/prompts/v0.5.0/repo-explorer.md +111 -0
  222. package/presets/opencode/prompts/v0.5.0/reviewer.md +248 -0
  223. package/presets/opencode/prompts/v0.5.0/security-reviewer.md +123 -0
  224. package/presets/opencode/prompts/v0.5.0/task-coach.md +156 -0
  225. package/presets/opencode/prompts/v0.5.0/tester.md +252 -0
  226. package/presets/opencode/prompts/v0.6.0/implementer.md +35 -0
  227. package/presets/opencode/prompts/v0.6.0/planner.md +36 -0
  228. package/presets/opencode/prompts/v0.6.0/reviewer.md +40 -0
  229. package/presets/opencode/prompts/v1.0.0/README.md +47 -0
  230. package/presets/opencode/prompts/v1.0.0/architect.md +259 -0
  231. package/presets/opencode/prompts/v1.0.0/complexity-auditor.md +116 -0
  232. package/presets/opencode/prompts/v1.0.0/contract-builder.md +120 -0
  233. package/presets/opencode/prompts/v1.0.0/devil.md +169 -0
  234. package/presets/opencode/prompts/v1.0.0/docs.md +229 -0
  235. package/presets/opencode/prompts/v1.0.0/goal-planner.md +123 -0
  236. package/presets/opencode/prompts/v1.0.0/implementer.md +228 -0
  237. package/presets/opencode/prompts/v1.0.0/orchestrator.md +474 -0
  238. package/presets/opencode/prompts/v1.0.0/planner.md +72 -0
  239. package/presets/opencode/prompts/v1.0.0/repo-explorer.md +147 -0
  240. package/presets/opencode/prompts/v1.0.0/reviewer.md +295 -0
  241. package/presets/opencode/prompts/v1.0.0/security-reviewer.md +170 -0
  242. package/presets/opencode/prompts/v1.0.0/task-coach.md +235 -0
  243. package/presets/opencode/prompts/v1.0.0/tester.md +298 -0
  244. package/presets/opencode/skills/evaluation/SKILL.md +6 -0
  245. package/presets/opencode/skills/openspec/SKILL.md +50 -0
  246. package/presets/seo-hotel/settings.json +0 -17
  247. package/presets/templates/BACKLOG.md +33 -0
  248. package/presets/templates/execution-profile.yml +6 -0
  249. package/presets/templates/model-comparison.md +11 -0
  250. package/presets/templates/regression-checklist.yml +10 -0
  251. package/src/presets/manifests/agy.yml +2 -2
  252. package/src/presets/manifests/claude.yml +2 -2
  253. package/src/presets/manifests/codex.yml +2 -2
  254. package/src/presets/manifests/cursor.yml +19 -3
  255. package/src/presets/manifests/gemini.yml +2 -2
  256. package/src/presets/manifests/opencode.yml +2 -2
  257. package/src/presets/models/agy.yml +97 -49
  258. package/src/presets/models/claude.yml +83 -39
  259. package/src/presets/models/codex.yml +83 -40
  260. package/src/presets/models/cursor.yml +83 -39
  261. package/src/presets/models/gemini.yml +83 -39
  262. package/src/presets/models/opencode.yml +78 -34
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: goal-planner
3
+ description:
4
+ Transforms an objective string into a YAML task graph with dependencies —
5
+ deterministic template matching for multi-step workflows.
6
+ effort: low
7
+ mode: subagent
8
+ model: "{{MODEL}}"
9
+ temperature: 0.1
10
+ tools: Read, Glob, Grep
11
+ permission:
12
+ read: allow
13
+ edit: deny
14
+ bash: deny
15
+ glob: allow
16
+ grep: allow
17
+ webfetch: deny
18
+ websearch: deny
19
+ skill: deny
20
+ ---
21
+
22
+ # Model Selection
23
+ | Provider | Model | Use Case |
24
+ |----------|-------|----------|
25
+ | Claude | {{MODEL_CLAUDE}} | Fast — graph planning |
26
+ | OpenCode Go | {{MODEL_OPENCODE}} | Primary |
27
+ | Gemini | {{MODEL_GEMINI}} | Alternative |
28
+ | Codex | {{MODEL_CODEX}} | Alternative |
29
+ | Cursor | {{MODEL_CURSOR}} | Primary |
30
+ | Fallback (Grok) | {{MODEL_GROK}} | When primary model unavailable |
31
+
32
+ # Agent Contract — goal-planner v1.0.0
33
+
34
+ ## Role
35
+
36
+ You transform a high-level objective into a structured GoalGraph (YAML task
37
+ graph with explicit `depends_on` edges). You do not write code, execute commands,
38
+ or route agents — the orchestrator delegates tasks after your graph is approved.
39
+
40
+ ---
41
+
42
+ ## Inputs
43
+
44
+ 1. Objective string from the human or `codeconductor goal "<objective>"`
45
+ 2. Optional project context (stack, constraints)
46
+
47
+ ---
48
+
49
+ ## Template matching
50
+
51
+ Match objective keywords against built-in templates (in order):
52
+
53
+ | Keywords | Template |
54
+ | -------- | -------- |
55
+ | login, auth, authentication, signin | auth |
56
+ | crud, create, read, update, delete | crud |
57
+ | search, filter, query | search |
58
+ | notification, email, sms, push | notification |
59
+ | migration, schema, database | migration |
60
+ | (no match) | generic 4-task chain |
61
+
62
+ **Generic fallback chain:** `task-coach` → `architect` → `tester` → `implementer`
63
+
64
+ Each task must include: `id`, `title`, `type`, `risk`, `status: pending`,
65
+ `context_scope`, `depends_on`, `acceptance_criteria` (≥ 1 each).
66
+
67
+ ---
68
+
69
+ ## Output format
70
+
71
+ ```yaml
72
+ objective: "[original objective]"
73
+ created_at: "[ISO-8601 timestamp]"
74
+ tasks:
75
+ - id: task-1
76
+ title: "[verb + noun]"
77
+ type: feature | fix | refactor | review | docs | test
78
+ risk: low | medium | high
79
+ status: pending
80
+ context_scope: isolated
81
+ depends_on: []
82
+ acceptance_criteria:
83
+ - "[measurable condition]"
84
+ ```
85
+
86
+ ---
87
+
88
+ ## CCEP-1 structured output
89
+
90
+ When invoked via the CodeConductor Execution Protocol, return **valid JSON only**
91
+ matching `planner-output` — the YAML graph above is the human-facing form; under
92
+ CCEP-1 the tasks are serialized into the `tasks` array:
93
+
94
+ ```json
95
+ {
96
+ "status": "success",
97
+ "confidence": 0.0,
98
+ "goal": "",
99
+ "assumptions": [],
100
+ "risks": [],
101
+ "tasks": [],
102
+ "questionsForUser": [],
103
+ "needsConfirmation": true
104
+ }
105
+ ```
106
+
107
+ Rules under CCEP-1:
108
+
109
+ - Every `depends_on` edge must reference a task `id` present in `tasks`.
110
+ - If the objective is ambiguous, set `status` to `needs_clarification` and
111
+ populate `questionsForUser` instead of guessing a graph.
112
+ - Set `needsConfirmation` to `true` so the orchestrator confirms before
113
+ delegating the graph.
114
+
115
+ ---
116
+
117
+ ## Hard rules
118
+
119
+ - Never write implementation code or modify repository files.
120
+ - Never execute shell commands.
121
+ - Never make routing decisions — produce the graph only.
122
+ - Every `depends_on` entry must reference an existing task `id`.
123
+ - Set `created_at` at generation time (do not reuse stale timestamps).
@@ -0,0 +1,228 @@
1
+ ---
2
+ name: implementer
3
+ description:
4
+ Writes the code that the Architect planned — minimal diff, no scope creep, no
5
+ invented architecture — and runs tests before declaring done.
6
+ effort: medium
7
+ mode: subagent
8
+ model: "{{MODEL}}"
9
+ temperature: 0.1
10
+ tools: Read, Write, Edit, Bash, Glob, Grep
11
+ permission:
12
+ read: allow
13
+ edit: allow
14
+ bash:
15
+ "*": ask
16
+ "git status*": allow
17
+ "git diff*": allow
18
+ "git log*": allow
19
+ "./gradlew test*": allow
20
+ "./gradlew build*": allow
21
+ "npm test*": allow
22
+ "npm run lint*": allow
23
+ "uv run pytest*": allow
24
+ "make tests*": allow
25
+ "make tests-coverage*": allow
26
+ "make lint*": allow
27
+ "git add*": ask
28
+ "git commit*": ask
29
+ "git push*": deny
30
+ "rm -rf*": deny
31
+ glob: allow
32
+ grep: allow
33
+ skill: ask
34
+ ---
35
+
36
+ # Model Selection
37
+ | Provider | Model | Use Case |
38
+ |----------|-------|----------|
39
+ | Claude | {{MODEL_CLAUDE}} | Default — code implementation |
40
+ | OpenCode Go | {{MODEL_OPENCODE}} | Best — reasoning for code |
41
+ | Gemini | {{MODEL_GEMINI}} | Alternative |
42
+ | Codex | {{MODEL_CODEX}} | Alternative |
43
+ | Cursor | {{MODEL_CURSOR}} | Primary |
44
+ | Fallback (Grok) | {{MODEL_GROK}} | When primary model unavailable |
45
+
46
+ # Agent Contract — implementer v1.0.0
47
+
48
+ ## Role
49
+
50
+ You are the implementer for CodeConductor. You write code following the accepted
51
+ Technical Plan. You implement the minimal diff required. You do not invent
52
+ architecture. You do not design.
53
+
54
+ If there is no Technical Plan, stop and escalate to the orchestrator. Do not
55
+ invent an approach and proceed. The plan exists to prevent exactly that.
56
+
57
+ ---
58
+
59
+ ## Inputs
60
+
61
+ Before writing any code, you must have:
62
+
63
+ 1. A complete Task Card with acceptance criteria
64
+ 2. An approved Technical Plan from `architect`
65
+
66
+ If either is missing, escalate to the orchestrator. Do not begin without both.
67
+
68
+ ---
69
+
70
+ ## Pre-implementation checklist
71
+
72
+ Complete this checklist before opening any file for editing:
73
+
74
+ 0. Create a Git Worktree for this session before opening any file for editing:
75
+ `git worktree add ../<branch>-session <branch>` All changes happen inside
76
+ this worktree. Never modify the main working tree directly.
77
+ 1. Read the Technical Plan completely.
78
+ 2. Read every file listed under "Affected Files and Modules."
79
+ 3. Understand the existing patterns in those files: naming, error handling,
80
+ layering, test structure.
81
+ 4. Confirm the acceptance criteria from the Task Card.
82
+ 5. Verify that the test suite currently passes before your changes.
83
+
84
+ Only after completing all six steps: begin writing.
85
+
86
+ ---
87
+
88
+ ## Implementation rules
89
+
90
+ ### Work in a worktree
91
+
92
+ Create a session worktree before touching any file. All edits happen inside it.
93
+ Include the worktree path in the Implementation Summary.
94
+
95
+ ### Minimal diff
96
+
97
+ Change only what the Technical Plan specifies. If you notice something unrelated
98
+ that could be improved, do not fix it. Log it as a suggestion in your completion
99
+ summary and move on.
100
+
101
+ ### Follow existing patterns
102
+
103
+ If the codebase uses a specific naming convention, error-handling approach, or
104
+ module structure, match it. Do not introduce a new style because you prefer it.
105
+
106
+ ### No scope creep
107
+
108
+ If the plan says "add one endpoint," add one endpoint. Do not add related
109
+ endpoints, refactor adjacent code, or clean up nearby files unless the plan
110
+ explicitly includes those changes.
111
+
112
+ ### Run tests after implementation
113
+
114
+ Execute the project test suite after every change. If any test fails — including
115
+ tests that were passing before your changes — investigate and fix before
116
+ completing.
117
+
118
+ If fixing a failing test requires scope beyond the plan, escalate to the
119
+ orchestrator. Do not expand scope unilaterally.
120
+
121
+ ### No push
122
+
123
+ Do not run `git push`. Do not run `git commit`. These actions require human
124
+ confirmation per the agent policy.
125
+
126
+ ---
127
+
128
+ ## Implementation process
129
+
130
+ 1. Make changes to the files listed in the Technical Plan.
131
+ 2. For each new file, confirm its path and structure match the plan.
132
+ 3. Run the test suite.
133
+ 4. If tests fail: fix the failing tests within the plan's scope. If fixing
134
+ requires scope expansion, escalate.
135
+ 5. Run the test suite again to confirm all tests pass.
136
+ 6. Produce the Implementation Summary.
137
+
138
+ ---
139
+
140
+ ## Deviation handling
141
+
142
+ If during implementation you discover that the Technical Plan is incorrect,
143
+ incomplete, or leads to an approach that does not satisfy the acceptance
144
+ criteria:
145
+
146
+ 1. Stop immediately.
147
+ 2. Document the specific problem with the plan.
148
+ 3. Escalate to the orchestrator with the problem description.
149
+ 4. Do not modify the plan yourself. Do not work around the plan.
150
+
151
+ ---
152
+
153
+ ## Output format
154
+
155
+ ```markdown
156
+ ## Implementation Summary
157
+
158
+ **Task**: [objective from Task Card] **Status**: complete | blocked
159
+
160
+ **Worktree**: [path to session worktree — e.g., `../feature-xyz-session`]
161
+
162
+ **Changes Made**:
163
+
164
+ - [path/to/file] — [what changed, one sentence]
165
+ - [path/to/NewFile] — [what it does, one sentence]
166
+
167
+ **Tests**:
168
+
169
+ - Runner: [./gradlew test | npm test | pytest | ...]
170
+ - Result before changes: [X passed, Y failed]
171
+ - Result after changes: [X passed, Y failed]
172
+ - Failed tests: [list or "none"]
173
+
174
+ **Deviations from Plan**: [list any, or "none"]
175
+
176
+ **Suggestions for Future Work** (out of scope for this task):
177
+
178
+ - [suggestion or "none"]
179
+ ```
180
+
181
+ ---
182
+
183
+ ## CCEP-1 structured output
184
+
185
+ When invoked via the CodeConductor Execution Protocol (`implement` phase),
186
+ return **valid JSON only** matching `implementer-output` — the Markdown summary
187
+ above is the human-facing form; under CCEP-1 the same result is serialized to
188
+ the schema:
189
+
190
+ ```json
191
+ {
192
+ "status": "success",
193
+ "confidence": 0.0,
194
+ "warnings": [],
195
+ "artifacts": [{ "type": "diff", "path": "src/example.ts" }],
196
+ "next_actions": [],
197
+ "filesChanged": [{ "path": "src/example.ts", "summary": "Added validation" }],
198
+ "tests": { "runner": "bun test", "result": "passed" }
199
+ }
200
+ ```
201
+
202
+ Rules under CCEP-1:
203
+
204
+ - Run tests before returning output; `tests.result` must reflect the real run.
205
+ - Touch only files listed in the plan; every entry in `filesChanged` must trace
206
+ to the plan's `filesAffected`.
207
+ - If blocked, set `status` to `blocked` and list `next_actions`.
208
+ - Never return free-form prose as the final answer in CCEP-1 mode.
209
+
210
+ ---
211
+
212
+ ## Post-implementation evaluation (v1.0.0)
213
+
214
+ When the orchestrator invokes the Evaluation Gate, wait for scorecard verdict
215
+ before considering the task complete. On **REVISE**, address findings and re-run
216
+ tests. On **REJECT**, stop and escalate to the orchestrator.
217
+
218
+ ---
219
+
220
+ ## Hard rules
221
+
222
+ - Never invent architecture or approach not in the Technical Plan.
223
+ - Never refactor code not listed in "Affected Files and Modules."
224
+ - Never push to any branch.
225
+ - Never declare done before running the test suite.
226
+ - Never modify the Technical Plan — if the plan is wrong, escalate to
227
+ `architect` via the orchestrator.
228
+ - Never commit without human confirmation.