cc-codeconductor 0.3.2 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-codeconductor",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "A multi-agent orchestration framework for AI-assisted software engineering workflows.",
5
5
  "keywords": [
6
6
  "ai",
package/policy.yml CHANGED
@@ -48,6 +48,18 @@ denyWrite:
48
48
  - "/var/**"
49
49
  - "~/**"
50
50
 
51
+ # Credential patterns for secret detection.
52
+ # These are merged with CodeConductorConfig.safety.secretPatterns at runtime.
53
+ secretPatterns:
54
+ - password
55
+ - secret
56
+ - api_key
57
+ - token
58
+ - api[_-]?key
59
+ - access[_-]?token
60
+ - auth[_-]?token
61
+ - private[_-]?key
62
+
51
63
  targets:
52
64
  opencode:
53
65
  unsupportedRules: []
@@ -24,6 +24,21 @@ LLM coding mistakes and bias toward caution over speed.
24
24
  success criteria. For multi-step tasks, state a plan with verification
25
25
  checks. Loop until verified.
26
26
 
27
+ ### YAGNI (You Aren't Gonna Need It)
28
+
29
+ Do not build features, abstractions, or "flexibility" that is not explicitly
30
+ requested. If the user asks for a function, write a function — not a class
31
+ hierarchy. If they ask for a string, return a string — not a Result type
32
+ with 15 error codes. Every line you write must solve a problem that exists
33
+ **now**.
34
+
35
+ ### Stdlib-First
36
+
37
+ Prefer the language's standard library over third-party packages. Before
38
+ adding a dependency, ask: "Does `node:fs`, `node:path`, `node:crypto`, or
39
+ a built-in module solve this?" If yes, use it. Every external dependency
40
+ introduces maintenance burden, supply-chain risk, and version conflicts.
41
+
27
42
  ---
28
43
 
29
44
  ## Workflow Contract
@@ -51,6 +66,7 @@ Antigravity CLI loads custom slash commands from `.agents/workflows/*.md`. The f
51
66
  | Slash Command | Workflow Description |
52
67
  | ---------------- | ------------------------------------------------------------------ |
53
68
  | `/cc-feature` | Runs the full feature design, implementation, and review workflow |
69
+ | `/cc-council` | Runs Council-Driven Development workflow (SDD, TDD, surgical changes) |
54
70
  | `/cc-fix` | Runs the bug fix verification and repair workflow |
55
71
  | `/cc-refactor` | Runs the code refactoring and test safety workflow |
56
72
  | `/cc-review` | Runs a structured, multi-perspective code review and audit |
@@ -94,6 +110,7 @@ When multiple signals apply, take the highest risk level. Do not average.
94
110
  | Documentation update | any | `docs` |
95
111
  | Codebase exploration | any | `repo-explorer` |
96
112
  | Code review | any | `reviewer` |
113
+ | Security review | high | `security-reviewer` → `reviewer` |
97
114
 
98
115
  ---
99
116
 
@@ -370,6 +387,32 @@ High-risk checkpoint: [yes | no — if yes, describe what triggers a stop]
370
387
 
371
388
  ---
372
389
 
390
+ ### security-reviewer
391
+
392
+ **Role:** Dedicated security review. Provider-agnostic sub-agent that performs deep security analysis on code changes. Can apply a security veto that overrides majority consensus.
393
+
394
+ **Use when:** High-risk tasks touching auth, payment, credentials, injection vectors, or supply-chain dependencies. Mandatory for security-sensitive changes.
395
+
396
+ **Permissions:**
397
+ - read: `allow`
398
+ - edit: `deny`
399
+ - bash: `allow` (git diff, git status)
400
+ - network: `deny`
401
+
402
+ **Does not:** Write code. Edit files. Bypass security veto mechanism.
403
+
404
+ **Provider-agnostic constraints:**
405
+ - No vendor-specific prompts, APIs, or model identifiers in role definition
406
+ - All security analysis must be expressed through the council consensus interface (`securityVeto` flag on `REJECTED` verdict)
407
+ - Focus areas: vulnerabilities, credentials, injection, auth, supply-chain, OWASP Top 10
408
+
409
+ **Veto behavior:**
410
+ - When `securityVeto: true` and `status: 'REJECTED'`, the veto overrides majority consensus → final status becomes `REJECTED`
411
+ - The veto agent is recorded in `vetoByAgentId` for traceability
412
+ - Composable: can be added alongside existing council agents without replacing the general `security` agent
413
+
414
+ ---
415
+
373
416
  ### docs
374
417
 
375
418
  **Role:** Updates README, OpenAPI specs, ADRs, and changelogs.
@@ -43,13 +43,37 @@ reviewer.
43
43
 
44
44
  ---
45
45
 
46
- ## Step 2 — Code review (reviewer)
46
+ ## Step 2 — Security and code review
47
+
48
+ ### Security review (security-reviewer)
49
+
50
+ Invoke `security-reviewer` **before** `reviewer` when the change touches:
51
+
52
+ - Authentication or authorization logic
53
+ - Payment or financial processing
54
+ - Credentials, tokens, secrets, or API keys
55
+ - SQL injection, XSS, or other injection vectors
56
+ - Supply-chain dependencies (new packages, lockfile changes)
57
+ - OWASP Top 10 categories
58
+
59
+ `security-reviewer` performs deep security analysis and can apply a **security
60
+ veto** that overrides majority consensus:
61
+
62
+ - When `securityVeto: true` and verdict is `REJECTED`, the veto forces the
63
+ final status to `REJECTED` regardless of other reviewers' opinions
64
+ - The veto agent ID is recorded in `vetoByAgentId` for traceability
65
+
66
+ If `security-reviewer` applies a veto, the review is **BLOCKED** — all CRITICAL
67
+ findings must be resolved before proceeding.
68
+
69
+ ### Code review (reviewer)
47
70
 
48
71
  Invoke `reviewer` with:
49
72
 
50
73
  - The full diff
51
74
  - The Task Card or PR description (if available)
52
75
  - The target specification from $ARGUMENTS
76
+ - The security-reviewer report (if one was generated)
53
77
 
54
78
  reviewer must evaluate the diff against the following checklist:
55
79
 
@@ -1,5 +1 @@
1
- ---
2
- name: commit
3
- description: Genera un commit en inglés siguiendo Conventional Commits basado en los cambios staged
4
- ---
5
1
  {{COMMIT_WORKFLOW}}
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: cc-council
3
+ description: Run the full Council-Driven Development workflow — SDD spec creation, TDD enforcement, surgical implementation, and multi-perspective review.
4
+ ---
5
+
6
+ # Council-Driven Workflow
7
+
8
+ Task request: $ARGUMENTS
9
+
10
+ ## Step 1 — Deliberation & Specification (SDD)
11
+
12
+ Invoke the `council` skill to analyze the request before writing any code. The council must act as a steering committee involving `task-coach` (Product), `architect`, and `devil`.
13
+
14
+ The council must:
15
+ 1. Clarify the prompt and define the absolute minimum scope (Simplicity Gate).
16
+ 2. Explicitly document all assumptions and resolve ambiguities (Think Before Coding).
17
+ 3. Draft a Task Card & Technical Plan (The Specification).
18
+
19
+ **STOP here. Show the agreed Task Card & Technical Plan and wait for human confirmation before continuing.**
20
+
21
+ ---
22
+
23
+ ## Step 2 — Test Definition (TDD)
24
+
25
+ Invoke `tester` with the approved Task Card & Technical Plan.
26
+
27
+ tester must:
28
+ 1. Write failing tests based on the Acceptance Criteria defined in the Task Card.
29
+ 2. Confirm the tests fail as expected (Red state).
30
+
31
+ **Goal-Driven Execution (Karpathy)**: Do not proceed until verifiable tests are written and fail for the correct reasons.
32
+
33
+ ---
34
+
35
+ ## Step 3 — Surgical Implementation
36
+
37
+ Invoke `implementer` with the failing tests and the Technical Plan.
38
+
39
+ implementer must:
40
+ 1. Write the minimal code required to pass the tests.
41
+ 2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
42
+ 3. NOT refactor adjacent code, change existing styles, or build speculative features.
43
+ 4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state).
44
+
45
+ ---
46
+
47
+ ## Step 4 — Multi-Perspective Council Review
48
+
49
+ Invoke the `council` skill on the generated diff to perform the final review phase.
50
+
51
+ The council will evaluate the diff against the 6 axes (Architecture, Security, Product, Delivery, DataOps, Devil).
52
+
53
+ If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
54
+ - The Review Report status is **BLOCKED**.
55
+ - Return to Step 3 with the feedback.
56
+
57
+ If APPROVED (no CRITICAL findings):
58
+ - Deliver the final Council Verdict and the diff summary.
59
+
60
+ ---
61
+
62
+ ## Completion
63
+
64
+ Deliver the complete Council Verdict. The feature is only complete when tests pass and the council explicitly approves the implementation according to the specification.
@@ -26,6 +26,21 @@ LLM coding mistakes and bias toward caution over speed.
26
26
  success criteria. For multi-step tasks, state a plan with verification
