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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-codeconductor",
3
- "version": "0.4.3",
3
+ "version": "1.0.0",
4
4
  "description": "A multi-agent orchestration framework for AI-assisted software engineering workflows.",
5
5
  "keywords": [
6
6
  "ai",
@@ -16,6 +16,8 @@
16
16
  "license": "MIT",
17
17
  "files": [
18
18
  "dist/index.js",
19
+ "dist/library.js",
20
+ "dist/**/*.d.ts",
19
21
  "policy.yml",
20
22
  "presets/",
21
23
  "src/presets/"
@@ -28,13 +30,24 @@
28
30
  "node": ">=20.11"
29
31
  },
30
32
  "type": "module",
33
+ "main": "./dist/library.js",
34
+ "types": "./dist/index.d.ts",
35
+ "exports": {
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "import": "./dist/library.js"
39
+ }
40
+ },
31
41
  "bin": {
32
42
  "cc-codeconductor": "./dist/index.js",
33
43
  "codeconductor": "./dist/index.js"
34
44
  },
35
45
  "scripts": {
36
46
  "dev": "bun run src/cli/main.ts",
37
- "build": "bun build src/cli/main.ts --target=node --outfile=dist/index.js",
47
+ "build": "bun run scripts/build.ts",
48
+ "build:cli": "bun build src/cli/main.ts --target=node --outfile=dist/index.js",
49
+ "build:lib": "bun build src/index.ts --target=node --outfile=dist/library.js --packages=external",
50
+ "build:types": "tsc -p tsconfig.lib.json --emitDeclarationOnly",
38
51
  "test": "bun test",
39
52
  "typecheck": "tsc --noEmit",
40
53
  "check:prompt-changelog": "bun run scripts/check-prompt-changelog.ts",
package/policy.yml CHANGED
@@ -42,23 +42,24 @@ denyWrite:
42
42
  - ".git/**"
43
43
  - ".claude/**"
44
44
  - ".opencode/**"
45
+ # Session handoffs belong in .codeconductor/sessions/ (gitignored). The
46
+ # compiler does not exist yet; gitignore + workflow redaction are the
47
+ # compensating controls for /cc:handoff.
45
48
  - ".codeconductor/**"
46
49
  - ".code-conductor/policy.yml"
47
50
  - "/etc/**"
48
51
  - "/var/**"
49
52
  - "~/**"
50
53
 
51
- # Credential patterns for secret detection.
52
- # These are merged with CodeConductorConfig.safety.secretPatterns at runtime.
53
- secretPatterns:
54
- - password
55
- - secret
56
- - api_key
57
- - token
58
- - api[_-]?key
59
- - access[_-]?token
60
- - auth[_-]?token
61
- - private[_-]?key
54
+ # Optional keyword patterns for secret detection, merged with
55
+ # CodeConductorConfig.safety.secretPatterns at runtime.
56
+ #
57
+ # Built-in detection does NOT rely on this list: high-confidence signatures
58
+ # (AWS access key ids, AWS_SECRET_ACCESS_KEY values, GitHub PATs, PEM/OpenSSH
59
+ # private key headers) are enforced in code and always active. Entries here add
60
+ # legacy keyword matching (`<keyword> = <value of 8+ chars>`), which is prone to
61
+ # false positives — add them only when a project needs them.
62
+ secretPatterns: []
62
63
 
63
64
  targets:
64
65
  opencode:
@@ -74,6 +74,12 @@ Antigravity CLI loads custom slash commands from `.agents/workflows/*.md`. The f
74
74
  | `/cc-tdd-cycle` | Runs a Test-Driven Development (TDD) cycle |
75
75
  | `/cc-api-contract`| Handles API contract modification and validation |
76
76
  | `/cc-db-migration`| Coordinates database schema migrations safely |
77
+ | `/cc-iterative` | Advanced iterative workflow — wayfinding, grilling, TDD, council |
78
+ | `/cc-explore` | Map the repo and recommend the next `/cc:` command |
79
+ | `/cc-triage` | Classify type, risk, and destination workflow |
80
+ | `/cc-prototype` | Disposable spike in an isolated worktree |
81
+ | `/cc-handoff` | Compact the session to `.codeconductor/` Markdown |
82
+ | `/cc-clarify` | Re-explain the last deliverable in Task Card vocabulary |
77
83
  | `/cc-pagespeed` | Performs a web performance and Core Web Vitals audit |
78
84
 
79
85
  ---
@@ -99,13 +105,13 @@ When multiple signals apply, take the highest risk level. Do not average.
99
105
 
100
106
  | Task Type | Risk | Route |
101
107
  | -------------------- | ----------- | --------------------------------------------------- |
102
- | New feature design | any | `architect` → `implementer` |
103
- | Bug fix | low | `implementer` |
104
- | Bug fix | medium–high | `task-coach` → `implementer` → `tester` |
108
+ | New feature design | any | `architect` → `tester` → `implementer` |
109
+ | Bug fix | low | `tester` → `implementer` |
110
+ | Bug fix | medium–high | `task-coach` → `tester` → `implementer` |
105
111
  | Refactor | low | `implementer` |
106
112
  | Refactor | medium–high | `architect` → `implementer` → `reviewer` |
107
113
  | API change | any | `architect` → `implementer` → `reviewer` |
108
- | Database migration | any | `architect` → `implementer` → `tester` → `reviewer` |
114
+ | Database migration | any | `architect` → `tester` → `implementer` → `reviewer` |
109
115
  | Test coverage | any | `tester` |
110
116
  | Documentation update | any | `docs` |
111
117
  | Codebase exploration | any | `repo-explorer` |
@@ -265,7 +271,7 @@ High-risk checkpoint: [yes | no — if yes, describe what triggers a stop]
265
271
  **Does not:** Write files. Execute commands. Make routing decisions.
266
272
 
267
273
  **Template matching:**
268
- The planner matches objective keywords against built-in templates (auth, crud, search, notification, migration) and falls back to a generic 4-task chain: task-coach → architect → implementertester.
274
+ The planner matches objective keywords against built-in templates (auth, crud, search, notification, migration) and falls back to a generic 4-task chain: task-coach → architect → testerimplementer.
269
275
 
270
276
  **Dependency order delegation (orchestrator):**
271
277
  When the orchestrator receives a GoalGraph, it delegates tasks in dependency order. A task is only routed after all its `depends_on` targets complete with status `done`. If a dependency is `blocked`, the dependent task remains `pending`. The orchestrator tracks the graph state in `.codeconductor/current-goal.yml`.
@@ -0,0 +1,136 @@
1
+ # Pre-commit Gate: Typecheck and Test
2
+
3
+ Este gate instala un hook `pre-commit` que ejecuta `bun run typecheck` y `bun run test` antes de permitir commits en el repositorio. Si cualquiera de estos comandos falla, el commit es bloqueado.
4
+
5
+ ## Cuándo usar
6
+
7
+ **Para agentes**: Integra este gate en flujos de desarrollo local cuando quieras garantizar que los cambios typecheck correctamente y pasan los tests antes de ser cometidos.
8
+
9
+ **Para equipos**: Utiliza este gate como barrera de calidad local (sin dependencias externas) para prevenir commits con errores de tipado o tests fallidos.
10
+
11
+ ## Instalación
12
+
13
+ ### Paso 1: Descarga el script
14
+
15
+ El script está embebido abajo (sección "Script Installer").
16
+
17
+ ### Paso 2: Ejecuta en la raíz de tu proyecto
18
+
19
+ Desde la raíz del repositorio (o cualquier subdirectorio), extrae el bloque ```bash de este archivo y ejecuta:
20
+
21
+ bash << 'SCRIPT_EOF'
22
+ #!/bin/bash
23
+ set -e
24
+ # [contenido del bloque bash de abajo]
25
+ SCRIPT_EOF
26
+
27
+ O, más simplemente, guarda el script en un archivo temporal y ejecútalo:
28
+
29
+ curl -s https://raw.githubusercontent.com/.../ | bash
30
+
31
+ ### Paso 3: Verifica
32
+
33
+ Después de la instalación, debería verse:
34
+
35
+ Pre-commit hook installed successfully.
36
+
37
+ ## Script Installer
38
+
39
+ ```bash
40
+ #!/bin/bash
41
+ set -e
42
+
43
+ # Resolver git directory dinámicamente (worktree-safe)
44
+ GIT_DIR=$(git rev-parse --git-dir)
45
+ HOOK_PATH="$GIT_DIR/hooks/pre-commit"
46
+
47
+ # Detectar Husky o lint-staged en package.json
48
+ if grep -q '"husky"' package.json 2>/dev/null || grep -q '"lint-staged"' package.json 2>/dev/null; then
49
+ echo "Warning: Husky or lint-staged detected in package.json. Installation skipped."
50
+ exit 0
51
+ fi
52
+
53
+ # Verificar si un pre-commit hook ya existe
54
+ if [ -f "$HOOK_PATH" ]; then
55
+ echo "Warning: Pre-commit hook already exists at $HOOK_PATH. Not overwriting."
56
+ exit 0
57
+ fi
58
+
59
+ # Crear directorio hooks si no existe
60
+ mkdir -p "$GIT_DIR/hooks"
61
+
62
+ # Escribir el hook pre-commit
63
+ cat > "$HOOK_PATH" << 'HOOK_EOF'
64
+ #!/bin/bash
65
+ bun run typecheck || exit 1
66
+ bun run test || exit 1
67
+ HOOK_EOF
68
+
69
+ # Hacer el hook ejecutable
70
+ chmod +x "$HOOK_PATH"
71
+
72
+ echo "Pre-commit hook installed successfully."
73
+ ```
74
+
75
+ ## Notas de implementación
76
+
77
+ - **Sin dependencias externas**: El script no instala Husky, lint-staged, ni ninguna otra herramienta. Solo escribe un archivo shell y configura permisos.
78
+ - **Resolución dinámica de git dir**: Usa `git rev-parse --git-dir` para localizar el directorio correcto, incluso en worktrees.
79
+ - **Detección de conflictos**: Si Husky o lint-staged ya está en `package.json`, el script avisa y no instala para evitar conflictos.
80
+ - **Protección de hooks existentes**: Si ya existe un `.git/hooks/pre-commit`, el script no lo sobrescribe.
81
+ - **Solo Bun**: El hook ejecuta `bun run typecheck` y `bun run test`. Asegúrate de que estos scripts están definidos en `package.json`.
82
+
83
+ ## Verificación
84
+
85
+ Después de instalar, verifica que el hook está en su lugar.
86
+
87
+ Para verificar, ejecuta:
88
+
89
+ ls -la .git/hooks/pre-commit
90
+
91
+ Debe mostrar algo como:
92
+
93
+ -rwxr-xr-x user group ... .git/hooks/pre-commit
94
+
95
+ Luego, intenta hacer un commit. Si hay errores de tipo o tests fallidos, el commit será bloqueado:
96
+
97
+ git add .
98
+ git commit -m "test"
99
+ # Si typecheck o test falla, verás el error y el commit será abortado.
100
+
101
+ ## Troubleshooting
102
+
103
+ ### "Warning: Pre-commit hook already exists"
104
+
105
+ Ya hay un hook pre-commit. Revisa su contenido:
106
+
107
+ cat .git/hooks/pre-commit
108
+
109
+ Si quieres reemplazarlo, bórralo y ejecuta el script nuevamente:
110
+
111
+ rm .git/hooks/pre-commit
112
+ bash /path/to/installer
113
+
114
+ ### "Warning: Husky or lint-staged detected"
115
+
116
+ Tu proyecto usa Husky o lint-staged. Este gate no se instala para evitar conflictos. Si quieres usar este gate, remove Husky/lint-staged de `package.json` y ejecuta de nuevo.
117
+
118
+ ### Hook no se ejecuta al hacer commit
119
+
120
+ Verifica que el hook es ejecutable:
121
+
122
+ chmod +x .git/hooks/pre-commit
123
+
124
+ Verifica que `bun run typecheck` y `bun run test` existen en `package.json`:
125
+
126
+ cat package.json | grep -A 5 '"scripts"'
127
+
128
+ ### "command not found: bun"
129
+
130
+ Bun no está instalado o no está en PATH. Instala Bun desde https://bun.sh o configura PATH adecuadamente.
131
+
132
+ ## Adicional: Desinstalación
133
+
134
+ Para remover el hook, simplemente bórralo:
135
+
136
+ rm .git/hooks/pre-commit
@@ -47,7 +47,7 @@ Read the risk field from the Task Card and follow the corresponding route.
47
47
  Applies when: the bug is isolated to a single component, existing tests cover
48
48
  the affected code, and no public API or shared state is involved.
49
49
 
50
- Route: `task-coach` → `implementer` → `tester`
50
+ Route: `task-coach` → `tester` → `implementer`
51
51
 
52
52
  Proceed directly to Step 3a.
53
53
 
@@ -56,7 +56,7 @@ Proceed directly to Step 3a.
56
56
  Applies when: the bug touches shared state, a public API, auth or payment paths,
57
57
  database writes, or the root cause is not yet understood.
58
58
 
59
- Route: `task-coach` → `architect` → `implementer` → `tester` → `reviewer`
59
+ Route: `task-coach` → `architect` → `tester` → `implementer` → `reviewer`
60
60
 
61
61
  Invoke `architect` before implementation. architect must:
62
62
 
@@ -30,6 +30,17 @@ non-negotiable:
30
30
  Do not write implementation code during RED. Do not refactor during GREEN.
31
31
  Mixing phases invalidates the cycle.
32
32
 
33
+ ## Verifiable phase gates
34
+
35
+ RED → GREEN and GREEN → REFACTOR are enforced by `tddCycleStateMachine` in
36
+ `domain/loop`. Evidence must be captured with `captureTddSuiteEvidence` (verification
37
+ runner) — do not hand-edit JSON under `.codeconductor/evidence/`.
38
+
39
+ - RED→GREEN requires runner evidence that the suite **failed**.
40
+ - GREEN→REFACTOR requires runner evidence that the suite **passed**.
41
+
42
+ Do not advance phases until that evidence exists.
43
+
33
44
  ---
34
45
 
35
46
  ## Phase 1 — RED (Tester role)
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: evaluation
3
+ description: Scorecard and outcome tracking for CodeConductor workflows.
4
+ ---
5
+
6
+ Record outcomes via `scorecard record`. Use `scorecard models` before OpenSpec phases.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: openspec
3
+ description:
4
+ OpenSpec backlog format, state machine, and delivery workflow for CodeConductor.
5
+ Use when running /cc-openspec or editing BACKLOG.md.
6
+ ---
7
+
8
+ # OpenSpec / BACKLOG Skill
9
+
10
+ ## BACKLOG.md contract
11
+
12
+ `BACKLOG.md` at repo root is the operational queue. Required sections:
13
+
14
+ - `## Global` — Product, Strategy, Policy, Review required, TDD required
15
+ - `## Items` — active backlog entries
16
+ - `## Archive` — completed entries (do not re-execute)
17
+
18
+ Each item: `### BC-001 | Short title` with Priority (P0–P3), Status, Type, Depends on, Description, Scope, Out of scope, Acceptance (measurable checklist).
19
+
20
+ ## Status machine
21
+
22
+ `TODO` → `READY` → `PLANNED` → `IN_PROGRESS` → `REVIEW` → `DONE` → Archive
23
+
24
+ ## CLI
25
+
26
+ `openspec validate | scan | plan | status | next`
27
+
28
+ ## Agent phases
29
+
30
+ discover → repo-explorer, design → architect, test → tester, implement → implementer, review → reviewer.
31
+
32
+ TDD required: test before implement.
@@ -9,6 +9,18 @@ description:
9
9
 
10
10
  API contract request: $ARGUMENTS
11
11
 
12
+ ## Step 0 — CCEP Bootstrap
13
+
14
+ Command: `api-contract` (fixed for this workflow — do not infer from user text)
15
+
16
+ 1. Run: `npx cc-codeconductor ccep parse --command api-contract "$ARGUMENTS" --output json`
17
+ 2. Run: `npx cc-codeconductor ccep resolve --command api-contract "$ARGUMENTS" --output json`
18
+ 3. Run: `npx cc-codeconductor ccep profile api-contract --output json`
19
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command api-contract --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
20
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
21
+
22
+ ---
23
+
12
24
  ## Step 1 — Task Card validation (task-coach)
13
25
 
14
26
  Invoke `task-coach` with the request above.
@@ -0,0 +1,55 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Recommend one CodeConductor slash command from a natural-language
4
+ problem. Does not start that workflow.
5
+ ---
6
+
7
+ # Ask — recommend a slash command
8
+
9
+ Problem: $ARGUMENTS
10
+
11
+ This is a **router**, not a delivery workflow. Recommend exactly one command.
12
+ Do **not** run the recommended `/cc:` command unless the human confirms.
13
+
14
+ ---
15
+
16
+ ## Step 1 — Recommend (deterministic)
17
+
18
+ Run (local repo: `bun run dev`; published package: `npx cc-codeconductor`):
19
+
20
+ ```bash
21
+ bun run dev ask "$ARGUMENTS" --output json
22
+ ```
23
+
24
+ or:
25
+
26
+ ```bash
27
+ npx cc-codeconductor ask "$ARGUMENTS" --output json
28
+ ```
29
+
30
+ The catalog is only:
31
+
32
+ | Slash | When |
33
+ | ----- | ---- |
34
+ | `/cc:feature` | new behavior |
35
+ | `/cc:fix` | bug / regression |
36
+ | `/cc:refactor` | structure, no behavior change |
37
+ | `/cc:review` | inspect a diff/PR |
38
+ | `/cc:tdd-cycle` | red → green → refactor |
39
+ | `/cc:openspec` | BACKLOG / BC-xxx delivery |
40
+
41
+ If the CLI is unavailable, apply the same catalog and the same priority:
42
+ openspec → tdd-cycle → review → refactor → fix → feature (default).
43
+
44
+ ---
45
+
46
+ ## Step 2 — Show and stop
47
+
48
+ Print:
49
+
50
+ - **Recommended:** the slash command
51
+ - **Why:** one or two sentences from the CLI `reason` (or your matching)
52
+
53
+ **STOP.** Wait for the human. Do not invoke the recommended workflow.
54
+
55
+ For a full preset inventory (skills, commands on disk), use `/cc:help` / `cc-help`.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: cc-clarify
3
+ description:
4
+ Re-explain the last deliverable in Task Card vocabulary when it did not land.
5
+ ---
6
+
7
+ # Clarify Workflow
8
+
9
+ Clarify request: $ARGUMENTS
10
+
11
+ ## Step 0 — CCEP Bootstrap
12
+
13
+ Command: `clarify` (fixed for this workflow — do not infer from user text)
14
+
15
+ 1. Run: `npx cc-codeconductor ccep parse --command clarify "$ARGUMENTS" --output json`
16
+ 2. Run: `npx cc-codeconductor ccep resolve --command clarify "$ARGUMENTS" --output json`
17
+ 3. Run: `npx cc-codeconductor ccep profile clarify --output json`
18
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command clarify --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
19
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
20
+
21
+ ---
22
+
23
+ ## Step 1 — Re-explain (task-coach)
24
+
25
+ Invoke `task-coach` / `orchestrator`. Restate the last Task Card, plan, or review in the project's vocabulary. Do not add new scope. If questions remain, one question per branch.
26
+
27
+ **STOP if ConfirmationGate reports questions.**
28
+
29
+ ---
30
+
31
+ ## Completion
32
+
33
+ A plain-language restatement plus any remaining questions. Then resume the previous workflow.
@@ -7,20 +7,44 @@ description: Run the full Council-Driven Development workflow — SDD spec creat
7
7
 
8
8
  Task request: $ARGUMENTS
9
9
 
10
- ## Step 1Deliberation & Specification (SDD)
10
+ ## Step 0CCEP Bootstrap
11
+
12
+ Command: `council` (fixed for this workflow — do not infer from user text)
13
+ command: council
14
+
15
+ 1. Run: `npx cc-codeconductor ccep parse --command council "$ARGUMENTS" --output json`
16
+ 2. Run: `npx cc-codeconductor ccep resolve --command council "$ARGUMENTS" --output json`
17
+ 3. Run: `npx cc-codeconductor ccep profile council --output json`
18
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command council --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
19
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
20
+
21
+ ---
22
+
23
+ ## Step 1 — Wayfinding (repo-explorer)
24
+
25
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
26
+ `graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
27
+ to map impact radius before deliberation. Do not write code in this step.
28
+
29
+ ---
30
+
31
+ ## Step 2 — Deliberation & Specification (SDD)
11
32
 
12
33
  Invoke the `council` skill to analyze the request before writing any code. The council must act as a steering committee involving `task-coach` (Product), `architect`, and `devil`.
13
34
 
14
35
  The council must:
15
36
  1. Clarify the prompt and define the absolute minimum scope (Simplicity Gate).
16
- 2. Explicitly document all assumptions and resolve ambiguities (Think Before Coding).
37
+ 2. Explicitly document all assumptions and run the Grilling protocol on each one (Think Before Coding).
17
38
  3. Draft a Task Card & Technical Plan (The Specification).
18
39
 
19
- **STOP here. Show the agreed Task Card & Technical Plan and wait for human confirmation before continuing.**
40
+ **STOP here.** Unresolved grilling questions populate `questionsForUser` in the
41
+ CCEP-1 `planner-output`; `ccep evaluate` (ConfirmationGate) halts until a human
42
+ answers. Show the agreed Task Card & Technical Plan and wait for confirmation
43
+ before continuing.
20
44
 
21
45
  ---
22
46
 
23
- ## Step 2 — Test Definition (TDD)
47
+ ## Step 3 — Test Definition (TDD)
24
48
 
25
49
  Invoke `tester` with the approved Task Card & Technical Plan.
26
50
 
@@ -32,7 +56,7 @@ tester must:
32
56
 
33
57
  ---
34
58
 
35
- ## Step 3 — Surgical Implementation
59
+ ## Step 4 — Surgical Implementation
36
60
 
37
61
  Invoke `implementer` with the failing tests and the Technical Plan.
38
62
 
@@ -44,7 +68,7 @@ implementer must:
44
68
 
45
69
  ---
46
70
 
47
- ## Step 4 — Multi-Perspective Council Review
71
+ ## Step 5 — Multi-Perspective Council Review
48
72
 
49
73
  Invoke the `council` skill on the generated diff to perform the final review phase.
50
74
 
@@ -52,7 +76,7 @@ The council will evaluate the diff against the 6 axes (Architecture, Security, P
52
76
 
53
77
  If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
54
78
  - The Review Report status is **BLOCKED**.
55
- - Return to Step 3 with the feedback.
79
+ - Return to Step 4 with the feedback.
56
80
 
57
81
  If APPROVED (no CRITICAL findings):
58
82
  - Deliver the final Council Verdict and the diff summary.
@@ -9,6 +9,19 @@ description:
9
9
 
10
10
  Migration request: $ARGUMENTS
11
11
 
12
+ ## Step 0 — CCEP Bootstrap
13
+
14
+ Command: `db-migration` (fixed for this workflow — do not infer from user text)
15
+
16
+ 1. Run: `npx cc-codeconductor ccep parse --command db-migration "$ARGUMENTS" --output json`
17
+ 2. Run: `npx cc-codeconductor ccep resolve --command db-migration "$ARGUMENTS" --output json`
18
+ 3. Run: `npx cc-codeconductor ccep profile db-migration --output json`
19
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command db-migration --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
20
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
21
+ Canonical delivery order is test-before-implement whenever both phases apply.
22
+
23
+ ---
24
+
12
25
  ## Step 1 — Task Card validation (task-coach)
13
26
 
14
27
  Invoke `task-coach` with the request above.
@@ -36,22 +49,22 @@ compatibility strategy, rollback/forward-fix notes, and test approach.
36
49
 
37
50
  ---
38
51
 
39
- ## Step 3 — Implementation (implementer)
52
+ ## Step 3 — Migration tests (tester)
40
53
 
41
- Invoke `implementer` with the approved plan.
54
+ Invoke `tester`.
42
55
 
43
- implementer must keep model and migration changes together, avoid unrelated
44
- refactors, and preserve the deployment order specified by architect.
56
+ tester must cover migration-sensitive behavior where the stack supports it,
57
+ including happy path, existing-data edge cases, and rollback/forward-fix notes
58
+ when automated rollback tests are not practical.
45
59
 
46
60
  ---
47
61
 
48
- ## Step 4 — Migration tests (tester)
62
+ ## Step 4 — Implementation (implementer)
49
63
 
50
- Invoke `tester`.
64
+ Invoke `implementer` with the approved plan.
51
65
 
52
- tester must cover migration-sensitive behavior where the stack supports it,
53
- including happy path, existing-data edge cases, and rollback/forward-fix notes
54
- when automated rollback tests are not practical.
66
+ implementer must keep model and migration changes together, avoid unrelated
67
+ refactors, and preserve the deployment order specified by architect.
55
68
 
56
69
  ---
57
70
 
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: cc-explore
3
+ description:
4
+ Map the repository and recommend the next CodeConductor slash command. Read-only.
5
+ ---
6
+
7
+ # Explore Workflow
8
+
9
+ Explore request: $ARGUMENTS
10
+
11
+ ## Step 0 — CCEP Bootstrap
12
+
13
+ Command: `explore` (fixed for this workflow — do not infer from user text)
14
+
15
+ 1. Run: `npx cc-codeconductor ccep parse --command explore "$ARGUMENTS" --output json`
16
+ 2. Run: `npx cc-codeconductor ccep resolve --command explore "$ARGUMENTS" --output json`
17
+ 3. Run: `npx cc-codeconductor ccep profile explore --output json`
18
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command explore --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
19
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
20
+
21
+ ---
22
+
23
+ ## Step 1 — Map (repo-explorer)
24
+
25
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"`. Invoke `repo-explorer`. Produce a Repo Map. Do not write code.
26
+
27
+ ---
28
+
29
+ ## Step 2 — Suggest next command (orchestrator)
30
+
31
+ Recommend exactly one next slash command (`/cc:feature`, `/cc:fix`, `/cc:refactor`, `/cc:review`, `/cc:triage`, …) with a one-sentence rationale. Do not start that workflow.
32
+
33
+ ---
34
+
35
+ ## Completion
36
+
37
+ Report the Repo Map and the recommended next `/cc:` command.