cc-codeconductor 1.0.0 → 1.2.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 (247) hide show
  1. package/README.md +326 -87
  2. package/dist/core/compilation/compile-checker.d.ts +2 -0
  3. package/dist/core/loop/loop-engine.d.ts +3 -0
  4. package/dist/core/verification/verification-runner.d.ts +7 -0
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.js +3825 -597
  7. package/dist/library.js +195 -18
  8. package/dist/validation/schemas.d.ts +461 -44
  9. package/package.json +4 -1
  10. package/presets/agy/AGENTS.md +13 -9
  11. package/presets/agy/gates/pre-commit/GATE.md +5 -4
  12. package/presets/agy/hooks.json +2 -2
  13. package/presets/agy/scripts/invoke-hook.cjs +115 -0
  14. package/presets/agy/skills/backlog/SKILL.md +61 -0
  15. package/presets/agy/skills/cc-spec-mutation/SKILL.md +165 -0
  16. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +3 -0
  17. package/presets/agy/skills/evaluation/SKILL.md +61 -2
  18. package/presets/agy/skills/openspec/SKILL.md +50 -16
  19. package/presets/agy/skills/security-ai-llm/SKILL.md +43 -0
  20. package/presets/agy/skills/security-blue-team/SKILL.md +43 -0
  21. package/presets/agy/skills/security-cloud/SKILL.md +43 -0
  22. package/presets/agy/skills/security-crypto/SKILL.md +43 -0
  23. package/presets/agy/skills/security-exploit-dev/SKILL.md +45 -0
  24. package/presets/agy/skills/security-grc/SKILL.md +43 -0
  25. package/presets/agy/skills/security-incident-response/SKILL.md +45 -0
  26. package/presets/agy/skills/security-log-analysis/SKILL.md +43 -0
  27. package/presets/agy/skills/security-malware-analysis/SKILL.md +44 -0
  28. package/presets/agy/skills/security-mobile/SKILL.md +43 -0
  29. package/presets/agy/skills/security-network/SKILL.md +43 -0
  30. package/presets/agy/skills/security-ot-ics/SKILL.md +43 -0
  31. package/presets/agy/skills/security-recon/SKILL.md +45 -0
  32. package/presets/agy/skills/security-red-team/SKILL.md +44 -0
  33. package/presets/agy/skills/security-reverse-engineering/SKILL.md +44 -0
  34. package/presets/agy/skills/security-soc-automation/SKILL.md +43 -0
  35. package/presets/agy/skills/security-threat-hunting/SKILL.md +43 -0
  36. package/presets/agy/skills/security-vuln-assessment/SKILL.md +45 -0
  37. package/presets/agy/skills/security-web/SKILL.md +44 -0
  38. package/presets/agy/skills/testing-tdd/SKILL.md +53 -0
  39. package/presets/agy/skills/using-cc-skills/SKILL.md +48 -0
  40. package/presets/agy/workflows/cc-api-contract.md +14 -0
  41. package/presets/agy/workflows/cc-ask.md +2 -1
  42. package/presets/agy/workflows/cc-backlog.md +69 -0
  43. package/presets/agy/workflows/cc-db-migration.md +14 -0
  44. package/presets/agy/workflows/cc-explore.md +1 -1
  45. package/presets/agy/workflows/cc-feature.md +18 -0
  46. package/presets/agy/workflows/cc-fix.md +14 -0
  47. package/presets/agy/workflows/cc-iterative.md +14 -0
  48. package/presets/agy/workflows/cc-openspec.md +17 -1
  49. package/presets/agy/workflows/cc-scorecard.md +2 -0
  50. package/presets/agy/workflows/cc-security.md +180 -0
  51. package/presets/agy/workflows/cc-spec-mutation.md +191 -0
  52. package/presets/agy/workflows/cc-tdd-cycle.md +14 -0
  53. package/presets/claude/CLAUDE.md +4 -0
  54. package/presets/claude/commands/cc/api-contract.md +14 -0
  55. package/presets/claude/commands/cc/ask.md +2 -1
  56. package/presets/claude/commands/cc/backlog.md +104 -0
  57. package/presets/claude/commands/cc/db-migration.md +14 -0
  58. package/presets/claude/commands/cc/explore.md +1 -1
  59. package/presets/claude/commands/cc/feature.md +18 -0
  60. package/presets/claude/commands/cc/fix.md +17 -0
  61. package/presets/claude/commands/cc/iterative.md +14 -0
  62. package/presets/claude/commands/cc/openspec.md +30 -1
  63. package/presets/claude/commands/cc/review.md +3 -0
  64. package/presets/claude/commands/cc/scorecard.md +2 -0
  65. package/presets/claude/commands/cc/security.md +179 -0
  66. package/presets/claude/commands/cc/spec-mutation.md +190 -0
  67. package/presets/claude/commands/cc/tdd-cycle.md +17 -0
  68. package/presets/claude/gates/pre-commit/GATE.md +5 -4
  69. package/presets/claude/settings.json +13 -11
  70. package/presets/claude/skills/backlog/SKILL.md +61 -0
  71. package/presets/claude/skills/evaluation/SKILL.md +47 -24
  72. package/presets/claude/skills/openspec/SKILL.md +46 -34
  73. package/presets/claude/skills/security/SKILL.md +382 -0
  74. package/presets/claude/skills/security-ai-llm/SKILL.md +43 -0
  75. package/presets/claude/skills/security-blue-team/SKILL.md +43 -0
  76. package/presets/claude/skills/security-cloud/SKILL.md +43 -0
  77. package/presets/claude/skills/security-crypto/SKILL.md +43 -0
  78. package/presets/claude/skills/security-exploit-dev/SKILL.md +45 -0
  79. package/presets/claude/skills/security-grc/SKILL.md +43 -0
  80. package/presets/claude/skills/security-incident-response/SKILL.md +45 -0
  81. package/presets/claude/skills/security-log-analysis/SKILL.md +43 -0
  82. package/presets/claude/skills/security-malware-analysis/SKILL.md +44 -0
  83. package/presets/claude/skills/security-mobile/SKILL.md +43 -0
  84. package/presets/claude/skills/security-network/SKILL.md +43 -0
  85. package/presets/claude/skills/security-ot-ics/SKILL.md +43 -0
  86. package/presets/claude/skills/security-recon/SKILL.md +45 -0
  87. package/presets/claude/skills/security-red-team/SKILL.md +44 -0
  88. package/presets/claude/skills/security-reverse-engineering/SKILL.md +44 -0
  89. package/presets/claude/skills/security-soc-automation/SKILL.md +43 -0
  90. package/presets/claude/skills/security-threat-hunting/SKILL.md +43 -0
  91. package/presets/claude/skills/security-vuln-assessment/SKILL.md +45 -0
  92. package/presets/claude/skills/security-web/SKILL.md +44 -0
  93. package/presets/claude/skills/testing-tdd/SKILL.md +53 -0
  94. package/presets/claude/skills/using-cc-skills/SKILL.md +48 -0
  95. package/presets/codex/AGENTS.md +16 -12
  96. package/presets/codex/commands/cc-ask.md +2 -1
  97. package/presets/codex/gates/pre-commit/GATE.md +5 -4
  98. package/presets/codex/skills/backlog/SKILL.md +61 -0
  99. package/presets/codex/skills/cc-api-contract/SKILL.md +87 -0
  100. package/presets/codex/skills/cc-backlog/SKILL.md +108 -0
  101. package/presets/codex/skills/cc-clarify/SKILL.md +36 -0
  102. package/presets/codex/skills/cc-council/SKILL.md +92 -0
  103. package/presets/codex/skills/cc-db-migration/SKILL.md +88 -0
  104. package/presets/codex/skills/cc-explore/SKILL.md +40 -0
  105. package/presets/codex/skills/cc-feature/SKILL.md +154 -0
  106. package/presets/codex/skills/cc-fix/SKILL.md +165 -0
  107. package/presets/codex/skills/cc-handoff/SKILL.md +45 -0
  108. package/presets/codex/skills/cc-iterative/SKILL.md +150 -0
  109. package/presets/codex/skills/cc-openspec/SKILL.md +191 -0
  110. package/presets/codex/skills/cc-pagespeed/SKILL.md +124 -0
  111. package/presets/codex/skills/cc-prototype/SKILL.md +42 -0
  112. package/presets/codex/skills/cc-refactor/SKILL.md +163 -0
  113. package/presets/codex/skills/cc-review/SKILL.md +152 -0
  114. package/presets/codex/skills/cc-scorecard/SKILL.md +82 -0
  115. package/presets/codex/skills/cc-security/SKILL.md +182 -0
  116. package/presets/codex/skills/cc-spec-mutation/SKILL.md +192 -0
  117. package/presets/codex/skills/cc-tdd-cycle/SKILL.md +266 -0
  118. package/presets/codex/skills/cc-test-plan/SKILL.md +153 -0
  119. package/presets/codex/skills/cc-triage/SKILL.md +38 -0
  120. package/presets/codex/skills/evaluation/SKILL.md +65 -0
  121. package/presets/codex/skills/openspec/SKILL.md +66 -0
  122. package/presets/codex/skills/testing-tdd/SKILL.md +53 -0
  123. package/presets/codex/skills/using-cc-skills/SKILL.md +48 -0
  124. package/presets/cursor/AGENTS.md +2 -2
  125. package/presets/cursor/commands/cc/api-contract.md +14 -0
  126. package/presets/cursor/commands/cc/ask.md +2 -1
  127. package/presets/cursor/commands/cc/backlog.md +105 -0
  128. package/presets/cursor/commands/cc/db-migration.md +14 -0
  129. package/presets/cursor/commands/cc/explore.md +1 -1
  130. package/presets/cursor/commands/cc/feature.md +18 -0
  131. package/presets/cursor/commands/cc/fix.md +17 -0
  132. package/presets/cursor/commands/cc/iterative.md +14 -0
  133. package/presets/cursor/commands/cc/openspec.md +30 -1
  134. package/presets/cursor/commands/cc/scorecard.md +2 -0
  135. package/presets/cursor/commands/cc/security.md +179 -0
  136. package/presets/cursor/commands/cc/spec-mutation.md +190 -0
  137. package/presets/cursor/commands/cc/tdd-cycle.md +14 -0
  138. package/presets/cursor/gates/pre-commit/GATE.md +5 -4
  139. package/presets/cursor/skills/backlog/SKILL.md +61 -0
  140. package/presets/cursor/skills/evaluation/SKILL.md +61 -4
  141. package/presets/cursor/skills/openspec/SKILL.md +47 -33
  142. package/presets/cursor/skills/security-ai-llm/SKILL.md +43 -0
  143. package/presets/cursor/skills/security-blue-team/SKILL.md +43 -0
  144. package/presets/cursor/skills/security-cloud/SKILL.md +43 -0
  145. package/presets/cursor/skills/security-crypto/SKILL.md +43 -0
  146. package/presets/cursor/skills/security-exploit-dev/SKILL.md +45 -0
  147. package/presets/cursor/skills/security-grc/SKILL.md +43 -0
  148. package/presets/cursor/skills/security-incident-response/SKILL.md +45 -0
  149. package/presets/cursor/skills/security-log-analysis/SKILL.md +43 -0
  150. package/presets/cursor/skills/security-malware-analysis/SKILL.md +44 -0
  151. package/presets/cursor/skills/security-mobile/SKILL.md +43 -0
  152. package/presets/cursor/skills/security-network/SKILL.md +43 -0
  153. package/presets/cursor/skills/security-ot-ics/SKILL.md +43 -0
  154. package/presets/cursor/skills/security-recon/SKILL.md +45 -0
  155. package/presets/cursor/skills/security-red-team/SKILL.md +44 -0
  156. package/presets/cursor/skills/security-reverse-engineering/SKILL.md +44 -0
  157. package/presets/cursor/skills/security-soc-automation/SKILL.md +43 -0
  158. package/presets/cursor/skills/security-threat-hunting/SKILL.md +43 -0
  159. package/presets/cursor/skills/security-vuln-assessment/SKILL.md +45 -0
  160. package/presets/cursor/skills/security-web/SKILL.md +44 -0
  161. package/presets/cursor/skills/testing-tdd/SKILL.md +35 -574
  162. package/presets/cursor/skills/using-cc-skills/SKILL.md +48 -0
  163. package/presets/gemini/commands/cc/api-contract.toml +82 -0
  164. package/presets/gemini/commands/cc/ask.toml +54 -0
  165. package/presets/gemini/commands/cc/backlog.toml +103 -0
  166. package/presets/gemini/commands/cc/clarify.toml +31 -0
  167. package/presets/gemini/commands/cc/council.toml +87 -0
  168. package/presets/gemini/commands/cc/db-migration.toml +83 -0
  169. package/presets/gemini/commands/cc/explore.toml +35 -0
  170. package/presets/gemini/commands/cc/feature.toml +153 -0
  171. package/presets/gemini/commands/cc/fix.toml +163 -0
  172. package/presets/gemini/commands/cc/handoff.toml +40 -0
  173. package/presets/gemini/commands/cc/iterative.toml +145 -0
  174. package/presets/gemini/commands/cc/openspec.toml +186 -0
  175. package/presets/gemini/commands/cc/pagespeed.toml +119 -0
  176. package/presets/gemini/commands/cc/prototype.toml +37 -0
  177. package/presets/gemini/commands/cc/refactor.toml +158 -0
  178. package/presets/gemini/commands/cc/review.toml +150 -0
  179. package/presets/gemini/commands/cc/scorecard.toml +77 -0
  180. package/presets/gemini/commands/cc/security.toml +177 -0
  181. package/presets/gemini/commands/cc/spec-mutation.toml +187 -0
  182. package/presets/gemini/commands/cc/tdd-cycle.toml +264 -0
  183. package/presets/gemini/commands/cc/test-plan.toml +148 -0
  184. package/presets/gemini/commands/cc/triage.toml +33 -0
  185. package/presets/opencode/README.md +24 -21
  186. package/presets/opencode/agents/architect.md +6 -0
  187. package/presets/opencode/agents/implementer.md +7 -0
  188. package/presets/opencode/agents/reviewer.md +6 -0
  189. package/presets/opencode/agents/tester.md +6 -0
  190. package/presets/opencode/commands/cc-api-contract.md +14 -0
  191. package/presets/opencode/commands/cc-ask.md +2 -1
  192. package/presets/opencode/commands/cc-backlog.md +68 -0
  193. package/presets/opencode/commands/cc-db-migration.md +14 -0
  194. package/presets/opencode/commands/cc-explore.md +1 -1
  195. package/presets/opencode/commands/cc-feature.md +18 -0
  196. package/presets/opencode/commands/cc-fix.md +17 -0
  197. package/presets/opencode/commands/cc-iterative.md +14 -0
  198. package/presets/opencode/commands/cc-openspec.md +17 -1
  199. package/presets/opencode/commands/cc-scorecard.md +2 -0
  200. package/presets/opencode/commands/cc-security.md +179 -0
  201. package/presets/opencode/commands/cc-spec-mutation.md +190 -0
  202. package/presets/opencode/commands/cc-tdd-cycle.md +14 -0
  203. package/presets/opencode/gates/pre-commit/GATE.md +5 -4
  204. package/presets/opencode/opencode.jsonc +1 -1
  205. package/presets/opencode/prompts/v1.0.0/architect.md +6 -0
  206. package/presets/opencode/prompts/v1.0.0/implementer.md +7 -0
  207. package/presets/opencode/prompts/v1.0.0/reviewer.md +6 -0
  208. package/presets/opencode/prompts/v1.0.0/tester.md +6 -0
  209. package/presets/opencode/skills/backlog/SKILL.md +61 -0
  210. package/presets/opencode/skills/evaluation/SKILL.md +61 -2
  211. package/presets/opencode/skills/openspec/SKILL.md +47 -31
  212. package/presets/opencode/skills/security-ai-llm/SKILL.md +43 -0
  213. package/presets/opencode/skills/security-blue-team/SKILL.md +43 -0
  214. package/presets/opencode/skills/security-cloud/SKILL.md +43 -0
  215. package/presets/opencode/skills/security-crypto/SKILL.md +43 -0
  216. package/presets/opencode/skills/security-exploit-dev/SKILL.md +45 -0
  217. package/presets/opencode/skills/security-grc/SKILL.md +43 -0
  218. package/presets/opencode/skills/security-incident-response/SKILL.md +45 -0
  219. package/presets/opencode/skills/security-log-analysis/SKILL.md +43 -0
  220. package/presets/opencode/skills/security-malware-analysis/SKILL.md +44 -0
  221. package/presets/opencode/skills/security-mobile/SKILL.md +43 -0
  222. package/presets/opencode/skills/security-network/SKILL.md +43 -0
  223. package/presets/opencode/skills/security-ot-ics/SKILL.md +43 -0
  224. package/presets/opencode/skills/security-recon/SKILL.md +45 -0
  225. package/presets/opencode/skills/security-red-team/SKILL.md +44 -0
  226. package/presets/opencode/skills/security-reverse-engineering/SKILL.md +44 -0
  227. package/presets/opencode/skills/security-soc-automation/SKILL.md +43 -0
  228. package/presets/opencode/skills/security-threat-hunting/SKILL.md +43 -0
  229. package/presets/opencode/skills/security-vuln-assessment/SKILL.md +45 -0
  230. package/presets/opencode/skills/security-web/SKILL.md +44 -0
  231. package/presets/opencode/skills/testing-tdd/SKILL.md +35 -574
  232. package/presets/opencode/skills/using-cc-skills/SKILL.md +48 -0
  233. package/presets/shared/__pycache__/mutation_runner.cpython-314.pyc +0 -0
  234. package/presets/shared/invoke-hook.cjs +115 -0
  235. package/presets/shared/mutation_runner.py +273 -0
  236. package/src/presets/council/council.yml +12 -0
  237. package/src/presets/manifests/agy.yml +2 -0
  238. package/src/presets/manifests/claude.yml +3 -0
  239. package/src/presets/manifests/gemini.yml +15 -0
  240. package/src/presets/models/agy.yml +24 -24
  241. package/src/presets/models/claude.yml +10 -10
  242. package/src/presets/models/codex.yml +10 -10
  243. package/src/presets/models/cursor.yml +10 -10
  244. package/src/presets/models/gemini.yml +10 -10
  245. package/src/presets/models/opencode.yml +10 -10
  246. package/presets/agy/scripts/post-tool.sh +0 -25
  247. package/presets/agy/scripts/pre-tool.sh +0 -56
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: security-vuln-assessment
3
+ description: >
4
+ Plan and report authorized vulnerability assessments on owned systems. Prioritize evidence, severity, and remediations. Do not deliver exploit payloads.
5
+ ---
6
+
7
+ # Vulnerability Assessment
8
+
9
+ ## Authorization
10
+
11
+ Use this skill only with **explicit written authorization** for a named
12
+ scope (systems, environments, and time window). If authorization is missing,
13
+ expired, or the request is for someone else's systems, **stop**.
14
+
15
+ This skill is **defensive and owner-authorized**. It does not authorize
16
+ offensive cyber operations.
17
+
18
+ ## Do
19
+
20
+ - Use scanner findings plus code review as evidence, not as a scoreboard
21
+ - Map issues to OWASP / CWE and to a concrete fix in the repo
22
+ - Require a reproduction that is safe (config, unit test, or staging)
23
+ - Track false positives explicitly
24
+
25
+ ## Do not
26
+
27
+ - Ship exploit PoCs, weaponized payloads, or live attack scripts
28
+ - Scan production without a documented freeze and rollback
29
+ - Mark a finding closed without a failing-then-passing test when code changes
30
+
31
+ - Do not produce exploit payloads, malware, or attack procedures.
32
+
33
+ ## How to Use
34
+
35
+ Load this skill from `/cc-security` when the Task Card domain is `security-vuln-assessment`.
36
+ Example prompts:
37
+
38
+ - `Assess the checkout API in staging (ticket SEC-214). Report exploitable authz gaps as remediations, not exploits.`
39
+ - `Triage SAST results on src/auth and turn confirmed issues into failing tests plus patches.`
40
+
41
+ ## Integration
42
+
43
+ - Workflow: `/cc-security` (CCEP command `security`)
44
+ - Existing OWASP application-security skill remains `security` (not this id)
45
+ - High-risk changes still require `security-reviewer`
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: security-web
3
+ description: >
4
+ Review and harden web apps (authz, XSS, CSRF, SSRF, injection) on code you maintain. Complements the OWASP `security` skill. No exploit kits.
5
+ ---
6
+
7
+ # Web Application Security
8
+
9
+ ## Authorization
10
+
11
+ Use this skill only with **explicit written authorization** for a named
12
+ scope (systems, environments, and time window). If authorization is missing,
13
+ expired, or the request is for someone else's systems, **stop**.
14
+
15
+ This skill is **defensive and owner-authorized**. It does not authorize
16
+ offensive cyber operations.
17
+
18
+ ## Do
19
+
20
+ - Enforce authorization on every handler; never rely on the UI
21
+ - Parameterize queries; reject unknown fields
22
+ - Treat cookies, tokens, and redirects as untrusted until validated
23
+ - Add tests for authz, CSRF, and open redirects when you change those paths
24
+
25
+ ## Do not
26
+
27
+ - Provide XSS or SQLi payloads for use against systems you do not own
28
+ - Disable CSRF or SameSite 'to make local dev easier' in production configs
29
+
30
+ - Do not produce exploit payloads, malware, or attack procedures.
31
+
32
+ ## How to Use
33
+
34
+ Load this skill from `/cc-security` when the Task Card domain is `security-web`.
35
+ Example prompts:
36
+
37
+ - `Review our Next.js Server Actions for IDOR and CSRF. Propose tests, not exploits.`
38
+ - `Harden the file-upload endpoint: type, size, path containment, and tests.`
39
+
40
+ ## Integration
41
+
42
+ - Workflow: `/cc-security` (CCEP command `security`)
43
+ - Existing OWASP application-security skill remains `security` (not this id)
44
+ - High-risk changes still require `security-reviewer`
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: testing-tdd
3
+ description:
4
+ Guides agents through Red-Green-Refactor with runner-captured evidence.
5
+ Use when running /cc-tdd-cycle, writing tests before implementation, or
6
+ Global TDD required is yes.
7
+ ---
8
+
9
+ # Test-Driven Development
10
+
11
+ ## Overview
12
+
13
+ Red (failing test) → Green (minimal code) → Refactor. Evidence comes from
14
+ `captureTddSuiteEvidence`, not handmade JSON.
15
+
16
+ ## When to Use
17
+
18
+ - `/cc-tdd-cycle`, new behavior, bug fixes, TDD-required OpenSpec items
19
+
20
+ **NOT** for docs-only changes or when the Task Card forbids tests.
21
+
22
+ ## Process
23
+
24
+ 1. Write the failing test that encodes one acceptance criterion. Run the suite.
25
+ It MUST fail (`suiteFails === true`).
26
+ 2. Implement the minimum that turns it green. Do not expand scope.
27
+ 3. Refactor only with a green suite.
28
+ 4. Capture evidence via the verification runner (`openspec done` on test/implement
29
+ when TDD is required).
30
+ 5. Cover happy path, edge, and error for each behavior.
31
+
32
+ Local: `bun run dev`. Pyramid default: many unit, fewer integration, rare E2E.
33
+
34
+ ## Common Rationalizations
35
+
36
+ | Rationalization | Reality |
37
+ | --- | --- |
38
+ | I'll add tests later | Later means never. Red first. |
39
+ | This is too small to test | If it can break, it needs a failing test first. |
40
+ | I'll write the evidence JSON | Handmade TDD JSON is rejected. |
41
+
42
+ ## Red Flags
43
+
44
+ - Tests that assert implementation details instead of behavior
45
+ - Green without a recorded red
46
+ - Skipping error cases
47
+
48
+ ## Verification
49
+
50
+ - [ ] Suite failed before implement
51
+ - [ ] Suite passed after implement
52
+ - [ ] Runner evidence exists (not handmade)
53
+ - [ ] Optional: `bun run dev scorecard suite-run --suite workflow-gates`
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: using-cc-skills
3
+ description:
4
+ Maps incoming work to the CodeConductor slash command and workflow skill.
5
+ Use when starting a session or deciding which /cc-* command applies.
6
+ ---
7
+
8
+ # Using CodeConductor skills
9
+
10
+ ## Overview
11
+
12
+ Pick one slash command. Follow its skill. Invoke CLI for gates. Do not invent
13
+ a parallel process.
14
+
15
+ ## When to Use
16
+
17
+ - Start of a session, ambiguous request, or "which /cc should I run?"
18
+
19
+ ## Process
20
+
21
+ | Intent | Command | Skill |
22
+ | --- | --- | --- |
23
+ | New backlog item | `/cc-backlog` | `backlog` |
24
+ | Deliver a BC-xxx item | `/cc-openspec` | `openspec` |
25
+ | New feature | `/cc-feature` | `openspec` + `testing-tdd` |
26
+ | Bug fix | `/cc-fix` | `testing-tdd` |
27
+ | Review a diff | `/cc-review` | `evaluation` |
28
+ | TDD cycle only | `/cc-tdd-cycle` | `testing-tdd` |
29
+ | Scorecard / suites | `/cc-scorecard` | `evaluation` |
30
+
31
+ Then run the matching CLI (`openspec validate`, `scorecard create --from-diff`,
32
+ `hook pre-tool`, `scorecard suite-run`).
33
+
34
+ ## Common Rationalizations
35
+
36
+ | Rationalization | Reality |
37
+ | --- | --- |
38
+ | I'll skip the slash and just code | Skipping the workflow is a defect. |
39
+
40
+ ## Red Flags
41
+
42
+ - Two slash commands in parallel that mutate the same files
43
+ - Implementing before `openspec analyze` when a change folder is active
44
+
45
+ ## Verification
46
+
47
+ - [ ] One command selected and shown to the user
48
+ - [ ] Matching skill loaded before edits
@@ -64,20 +64,24 @@ Skipping any step is not an optimization. It is a defect.
64
64
 
