cc-codeconductor 0.5.0 → 1.1.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 (268) hide show
  1. package/README.md +387 -150
  2. package/dist/cli/errors.d.ts +65 -0
  3. package/dist/core/compilation/compile-checker.d.ts +53 -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 +82 -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 +24165 -15800
  23. package/dist/library.js +2744 -0
  24. package/dist/utils/result.d.ts +36 -0
  25. package/dist/validation/schemas.d.ts +4006 -0
  26. package/package.json +18 -2
  27. package/policy.yml +12 -11
  28. package/presets/agy/AGENTS.md +14 -5
  29. package/presets/agy/gates/pre-commit/GATE.md +137 -0
  30. package/presets/agy/skills/backlog/SKILL.md +91 -0
  31. package/presets/agy/skills/cc-fix/SKILL.md +2 -2
  32. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +11 -0
  33. package/presets/agy/skills/openspec/SKILL.md +5 -1
  34. package/presets/agy/skills/security-ai-llm/SKILL.md +43 -0
  35. package/presets/agy/skills/security-blue-team/SKILL.md +43 -0
  36. package/presets/agy/skills/security-cloud/SKILL.md +43 -0
  37. package/presets/agy/skills/security-crypto/SKILL.md +43 -0
  38. package/presets/agy/skills/security-exploit-dev/SKILL.md +45 -0
  39. package/presets/agy/skills/security-grc/SKILL.md +43 -0
  40. package/presets/agy/skills/security-incident-response/SKILL.md +45 -0
  41. package/presets/agy/skills/security-log-analysis/SKILL.md +43 -0
  42. package/presets/agy/skills/security-malware-analysis/SKILL.md +44 -0
  43. package/presets/agy/skills/security-mobile/SKILL.md +43 -0
  44. package/presets/agy/skills/security-network/SKILL.md +43 -0
  45. package/presets/agy/skills/security-ot-ics/SKILL.md +43 -0
  46. package/presets/agy/skills/security-recon/SKILL.md +45 -0
  47. package/presets/agy/skills/security-red-team/SKILL.md +44 -0
  48. package/presets/agy/skills/security-reverse-engineering/SKILL.md +44 -0
  49. package/presets/agy/skills/security-soc-automation/SKILL.md +43 -0
  50. package/presets/agy/skills/security-threat-hunting/SKILL.md +43 -0
  51. package/presets/agy/skills/security-vuln-assessment/SKILL.md +45 -0
  52. package/presets/agy/skills/security-web/SKILL.md +44 -0
  53. package/presets/agy/workflows/cc-api-contract.md +12 -0
  54. package/presets/agy/workflows/cc-ask.md +56 -0
  55. package/presets/agy/workflows/cc-backlog.md +69 -0
  56. package/presets/agy/workflows/cc-clarify.md +33 -0
  57. package/presets/agy/workflows/cc-council.md +31 -7
  58. package/presets/agy/workflows/cc-db-migration.md +22 -9
  59. package/presets/agy/workflows/cc-explore.md +37 -0
  60. package/presets/agy/workflows/cc-feature.md +41 -19
  61. package/presets/agy/workflows/cc-fix.md +50 -23
  62. package/presets/agy/workflows/cc-handoff.md +42 -0
  63. package/presets/agy/workflows/cc-iterative.md +128 -0
  64. package/presets/agy/workflows/cc-openspec.md +16 -1
  65. package/presets/agy/workflows/cc-pagespeed.md +12 -0
  66. package/presets/agy/workflows/cc-prototype.md +39 -0
  67. package/presets/agy/workflows/cc-refactor.md +12 -0
  68. package/presets/agy/workflows/cc-review.md +12 -0
  69. package/presets/agy/workflows/cc-scorecard.md +12 -0
  70. package/presets/agy/workflows/cc-security.md +180 -0
  71. package/presets/agy/workflows/cc-tdd-cycle.md +24 -0
  72. package/presets/agy/workflows/cc-test-plan.md +12 -0
  73. package/presets/agy/workflows/cc-triage.md +35 -0
  74. package/presets/claude/CLAUDE.md +68 -0
  75. package/presets/claude/commands/cc/api-contract.md +12 -0
  76. package/presets/claude/commands/cc/ask.md +56 -0
  77. package/presets/claude/commands/cc/backlog.md +104 -0
  78. package/presets/claude/commands/cc/clarify.md +32 -0
  79. package/presets/claude/commands/cc/council.md +87 -0
  80. package/presets/claude/commands/cc/db-migration.md +22 -9
  81. package/presets/claude/commands/cc/explore.md +36 -0
  82. package/presets/claude/commands/cc/feature.md +49 -22
  83. package/presets/claude/commands/cc/fix.md +74 -20
  84. package/presets/claude/commands/cc/handoff.md +44 -0
  85. package/presets/claude/commands/cc/iterative.md +132 -0
  86. package/presets/claude/commands/cc/openspec.md +41 -1
  87. package/presets/claude/commands/cc/pagespeed.md +12 -0
  88. package/presets/claude/commands/cc/prototype.md +38 -0
  89. package/presets/claude/commands/cc/refactor.md +152 -1
  90. package/presets/claude/commands/cc/review.md +78 -16
  91. package/presets/claude/commands/cc/scorecard.md +12 -0
  92. package/presets/claude/commands/cc/security.md +179 -0
  93. package/presets/claude/commands/cc/tdd-cycle.md +53 -3
  94. package/presets/claude/commands/cc/test-plan.md +12 -0
  95. package/presets/claude/commands/cc/triage.md +34 -0
  96. package/presets/claude/gates/pre-commit/GATE.md +137 -0
  97. package/presets/claude/settings.json +8 -46
  98. package/presets/claude/skills/backlog/SKILL.md +91 -0
  99. package/presets/claude/skills/openspec/SKILL.md +5 -1
  100. package/presets/claude/skills/security/SKILL.md +382 -0
  101. package/presets/claude/skills/security-ai-llm/SKILL.md +43 -0
  102. package/presets/claude/skills/security-blue-team/SKILL.md +43 -0
  103. package/presets/claude/skills/security-cloud/SKILL.md +43 -0
  104. package/presets/claude/skills/security-crypto/SKILL.md +43 -0
  105. package/presets/claude/skills/security-exploit-dev/SKILL.md +45 -0
  106. package/presets/claude/skills/security-grc/SKILL.md +43 -0
  107. package/presets/claude/skills/security-incident-response/SKILL.md +45 -0
  108. package/presets/claude/skills/security-log-analysis/SKILL.md +43 -0
  109. package/presets/claude/skills/security-malware-analysis/SKILL.md +44 -0
  110. package/presets/claude/skills/security-mobile/SKILL.md +43 -0
  111. package/presets/claude/skills/security-network/SKILL.md +43 -0
  112. package/presets/claude/skills/security-ot-ics/SKILL.md +43 -0
  113. package/presets/claude/skills/security-recon/SKILL.md +45 -0
  114. package/presets/claude/skills/security-red-team/SKILL.md +44 -0
  115. package/presets/claude/skills/security-reverse-engineering/SKILL.md +44 -0
  116. package/presets/claude/skills/security-soc-automation/SKILL.md +43 -0
  117. package/presets/claude/skills/security-threat-hunting/SKILL.md +43 -0
  118. package/presets/claude/skills/security-vuln-assessment/SKILL.md +45 -0
  119. package/presets/claude/skills/security-web/SKILL.md +44 -0
  120. package/presets/codex/AGENTS.md +6 -6
  121. package/presets/codex/commands/cc-ask.md +56 -0
  122. package/presets/codex/gates/pre-commit/GATE.md +137 -0
  123. package/presets/cursor/AGENTS.md +8 -8
  124. package/presets/cursor/agents/business-agent.md +44 -0
  125. package/presets/cursor/agents/continuous-architect.md +37 -0
  126. package/presets/cursor/agents/docs.md +1 -0
  127. package/presets/cursor/agents/goal-planner.md +1 -1
  128. package/presets/cursor/agents/impact-analyst.md +43 -0
  129. package/presets/cursor/agents/orchestrator.md +6 -6
  130. package/presets/cursor/commands/cc/api-contract.md +12 -0
  131. package/presets/cursor/commands/cc/ask.md +56 -0
  132. package/presets/cursor/commands/cc/backlog.md +105 -0
  133. package/presets/cursor/commands/cc/clarify.md +32 -0
  134. package/presets/cursor/commands/cc/council.md +87 -0
  135. package/presets/cursor/commands/cc/db-migration.md +22 -9
  136. package/presets/cursor/commands/cc/explore.md +36 -0
  137. package/presets/cursor/commands/cc/feature.md +41 -19
  138. package/presets/cursor/commands/cc/fix.md +47 -20
  139. package/presets/cursor/commands/cc/handoff.md +41 -0
  140. package/presets/cursor/commands/cc/iterative.md +133 -0
  141. package/presets/cursor/commands/cc/openspec.md +38 -8
  142. package/presets/cursor/commands/cc/pagespeed.md +12 -0
  143. package/presets/cursor/commands/cc/prototype.md +38 -0
  144. package/presets/cursor/commands/cc/refactor.md +12 -0
  145. package/presets/cursor/commands/cc/review.md +12 -0
  146. package/presets/cursor/commands/cc/scorecard.md +12 -0
  147. package/presets/cursor/commands/cc/security.md +179 -0
  148. package/presets/cursor/commands/cc/tdd-cycle.md +24 -0
  149. package/presets/cursor/commands/cc/test-plan.md +12 -0
  150. package/presets/cursor/commands/cc/triage.md +34 -0
  151. package/presets/cursor/gates/pre-commit/GATE.md +137 -0
  152. package/presets/cursor/rules/orchestration.mdc +1 -1
  153. package/presets/cursor/skills/backlog/SKILL.md +91 -0
  154. package/presets/cursor/skills/openspec/SKILL.md +5 -1
  155. package/presets/cursor/skills/security-ai-llm/SKILL.md +43 -0
  156. package/presets/cursor/skills/security-blue-team/SKILL.md +43 -0
  157. package/presets/cursor/skills/security-cloud/SKILL.md +43 -0
  158. package/presets/cursor/skills/security-crypto/SKILL.md +43 -0
  159. package/presets/cursor/skills/security-exploit-dev/SKILL.md +45 -0
  160. package/presets/cursor/skills/security-grc/SKILL.md +43 -0
  161. package/presets/cursor/skills/security-incident-response/SKILL.md +45 -0
  162. package/presets/cursor/skills/security-log-analysis/SKILL.md +43 -0
  163. package/presets/cursor/skills/security-malware-analysis/SKILL.md +44 -0
  164. package/presets/cursor/skills/security-mobile/SKILL.md +43 -0
  165. package/presets/cursor/skills/security-network/SKILL.md +43 -0
  166. package/presets/cursor/skills/security-ot-ics/SKILL.md +43 -0
  167. package/presets/cursor/skills/security-recon/SKILL.md +45 -0
  168. package/presets/cursor/skills/security-red-team/SKILL.md +44 -0
  169. package/presets/cursor/skills/security-reverse-engineering/SKILL.md +44 -0
  170. package/presets/cursor/skills/security-soc-automation/SKILL.md +43 -0
  171. package/presets/cursor/skills/security-threat-hunting/SKILL.md +43 -0
  172. package/presets/cursor/skills/security-vuln-assessment/SKILL.md +45 -0
  173. package/presets/cursor/skills/security-web/SKILL.md +44 -0
  174. package/presets/opencode/agents/architect.md +22 -1
  175. package/presets/opencode/agents/complexity-auditor.md +16 -1
  176. package/presets/opencode/agents/contract-builder.md +17 -1
  177. package/presets/opencode/agents/devil.md +158 -0
  178. package/presets/opencode/agents/docs.md +19 -1
  179. package/presets/opencode/agents/goal-planner.md +32 -2
  180. package/presets/opencode/agents/implementer.md +32 -2
  181. package/presets/opencode/agents/orchestrator.md +79 -12
  182. package/presets/opencode/agents/planner.md +61 -0
  183. package/presets/opencode/agents/repo-explorer.md +16 -0
  184. package/presets/opencode/agents/reviewer.md +33 -3
  185. package/presets/opencode/agents/security-reviewer.md +31 -1
  186. package/presets/opencode/agents/task-coach.md +69 -1
  187. package/presets/opencode/agents/tester.md +18 -1
  188. package/presets/opencode/commands/cc-api-contract.md +12 -0
  189. package/presets/opencode/commands/cc-ask.md +56 -0
  190. package/presets/opencode/commands/cc-backlog.md +68 -0
  191. package/presets/opencode/commands/cc-clarify.md +31 -0
  192. package/presets/opencode/commands/cc-council.md +87 -0
  193. package/presets/opencode/commands/cc-db-migration.md +22 -9
  194. package/presets/opencode/commands/cc-explore.md +35 -0
  195. package/presets/opencode/commands/cc-feature.md +41 -19
  196. package/presets/opencode/commands/cc-fix.md +50 -23
  197. package/presets/opencode/commands/cc-handoff.md +40 -0
  198. package/presets/opencode/commands/cc-iterative.md +127 -0
  199. package/presets/opencode/commands/cc-openspec.md +16 -1
  200. package/presets/opencode/commands/cc-pagespeed.md +12 -0
  201. package/presets/opencode/commands/cc-prototype.md +37 -0
  202. package/presets/opencode/commands/cc-refactor.md +12 -0
  203. package/presets/opencode/commands/cc-review.md +12 -0
  204. package/presets/opencode/commands/cc-scorecard.md +12 -0
  205. package/presets/opencode/commands/cc-security.md +179 -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 +137 -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/goal-planner.md +1 -1
  215. package/presets/opencode/prompts/v0.5.0/orchestrator.md +6 -6
  216. package/presets/opencode/prompts/v0.6.0/implementer.md +35 -0
  217. package/presets/opencode/prompts/v0.6.0/planner.md +36 -0
  218. package/presets/opencode/prompts/v0.6.0/reviewer.md +40 -0
  219. package/presets/opencode/prompts/v1.0.0/README.md +47 -0
  220. package/presets/opencode/prompts/v1.0.0/architect.md +259 -0
  221. package/presets/opencode/prompts/v1.0.0/complexity-auditor.md +116 -0
  222. package/presets/opencode/prompts/v1.0.0/contract-builder.md +120 -0
  223. package/presets/opencode/prompts/v1.0.0/devil.md +169 -0
  224. package/presets/opencode/prompts/v1.0.0/docs.md +229 -0
  225. package/presets/opencode/prompts/v1.0.0/goal-planner.md +123 -0
  226. package/presets/opencode/prompts/v1.0.0/implementer.md +228 -0
  227. package/presets/opencode/prompts/v1.0.0/orchestrator.md +474 -0
  228. package/presets/opencode/prompts/v1.0.0/planner.md +72 -0
  229. package/presets/opencode/prompts/v1.0.0/repo-explorer.md +147 -0
  230. package/presets/opencode/prompts/v1.0.0/reviewer.md +295 -0
  231. package/presets/opencode/prompts/v1.0.0/security-reviewer.md +170 -0
  232. package/presets/opencode/prompts/v1.0.0/task-coach.md +235 -0
  233. package/presets/opencode/prompts/v1.0.0/tester.md +298 -0
  234. package/presets/opencode/skills/backlog/SKILL.md +91 -0
  235. package/presets/opencode/skills/openspec/SKILL.md +5 -1
  236. package/presets/opencode/skills/security-ai-llm/SKILL.md +43 -0
  237. package/presets/opencode/skills/security-blue-team/SKILL.md +43 -0
  238. package/presets/opencode/skills/security-cloud/SKILL.md +43 -0
  239. package/presets/opencode/skills/security-crypto/SKILL.md +43 -0
  240. package/presets/opencode/skills/security-exploit-dev/SKILL.md +45 -0
  241. package/presets/opencode/skills/security-grc/SKILL.md +43 -0
  242. package/presets/opencode/skills/security-incident-response/SKILL.md +45 -0
  243. package/presets/opencode/skills/security-log-analysis/SKILL.md +43 -0
  244. package/presets/opencode/skills/security-malware-analysis/SKILL.md +44 -0
  245. package/presets/opencode/skills/security-mobile/SKILL.md +43 -0
  246. package/presets/opencode/skills/security-network/SKILL.md +43 -0
  247. package/presets/opencode/skills/security-ot-ics/SKILL.md +43 -0
  248. package/presets/opencode/skills/security-recon/SKILL.md +45 -0
  249. package/presets/opencode/skills/security-red-team/SKILL.md +44 -0
  250. package/presets/opencode/skills/security-reverse-engineering/SKILL.md +44 -0
  251. package/presets/opencode/skills/security-soc-automation/SKILL.md +43 -0
  252. package/presets/opencode/skills/security-threat-hunting/SKILL.md +43 -0
  253. package/presets/opencode/skills/security-vuln-assessment/SKILL.md +45 -0
  254. package/presets/opencode/skills/security-web/SKILL.md +44 -0
  255. package/presets/seo-hotel/settings.json +0 -17
  256. package/src/presets/council/council.yml +12 -0
  257. package/src/presets/manifests/agy.yml +2 -2
  258. package/src/presets/manifests/claude.yml +2 -2
  259. package/src/presets/manifests/codex.yml +2 -2
  260. package/src/presets/manifests/cursor.yml +2 -2
  261. package/src/presets/manifests/gemini.yml +2 -2
  262. package/src/presets/manifests/opencode.yml +2 -2
  263. package/src/presets/models/agy.yml +93 -66
  264. package/src/presets/models/claude.yml +79 -53
  265. package/src/presets/models/codex.yml +79 -54
  266. package/src/presets/models/cursor.yml +72 -58
  267. package/src/presets/models/gemini.yml +79 -53
  268. package/src/presets/models/opencode.yml +72 -46
