cc-codeconductor 0.4.1 → 0.4.3

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 (55) hide show
  1. package/README.md +100 -6
  2. package/dist/index.js +674 -65
  3. package/package.json +1 -1
  4. package/presets/agy/AGENTS.md +24 -0
  5. package/presets/agy/workflows/cc-pipeline.md +69 -0
  6. package/presets/codex/AGENTS.md +34 -0
  7. package/presets/laravel-tall/agents/architect.md +8 -0
  8. package/presets/laravel-tall/agents/implementer.md +12 -0
  9. package/presets/laravel-tall/laravel-tall.yml +38 -0
  10. package/presets/opencode/agents/architect.md +154 -61
  11. package/presets/opencode/agents/docs.md +126 -40
  12. package/presets/opencode/agents/implementer.md +100 -38
  13. package/presets/opencode/agents/orchestrator.md +41 -60
  14. package/presets/opencode/agents/repo-explorer.md +1 -1
  15. package/presets/opencode/agents/reviewer.md +142 -74
  16. package/presets/opencode/agents/task-coach.md +111 -59
  17. package/presets/opencode/prompts/v0.4.0/architect.md +221 -0
  18. package/presets/opencode/prompts/v0.4.0/complexity-auditor.md +89 -0
  19. package/presets/opencode/prompts/v0.4.0/docs.md +189 -0
  20. package/presets/opencode/prompts/v0.4.0/implementer.md +162 -0
  21. package/presets/opencode/prompts/v0.4.0/orchestrator.md +348 -0
  22. package/presets/opencode/prompts/v0.4.0/repo-explorer.md +110 -0
  23. package/presets/opencode/prompts/v0.4.0/reviewer.md +225 -0
  24. package/presets/opencode/prompts/v0.4.0/task-coach.md +155 -0
  25. package/presets/opencode/prompts/v0.4.0/tester.md +251 -0
  26. package/presets/opencode/skills/auth-token-inspector/SKILL.md +31 -0
  27. package/presets/opencode/skills/drizzle-schema-architect/SKILL.md +51 -0
  28. package/presets/opencode/skills/fastapi-pydantic-strict/SKILL.md +44 -0
  29. package/presets/opencode/skills/jpa-nplusone-detector/SKILL.md +46 -0
  30. package/presets/opencode/skills/livewire-alpine-bridge/SKILL.md +36 -0
  31. package/presets/opencode/skills/seo-analytics-injector/SKILL.md +44 -0
  32. package/presets/opencode/skills/spring-auth-auditor/SKILL.md +30 -0
  33. package/presets/opencode/skills/tailwind-responsive-auditor/SKILL.md +30 -0
  34. package/presets/opencode/skills/tdd-mutation-tester/SKILL.md +28 -0
  35. package/presets/python-data-api/agents/architect.md +8 -0
  36. package/presets/python-data-api/agents/implementer.md +9 -0
  37. package/presets/python-data-api/python-data-api.yml +37 -0
  38. package/presets/spring-kotlin-jpa/agents/architect.md +8 -0
  39. package/presets/spring-kotlin-jpa/agents/implementer.md +9 -0
  40. package/presets/spring-kotlin-jpa/spring-kotlin-jpa.yml +38 -0
  41. package/presets/ts-next-drizzle/agents/architect.md +8 -0
  42. package/presets/ts-next-drizzle/agents/implementer.md +10 -0
  43. package/presets/ts-next-drizzle/ts-next-drizzle.yml +41 -0
  44. package/src/presets/manifests/agy.yml +2 -2
  45. package/src/presets/manifests/claude.yml +2 -2
  46. package/src/presets/manifests/codex.yml +2 -2
  47. package/src/presets/manifests/cursor.yml +2 -2
  48. package/src/presets/manifests/gemini.yml +2 -2
  49. package/src/presets/manifests/opencode.yml +2 -2
  50. package/src/presets/models/agy.yml +7 -0
  51. package/src/presets/models/claude.yml +6 -0
  52. package/src/presets/models/codex.yml +6 -0
  53. package/src/presets/models/cursor.yml +6 -0
  54. package/src/presets/models/gemini.yml +6 -0
  55. package/src/presets/models/opencode.yml +6 -0
