cc-codeconductor 1.0.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 (122) hide show
  1. package/README.md +324 -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/index.js +2701 -577
  5. package/dist/library.js +167 -18
  6. package/dist/validation/schemas.d.ts +390 -44
  7. package/package.json +4 -1
  8. package/presets/agy/AGENTS.md +3 -0
  9. package/presets/agy/gates/pre-commit/GATE.md +5 -4
  10. package/presets/agy/skills/backlog/SKILL.md +91 -0
  11. package/presets/agy/skills/openspec/SKILL.md +5 -1
  12. package/presets/agy/skills/security-ai-llm/SKILL.md +43 -0
  13. package/presets/agy/skills/security-blue-team/SKILL.md +43 -0
  14. package/presets/agy/skills/security-cloud/SKILL.md +43 -0
  15. package/presets/agy/skills/security-crypto/SKILL.md +43 -0
  16. package/presets/agy/skills/security-exploit-dev/SKILL.md +45 -0
  17. package/presets/agy/skills/security-grc/SKILL.md +43 -0
  18. package/presets/agy/skills/security-incident-response/SKILL.md +45 -0
  19. package/presets/agy/skills/security-log-analysis/SKILL.md +43 -0
  20. package/presets/agy/skills/security-malware-analysis/SKILL.md +44 -0
  21. package/presets/agy/skills/security-mobile/SKILL.md +43 -0
  22. package/presets/agy/skills/security-network/SKILL.md +43 -0
  23. package/presets/agy/skills/security-ot-ics/SKILL.md +43 -0
  24. package/presets/agy/skills/security-recon/SKILL.md +45 -0
  25. package/presets/agy/skills/security-red-team/SKILL.md +44 -0
  26. package/presets/agy/skills/security-reverse-engineering/SKILL.md +44 -0
  27. package/presets/agy/skills/security-soc-automation/SKILL.md +43 -0
  28. package/presets/agy/skills/security-threat-hunting/SKILL.md +43 -0
  29. package/presets/agy/skills/security-vuln-assessment/SKILL.md +45 -0
  30. package/presets/agy/skills/security-web/SKILL.md +44 -0
  31. package/presets/agy/workflows/cc-ask.md +2 -1
  32. package/presets/agy/workflows/cc-backlog.md +69 -0
  33. package/presets/agy/workflows/cc-explore.md +1 -1
  34. package/presets/agy/workflows/cc-openspec.md +3 -1
  35. package/presets/agy/workflows/cc-security.md +180 -0
  36. package/presets/claude/CLAUDE.md +4 -0
  37. package/presets/claude/commands/cc/ask.md +2 -1
  38. package/presets/claude/commands/cc/backlog.md +104 -0
  39. package/presets/claude/commands/cc/explore.md +1 -1
  40. package/presets/claude/commands/cc/openspec.md +16 -1
  41. package/presets/claude/commands/cc/security.md +179 -0
  42. package/presets/claude/gates/pre-commit/GATE.md +5 -4
  43. package/presets/claude/skills/backlog/SKILL.md +91 -0
  44. package/presets/claude/skills/openspec/SKILL.md +5 -1
  45. package/presets/claude/skills/security/SKILL.md +382 -0
  46. package/presets/claude/skills/security-ai-llm/SKILL.md +43 -0
  47. package/presets/claude/skills/security-blue-team/SKILL.md +43 -0
  48. package/presets/claude/skills/security-cloud/SKILL.md +43 -0
  49. package/presets/claude/skills/security-crypto/SKILL.md +43 -0
  50. package/presets/claude/skills/security-exploit-dev/SKILL.md +45 -0
  51. package/presets/claude/skills/security-grc/SKILL.md +43 -0
  52. package/presets/claude/skills/security-incident-response/SKILL.md +45 -0
  53. package/presets/claude/skills/security-log-analysis/SKILL.md +43 -0
  54. package/presets/claude/skills/security-malware-analysis/SKILL.md +44 -0
  55. package/presets/claude/skills/security-mobile/SKILL.md +43 -0
  56. package/presets/claude/skills/security-network/SKILL.md +43 -0
  57. package/presets/claude/skills/security-ot-ics/SKILL.md +43 -0
  58. package/presets/claude/skills/security-recon/SKILL.md +45 -0
  59. package/presets/claude/skills/security-red-team/SKILL.md +44 -0
  60. package/presets/claude/skills/security-reverse-engineering/SKILL.md +44 -0
  61. package/presets/claude/skills/security-soc-automation/SKILL.md +43 -0
  62. package/presets/claude/skills/security-threat-hunting/SKILL.md +43 -0
  63. package/presets/claude/skills/security-vuln-assessment/SKILL.md +45 -0
  64. package/presets/claude/skills/security-web/SKILL.md +44 -0
  65. package/presets/codex/commands/cc-ask.md +2 -1
  66. package/presets/codex/gates/pre-commit/GATE.md +5 -4
  67. package/presets/cursor/AGENTS.md +2 -2
  68. package/presets/cursor/commands/cc/ask.md +2 -1
  69. package/presets/cursor/commands/cc/backlog.md +105 -0
  70. package/presets/cursor/commands/cc/explore.md +1 -1
  71. package/presets/cursor/commands/cc/openspec.md +16 -1
  72. package/presets/cursor/commands/cc/security.md +179 -0
  73. package/presets/cursor/gates/pre-commit/GATE.md +5 -4
  74. package/presets/cursor/skills/backlog/SKILL.md +91 -0
  75. package/presets/cursor/skills/openspec/SKILL.md +5 -1
  76. package/presets/cursor/skills/security-ai-llm/SKILL.md +43 -0
  77. package/presets/cursor/skills/security-blue-team/SKILL.md +43 -0
  78. package/presets/cursor/skills/security-cloud/SKILL.md +43 -0
  79. package/presets/cursor/skills/security-crypto/SKILL.md +43 -0
  80. package/presets/cursor/skills/security-exploit-dev/SKILL.md +45 -0
  81. package/presets/cursor/skills/security-grc/SKILL.md +43 -0
  82. package/presets/cursor/skills/security-incident-response/SKILL.md +45 -0
  83. package/presets/cursor/skills/security-log-analysis/SKILL.md +43 -0
  84. package/presets/cursor/skills/security-malware-analysis/SKILL.md +44 -0
  85. package/presets/cursor/skills/security-mobile/SKILL.md +43 -0
  86. package/presets/cursor/skills/security-network/SKILL.md +43 -0
  87. package/presets/cursor/skills/security-ot-ics/SKILL.md +43 -0
  88. package/presets/cursor/skills/security-recon/SKILL.md +45 -0
  89. package/presets/cursor/skills/security-red-team/SKILL.md +44 -0
  90. package/presets/cursor/skills/security-reverse-engineering/SKILL.md +44 -0
  91. package/presets/cursor/skills/security-soc-automation/SKILL.md +43 -0
  92. package/presets/cursor/skills/security-threat-hunting/SKILL.md +43 -0
  93. package/presets/cursor/skills/security-vuln-assessment/SKILL.md +45 -0
  94. package/presets/cursor/skills/security-web/SKILL.md +44 -0
  95. package/presets/opencode/commands/cc-ask.md +2 -1
  96. package/presets/opencode/commands/cc-backlog.md +68 -0
  97. package/presets/opencode/commands/cc-explore.md +1 -1
  98. package/presets/opencode/commands/cc-openspec.md +3 -1
  99. package/presets/opencode/commands/cc-security.md +179 -0
  100. package/presets/opencode/gates/pre-commit/GATE.md +5 -4
  101. package/presets/opencode/skills/backlog/SKILL.md +91 -0
  102. package/presets/opencode/skills/openspec/SKILL.md +5 -1
  103. package/presets/opencode/skills/security-ai-llm/SKILL.md +43 -0
  104. package/presets/opencode/skills/security-blue-team/SKILL.md +43 -0
  105. package/presets/opencode/skills/security-cloud/SKILL.md +43 -0
  106. package/presets/opencode/skills/security-crypto/SKILL.md +43 -0
  107. package/presets/opencode/skills/security-exploit-dev/SKILL.md +45 -0
  108. package/presets/opencode/skills/security-grc/SKILL.md +43 -0
  109. package/presets/opencode/skills/security-incident-response/SKILL.md +45 -0
  110. package/presets/opencode/skills/security-log-analysis/SKILL.md +43 -0
  111. package/presets/opencode/skills/security-malware-analysis/SKILL.md +44 -0
  112. package/presets/opencode/skills/security-mobile/SKILL.md +43 -0
  113. package/presets/opencode/skills/security-network/SKILL.md +43 -0
  114. package/presets/opencode/skills/security-ot-ics/SKILL.md +43 -0
  115. package/presets/opencode/skills/security-recon/SKILL.md +45 -0
  116. package/presets/opencode/skills/security-red-team/SKILL.md +44 -0
  117. package/presets/opencode/skills/security-reverse-engineering/SKILL.md +44 -0
  118. package/presets/opencode/skills/security-soc-automation/SKILL.md +43 -0
  119. package/presets/opencode/skills/security-threat-hunting/SKILL.md +43 -0
  120. package/presets/opencode/skills/security-vuln-assessment/SKILL.md +45 -0
  121. package/presets/opencode/skills/security-web/SKILL.md +44 -0
  122. package/src/presets/council/council.yml +12 -0
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **Stop prompting. Start orchestrating.**
4
4
 
