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.
Files changed (122) hide show
  1. package/README.md +324 -87
  2. package/dist/core/compilation/compile-checker.d.ts +2 -0
  3. package/dist/core/loop/loop-engine.d.ts +3 -0
  4. package/dist/index.js +2701 -577
  5. package/dist/library.js +167 -18
  6. package/dist/validation/schemas.d.ts +390 -44
  7. package/package.json +4 -1
  8. package/presets/agy/AGENTS.md +3 -0
  9. package/presets/agy/gates/pre-commit/GATE.md +5 -4
  10. package/presets/agy/skills/backlog/SKILL.md +91 -0
  11. package/presets/agy/skills/openspec/SKILL.md +5 -1
  12. package/presets/agy/skills/security-ai-llm/SKILL.md +43 -0
  13. package/presets/agy/skills/security-blue-team/SKILL.md +43 -0
  14. package/presets/agy/skills/security-cloud/SKILL.md +43 -0
  15. package/presets/agy/skills/security-crypto/SKILL.md +43 -0
  16. package/presets/agy/skills/security-exploit-dev/SKILL.md +45 -0
  17. package/presets/agy/skills/security-grc/SKILL.md +43 -0
  18. package/presets/agy/skills/security-incident-response/SKILL.md +45 -0
  19. package/presets/agy/skills/security-log-analysis/SKILL.md +43 -0
  20. package/presets/agy/skills/security-malware-analysis/SKILL.md +44 -0
  21. package/presets/agy/skills/security-mobile/SKILL.md +43 -0
  22. package/presets/agy/skills/security-network/SKILL.md +43 -0
  23. package/presets/agy/skills/security-ot-ics/SKILL.md +43 -0
  24. package/presets/agy/skills/security-recon/SKILL.md +45 -0
  25. package/presets/agy/skills/security-red-team/SKILL.md +44 -0
  26. package/presets/agy/skills/security-reverse-engineering/SKILL.md +44 -0
  27. package/presets/agy/skills/security-soc-automation/SKILL.md +43 -0
  28. package/presets/agy/skills/security-threat-hunting/SKILL.md +43 -0
  29. package/presets/agy/skills/security-vuln-assessment/SKILL.md +45 -0
  30. package/presets/agy/skills/security-web/SKILL.md +44 -0
  31. package/presets/agy/workflows/cc-ask.md +2 -1
  32. package/presets/agy/workflows/cc-backlog.md +69 -0
  33. package/presets/agy/workflows/cc-explore.md +1 -1
  34. package/presets/agy/workflows/cc-openspec.md +3 -1
  35. package/presets/agy/workflows/cc-security.md +180 -0
  36. package/presets/claude/CLAUDE.md +4 -0
  37. package/presets/claude/commands/cc/ask.md +2 -1
  38. package/presets/claude/commands/cc/backlog.md +104 -0
  39. package/presets/claude/commands/cc/explore.md +1 -1
  40. package/presets/claude/commands/cc/openspec.md +16 -1
  41. package/presets/claude/commands/cc/security.md +179 -0
  42. package/presets/claude/gates/pre-commit/GATE.md +5 -4
  43. package/presets/claude/skills/backlog/SKILL.md +91 -0
  44. package/presets/claude/skills/openspec/SKILL.md +5 -1
  45. package/presets/claude/skills/security/SKILL.md +382 -0
  46. package/presets/claude/skills/security-ai-llm/SKILL.md +43 -0
  47. package/presets/claude/skills/security-blue-team/SKILL.md +43 -0
  48. package/presets/claude/skills/security-cloud/SKILL.md +43 -0
  49. package/presets/claude/skills/security-crypto/SKILL.md +43 -0
  50. package/presets/claude/skills/security-exploit-dev/SKILL.md +45 -0
  51. package/presets/claude/skills/security-grc/SKILL.md +43 -0
  52. package/presets/claude/skills/security-incident-response/SKILL.md +45 -0
  53. package/presets/claude/skills/security-log-analysis/SKILL.md +43 -0
  54. package/presets/claude/skills/security-malware-analysis/SKILL.md +44 -0
  55. package/presets/claude/skills/security-mobile/SKILL.md +43 -0
  56. package/presets/claude/skills/security-network/SKILL.md +43 -0
  57. package/presets/claude/skills/security-ot-ics/SKILL.md +43 -0
  58. package/presets/claude/skills/security-recon/SKILL.md +45 -0
  59. package/presets/claude/skills/security-red-team/SKILL.md +44 -0
  60. package/presets/claude/skills/security-reverse-engineering/SKILL.md +44 -0
  61. package/presets/claude/skills/security-soc-automation/SKILL.md +43 -0
  62. package/presets/claude/skills/security-threat-hunting/SKILL.md +43 -0
  63. package/presets/claude/skills/security-vuln-assessment/SKILL.md +45 -0
  64. package/presets/claude/skills/security-web/SKILL.md +44 -0
  65. package/presets/codex/commands/cc-ask.md +2 -1
  66. package/presets/codex/gates/pre-commit/GATE.md +5 -4
  67. package/presets/cursor/AGENTS.md +2 -2
  68. package/presets/cursor/commands/cc/ask.md +2 -1
  69. package/presets/cursor/commands/cc/backlog.md +105 -0
  70. package/presets/cursor/commands/cc/explore.md +1 -1
  71. package/presets/cursor/commands/cc/openspec.md +16 -1
  72. package/presets/cursor/commands/cc/security.md +179 -0
  73. package/presets/cursor/gates/pre-commit/GATE.md +5 -4
  74. package/presets/cursor/skills/backlog/SKILL.md +91 -0
  75. package/presets/cursor/skills/openspec/SKILL.md +5 -1
  76. package/presets/cursor/skills/security-ai-llm/SKILL.md +43 -0
  77. package/presets/cursor/skills/security-blue-team/SKILL.md +43 -0
  78. package/presets/cursor/skills/security-cloud/SKILL.md +43 -0
  79. package/presets/cursor/skills/security-crypto/SKILL.md +43 -0
  80. package/presets/cursor/skills/security-exploit-dev/SKILL.md +45 -0
  81. package/presets/cursor/skills/security-grc/SKILL.md +43 -0
  82. package/presets/cursor/skills/security-incident-response/SKILL.md +45 -0
  83. package/presets/cursor/skills/security-log-analysis/SKILL.md +43 -0
  84. package/presets/cursor/skills/security-malware-analysis/SKILL.md +44 -0
  85. package/presets/cursor/skills/security-mobile/SKILL.md +43 -0
  86. package/presets/cursor/skills/security-network/SKILL.md +43 -0
  87. package/presets/cursor/skills/security-ot-ics/SKILL.md +43 -0
  88. package/presets/cursor/skills/security-recon/SKILL.md +45 -0
  89. package/presets/cursor/skills/security-red-team/SKILL.md +44 -0
  90. package/presets/cursor/skills/security-reverse-engineering/SKILL.md +44 -0
  91. package/presets/cursor/skills/security-soc-automation/SKILL.md +43 -0
  92. package/presets/cursor/skills/security-threat-hunting/SKILL.md +43 -0
  93. package/presets/cursor/skills/security-vuln-assessment/SKILL.md +45 -0
  94. package/presets/cursor/skills/security-web/SKILL.md +44 -0
  95. package/presets/opencode/commands/cc-ask.md +2 -1
  96. package/presets/opencode/commands/cc-backlog.md +68 -0
  97. package/presets/opencode/commands/cc-explore.md +1 -1
  98. package/presets/opencode/commands/cc-openspec.md +3 -1
  99. package/presets/opencode/commands/cc-security.md +179 -0
  100. package/presets/opencode/gates/pre-commit/GATE.md +5 -4
  101. package/presets/opencode/skills/backlog/SKILL.md +91 -0
  102. package/presets/opencode/skills/openspec/SKILL.md +5 -1
  103. package/presets/opencode/skills/security-ai-llm/SKILL.md +43 -0
  104. package/presets/opencode/skills/security-blue-team/SKILL.md +43 -0
  105. package/presets/opencode/skills/security-cloud/SKILL.md +43 -0
  106. package/presets/opencode/skills/security-crypto/SKILL.md +43 -0
  107. package/presets/opencode/skills/security-exploit-dev/SKILL.md +45 -0
  108. package/presets/opencode/skills/security-grc/SKILL.md +43 -0
  109. package/presets/opencode/skills/security-incident-response/SKILL.md +45 -0
  110. package/presets/opencode/skills/security-log-analysis/SKILL.md +43 -0
  111. package/presets/opencode/skills/security-malware-analysis/SKILL.md +44 -0
  112. package/presets/opencode/skills/security-mobile/SKILL.md +43 -0
  113. package/presets/opencode/skills/security-network/SKILL.md +43 -0
  114. package/presets/opencode/skills/security-ot-ics/SKILL.md +43 -0
  115. package/presets/opencode/skills/security-recon/SKILL.md +45 -0
  116. package/presets/opencode/skills/security-red-team/SKILL.md +44 -0
  117. package/presets/opencode/skills/security-reverse-engineering/SKILL.md +44 -0
  118. package/presets/opencode/skills/security-soc-automation/SKILL.md +43 -0
  119. package/presets/opencode/skills/security-threat-hunting/SKILL.md +43 -0
  120. package/presets/opencode/skills/security-vuln-assessment/SKILL.md +45 -0
  121. package/presets/opencode/skills/security-web/SKILL.md +44 -0
  122. package/src/presets/council/council.yml +12 -0