package/README.md CHANGED
@@ -40,6 +40,9 @@ contracts, task cards, and risk-based routing.
40
40
  > (skills, subagents, commands) for the active or specified target
41
41
  > - `npx cc-codeconductor debt-harvest` (alias: `harvest`) — scans source files
42
42
  > for `// defer` comments and writes `.codeconductor/debt-ledger.md`
43
+ > - `npx cc-codeconductor goal "<objective>"` (alias: `cc-goal`) — decomposes an
44
+ > objective into a dependency-ordered task graph, writes
45
+ > `.codeconductor/current-goal.yml`
43
46
  > - `/cc-pagespeed --url <url>` — audits web performance using the PageSpeed
44
47
  > Insights API; applies the 80/20 principle to produce a prioritized report of
45
48
  > Core Web Vitals (LCP, TBT, CLS, FCP, TTFB) with framework-specific fixes;
@@ -49,12 +52,41 @@ contracts, task cards, and risk-based routing.
49
52
  > installs the full preset (agents, prompts, skills, commands, settings) for the
50
53
  > chosen runner; use `--locale=es` to inject Spanish-aware instructions into
51
54
  > agent files, or rely on the locale saved during `init`
55
+ > - **Stack-specific presets (v0.4.0)**: `ts-next-drizzle`, `spring-kotlin-jpa`,
56
+ > `laravel-tall`, `python-data-api` — bundle `architect` + `implementer`
57
+ > contracts tuned to a single framework so `install preset` drops in the right
58
+ > defaults for that stack.
59
+ > - **9 specialized skills (v0.4.0)**: `drizzle-schema-architect`,
60
+ > `tailwind-responsive-auditor`, `seo-analytics-injector`,
61
+ > `jpa-nplusone-detector`, `spring-auth-auditor`, `livewire-alpine-bridge`,
62
+ > `fastapi-pydantic-strict`, `tdd-mutation-tester`, `auth-token-inspector` —
63
+ > loaded automatically by the matching preset.
64
+ > - **Workflow Loop Core (v0.4.0)** — 8-phase pipeline
65
+ > (`intake → structure → design → test → implement → validate → council →
66
+ > compact`) with operational guardrails (wall-clock timeout, max files
67
+ > modified, max lines changed) and human-in-the-loop STOP gates after Design
68
+ > and Council Verdict.
69
+ > - **Council consensus v0.4.0** — agent confidence thresholds
70
+ > (`< 0.6` per-agent or `< 0.7` average escalates) and a `complianceVeto`
71
+ > channel that overrides majority the same way `securityVeto` does.
72
+ > - **Goal orchestration (v0.4.0)** — `goal` planner writes
73
+ > `.codeconductor/current-goal.yml`; the orchestrator delegates tasks in
74
+ > dependency order and blocks dependents when a prerequisite is `blocked`.
75
+ > - **Memory compression + escalation emitter (v0.4.0)** — Phase 5 memory index
76
+ > + token budget hook keeps inter-agent context below the configured budget;
77
+ > the loop controller emits escalation reports when guardrails fire.
78
+ > - **Parallel subagents (v0.4.0)** — risk-based routing policy v0.4.0 enables
79
+ > parallel execution for eligible agent sequences (architect + implementer
80
+ > pattern, council verdict fan-out).
52
81
  > - Manual presets for OpenCode, Claude Code, and Codex
53
82
  > - Versioned Agent Contracts
54
83
  > - Routing Policy documentation
55
84
  > - Task Card, Scorecard, and workflow templates
56
85
  > - Spring Boot/Kotlin and Python/Django workflow guidance
57
86
  >
87
+ > See [docs/v0.4.0-release-notes.md](docs/v0.4.0-release-notes.md) for the
88
+ > full v0.4.0 feature breakdown.
89
+ >
58
90
  > What does not exist yet:
59
91
  >
60
92
  > - Runtime sandbox enforcement
@@ -120,21 +152,27 @@ Task Card → Risk Classification → Routing Policy → Conductor Agent → Del
120
152
 
121
153
  ---
122
154
 
123
- ## Current Support (v0.2.0)
155
+ ## Current Support
124
156
 
125
157
  - OpenCode preset
126
158
  - Claude Code-compatible preset (see [Claude Environment Options & Best Practices](file:///c:/Users/R2D2/Documents/GitHub/codeconductor/docs/claude-env-options.md))
127
159
  - Codex preset
128
160
  - Spring Boot / Kotlin workflow
129
161
  - Python / Django workflow guidance
130
- - 10 core Conductor Agents
131
- - Routing Policy v0.2.0
162
+ - 12 core Conductor Agents
163
+ - Routing Policy v0.4.0
132
164
  - Task Card template
133
165
  - Scorecard template
134
166
  - End-to-end example
135
167
  - YAML-driven model configuration
136
168
  - Provider-agnostic `AgentContract` abstraction with target renderers for Claude, OpenCode, Codex, and Agy
137
- - Council consensus engine (`councilConsensus()`) for multi-agent governance with majority/unanimous algorithms and security veto
169
+ - Council consensus engine (`councilConsensus()`) for multi-agent governance with majority/unanimous algorithms, security veto, **compliance veto**, and **agent confidence thresholds** (v0.4.0)
170
+ - Phase 5 runtime modules — scoped context injection, TDD history compaction, concise inter-agent messaging, and token budget enforcement in the compile-fix loop
171
+ - **Workflow Loop Core (v0.4.0)** — 8-phase pipeline (`runWorkflowPipeline`) with wall-clock / files-modified / lines-changed guardrails and STOP gates at Design and Council Verdict
172
+ - **Stack-specific presets (v0.4.0)** — `ts-next-drizzle`, `spring-kotlin-jpa`, `laravel-tall`, `python-data-api`
173
+ - **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
174
+ - **Goal orchestration (v0.4.0)** — `goal` planner + `goal-state` writer feed the orchestrator's dependency-order delegation loop
175
+ - **Memory compression + escalation emitter (v0.4.0)** — keeps inter-agent context within token budget and surfaces guardrail breaches as escalation reports
138
176
 
139
177
  ---
140
178
 
@@ -222,6 +260,43 @@ Files installed per target:
222
260
 
223
261
  With `--global`, files are written under `~/` instead of `./`.
224
262
 
263
+ #### Stack-specific presets (v0.4.0)
264
+
265
+ Four stack-specific presets now ship in `presets/` and are registered in
266
+ `src/core/presets/preset-registry.ts`. Each one bundles a tuned
267
+ `architect.md` and `implementer.md` for a single stack, plus the matching
268
+ specialized skills (see below).
269
+
270
+ | Preset | Stack | Contracts included |
271
+ | ------------------- | ---------------------------------------------------------- | ------------------------- |
272
+ | `ts-next-drizzle` | Next.js / Astro, Tailwind, Drizzle ORM, Bun, Postgres | `architect`, `implementer`|
273
+ | `spring-kotlin-jpa` | Spring Boot, Kotlin/Java, Gradle, JPA, Hibernate | `architect`, `implementer`|
274
+ | `laravel-tall` | Laravel, Blade, Livewire, Alpine.js | `architect`, `implementer`|
275
+ | `python-data-api` | Python, FastAPI, Django, uv | `architect`, `implementer`|
276
+
277
+ ```ts
278
+ // Programmatic access via the registry
279
+ import { listPresets, getPreset } from 'cc-codeconductor/core/presets/preset-registry';
280
+
281
+ listPresets();
282
+ // [
283
+ // { name: 'council', version: '0.1.0', ... },
284
+ // { name: 'seo-hotel', version: '0.3.0', ... },
285
+ // { name: 'ts-next-drizzle', version: '0.4.0', ... },
286
+ // { name: 'spring-kotlin-jpa', version: '0.4.0', ... },
287
+ // { name: 'laravel-tall', version: '0.4.0', ... },
288
+ // { name: 'python-data-api', version: '0.4.0', ... },
289
+ // ]
290
+
291
+ const next = getPreset('ts-next-drizzle');
292
+ ```
293
+
294
+ `init` / `detect` identifies the stack from the project and wires the
295
+ matching specialized skills automatically when you run `install preset`.
296
+ The full set of assets for a stack-specific preset is in
297
+ `presets/<preset-name>/agents/` — copy them manually if you need to apply a
298
+ preset by name.
299
+
225
300
  #### `install council` — install council spec
226
301
 
227
302
  ```bash
@@ -300,6 +375,20 @@ into `.codeconductor/debt-ledger.md`, grouped by optional tag
300
375
  Supported extensions: `.ts`, `.tsx`, `.js`, `.jsx`, `.go`, `.rs`, `.java`,
301
376
  `.kt`, `.swift`, `.cs`, `.php`, `.scala`, `.dart`, `.c`, `.cpp`, `.h`, `.hpp`.
302
377
 
378
+ #### `goal` — decompose objective into task graph
379
+
380
+ ```bash
381
+ npx cc-codeconductor goal "Add user authentication"
382
+ npx cc-codeconductor goal "Implement CRUD for invoices"
383
+ npx cc-codeconductor cc-goal "Add search with filters" # alias
384
+ npx cc-codeconductor goal "Add user authentication" --output json
385
+ ```
386
+
387
+ Matches the objective against built-in templates (auth, crud, search,
388
+ notification, migration) or falls back to a generic 4-task chain. Writes the
389
+ resulting task graph to `.codeconductor/current-goal.yml` with dependency
390
+ ordering. The orchestrator uses this file to delegate tasks in dependency order.
391
+
303
392
 
304
393
  ### Global options
305
394
 
@@ -404,9 +493,14 @@ codeconductor/
404
493
  ├── src/ ← CLI source (TypeScript + Bun)
405
494
  │ ├── cli/ ← entry point, router, error codes
406
495
  │ ├── commands/ ← init, detect, install, doctor, update
407
- │ ├── core/ ← config, detection, filesystem, presets
496
+ │ ├── core/ ← config, detection, filesystem, presets, goal
497
+ │ │ ├── context/ ← scoped context injection (Phase 5)
498
+ │ │ ├── compaction/ ← TDD history compaction hook (Phase 5)
499
+ │ │ ├── messages/ ← concise inter-agent formatter (Phase 5)
500
+ │ │ └── loop/ ← compile-fix loop controller (Phase 5)
408
501
  │ ├── adapters/ ← opencode, claude, codex generators
409
502
  │ ├── domain/council/ ← council spec, agent, contract
503
+ │ ├── domain/loop/ ← loop state machine
410
504
  │ ├── validation/ ← Zod schemas
411
505
  │ ├── utils/ ← Result type, logger, invariant
412
506
  │ └── presets/council/ ← bundled council.yml preset
@@ -441,7 +535,7 @@ codeconductor/
441
535
  | ---------- | ----------------------------------------------------------- |
442
536
  | **v0.2.0** | **CLI: init, detect, install, doctor, update — shipped** ✅ |
443
537
  | v0.3.0 | Next.js, FastAPI, generic presets, monorepo support |
444
- | v0.4.0 | Provider compatibility matrix and target sync workflows |
538
+ | **v0.4.0** | **Workflow Loop Core, stack-specific presets, 9 specialized skills, confidence thresholds + compliance veto in council consensus, goal orchestration, memory compression — shipped** ✅ |
445
539
  | v0.5.0 | Scorecard CLI, task outcome tracking, prompt regression |
446
540
  | v1.0.0 | Stable contracts, stable routing, documented evaluation |
447
541