cc-codeconductor 0.5.0 → 1.0.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.
- package/README.md +95 -95
- package/dist/cli/errors.d.ts +65 -0
- package/dist/core/compilation/compile-checker.d.ts +51 -0
- package/dist/core/config/codeconductor-config.d.ts +42 -0
- package/dist/core/config/config-loader.d.ts +11 -0
- package/dist/core/filesystem/credential-guard.d.ts +18 -0
- package/dist/core/goal/goal-planner.d.ts +8 -0
- package/dist/core/goal/goal-state.d.ts +15 -0
- package/dist/core/loop/git-stats.d.ts +13 -0
- package/dist/core/loop/loop-engine.d.ts +79 -0
- package/dist/core/memory/episodic-store.d.ts +6 -0
- package/dist/core/memory/operational-state.d.ts +6 -0
- package/dist/core/orchestrator/runtime-orchestrator.d.ts +25 -0
- package/dist/core/planner/product-planner.d.ts +18 -0
- package/dist/core/presets/package-paths.d.ts +4 -0
- package/dist/core/product-graph/graph-store.d.ts +11 -0
- package/dist/core/product-graph/paths.d.ts +18 -0
- package/dist/core/verification/verification-runner.d.ts +57 -0
- package/dist/domain/loop/loop-state.d.ts +74 -0
- package/dist/domain/product/entities.d.ts +11 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +21820 -15579
- package/dist/library.js +2595 -0
- package/dist/utils/result.d.ts +36 -0
- package/dist/validation/schemas.d.ts +3660 -0
- package/package.json +15 -2
- package/policy.yml +12 -11
- package/presets/agy/AGENTS.md +11 -5
- package/presets/agy/gates/pre-commit/GATE.md +136 -0
- package/presets/agy/skills/cc-fix/SKILL.md +2 -2
- package/presets/agy/skills/cc-tdd-cycle/SKILL.md +11 -0
- package/presets/agy/workflows/cc-api-contract.md +12 -0
- package/presets/agy/workflows/cc-ask.md +55 -0
- package/presets/agy/workflows/cc-clarify.md +33 -0
- package/presets/agy/workflows/cc-council.md +31 -7
- package/presets/agy/workflows/cc-db-migration.md +22 -9
- package/presets/agy/workflows/cc-explore.md +37 -0
- package/presets/agy/workflows/cc-feature.md +41 -19
- package/presets/agy/workflows/cc-fix.md +50 -23
- package/presets/agy/workflows/cc-handoff.md +42 -0
- package/presets/agy/workflows/cc-iterative.md +128 -0
- package/presets/agy/workflows/cc-openspec.md +13 -0
- package/presets/agy/workflows/cc-pagespeed.md +12 -0
- package/presets/agy/workflows/cc-prototype.md +39 -0
- package/presets/agy/workflows/cc-refactor.md +12 -0
- package/presets/agy/workflows/cc-review.md +12 -0
- package/presets/agy/workflows/cc-scorecard.md +12 -0
- package/presets/agy/workflows/cc-tdd-cycle.md +24 -0
- package/presets/agy/workflows/cc-test-plan.md +12 -0
- package/presets/agy/workflows/cc-triage.md +35 -0
- package/presets/claude/CLAUDE.md +64 -0
- package/presets/claude/commands/cc/api-contract.md +12 -0
- package/presets/claude/commands/cc/ask.md +55 -0
- package/presets/claude/commands/cc/clarify.md +32 -0
- package/presets/claude/commands/cc/council.md +87 -0
- package/presets/claude/commands/cc/db-migration.md +22 -9
- package/presets/claude/commands/cc/explore.md +36 -0
- package/presets/claude/commands/cc/feature.md +49 -22
- package/presets/claude/commands/cc/fix.md +74 -20
- package/presets/claude/commands/cc/handoff.md +44 -0
- package/presets/claude/commands/cc/iterative.md +132 -0
- package/presets/claude/commands/cc/openspec.md +25 -0
- package/presets/claude/commands/cc/pagespeed.md +12 -0
- package/presets/claude/commands/cc/prototype.md +38 -0
- package/presets/claude/commands/cc/refactor.md +152 -1
- package/presets/claude/commands/cc/review.md +78 -16
- package/presets/claude/commands/cc/scorecard.md +12 -0
- package/presets/claude/commands/cc/tdd-cycle.md +53 -3
- package/presets/claude/commands/cc/test-plan.md +12 -0
- package/presets/claude/commands/cc/triage.md +34 -0
- package/presets/claude/gates/pre-commit/GATE.md +136 -0
- package/presets/claude/settings.json +8 -46
- package/presets/codex/AGENTS.md +6 -6
- package/presets/codex/commands/cc-ask.md +55 -0
- package/presets/codex/gates/pre-commit/GATE.md +136 -0
- package/presets/cursor/AGENTS.md +6 -6
- package/presets/cursor/agents/business-agent.md +44 -0
- package/presets/cursor/agents/continuous-architect.md +37 -0
- package/presets/cursor/agents/docs.md +1 -0
- package/presets/cursor/agents/goal-planner.md +1 -1
- package/presets/cursor/agents/impact-analyst.md +43 -0
- package/presets/cursor/agents/orchestrator.md +6 -6
- package/presets/cursor/commands/cc/api-contract.md +12 -0
- package/presets/cursor/commands/cc/ask.md +55 -0
- package/presets/cursor/commands/cc/clarify.md +32 -0
- package/presets/cursor/commands/cc/council.md +87 -0
- package/presets/cursor/commands/cc/db-migration.md +22 -9
- package/presets/cursor/commands/cc/explore.md +36 -0
- package/presets/cursor/commands/cc/feature.md +41 -19
- package/presets/cursor/commands/cc/fix.md +47 -20
- package/presets/cursor/commands/cc/handoff.md +41 -0
- package/presets/cursor/commands/cc/iterative.md +133 -0
- package/presets/cursor/commands/cc/openspec.md +22 -7
- package/presets/cursor/commands/cc/pagespeed.md +12 -0
- package/presets/cursor/commands/cc/prototype.md +38 -0
- package/presets/cursor/commands/cc/refactor.md +12 -0
- package/presets/cursor/commands/cc/review.md +12 -0
- package/presets/cursor/commands/cc/scorecard.md +12 -0
- package/presets/cursor/commands/cc/tdd-cycle.md +24 -0
- package/presets/cursor/commands/cc/test-plan.md +12 -0
- package/presets/cursor/commands/cc/triage.md +34 -0
- package/presets/cursor/gates/pre-commit/GATE.md +136 -0
- package/presets/cursor/rules/orchestration.mdc +1 -1
- package/presets/opencode/agents/architect.md +22 -1
- package/presets/opencode/agents/complexity-auditor.md +16 -1
- package/presets/opencode/agents/contract-builder.md +17 -1
- package/presets/opencode/agents/devil.md +158 -0
- package/presets/opencode/agents/docs.md +19 -1
- package/presets/opencode/agents/goal-planner.md +32 -2
- package/presets/opencode/agents/implementer.md +32 -2
- package/presets/opencode/agents/orchestrator.md +79 -12
- package/presets/opencode/agents/planner.md +61 -0
- package/presets/opencode/agents/repo-explorer.md +16 -0
- package/presets/opencode/agents/reviewer.md +33 -3
- package/presets/opencode/agents/security-reviewer.md +31 -1
- package/presets/opencode/agents/task-coach.md +69 -1
- package/presets/opencode/agents/tester.md +18 -1
- package/presets/opencode/commands/cc-api-contract.md +12 -0
- package/presets/opencode/commands/cc-ask.md +55 -0
- package/presets/opencode/commands/cc-clarify.md +31 -0
- package/presets/opencode/commands/cc-council.md +87 -0
- package/presets/opencode/commands/cc-db-migration.md +22 -9
- package/presets/opencode/commands/cc-explore.md +35 -0
- package/presets/opencode/commands/cc-feature.md +41 -19
- package/presets/opencode/commands/cc-fix.md +50 -23
- package/presets/opencode/commands/cc-handoff.md +40 -0
- package/presets/opencode/commands/cc-iterative.md +127 -0
- package/presets/opencode/commands/cc-openspec.md +13 -0
- package/presets/opencode/commands/cc-pagespeed.md +12 -0
- package/presets/opencode/commands/cc-prototype.md +37 -0
- package/presets/opencode/commands/cc-refactor.md +12 -0
- package/presets/opencode/commands/cc-review.md +12 -0
- package/presets/opencode/commands/cc-scorecard.md +12 -0
- package/presets/opencode/commands/cc-tdd-cycle.md +24 -0
- package/presets/opencode/commands/cc-test-plan.md +12 -0
- package/presets/opencode/commands/cc-triage.md +33 -0
- package/presets/opencode/gates/pre-commit/GATE.md +136 -0
- package/presets/opencode/prompts/v0.1.0/DEPRECATED.md +11 -0
- package/presets/opencode/prompts/v0.2.0/DEPRECATED.md +11 -0
- package/presets/opencode/prompts/v0.3.0/DEPRECATED.md +11 -0
- package/presets/opencode/prompts/v0.4.0/DEPRECATED.md +11 -0
- package/presets/opencode/prompts/v0.5.0/goal-planner.md +1 -1
- package/presets/opencode/prompts/v0.5.0/orchestrator.md +6 -6
- package/presets/opencode/prompts/v0.6.0/implementer.md +35 -0
- package/presets/opencode/prompts/v0.6.0/planner.md +36 -0
- package/presets/opencode/prompts/v0.6.0/reviewer.md +40 -0
- package/presets/opencode/prompts/v1.0.0/README.md +47 -0
- package/presets/opencode/prompts/v1.0.0/architect.md +259 -0
- package/presets/opencode/prompts/v1.0.0/complexity-auditor.md +116 -0
- package/presets/opencode/prompts/v1.0.0/contract-builder.md +120 -0
- package/presets/opencode/prompts/v1.0.0/devil.md +169 -0
- package/presets/opencode/prompts/v1.0.0/docs.md +229 -0
- package/presets/opencode/prompts/v1.0.0/goal-planner.md +123 -0
- package/presets/opencode/prompts/v1.0.0/implementer.md +228 -0
- package/presets/opencode/prompts/v1.0.0/orchestrator.md +474 -0
- package/presets/opencode/prompts/v1.0.0/planner.md +72 -0
- package/presets/opencode/prompts/v1.0.0/repo-explorer.md +147 -0
- package/presets/opencode/prompts/v1.0.0/reviewer.md +295 -0
- package/presets/opencode/prompts/v1.0.0/security-reviewer.md +170 -0
- package/presets/opencode/prompts/v1.0.0/task-coach.md +235 -0
- package/presets/opencode/prompts/v1.0.0/tester.md +298 -0
- package/presets/seo-hotel/settings.json +0 -17
- package/src/presets/manifests/agy.yml +2 -2
- package/src/presets/manifests/claude.yml +2 -2
- package/src/presets/manifests/codex.yml +2 -2
- package/src/presets/manifests/cursor.yml +2 -2
- package/src/presets/manifests/gemini.yml +2 -2
- package/src/presets/manifests/opencode.yml +2 -2
- package/src/presets/models/agy.yml +93 -66
- package/src/presets/models/claude.yml +79 -53
- package/src/presets/models/codex.yml +79 -54
- package/src/presets/models/cursor.yml +72 -58
- package/src/presets/models/gemini.yml +79 -53
- package/src/presets/models/opencode.yml +72 -46
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
[cc: alias] Run the advanced iterative workflow — Wayfinding AST discovery,
|
|
4
|
+
Relentless Grilling, contract and spec design, TDD, council review, and docs.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Advanced Iterative Workflow
|
|
8
|
+
|
|
9
|
+
Iterative request: $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Step 0 — CCEP Bootstrap
|
|
14
|
+
|
|
15
|
+
Command: `iterative` (fixed for this workflow — do not infer from user text)
|
|
16
|
+
|
|
17
|
+
1. Run: `npx cc-codeconductor ccep parse --command iterative "$ARGUMENTS" --output json`
|
|
18
|
+
2. Run: `npx cc-codeconductor ccep resolve --command iterative "$ARGUMENTS" --output json`
|
|
19
|
+
3. Run: `npx cc-codeconductor ccep profile iterative --output json`
|
|
20
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command iterative --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
21
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
22
|
+
Canonical delivery order is test-before-implement whenever both phases apply.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Step 1 — Wayfinding (repo-explorer)
|
|
27
|
+
|
|
28
|
+
If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
|
|
29
|
+
`graphify path` / `graphify explain` when two modules or one concept need a
|
|
30
|
+
scoped subgraph). Then invoke the `repo-explorer` subagent via the Task tool
|
|
31
|
+
with that graph output.
|
|
32
|
+
|
|
33
|
+
repo-explorer maps directory trees, conventions, god nodes, and affected
|
|
34
|
+
modules. Do not write code in this step. Write a short phase handoff (scope,
|
|
35
|
+
files, open questions) before the next phase — do not chain agents on unspoken
|
|
36
|
+
context.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Step 2 — Relentless Grilling & Task Card (task-coach)
|
|
41
|
+
|
|
42
|
+
Invoke the `task-coach` subagent via the Task tool.
|
|
43
|
+
|
|
44
|
+
Produce a complete Task Card. The Task Card is ready when it contains: title,
|
|
45
|
+
type, risk classification, scope, context, acceptance criteria, and
|
|
46
|
+
constraints, and every assumption behind it has survived one grilling
|
|
47
|
+
question (Grilling protocol).
|
|
48
|
+
|
|
49
|
+
If any field is missing or ambiguous, ask one clarifying question at a time and
|
|
50
|
+
wait for the answer. Do not proceed with an incomplete Task Card.
|
|
51
|
+
|
|
52
|
+
**STOP here.** Unresolved grilling questions or missing fields populate
|
|
53
|
+
`questionsForUser` in the CCEP-1 `planner-output`; the `ConfirmationGate`
|
|
54
|
+
(`ccep evaluate`) reads that field and halts the workflow until a human
|
|
55
|
+
answers. Show the completed Task Card and wait for that confirmation before
|
|
56
|
+
continuing.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Step 3 — Contract & Technical Plan (contract-builder & architect)
|
|
61
|
+
|
|
62
|
+
Invoke `contract-builder` then `architect` via the Task tool.
|
|
63
|
+
|
|
64
|
+
1. Define API contracts, JSON Schemas, or TypeScript interfaces.
|
|
65
|
+
2. Formulate the Technical Plan (chosen approach, affected files, trade-offs).
|
|
66
|
+
3. Apply YAGNI, Simplicity First, and Stdlib-First.
|
|
67
|
+
|
|
68
|
+
**STOP here. Show the Technical Plan and wait for explicit human approval. Do
|
|
69
|
+
not proceed to tests until the plan is approved.**
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Step 4 — Test coverage (Tester role)
|
|
74
|
+
|
|
75
|
+
Invoke the `tester` subagent via the Task tool.
|
|
76
|
+
|
|
77
|
+
1. Write or extend failing tests for the new behavior before implementation (RED).
|
|
78
|
+
2. Ensure all acceptance criteria from the Task Card have at least one test.
|
|
79
|
+
3. Produce a Test Report: test files added or modified, cases covered.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Step 5 — Implementation (Implementer role)
|
|
84
|
+
|
|
85
|
+
Invoke the `implementer` subagent via the Task tool.
|
|
86
|
+
|
|
87
|
+
Use the approved Technical Plan, contracts, and the failing tests.
|
|
88
|
+
Implementer creates a Git Worktree before touching any file; all edits happen
|
|
89
|
+
inside it.
|
|
90
|
+
|
|
91
|
+
1. Read the Technical Plan before touching any file.
|
|
92
|
+
2. Apply the minimal diff — only what the plan specifies.
|
|
93
|
+
3. Run the project test suite and make the previously written failing tests pass.
|
|
94
|
+
4. If tests fail, run up to 3 repair cycles (`implementer` → `tester`).
|
|
95
|
+
5. Produce an Implementation Summary: what changed, which files, how to verify
|
|
96
|
+
locally.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Step 6 — Multi-Perspective Council Review
|
|
101
|
+
|
|
102
|
+
Invoke the `council` skill on the generated diff (`council-review` phase).
|
|
103
|
+
|
|
104
|
+
The council evaluates Architecture, Security, Product, Delivery, DataOps, and
|
|
105
|
+
Devil. `security-reviewer` may set `securityVeto: true`; that REJECTED verdict
|
|
106
|
+
overrides majority consensus.
|
|
107
|
+
|
|
108
|
+
If ANY agent votes CRITICAL:
|
|
109
|
+
- The Review Report status is **BLOCKED**.
|
|
110
|
+
- Return to Step 5 with the feedback.
|
|
111
|
+
|
|
112
|
+
If APPROVED (no CRITICAL findings), continue.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Step 7 — Documentation (Docs role)
|
|
117
|
+
|
|
118
|
+
Invoke the `docs` subagent via the Task tool when a public API, public module,
|
|
119
|
+
or user-visible behavior changed.
|
|
120
|
+
|
|
121
|
+
Update: README (if applicable), OpenAPI spec (if applicable), CHANGELOG
|
|
122
|
+
(always when implementation changed), ADR (if an architectural decision was
|
|
123
|
+
made).
|
|
124
|
+
|
|
125
|
+
If `graphify-out/` is in use, run `graphify update .` (AST-only).
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Completion
|
|
130
|
+
|
|
131
|
+
The iterative workflow is complete only when: all tests pass, the council
|
|
132
|
+
approves the spec and the diff, no CRITICAL findings remain, and documentation
|
|
133
|
+
and the knowledge graph reflect the implemented behavior.
|
|
@@ -12,7 +12,22 @@ Orchestrate FIFO delivery from `BACKLOG.md`. CodeConductor owns planning; agents
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Step 0 — CCEP Bootstrap
|
|
18
|
+
|
|
19
|
+
Command: `openspec` (fixed for this workflow — do not infer from user text)
|
|
20
|
+
|
|
21
|
+
1. Run: `npx cc-codeconductor ccep parse --command openspec "$ARGUMENTS" --output json`
|
|
22
|
+
2. Run: `npx cc-codeconductor ccep resolve --command openspec "$ARGUMENTS" --output json`
|
|
23
|
+
3. Run: `npx cc-codeconductor ccep profile openspec --output json`
|
|
24
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command openspec --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
25
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
26
|
+
Canonical delivery order is test-before-implement whenever both phases apply.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Step 1 — Validate (mandatory gate)
|
|
16
31
|
|
|
17
32
|
Run:
|
|
18
33
|
|
|
@@ -28,7 +43,7 @@ If validation fails:
|
|
|
28
43
|
|
|
29
44
|
---
|
|
30
45
|
|
|
31
|
-
## Step
|
|
46
|
+
## Step 2 — Scan
|
|
32
47
|
|
|
33
48
|
Run:
|
|
34
49
|
|
|
@@ -40,7 +55,7 @@ Report: new items, modified items, closed/archived items, and whether the file c
|
|
|
40
55
|
|
|
41
56
|
---
|
|
42
57
|
|
|
43
|
-
## Step
|
|
58
|
+
## Step 3 — Select item
|
|
44
59
|
|
|
45
60
|
If `$ARGUMENTS` contains a `BC-xxx` ID, use that item. Otherwise run:
|
|
46
61
|
|
|
@@ -54,7 +69,7 @@ Pick the next `READY` item with satisfied dependencies (FIFO by priority). Skip
|
|
|
54
69
|
|
|
55
70
|
---
|
|
56
71
|
|
|
57
|
-
## Step
|
|
72
|
+
## Step 4 — Plan
|
|
58
73
|
|
|
59
74
|
Run:
|
|
60
75
|
|
|
@@ -71,7 +86,7 @@ Update BACKLOG item status to `PLANNED` (CLI does this automatically).
|
|
|
71
86
|
|
|
72
87
|
---
|
|
73
88
|
|
|
74
|
-
## Step
|
|
89
|
+
## Step 5 — Model matrix and execute loop
|
|
75
90
|
|
|
76
91
|
Before executing phases, show resolved models:
|
|
77
92
|
|
|
@@ -106,7 +121,7 @@ Implementer: create a Git worktree before editing (`git worktree add ../<branch>
|
|
|
106
121
|
|
|
107
122
|
---
|
|
108
123
|
|
|
109
|
-
## Step
|
|
124
|
+
## Step 6 — Review gate
|
|
110
125
|
|
|
111
126
|
Run regression when BACKLOG Global `Review required: yes`:
|
|
112
127
|
|
|
@@ -127,7 +142,7 @@ If **approved**: proceed to Step 6.
|
|
|
127
142
|
|
|
128
143
|
---
|
|
129
144
|
|
|
130
|
-
## Step
|
|
145
|
+
## Step 7 — Scorecard and update backlog
|
|
131
146
|
|
|
132
147
|
1. `npx cc-codeconductor scorecard create --task <BC-id> --from-diff`
|
|
133
148
|
2. Complete criteria; `scorecard record` with verdict and optional cost/tokens
|
|
@@ -4,6 +4,18 @@ Audit web performance using the PageSpeed Insights API. Applies the 80/20
|
|
|
4
4
|
principle: identify the 20% of changes that produce 80% of the performance gain.
|
|
5
5
|
Produces a prioritized report in the current working directory.
|
|
6
6
|
|
|
7
|
+
## Step 0 — CCEP Bootstrap
|
|
8
|
+
|
|
9
|
+
Command: `pagespeed` (fixed for this workflow — do not infer from user text)
|
|
10
|
+
|
|
11
|
+
1. Run: `npx cc-codeconductor ccep parse --command pagespeed "$ARGUMENTS" --output json`
|
|
12
|
+
2. Run: `npx cc-codeconductor ccep resolve --command pagespeed "$ARGUMENTS" --output json`
|
|
13
|
+
3. Run: `npx cc-codeconductor ccep profile pagespeed --output json`
|
|
14
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command pagespeed --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
15
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
7
19
|
## Usage
|
|
8
20
|
|
|
9
21
|
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
[cc: alias] Disposable spike in an isolated worktree. Not a merge candidate.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Prototype Workflow
|
|
7
|
+
|
|
8
|
+
Prototype request: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
## Step 0 — CCEP Bootstrap
|
|
11
|
+
|
|
12
|
+
Command: `prototype` (fixed for this workflow — do not infer from user text)
|
|
13
|
+
|
|
14
|
+
1. Run: `npx cc-codeconductor ccep parse --command prototype "$ARGUMENTS" --output json`
|
|
15
|
+
2. Run: `npx cc-codeconductor ccep resolve --command prototype "$ARGUMENTS" --output json`
|
|
16
|
+
3. Run: `npx cc-codeconductor ccep profile prototype --output json`
|
|
17
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command prototype --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
18
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Step 1 — Bounds (architect)
|
|
23
|
+
|
|
24
|
+
Invoke `architect`. Define what the spike may touch, time-box, and what must not leak into main. Do not treat this as a production Technical Plan.
|
|
25
|
+
|
|
26
|
+
**STOP here. Wait for approval of the spike bounds.**
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Step 2 — Spike (implementer)
|
|
31
|
+
|
|
32
|
+
Invoke `implementer` in a Git worktree that is not a merge candidate. Label the Implementation Summary as disposable. Do not open a PR against protected branches.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Completion
|
|
37
|
+
|
|
38
|
+
Report bounds, worktree path, and what was learned. Recommend `/cc:feature` or `/cc:fix` if the spike should become real work.
|
|
@@ -33,6 +33,18 @@ If coverage is insufficient:
|
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
+
## Step 0 — CCEP Bootstrap
|
|
37
|
+
|
|
38
|
+
Command: `refactor` (fixed for this workflow — do not infer from user text)
|
|
39
|
+
|
|
40
|
+
1. Run: `npx cc-codeconductor ccep parse --command refactor "$ARGUMENTS" --output json`
|
|
41
|
+
2. Run: `npx cc-codeconductor ccep resolve --command refactor "$ARGUMENTS" --output json`
|
|
42
|
+
3. Run: `npx cc-codeconductor ccep profile refactor --output json`
|
|
43
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command refactor --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
44
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
36
48
|
## Step 1 — Architectural justification (Architect role)
|
|
37
49
|
|
|
38
50
|
Invoke the `architect` subagent via the Task tool. Always invoke this step
|
|
@@ -17,6 +17,18 @@ Specify what to review. Accepted formats:
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
+
## Step 0 — CCEP Bootstrap
|
|
21
|
+
|
|
22
|
+
Command: `review` (fixed for this workflow — do not infer from user text)
|
|
23
|
+
|
|
24
|
+
1. Run: `npx cc-codeconductor ccep parse --command review "$ARGUMENTS" --output json`
|
|
25
|
+
2. Run: `npx cc-codeconductor ccep resolve --command review "$ARGUMENTS" --output json`
|
|
26
|
+
3. Run: `npx cc-codeconductor ccep profile review --output json`
|
|
27
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command review --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
28
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
20
32
|
## Step 1 — Diff collection
|
|
21
33
|
|
|
22
34
|
Before adopting the Reviewer role, collect the diff for the specified target.
|
|
@@ -10,6 +10,18 @@ Scope: $ARGUMENTS
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## Step 0 — CCEP Bootstrap
|
|
14
|
+
|
|
15
|
+
Command: `scorecard` (fixed for this workflow — do not infer from user text)
|
|
16
|
+
|
|
17
|
+
1. Run: `npx cc-codeconductor ccep parse --command scorecard "$ARGUMENTS" --output json`
|
|
18
|
+
2. Run: `npx cc-codeconductor ccep resolve --command scorecard "$ARGUMENTS" --output json`
|
|
19
|
+
3. Run: `npx cc-codeconductor ccep profile scorecard --output json`
|
|
20
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command scorecard --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
21
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
13
25
|
## Step 1 — Identify task
|
|
14
26
|
|
|
15
27
|
Use `$ARGUMENTS` as task id (e.g. `BC-001`) or read active item from `npx cc-codeconductor openspec status`.
|
|
@@ -18,6 +18,19 @@ Describe what behavior you want to implement. Include:
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
+
## Step 0 — CCEP Bootstrap
|
|
22
|
+
|
|
23
|
+
Command: `tdd-cycle` (fixed for this workflow — do not infer from user text)
|
|
24
|
+
|
|
25
|
+
1. Run: `npx cc-codeconductor ccep parse --command tdd-cycle "$ARGUMENTS" --output json`
|
|
26
|
+
2. Run: `npx cc-codeconductor ccep resolve --command tdd-cycle "$ARGUMENTS" --output json`
|
|
27
|
+
3. Run: `npx cc-codeconductor ccep profile tdd-cycle --output json`
|
|
28
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command tdd-cycle --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
29
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
30
|
+
Canonical delivery order is test-before-implement whenever both phases apply.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
21
34
|
## Before you begin — mandatory pre-check
|
|
22
35
|
|
|
23
36
|
This command enforces strict TDD discipline. The three phases are sequential and
|
|
@@ -30,6 +43,17 @@ non-negotiable:
|
|
|
30
43
|
Do not write implementation code during RED. Do not refactor during GREEN.
|
|
31
44
|
Mixing phases invalidates the cycle.
|
|
32
45
|
|
|
46
|
+
## Verifiable phase gates
|
|
47
|
+
|
|
48
|
+
RED → GREEN and GREEN → REFACTOR are enforced by `tddCycleStateMachine` in
|
|
49
|
+
`domain/loop`. Evidence must be captured with `captureTddSuiteEvidence` (verification
|
|
50
|
+
runner) — do not hand-edit JSON under `.codeconductor/evidence/`.
|
|
51
|
+
|
|
52
|
+
- RED→GREEN requires runner evidence that the suite **failed**.
|
|
53
|
+
- GREEN→REFACTOR requires runner evidence that the suite **passed**.
|
|
54
|
+
|
|
55
|
+
Do not advance phases until that evidence exists.
|
|
56
|
+
|
|
33
57
|
---
|
|
34
58
|
|
|
35
59
|
## Phase 1 — RED (Tester role)
|
|
@@ -20,6 +20,18 @@ proceeding.
|
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
+
## Step 0 — CCEP Bootstrap
|
|
24
|
+
|
|
25
|
+
Command: `test-plan` (fixed for this workflow — do not infer from user text)
|
|
26
|
+
|
|
27
|
+
1. Run: `npx cc-codeconductor ccep parse --command test-plan "$ARGUMENTS" --output json`
|
|
28
|
+
2. Run: `npx cc-codeconductor ccep resolve --command test-plan "$ARGUMENTS" --output json`
|
|
29
|
+
3. Run: `npx cc-codeconductor ccep profile test-plan --output json`
|
|
30
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command test-plan --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
31
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
23
35
|
## Step 1 — Scope confirmation
|
|
24
36
|
|
|
25
37
|
Before generating the test plan, confirm the scope is well-defined.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
[cc: alias] Classify a request into type, risk, and the destination CodeConductor command.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Triage Workflow
|
|
7
|
+
|
|
8
|
+
Triage request: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
## Step 0 — CCEP Bootstrap
|
|
11
|
+
|
|
12
|
+
Command: `triage` (fixed for this workflow — do not infer from user text)
|
|
13
|
+
|
|
14
|
+
1. Run: `npx cc-codeconductor ccep parse --command triage "$ARGUMENTS" --output json`
|
|
15
|
+
2. Run: `npx cc-codeconductor ccep resolve --command triage "$ARGUMENTS" --output json`
|
|
16
|
+
3. Run: `npx cc-codeconductor ccep profile triage --output json`
|
|
17
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command triage --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
18
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Step 1 — Classify (task-coach)
|
|
23
|
+
|
|
24
|
+
Invoke `task-coach`. Produce: title, type (`feature` | `fix` | `refactor` | `review` | `docs` | `test`), risk, named scope, and the destination command (`feature`, `fix`, `refactor`, `review`, `explore`, …).
|
|
25
|
+
|
|
26
|
+
Ask one question per unresolved branch. If the human is unavailable, emit a Markdown questionnaire and stop at ConfirmationGate.
|
|
27
|
+
|
|
28
|
+
**STOP here. Show the classification and wait for confirmation before running the destination workflow.**
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Completion
|
|
33
|
+
|
|
34
|
+
Do not implement. Hand the human a destination slash command and a partial Task Card.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Pre-commit Gate: Typecheck and Test
|
|
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.
|
|
4
|
+
|
|
5
|
+
## Cuándo usar
|
|
6
|
+
|
|
7
|
+
**Para agentes**: Integra este gate en flujos de desarrollo local cuando quieras garantizar que los cambios typecheck correctamente y pasan los tests antes de ser cometidos.
|
|
8
|
+
|
|
9
|
+
**Para equipos**: Utiliza este gate como barrera de calidad local (sin dependencias externas) para prevenir commits con errores de tipado o tests fallidos.
|
|
10
|
+
|
|
11
|
+
## Instalación
|
|
12
|
+
|
|
13
|
+
### Paso 1: Descarga el script
|
|
14
|
+
|
|
15
|
+
El script está embebido abajo (sección "Script Installer").
|
|
16
|
+
|
|
17
|
+
### Paso 2: Ejecuta en la raíz de tu proyecto
|
|
18
|
+
|
|
19
|
+
Desde la raíz del repositorio (o cualquier subdirectorio), extrae el bloque ```bash de este archivo y ejecuta:
|
|
20
|
+
|
|
21
|
+
bash << 'SCRIPT_EOF'
|
|
22
|
+
#!/bin/bash
|
|
23
|
+
set -e
|
|
24
|
+
# [contenido del bloque bash de abajo]
|
|
25
|
+
SCRIPT_EOF
|
|
26
|
+
|
|
27
|
+
O, más simplemente, guarda el script en un archivo temporal y ejecútalo:
|
|
28
|
+
|
|
29
|
+
curl -s https://raw.githubusercontent.com/.../ | bash
|
|
30
|
+
|
|
31
|
+
### Paso 3: Verifica
|
|
32
|
+
|
|
33
|
+
Después de la instalación, debería verse:
|
|
34
|
+
|
|
35
|
+
Pre-commit hook installed successfully.
|
|
36
|
+
|
|
37
|
+
## Script Installer
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
#!/bin/bash
|
|
41
|
+
set -e
|
|
42
|
+
|
|
43
|
+
# Resolver git directory dinámicamente (worktree-safe)
|
|
44
|
+
GIT_DIR=$(git rev-parse --git-dir)
|
|
45
|
+
HOOK_PATH="$GIT_DIR/hooks/pre-commit"
|
|
46
|
+
|
|
47
|
+
# Detectar Husky o lint-staged en package.json
|
|
48
|
+
if grep -q '"husky"' package.json 2>/dev/null || grep -q '"lint-staged"' package.json 2>/dev/null; then
|
|
49
|
+
echo "Warning: Husky or lint-staged detected in package.json. Installation skipped."
|
|
50
|
+
exit 0
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
# Verificar si un pre-commit hook ya existe
|
|
54
|
+
if [ -f "$HOOK_PATH" ]; then
|
|
55
|
+
echo "Warning: Pre-commit hook already exists at $HOOK_PATH. Not overwriting."
|
|
56
|
+
exit 0
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Crear directorio hooks si no existe
|
|
60
|
+
mkdir -p "$GIT_DIR/hooks"
|
|
61
|
+
|
|
62
|
+
# Escribir el hook pre-commit
|
|
63
|
+
cat > "$HOOK_PATH" << 'HOOK_EOF'
|
|
64
|
+
#!/bin/bash
|
|
65
|
+
bun run typecheck || exit 1
|
|
66
|
+
bun run test || exit 1
|
|
67
|
+
HOOK_EOF
|
|
68
|
+
|
|
69
|
+
# Hacer el hook ejecutable
|
|
70
|
+
chmod +x "$HOOK_PATH"
|
|
71
|
+
|
|
72
|
+
echo "Pre-commit hook installed successfully."
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Notas de implementación
|
|
76
|
+
|
|
77
|
+
- **Sin dependencias externas**: El script no instala Husky, lint-staged, ni ninguna otra herramienta. Solo escribe un archivo shell y configura permisos.
|
|
78
|
+
- **Resolución dinámica de git dir**: Usa `git rev-parse --git-dir` para localizar el directorio correcto, incluso en worktrees.
|
|
79
|
+
- **Detección de conflictos**: Si Husky o lint-staged ya está en `package.json`, el script avisa y no instala para evitar conflictos.
|
|
80
|
+
- **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
|
+
|
|
83
|
+
## Verificación
|
|
84
|
+
|
|
85
|
+
Después de instalar, verifica que el hook está en su lugar.
|
|
86
|
+
|
|
87
|
+
Para verificar, ejecuta:
|
|
88
|
+
|
|
89
|
+
ls -la .git/hooks/pre-commit
|
|
90
|
+
|
|
91
|
+
Debe mostrar algo como:
|
|
92
|
+
|
|
93
|
+
-rwxr-xr-x user group ... .git/hooks/pre-commit
|
|
94
|
+
|
|
95
|
+
Luego, intenta hacer un commit. Si hay errores de tipo o tests fallidos, el commit será bloqueado:
|
|
96
|
+
|
|
97
|
+
git add .
|
|
98
|
+
git commit -m "test"
|
|
99
|
+
# Si typecheck o test falla, verás el error y el commit será abortado.
|
|
100
|
+
|
|
101
|
+
## Troubleshooting
|
|
102
|
+
|
|
103
|
+
### "Warning: Pre-commit hook already exists"
|
|
104
|
+
|
|
105
|
+
Ya hay un hook pre-commit. Revisa su contenido:
|
|
106
|
+
|
|
107
|
+
cat .git/hooks/pre-commit
|
|
108
|
+
|
|
109
|
+
Si quieres reemplazarlo, bórralo y ejecuta el script nuevamente:
|
|
110
|
+
|
|
111
|
+
rm .git/hooks/pre-commit
|
|
112
|
+
bash /path/to/installer
|
|
113
|
+
|
|
114
|
+
### "Warning: Husky or lint-staged detected"
|
|
115
|
+
|
|
116
|
+
Tu proyecto usa Husky o lint-staged. Este gate no se instala para evitar conflictos. Si quieres usar este gate, remove Husky/lint-staged de `package.json` y ejecuta de nuevo.
|
|
117
|
+
|
|
118
|
+
### Hook no se ejecuta al hacer commit
|
|
119
|
+
|
|
120
|
+
Verifica que el hook es ejecutable:
|
|
121
|
+
|
|
122
|
+
chmod +x .git/hooks/pre-commit
|
|
123
|
+
|
|
124
|
+
Verifica que `bun run typecheck` y `bun run test` existen en `package.json`:
|
|
125
|
+
|
|
126
|
+
cat package.json | grep -A 5 '"scripts"'
|
|
127
|
+
|
|
128
|
+
### "command not found: bun"
|
|
129
|
+
|
|
130
|
+
Bun no está instalado o no está en PATH. Instala Bun desde https://bun.sh o configura PATH adecuadamente.
|
|
131
|
+
|
|
132
|
+
## Adicional: Desinstalación
|
|
133
|
+
|
|
134
|
+
Para remover el hook, simplemente bórralo:
|
|
135
|
+
|
|
136
|
+
rm .git/hooks/pre-commit
|
|
@@ -7,6 +7,6 @@ alwaysApply: false
|
|
|
7
7
|
|
|
8
8
|
- Use `/multitask` for independent parallel steps (review + docs).
|
|
9
9
|
- Invoke subagents via Task tool: `orchestrator`, `architect`, `implementer`, `tester`, `reviewer`, `security-reviewer`, `complexity-auditor`, `docs`, `task-coach`, `repo-explorer`.
|
|
10
|
-
- High-risk routes: `architect` → `
|
|
10
|
+
- High-risk routes: `architect` → `tester` → `implementer` → `security-reviewer` → `reviewer`.
|
|
11
11
|
- Run `repo-explorer` as background subagent for codebase mapping.
|
|
12
12
|
- See `.cursor/agents/orchestrator.md` for full routing table.
|
|
@@ -4,6 +4,7 @@ description:
|
|
|
4
4
|
Designs the technical approach for a task — produces ADRs, module boundaries,
|
|
5
5
|
and API contracts — so the Implementer has a reviewed plan before touching
|
|
6
6
|
code.
|
|
7
|
+
effort: high
|
|
7
8
|
mode: subagent
|
|
8
9
|
model: "{{MODEL}}"
|
|
9
10
|
temperature: 0.1
|
|
@@ -21,7 +22,7 @@ permission:
|
|
|
21
22
|
websearch: deny
|
|
22
23
|
skill: ask
|
|
23
24
|
---
|
|
24
|
-
# Agent Contract — architect
|
|
25
|
+
# Agent Contract — architect v1.0.0
|
|
25
26
|
|
|
26
27
|
## Role
|
|
27
28
|
|
|
@@ -216,6 +217,26 @@ strategy and why]
|
|
|
216
217
|
|
|
217
218
|
---
|
|
218
219
|
|
|
220
|
+
## CCEP-1 structured output
|
|
221
|
+
|
|
222
|
+
When invoked via the CodeConductor Execution Protocol (`design` phase), return
|
|
223
|
+
**valid JSON only** matching `technical-plan` — the Markdown plan above is the
|
|
224
|
+
human-facing form; under CCEP-1 the same design is serialized to the schema:
|
|
225
|
+
|
|
226
|
+
```json
|
|
227
|
+
{ "approach": "", "filesAffected": [], "risks": [] }
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Rules under CCEP-1:
|
|
231
|
+
|
|
232
|
+
- `filesAffected` is the minimal-diff contract — nothing outside it may be
|
|
233
|
+
touched during implementation without a plan revision.
|
|
234
|
+
- If a decision requires human input, do not resolve it silently; surface it so
|
|
235
|
+
the approval gate stops before implementation.
|
|
236
|
+
- Never return free-form prose as the final answer in CCEP-1 mode.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
219
240
|
## Hard rules
|
|
220
241
|
|
|
221
242
|
- Never write implementation code (no functions, no classes, no methods).
|
|
@@ -4,6 +4,7 @@ description:
|
|
|
4
4
|
Analyzes code for bloat, unnecessary abstractions, and non-native solutions —
|
|
5
5
|
produces a Complexity Audit Report with LOC deltas, dependency changes,
|
|
6
6
|
cyclomatic complexity metrics, and bloat pattern findings.
|
|
7
|
+
effort: medium
|
|
7
8
|
mode: subagent
|
|
8
9
|
model: "{{MODEL}}"
|
|
9
10
|
temperature: 0.1
|
|
@@ -19,7 +20,7 @@ permission:
|
|
|
19
20
|
websearch: deny
|
|
20
21
|
skill: deny
|
|
21
22
|
---
|
|
22
|
-
# Agent Contract — complexity-auditor
|
|
23
|
+
# Agent Contract — complexity-auditor v1.0.0
|
|
23
24
|
|
|
24
25
|
You are the Complexity Auditor — the code quality gate in the CodeConductor
|
|
25
26
|
framework. You analyze diffs for bloat, unnecessary abstractions, and non-native
|
|
@@ -80,6 +81,20 @@ _(none)_ if no bloat patterns detected
|
|
|
80
81
|
- Findings: [count]
|
|
81
82
|
```
|
|
82
83
|
|
|
84
|
+
## CCEP-1 structured output
|
|
85
|
+
|
|
86
|
+
When invoked via the CodeConductor Execution Protocol (`audit` phase in the
|
|
87
|
+
`refactor` workflow), return **valid JSON only** matching `agent-output` and
|
|
88
|
+
serialize the audit into `artifacts`:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{ "status": "success", "artifacts": [{ "type": "complexity-audit", "path": "" }], "next_actions": [] }
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Feed the metrics into the scorecard `cc-gain` criterion. Every finding must
|
|
95
|
+
carry its `delete` / `replace-native` action — a finding without an action is
|
|
96
|
+
not valid CCEP-1 output.
|
|
97
|
+
|
|
83
98
|
## What You Never Do
|
|
84
99
|
|
|
85
100
|
- Edit any file — source, test, documentation, or configuration
|
|
@@ -3,6 +3,7 @@ name: contract-builder
|
|
|
3
3
|
description:
|
|
4
4
|
Defines API contracts, data shapes, and behavior specs before implementation —
|
|
5
5
|
OpenAPI, JSON Schema, or TypeScript interfaces as source of truth.
|
|
6
|
+
effort: high
|
|
6
7
|
mode: subagent
|
|
7
8
|
model: "{{MODEL}}"
|
|
8
9
|
temperature: 0.1
|
|
@@ -24,7 +25,7 @@ permission:
|
|
|
24
25
|
websearch: deny
|
|
25
26
|
skill: ask
|
|
26
27
|
---
|
|
27
|
-
# Agent Contract — contract-builder
|
|
28
|
+
# Agent Contract — contract-builder v1.0.0
|
|
28
29
|
|
|
29
30
|
## Role
|
|
30
31
|
|
|
@@ -85,6 +86,21 @@ Produce one or more of:
|
|
|
85
86
|
|
|
86
87
|
---
|
|
87
88
|
|
|
89
|
+
## CCEP-1 structured output
|
|
90
|
+
|
|
91
|
+
When invoked via the CodeConductor Execution Protocol (`api-contract` phase),
|
|
92
|
+
return **valid JSON only** matching `agent-output` and serialize the contract
|
|
93
|
+
spec into `artifacts`:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{ "status": "success", "artifacts": [{ "type": "api-contract", "path": "openapi.yaml" }], "next_actions": [] }
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If contracts are ambiguous, set `status` to `needs_clarification` (or return the
|
|
100
|
+
question in `next_actions`) rather than inventing shapes.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
88
104
|
## Hard rules
|
|
89
105
|
|
|
90
106
|
- Never modify production source files outside docs and spec paths.
|