@@ -0,0 +1,68 @@
1
+ ---
2
+ description:
3
+ Author BACKLOG.md — wayfinding, grilling, create or append items, validate
4
+ 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"`. Invoke
31
+ `repo-explorer`. Do not write `BACKLOG.md`. Scope must name real files.
32
+
33
+ ---
34
+
35
+ ## Step 2 — Relentless Grilling (task-coach)
36
+
37
+ Invoke `task-coach`. Measurable acceptance only. One grilling question at a time.
38
+
39
+ **STOP here.** Unresolved grilling questions populate `questionsForUser`;
40
+ `ccep evaluate --command backlog` halts until a human answers.
41
+
42
+ ---
43
+
44
+ ## Step 3 — Write or append BACKLOG.md
45
+
46
+ Apply skill `backlog`. Create from template if missing; otherwise append under
47
+ `## Items`. Next `BC-NNN` = max existing + 1. Status `READY`. Do not rewrite
48
+ `## Global` or `## Archive`. Do not `git add` `BACKLOG.md` or `openspec/`.
49
+
50
+ ---
51
+
52
+ ## Step 4 — Validate (mandatory gate)
53
+
54
+ Run `npx cc-codeconductor openspec validate`. If invalid, show errors and
55
+ canonical structure, fix, re-validate. **STOP** planning until valid.
56
+
57
+ ---
58
+
59
+ ## Step 5 — Plan new items
60
+
61
+ For each new `BC-id`: `npx cc-codeconductor openspec plan <BC-id>`.
62
+
63
+ ---
64
+
65
+ ## Completion
66
+
67
+ Report IDs, validate result, change folders. Tell the user to run `/cc-openspec`.
68
+ Apply skill `backlog`.
@@ -26,7 +26,7 @@ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"`. Invoke `
26
26
 
