cc-codeconductor 1.0.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 +324 -87
- package/dist/core/compilation/compile-checker.d.ts +2 -0
- package/dist/core/loop/loop-engine.d.ts +3 -0
- package/dist/index.js +2701 -577
- package/dist/library.js +167 -18
- package/dist/validation/schemas.d.ts +390 -44
- package/package.json +4 -1
- package/presets/agy/AGENTS.md +3 -0
- package/presets/agy/gates/pre-commit/GATE.md +5 -4
- package/presets/agy/skills/backlog/SKILL.md +91 -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-ask.md +2 -1
- package/presets/agy/workflows/cc-backlog.md +69 -0
- package/presets/agy/workflows/cc-explore.md +1 -1
- package/presets/agy/workflows/cc-openspec.md +3 -1
- package/presets/agy/workflows/cc-security.md +180 -0
- package/presets/claude/CLAUDE.md +4 -0
- package/presets/claude/commands/cc/ask.md +2 -1
- package/presets/claude/commands/cc/backlog.md +104 -0
- package/presets/claude/commands/cc/explore.md +1 -1
- package/presets/claude/commands/cc/openspec.md +16 -1
- package/presets/claude/commands/cc/security.md +179 -0
- package/presets/claude/gates/pre-commit/GATE.md +5 -4
- 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/commands/cc-ask.md +2 -1
- package/presets/codex/gates/pre-commit/GATE.md +5 -4
- package/presets/cursor/AGENTS.md +2 -2
- package/presets/cursor/commands/cc/ask.md +2 -1
- package/presets/cursor/commands/cc/backlog.md +105 -0
- package/presets/cursor/commands/cc/explore.md +1 -1
- package/presets/cursor/commands/cc/openspec.md +16 -1
- package/presets/cursor/commands/cc/security.md +179 -0
- package/presets/cursor/gates/pre-commit/GATE.md +5 -4
- 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/commands/cc-ask.md +2 -1
- package/presets/opencode/commands/cc-backlog.md +68 -0
- package/presets/opencode/commands/cc-explore.md +1 -1
- package/presets/opencode/commands/cc-openspec.md +3 -1
- package/presets/opencode/commands/cc-security.md +179 -0
- package/presets/opencode/gates/pre-commit/GATE.md +5 -4
- 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/src/presets/council/council.yml +12 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
[cc: alias] Author BACKLOG.md — wayfinding, grilling, create or append items,
|
|
4
|
+
validate with openspec, and plan OpenSpec change folders for /cc-openspec.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Backlog Authoring Workflow
|
|
8
|
+
|
|
9
|
+
Objectives: $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
Create or append valid `BACKLOG.md` items and OpenSpec change docs. Do **not**
|
|
12
|
+
deliver implementation — that is `/cc-openspec`.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Step 0 — CCEP Bootstrap
|
|
17
|
+
|
|
18
|
+
Command: `backlog` (fixed for this workflow — do not infer from user text)
|
|
19
|
+
|
|
20
|
+
1. Run: `npx cc-codeconductor ccep parse --command backlog "$ARGUMENTS" --output json`
|
|
21
|
+
2. Run: `npx cc-codeconductor ccep resolve --command backlog "$ARGUMENTS" --output json`
|
|
22
|
+
3. Run: `npx cc-codeconductor ccep profile backlog --output json`
|
|
23
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command backlog --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
24
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Step 1 — Wayfinding (repo-explorer)
|
|
29
|
+
|
|
30
|
+
If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
|
|
31
|
+
`graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
|
|
32
|
+
to map modules, conventions, and impact radius. Do not write `BACKLOG.md` in
|
|
33
|
+
this step. Record a Repo Map so Scope names real files or modules.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Step 2 — Relentless Grilling (task-coach)
|
|
38
|
+
|
|
39
|
+
Invoke `task-coach`. Produce complete backlog item fields: title, type, risk,
|
|
40
|
+
scope, description, out of scope, measurable acceptance criteria.
|
|
41
|
+
|
|
42
|
+
Every assumption must survive one grilling question. Reject vague acceptance
|
|
43
|
+
("improve UX", "fix bugs").
|
|
44
|
+
|
|
45
|
+
If any field is missing or ambiguous, ask one clarifying question at a time.
|
|
46
|
+
|
|
47
|
+
**STOP here.** Unresolved grilling questions populate `questionsForUser` in the
|
|
48
|
+
CCEP-1 `planner-output`; `ccep evaluate --command backlog` halts until a human
|
|
49
|
+
answers. Do not write `BACKLOG.md` until that confirmation.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Step 3 — Write or append BACKLOG.md (docs)
|
|
54
|
+
|
|
55
|
+
Apply skill `backlog`.
|
|
56
|
+
|
|
57
|
+
- If `BACKLOG.md` is absent, create it from the canonical template
|
|
58
|
+
(`presets/templates/BACKLOG.md`). Set Global `Product` from `package.json`
|
|
59
|
+
`name` when present.
|
|
60
|
+
- If it exists, append new `### BC-xxx` items under `## Items`. Do not rewrite
|
|
61
|
+
`## Global` or `## Archive`.
|
|
62
|
+
- Next ID = max `BC-NNN` across Items and Archive, plus one.
|
|
63
|
+
- New items: Status `READY`, Progress `0%`, measurable Acceptance checklist.
|
|
64
|
+
|
|
65
|
+
Do **not** `git add` `BACKLOG.md` or `openspec/`.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Step 4 — Validate (mandatory gate)
|
|
70
|
+
|
|
71
|
+
Run:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx cc-codeconductor openspec validate
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
If validation fails:
|
|
78
|
+
|
|
79
|
+
1. List all errors and recommendations from the CLI output.
|
|
80
|
+
2. Show the canonical BACKLOG.md structure (## Global, ## Items, ### BC-001 | Title, Priority, Status, Type, Depends on, Description, Scope, Acceptance).
|
|
81
|
+
3. Fix the file and re-run validate. **STOP** planning until valid.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Step 5 — Plan new items
|
|
86
|
+
|
|
87
|
+
For each **new** `BC-xxx` from this run:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx cc-codeconductor openspec plan <BC-id>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Show TaskCards and `openspec/changes/<slug>/` (proposal, design, tasks, specs).
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Completion
|
|
98
|
+
|
|
99
|
+
Report: item IDs added, validate result, change folder paths.
|
|
100
|
+
|
|
101
|
+
Tell the user to run `/cc-openspec` (optionally `/cc-openspec BC-xxx`) to
|
|
102
|
+
deliver. Do not start delivery in this workflow.
|
|
103
|
+
|
|
104
|
+
Apply skill `backlog` for create/append rules. Apply skill `openspec` only for
|
|
105
|
+
format and state-machine reference.
|
|
@@ -27,7 +27,7 @@ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"`. Invoke `
|
|
|
27
27
|
|
|
28
28
|
## Step 2 — Suggest next command (orchestrator)
|
|
29
29
|
|
|
30
|
-
Recommend exactly one next slash command (`/cc:feature`, `/cc:fix`, `/cc:refactor`, `/cc:review`, `/cc:triage`, …) with a one-sentence rationale. Do not start that workflow.
|
|
30
|
+
Recommend exactly one next slash command (`/cc:feature`, `/cc:fix`, `/cc:refactor`, `/cc:review`, `/cc:backlog`, `/cc:openspec`, `/cc:triage`, …) with a one-sentence rationale. Do not start that workflow.
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
@@ -86,6 +86,21 @@ Update BACKLOG item status to `PLANNED` (CLI does this automatically).
|
|
|
86
86
|
|
|
87
87
|
---
|
|
88
88
|
|
|
89
|
+
## Drive card status (CLI)
|
|
90
|
+
|
|
91
|
+
Do not edit `.codeconductor/openspec-state.json` by hand.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
npx cc-codeconductor openspec start <cardId>
|
|
95
|
+
npx cc-codeconductor openspec done <cardId>
|
|
96
|
+
npx cc-codeconductor openspec block <cardId> --reason "waiting on design"
|
|
97
|
+
npx cc-codeconductor openspec archive <itemId>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`start` moves the card `pending → doing` and the item `PLANNED → IN_PROGRESS`. `done` marks the card complete, updates Progress, and moves the item to `REVIEW` when every card is done and review is required. `archive` requires all cards done (and review evidence when Global review is required) and moves `openspec/changes/<slug>` to `archive/`.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
89
104
|
## Step 5 — Model matrix and execute loop
|
|
90
105
|
|
|
91
106
|
Before executing phases, show resolved models:
|
|
@@ -115,7 +130,7 @@ Use the model configured in the installed preset for each agent role.
|
|
|
115
130
|
After each phase:
|
|
116
131
|
|
|
117
132
|
- Mark progress in deliverable summary.
|
|
118
|
-
-
|
|
133
|
+
- Run `npx cc-codeconductor openspec done <cardId>` when the phase completes. Do not edit openspec-state.json by hand.
|
|
119
134
|
|
|
120
135
|
Implementer: create a Git worktree before editing (`git worktree add ../<branch>-session <branch>`).
|
|
121
136
|
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
[cc: alias] Run the authorized defensive security workflow — domain
|
|
4
|
+
security-* skills, 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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Pre-commit Gate: Typecheck and Test
|
|
1
|
+
# Pre-commit Gate: Typecheck, Lint, and Test
|
|
2
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.
|
|
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
4
|
|
|
5
5
|
## Cuándo usar
|
|
6
6
|
|
|
@@ -63,6 +63,7 @@ mkdir -p "$GIT_DIR/hooks"
|
|
|
63
63
|
cat > "$HOOK_PATH" << 'HOOK_EOF'
|
|
64
64
|
#!/bin/bash
|
|
65
65
|
bun run typecheck || exit 1
|
|
66
|
+
bun run lint || exit 1
|
|
66
67
|
bun run test || exit 1
|
|
67
68
|
HOOK_EOF
|
|
68
69
|
|
|
@@ -78,7 +79,7 @@ echo "Pre-commit hook installed successfully."
|
|
|
78
79
|
- **Resolución dinámica de git dir**: Usa `git rev-parse --git-dir` para localizar el directorio correcto, incluso en worktrees.
|
|
79
80
|
- **Detección de conflictos**: Si Husky o lint-staged ya está en `package.json`, el script avisa y no instala para evitar conflictos.
|
|
80
81
|
- **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
|
+
- **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`.
|
|
82
83
|
|
|
83
84
|
## Verificación
|
|
84
85
|
|
|
@@ -121,7 +122,7 @@ Verifica que el hook es ejecutable:
|
|
|
121
122
|
|
|
122
123
|
chmod +x .git/hooks/pre-commit
|
|
123
124
|
|
|
124
|
-
Verifica que `bun run typecheck` y `bun run test` existen en `package.json`:
|
|
125
|
+
Verifica que `bun run typecheck`, `bun run lint` y `bun run test` existen en `package.json`:
|
|
125
126
|
|
|
126
127
|
cat package.json | grep -A 5 '"scripts"'
|
|
127
128
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: backlog
|
|
3
|
+
description: >
|
|
4
|
+
Author BACKLOG.md and OpenSpec change folders for CodeConductor.
|
|
5
|
+
Trigger: /cc-backlog, /cc:backlog, creating or appending backlog items,
|
|
6
|
+
writing BACKLOG.md, or preparing work for /cc-openspec.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Backlog authoring
|
|
10
|
+
|
|
11
|
+
Use this skill to **create or append** `BACKLOG.md` and generate OpenSpec
|
|
12
|
+
change docs. Delivery of an existing item is `/cc-openspec` (skill `openspec`).
|
|
13
|
+
|
|
14
|
+
## BACKLOG.md contract
|
|
15
|
+
|
|
16
|
+
Canonical template: `presets/templates/BACKLOG.md` (or the installed copy).
|
|
17
|
+
Required sections:
|
|
18
|
+
|
|
19
|
+
- `## Global` — Product, Strategy, Policy, Review required, TDD required
|
|
20
|
+
- `## Items` — active entries
|
|
21
|
+
- `## Archive` — completed entries (never re-execute; never rewrite)
|
|
22
|
+
|
|
23
|
+
Each item: `### BC-001 | Short title` with Priority (P0–P3), Status, Type,
|
|
24
|
+
Depends on, Description, Scope, Out of scope, Acceptance (measurable checklist).
|
|
25
|
+
|
|
26
|
+
Status after grilling: `READY`. `openspec plan` then moves the item to `PLANNED`.
|
|
27
|
+
|
|
28
|
+
## Create vs append
|
|
29
|
+
|
|
30
|
+
- **No `BACKLOG.md`:** create it from the template. Set Global `Product` from
|
|
31
|
+
`package.json` `name` when present.
|
|
32
|
+
- **File exists:** append new `### BC-xxx` blocks under `## Items`. Do not
|
|
33
|
+
rewrite `## Global` or `## Archive`.
|
|
34
|
+
|
|
35
|
+
Next ID = max numeric suffix across Items and Archive, plus one, zero-padded
|
|
36
|
+
to three digits (`BC-013` after `BC-012`).
|
|
37
|
+
|
|
38
|
+
## Wayfinding (before Scope)
|
|
39
|
+
|
|
40
|
+
If `graphify-out/graph.json` exists, run `graphify query "<objectives>"` (and
|
|
41
|
+
`graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`.
|
|
42
|
+
Scope must name real files or modules. Do not write `BACKLOG.md` in this step.
|
|
43
|
+
|
|
44
|
+
## Grilling (before write)
|
|
45
|
+
|
|
46
|
+
Invoke `task-coach`. One grilling question per assumption. Reject vague
|
|
47
|
+
acceptance ("improve UX", "fix bugs"). Criteria must be measurable (same rules
|
|
48
|
+
as `openspec validate` / `VAGUE_ACCEPTANCE`).
|
|
49
|
+
|
|
50
|
+
Unresolved questions go in `questionsForUser`. Run `ccep evaluate --command
|
|
51
|
+
backlog`. If `stop` is true, **STOP** and wait for the human.
|
|
52
|
+
|
|
53
|
+
Do not write items until the gate passes.
|
|
54
|
+
|
|
55
|
+
## Validate loop
|
|
56
|
+
|
|
57
|
+
After writing:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx cc-codeconductor openspec validate
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Local CodeConductor dogfood: `bun run dev openspec validate`.
|
|
64
|
+
|
|
65
|
+
If invalid: list errors and recommendations, show the canonical structure,
|
|
66
|
+
fix the file, re-validate. Do not plan until valid.
|
|
67
|
+
|
|
68
|
+
## Plan new items only
|
|
69
|
+
|
|
70
|
+
For each **new** `BC-xxx` this run:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npx cc-codeconductor openspec plan BC-xxx
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
That writes `openspec/changes/<slug>/` (`proposal.md`, `design.md`, `tasks.md`,
|
|
77
|
+
`specs/`). Then tell the user to run `/cc-openspec` (optionally with the ID).
|
|
78
|
+
|
|
79
|
+
## Local artifacts — do not version
|
|
80
|
+
|
|
81
|
+
In consumer projects these paths are gitignored (see `init`):
|
|
82
|
+
|
|
83
|
+
- `BACKLOG.md`
|
|
84
|
+
- `openspec/`
|
|
85
|
+
- `.codeconductor/openspec-state.json`
|
|
86
|
+
|
|
87
|
+
Do **not** `git add` them. Do not edit `openspec-state.json` by hand.
|
|
88
|
+
|
|
89
|
+
## Delivery
|
|
90
|
+
|
|
91
|
+
Format and state machine: skill `openspec`. Authoring is this skill.
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
name: openspec
|
|
3
3
|
description:
|
|
4
4
|
OpenSpec backlog format, state machine, and delivery workflow for CodeConductor.
|
|
5
|
-
Use when running /cc-openspec or
|
|
5
|
+
Use when running /cc-openspec or delivering a BACKLOG.md item.
|
|
6
|
+
To create or append BACKLOG.md, use /cc-backlog (skill backlog).
|
|
6
7
|
|
|
7
8
|
disable-model-invocation: true
|
|
8
9
|
---
|
|
9
10
|
|
|
10
11
|
# OpenSpec / BACKLOG Skill
|
|
11
12
|
|
|
13
|
+
Authoring (create or append `BACKLOG.md`, then `openspec validate` / `plan`) is
|
|
14
|
+
`/cc-backlog` and skill `backlog`. This skill is **delivery**.
|
|
15
|
+
|
|
12
16
|
## BACKLOG.md contract
|
|
13
17
|
|
|
14
18
|
`BACKLOG.md` at repo root is the operational queue. Required sections:
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-ai-llm
|
|
3
|
+
description: >
|
|
4
|
+
Harden LLM and agent integrations you operate: prompt injection, tool allowlists, secret leakage, and supply-chain of models. Defensive only.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AI / LLM Security
|
|
8
|
+
|
|
9
|
+
## Authorization
|
|
10
|
+
|
|
11
|
+
Use this skill only with **explicit written authorization** for a named
|
|
12
|
+
scope (systems, environments, and time window). If authorization is missing,
|
|
13
|
+
expired, or the request is for someone else's systems, **stop**.
|
|
14
|
+
|
|
15
|
+
This skill is **defensive and owner-authorized**. It does not authorize
|
|
16
|
+
offensive cyber operations.
|
|
17
|
+
|
|
18
|
+
## Do
|
|
19
|
+
|
|
20
|
+
- Treat model output as untrusted; never exec it without a schema
|
|
21
|
+
- Allowlist tools and paths; contain file writes
|
|
22
|
+
- Keep secrets out of prompts and logs
|
|
23
|
+
|
|
24
|
+
## Do not
|
|
25
|
+
|
|
26
|
+
- Help jailbreak third-party products or steal model weights
|
|
27
|
+
- Log raw user PII to prompt-debug stores
|
|
28
|
+
|
|
29
|
+
- Do not produce exploit payloads, malware, or attack procedures.
|
|
30
|
+
|
|
31
|
+
## How to Use
|
|
32
|
+
|
|
33
|
+
Load this skill from `/cc-security` when the Task Card domain is `security-ai-llm`.
|
|
34
|
+
Example prompts:
|
|
35
|
+
|
|
36
|
+
- `Review our agent tool runner for path traversal and unbounded shell.`
|
|
37
|
+
- `Add tests that a prompt cannot make the bot dump .env.`
|
|
38
|
+
|
|
39
|
+
## Integration
|
|
40
|
+
|
|
41
|
+
- Workflow: `/cc-security` (CCEP command `security`)
|
|
42
|
+
- Existing OWASP application-security skill remains `security` (not this id)
|
|
43
|
+
- High-risk changes still require `security-reviewer`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-blue-team
|
|
3
|
+
description: >
|
|
4
|
+
Improve detections, hardening, and response for the estate you defend. Detection-as-code and control design, not offense.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Blue Team Defense
|
|
8
|
+
|
|
9
|
+
## Authorization
|
|
10
|
+
|
|
11
|
+
Use this skill only with **explicit written authorization** for a named
|
|
12
|
+
scope (systems, environments, and time window). If authorization is missing,
|
|
13
|
+
expired, or the request is for someone else's systems, **stop**.
|
|
14
|
+
|
|
15
|
+
This skill is **defensive and owner-authorized**. It does not authorize
|
|
16
|
+
offensive cyber operations.
|
|
17
|
+
|
|
18
|
+
## Do
|
|
19
|
+
|
|
20
|
+
- Tune detections for true positives; document exceptions
|
|
21
|
+
- Pair every new control with a test or canary
|
|
22
|
+
- Share hunt hypotheses with IR, not with the public internet
|
|
23
|
+
|
|
24
|
+
## Do not
|
|
25
|
+
|
|
26
|
+
- Disable EDR or logging to 'reduce noise' without a ticket
|
|
27
|
+
- Copy attacker malware into production 'for training'
|
|
28
|
+
|
|
29
|
+
- Do not produce exploit payloads, malware, or attack procedures.
|
|
30
|
+
|
|
31
|
+
## How to Use
|
|
32
|
+
|
|
33
|
+
Load this skill from `/cc-security` when the Task Card domain is `security-blue-team`.
|
|
34
|
+
Example prompts:
|
|
35
|
+
|
|
36
|
+
- `We missed a token-replay. Propose a detection plus a unit test for the API gateway.`
|
|
37
|
+
- `Harden CI: pin actions, require reviews on workflows that deploy.`
|
|
38
|
+
|
|
39
|
+
## Integration
|
|
40
|
+
|
|
41
|
+
- Workflow: `/cc-security` (CCEP command `security`)
|
|
42
|
+
- Existing OWASP application-security skill remains `security` (not this id)
|
|
43
|
+
- High-risk changes still require `security-reviewer`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-cloud
|
|
3
|
+
description: >
|
|
4
|
+
Harden IAM, storage, keys, and org policies in cloud accounts you administer. Focus on identity, logging, and public-exposure controls.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Cloud Security
|
|
8
|
+
|
|
9
|
+
## Authorization
|
|
10
|
+
|
|
11
|
+
Use this skill only with **explicit written authorization** for a named
|
|
12
|
+
scope (systems, environments, and time window). If authorization is missing,
|
|
13
|
+
expired, or the request is for someone else's systems, **stop**.
|
|
14
|
+
|
|
15
|
+
This skill is **defensive and owner-authorized**. It does not authorize
|
|
16
|
+
offensive cyber operations.
|
|
17
|
+
|
|
18
|
+
## Do
|
|
19
|
+
|
|
20
|
+
- Prefer roles over long-lived keys; require MFA on human admins
|
|
21
|
+
- Block public buckets and overly broad IAM `*` unless justified
|
|
22
|
+
- Turn on cloud audit logs and retain them per policy
|
|
23
|
+
|
|
24
|
+
## Do not
|
|
25
|
+
|
|
26
|
+
- Disable logging or GuardDuty/Security Command Center 'to save cost' without a recorded exception
|
|
27
|
+
- Share account credentials in chat or tickets
|
|
28
|
+
|
|
29
|
+
- Do not produce exploit payloads, malware, or attack procedures.
|
|
30
|
+
|
|
31
|
+
## How to Use
|
|
32
|
+
|
|
33
|
+
Load this skill from `/cc-security` when the Task Card domain is `security-cloud`.
|
|
34
|
+
Example prompts:
|
|
35
|
+
|
|
36
|
+
- `Audit this AWS account's IAM: unused keys, admin wildcards, and public S3.`
|
|
37
|
+
- `Write a policy-as-code check that fails CI if a bucket ACL is public.`
|
|
38
|
+
|
|
39
|
+
## Integration
|
|
40
|
+
|
|
41
|
+
- Workflow: `/cc-security` (CCEP command `security`)
|
|
42
|
+
- Existing OWASP application-security skill remains `security` (not this id)
|
|
43
|
+
- High-risk changes still require `security-reviewer`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-crypto
|
|
3
|
+
description: >
|
|
4
|
+
Choose and review cryptographic usage in your codebase: TLS, hashing, KMS, secret storage. Prefer standard libraries and vetted constructions.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Applied Cryptography
|
|
8
|
+
|
|
9
|
+
## Authorization
|
|
10
|
+
|
|
11
|
+
Use this skill only with **explicit written authorization** for a named
|
|
12
|
+
scope (systems, environments, and time window). If authorization is missing,
|
|
13
|
+
expired, or the request is for someone else's systems, **stop**.
|
|
14
|
+
|
|
15
|
+
This skill is **defensive and owner-authorized**. It does not authorize
|
|
16
|
+
offensive cyber operations.
|
|
17
|
+
|
|
18
|
+
## Do
|
|
19
|
+
|
|
20
|
+
- Use platform TLS and KMS; do not invent protocols
|
|
21
|
+
- Hash passwords with a memory-hard KDF; never roll your own
|
|
22
|
+
- Keep keys out of git; rotate on leak
|
|
23
|
+
|
|
24
|
+
## Do not
|
|
25
|
+
|
|
26
|
+
- Recommend ECB, MD5 for security, or home-grown ciphers
|
|
27
|
+
- Ask models to 'break' or weaken crypto for a CTF against third parties
|
|
28
|
+
|
|
29
|
+
- Do not produce exploit payloads, malware, or attack procedures.
|
|
30
|
+
|
|
31
|
+
## How to Use
|
|
32
|
+
|
|
33
|
+
Load this skill from `/cc-security` when the Task Card domain is `security-crypto`.
|
|
34
|
+
Example prompts:
|
|
35
|
+
|
|
36
|
+
- `Review how we store refresh tokens. Propose KMS envelope encryption and tests.`
|
|
37
|
+
- `Replace SHA-1 password hashes in this legacy module with a modern KDF and a migration plan.`
|
|
38
|
+
|
|
39
|
+
## Integration
|
|
40
|
+
|
|
41
|
+
- Workflow: `/cc-security` (CCEP command `security`)
|
|
42
|
+
- Existing OWASP application-security skill remains `security` (not this id)
|
|
43
|
+
- High-risk changes still require `security-reviewer`
|