@@ -0,0 +1,137 @@
1
+ # Pre-commit Gate: Typecheck, Lint, and Test
2
+
3
+ Este gate instala un hook `pre-commit` que ejecuta `bun run typecheck`, `bun run lint` 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 lint || exit 1
67
+ bun run test || exit 1
68
+ HOOK_EOF
69
+
70
+ # Hacer el hook ejecutable
71
+ chmod +x "$HOOK_PATH"
72
+
73
+ echo "Pre-commit hook installed successfully."
74
+ ```
75
+
76
+ ## Notas de implementación
77
+
78
+ - **Sin dependencias externas**: El script no instala Husky, lint-staged, ni ninguna otra herramienta. Solo escribe un archivo shell y configura permisos.
79
+ - **Resolución dinámica de git dir**: Usa `git rev-parse --git-dir` para localizar el directorio correcto, incluso en worktrees.
80
+ - **Detección de conflictos**: Si Husky o lint-staged ya está en `package.json`, el script avisa y no instala para evitar conflictos.
81
+ - **Protección de hooks existentes**: Si ya existe un `.git/hooks/pre-commit`, el script no lo sobrescribe.
82
+ - **Solo Bun**: El hook ejecuta `bun run typecheck`, `bun run lint` y `bun run test`. Asegúrate de que estos scripts están definidos en `package.json`.
83
+
84
+ ## Verificación
85
+
86
+ Después de instalar, verifica que el hook está en su lugar.
87
+
88
+ Para verificar, ejecuta:
89
+
90
+ ls -la .git/hooks/pre-commit
91
+
92
+ Debe mostrar algo como:
93
+
94
+ -rwxr-xr-x user group ... .git/hooks/pre-commit
95
+
96
+ Luego, intenta hacer un commit. Si hay errores de tipo o tests fallidos, el commit será bloqueado:
97
+
98
+ git add .
99
+ git commit -m "test"
100
+ # Si typecheck o test falla, verás el error y el commit será abortado.
101
+
102
+ ## Troubleshooting
103
+
104
+ ### "Warning: Pre-commit hook already exists"
105
+
106
+ Ya hay un hook pre-commit. Revisa su contenido:
107
+
108
+ cat .git/hooks/pre-commit
109
+
110
+ Si quieres reemplazarlo, bórralo y ejecuta el script nuevamente:
111
+
112
+ rm .git/hooks/pre-commit
113
+ bash /path/to/installer
114
+
115
+ ### "Warning: Husky or lint-staged detected"
116
+
117
+ 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.
118
+
119
+ ### Hook no se ejecuta al hacer commit
120
+
121
+ Verifica que el hook es ejecutable:
122
+
123
+ chmod +x .git/hooks/pre-commit
124
+
125
+ Verifica que `bun run typecheck`, `bun run lint` y `bun run test` existen en `package.json`:
126
+
127
+ cat package.json | grep -A 5 '"scripts"'
128
+
129
+ ### "command not found: bun"
130
+
131
+ Bun no está instalado o no está en PATH. Instala Bun desde https://bun.sh o configura PATH adecuadamente.
132
+
133
+ ## Adicional: Desinstalación
134
+
135
+ Para remover el hook, simplemente bórralo:
136
+
137
+ rm .git/hooks/pre-commit
@@ -73,18 +73,18 @@ introduces maintenance burden, supply-chain risk, and version conflicts.
73
73
 
74
74
  | Task Type | Risk | Route To |
75
75
  | -------------------- | ----------- | ----------------------------------------------------------- |
76
- | New feature design | any | `architect` → `implementer` |
77
- | Bug fix | low | `implementer` |
78
- | Bug fix | medium–high | `task-coach` → `implementer` → `tester` |
76
+ | New feature design | any | `architect` → `tester` → `implementer` |
77
+ | Bug fix | low | `tester` → `implementer` |
78
+ | Bug fix | medium–high | `task-coach` → `tester` → `implementer` |
79
79
  | Refactor | low | `implementer` |
80
80
  | Refactor | medium–high | `architect` → `implementer` → `complexity-auditor` → `reviewer` |
81
81
  | API change | any | `architect` → `implementer` → `complexity-auditor` → `reviewer` |
82
- | Database migration | any | `architect` → `implementer` → `tester` → `complexity-auditor` → `reviewer` |
82
+ | Database migration | any | `architect` → `tester` → `implementer` → `complexity-auditor` → `reviewer` |
83
83
  | Test coverage | any | `tester` |
84
84
  | Documentation update | any | `docs` |
85
85
  | Codebase exploration | any | `repo-explorer` |
86
86
  | Code review | any | `reviewer` |
87
- | DDD→SDD→TDD pipeline | any | `contract-builder` → `architect` → `implementer` → `tester` |
87
+ | DDD→SDD→TDD pipeline | any | `contract-builder` → `architect` → `tester` → `implementer` |
88
88
  | Security review | high | `security-reviewer` → `reviewer` |
89
89
 
90
90
  When uncertain about routing, escalate to `orchestrator`.
@@ -324,7 +324,7 @@ needs a multi-step plan before delegation.
324
324
 
325
325
  The planner matches objective keywords against built-in templates (auth, crud,
326
326
  search, notification, migration) and falls back to a generic 4-task chain:
327
- `task-coach → architect → implementertester`.
327
+ `task-coach → architect → testerimplementer`.
328
328
 
329
329
  **Dependency order delegation (orchestrator):**
330
330
 
@@ -391,8 +391,8 @@ definition, or the DDD→SDD→TDD pipeline is triggered.
391
391
  When the active task touches stack-specific code, apply rules in `.cursor/skills/`.
392
392
  Invoke skills via `/skill-name` or let the agent auto-load scoped skills.
393
393
 
394
- Key skills: `security`, `django-orm`, `spring-boot-kotlin`, `nextjs-typescript`,
395
- `laravel-specialist`, `openspec`, `evaluation`, `multi-agent-orchestration`.
394
+ Key skills: `security`, `security-*`, `django-orm`, `spring-boot-kotlin`, `nextjs-typescript`,
395
+ `laravel-specialist`, `openspec`, `backlog`, `evaluation`, `multi-agent-orchestration`.
396
396
 
397
397
  ## Hard Rules (all agents)
398
398
 
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: business-agent
3
+ description: Product Manager agent — evaluates ROI, adoption, and business value before implementation. Does not write code.
4
+ ---
5
+
6
+ # Business Agent
7
+
8
+ You are the **Business Agent** for CodeConductor. You ask Product Manager questions
9
+ before high-impact features proceed to implementation.
10
+
11
+ ## Role
12
+
13
+ - Evaluate whether a proposed change generates business value
14
+ - Estimate user impact and adoption risk
15
+ - Challenge features with low ROI or unclear outcomes
16
+ - Produce structured `BusinessReviewOutput` JSON
17
+
18
+ ## Questions you must address
19
+
20
+ 1. Does this really generate revenue or reduce cost?
21
+ 2. How many users use the affected capability today?
22
+ 3. What happens if we remove or defer this?
23
+ 4. What is the expected ROI vs implementation cost?
24
+
25
+ ## Output contract
26
+
27
+ Return JSON matching `BusinessReviewOutputSchema`:
28
+
29
+ ```json
30
+ {
31
+ "status": "proceed" | "defer" | "reject",
32
+ "roiEstimate": "string",
33
+ "userImpact": "string",
34
+ "eliminationRisk": "string",
35
+ "questions": ["string"],
36
+ "confidence": 0.0-1.0
37
+ }
38
+ ```
39
+
40
+ ## Constraints
41
+
42
+ - Do not write implementation code
43
+ - Do not approve without explicit business rationale
44
+ - Escalate when data is missing — list questions in `questions`
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: continuous-architect
3
+ description: Maintains product graph, ADRs, and architecture docs after implementation completes.
4
+ ---
5
+
6
+ # Continuous Architect
7
+
8
+ You are the **Continuous Architect** for CodeConductor. After tasks complete, you
9
+ update the product's structural memory so documentation never drifts from reality.
10
+
11
+ ## Responsibilities
12
+
13
+ After implementation:
14
+
15
+ 1. Update or create ADR stubs when architectural decisions were made
16
+ 2. Note new components in product graph references
17
+ 3. Record technical debt and risks discovered during implementation
18
+ 4. Update dependency and contract documentation when APIs change
19
+
20
+ ## Triggers
21
+
22
+ - `task.completed` event from orchestrator runtime
23
+ - Post-merge documentation sync requests
24
+
25
+ ## Output
26
+
27
+ Structured artifacts:
28
+
29
+ - ADR markdown (context, decision, consequences)
30
+ - Product graph node suggestions (component, contract, flow)
31
+ - Debt/risk entries for ingest pipeline
32
+
33
+ ## Constraints
34
+
35
+ - Minimal diff to docs — only what the change requires
36
+ - Link every decision to the task ID and evidence
37
+ - Do not refactor code — docs and graph metadata only
@@ -55,6 +55,7 @@ CHANGELOG is mandatory for every implementation change. No exceptions.
55
55
  - `docs/**/*.md` — any markdown documentation file
56
56
  - `docs/adr/*.md` — Architecture Decision Records
57
57
  - `CHANGELOG.md` — always update for any implementation change
58
+ - `.codeconductor/sessions/handoff.md` — `/cc:handoff` only; gitignored; redact secrets
58
59
  - `openapi.yaml`, `openapi.json`, or any OpenAPI spec file
59
60
  - Any `*-api.yaml` or `*-api.json` file
60
61
 
@@ -36,7 +36,7 @@ Match objective keywords against built-in templates (in order):
36
36
  | migration, schema, database | migration |
37
37
  | (no match) | generic 4-task chain |
38
38
 
39
- **Generic fallback chain:** `task-coach` → `architect` → `implementer` → `tester`
39
+ **Generic fallback chain:** `task-coach` → `architect` → `tester` → `implementer`
40
40
 
41
41
  Each task must include: `id`, `title`, `type`, `risk`, `status: pending`,
42
42
  `context_scope`, `depends_on`, `acceptance_criteria` (≥ 1 each).
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: impact-analyst
3
+ description: Produces ImpactReport before medium/high-risk changes — endpoints, contracts, tests, flows affected.
4
+ ---
5
+
6
+ # Impact Analyst
7
+
8
+ You are the **Impact Analyst** for CodeConductor. Before implementation of
9
+ medium or high-risk tasks, you analyze blast radius using the product graph.
10
+
11
+ ## Input
12
+
13
+ - Task Card with `targetFiles` or capability ID
14
+ - Product graph context from `cc impact` or CCEP `knowledge`
15
+
16
+ ## Output
17
+
18
+ Structured `ImpactReport`:
19
+
20
+ ```json
21
+ {
22
+ "target": "string",
23
+ "brokenEndpoints": ["string"],
24
+ "brokenContracts": ["string"],
25
+ "affectedTests": ["string"],
26
+ "affectedFlows": ["string"],
27
+ "affectedComponents": ["string"],
28
+ "summary": "If you implement this, you may affect: ..."
29
+ }
30
+ ```
31
+
32
+ ## Process
33
+
34
+ 1. Map target files to product graph components
35
+ 2. Traverse `depends_on`, `affects`, `implements` relations
36
+ 3. List contracts, tests, and flows at risk
37
+ 4. Summarize in one actionable sentence
38
+
39
+ ## Constraints
40
+
41
+ - Read-only analysis — no code changes
42
+ - Cite graph node IDs in summary when available
43
+ - Block routing to implementer if critical contracts lack migration plan
@@ -95,22 +95,22 @@ regression.
95
95
 
96
96
  | Task type | Risk | Route |
97
97
  | ------------------ | ----------- | ------------------------------------------------------------------ |
98
- | New feature | high | `architect` → `implementer` → `tester` → `security-reviewer` → `reviewer` |
99
- | New feature | low-medium | `architect` → `implementer` → `tester` → `reviewer` |
98
+ | New feature | high | `architect` → `tester` → `implementer` → `security-reviewer` → `reviewer` |
99
+ | New feature | low-medium | `architect` → `tester` → `implementer` → `reviewer` |
100
100
  | Performance Opt | medium | `task-coach` → `implementer` → `reviewer` |
101
- | Bug fix | low | `implementer` → `tester` |
102
- | Bug fix | medium–high | `task-coach` → `architect` → `implementer` → `tester` → `reviewer` |
101
+ | Bug fix | low | `tester` → `implementer` |
102
+ | Bug fix | medium–high | `task-coach` → `architect` → `tester` → `implementer` → `reviewer` |
103
103
  | Refactor | low | `architect` → `implementer` |
104
104
  | Refactor | medium–high | `architect` → `implementer` → `reviewer` |
105
105
  | API change | any | `architect` → `implementer` → `reviewer` |
106
- | Database migration | any | `architect` → `implementer` → `tester` → `reviewer` |
106
+ | Database migration | any | `architect` → `tester` → `implementer` → `reviewer` |
107
107
  | Test coverage | any | `tester` |
108
108
  | Documentation | any | `docs` |
109
109
  | Codebase question | any | `repo-explorer` |
110
110
  | Code review | any | `reviewer` |
111
111
  | Task unclear | any | `task-coach` |
112
112
  | Multi-step goal | any | `goal-planner` → [dependency-ordered agents] |
113
- | DDD→SDD→TDD | any | `contract-builder` → `architect` → `implementer` → `tester` |
113
+ | DDD→SDD→TDD | any | `contract-builder` → `architect` → `tester` → `implementer` |
114
114
 
115
115
  ---
116
116
 
@@ -8,6 +8,18 @@ description: >-
8
8
 
9
9
  API contract request: $ARGUMENTS
10
10
 
11
+ ## Step 0 — CCEP Bootstrap
12
+
13
+ Command: `api-contract` (fixed for this workflow — do not infer from user text)
14
+
15
+ 1. Run: `npx cc-codeconductor ccep parse --command api-contract "$ARGUMENTS" --output json`
16
+ 2. Run: `npx cc-codeconductor ccep resolve --command api-contract "$ARGUMENTS" --output json`
17
+ 3. Run: `npx cc-codeconductor ccep profile api-contract --output json`
18
+ 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.
19
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
20
+
21
+ ---
22
+
11
23
  ## Step 1 — Task Card validation (Task Coach role)
12
24
 
13
25
  Invoke the `task-coach` subagent via the Task tool.
@@ -0,0 +1,56 @@
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:backlog` | create or append BACKLOG.md / objectives |
40
+ | `/cc:openspec` | BACKLOG / BC-xxx delivery |
41
+
42
+ If the CLI is unavailable, apply the same catalog and the same priority:
43
+ backlog (author) vs openspec (deliver) → tdd-cycle → review → refactor → fix → feature (default).
44
+
45
+ ---
46
+
47
+ ## Step 2 — Show and stop
48
+
49
+ Print:
50
+
51
+ - **Recommended:** the slash command
52
+ - **Why:** one or two sentences from the CLI `reason` (or your matching)
53
+
54
+ **STOP.** Wait for the human. Do not invoke the recommended workflow.
55
+
56
+ For a full preset inventory (skills, commands on disk), use `/cc:help` / `cc-help`.
@@ -0,0 +1,105 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Author BACKLOG.md — wayfinding, grilling, create or append items,
4
+ validate with openspec, and plan OpenSpec change folders for /cc-openspec.
5
+ ---
6
+
7
+ # Backlog Authoring Workflow
8
+
9
+ Objectives: $ARGUMENTS
10
+
11
+ Create or append valid `BACKLOG.md` items and OpenSpec change docs. Do **not**
12
+ deliver implementation — that is `/cc-openspec`.
13
+
14
+ ---
15
+
16
+ ## Step 0 — CCEP Bootstrap
17
+
18
+ Command: `backlog` (fixed for this workflow — do not infer from user text)
19
+
20
+ 1. Run: `npx cc-codeconductor ccep parse --command backlog "$ARGUMENTS" --output json`
21
+ 2. Run: `npx cc-codeconductor ccep resolve --command backlog "$ARGUMENTS" --output json`
22
+ 3. Run: `npx cc-codeconductor ccep profile backlog --output json`
23
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command backlog --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
24
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
25
+
26
+ ---
27
+
28
+ ## Step 1 — Wayfinding (repo-explorer)
29
+
30
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
31
+ `graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
32
+ to map modules, conventions, and impact radius. Do not write `BACKLOG.md` in
33
+ this step. Record a Repo Map so Scope names real files or modules.
34
+
35
+ ---
36
+
37
+ ## Step 2 — Relentless Grilling (task-coach)
38
+
39
+ Invoke `task-coach`. Produce complete backlog item fields: title, type, risk,
40
+ scope, description, out of scope, measurable acceptance criteria.
41
+
42
+ Every assumption must survive one grilling question. Reject vague acceptance
43
+ ("improve UX", "fix bugs").
44
+
45
+ If any field is missing or ambiguous, ask one clarifying question at a time.
46
+
47
+ **STOP here.** Unresolved grilling questions populate `questionsForUser` in the
48
+ CCEP-1 `planner-output`; `ccep evaluate --command backlog` halts until a human
49
+ answers. Do not write `BACKLOG.md` until that confirmation.
50
+
51
+ ---
52
+
53
+ ## Step 3 — Write or append BACKLOG.md (docs)
54
+
55
+ Apply skill `backlog`.
56
+
57
+ - If `BACKLOG.md` is absent, create it from the canonical template
58
+ (`presets/templates/BACKLOG.md`). Set Global `Product` from `package.json`
59
+ `name` when present.
60
+ - If it exists, append new `### BC-xxx` items under `## Items`. Do not rewrite
61
+ `## Global` or `## Archive`.
62
+ - Next ID = max `BC-NNN` across Items and Archive, plus one.
63
+ - New items: Status `READY`, Progress `0%`, measurable Acceptance checklist.
64
+
65
+ Do **not** `git add` `BACKLOG.md` or `openspec/`.
66
+
67
+ ---
68
+
69
+ ## Step 4 — Validate (mandatory gate)
70
+
71
+ Run:
72
+
73
+ ```bash
74
+ npx cc-codeconductor openspec validate
75
+ ```
76
+
77
+ If validation fails:
78
+
79
+ 1. List all errors and recommendations from the CLI output.
80
+ 2. Show the canonical BACKLOG.md structure (## Global, ## Items, ### BC-001 | Title, Priority, Status, Type, Depends on, Description, Scope, Acceptance).
81
+ 3. Fix the file and re-run validate. **STOP** planning until valid.
82
+
83
+ ---
84
+
85
+ ## Step 5 — Plan new items
86
+
87
+ For each **new** `BC-xxx` from this run:
88
+
89
+ ```bash
90
+ npx cc-codeconductor openspec plan <BC-id>
91
+ ```
92
+
93
+ Show TaskCards and `openspec/changes/<slug>/` (proposal, design, tasks, specs).
94
+
95
+ ---
96
+
97
+ ## Completion
98
+
99
+ Report: item IDs added, validate result, change folder paths.
100
+
101
+ Tell the user to run `/cc-openspec` (optionally `/cc-openspec BC-xxx`) to
102
+ deliver. Do not start delivery in this workflow.
103
+
104
+ Apply skill `backlog` for create/append rules. Apply skill `openspec` only for
105
+ format and state-machine reference.
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Re-explain the last deliverable in Task Card vocabulary when it did not land.
4
+ ---
5
+
6
+ # Clarify Workflow
7
+
8
+ Clarify request: $ARGUMENTS
9
+
10
+ ## Step 0 — CCEP Bootstrap
11
+
12
+ Command: `clarify` (fixed for this workflow — do not infer from user text)
13
+
14
+ 1. Run: `npx cc-codeconductor ccep parse --command clarify "$ARGUMENTS" --output json`
15
+ 2. Run: `npx cc-codeconductor ccep resolve --command clarify "$ARGUMENTS" --output json`
16
+ 3. Run: `npx cc-codeconductor ccep profile clarify --output json`
17
+ 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.
18
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
19
+
20
+ ---
21
+
22
+ ## Step 1 — Re-explain (task-coach)
23
+
24
+ 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.
25
+
26
+ **STOP if ConfirmationGate reports questions.**
27
+
28
+ ---
29
+
30
+ ## Completion
31
+
32
+ A plain-language restatement plus any remaining questions. Then resume the previous workflow.
@@ -0,0 +1,87 @@
1
+ ---
2
+ description: Council-driven workflow with CCEP-1 bootstrap
3
+ ---
4
+
5
+ # Council-Driven Workflow
6
+
7
+ Task request: $ARGUMENTS
8
+
9
+ ## Step 0 — CCEP Bootstrap
10
+
11
+ Command: `council` (fixed for this workflow — do not infer from user text)
12
+ command: council
13
+
14
+ 1. Run: `npx cc-codeconductor ccep parse --command council "$ARGUMENTS" --output json`
15
+ 2. Run: `npx cc-codeconductor ccep resolve --command council "$ARGUMENTS" --output json`
16
+ 3. Run: `npx cc-codeconductor ccep profile council --output json`
17
+ 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.
18
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
19
+
20
+ ---
21
+
22
+ ## Step 1 — Wayfinding (repo-explorer)
23
+
24
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
25
+ `graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
26
+ to map impact radius before deliberation. Do not write code in this step.
27
+
28
+ ---
29
+
30
+ ## Step 2 — Deliberation & Specification (SDD)
31
+
32
+ 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`.
33
+
34
+ The council must:
35
+ 1. Clarify the prompt and define the absolute minimum scope (Simplicity Gate).
36
+ 2. Explicitly document all assumptions and run the Grilling protocol on each one (Think Before Coding).
37
+ 3. Draft a Task Card & Technical Plan (The Specification).
38
+
39
+ **STOP here.** Unresolved grilling questions populate `questionsForUser` in the
40
+ CCEP-1 `planner-output`; `ccep evaluate` (ConfirmationGate) halts until a human
41
+ answers. Show the agreed Task Card & Technical Plan and wait for confirmation
42
+ before continuing.
43
+
44
+ ---
45
+
46
+ ## Step 3 — Test Definition (TDD)
47
+
48
+ Invoke `tester` with the approved Task Card & Technical Plan.
49
+
50
+ tester must:
51
+ 1. Write failing tests based on the Acceptance Criteria defined in the Task Card.
52
+ 2. Confirm the tests fail as expected (Red state).
53
+
54
+ **Goal-Driven Execution (Karpathy)**: Do not proceed until verifiable tests are written and fail for the correct reasons.
55
+
56
+ ---
57
+
58
+ ## Step 4 — Surgical Implementation
59
+
60
+ Invoke `implementer` with the failing tests and the Technical Plan.
61
+
62
+ implementer must:
63
+ 1. Write the minimal code required to pass the tests.
64
+ 2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
65
+ 3. NOT refactor adjacent code, change existing styles, or build speculative features.
66
+ 4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state).
67
+
68
+ ---
69
+
70
+ ## Step 5 — Multi-Perspective Council Review
71
+
72
+ Invoke the `council` skill on the generated diff to perform the final review phase.
73
+
74
+ The council will evaluate the diff against the 6 axes (Architecture, Security, Product, Delivery, DataOps, Devil).
75
+
76
+ If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
77
+ - The Review Report status is **BLOCKED**.
78
+ - Return to Step 4 with the feedback.
79
+
80
+ If APPROVED (no CRITICAL findings):
81
+ - Deliver the final Council Verdict and the diff summary.
82
+
83
+ ---
84
+
85
+ ## Completion
86
+
87
+ Deliver the complete Council Verdict. The feature is only complete when tests pass and the council explicitly approves the implementation according to the specification.