65
65
  ## Trigger Phrases
66
66
 
67
- Codex does not load custom slash commands from this preset. Use these natural
68
- language patterns to activate each workflow:
67
+ Invoke workflows as Codex skills (`$cc-feature`, `$cc-openspec`, …). Custom
68
+ prompts under `~/.codex/prompts` are deprecated. Natural-language phrases still
69
+ work:
69
70
 
70
- | Workflow | Trigger phrase |
71
+ | Workflow | Skill / trigger |
71
72
  | ------------ | -------------------------------------------------- |
72
- | Full feature | "Run the feature workflow for: [description]" |
73
- | Bug fix | "Run the fix workflow for: [description]" |
74
- | Refactor | "Run the refactor workflow for: [scope]" |
75
- | API contract | "Run the API contract workflow for: [change]" |
76
- | DB migration | "Run the database migration workflow for: [scope]" |
77
- | Code review | "Run a structured review of: [target]" |
78
- | Test plan | "Create a test plan for: [scope]" |
79
- | Task intake | "Help me define a Task Card for: [vague request]" |
80
- | PageSpeed | "Run a PageSpeed audit for: [url]" |
73
+ | Full feature | `$cc-feature` or "Run the feature workflow for:" |
74
+ | Bug fix | `$cc-fix` |
75
+ | Refactor | `$cc-refactor` |
76
+ | API contract | `$cc-api-contract` |
77
+ | DB migration | `$cc-db-migration` |
78
+ | Code review | `$cc-review` |
79
+ | Test plan | `$cc-test-plan` |
80
+ | TDD cycle | `$cc-tdd-cycle` |
81
+ | Backlog | `$cc-backlog` |
82
+ | OpenSpec | `$cc-openspec` |
83
+ | Scorecard | `$cc-scorecard` |
84
+ | PageSpeed | `$cc-pagespeed` or "PageSpeed audit" |
81
85
 
