cc-codeconductor 0.5.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.
- package/README.md +387 -150
- package/dist/cli/errors.d.ts +65 -0
- package/dist/core/compilation/compile-checker.d.ts +53 -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 +82 -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 +24165 -15800
- package/dist/library.js +2744 -0
- package/dist/utils/result.d.ts +36 -0
- package/dist/validation/schemas.d.ts +4006 -0
- package/package.json +18 -2
- package/policy.yml +12 -11
- package/presets/agy/AGENTS.md +14 -5
- package/presets/agy/gates/pre-commit/GATE.md +137 -0
- package/presets/agy/skills/backlog/SKILL.md +91 -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/skills/openspec/SKILL.md +5 -1
- package/presets/agy/skills/security-ai-llm/SKILL.md +43 -0
- package/presets/agy/skills/security-blue-team/SKILL.md +43 -0
- package/presets/agy/skills/security-cloud/SKILL.md +43 -0
- package/presets/agy/skills/security-crypto/SKILL.md +43 -0
- package/presets/agy/skills/security-exploit-dev/SKILL.md +45 -0
- package/presets/agy/skills/security-grc/SKILL.md +43 -0
- package/presets/agy/skills/security-incident-response/SKILL.md +45 -0
- package/presets/agy/skills/security-log-analysis/SKILL.md +43 -0
- package/presets/agy/skills/security-malware-analysis/SKILL.md +44 -0
- package/presets/agy/skills/security-mobile/SKILL.md +43 -0
- package/presets/agy/skills/security-network/SKILL.md +43 -0
- package/presets/agy/skills/security-ot-ics/SKILL.md +43 -0
- package/presets/agy/skills/security-recon/SKILL.md +45 -0
- package/presets/agy/skills/security-red-team/SKILL.md +44 -0
- package/presets/agy/skills/security-reverse-engineering/SKILL.md +44 -0
- package/presets/agy/skills/security-soc-automation/SKILL.md +43 -0
- package/presets/agy/skills/security-threat-hunting/SKILL.md +43 -0
- package/presets/agy/skills/security-vuln-assessment/SKILL.md +45 -0
- package/presets/agy/skills/security-web/SKILL.md +44 -0
- package/presets/agy/workflows/cc-api-contract.md +12 -0
- package/presets/agy/workflows/cc-ask.md +56 -0
- package/presets/agy/workflows/cc-backlog.md +69 -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 +16 -1
- 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-security.md +180 -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 +68 -0
- package/presets/claude/commands/cc/api-contract.md +12 -0
- package/presets/claude/commands/cc/ask.md +56 -0
- package/presets/claude/commands/cc/backlog.md +104 -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 +41 -1
- 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/security.md +179 -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 +137 -0
- package/presets/claude/settings.json +8 -46
- package/presets/claude/skills/backlog/SKILL.md +91 -0
- package/presets/claude/skills/openspec/SKILL.md +5 -1
- package/presets/claude/skills/security/SKILL.md +382 -0
- package/presets/claude/skills/security-ai-llm/SKILL.md +43 -0
- package/presets/claude/skills/security-blue-team/SKILL.md +43 -0
- package/presets/claude/skills/security-cloud/SKILL.md +43 -0
- package/presets/claude/skills/security-crypto/SKILL.md +43 -0
- package/presets/claude/skills/security-exploit-dev/SKILL.md +45 -0
- package/presets/claude/skills/security-grc/SKILL.md +43 -0
- package/presets/claude/skills/security-incident-response/SKILL.md +45 -0
- package/presets/claude/skills/security-log-analysis/SKILL.md +43 -0
- package/presets/claude/skills/security-malware-analysis/SKILL.md +44 -0
- package/presets/claude/skills/security-mobile/SKILL.md +43 -0
- package/presets/claude/skills/security-network/SKILL.md +43 -0
- package/presets/claude/skills/security-ot-ics/SKILL.md +43 -0
- package/presets/claude/skills/security-recon/SKILL.md +45 -0
- package/presets/claude/skills/security-red-team/SKILL.md +44 -0
- package/presets/claude/skills/security-reverse-engineering/SKILL.md +44 -0
- package/presets/claude/skills/security-soc-automation/SKILL.md +43 -0
- package/presets/claude/skills/security-threat-hunting/SKILL.md +43 -0
- package/presets/claude/skills/security-vuln-assessment/SKILL.md +45 -0
- package/presets/claude/skills/security-web/SKILL.md +44 -0
- package/presets/codex/AGENTS.md +6 -6
- package/presets/codex/commands/cc-ask.md +56 -0
- package/presets/codex/gates/pre-commit/GATE.md +137 -0
- package/presets/cursor/AGENTS.md +8 -8
- 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 +56 -0
- package/presets/cursor/commands/cc/backlog.md +105 -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 +38 -8
- 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/security.md +179 -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 +137 -0
- package/presets/cursor/rules/orchestration.mdc +1 -1
- package/presets/cursor/skills/backlog/SKILL.md +91 -0
- package/presets/cursor/skills/openspec/SKILL.md +5 -1
- package/presets/cursor/skills/security-ai-llm/SKILL.md +43 -0
- package/presets/cursor/skills/security-blue-team/SKILL.md +43 -0
- package/presets/cursor/skills/security-cloud/SKILL.md +43 -0
- package/presets/cursor/skills/security-crypto/SKILL.md +43 -0
- package/presets/cursor/skills/security-exploit-dev/SKILL.md +45 -0
- package/presets/cursor/skills/security-grc/SKILL.md +43 -0
- package/presets/cursor/skills/security-incident-response/SKILL.md +45 -0
- package/presets/cursor/skills/security-log-analysis/SKILL.md +43 -0
- package/presets/cursor/skills/security-malware-analysis/SKILL.md +44 -0
- package/presets/cursor/skills/security-mobile/SKILL.md +43 -0
- package/presets/cursor/skills/security-network/SKILL.md +43 -0
- package/presets/cursor/skills/security-ot-ics/SKILL.md +43 -0
- package/presets/cursor/skills/security-recon/SKILL.md +45 -0
- package/presets/cursor/skills/security-red-team/SKILL.md +44 -0
- package/presets/cursor/skills/security-reverse-engineering/SKILL.md +44 -0
- package/presets/cursor/skills/security-soc-automation/SKILL.md +43 -0
- package/presets/cursor/skills/security-threat-hunting/SKILL.md +43 -0
- package/presets/cursor/skills/security-vuln-assessment/SKILL.md +45 -0
- package/presets/cursor/skills/security-web/SKILL.md +44 -0
- 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 +56 -0
- package/presets/opencode/commands/cc-backlog.md +68 -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 +16 -1
- 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-security.md +179 -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 +137 -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/opencode/skills/backlog/SKILL.md +91 -0
- package/presets/opencode/skills/openspec/SKILL.md +5 -1
- package/presets/opencode/skills/security-ai-llm/SKILL.md +43 -0
- package/presets/opencode/skills/security-blue-team/SKILL.md +43 -0
- package/presets/opencode/skills/security-cloud/SKILL.md +43 -0
- package/presets/opencode/skills/security-crypto/SKILL.md +43 -0
- package/presets/opencode/skills/security-exploit-dev/SKILL.md +45 -0
- package/presets/opencode/skills/security-grc/SKILL.md +43 -0
- package/presets/opencode/skills/security-incident-response/SKILL.md +45 -0
- package/presets/opencode/skills/security-log-analysis/SKILL.md +43 -0
- package/presets/opencode/skills/security-malware-analysis/SKILL.md +44 -0
- package/presets/opencode/skills/security-mobile/SKILL.md +43 -0
- package/presets/opencode/skills/security-network/SKILL.md +43 -0
- package/presets/opencode/skills/security-ot-ics/SKILL.md +43 -0
- package/presets/opencode/skills/security-recon/SKILL.md +45 -0
- package/presets/opencode/skills/security-red-team/SKILL.md +44 -0
- package/presets/opencode/skills/security-reverse-engineering/SKILL.md +44 -0
- package/presets/opencode/skills/security-soc-automation/SKILL.md +43 -0
- package/presets/opencode/skills/security-threat-hunting/SKILL.md +43 -0
- package/presets/opencode/skills/security-vuln-assessment/SKILL.md +45 -0
- package/presets/opencode/skills/security-web/SKILL.md +44 -0
- package/presets/seo-hotel/settings.json +0 -17
- package/src/presets/council/council.yml +12 -0
- 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,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >
|
|
3
|
+
Run the authorized defensive security workflow — domain security-* skills,
|
|
4
|
+
authorization gate, risk-based routing, hardening, and review.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Defensive Security Workflow
|
|
8
|
+
|
|
9
|
+
Security objective: $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
Provide the following information in $ARGUMENTS:
|
|
12
|
+
|
|
13
|
+
- What must be reviewed or hardened, and why
|
|
14
|
+
- Domain: a `security-*` skill id (recon, vuln-assessment, web, cloud, IR,
|
|
15
|
+
hunting, GRC, …) or `web-app` / `api` / `cloud-config` /
|
|
16
|
+
`dependency-supply-chain` / `secrets`
|
|
17
|
+
- Authorization: who authorized this work on this target, and the scope boundary
|
|
18
|
+
- Risk classification (`low`, `medium`, or `high`), if known
|
|
19
|
+
- Scope: which files, modules, repos, or environments are in and out of bounds
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Scope and authorization
|
|
24
|
+
|
|
25
|
+
This workflow performs **authorized defensive security work only**: threat
|
|
26
|
+
modeling, hardening, secure configuration, dependency and supply-chain review,
|
|
27
|
+
secret hygiene, and detection coverage.
|
|
28
|
+
|
|
29
|
+
Refuse outright and offer the defensive equivalent instead (threat model,
|
|
30
|
+
hardening, detection coverage, dependency audit):
|
|
31
|
+
|
|
32
|
+
- Exploit or proof-of-concept development
|
|
33
|
+
- Malware authoring, or malware analysis intended for reuse
|
|
34
|
+
- Reverse engineering aimed at bypassing a control
|
|
35
|
+
- Red-team playbooks
|
|
36
|
+
- Any unauthorized-access procedure
|
|
37
|
+
|
|
38
|
+
Scope is limited to the repository under analysis. Do not scan, probe, or
|
|
39
|
+
perform reconnaissance against third-party hosts.
|
|
40
|
+
|
|
41
|
+
Do not proceed without an authorization statement. Do not produce exploit
|
|
42
|
+
payloads, malware, or attack procedures.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Step 0 — CCEP Bootstrap
|
|
47
|
+
|
|
48
|
+
Command: `security` (fixed for this workflow — do not infer from user text)
|
|
49
|
+
|
|
50
|
+
1. Run: `npx cc-codeconductor ccep parse --command security "$ARGUMENTS" --output json`
|
|
51
|
+
2. Run: `npx cc-codeconductor ccep resolve --command security "$ARGUMENTS" --output json`
|
|
52
|
+
3. Run: `npx cc-codeconductor ccep profile security --output json`
|
|
53
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command security --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
54
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
55
|
+
Canonical delivery order is test-before-implement whenever both phases apply.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Step 1 — Wayfinding (repo-explorer)
|
|
60
|
+
|
|
61
|
+
If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
|
|
62
|
+
`graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
|
|
63
|
+
to map modules, conventions, and impact radius. Do not write code in this step.
|
|
64
|
+
Record a Repo Map artifact before intake. Load the matching `security-*` skill
|
|
65
|
+
for the named domain (see `.claude/skills/security-*/SKILL.md`). Keep the OWASP
|
|
66
|
+
`security` skill for application-security reviews.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Step 2 — Task Card validation (task-coach)
|
|
71
|
+
|
|
72
|
+
Invoke `task-coach` with the security objective above.
|
|
73
|
+
|
|
74
|
+
task-coach must produce a Task Card that includes:
|
|
75
|
+
|
|
76
|
+
- Objective: what must be reviewed or hardened, in one sentence
|
|
77
|
+
- Domain: which `security-*` skill applies, or `web-app` / `api` /
|
|
78
|
+
`cloud-config` / `dependency-supply-chain` / `secrets`
|
|
79
|
+
- Authorization: who authorized this work on this target, and the scope boundary
|
|
80
|
+
- Risk classification: `low`, `medium`, or `high`
|
|
81
|
+
- Scope: which files or modules are likely affected
|
|
82
|
+
|
|
83
|
+
If authorization is absent, unclear, or names a system the requester does not
|
|
84
|
+
own or operate, **STOP and refuse. Do not route the task.**
|
|
85
|
+
|
|
86
|
+
Redact secrets, tokens, and credentials from any evidence before it enters the
|
|
87
|
+
Task Card. Summarize logs; do not paste env files.
|
|
88
|
+
|
|
89
|
+
**STOP here. Show the Task Card and wait for human confirmation.**
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Step 3 — Route by risk
|
|
94
|
+
|
|
95
|
+
Read the risk field from the Task Card and follow the corresponding route.
|
|
96
|
+
|
|
97
|
+
### Low-risk route
|
|
98
|
+
|
|
99
|
+
Applies when: the weakness is isolated, not exploitable in the current
|
|
100
|
+
configuration, and no authentication, secret, or dependency boundary is
|
|
101
|
+
involved.
|
|
102
|
+
|
|
103
|
+
Route: `task-coach` → `tester` → `implementer`
|
|
104
|
+
|
|
105
|
+
Proceed directly to Step 4 (tests), then Step 5a.
|
|
106
|
+
|
|
107
|
+
### Medium or high-risk route
|
|
108
|
+
|
|
109
|
+
Applies when: the work touches authentication, authorization, secrets,
|
|
110
|
+
cryptography, trust-boundary input validation, or a dependency upgrade.
|
|
111
|
+
|
|
112
|
+
Route: `task-coach` → `architect` → `tester` → `implementer` → `reviewer`
|
|
113
|
+
|
|
114
|
+
Invoke `architect` before implementation. architect must:
|
|
115
|
+
|
|
116
|
+
- Identify the weakness and the affected trust boundary
|
|
117
|
+
- Define the hardening approach and affected files
|
|
118
|
+
- Flag any regression risk to adjacent components
|
|
119
|
+
- Produce a Technical Plan
|
|
120
|
+
|
|
121
|
+
On **high** risk, also invoke `security-reviewer` before Reviewer.
|
|
122
|
+
|
|
123
|
+
**STOP here if high-risk. Show the Technical Plan and wait for human approval
|
|
124
|
+
before continuing.**
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Step 4 — Tests (tester)
|
|
129
|
+
|
|
130
|
+
Invoke `tester` for all risk levels.
|
|
131
|
+
|
|
132
|
+
tester must:
|
|
133
|
+
|
|
134
|
+
1. Write a regression test that proves the weakness exists and confirm it fails
|
|
135
|
+
before any change (RED)
|
|
136
|
+
2. Verify that existing tests still pass
|
|
137
|
+
3. Produce a Coverage Summary: test added, case covered
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Step 5a — Implementation, low-risk (implementer)
|
|
142
|
+
|
|
143
|
+
Invoke `implementer` with the Task Card.
|
|
144
|
+
Implementer creates a Git Worktree before touching any file; all edits happen inside it.
|
|
145
|
+
|
|
146
|
+
implementer must:
|
|
147
|
+
|
|
148
|
+
1. Apply the minimal hardening change — no unrelated changes
|
|
149
|
+
2. Run the suite and make the RED regression test pass
|
|
150
|
+
3. Produce an Implementation Summary: weakness, change applied, files changed
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Step 5b — Implementation, medium/high-risk (implementer)
|
|
155
|
+
|
|
156
|
+
Invoke `implementer` with the approved Technical Plan and the Task Card.
|
|
157
|
+
Implementer creates a Git Worktree before touching any file; all edits happen inside it.
|
|
158
|
+
|
|
159
|
+
implementer must follow the plan exactly. Any deviation requires a new Technical
|
|
160
|
+
Plan approval. After implementation, run the full test suite. No exploit code.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Step 6 — Review (Reviewer role) — medium/high-risk only
|
|
165
|
+
|
|
166
|
+
Invoke `reviewer` with the diff and Task Card. The Reviewer must apply the OWASP
|
|
167
|
+
rules in the `security` skill.
|
|
168
|
+
|
|
169
|
+
reviewer produces a Review Report with CRITICAL / WARNING / SUGGESTION findings.
|
|
170
|
+
If any CRITICAL findings exist, **STOP**. Do not close the task until they are
|
|
171
|
+
resolved.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Completion
|
|
176
|
+
|
|
177
|
+
Report: Task Card, Implementation Summary, regression test added, Review Report
|
|
178
|
+
(if applicable). The task is complete only when: the regression test passes, the
|
|
179
|
+
full suite passes, and no CRITICAL review findings remain.
|
|
@@ -17,6 +17,19 @@ Describe what behavior you want to implement. Include:
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
+
## Step 0 — CCEP Bootstrap
|
|
21
|
+
|
|
22
|
+
Command: `tdd-cycle` (fixed for this workflow — do not infer from user text)
|
|
23
|
+
|
|
24
|
+
1. Run: `npx cc-codeconductor ccep parse --command tdd-cycle "$ARGUMENTS" --output json`
|
|
25
|
+
2. Run: `npx cc-codeconductor ccep resolve --command tdd-cycle "$ARGUMENTS" --output json`
|
|
26
|
+
3. Run: `npx cc-codeconductor ccep profile tdd-cycle --output json`
|
|
27
|
+
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.
|
|
28
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
29
|
+
Canonical delivery order is test-before-implement whenever both phases apply.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
20
33
|
## Before you begin — mandatory pre-check
|
|
21
34
|
|
|
22
35
|
This command enforces strict TDD discipline. The three phases are sequential and
|
|
@@ -29,6 +42,17 @@ non-negotiable:
|
|
|
29
42
|
Do not write implementation code during RED. Do not refactor during GREEN.
|
|
30
43
|
Mixing phases invalidates the cycle.
|
|
31
44
|
|
|
45
|
+
## Verifiable phase gates
|
|
46
|
+
|
|
47
|
+
RED → GREEN and GREEN → REFACTOR are enforced by `tddCycleStateMachine` in
|
|
48
|
+
`domain/loop`. Evidence must be captured with `captureTddSuiteEvidence` (verification
|
|
49
|
+
runner) — do not hand-edit JSON under `.codeconductor/evidence/`.
|
|
50
|
+
|
|
51
|
+
- RED→GREEN requires runner evidence that the suite **failed**.
|
|
52
|
+
- GREEN→REFACTOR requires runner evidence that the suite **passed**.
|
|
53
|
+
|
|
54
|
+
Do not advance phases until that evidence exists.
|
|
55
|
+
|
|
32
56
|
---
|
|
33
57
|
|
|
34
58
|
## Phase 1 — RED (Tester role)
|
|
@@ -20,6 +20,18 @@ If $ARGUMENTS is empty, describe the scope in your next message before invoking
|
|
|
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 invoking `tester`, confirm the scope is well-defined.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Classify a request into type, risk, and the destination CodeConductor command.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Triage Workflow
|
|
6
|
+
|
|
7
|
+
Triage request: $ARGUMENTS
|
|
8
|
+
|
|
9
|
+
## Step 0 — CCEP Bootstrap
|
|
10
|
+
|
|
11
|
+
Command: `triage` (fixed for this workflow — do not infer from user text)
|
|
12
|
+
|
|
13
|
+
1. Run: `npx cc-codeconductor ccep parse --command triage "$ARGUMENTS" --output json`
|
|
14
|
+
2. Run: `npx cc-codeconductor ccep resolve --command triage "$ARGUMENTS" --output json`
|
|
15
|
+
3. Run: `npx cc-codeconductor ccep profile triage --output json`
|
|
16
|
+
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.
|
|
17
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Step 1 — Classify (task-coach)
|
|
22
|
+
|
|
23
|
+
Invoke `task-coach`. Produce: title, type (`feature` | `fix` | `refactor` | `review` | `docs` | `test`), risk, named scope, and the destination command (`feature`, `fix`, `refactor`, `review`, `explore`, …).
|
|
24
|
+
|
|
25
|
+
Ask one question per unresolved branch. If the human is unavailable, emit a Markdown questionnaire and stop at ConfirmationGate.
|
|
26
|
+
|
|
27
|
+
**STOP here. Show the classification and wait for confirmation before running the destination workflow.**
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Completion
|
|
32
|
+
|
|
33
|
+
Do not implement. Hand the human a destination slash command and a partial Task Card.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Pre-commit Gate: Typecheck, Lint, and Test
|
|
2
|
+
|
|
3
|
+
Este gate instala un hook `pre-commit` que ejecuta `bun run typecheck`, `bun run lint` y `bun run test` antes de permitir commits en el repositorio. Si cualquiera de estos comandos falla, el commit es bloqueado.
|
|
4
|
+
|
|
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 lint || exit 1
|
|
67
|
+
bun run test || exit 1
|
|
68
|
+
HOOK_EOF
|
|
69
|
+
|
|
70
|
+
# Hacer el hook ejecutable
|
|
71
|
+
chmod +x "$HOOK_PATH"
|
|
72
|
+
|
|
73
|
+
echo "Pre-commit hook installed successfully."
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Notas de implementación
|
|
77
|
+
|
|
78
|
+
- **Sin dependencias externas**: El script no instala Husky, lint-staged, ni ninguna otra herramienta. Solo escribe un archivo shell y configura permisos.
|
|
79
|
+
- **Resolución dinámica de git dir**: Usa `git rev-parse --git-dir` para localizar el directorio correcto, incluso en worktrees.
|
|
80
|
+
- **Detección de conflictos**: Si Husky o lint-staged ya está en `package.json`, el script avisa y no instala para evitar conflictos.
|
|
81
|
+
- **Protección de hooks existentes**: Si ya existe un `.git/hooks/pre-commit`, el script no lo sobrescribe.
|
|
82
|
+
- **Solo Bun**: El hook ejecuta `bun run typecheck`, `bun run lint` y `bun run test`. Asegúrate de que estos scripts están definidos en `package.json`.
|
|
83
|
+
|
|
84
|
+
## Verificación
|
|
85
|
+
|
|
86
|
+
Después de instalar, verifica que el hook está en su lugar.
|
|
87
|
+
|
|
88
|
+
Para verificar, ejecuta:
|
|
89
|
+
|
|
90
|
+
ls -la .git/hooks/pre-commit
|
|
91
|
+
|
|
92
|
+
Debe mostrar algo como:
|
|
93
|
+
|
|
94
|
+
-rwxr-xr-x user group ... .git/hooks/pre-commit
|
|
95
|
+
|
|
96
|
+
Luego, intenta hacer un commit. Si hay errores de tipo o tests fallidos, el commit será bloqueado:
|
|
97
|
+
|
|
98
|
+
git add .
|
|
99
|
+
git commit -m "test"
|
|
100
|
+
# Si typecheck o test falla, verás el error y el commit será abortado.
|
|
101
|
+
|
|
102
|
+
## Troubleshooting
|
|
103
|
+
|
|
104
|
+
### "Warning: Pre-commit hook already exists"
|
|
105
|
+
|
|
106
|
+
Ya hay un hook pre-commit. Revisa su contenido:
|
|
107
|
+
|
|
108
|
+
cat .git/hooks/pre-commit
|
|
109
|
+
|
|
110
|
+
Si quieres reemplazarlo, bórralo y ejecuta el script nuevamente:
|
|
111
|
+
|
|
112
|
+
rm .git/hooks/pre-commit
|
|
113
|
+
bash /path/to/installer
|
|
114
|
+
|
|
115
|
+
### "Warning: Husky or lint-staged detected"
|
|
116
|
+
|
|
117
|
+
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.
|
|
118
|
+
|
|
119
|
+
### Hook no se ejecuta al hacer commit
|
|
120
|
+
|
|
121
|
+
Verifica que el hook es ejecutable:
|
|
122
|
+
|
|
123
|
+
chmod +x .git/hooks/pre-commit
|
|
124
|
+
|
|
125
|
+
Verifica que `bun run typecheck`, `bun run lint` y `bun run test` existen en `package.json`:
|
|
126
|
+
|
|
127
|
+
cat package.json | grep -A 5 '"scripts"'
|
|
128
|
+
|
|
129
|
+
### "command not found: bun"
|
|
130
|
+
|
|
131
|
+
Bun no está instalado o no está en PATH. Instala Bun desde https://bun.sh o configura PATH adecuadamente.
|
|
132
|
+
|
|
133
|
+
## Adicional: Desinstalación
|
|
134
|
+
|
|
135
|
+
Para remover el hook, simplemente bórralo:
|
|
136
|
+
|
|
137
|
+
rm .git/hooks/pre-commit
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPRECATED — v0.1.0
|
|
2
|
+
|
|
3
|
+
**Status:** deprecated. Superseded by `v1.0.0`.
|
|
4
|
+
|
|
5
|
+
These Agent Contracts are kept for reproducibility only. Projects that pinned
|
|
6
|
+
`contract_version: 0.1.0` can still reinstall from this directory, but new work
|
|
7
|
+
must not adopt this version.
|
|
8
|
+
|
|
9
|
+
- Do not edit these files — contracts are append-only.
|
|
10
|
+
- Use `prompts/v1.0.0/` for all new installs.
|
|
11
|
+
- See `docs/prompt-versioning.md` for the full version table.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPRECATED — v0.2.0
|
|
2
|
+
|
|
3
|
+
**Status:** deprecated. Superseded by `v1.0.0`.
|
|
4
|
+
|
|
5
|
+
These Agent Contracts are kept for reproducibility only. Projects that pinned
|
|
6
|
+
`contract_version: 0.2.0` can still reinstall from this directory, but new work
|
|
7
|
+
must not adopt this version.
|
|
8
|
+
|
|
9
|
+
- Do not edit these files — contracts are append-only.
|
|
10
|
+
- Use `prompts/v1.0.0/` for all new installs.
|
|
11
|
+
- See `docs/prompt-versioning.md` for the full version table.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPRECATED — v0.3.0
|
|
2
|
+
|
|
3
|
+
**Status:** deprecated. Superseded by `v1.0.0`.
|
|
4
|
+
|
|
5
|
+
These Agent Contracts are kept for reproducibility only. Projects that pinned
|
|
6
|
+
`contract_version: 0.3.0` can still reinstall from this directory, but new work
|
|
7
|
+
must not adopt this version.
|
|
8
|
+
|
|
9
|
+
- Do not edit these files — contracts are append-only.
|
|
10
|
+
- Use `prompts/v1.0.0/` for all new installs.
|
|
11
|
+
- See `docs/prompt-versioning.md` for the full version table.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPRECATED — v0.4.0
|
|
2
|
+
|
|
3
|
+
**Status:** deprecated. Superseded by `v1.0.0`.
|
|
4
|
+
|
|
5
|
+
These Agent Contracts are kept for reproducibility only. Projects that pinned
|
|
6
|
+
`contract_version: 0.4.0` can still reinstall from this directory, but new work
|
|
7
|
+
must not adopt this version.
|
|
8
|
+
|
|
9
|
+
- Do not edit these files — contracts are append-only.
|
|
10
|
+
- Use `prompts/v1.0.0/` for all new installs.
|
|
11
|
+
- See `docs/prompt-versioning.md` for the full version table.
|
|
@@ -45,7 +45,7 @@ Match objective keywords against built-in templates (in order):
|
|
|
45
45
|
| migration, schema, database | migration |
|
|
46
46
|
| (no match) | generic 4-task chain |
|
|
47
47
|
|
|
48
|
-
**Generic fallback chain:** `task-coach` → `architect` → `
|
|
48
|
+
**Generic fallback chain:** `task-coach` → `architect` → `tester` → `implementer`
|
|
49
49
|
|
|
50
50
|
Each task must include: `id`, `title`, `type`, `risk`, `status: pending`,
|
|
51
51
|
`context_scope`, `depends_on`, `acceptance_criteria` (≥ 1 each).
|
|
@@ -106,22 +106,22 @@ regression.
|
|
|
106
106
|
|
|
107
107
|
| Task type | Risk | Route |
|
|
108
108
|
| ------------------ | ----------- | ------------------------------------------------------------------ |
|
|
109
|
-
| New feature | high | `architect` → `
|
|
110
|
-
| New feature | low-medium | `architect` → `
|
|
109
|
+
| New feature | high | `architect` → `tester` → `implementer` → `security-reviewer` → `reviewer` |
|
|
110
|
+
| New feature | low-medium | `architect` → `tester` → `implementer` → `reviewer` |
|
|
111
111
|
| Performance Opt | medium | `task-coach` → `implementer` → `reviewer` |
|
|
112
|
-
| Bug fix | low | `
|
|
113
|
-
| Bug fix | medium–high | `task-coach` → `architect` → `
|
|
112
|
+
| Bug fix | low | `tester` → `implementer` |
|
|
113
|
+
| Bug fix | medium–high | `task-coach` → `architect` → `tester` → `implementer` → `reviewer` |
|
|
114
114
|
| Refactor | low | `architect` → `implementer` |
|
|
115
115
|
| Refactor | medium–high | `architect` → `implementer` → `reviewer` |
|
|
116
116
|
| API change | any | `architect` → `implementer` → `reviewer` |
|
|
117
|
-
| Database migration | any | `architect` → `
|
|
117
|
+
| Database migration | any | `architect` → `tester` → `implementer` → `reviewer` |
|
|
118
118
|
| Test coverage | any | `tester` |
|
|
119
119
|
| Documentation | any | `docs` |
|
|
120
120
|
| Codebase question | any | `repo-explorer` |
|
|
121
121
|
| Code review | any | `reviewer` |
|
|
122
122
|
| Task unclear | any | `task-coach` |
|
|
123
123
|
| Multi-step goal | any | `goal-planner` → [dependency-ordered agents] |
|
|
124
|
-
| DDD→SDD→TDD | any | `contract-builder` → `architect` → `
|
|
124
|
+
| DDD→SDD→TDD | any | `contract-builder` → `architect` → `tester` → `implementer` |
|
|
125
125
|
|
|
126
126
|
---
|
|
127
127
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Implementer
|
|
3
|
+
description: Executes an approved Technical Plan with minimal diff. CCEP-1 structured output.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Contract — implementer v0.6.0
|
|
7
|
+
|
|
8
|
+
## Role
|
|
9
|
+
|
|
10
|
+
You are the Implementer for CodeConductor (CCEP-1). Execute the approved Technical
|
|
11
|
+
Plan and Task Card. Write the minimal diff. Do not invent architecture.
|
|
12
|
+
|
|
13
|
+
## Output contract (mandatory JSON)
|
|
14
|
+
|
|
15
|
+
Respond with **valid JSON only** matching `ImplementerOutputSchema`:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"status": "success",
|
|
20
|
+
"confidence": 0.0,
|
|
21
|
+
"warnings": [],
|
|
22
|
+
"artifacts": [{ "type": "diff", "path": "src/example.ts" }],
|
|
23
|
+
"next_actions": [],
|
|
24
|
+
"filesChanged": [{ "path": "src/example.ts", "summary": "Added validation" }],
|
|
25
|
+
"tests": { "runner": "bun test", "result": "passed" }
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Rules
|
|
30
|
+
|
|
31
|
+
- Read the Technical Plan before editing any file.
|
|
32
|
+
- Touch only files listed in the plan.
|
|
33
|
+
- Run tests before returning output.
|
|
34
|
+
- If blocked, set `status` to `blocked` and list `next_actions`.
|
|
35
|
+
- Never return free-form prose as the final answer.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Planner
|
|
3
|
+
description: Converts product intent into structured CCEP planner output. No code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Contract — planner v0.6.0
|
|
7
|
+
|
|
8
|
+
## Role
|
|
9
|
+
|
|
10
|
+
You are the Planner for CodeConductor (CCEP-1). Convert execution context into a
|
|
11
|
+
structured plan. Do not write code.
|
|
12
|
+
|
|
13
|
+
## Output contract (mandatory JSON)
|
|
14
|
+
|
|
15
|
+
Respond with **valid JSON only** matching `PlannerOutputSchema`:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"status": "success",
|
|
20
|
+
"confidence": 0.0,
|
|
21
|
+
"goal": "",
|
|
22
|
+
"assumptions": [],
|
|
23
|
+
"risks": [],
|
|
24
|
+
"tasks": [],
|
|
25
|
+
"questionsForUser": [],
|
|
26
|
+
"needsConfirmation": true
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Rules
|
|
31
|
+
|
|
32
|
+
- Use only information from the compiled CCEP context.
|
|
33
|
+
- If critical data is missing, set `status` to `needs_clarification` and populate
|
|
34
|
+
`questionsForUser`.
|
|
35
|
+
- Never invent repository context.
|
|
36
|
+
- Separate assumptions, risks, tasks, and confirmation requirements.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Reviewer
|
|
3
|
+
description: Reviews diffs against Task Card and plan. CCEP-1 structured output.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Contract — reviewer v0.6.0
|
|
7
|
+
|
|
8
|
+
## Role
|
|
9
|
+
|
|
10
|
+
You are the Reviewer for CodeConductor (CCEP-1). Verify the implementation against
|
|
11
|
+
the Task Card and Technical Plan. Do not edit code.
|
|
12
|
+
|
|
13
|
+
## Output contract (mandatory JSON)
|
|
14
|
+
|
|
15
|
+
Respond with **valid JSON only** matching `ReviewerOutputSchema`:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"status": "pass",
|
|
20
|
+
"confidence": 0.0,
|
|
21
|
+
"verdict": "approved",
|
|
22
|
+
"warnings": [],
|
|
23
|
+
"findings": [
|
|
24
|
+
{
|
|
25
|
+
"severity": "WARNING",
|
|
26
|
+
"message": "Missing edge-case test",
|
|
27
|
+
"axis": "test_coverage"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"artifacts": [],
|
|
31
|
+
"next_actions": []
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Rules
|
|
36
|
+
|
|
37
|
+
- Any CRITICAL finding → `verdict: "blocked"` and `status: "fail"`.
|
|
38
|
+
- Every finding must include `severity`, `message`, and `axis`.
|
|
39
|
+
- Base review on diff evidence — no speculation.
|
|
40
|
+
- Never return free-form prose as the final answer.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Agent Contracts v1.0.0
|
|
2
|
+
|
|
3
|
+
First stable, distributable contract set. Copied from `v0.5.0` and aligned with
|
|
4
|
+
the CodeConductor Execution Protocol (CCEP-1) and the current workflow profiles.
|
|
5
|
+
|
|
6
|
+
## Contracts
|
|
7
|
+
|
|
8
|
+
| Contract | Role in the workflow |
|
|
9
|
+
| -------- | -------------------- |
|
|
10
|
+
| `orchestrator.md` | Validates Task Cards, selects the route, monitors completion. |
|
|
11
|
+
| `task-coach.md` | Turns vague requests into complete, routable Task Cards (intake). |
|
|
12
|
+
| `planner.md` | CCEP-1 intake role — serializes intent into `planner-output`. |
|
|
13
|
+
| `goal-planner.md` | Turns an objective string into a YAML task graph. |
|
|
14
|
+
| `repo-explorer.md` | Read-only repo map, conventions, impact radius. |
|
|
15
|
+
| `architect.md` | Technical Plan, ADRs, module boundaries. |
|
|
16
|
+
| `contract-builder.md` | API contracts / data shapes before implementation (DDD→SDD→TDD). |
|
|
17
|
+
| `tester.md` | Failing-first tests that verify acceptance criteria. |
|
|
18
|
+
| `implementer.md` | Minimal-diff implementation of the approved plan. |
|
|
19
|
+
| `complexity-auditor.md` | Bloat / dependency / cyclomatic audit (feeds `cc-gain`). |
|
|
20
|
+
| `reviewer.md` | Correctness, scope, security, and architecture review. |
|
|
21
|
+
| `security-reviewer.md` | Dedicated high-risk security review with veto authority. |
|
|
22
|
+
| `docs.md` | README / OpenAPI / ADR / CHANGELOG sync. |
|
|
23
|
+
| `devil.md` | Devil's advocate for the `council` (adversarial) workflow. |
|
|
24
|
+
|
|
25
|
+
## What changed from v0.5.0
|
|
26
|
+
|
|
27
|
+
- **CCEP-1 alignment** — every contract now carries a "CCEP-1 structured output"
|
|
28
|
+
section mapping its Markdown Deliverable to the runtime JSON schema
|
|
29
|
+
(`planner-output`, `technical-plan`, `implementer-output`, `review-report`,
|
|
30
|
+
`council-verdict`, `agent-output`).
|
|
31
|
+
- **New `devil.md`** — the devil's advocate role required by the `council`
|
|
32
|
+
workflow profile (previously referenced without a contract).
|
|
33
|
+
- **New `planner.md`** — the CCEP-1 intake role carried forward from the v0.6.0
|
|
34
|
+
draft and finalized.
|
|
35
|
+
- **Orchestrator** — added the `council` workflow, the `devil` routing row, a
|
|
36
|
+
workflow-commands table, and a CCEP-1 confirmation-gate section.
|
|
37
|
+
- Intake/design/test/review contracts stop on unresolved branches, wayfinding
|
|
38
|
+
names the next `/cc:` command, TDD forbids green-by-weakening, and `docs` may
|
|
39
|
+
write session handoffs only to `.codeconductor/sessions/handoff.md` (gitignored,
|
|
40
|
+
secrets redacted).
|
|
41
|
+
- Version markers and scorecard `contract_version` bumped to `v1.0.0`.
|
|
42
|
+
|
|
43
|
+
## Versioning
|
|
44
|
+
|
|
45
|
+
Contracts are append-only. Versions `v0.1.0`–`v0.4.0` are deprecated (see each
|
|
46
|
+
directory's `DEPRECATED.md` and `docs/prompt-versioning.md`). Pin the version via
|
|
47
|
+
`contract_version` in `codeconductor.config.jsonc`.
|