27
27
  ## Step 2 — Suggest next command (orchestrator)
28
28
 
29
- 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.
29
+ 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.
30
30
 
31
31
  ---
32
32
 
@@ -45,6 +45,8 @@ Use `$ARGUMENTS` BC-id or `npx cc-codeconductor openspec status` for next READY
45
45
 
46
46
  Run `npx cc-codeconductor openspec plan <BC-id>`. Show TaskCards and `openspec/changes/` path.
47
47
 
48
+ Drive status with CLI (do not edit openspec-state.json): `openspec start <cardId>`, `openspec done <cardId>`, `openspec block <cardId> --reason "…"`, `openspec archive <itemId>`.
49
+
48
50
  ---
49
51
 
50
52
  ## Step 4 — Execute loop
@@ -69,6 +71,6 @@ Reviewer approves or rejects against acceptance criteria. Reject → `IN_PROGRES
69
71
 
70
72
  ## Step 6 — Update
71
73
 
72
- Mark DONE, move to Archive in BACKLOG.md, run `openspec scan`.
74
+ Mark DONE with `openspec archive <itemId>` (all cards must be done), then run `openspec scan`.
73
75
 
74
76
  Apply skill `openspec` for format and state rules.
@@ -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.
@@ -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,11 +2,15 @@
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 editing BACKLOG.md.
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
 
8
9
  # OpenSpec / BACKLOG Skill
9
10
 
11
+ Authoring (create or append `BACKLOG.md`, then `openspec validate` / `plan`) is
12
+ `/cc-backlog` and skill `backlog`. This skill is **delivery**.
13
+
10
14
  ## BACKLOG.md contract
11
15
 
12
16
  `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`
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: security-exploit-dev
3
+ description: >
4
+ Understand how a confirmed vulnerability in an owned system is triggered so you can patch and test it. This is not exploit development for offense. No payloads, malware, or attack procedures.
5
+ ---
6
+
7
+ # Defensive Exploit Analysis (Authorized)
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
+ - Describe the bug class (e.g. missing authz) at a design level
21
+ - Write a regression test that fails before the fix and passes after
22
+ - Prefer sanitizers, type systems, and least-privilege patches
23
+ - Stop and refuse if the user asks for a working exploit, PoC payload, or bypass kit
24
+
25
+ ## Do not
26
+
27
+ - Write exploits, exploit PoCs, shellcode, or weaponized requests
28
+ - Document step-by-step attack procedures against any system
29
+ - Help with CTF flags, cracking, or unauthorized access
30
+
31
+ - Do not produce exploit payloads, malware, or attack procedures.
32
+
33
+ ## How to Use
34
+
35
+ Load this skill from `/cc-security` when the Task Card domain is `security-exploit-dev`.
36
+ Example prompts:
37
+
38
+ - `We confirmed IDOR on /invoices/:id in our app. Help design the authz check and a RED test — no exploit.`
39
+ - `Turn this crash report from our fuzzer into a defensive patch and a regression test.`
40
+
41
+ ## Integration
42
+
43
+ - Workflow: `/cc-security` (CCEP command `security`)
44
+ - Existing OWASP application-security skill remains `security` (not this id)
45
+ - High-risk changes still require `security-reviewer`
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: security-grc
3
+ description: >
4
+ Map controls to SOC2, ISO 27001, PCI, or internal policy for the org you work for. Evidence and control design — not audit theater.
5
+ ---
6
+
7
+ # GRC / Compliance Engineering
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
+ - Map each control to an owner, evidence path, and test
21
+ - Prefer automated evidence (CI, IaC, tickets) over screenshots
22
+ - Record exceptions with expiry dates
23
+
24
+ ## Do not
25
+
26
+ - Fabricate evidence or backdate approvals
27
+ - Copy another company's policies without legal review
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-grc`.
34
+ Example prompts:
35
+
36
+ - `Map our GitHub branch protection to SOC2 CC6.6 and list evidence.`
37
+ - `List gaps: secrets in git, missing MFA on GitHub org owners.`
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`