82
86
  ---
83
87
 
@@ -36,10 +36,11 @@ The catalog is only:
36
36
  | `/cc:refactor` | structure, no behavior change |
37
37
  | `/cc:review` | inspect a diff/PR |
38
38
  | `/cc:tdd-cycle` | red → green → refactor |
39
+ | `/cc:backlog` | create or append BACKLOG.md / objectives |
39
40
  | `/cc:openspec` | BACKLOG / BC-xxx delivery |
40
41
 
41
42
  If the CLI is unavailable, apply the same catalog and the same priority:
42
- openspec → tdd-cycle → review → refactor → fix → feature (default).
43
+ backlog (author) vs openspec (deliver) → tdd-cycle → review → refactor → fix → feature (default).
43
44
 
44
45
  ---
45
46
 
@@ -1,6 +1,6 @@
1
- # Pre-commit Gate: Typecheck and Test
1
+ # Pre-commit Gate: Typecheck, Lint, and Test
2
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.
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
4
 
5
5
  ## Cuándo usar
6
6
 
@@ -63,6 +63,7 @@ mkdir -p "$GIT_DIR/hooks"
63
63
  cat > "$HOOK_PATH" << 'HOOK_EOF'
64
64
  #!/bin/bash
65
65
  bun run typecheck || exit 1
