cc-codeconductor 0.2.1

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 (93) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +319 -0
  3. package/dist/index.js +12741 -0
  4. package/package.json +51 -0
  5. package/policy.yml +124 -0
  6. package/presets/claude/CLAUDE.md +598 -0
  7. package/presets/claude/commands/cc/feature.md +115 -0
  8. package/presets/claude/commands/cc/fix.md +121 -0
  9. package/presets/claude/commands/cc/refactor.md +148 -0
  10. package/presets/claude/commands/cc/review.md +126 -0
  11. package/presets/claude/commands/cc/tdd-cycle.md +226 -0
  12. package/presets/claude/commands/cc/test-plan.md +138 -0
  13. package/presets/claude/settings.json +37 -0
  14. package/presets/claude/skills/api-versioning/SKILL.md +389 -0
  15. package/presets/claude/skills/django-orm/SKILL.md +455 -0
  16. package/presets/claude/skills/django-testing/SKILL.md +409 -0
  17. package/presets/claude/skills/jpa-postgres/SKILL.md +618 -0
  18. package/presets/claude/skills/python/SKILL.md +606 -0
  19. package/presets/claude/skills/python-django-stack/SKILL.md +492 -0
  20. package/presets/claude/skills/python-fastapi-stack/SKILL.md +457 -0
  21. package/presets/claude/skills/spring-boot-feature/SKILL.md +558 -0
  22. package/presets/claude/skills/spring-boot-kotlin/SKILL.md +400 -0
  23. package/presets/claude/skills/sqlalchemy/SKILL.md +466 -0
  24. package/presets/claude/skills/testing-strategy/SKILL.md +479 -0
  25. package/presets/codex/AGENTS.md +883 -0
  26. package/presets/codex/README.md +102 -0
  27. package/presets/codex/skills/api-versioning/SKILL.md +389 -0
  28. package/presets/codex/skills/django-orm/SKILL.md +455 -0
  29. package/presets/codex/skills/django-testing/SKILL.md +409 -0
  30. package/presets/codex/skills/jpa-postgres/SKILL.md +618 -0
  31. package/presets/codex/skills/python/SKILL.md +606 -0
  32. package/presets/codex/skills/python-django-stack/SKILL.md +492 -0
  33. package/presets/codex/skills/python-fastapi-stack/SKILL.md +457 -0
  34. package/presets/codex/skills/spring-boot-feature/SKILL.md +558 -0
  35. package/presets/codex/skills/spring-boot-kotlin/SKILL.md +400 -0
  36. package/presets/codex/skills/sqlalchemy/SKILL.md +466 -0
  37. package/presets/codex/skills/testing-strategy/SKILL.md +479 -0
  38. package/presets/opencode/README.md +191 -0
  39. package/presets/opencode/agents/architect.md +133 -0
  40. package/presets/opencode/agents/docs.md +113 -0
  41. package/presets/opencode/agents/implementer.md +116 -0
  42. package/presets/opencode/agents/orchestrator.md +248 -0
  43. package/presets/opencode/agents/repo-explorer.md +119 -0
  44. package/presets/opencode/agents/reviewer.md +130 -0
  45. package/presets/opencode/agents/task-coach.md +103 -0
  46. package/presets/opencode/agents/tester.md +269 -0
  47. package/presets/opencode/commands/cc-feature.md +114 -0
  48. package/presets/opencode/commands/cc-fix.md +123 -0
  49. package/presets/opencode/commands/cc-refactor.md +148 -0
  50. package/presets/opencode/commands/cc-review.md +141 -0
  51. package/presets/opencode/commands/cc-tdd-cycle.md +225 -0
  52. package/presets/opencode/commands/cc-test-plan.md +144 -0
  53. package/presets/opencode/opencode.jsonc +89 -0
  54. package/presets/opencode/prompts/v0.1.0/architect.md +213 -0
  55. package/presets/opencode/prompts/v0.1.0/docs.md +181 -0
  56. package/presets/opencode/prompts/v0.1.0/implementer.md +154 -0
  57. package/presets/opencode/prompts/v0.1.0/orchestrator.md +169 -0
  58. package/presets/opencode/prompts/v0.1.0/repo-explorer.md +102 -0
  59. package/presets/opencode/prompts/v0.1.0/reviewer.md +183 -0
  60. package/presets/opencode/prompts/v0.1.0/task-coach.md +142 -0
  61. package/presets/opencode/prompts/v0.1.0/tester.md +160 -0
  62. package/presets/opencode/prompts/v0.2.0/architect.md +219 -0
  63. package/presets/opencode/prompts/v0.2.0/docs.md +187 -0
  64. package/presets/opencode/prompts/v0.2.0/implementer.md +160 -0
  65. package/presets/opencode/prompts/v0.2.0/orchestrator.md +238 -0
  66. package/presets/opencode/prompts/v0.2.0/repo-explorer.md +108 -0
  67. package/presets/opencode/prompts/v0.2.0/reviewer.md +190 -0
  68. package/presets/opencode/prompts/v0.2.0/task-coach.md +153 -0
  69. package/presets/opencode/prompts/v0.2.0/tester.md +249 -0
  70. package/presets/opencode/skills/api-versioning/SKILL.md +388 -0
  71. package/presets/opencode/skills/astro/SKILL.md +313 -0
  72. package/presets/opencode/skills/code-review/SKILL.md +202 -0
  73. package/presets/opencode/skills/django-orm/SKILL.md +455 -0
  74. package/presets/opencode/skills/django-testing/SKILL.md +408 -0
  75. package/presets/opencode/skills/django-uv/SKILL.md +400 -0
  76. package/presets/opencode/skills/jpa-postgres/SKILL.md +617 -0
  77. package/presets/opencode/skills/nextjs-typescript/SKILL.md +385 -0
  78. package/presets/opencode/skills/python/SKILL.md +605 -0
  79. package/presets/opencode/skills/python-django-stack/SKILL.md +491 -0
  80. package/presets/opencode/skills/python-fastapi-stack/SKILL.md +456 -0
  81. package/presets/opencode/skills/security/SKILL.md +376 -0
  82. package/presets/opencode/skills/spring-boot-feature/SKILL.md +557 -0
  83. package/presets/opencode/skills/spring-boot-kotlin/SKILL.md +399 -0
  84. package/presets/opencode/skills/spring-boot-testing-strategy/SKILL.md +470 -0
  85. package/presets/opencode/skills/sqlalchemy/SKILL.md +465 -0
  86. package/presets/opencode/skills/testing-tdd/SKILL.md +586 -0
  87. package/src/presets/council/council.yml +59 -0
  88. package/src/presets/manifests/claude.yml +23 -0
  89. package/src/presets/manifests/codex.yml +12 -0
  90. package/src/presets/manifests/opencode.yml +18 -0
  91. package/src/presets/models/claude.yml +37 -0
  92. package/src/presets/models/codex.yml +38 -0
  93. package/src/presets/models/opencode.yml +37 -0