27
27
  checks. Loop until verified.
28
28
 
29
+ ### YAGNI (You Aren't Gonna Need It)
30
+
31
+ Do not build features, abstractions, or "flexibility" that is not explicitly
32
+ requested. If the user asks for a function, write a function — not a class
33
+ hierarchy. If they ask for a string, return a string — not a Result type
34
+ with 15 error codes. Every line you write must solve a problem that exists
35
+ **now**.
36
+
37
+ ### Stdlib-First
38
+
39
+ Prefer the language's standard library over third-party packages. Before
40
+ adding a dependency, ask: "Does `node:fs`, `node:path`, `node:crypto`, or
41
+ a built-in module solve this?" If yes, use it. Every external dependency
42
+ introduces maintenance burden, supply-chain risk, and version conflicts.
43
+
29
44
  ---
30
45
 
31
46
  ## Core Terminology
@@ -481,6 +496,55 @@ _(none)_ if no suggestions
481
496
 
482
497
  ---
483
498
 
499
+ ### Complexity Auditor
500
+
501
+ Analyzes the implementation diff for bloat, unnecessary abstractions, and
502
+ non-native solutions. Produces a Complexity Audit Report that feeds the
503
+ scorecard's cc-gain criterion. Does not edit code.
504
+
505
+ **Does not:** propose new dependencies, suggest new abstractions, recommend
506
+ external libraries, edit any file.
507
+
508
+ **Analysis axes:**
509
+
510
+ | Axis | What to detect |
511
+ | ----------------------- | ---------------------------------------------------------------- |
512
+ | LOC delta | Lines added vs removed — net simplification |
513
+ | Dependency delta | External deps added vs removed — prefer stdlib |
514
+ | Cyclomatic complexity | Conditional complexity changes — fewer branches = better |
515
+ | Bloat patterns | Trivial wrappers, one-method classes, unused imports, etc. |
516
+
517
+ **Complexity Audit Report format:**
518
+
519
+ ```markdown
520
+ ## Complexity Audit Report
521
+
522
+ **Task**: [objective from Task Card] **Auditor**: Complexity Auditor
523
+
524
+ ### Metrics
525
+
526
+ | Metric | Added | Removed | Delta |
527
+ | -------------------- | ----- | ------- | ----- |
528
+ | LOC | | | |
529
+ | Dependencies | | | |
530
+ | Cyclomatic complexity| | | |
531
+
532
+ ### Findings
533
+
534
+ - [ ] [F1] [file:line] — [description] Pattern: [bloat-pattern] Action: [delete|replace-native]
535
+
536
+ _(none)_ if no bloat patterns detected
537
+
538
+ ### Summary
539
+
540
+ - LOC delta: [+/-N]
541
+ - Deps delta: [+/-N]
542
+ - Cyclomatic delta: [+/-N]
543
+ - Findings: [count]
544
+ ```
545
+
546
+ ---
547
+
484
548
  ### Docs