66
+ bun run lint || exit 1
66
67
  bun run test || exit 1
67
68
  HOOK_EOF
68
69
 
@@ -78,7 +79,7 @@ echo "Pre-commit hook installed successfully."
78
79
  - **Resolución dinámica de git dir**: Usa `git rev-parse --git-dir` para localizar el directorio correcto, incluso en worktrees.
79
80
  - **Detección de conflictos**: Si Husky o lint-staged ya está en `package.json`, el script avisa y no instala para evitar conflictos.
80
81
  - **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
+ - **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`.
82
83
 
83
84
  ## Verificación
84
85
 
@@ -121,7 +122,7 @@ Verifica que el hook es ejecutable:
121
122
 
122
123
  chmod +x .git/hooks/pre-commit
123
124
 
124
- Verifica que `bun run typecheck` y `bun run test` existen en `package.json`:
125
+ Verifica que `bun run typecheck`, `bun run lint` y `bun run test` existen en `package.json`:
125
126
 
126
127
  cat package.json | grep -A 5 '"scripts"'
127
128
 
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: backlog
3
+ description: >
4
+ Guides agents through authoring BACKLOG.md and OpenSpec change folders.
5
+ Use when running /cc-backlog or /cc:backlog, creating or appending backlog
6
+ items, or preparing work for /cc-openspec. Delivery is skill openspec.
7
+ ---
8
+
9
+ # Backlog authoring
10
+
11
+ ## Overview
12
+
13
+ Create or append `BACKLOG.md`, then `openspec validate` / `plan`. Do not deliver
14
+ the item here.
15
+
16
+ ## When to Use
17
+
18
+ - `/cc-backlog`, first backlog in a repo, or appending `### BC-xxx` items
19
+
20
+ **NOT** for executing an item (`openspec`) or for scorecards (`evaluation`).
21
+
22
+ ## Process
23
+
24
+ 1. If `graphify-out/graph.json` exists, `graphify query "<objectives>"`. Then
25
+ `repo-explorer`. Scope names real files.
26
+ 2. Invoke `task-coach`. One grilling question per assumption. Reject vague
27
+ acceptance ("improve UX"). At most 3 `[NEEDS CLARIFICATION]`.
28
+ 3. `ccep evaluate --command backlog`. If `stop`, wait for the human.
29
+ 4. Create `BACKLOG.md` from `presets/templates/BACKLOG.md` or append under
30
+ `## Items`. Do not rewrite `## Global` or `## Archive`.
31
+ 5. Next ID = max numeric suffix in Items + Archive + 1, zero-padded (`BC-013`).
32
+ 6. `bun run dev openspec validate` (or `npx cc-codeconductor`). Fix until valid.
33
+ 7. `openspec plan BC-xxx` for each **new** item this run. Then tell the user
34
+ to run `/cc-openspec`.
35
+
36
+ Required sections: `## Global`, `## Items`, `## Archive`. Each item:
37
+ `### BC-001 | Title` with Priority, Status (`READY` after grilling), Type,
38
+ Depends on, Description, Scope, Out of scope, Acceptance.
39
+
40
+ Local artifacts (`BACKLOG.md`, `openspec/`, `.codeconductor/openspec-state.json`)
41
+ are gitignored in consumer projects. Do not `git add` them.
42
+
43
+ ## Common Rationalizations
44
+
45
+ | Rationalization | Reality |
46
+ | --- | --- |
47
+ | This fix is small; skip the Task Card | Every item needs measurable acceptance. |
48
+ | I'll validate later | Do not plan until `openspec validate` passes. |
49
+ | Archive can be rewritten | Archive is history. Never rewrite or re-execute. |
50
+
51
+ ## Red Flags
52
+
53
+ - Acceptance that cannot fail a check
54
+ - Editing `openspec-state.json` by hand
55
+ - Planning an invalid backlog
56
+
57
+ ## Verification
58
+
59
+ - [ ] `openspec validate` exit 0
60
+ - [ ] New items have `FR`/`SC`-ready measurable acceptance
61
+ - [ ] User pointed at `/cc-openspec` for delivery
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: cc-api-contract
3
+ description: compatibility constraints, contract tests, documentation, and review.
4
+ ---
5
+
6
+ # api-contract
7
+
8
+ Invoke as `$cc-api-contract`. The user request follows the skill mention.
9
+
10
+ # API Contract Workflow
11
+
12
+ API contract request: $ARGUMENTS
13
+
14
+ ## Step 0 — CCEP Bootstrap
15
+
16
+ Command: `api-contract` (fixed for this workflow — do not infer from user text)
17
+
18
+ 1. Run: `npx cc-codeconductor ccep parse --command api-contract "$ARGUMENTS" --output json`
19
+ 2. Run: `npx cc-codeconductor ccep resolve --command api-contract "$ARGUMENTS" --output json`
20
+ 3. Run: `npx cc-codeconductor ccep profile api-contract --output json`
21
+ 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.
22
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
23
+
24
+ ---
25
+
26
+ ## Step 0b — OpenSpec quality gates
27
+
28
+ If `openspec status` reports an active change folder:
29
+
30
+ 1. Run: `npx cc-codeconductor openspec validate --output json`
31
+ 2. Run: `npx cc-codeconductor openspec analyze --output json`
32
+ 3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
33
+ 4. Next command spelling on this runner: `/cc:api-contract`
34
+
35
+ Local development: `bun run dev <same argv>`. Published package: `npx cc-codeconductor`.
36
+
37
+ ---
38
+
39
+
40
+ ## Step 1 — Task Card validation (Task Coach role)
41
+
42
+ Invoke the `task-coach` subagent via the Task tool.
43
+
44
+ The Task Card must classify the task as high risk by default and include the
45
+ affected public interface, request/response examples, compatibility notes,
46
+ versioning impact, consumer impact, contract tests, and docs acceptance
47
+ criteria.
48
+
49
+ **STOP here. Show the completed Task Card and wait for human confirmation.**
50
+
51
+ ---
52
+
53
+ ## Step 2 — Technical Plan (Architect role)
54
+
55
+ Invoke the `architect` subagent via the Task tool.
56
+
57
+ Define the API contract, validation strategy, compatibility behavior, docs or
58
+ OpenAPI changes, and reviewer blocking conditions.
59
+
60
+ **STOP here. Show the Technical Plan and wait for explicit human approval.**
61
+
62
+ ---
63
+
64
+ ## Step 3 — Implementation (Implementer role)
65
+
66
+ Invoke the `implementer` subagent via the Task tool.
67
+
68
+ Apply the minimal diff, preserve compatible behavior unless explicitly approved
69
+ as breaking, and update only the planned files.
70
+
71
+ ---
72
+
73
+ ## Step 4 — Contract Tests (Tester role)
74
+
75
+ Invoke the `tester` subagent via the Task tool.
76
+
77
+ Add or update tests for request shape, response shape, status/error behavior,
78
+ and backward compatibility.
79
+
80
+ ---
81
+
82
+ ## Step 5 — Review (Reviewer role)
83
+
84
+ Invoke the `reviewer` subagent via the Task tool.
85
+
86
+ Block on missing contract tests, undocumented breaking changes, or docs/OpenAPI
87
+ drift.
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: cc-backlog
3
+ description: validate with openspec, and plan OpenSpec change folders for /cc-openspec.
4
+ ---
5
+
6
+ # backlog
7
+
8
+ Invoke as `$cc-backlog`. The user request follows the skill mention.
9
+
10
+ # Backlog Authoring Workflow
11
+
12
+ Objectives: $ARGUMENTS
13
+
14
+ Create or append valid `BACKLOG.md` items and OpenSpec change docs. Do **not**
15
+ deliver implementation — that is `/cc-openspec`.
16
+
17
+ ---
18
+
19
+ ## Step 0 — CCEP Bootstrap
20
+
21
+ Command: `backlog` (fixed for this workflow — do not infer from user text)
22
+
23
+ 1. Run: `npx cc-codeconductor ccep parse --command backlog "$ARGUMENTS" --output json`
24
+ 2. Run: `npx cc-codeconductor ccep resolve --command backlog "$ARGUMENTS" --output json`
25
+ 3. Run: `npx cc-codeconductor ccep profile backlog --output json`
26
+ 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.
27
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
28
+
29
+ ---
30
+
31
+ ## Step 1 — Wayfinding (repo-explorer)
32
+
33
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
34
+ `graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
35
+ to map modules, conventions, and impact radius. Do not write `BACKLOG.md` in
36
+ this step. Record a Repo Map so Scope names real files or modules.
37
+
38
+ ---
39
+
40
+ ## Step 2 — Relentless Grilling (task-coach)
41
+
42
+ Invoke `task-coach`. Produce complete backlog item fields: title, type, risk,
43
+ scope, description, out of scope, measurable acceptance criteria.
44
+
45
+ Every assumption must survive one grilling question. Reject vague acceptance
46
+ ("improve UX", "fix bugs").
47
+
48
+ If any field is missing or ambiguous, ask one clarifying question at a time.
49
+
50
+ **STOP here.** Unresolved grilling questions populate `questionsForUser` in the
51
+ CCEP-1 `planner-output`; `ccep evaluate --command backlog` halts until a human
52
+ answers. Do not write `BACKLOG.md` until that confirmation.
53
+
54
+ ---
55
+
56
+ ## Step 3 — Write or append BACKLOG.md (docs)
57
+
58
+ Apply skill `backlog`.
59
+
60
+ - If `BACKLOG.md` is absent, create it from the canonical template
61
+ (`presets/templates/BACKLOG.md`). Set Global `Product` from `package.json`
62
+ `name` when present.
63
+ - If it exists, append new `### BC-xxx` items under `## Items`. Do not rewrite
64
+ `## Global` or `## Archive`.
65
+ - Next ID = max `BC-NNN` across Items and Archive, plus one.
66
+ - New items: Status `READY`, Progress `0%`, measurable Acceptance checklist.
67
+
68
+ Do **not** `git add` `BACKLOG.md` or `openspec/`.
69
+
70
+ ---
71
+
72
+ ## Step 4 — Validate (mandatory gate)
73
+
74
+ Run:
75
+
76
+ ```bash
77
+ npx cc-codeconductor openspec validate
78
+ ```
79
+
80
+ If validation fails:
81
+
82
+ 1. List all errors and recommendations from the CLI output.
83
+ 2. Show the canonical BACKLOG.md structure (## Global, ## Items, ### BC-001 | Title, Priority, Status, Type, Depends on, Description, Scope, Acceptance).
84
+ 3. Fix the file and re-run validate. **STOP** planning until valid.
85
+
86
+ ---
87
+
88
+ ## Step 5 — Plan new items
89
+
90
+ For each **new** `BC-xxx` from this run:
91
+
92
+ ```bash
93
+ npx cc-codeconductor openspec plan <BC-id>
94
+ ```
95
+
96
+ Show TaskCards and `openspec/changes/<slug>/` (proposal, design, tasks, specs).
97
+
98
+ ---
99
+
100
+ ## Completion
101
+
102
+ Report: item IDs added, validate result, change folder paths.
103
+
104
+ Tell the user to run `/cc-openspec` (optionally `/cc-openspec BC-xxx`) to
105
+ deliver. Do not start delivery in this workflow.
106
+
107
+ Apply skill `backlog` for create/append rules. Apply skill `openspec` only for
108
+ format and state-machine reference.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: cc-clarify
3
+ description: CodeConductor clarify workflow
4
+ ---
5
+
6
+ # clarify
7
+
8
+ Invoke as `$cc-clarify`. The user request follows the skill mention.
9
+
10
+ # Clarify Workflow
11
+
12
+ Clarify request: $ARGUMENTS
13
+
14
+ ## Step 0 — CCEP Bootstrap
15
+
16
+ Command: `clarify` (fixed for this workflow — do not infer from user text)
17
+
18
+ 1. Run: `npx cc-codeconductor ccep parse --command clarify "$ARGUMENTS" --output json`
19
+ 2. Run: `npx cc-codeconductor ccep resolve --command clarify "$ARGUMENTS" --output json`
20
+ 3. Run: `npx cc-codeconductor ccep profile clarify --output json`
21
+ 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.
22
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
23
+
24
+ ---
25
+
26
+ ## Step 1 — Re-explain (task-coach)
27
+
28
+ 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.
29
+
30
+ **STOP if ConfirmationGate reports questions.**
31
+
32
+ ---
33
+
34
+ ## Completion
35
+
36
+ A plain-language restatement plus any remaining questions. Then resume the previous workflow.
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: cc-council
3
+ description: Council-driven workflow with CCEP-1 bootstrap
4
+ ---
5
+
6
+ # council
7
+
8
+ Invoke as `$cc-council`. The user request follows the skill mention.
9
+
10
+ # Council-Driven Workflow
11
+
12
+ Task request: $ARGUMENTS
13
+
14
+ ## Step 0 — CCEP Bootstrap
15
+
16
+ Command: `council` (fixed for this workflow — do not infer from user text)
17
+ command: council
18
+
19
+ 1. Run: `npx cc-codeconductor ccep parse --command council "$ARGUMENTS" --output json`
20
+ 2. Run: `npx cc-codeconductor ccep resolve --command council "$ARGUMENTS" --output json`
21
+ 3. Run: `npx cc-codeconductor ccep profile council --output json`
22
+ 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.
23
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
24
+
25
+ ---
26
+
27
+ ## Step 1 — Wayfinding (repo-explorer)
28
+
29
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
30
+ `graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
31
+ to map impact radius before deliberation. Do not write code in this step.
32
+
33
+ ---
34
+
35
+ ## Step 2 — Deliberation & Specification (SDD)
36
+
37
+ 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`.
38
+
39
+ The council must:
40
+ 1. Clarify the prompt and define the absolute minimum scope (Simplicity Gate).
41
+ 2. Explicitly document all assumptions and run the Grilling protocol on each one (Think Before Coding).
42
+ 3. Draft a Task Card & Technical Plan (The Specification).
43
+
44
+ **STOP here.** Unresolved grilling questions populate `questionsForUser` in the
45
+ CCEP-1 `planner-output`; `ccep evaluate` (ConfirmationGate) halts until a human
46
+ answers. Show the agreed Task Card & Technical Plan and wait for confirmation
47
+ before continuing.
48
+
49
+ ---
50
+
51
+ ## Step 3 — Test Definition (TDD)
52
+
53
+ Invoke `tester` with the approved Task Card & Technical Plan.
54
+
55
+ tester must:
56
+ 1. Write failing tests based on the Acceptance Criteria defined in the Task Card.
57
+ 2. Confirm the tests fail as expected (Red state).
58
+
59
+ **Goal-Driven Execution (Karpathy)**: Do not proceed until verifiable tests are written and fail for the correct reasons.
60
+
61
+ ---
62
+
63
+ ## Step 4 — Surgical Implementation
64
+
65
+ Invoke `implementer` with the failing tests and the Technical Plan.
66
+
67
+ implementer must:
68
+ 1. Write the minimal code required to pass the tests.
69
+ 2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
70
+ 3. NOT refactor adjacent code, change existing styles, or build speculative features.
71
+ 4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state).
72
+
73
+ ---
74
+
75
+ ## Step 5 — Multi-Perspective Council Review
76
+
77
+ Invoke the `council` skill on the generated diff to perform the final review phase.
78
+
79
+ The council will evaluate the diff against the 6 axes (Architecture, Security, Product, Delivery, DataOps, Devil).
80
+
81
+ If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
82
+ - The Review Report status is **BLOCKED**.
83
+ - Return to Step 4 with the feedback.
84
+
85
+ If APPROVED (no CRITICAL findings):
86
+ - Deliver the final Council Verdict and the diff summary.
87
+
88
+ ---
89
+
90
+ ## Completion
91
+
92
+ Deliver the complete Council Verdict. The feature is only complete when tests pass and the council explicitly approves the implementation according to the specification.