package/LICENSE ADDED
@@ -0,0 +1,18 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CodeConductor Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the "Software"), to deal in the Software without restriction,
7
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
8
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial
12
+ portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
15
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
16
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
17
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,319 @@
1
+ # CodeConductor
2
+
3
+ **Stop prompting. Start orchestrating.**
4
+
5
+ CodeConductor is an open-source framework for building structured, reproducible
6
+ AI-assisted software engineering workflows.
7
+
8
+ It helps developers and teams coordinate specialized agents for planning,
9
+ implementation, testing, documentation, and review — using versioned agent
10
+ contracts, task cards, and risk-based routing.
11
+
12
+ > [!IMPORTANT]
13
+ >
14
+ > ## Current Scope
15
+ >
16
+ > What works today:
17
+ >
18
+ > - `codeconductor init` — detects project stack, writes
19
+ > `.codeconductor/config.yml`, copies `council.yml` and `policy.yml` into
20
+ > `.codeconductor/presets/`
21
+ > - `codeconductor install council --target <opencode|claude|codex|all>` —
22
+ > generates and writes preset files; supports `--global` to install to
23
+ > `~/.opencode/`, `~/.claude/`, `~/.codex/`
24
+ > - `codeconductor detect` — detects project stack and recommends presets
25
+ > - `codeconductor doctor` — validates configuration and installed runner
26
+ > directories
27
+ > - `codeconductor update` — re-applies the council preset for the configured
28
+ > target
29
+ > - Manual presets for OpenCode, Claude Code, and Codex
30
+ > - Versioned Agent Contracts
31
+ > - Routing Policy documentation
32
+ > - Task Card, Scorecard, and workflow templates
33
+ > - Spring Boot/Kotlin and Python/Django workflow guidance
34
+ >
35
+ > What does not exist yet:
36
+ >
37
+ > - Runtime sandbox enforcement
38
+ > - Policy compiler
39
+ > - Automated agent evaluation
40
+ > - Safe Merger
41
+ > - Multi-target `update` (currently updates only the `defaults.target` runner)
42
+ >
43
+ > Security note:
44
+ >
45
+ > CodeConductor currently provides declarative policies and documented
46
+ > guardrails. It does not yet enforce OS-level isolation, shell sandboxing, or
47
+ > runtime permission boundaries by itself. Treat all agent execution as
48
+ > dependent on the capabilities and limitations of the target tool.
49
+
50
+ ---
51
+
52
+ ## Why CodeConductor?
53
+
54
+ Most AI coding workflows fail because they treat the model as a developer.
55
+
56
+ CodeConductor treats models as **specialized workers** inside a controlled
57
+ engineering system. It defines:
58
+
59
+ - who plans
60
+ - who implements
61
+ - who tests
62
+ - who reviews
63
+ - when to escalate
64
+ - when to stop
65
+ - how agent contracts evolve over time
66
+
67
+ This is not a prompt collection. It is a workflow framework.
68
+
69
+ ---
70
+
71
+ ## Core Concepts
72
+
73
+ | Concept | Name in CodeConductor |
74
+ | ------------------ | --------------------- |
75
+ | Structured request | Task Card |
76
+ | Flow decision | Route |
77
+ | Specialized agent | Conductor Agent |
78
+ | Decision rules | Routing Policy |
79
+ | Versioned prompts | Agent Contracts |
80
+ | Reusable knowledge | Skills |
81
+ | Evaluable output | Deliverable |
82
+ | Agent metrics | Scorecard |
83
+
84
+ ---
85
+
86
+ ## How It Works
87
+
88
+ ```text
89
+ Task Card → Risk Classification → Routing Policy → Conductor Agent → Deliverable → Scorecard
90
+ ```
91
+
92
+ 1. Define the task using a structured Task Card
93
+ 2. Classify risk (low / medium / high)
94
+ 3. Route to the correct Conductor Agent
95
+ 4. Implement with constraints
96
+ 5. Validate with tests
97
+ 6. Review before merge
98
+
99
+ ---
100
+
101
+ ## Current Support (v0.2.0)
102
+
103
+ - OpenCode preset
104
+ - Claude Code-compatible preset
105
+ - Codex preset
106
+ - Spring Boot / Kotlin workflow
107
+ - Python / Django workflow guidance
108
+ - 8 core Conductor Agents
109
+ - Routing Policy v0.1.0
110
+ - Task Card template
111
+ - Scorecard template
112
+ - End-to-end example
113
+ - YAML-driven model configuration
114
+
115
+ ---
116
+
117
+ ## CLI Usage
118
+
119
+ ### Install
120
+
121
+ ```bash
122
+ # Requires Bun ≥1.0 or Node ≥20.11
123
+ bun run src/cli/main.ts --help
124
+ # or after build:
125
+ # node dist/index.js --help
126
+ ```
127
+
128
+ ### Commands
129
+
130
+ #### `init` — initialize CodeConductor in a project
131
+
132
+ ```bash
133
+ codeconductor init # detect stack, write .codeconductor/config.yml
134
+ codeconductor init --force # overwrite existing config
135
+ codeconductor init --global # write to ~/.codeconductor/
136
+ codeconductor init --dry-run # preview without writing
137
+ ```
138
+
139
+ On first run, `init` copies `council.yml` and `policy.yml` into
140
+ `.codeconductor/presets/` so you can customize them without touching framework
141
+ files. `install` reads from there first.
142
+
143
+ #### `detect` — detect project stack
144
+
145
+ ```bash
146
+ codeconductor detect
147
+ codeconductor detect --output json
148
+ ```
149
+
150
+ Output:
151
+
152
+ ```text
153
+ Detected:
154
+ - languages: javascript, typescript
155
+ - runtimes: node, bun
156
+ - frameworks: ...
157
+ ```
158
+
159
+ #### `install` — install council preset
160
+
161
+ ```bash
162
+ codeconductor install council --target opencode # project-level
163
+ codeconductor install council --target claude
164
+ codeconductor install council --target codex
165
+ codeconductor install council --target all # all three targets
166
+
167
+ codeconductor install council --target claude --global # write to ~/.claude/
168
+ codeconductor install council --target opencode --global
169
+ codeconductor install council --target all --global
170
+
171
+ codeconductor install council --target opencode --dry-run # preview
172
+ codeconductor install council --target opencode --force # overwrite
173
+ ```
174
+
175
+ Files generated per target:
176
+
177
+ | Target | Files written |
178
+ | ---------- | ---------------------------------------------------------------- |
179
+ | `opencode` | `.opencode/commands/council.md`, `.opencode/agents/council-*.md` |
180
+ | `claude` | `.claude/skills/council/SKILL.md`, `.claude/agents/council-*.md` |
181
+ | `codex` | `.codex/config.toml`, `.codex/agents/council_*.toml` |
182
+
183
+ With `--global`, the same files are written under `~/` instead of `./`.
184
+
185
+ #### `doctor` — validate configuration
186
+
187
+ ```bash
188
+ codeconductor doctor
189
+ ```
190
+
191
+ Checks config exists and is valid, reports runner directory status.
192
+
193
+ #### `update` — re-apply preset
194
+
195
+ ```bash
196
+ codeconductor update
197
+ codeconductor update --force
198
+ codeconductor update --dry-run
199
+ ```
200
+
201
+ Re-generates preset files for the `defaults.target` in your config.
202
+
203
+ ### Global options
204
+
205
+ | Flag | Description |
206
+ | --------------- | ---------------------------------------- |
207
+ | `--force` | Overwrite existing files |
208
+ | `--dry-run` | Preview actions without writing |
209
+ | `--global` | Target home directory instead of project |
210
+ | `--output json` | Machine-readable JSON output |
211
+
212
+ ### Config directory
213
+
214
+ `init` creates `.codeconductor/`:
215
+
216
+ ```text
217
+ .codeconductor/
218
+ ├── config.yml # project settings, target, preset versions
219
+ └── presets/
220
+ ├── council.yml # customizable copy of the council preset
221
+ └── policy.yml # customizable copy of policy rules
222
+ ```
223
+
224
+ Edit `.codeconductor/presets/council.yml` to add, remove, or reconfigure agents
225
+ before running `install`.
226
+
227
+ #### Model Configuration
228
+
229
+ Each preset includes a YAML configuration file in `src/presets/models/` that
230
+ defines which models are used for each agent role:
231
+
232
+ ```text
233
+ src/presets/models/
234
+ ├── opencode.yml # model defaults for OpenCode target
235
+ ├── claude.yml # model defaults for Claude target
236
+ └── codex.yml # model defaults for Codex target
237
+ ```
238
+
239
+ Agent template files contain placeholders that are replaced during `install`:
240
+
241
+ | Placeholder | Description |
242
+ | ------------------ | ------------------------------ |
243
+ | `{{MODEL_CLAUDE}}` | Model for the Claude provider |
244
+ | `{{MODEL_OPENCODE}}` | Model for the OpenCode provider |
245
+ | `{{MODEL_CODEX}}` | Model for the Codex provider |
246
+
247
+ To customize models, edit the YAML file for your target before running
248
+ `install`. Each file maps agent roles to provider-specific model names.
249
+
250
+ ---
251
+
252
+ ## Repository Structure
253
+
254
+ ```text
255
+ codeconductor/
256
+ ├── README.md
257
+ ├── LICENSE
258
+ ├── CHANGELOG.md
259
+ ├── ROADMAP.md
260
+ ├── SECURITY.md
261
+ ├── policy.yml ← declarative policy model
262
+
263
+ ├── src/ ← CLI source (TypeScript + Bun)
264
+ │ ├── cli/ ← entry point, router, error codes
265
+ │ ├── commands/ ← init, detect, install, doctor, update
266
+ │ ├── core/ ← config, detection, filesystem, presets
267
+ │ ├── adapters/ ← opencode, claude, codex generators
268
+ │ ├── domain/council/ ← council spec, agent, contract
269
+ │ ├── validation/ ← Zod schemas
270
+ │ ├── utils/ ← Result type, logger, invariant
271
+ │ └── presets/council/ ← bundled council.yml preset
272
+
273
+ ├── test/
274
+ │ ├── cli.test.ts ← integration tests (32 tests)
275
+ │ └── fixtures/ ← bun, node, django, spring projects
276
+
277
+ ├── docs/
278
+ │ ├── architecture.md
279
+ │ ├── security-model.md
280
+ │ ├── cli-contract.md
281
+ │ ├── policy-schema.md
282
+ │ ├── routing-policy.md
283
+ │ ├── task-card-template.md
284
+ │ ├── agent-scorecard.md
285
+ │ └── guides/
286
+
287
+ ├── presets/ ← manual preset files (pre-CLI)
288
+ │ ├── opencode/
289
+ │ └── claude/
290
+
291
+ └── examples/
292
+ └── spring-boot-kotlin/
293
+ ```
294
+
295
+ ---
296
+
297
+ ## Roadmap
298
+
299
+ | Version | Focus |
300
+ | ---------- | ------------------------------------------------------------------ |
301
+ | **v0.2.0** | **CLI: init, detect, install, doctor, update — shipped** ✅ |
302
+ | v0.3.0 | Next.js, FastAPI, generic presets, monorepo support |
303
+ | v0.4.0 | Provider compatibility matrix and target sync workflows |
304
+ | v0.5.0 | Scorecard CLI, task outcome tracking, prompt regression |
305
+ | v1.0.0 | Stable contracts, stable routing, documented evaluation |
306
+
307
+ See [ROADMAP.md](ROADMAP.md) for details.
308
+
309
+ ---
310
+
311
+ ## Contributing
312
+
313
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
314
+
315
+ ---
316
+
317
+ ## License
318
+
319
+ MIT — see [LICENSE](LICENSE).