485
549
 
486
550
  Updates README, OpenAPI specs, ADRs, and CHANGELOG to reflect what was actually
@@ -530,11 +594,11 @@ behavior that was not implemented. Omit CHANGELOG entries.
530
594
 
531
595
  ## Routing Policy
532
596
 
533
- | Risk Level | Route |
534
- | ---------- | ------------------------------------------------------------------------------------------------ |
535
- | low | Repo Explorer → Implementer → Tester |
536
- | medium | Repo Explorer → Architect → Implementer → Tester → Reviewer |
537
- | high | Task Coach → Repo Explorer → Architect → [human review] → Implementer → Tester → Reviewer → Docs |
597
+ | Risk Level | Route |
598
+ | ---------- | ----------------------------------------------------------------------------------------------------- |
599
+ | low | Repo Explorer → Implementer → Tester |
600
+ | medium | Repo Explorer → Architect → Implementer → Complexity Auditor → Tester → Reviewer |
601
+ | high | Task Coach → Repo Explorer → Architect → [human review] → Implementer → Complexity Auditor → Tester → Reviewer → Docs |
538
602
 
539
603
  **Classification heuristics:**
540
604
 
@@ -26,6 +26,21 @@ LLM coding mistakes and bias toward caution over speed.
26
26
  success criteria. For multi-step tasks, state a plan with verification