5
+ [![Socket Badge](https://badge.socket.dev/npm/package/cc-codeconductor/1.0.0)](https://badge.socket.dev/npm/package/cc-codeconductor/1.0.0)
6
+
5
7
  CodeConductor is an open-source framework for building structured, reproducible
6
8
  AI-assisted software engineering workflows.
7
9
 
@@ -13,11 +15,11 @@ contracts, task cards, and risk-based routing.
13
15
  >
14
16
  > ## Current Scope
15
17
  >
16
- > Canonical matrix: [docs/current-status.md](docs/current-status.md).
17
- > Published package is **0.5.0**. The next documented release is **v1.0.0**
18
- > (Product OS). This repository: `bun run dev …` (not `npx`) while iterating.
18
+ > Published package is **1.0.0**. Limitations matrix:
19
+ > [docs/current-status.md](docs/current-status.md). This repository:
20
+ > `bun run dev …` (not `npx`) while iterating.
19
21
  >
20
- > Published in 0.5.0:
22
+ > Shipped in 1.0.0:
21
23
  >
22
24
  > - `npx cc-codeconductor init` — detects project stack, writes
23
25
  > `.codeconductor/config.yml`, copies `council.yml` and `policy.yml` into
@@ -27,30 +29,40 @@ contracts, task cards, and risk-based routing.
27
29
  > - `npx cc-codeconductor install lsp --target <…>`
28
30
  > - `npx cc-codeconductor detect` / `doctor` / `update`
29
31
  > - `npx cc-codeconductor seo audit` / `seo llms` (SSRF-guarded fetch)
30
- > - `npx cc-codeconductor help` / `cc-help`
32
+ > - `npx cc-codeconductor help` / `cc-help` (distinct contracts — see breaking
33
+ > changes below)
34
+ > - `npx cc-codeconductor ask "<problem>"` — recommends a `/cc:` slash command
31
35
  > - `npx cc-codeconductor debt-harvest` (alias: `harvest`)
32
36
  > - `npx cc-codeconductor ccep …` — CCEP is the canonical consumer workflow loop
33
- > - `npx cc-codeconductor openspec …` OpenSpec is a **delivery loop** and the
34
- > backlog tool (`validate` / `scan` / `plan` / `status` / `next`)
37
+ > (`parse` / `profile` / `resolve` / `compile` / `validate` / `evaluate` /
38
+ > `consensus` / `taskcard`)
39
+ > - `npx cc-codeconductor openspec …` — OpenSpec delivery loop and backlog tool
40
+ > (`validate` / `scan` / `plan` / `status` / `next` / `start` / `done` /
41
+ > `block` / `archive`)
35
42
  > - `npx cc-codeconductor scorecard …`
36
- > - Slash commands after `install preset` prefer `/cc-iterative`, `/cc-triage`,
37
- > `/cc-handoff`; `/cc-openspec` runs the OpenSpec loop
43
+ > - `npx cc-codeconductor goal` / `ingest` / `product` / `orchestrate` /
44
+ > `impact` / `verify` Product OS (see
45
+ > [docs/v1.0.0-release-notes.md](docs/v1.0.0-release-notes.md))
46
+ > - Slash commands after `install preset` — 20 CCEP workflows plus `/cc-ask`;
47
+ > prefer `/cc-iterative`, `/cc-triage`, `/cc-handoff` for wayfinding;
48
+ > `/cc-backlog` authors `BACKLOG.md`; `/cc-openspec` and `/cc-tdd-cycle`
49
+ > for delivery and TDD
38
50
  > - `/cc-pagespeed --url <url>` — PageSpeed Insights / Core Web Vitals after
39
51
  > `install preset`; `PAGESPEED_API_KEY` is optional but recommended for CrUX
40
52
  > field data (see [docs/pagespeed-usage.md](docs/pagespeed-usage.md))
53
+ > - `/cc-security` / `/cc:security` — authorized defensive security workflow
54
+ > with domain `security-*` skills and an authorization gate
41
55
  > - Stack-specific skill selection (`ts-next-drizzle`, `spring-kotlin-jpa`,
42
56
  > `laravel-tall`, `python-data-api`)
43
- > - Council consensus: confidence thresholds + `securityVeto` / `complianceVeto`
44
- >
45
- > Documented as **v1.0.0** (in this repo, not in published 0.5.0):
46
- >
47
- > - `goal` / `ingest` / `product` / `orchestrate` / `impact` / `verify`
48
- > - Product graph in `.codeconductor/product-graph.json`
49
- > - See [docs/v1.0.0-release-notes.md](docs/v1.0.0-release-notes.md)
57
+ > - Council consensus: quorum, required confidence, `criticalFindingsPolicy`,
58
+ > plus `securityVeto` / `complianceVeto`
59
+ > - 15 Conductor Agents, including `reviewer`, `security-reviewer`, and
60
+ > `complexity-auditor`
50
61
  >
51
62
  > Experimental (library only, not a CLI runtime):
52
63
  >
53
- > - `runWorkflowPipeline()` — 8-phase loop in `src/core/pipeline/workflow-loop.ts`
64
+ > - `runWorkflowPipeline()` — 8-phase loop in
65
+ > `src/core/pipeline/workflow-loop.ts`
54
66
  >
55
67
  > What does not exist yet:
56
68
  >
@@ -58,10 +70,10 @@ contracts, task cards, and risk-based routing.
58
70
  > - Policy compiler / uniform target enforcement
59
71
  > - Full stack-specific asset pruning
60
72
  >
61
- > Security note: policies are declarative. Agent execution depends on the
62
- > target runner. `install preset --target cursor` overwrites runner command
63
- > dirs; maintainer-only stubs (`cc-self-review`, `cc-update-preset-models`)
64
- > are skipped so this repo can dogfood `install preset`.
73
+ > Security note: policies are declarative. Agent execution depends on the target
74
+ > runner. `install preset --target cursor` overwrites runner command dirs;
75
+ > maintainer-only stubs (`cc-self-review`, `cc-update-preset-models`) are
76
+ > skipped so this repo can dogfood `install preset`.
65
77
 
66
78
  ---
67
79
 
@@ -84,6 +96,107 @@ This is not a prompt collection. It is a workflow framework.
84
96
 
85
97
  ---
86
98
 
99
+ ## What's new in v1.0.0
100
+
101
+ v1.0.0 is a **major** bump from v0.5.0 because the workflow contracts changed,
102
+ not only because features were added. Re-install presets after upgrading.
103
+
104
+ ### Breaking changes vs v0.5.0
105
+
106
+ - **`help` vs `cc-help`.** `help` prints the CLI command list. Inventory of
107
+ skills, subagents, and commands is `cc-help --target`. `help --target` no
108
+ longer lists that inventory.
109
+ - **Canonical TaskCard.** Delivery intake is `ccep taskcard`. OpenSpec cards
110
+ remain a phase view (`phase`, `backlogId`, `prompt`, `agent`) and are not
111
+ collapsed into Canonical.
112
+ - **Council consensus.** Gate with `ccep consensus --input @verdicts.json` (exit
113
+ `0`/`1`/`2` = APPROVED / REJECTED / ESCALATED). Majority requires quorum,
114
+ explicit `confidence`, and `criticalFindingsPolicy` (default: escalate). There
115
+ is no top-level `cc council` command.
116
+ - **OpenSpec state machine.** `start` / `done` / `block` / `archive` write
117
+ `BACKLOG.md` and `openspec-state.json` atomically. Illegal transitions fail
118
+ closed.
119
+ - **Schemas.** `ExecutionContext.ast.source` includes `product-graph`.
120
+ `ReviewerOutput` finding `axis` is extended with Staff Engineer axes.
121
+ - **CCEP bootstrap.** Installed slash commands run `ccep parse` → `resolve` →
122
+ `profile` → `evaluate` before delegating to agents. Agent JSON must validate
123
+ against Zod; unknown output schemas fail closed.
124
+
125
+ ### Slash commands
126
+
127
+ After `install preset`, 18 CCEP workflows plus `/cc-ask`:
128
+
129
+ | Group | Commands |
130
+ | -------------- | ---------------------------------------------------------------------------------------------------------------------------- |
131
+ | Delivery | `/cc-feature`, `/cc-fix`, `/cc-refactor`, `/cc-api-contract`, `/cc-db-migration` |
132
+ | Quality | `/cc-tdd-cycle`, `/cc-test-plan`, `/cc-review`, `/cc-council`, `/cc-scorecard` |
133
+ | OpenSpec / ops | `/cc-openspec`, `/cc-iterative`, `/cc-triage`, `/cc-explore`, `/cc-prototype`, `/cc-handoff`, `/cc-clarify`, `/cc-pagespeed` |
134
+ | Entry | `/cc-ask` — CLI `ask` recommends a slash command; it does not start the workflow |
135
+
136
+ Prefer `/cc-iterative`, `/cc-triage`, and `/cc-handoff` for wayfinding.
137
+
138
+ ### OpenSpec and TDD
139
+
140
+ OpenSpec is the delivery loop for `BACKLOG.md`:
141
+
142
+ ```text
143
+ validate → scan → plan → status → next → start → done | block → archive
144
+ ```
145
+
146
+ Agent phases: validate-backlog → discover → design → **test** → implement →
147
+ review. Test-before-implement is required whenever both phases apply.
148
+ `/cc-tdd-cycle` enforces Red → Green → Refactor (`tester` then `implementer`).
149
+
150
+ ### Review agents
151
+
152
+ 15 Conductor Agents ship in `presets/<target>/agents/`. Review path:
153
+
154
+ - `reviewer` — Review Report with CRITICAL / WARNING / SUGGESTION; CRITICAL
155
+ blocks merge
156
+ - `security-reviewer` — dedicated security analysis; `securityVeto` overrides
157
+ majority consensus
158
+ - `complexity-auditor` — bloat and non-native abstractions; runs before
159
+ `reviewer` on refactor, API change, and database migration routes
160
+
161
+ New v1.0.0 agents: `business-agent`, `continuous-architect`, `impact-analyst`.
162
+
163
+ ### Deterministic TypeScript validation (CCEP)
164
+
165
+ CCEP is CLI + Zod, not extra prompts. Source: `src/core/ccep/` and
166
+ `src/validation/schemas.ts`.
167
+
168
+ ```text
169
+ parseCommand → resolveContext → resolveWorkflowPhase → compilePrompt → validateAgentOutputBySchema
170
+ ```
171
+
172
+ ```bash
173
+ npx cc-codeconductor ccep parse --command review "PR #42" --output json
174
+ npx cc-codeconductor ccep profile tdd-cycle --output json
175
+ npx cc-codeconductor ccep validate --command feature --phase implement --role implementer --output json \
176
+ '{"status":"success","confidence":0.9,"warnings":[],"artifacts":[],"next_actions":[],"filesChanged":[],"tests":{"runner":"bun test","result":"passed"}}'
177
+ npx cc-codeconductor ccep consensus --input @verdicts.json
178
+ npx cc-codeconductor ccep taskcard --command feature --input @card.json
179
+ ```
180
+
181
+ `ccep validate` checks each role's JSON against the named schema
182
+ (`planner-output`, `implementer-output`, `review-report`, `technical-plan`,
183
+ `council-verdict`, …). See [docs/CCEP.md](docs/CCEP.md).
184
+
185
+ ### Product OS
186
+
187
+ Also in 1.0.0: `goal` / `ingest` / `product` / `orchestrate` / `impact` /
188
+ `verify`, plus `.codeconductor/product-graph.json` and related artifacts.
189
+ Details: [docs/v1.0.0-release-notes.md](docs/v1.0.0-release-notes.md) and
190
+ [docs/product-os.md](docs/product-os.md).
191
+
192
+ ### Migrate from v0.5.0
193
+
194
+ ```bash
195
+ npx cc-codeconductor install preset --target=<opencode|claude|cursor|codex|gemini|agy> --force
196
+ ```
197
+
198
+ ---
199
+
87
200
  ## Core Concepts
88
201
 
89
202
  | Concept | Name in CodeConductor |
@@ -116,25 +229,77 @@ Task Card → Risk Classification → Routing Policy → Conductor Agent → Del
116
229
 
117
230
  ## Current Support
118
231
 
119
- - OpenCode preset
120
- - Claude Code-compatible preset (see [Claude Environment Options & Best Practices](file:///c:/Users/R2D2/Documents/GitHub/codeconductor/docs/claude-env-options.md))
121
- - Codex preset
232
+ - OpenCode, Claude, Codex, Gemini, Cursor, and Agy presets
233
+ - Claude Code-compatible preset (see
234
+ [Claude Environment Options & Best Practices](docs/claude-env-options.md))
122
235
  - Spring Boot / Kotlin workflow
123
236
  - Python / Django workflow guidance
124
- - 12 core Conductor Agents
125
- - Routing Policy v0.4.0
237
+ - **15 Conductor Agents** — including `reviewer`, `security-reviewer`,
238
+ `complexity-auditor`, `business-agent`, `continuous-architect`, and
239
+ `impact-analyst`
240
+ - 18 CCEP slash-command workflows plus `/cc-ask` after `install preset`
241
+ - OpenSpec delivery loop (`validate` … `archive`) with test-before-implement
242
+ - Deterministic CCEP validation (Zod schemas per agent role)
126
243
  - Task Card template
127
244
  - Scorecard template
128
245
  - End-to-end example
129
246
  - YAML-driven model configuration
130
- - Provider-agnostic `AgentContract` abstraction with target renderers for Claude, OpenCode, Codex, and Agy
131
- - Council consensus engine (`councilConsensus()`) for multi-agent governance with majority/unanimous algorithms, security veto, **compliance veto**, and **agent confidence thresholds** (v0.4.0)
132
- - Phase 5 runtime modules scoped context injection, TDD history compaction, concise inter-agent messaging, and token budget enforcement in the compile-fix loop
133
- - **Workflow Loop Core (v0.4.0, experimental)** — 8-phase pipeline (`runWorkflowPipeline`) with wall-clock / files-modified / lines-changed guardrails and STOP gates at Design and Council Verdict (library-only; not a shipped CLI runtime)
134
- - **Stack-specific presets (v0.4.0)** `ts-next-drizzle`, `spring-kotlin-jpa`, `laravel-tall`, `python-data-api`
135
- - **9 specialized skills (v0.4.0)**drizzle-schema-architect, tailwind-responsive-auditor, seo-analytics-injector, jpa-nplusone-detector, spring-auth-auditor, livewire-alpine-bridge, fastapi-pydantic-strict, tdd-mutation-tester, auth-token-inspector
136
- - **Goal orchestration (v0.4.0)** `goal` planner + `goal-state` writer feed the orchestrator's dependency-order delegation loop
137
- - **Memory compression + escalation emitter (v0.4.0)** — keeps inter-agent context within token budget and surfaces guardrail breaches as escalation reports
247
+ - Provider-agnostic `AgentContract` abstraction with target renderers for
248
+ Claude, OpenCode, Codex, and Agy
249
+ - Council consensus engine (`councilConsensus()`) for multi-agent governance
250
+ with majority/unanimous algorithms, quorum, required confidence,
251
+ `criticalFindingsPolicy`, security veto, and compliance veto
252
+ - Phase 5 runtime modulesscoped context injection, TDD history compaction,
253
+ concise inter-agent messaging, and token budget enforcement in the compile-fix
254
+ loop
255
+ - **Workflow Loop Core (experimental)** — 8-phase pipeline
256
+ (`runWorkflowPipeline`) with wall-clock / files-modified / lines-changed
257
+ guardrails and STOP gates at Design and Council Verdict (library-only; not a
258
+ shipped CLI runtime)
259
+ - **Stack-specific presets** — `ts-next-drizzle`, `spring-kotlin-jpa`,
260
+ `laravel-tall`, `python-data-api`
261
+ - **Specialized skills** — drizzle-schema-architect,
262
+ tailwind-responsive-auditor, seo-analytics-injector, jpa-nplusone-detector,
263
+ spring-auth-auditor, livewire-alpine-bridge, fastapi-pydantic-strict,
264
+ tdd-mutation-tester, auth-token-inspector
265
+ - **Goal orchestration** — `goal` planner + `goal-state` writer feed the
266
+ orchestrator's dependency-order delegation loop
267
+ - **Memory compression + escalation emitter** — keeps inter-agent context within
268
+ token budget and surfaces guardrail breaches as escalation reports
269
+
270
+ ---
271
+
272
+ ## Supply chain
273
+
274
+ Published **1.0.0** declares two production dependencies (`package.json`
275
+ `dependencies`; same on
276
+ [npm](https://www.npmjs.com/package/cc-codeconductor)). Neither has further
277
+ npm transitive dependencies.
278
+
279
+ ```mermaid
280
+ graph LR
281
+ cc["cc-codeconductor@1.0.0"]
282
+ zod["zod@^3.23.8"]
283
+ yaml["yaml@^2.4.5"]
284
+ cc --> zod
285
+ cc --> yaml
286
+ ```
287
+
288
+ Expected runtime capabilities (user-invoked CLI commands, **not** `npm
289
+ install`):
290
+
291
+ - **Network** — `seo audit` / `seo llms` (`safeFetch` with SSRF guards);
292
+ `install lsp` binary downloads (pinned URL + SHA-256)
293
+ - **Process spawn (no shell)** — git (`scorecard`, OpenSpec, loop guards);
294
+ `verify` / compile-check; `doctor`; `install lsp` (`tar` / `npm` / `pip`)
295
+
296
+ There are no `preinstall` / `postinstall` lifecycle scripts. Socket may still
297
+ flag network and shell **capability presence** in the published bundle; that is
298
+ expected for this CLI and is not install-time execution.
299
+
300
+ For live vulnerability scanning, dependency alerts, and runtime behavior
301
+ analysis, see
302
+ [Socket — cc-codeconductor dependencies](https://socket.dev/npm/package/cc-codeconductor/dependencies).
138
303
 
139
304
  ---
140
305
 
@@ -159,8 +324,10 @@ import {
159
324
 
160
325
  Exported surface (stable for this minor):
161
326
 
162
- - Orchestrator: `getReadyTasks`, `getNextTask`, `startTask`, `completeTask`, `goalTaskToCanonicalCard`, `buildTaskEnvelope`, `formatGoalStatus`
163
- - Loop engine (TC3): `LoopEngine`, `runLoop`, `runLoopForProject`, `shouldRunAgentLoop`, `formatFeedback`
327
+ - Orchestrator: `getReadyTasks`, `getNextTask`, `startTask`, `completeTask`,
328
+ `goalTaskToCanonicalCard`, `buildTaskEnvelope`, `formatGoalStatus`
329
+ - Loop engine (TC3): `LoopEngine`, `runLoop`, `runLoopForProject`,
330
+ `shouldRunAgentLoop`, `formatFeedback`
164
331
  - Verification: `runVerification`, `gateTaskCompletion`, `validateEvidenceIds`
165
332
  - Zod contracts: everything from `src/validation/schemas.ts`
166
333
  - Domain loop: `createInitialState`, `loopStateMachine` and their types
@@ -205,8 +372,8 @@ files. `install` reads from there first.
205
372
  >
206
373
  > **`--locale` is remembered.** Once you run `init --locale=es`, the value is
207
374
  > saved to `.codeconductor/config.yml`. Every subsequent `install preset` will
208
- > automatically use that locale — no need to repeat the flag. To change it,
209
- > run `init --locale=en --force` or edit `defaults.locale` in your config.
375
+ > automatically use that locale — no need to repeat the flag. To change it, run
376
+ > `init --locale=en --force` or edit `defaults.locale` in your config.
210
377
 
211
378
  #### `detect` — detect project stack
212
379
 
@@ -249,27 +416,27 @@ Locale resolution order (first match wins):
249
416
 
250
417
  Files installed per target:
251
418
 
252
- | Target | Notable files |
253
- | ---------- | ---------------------------------------------------------------- |
419
+ | Target | Notable files |
420
+ | ---------- | --------------------------------------------------------------- |
254
421
  | `claude` | `.claude/CLAUDE.md`, `.claude/settings.json`, `.claude/agents/` |
255
- | `opencode` | `.opencode/agents/`, `.opencode/commands/`, `.opencode/skills/` |
256
- | `codex` | `.codex/AGENTS.md`, `.codex/skills/`, `.codex/prompts/` |
422
+ | `opencode` | `.opencode/agents/`, `.opencode/commands/`, `.opencode/skills/` |
423
+ | `codex` | `.codex/AGENTS.md`, `.codex/skills/`, `.codex/prompts/` |
257
424
 
258
425
  With `--global`, files are written under `~/` instead of `./`.
259
426
 
260
427
  #### Stack-specific presets (v0.4.0)
261
428
 
262
429
  Four stack-specific presets now ship in `presets/` and are registered in
263
- `src/core/presets/preset-registry.ts`. Each one bundles a tuned
264
- `architect.md` and `implementer.md` for a single stack, plus the matching
265
- specialized skills (see below).
430
+ `src/core/presets/preset-registry.ts`. Each one bundles a tuned `architect.md`
431
+ and `implementer.md` for a single stack, plus the matching specialized skills
432
+ (see below).
266
433
 
267
- | Preset | Stack | Contracts included |
268
- | ------------------- | ---------------------------------------------------------- | ------------------------- |
269
- | `ts-next-drizzle` | Next.js / Astro, Tailwind, Drizzle ORM, Bun, Postgres | `architect`, `implementer`|
270
- | `spring-kotlin-jpa` | Spring Boot, Kotlin/Java, Gradle, JPA, Hibernate | `architect`, `implementer`|
271
- | `laravel-tall` | Laravel, Blade, Livewire, Alpine.js | `architect`, `implementer`|
272
- | `python-data-api` | Python, FastAPI, Django, uv | `architect`, `implementer`|
434
+ | Preset | Stack | Contracts included |
435
+ | ------------------- | ----------------------------------------------------- | -------------------------- |
436
+ | `ts-next-drizzle` | Next.js / Astro, Tailwind, Drizzle ORM, Bun, Postgres | `architect`, `implementer` |
437
+ | `spring-kotlin-jpa` | Spring Boot, Kotlin/Java, Gradle, JPA, Hibernate | `architect`, `implementer` |
438
+ | `laravel-tall` | Laravel, Blade, Livewire, Alpine.js | `architect`, `implementer` |
439
+ | `python-data-api` | Python, FastAPI, Django, uv | `architect`, `implementer` |
273
440
 
274
441
  ```ts
275
442
  // Programmatic access via the registry
@@ -288,12 +455,12 @@ listPresets();
288
455
  const next = getPreset('ts-next-drizzle');
289
456
  ```
290
457
 
291
- `init` / `detect` identifies the stack from the project and wires the
292
- matching specialized skills onto the **generic** target workflow when you run
458
+ `init` / `detect` identifies the stack from the project and wires the matching
459
+ specialized skills onto the **generic** target workflow when you run
293
460
  `install preset`. Full stack-specific asset pruning/replacement (swapping the
294
461
  entire agent/command tree for a stack pack) is **not implemented yet** — the
295
- registry and skill wiring are real; treat claims of a full stack install swap
296
- as aspirational until that lands.
462
+ registry and skill wiring are real; treat claims of a full stack install swap as
463
+ aspirational until that lands.
297
464
 
298
465
  The full set of assets for a stack-specific preset is in
299
466
  `presets/<preset-name>/agents/` — copy them manually if you need to apply a
@@ -327,8 +494,8 @@ npx cc-codeconductor install lsp --target cursor --dry-run # preview
327
494
  npx cc-codeconductor install lsp --target all --force # overwrite existing configs
328
495
  ```
329
496
 
330
- Supported languages: TypeScript, PHP, Python via Pyright, Kotlin.
331
- Supported targets: opencode, claude, codex, gemini, cursor, agy.
497
+ Supported languages: TypeScript, PHP, Python via Pyright, Kotlin. Supported
498
+ targets: opencode, claude, codex, gemini, cursor, agy.
332
499
 
333
500
  #### `doctor` — validate configuration
334
501
 
@@ -336,7 +503,10 @@ Supported targets: opencode, claude, codex, gemini, cursor, agy.
336
503
  npx cc-codeconductor doctor
337
504
  ```
338
505
 
339
- Checks config exists and is valid, reports runner directory status, validates that `AGENTS.md` and `CLAUDE.md` do not exceed the 40KB size limit, and checks if updates are available for installed presets, target runner configurations, or skills.
506
+ Checks config exists and is valid, reports runner directory status, validates
507
+ that `AGENTS.md` and `CLAUDE.md` do not exceed the 40KB size limit, and checks
508
+ if updates are available for installed presets, target runner configurations, or
509
+ skills.
340
510
 
341
511
  #### `update` — smart update preset
342
512
 
@@ -347,7 +517,10 @@ npx cc-codeconductor update --dry-run
347
517
  npx cc-codeconductor update --global
348
518
  ```
349
519
 
350
- Smart updates all currently installed target presets, council configurations, and skills (from `skills-lock.json`), preserving user edits outside managed blocks. Also validates that `AGENTS.md` and `CLAUDE.md` do not exceed the 40KB size limit.
520
+ Smart updates all currently installed target presets, council configurations,
521
+ and skills (from `skills-lock.json`), preserving user edits outside managed
522
+ blocks. Also validates that `AGENTS.md` and `CLAUDE.md` do not exceed the 40KB
523
+ size limit.
351
524
 
352
525
  #### `help` / `cc-help` — distinct help contracts
353
526
 
@@ -359,9 +532,9 @@ npx cc-codeconductor cc-help --target claude # inventory for a specific target
359
532
  npx cc-codeconductor cc-help --output json # machine-readable inventory
360
533
  ```
361
534
 
362
- `help` prints the CLI command list. `cc-help` lists skills, subagents,
363
- commands, and workflows for the active preset (or a specified `--target`).
364
- Reads inventory from `presets/<target>/` in the project root.
535
+ `help` prints the CLI command list. `cc-help` lists skills, subagents, commands,
536
+ and workflows for the active preset (or a specified `--target`). Reads inventory
537
+ from `presets/<target>/` in the project root.
365
538
 
366
539
  #### `debt-harvest` — collect deferred debt items
367
540
 
@@ -372,8 +545,8 @@ npx cc-codeconductor harvest # alias
372
545
  npx cc-codeconductor debt-harvest --output json
373
546
  ```
374
547
 
375
- Scans source files for `// defer - [reason]` comments and consolidates them
376
- into `.codeconductor/debt-ledger.md`, grouped by optional tag
548
+ Scans source files for `// defer - [reason]` comments and consolidates them into
549
+ `.codeconductor/debt-ledger.md`, grouped by optional tag
377
550
  (`// defer - reason --tag`). Read-only on source files; only writes the ledger.
378
551
 
379
552
  Supported extensions: `.ts`, `.tsx`, `.js`, `.jsx`, `.go`, `.rs`, `.java`,
@@ -393,16 +566,75 @@ notification, migration) or falls back to a generic 4-task chain. Writes the
393
566
  resulting task graph to `.codeconductor/current-goal.yml` with dependency
394
567
  ordering. The orchestrator uses this file to delegate tasks in dependency order.
395
568
 
569
+ #### `ask` — recommend a slash command
570
+
571
+ ```bash
572
+ npx cc-codeconductor ask "login fails on Safari"
573
+ npx cc-codeconductor ask "add invoice CRUD" --output json
574
+ ```
575
+
576
+ Recommends a `/cc:` slash command from a natural-language problem. Does **not**
577
+ start the workflow; wait for human confirmation.
578
+
579
+ #### `ccep` — deterministic workflow contracts
580
+
581
+ ```bash
582
+ npx cc-codeconductor ccep parse --command review "PR #42" --output json
583
+ npx cc-codeconductor ccep profile tdd-cycle --output json
584
+ npx cc-codeconductor ccep resolve --command feature "Add CRUD" --output json
585
+ npx cc-codeconductor ccep compile --command feature --phase intake --role task-coach "Add CRUD" --output json
586
+ npx cc-codeconductor ccep validate --command feature --phase implement --role implementer --output json \
587
+ --input @implementer-output.json
588
+ npx cc-codeconductor ccep evaluate --command feature --input @planner.json --output json
589
+ npx cc-codeconductor ccep consensus --input @verdicts.json
590
+ npx cc-codeconductor ccep taskcard --command feature --input @card.json
591
+ ```
592
+
593
+ Subcommands: `parse` / `profile` / `resolve` / `compile` / `validate` /
594
+ `evaluate` / `consensus` / `taskcard`. `validate` checks agent JSON against the
595
+ Zod schema for that role. `consensus` exit codes: `0` APPROVED, `1` REJECTED,
596
+ `2` ESCALATED. Full protocol: [docs/CCEP.md](docs/CCEP.md).
597
+
598
+ #### `openspec` — backlog delivery loop
599
+
600
+ ```bash
601
+ npx cc-codeconductor openspec validate
602
+ npx cc-codeconductor openspec scan
603
+ npx cc-codeconductor openspec plan BC-001
604
+ npx cc-codeconductor openspec status
605
+ npx cc-codeconductor openspec next
606
+ npx cc-codeconductor openspec start BC-001-discover
607
+ npx cc-codeconductor openspec done BC-001-discover
608
+ npx cc-codeconductor openspec block BC-001-implement --reason "waiting on design"
609
+ npx cc-codeconductor openspec archive BC-001
610
+ ```
611
+
612
+ Subcommands: `validate` / `scan` / `plan` / `status` / `next` / `start` / `done`
613
+ / `block` / `archive`. Illegal status transitions fail closed. See
614
+ [docs/SDD.md](docs/SDD.md) and the OpenSpec skill.
615
+
616
+ #### Product OS — `ingest` / `product` / `orchestrate` / `impact` / `verify`
617
+
618
+ ```bash
619
+ npx cc-codeconductor ingest
620
+ npx cc-codeconductor product graph
621
+ npx cc-codeconductor orchestrate status
622
+ npx cc-codeconductor impact --files src/cli/router.ts
623
+ npx cc-codeconductor verify --task TC-001
624
+ ```
625
+
626
+ Builds and queries the product graph in `.codeconductor/`. Details:
627
+ [docs/product-os.md](docs/product-os.md).
396
628
 
397
629
  ### Global options
398
630
 
399
- | Flag | Description |
400
- | ---------------- | -------------------------------------------------------- |
401
- | `--force` | Overwrite existing files |
402
- | `--dry-run` | Preview actions without writing |
403
- | `--global` | Target home directory instead of project |
404
- | `--output json` | Machine-readable JSON output |
405
- | `--locale=en` | Agent instruction language: `en` (default) or `es` |
631
+ | Flag | Description |
632
+ | --------------- | -------------------------------------------------- |
633
+ | `--force` | Overwrite existing files |
634
+ | `--dry-run` | Preview actions without writing |
635
+ | `--global` | Target home directory instead of project |
636
+ | `--output json` | Machine-readable JSON output |
637
+ | `--locale=en` | Agent instruction language: `en` (default) or `es` |
406
638
 
407
639
  ### Config directory
408
640
 
@@ -441,12 +673,12 @@ src/presets/models/
441
673
 
442
674
  Agent template files contain placeholders replaced during `install`:
443
675
 
444
- | Placeholder | Description |
445
- | ------------------------------ | --------------------------------------------- |
446
- | `{{MODEL_CLAUDE}}` | Model for the Claude provider |
447
- | `{{MODEL_OPENCODE}}` | Model for the OpenCode provider |
448
- | `{{MODEL_CODEX}}` | Model for the Codex provider |
449
- | `{{LANGUAGE_INSTRUCTIONS}}` | Locale-aware instruction injected by `locale` |
676
+ | Placeholder | Description |
677
+ | --------------------------- | --------------------------------------------- |
678
+ | `{{MODEL_CLAUDE}}` | Model for the Claude provider |
679
+ | `{{MODEL_OPENCODE}}` | Model for the OpenCode provider |
680
+ | `{{MODEL_CODEX}}` | Model for the Codex provider |
681
+ | `{{LANGUAGE_INSTRUCTIONS}}` | Locale-aware instruction injected by `locale` |
450
682
 
451
683
  To customize models, edit the YAML file for your target before running
452
684
  `install`. Each file maps agent roles to provider-specific model names.
@@ -457,10 +689,10 @@ Agent markdown files (`CLAUDE.md`, `AGENTS.md`, `README.md`) include a
457
689
  `{{LANGUAGE_INSTRUCTIONS}}` placeholder that is replaced at install time based
458
690
  on the active locale:
459
691
 
460
- | Locale | Injected instruction |
461
- | ------ | -------------------- |
462
- | `en` | *Prose/docs/code comments: be terse and direct. Prefer concrete nouns over abstract ones. Omit filler phrases. One idea per sentence.* |
463
- | `es` | *Spanish prose/docs/reports/Markdown: preserve natural Spanish orthography, including accents, `ñ`, `¿`, `¡`, and normal Unicode. The ASCII-only editing preference does not apply to these artifacts.* |
692
+ | Locale | Injected instruction |
693
+ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
694
+ | `en` | _Prose/docs/code comments: be terse and direct. Prefer concrete nouns over abstract ones. Omit filler phrases. One idea per sentence._ |
695
+ | `es` | _Spanish prose/docs/reports/Markdown: preserve natural Spanish orthography, including accents, `ñ`, `¿`, `¡`, and normal Unicode. The ASCII-only editing preference does not apply to these artifacts._ |
464
696
 
465
697
  The locale is **sticky**: set it once with `init --locale=es` and every
466
698
  subsequent `install preset` will use it automatically. Override per-run with
@@ -496,8 +728,11 @@ codeconductor/
496
728
 
497
729
  ├── src/ ← CLI source (TypeScript + Bun)
498
730
  │ ├── cli/ ← entry point, router, error codes
499
- │ ├── commands/ ← init, detect, install, doctor, update
731
+ │ ├── commands/ ← init, detect, install, ccep, openspec, …
500
732
  │ ├── core/ ← config, detection, filesystem, presets, goal
733
+ │ │ ├── ccep/ ← CCEP parse/profile/validate/evaluate
734
+ │ │ ├── openspec/ ← backlog loop and state machine
735
+ │ │ ├── product/ ← Product OS ingest and console
501
736
  │ │ ├── context/ ← scoped context injection (Phase 5)
502
737
  │ │ ├── compaction/ ← TDD history compaction hook (Phase 5)
503
738
  │ │ ├── messages/ ← concise inter-agent formatter (Phase 5)
@@ -510,7 +745,7 @@ codeconductor/
510
745
  │ └── presets/council/ ← bundled council.yml preset
511
746
 
512
747
  ├── test/
513
- │ ├── cli.test.ts ← integration tests (32 tests)
748
+ │ ├── cli.test.ts ← integration tests
514
749
  │ └── fixtures/ ← bun, node, django, spring projects
515
750
 
516
751
  ├── docs/
@@ -523,9 +758,10 @@ codeconductor/
523
758
  │ ├── agent-scorecard.md
524
759
  │ └── guides/
525
760
 
526
- ├── presets/ ← manual preset files (pre-CLI)
761
+ ├── presets/ ← runner presets (agents, commands, skills)
527
762
  │ ├── opencode/
528
- └── claude/
763
+ ├── claude/
764
+ │ └── cursor/
529
765
 
530
766
  └── examples/
531
767
  └── spring-boot-kotlin/
@@ -535,8 +771,9 @@ codeconductor/
535
771
 
536
772
  ## Roadmap
537
773
 
538
- Published package: **0.5.0**. The next documented release is **v1.0.0**
539
- (Product OS). Details: [docs/current-status.md](docs/current-status.md) and
774
+ Published package: **1.0.0**. Remaining gaps (sandbox, policy compiler, full
775
+ stack-specific asset pruning): [docs/current-status.md](docs/current-status.md).
776
+ Product OS surface:
540
777
  [docs/v1.0.0-release-notes.md](docs/v1.0.0-release-notes.md).
541
778
 
542
779
  See [ROADMAP.md](ROADMAP.md) for historical notes.
@@ -18,6 +18,8 @@ export interface CompileResult {
18
18
  errors: CompileError[];
19
19
  durationMs: number;
20
20
  timedOut: boolean;
21
+ skipped?: boolean;
22
+ skipReason?: string;
21
23
  }
22
24
  export interface CompileCheckOptions {
23
25
  /**
@@ -27,6 +27,8 @@ export interface LoopResult {
27
27
  readonly finalPhase: LoopState['phase'];
28
28
  readonly escalationReport?: EscalationReport;
29
29
  readonly errorHistory: readonly (readonly CompileError[])[];
30
+ readonly compileCheck?: 'ran' | 'skipped';
31
+ readonly compileCheckSkipReason?: string;
30
32
  }
31
33
  export type GuardrailHit = {
32
34
  readonly kind: 'timeout';
@@ -62,6 +64,7 @@ export type GenerateFn = (feedback?: string) => Promise<{
62
64
  } | void>;
63
65
  export type CompileCheckFn = () => Promise<CompileResult>;
64
66
  export declare function runLoop(generateFn: GenerateFn, compileCheckFn: CompileCheckFn, config?: LoopConfig, taskTitle?: string, originalTask?: string): Promise<LoopResult>;
67
+ export declare function skippedCompileResult(reason: string): CompileResult;
65
68
  /** implement / test agent phases that must run the compile-fix engine. */
66
69
  export declare function shouldRunAgentLoop(type?: string, agentType?: string, phase?: string): boolean;
67
70
  /**