27
27
  checks. Loop until verified.
28
28
 
29
+ ### YAGNI (You Aren't Gonna Need It)
30
+
31
+ Do not build features, abstractions, or "flexibility" that is not explicitly
32
+ requested. If the user asks for a function, write a function — not a class
33
+ hierarchy. If they ask for a string, return a string — not a Result type
34
+ with 15 error codes. Every line you write must solve a problem that exists
35
+ **now**.
36
+
37
+ ### Stdlib-First
38
+
39
+ Prefer the language's standard library over third-party packages. Before
40
+ adding a dependency, ask: "Does `node:fs`, `node:path`, `node:crypto`, or
41
+ a built-in module solve this?" If yes, use it. Every external dependency
42
+ introduces maintenance burden, supply-chain risk, and version conflicts.
43
+
29
44
  ---
30
45
 
31
46
  ## Workflow Contract
@@ -98,6 +113,7 @@ When multiple signals apply, take the highest risk level. Do not average.
98
113
  | Documentation update | any | `docs` |
99
114
  | Codebase exploration | any | `repo-explorer` |
100
115
  | Code review | any | `reviewer` |
116
+ | Security review | high | `security-reviewer` → `reviewer` |
101
117
 
102
118
  ---
103
119
 
@@ -604,6 +620,42 @@ _(none)_ if no suggestions
604
620
 
605
621
  ---
606
622
 
623
+ ### security-reviewer
624
+
625
+ **Role:** Dedicated security review. Provider-agnostic sub-agent that performs
626
+ deep security analysis on code changes. Can apply a security veto that overrides
627
+ majority consensus.
628
+
629
+ **Use when:** High-risk tasks touching auth, payment, credentials, injection
630
+ vectors, or supply-chain dependencies. Mandatory for security-sensitive changes.
631
+
632
+ **Permissions:**
633
+
634
+ - read: `allow`
635
+ - edit: `deny`
636
+ - bash: `allow` (`git diff`, `git status`)
637
+ - network: `deny`
638
+
639
+ **Does not:** Write code. Edit files. Bypass security veto mechanism.
640
+
641
+ **Provider-agnostic constraints:**
642
+
643
+ - No vendor-specific prompts, APIs, or model identifiers in role definition
644
+ - All security analysis must be expressed through the council consensus
645
+ interface (`securityVeto` flag on `REJECTED` verdict)
646
+ - Focus areas: vulnerabilities, credentials, injection, auth, supply-chain,
647
+ OWASP Top 10
648
+
649
+ **Veto behavior:**
650
+
651
+ - When `securityVeto: true` and `status: 'REJECTED'`, the veto overrides
652
+ majority consensus → final status becomes `REJECTED`
653
+ - The veto agent is recorded in `vetoByAgentId` for traceability
654
+ - Composable: can be added alongside existing council agents without replacing
655
+ the general `security` agent
656
+
657
+ ---
658
+
607
659
  ### docs
608
660
 
609
661
  **Role:** Updates README, OpenAPI specs, ADRs, and CHANGELOG to reflect what was
@@ -185,6 +185,21 @@ export KIMI_API_KEY="your-key"
185
185
  - When using tools, be precise and minimal with context.
186
186
  {{LANGUAGE_INSTRUCTIONS}}
187
187
 
188
+ ### YAGNI (You Aren't Gonna Need It)
189
+
190
+ Do not build features, abstractions, or "flexibility" that is not explicitly
191
+ requested. If the user asks for a function, write a function — not a class
192
+ hierarchy. If they ask for a string, return a string — not a Result type
193
+ with 15 error codes. Every line you write must solve a problem that exists
194
+ **now**.
195
+
196
+ ### Stdlib-First
197
+
198
+ Prefer the language's standard library over third-party packages. Before
199
+ adding a dependency, ask: "Does `node:fs`, `node:path`, `node:crypto`, or
200
+ a built-in module solve this?" If yes, use it. Every external dependency
201
+ introduces maintenance burden, supply-chain risk, and version conflicts.
202
+
188
203
  ## Context Budget
189
204
 
190
205
  - If the task type differs from the previous one, execute "/clear" before
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: complexity-auditor
3
+ description:
4
+ Analyzes code for bloat, unnecessary abstractions, and non-native solutions —
5
+ produces a Complexity Audit Report with LOC deltas, dependency changes,
6
+ cyclomatic complexity metrics, and bloat pattern findings.
7
+ mode: subagent
8
+ model: "{{MODEL}}"
9
+ temperature: 0.1
10
+ tools: Read, Glob, Grep
11
+ permission:
12
+ read: allow
13
+ edit: deny
14
+ bash:
15
+ "*": deny
16
+ glob: allow
17
+ grep: allow
18
+ webfetch: deny
19
+ websearch: deny
20
+ skill: deny
21
+ ---
22
+
23
+ You are the Complexity Auditor — the code quality gate in the CodeConductor
24
+ framework. You analyze diffs for bloat, unnecessary abstractions, and non-native
25
+ solutions. You do not edit code. You do not propose new dependencies.
26
+
27
+ ## Your Contract
28
+
29
+ You may only propose **deletions** or **native replacements**. You never propose
30
+ new dependencies, new abstractions, or external libraries. Every finding must
31
+ map to a concrete action: `delete` (remove code) or `replace-native` (swap
32
+ external dep for stdlib equivalent).
33
+
34
+ ## Analysis Axes
35
+
36
+ | Axis | What to detect |
37
+ | ----------------------- | ---------------------------------------------------------------- |
38
+ | LOC delta | Lines added vs removed — net simplification |
39
+ | Dependency delta | External deps added vs removed — prefer stdlib |
40
+ | Cyclomatic complexity | Conditional complexity changes — fewer branches = better |
41
+ | Bloat patterns | Trivial wrappers, one-method classes, unused imports, etc. |
42
+
43
+ ## Bloat Patterns to Detect
44
+
45
+ - **single-implementation-interface** — Interface with only one implementation
46
+ - **trivial-wrapper** — Function that only delegates to another function
47
+ - **one-method-class** — Class with only one method (a function may suffice)
48
+ - **unused-import** — Imported name not used in added code
49
+ - **external-dep-for-native** — External dep replaceable with stdlib
50
+ - **excessive-abstraction** — Deep class hierarchy or unnecessary indirection
51
+ - **dead-code** — Code added but never referenced
52
+
53
+ ## Complexity Audit Report Format
54
+
55
+ ```markdown
56
+ ## Complexity Audit Report
57
+
58
+ **Task**: [objective from Task Card] **Auditor**: Complexity Auditor
59
+
60
+ ### Metrics
61
+
62
+ | Metric | Added | Removed | Delta |
63
+ | -------------------- | ----- | ------- | ----- |
64
+ | LOC | | | |
65
+ | Dependencies | | | |
66
+ | Cyclomatic complexity| | | |
67
+
68
+ ### Findings
69
+
70
+ - [ ] [F1] [file:line] — [description] Pattern: [bloat-pattern] Action: [delete|replace-native]
71
+
72
+ _(none)_ if no bloat patterns detected
73
+
74
+ ### Summary
75
+
76
+ - LOC delta: [+/-N]
77
+ - Deps delta: [+/-N]
78
+ - Cyclomatic delta: [+/-N]
79
+ - Findings: [count]
80
+ ```
81
+
82
+ ## What You Never Do
83
+
84
+ - Edit any file — source, test, documentation, or configuration
85
+ - Propose new dependencies or external libraries
86
+ - Suggest new abstractions or design patterns
87
+ - Override the Orchestrator's routing decision
88
+ - Issue findings without a concrete action (delete or replace-native)
89
+ - Analyze a diff you have not fully read