cc-codeconductor 0.5.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +387 -150
- package/dist/cli/errors.d.ts +65 -0
- package/dist/core/compilation/compile-checker.d.ts +53 -0
- package/dist/core/config/codeconductor-config.d.ts +42 -0
- package/dist/core/config/config-loader.d.ts +11 -0
- package/dist/core/filesystem/credential-guard.d.ts +18 -0
- package/dist/core/goal/goal-planner.d.ts +8 -0
- package/dist/core/goal/goal-state.d.ts +15 -0
- package/dist/core/loop/git-stats.d.ts +13 -0
- package/dist/core/loop/loop-engine.d.ts +82 -0
- package/dist/core/memory/episodic-store.d.ts +6 -0
- package/dist/core/memory/operational-state.d.ts +6 -0
- package/dist/core/orchestrator/runtime-orchestrator.d.ts +25 -0
- package/dist/core/planner/product-planner.d.ts +18 -0
- package/dist/core/presets/package-paths.d.ts +4 -0
- package/dist/core/product-graph/graph-store.d.ts +11 -0
- package/dist/core/product-graph/paths.d.ts +18 -0
- package/dist/core/verification/verification-runner.d.ts +57 -0
- package/dist/domain/loop/loop-state.d.ts +74 -0
- package/dist/domain/product/entities.d.ts +11 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +24165 -15800
- package/dist/library.js +2744 -0
- package/dist/utils/result.d.ts +36 -0
- package/dist/validation/schemas.d.ts +4006 -0
- package/package.json +18 -2
- package/policy.yml +12 -11
- package/presets/agy/AGENTS.md +14 -5
- package/presets/agy/gates/pre-commit/GATE.md +137 -0
- package/presets/agy/skills/backlog/SKILL.md +91 -0
- package/presets/agy/skills/cc-fix/SKILL.md +2 -2
- package/presets/agy/skills/cc-tdd-cycle/SKILL.md +11 -0
- package/presets/agy/skills/openspec/SKILL.md +5 -1
- package/presets/agy/skills/security-ai-llm/SKILL.md +43 -0
- package/presets/agy/skills/security-blue-team/SKILL.md +43 -0
- package/presets/agy/skills/security-cloud/SKILL.md +43 -0
- package/presets/agy/skills/security-crypto/SKILL.md +43 -0
- package/presets/agy/skills/security-exploit-dev/SKILL.md +45 -0
- package/presets/agy/skills/security-grc/SKILL.md +43 -0
- package/presets/agy/skills/security-incident-response/SKILL.md +45 -0
- package/presets/agy/skills/security-log-analysis/SKILL.md +43 -0
- package/presets/agy/skills/security-malware-analysis/SKILL.md +44 -0
- package/presets/agy/skills/security-mobile/SKILL.md +43 -0
- package/presets/agy/skills/security-network/SKILL.md +43 -0
- package/presets/agy/skills/security-ot-ics/SKILL.md +43 -0
- package/presets/agy/skills/security-recon/SKILL.md +45 -0
- package/presets/agy/skills/security-red-team/SKILL.md +44 -0
- package/presets/agy/skills/security-reverse-engineering/SKILL.md +44 -0
- package/presets/agy/skills/security-soc-automation/SKILL.md +43 -0
- package/presets/agy/skills/security-threat-hunting/SKILL.md +43 -0
- package/presets/agy/skills/security-vuln-assessment/SKILL.md +45 -0
- package/presets/agy/skills/security-web/SKILL.md +44 -0
- package/presets/agy/workflows/cc-api-contract.md +12 -0
- package/presets/agy/workflows/cc-ask.md +56 -0
- package/presets/agy/workflows/cc-backlog.md +69 -0
- package/presets/agy/workflows/cc-clarify.md +33 -0
- package/presets/agy/workflows/cc-council.md +31 -7
- package/presets/agy/workflows/cc-db-migration.md +22 -9
- package/presets/agy/workflows/cc-explore.md +37 -0
- package/presets/agy/workflows/cc-feature.md +41 -19
- package/presets/agy/workflows/cc-fix.md +50 -23
- package/presets/agy/workflows/cc-handoff.md +42 -0
- package/presets/agy/workflows/cc-iterative.md +128 -0
- package/presets/agy/workflows/cc-openspec.md +16 -1
- package/presets/agy/workflows/cc-pagespeed.md +12 -0
- package/presets/agy/workflows/cc-prototype.md +39 -0
- package/presets/agy/workflows/cc-refactor.md +12 -0
- package/presets/agy/workflows/cc-review.md +12 -0
- package/presets/agy/workflows/cc-scorecard.md +12 -0
- package/presets/agy/workflows/cc-security.md +180 -0
- package/presets/agy/workflows/cc-tdd-cycle.md +24 -0
- package/presets/agy/workflows/cc-test-plan.md +12 -0
- package/presets/agy/workflows/cc-triage.md +35 -0
- package/presets/claude/CLAUDE.md +68 -0
- package/presets/claude/commands/cc/api-contract.md +12 -0
- package/presets/claude/commands/cc/ask.md +56 -0
- package/presets/claude/commands/cc/backlog.md +104 -0
- package/presets/claude/commands/cc/clarify.md +32 -0
- package/presets/claude/commands/cc/council.md +87 -0
- package/presets/claude/commands/cc/db-migration.md +22 -9
- package/presets/claude/commands/cc/explore.md +36 -0
- package/presets/claude/commands/cc/feature.md +49 -22
- package/presets/claude/commands/cc/fix.md +74 -20
- package/presets/claude/commands/cc/handoff.md +44 -0
- package/presets/claude/commands/cc/iterative.md +132 -0
- package/presets/claude/commands/cc/openspec.md +41 -1
- package/presets/claude/commands/cc/pagespeed.md +12 -0
- package/presets/claude/commands/cc/prototype.md +38 -0
- package/presets/claude/commands/cc/refactor.md +152 -1
- package/presets/claude/commands/cc/review.md +78 -16
- package/presets/claude/commands/cc/scorecard.md +12 -0
- package/presets/claude/commands/cc/security.md +179 -0
- package/presets/claude/commands/cc/tdd-cycle.md +53 -3
- package/presets/claude/commands/cc/test-plan.md +12 -0
- package/presets/claude/commands/cc/triage.md +34 -0
- package/presets/claude/gates/pre-commit/GATE.md +137 -0
- package/presets/claude/settings.json +8 -46
- package/presets/claude/skills/backlog/SKILL.md +91 -0
- package/presets/claude/skills/openspec/SKILL.md +5 -1
- package/presets/claude/skills/security/SKILL.md +382 -0
- package/presets/claude/skills/security-ai-llm/SKILL.md +43 -0
- package/presets/claude/skills/security-blue-team/SKILL.md +43 -0
- package/presets/claude/skills/security-cloud/SKILL.md +43 -0
- package/presets/claude/skills/security-crypto/SKILL.md +43 -0
- package/presets/claude/skills/security-exploit-dev/SKILL.md +45 -0
- package/presets/claude/skills/security-grc/SKILL.md +43 -0
- package/presets/claude/skills/security-incident-response/SKILL.md +45 -0
- package/presets/claude/skills/security-log-analysis/SKILL.md +43 -0
- package/presets/claude/skills/security-malware-analysis/SKILL.md +44 -0
- package/presets/claude/skills/security-mobile/SKILL.md +43 -0
- package/presets/claude/skills/security-network/SKILL.md +43 -0
- package/presets/claude/skills/security-ot-ics/SKILL.md +43 -0
- package/presets/claude/skills/security-recon/SKILL.md +45 -0
- package/presets/claude/skills/security-red-team/SKILL.md +44 -0
- package/presets/claude/skills/security-reverse-engineering/SKILL.md +44 -0
- package/presets/claude/skills/security-soc-automation/SKILL.md +43 -0
- package/presets/claude/skills/security-threat-hunting/SKILL.md +43 -0
- package/presets/claude/skills/security-vuln-assessment/SKILL.md +45 -0
- package/presets/claude/skills/security-web/SKILL.md +44 -0
- package/presets/codex/AGENTS.md +6 -6
- package/presets/codex/commands/cc-ask.md +56 -0
- package/presets/codex/gates/pre-commit/GATE.md +137 -0
- package/presets/cursor/AGENTS.md +8 -8
- package/presets/cursor/agents/business-agent.md +44 -0
- package/presets/cursor/agents/continuous-architect.md +37 -0
- package/presets/cursor/agents/docs.md +1 -0
- package/presets/cursor/agents/goal-planner.md +1 -1
- package/presets/cursor/agents/impact-analyst.md +43 -0
- package/presets/cursor/agents/orchestrator.md +6 -6
- package/presets/cursor/commands/cc/api-contract.md +12 -0
- package/presets/cursor/commands/cc/ask.md +56 -0
- package/presets/cursor/commands/cc/backlog.md +105 -0
- package/presets/cursor/commands/cc/clarify.md +32 -0
- package/presets/cursor/commands/cc/council.md +87 -0
- package/presets/cursor/commands/cc/db-migration.md +22 -9
- package/presets/cursor/commands/cc/explore.md +36 -0
- package/presets/cursor/commands/cc/feature.md +41 -19
- package/presets/cursor/commands/cc/fix.md +47 -20
- package/presets/cursor/commands/cc/handoff.md +41 -0
- package/presets/cursor/commands/cc/iterative.md +133 -0
- package/presets/cursor/commands/cc/openspec.md +38 -8
- package/presets/cursor/commands/cc/pagespeed.md +12 -0
- package/presets/cursor/commands/cc/prototype.md +38 -0
- package/presets/cursor/commands/cc/refactor.md +12 -0
- package/presets/cursor/commands/cc/review.md +12 -0
- package/presets/cursor/commands/cc/scorecard.md +12 -0
- package/presets/cursor/commands/cc/security.md +179 -0
- package/presets/cursor/commands/cc/tdd-cycle.md +24 -0
- package/presets/cursor/commands/cc/test-plan.md +12 -0
- package/presets/cursor/commands/cc/triage.md +34 -0
- package/presets/cursor/gates/pre-commit/GATE.md +137 -0
- package/presets/cursor/rules/orchestration.mdc +1 -1
- package/presets/cursor/skills/backlog/SKILL.md +91 -0
- package/presets/cursor/skills/openspec/SKILL.md +5 -1
- package/presets/cursor/skills/security-ai-llm/SKILL.md +43 -0
- package/presets/cursor/skills/security-blue-team/SKILL.md +43 -0
- package/presets/cursor/skills/security-cloud/SKILL.md +43 -0
- package/presets/cursor/skills/security-crypto/SKILL.md +43 -0
- package/presets/cursor/skills/security-exploit-dev/SKILL.md +45 -0
- package/presets/cursor/skills/security-grc/SKILL.md +43 -0
- package/presets/cursor/skills/security-incident-response/SKILL.md +45 -0
- package/presets/cursor/skills/security-log-analysis/SKILL.md +43 -0
- package/presets/cursor/skills/security-malware-analysis/SKILL.md +44 -0
- package/presets/cursor/skills/security-mobile/SKILL.md +43 -0
- package/presets/cursor/skills/security-network/SKILL.md +43 -0
- package/presets/cursor/skills/security-ot-ics/SKILL.md +43 -0
- package/presets/cursor/skills/security-recon/SKILL.md +45 -0
- package/presets/cursor/skills/security-red-team/SKILL.md +44 -0
- package/presets/cursor/skills/security-reverse-engineering/SKILL.md +44 -0
- package/presets/cursor/skills/security-soc-automation/SKILL.md +43 -0
- package/presets/cursor/skills/security-threat-hunting/SKILL.md +43 -0
- package/presets/cursor/skills/security-vuln-assessment/SKILL.md +45 -0
- package/presets/cursor/skills/security-web/SKILL.md +44 -0
- package/presets/opencode/agents/architect.md +22 -1
- package/presets/opencode/agents/complexity-auditor.md +16 -1
- package/presets/opencode/agents/contract-builder.md +17 -1
- package/presets/opencode/agents/devil.md +158 -0
- package/presets/opencode/agents/docs.md +19 -1
- package/presets/opencode/agents/goal-planner.md +32 -2
- package/presets/opencode/agents/implementer.md +32 -2
- package/presets/opencode/agents/orchestrator.md +79 -12
- package/presets/opencode/agents/planner.md +61 -0
- package/presets/opencode/agents/repo-explorer.md +16 -0
- package/presets/opencode/agents/reviewer.md +33 -3
- package/presets/opencode/agents/security-reviewer.md +31 -1
- package/presets/opencode/agents/task-coach.md +69 -1
- package/presets/opencode/agents/tester.md +18 -1
- package/presets/opencode/commands/cc-api-contract.md +12 -0
- package/presets/opencode/commands/cc-ask.md +56 -0
- package/presets/opencode/commands/cc-backlog.md +68 -0
- package/presets/opencode/commands/cc-clarify.md +31 -0
- package/presets/opencode/commands/cc-council.md +87 -0
- package/presets/opencode/commands/cc-db-migration.md +22 -9
- package/presets/opencode/commands/cc-explore.md +35 -0
- package/presets/opencode/commands/cc-feature.md +41 -19
- package/presets/opencode/commands/cc-fix.md +50 -23
- package/presets/opencode/commands/cc-handoff.md +40 -0
- package/presets/opencode/commands/cc-iterative.md +127 -0
- package/presets/opencode/commands/cc-openspec.md +16 -1
- package/presets/opencode/commands/cc-pagespeed.md +12 -0
- package/presets/opencode/commands/cc-prototype.md +37 -0
- package/presets/opencode/commands/cc-refactor.md +12 -0
- package/presets/opencode/commands/cc-review.md +12 -0
- package/presets/opencode/commands/cc-scorecard.md +12 -0
- package/presets/opencode/commands/cc-security.md +179 -0
- package/presets/opencode/commands/cc-tdd-cycle.md +24 -0
- package/presets/opencode/commands/cc-test-plan.md +12 -0
- package/presets/opencode/commands/cc-triage.md +33 -0
- package/presets/opencode/gates/pre-commit/GATE.md +137 -0
- package/presets/opencode/prompts/v0.1.0/DEPRECATED.md +11 -0
- package/presets/opencode/prompts/v0.2.0/DEPRECATED.md +11 -0
- package/presets/opencode/prompts/v0.3.0/DEPRECATED.md +11 -0
- package/presets/opencode/prompts/v0.4.0/DEPRECATED.md +11 -0
- package/presets/opencode/prompts/v0.5.0/goal-planner.md +1 -1
- package/presets/opencode/prompts/v0.5.0/orchestrator.md +6 -6
- package/presets/opencode/prompts/v0.6.0/implementer.md +35 -0
- package/presets/opencode/prompts/v0.6.0/planner.md +36 -0
- package/presets/opencode/prompts/v0.6.0/reviewer.md +40 -0
- package/presets/opencode/prompts/v1.0.0/README.md +47 -0
- package/presets/opencode/prompts/v1.0.0/architect.md +259 -0
- package/presets/opencode/prompts/v1.0.0/complexity-auditor.md +116 -0
- package/presets/opencode/prompts/v1.0.0/contract-builder.md +120 -0
- package/presets/opencode/prompts/v1.0.0/devil.md +169 -0
- package/presets/opencode/prompts/v1.0.0/docs.md +229 -0
- package/presets/opencode/prompts/v1.0.0/goal-planner.md +123 -0
- package/presets/opencode/prompts/v1.0.0/implementer.md +228 -0
- package/presets/opencode/prompts/v1.0.0/orchestrator.md +474 -0
- package/presets/opencode/prompts/v1.0.0/planner.md +72 -0
- package/presets/opencode/prompts/v1.0.0/repo-explorer.md +147 -0
- package/presets/opencode/prompts/v1.0.0/reviewer.md +295 -0
- package/presets/opencode/prompts/v1.0.0/security-reviewer.md +170 -0
- package/presets/opencode/prompts/v1.0.0/task-coach.md +235 -0
- package/presets/opencode/prompts/v1.0.0/tester.md +298 -0
- package/presets/opencode/skills/backlog/SKILL.md +91 -0
- package/presets/opencode/skills/openspec/SKILL.md +5 -1
- package/presets/opencode/skills/security-ai-llm/SKILL.md +43 -0
- package/presets/opencode/skills/security-blue-team/SKILL.md +43 -0
- package/presets/opencode/skills/security-cloud/SKILL.md +43 -0
- package/presets/opencode/skills/security-crypto/SKILL.md +43 -0
- package/presets/opencode/skills/security-exploit-dev/SKILL.md +45 -0
- package/presets/opencode/skills/security-grc/SKILL.md +43 -0
- package/presets/opencode/skills/security-incident-response/SKILL.md +45 -0
- package/presets/opencode/skills/security-log-analysis/SKILL.md +43 -0
- package/presets/opencode/skills/security-malware-analysis/SKILL.md +44 -0
- package/presets/opencode/skills/security-mobile/SKILL.md +43 -0
- package/presets/opencode/skills/security-network/SKILL.md +43 -0
- package/presets/opencode/skills/security-ot-ics/SKILL.md +43 -0
- package/presets/opencode/skills/security-recon/SKILL.md +45 -0
- package/presets/opencode/skills/security-red-team/SKILL.md +44 -0
- package/presets/opencode/skills/security-reverse-engineering/SKILL.md +44 -0
- package/presets/opencode/skills/security-soc-automation/SKILL.md +43 -0
- package/presets/opencode/skills/security-threat-hunting/SKILL.md +43 -0
- package/presets/opencode/skills/security-vuln-assessment/SKILL.md +45 -0
- package/presets/opencode/skills/security-web/SKILL.md +44 -0
- package/presets/seo-hotel/settings.json +0 -17
- package/src/presets/council/council.yml +12 -0
- package/src/presets/manifests/agy.yml +2 -2
- package/src/presets/manifests/claude.yml +2 -2
- package/src/presets/manifests/codex.yml +2 -2
- package/src/presets/manifests/cursor.yml +2 -2
- package/src/presets/manifests/gemini.yml +2 -2
- package/src/presets/manifests/opencode.yml +2 -2
- package/src/presets/models/agy.yml +93 -66
- package/src/presets/models/claude.yml +79 -53
- package/src/presets/models/codex.yml +79 -54
- package/src/presets/models/cursor.yml +72 -58
- package/src/presets/models/gemini.yml +79 -53
- package/src/presets/models/opencode.yml +72 -46
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
[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.
|
|
@@ -18,6 +18,19 @@ Describe what behavior you want to implement. Include:
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
+
## Step 0 — CCEP Bootstrap
|
|
22
|
+
|
|
23
|
+
Command: `tdd-cycle` (fixed for this workflow — do not infer from user text)
|
|
24
|
+
|
|
25
|
+
1. Run: `npx cc-codeconductor ccep parse --command tdd-cycle "$ARGUMENTS" --output json`
|
|
26
|
+
2. Run: `npx cc-codeconductor ccep resolve --command tdd-cycle "$ARGUMENTS" --output json`
|
|
27
|
+
3. Run: `npx cc-codeconductor ccep profile tdd-cycle --output json`
|
|
28
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command tdd-cycle --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
29
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
30
|
+
Canonical delivery order is test-before-implement whenever both phases apply.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
21
34
|
## Before you begin — mandatory pre-check
|
|
22
35
|
|
|
23
36
|
This command enforces strict TDD discipline. The three phases are sequential and
|
|
@@ -30,13 +43,38 @@ non-negotiable:
|
|
|
30
43
|
Do not write implementation code during RED. Do not refactor during GREEN.
|
|
31
44
|
Mixing phases invalidates the cycle.
|
|
32
45
|
|
|
46
|
+
## Verifiable phase gates
|
|
47
|
+
|
|
48
|
+
RED → GREEN and GREEN → REFACTOR are enforced by `tddCycleStateMachine` in
|
|
49
|
+
`domain/loop`. Evidence must be captured with `captureTddSuiteEvidence` (verification
|
|
50
|
+
runner) — do not hand-edit JSON under `.codeconductor/evidence/`.
|
|
51
|
+
|
|
52
|
+
- RED→GREEN requires runner evidence that the suite **failed**.
|
|
53
|
+
- GREEN→REFACTOR requires runner evidence that the suite **passed**.
|
|
54
|
+
|
|
55
|
+
Do not advance phases until that evidence exists.
|
|
56
|
+
|
|
57
|
+
Each cycle covers a single vertical slice of behavior — one cycle, one
|
|
58
|
+
behavior — and follows red-before-green: RED must complete before GREEN
|
|
59
|
+
starts.
|
|
60
|
+
|
|
33
61
|
---
|
|
34
62
|
|
|
35
63
|
## Phase 1 — RED (Tester role)
|
|
36
64
|
|
|
37
65
|
Adopt the **Tester** role as defined in `CLAUDE.md`.
|
|
38
66
|
|
|
39
|
-
### 1a —
|
|
67
|
+
### 1a — Agree on the seam
|
|
68
|
+
|
|
69
|
+
Before writing any test, identify and state the seam — the point where the
|
|
70
|
+
behavior under test can be exercised and observed in isolation (a function
|
|
71
|
+
boundary, an interface, an injectable dependency). Confirm the seam does not
|
|
72
|
+
require reaching into implementation internals.
|
|
73
|
+
|
|
74
|
+
If no seam exists yet (the code is not structured to allow isolated testing),
|
|
75
|
+
say so and agree on the minimal seam to introduce before continuing.
|
|
76
|
+
|
|
77
|
+
### 1b — Scope clarification
|
|
40
78
|
|
|
41
79
|
Before writing any test, confirm:
|
|
42
80
|
|
|
@@ -47,7 +85,7 @@ Before writing any test, confirm:
|
|
|
47
85
|
|
|
48
86
|
If the scope is ambiguous, ask one clarifying question and wait for the answer.
|
|
49
87
|
|
|
50
|
-
###
|
|
88
|
+
### 1c — Write the failing test
|
|
51
89
|
|
|
52
90
|
Write a test that:
|
|
53
91
|
|
|
@@ -61,7 +99,19 @@ Write a test that:
|
|
|
61
99
|
Do not write the implementation. Do not make the test pass by any means other
|
|
62
100
|
than the implementation that will follow in Phase 2.
|
|
63
101
|
|
|
64
|
-
###
|
|
102
|
+
### 1d — Anti-pattern checklist
|
|
103
|
+
|
|
104
|
+
Before declaring the test ready, verify none of these anti-patterns apply:
|
|
105
|
+
|
|
106
|
+
- **Implementation-coupled** — asserts internal details instead of observable
|
|
107
|
+
behavior.
|
|
108
|
+
- **Tautological** — cannot fail given the test's own setup.
|
|
109
|
+
- **Horizontal slicing** — spans multiple unrelated behaviors instead of one
|
|
110
|
+
vertical slice.
|
|
111
|
+
|
|
112
|
+
If any anti-pattern applies, rewrite the test before continuing.
|
|
113
|
+
|
|
114
|
+
### 1e — Run the test suite and confirm RED
|
|
65
115
|
|
|
66
116
|
Run the test suite. The new test must fail. Existing tests must pass.
|
|
67
117
|
|
|
@@ -20,6 +20,18 @@ proceeding.
|
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
+
## Step 0 — CCEP Bootstrap
|
|
24
|
+
|
|
25
|
+
Command: `test-plan` (fixed for this workflow — do not infer from user text)
|
|
26
|
+
|
|
27
|
+
1. Run: `npx cc-codeconductor ccep parse --command test-plan "$ARGUMENTS" --output json`
|
|
28
|
+
2. Run: `npx cc-codeconductor ccep resolve --command test-plan "$ARGUMENTS" --output json`
|
|
29
|
+
3. Run: `npx cc-codeconductor ccep profile test-plan --output json`
|
|
30
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command test-plan --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
31
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
23
35
|
## Step 1 — Scope confirmation
|
|
24
36
|
|
|
25
37
|
Before generating the test plan, confirm the scope is well-defined.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
[cc: alias] Classify a request into type, risk, and the destination CodeConductor command.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Triage Workflow
|
|
7
|
+
|
|
8
|
+
Triage request: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
## Step 0 — CCEP Bootstrap
|
|
11
|
+
|
|
12
|
+
Command: `triage` (fixed for this workflow — do not infer from user text)
|
|
13
|
+
|
|
14
|
+
1. Run: `npx cc-codeconductor ccep parse --command triage "$ARGUMENTS" --output json`
|
|
15
|
+
2. Run: `npx cc-codeconductor ccep resolve --command triage "$ARGUMENTS" --output json`
|
|
16
|
+
3. Run: `npx cc-codeconductor ccep profile triage --output json`
|
|
17
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command triage --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
18
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Step 1 — Classify (task-coach)
|
|
23
|
+
|
|
24
|
+
Invoke `task-coach`. Produce: title, type (`feature` | `fix` | `refactor` | `review` | `docs` | `test`), risk, named scope, and the destination command (`feature`, `fix`, `refactor`, `review`, `explore`, …).
|
|
25
|
+
|
|
26
|
+
Ask one question per unresolved branch. If the human is unavailable, emit a Markdown questionnaire and stop at ConfirmationGate.
|
|
27
|
+
|
|
28
|
+
**STOP here. Show the classification and wait for confirmation before running the destination workflow.**
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Completion
|
|
33
|
+
|
|
34
|
+
Do not implement. Hand the human a destination slash command and a partial Task Card.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Pre-commit Gate: Typecheck, Lint, and Test
|
|
2
|
+
|
|
3
|
+
Este gate instala un hook `pre-commit` que ejecuta `bun run typecheck`, `bun run lint` y `bun run test` antes de permitir commits en el repositorio. Si cualquiera de estos comandos falla, el commit es bloqueado.
|
|
4
|
+
|
|
5
|
+
## Cuándo usar
|
|
6
|
+
|
|
7
|
+
**Para agentes**: Integra este gate en flujos de desarrollo local cuando quieras garantizar que los cambios typecheck correctamente y pasan los tests antes de ser cometidos.
|
|
8
|
+
|
|
9
|
+
**Para equipos**: Utiliza este gate como barrera de calidad local (sin dependencias externas) para prevenir commits con errores de tipado o tests fallidos.
|
|
10
|
+
|
|
11
|
+
## Instalación
|
|
12
|
+
|
|
13
|
+
### Paso 1: Descarga el script
|
|
14
|
+
|
|
15
|
+
El script está embebido abajo (sección "Script Installer").
|
|
16
|
+
|
|
17
|
+
### Paso 2: Ejecuta en la raíz de tu proyecto
|
|
18
|
+
|
|
19
|
+
Desde la raíz del repositorio (o cualquier subdirectorio), extrae el bloque ```bash de este archivo y ejecuta:
|
|
20
|
+
|
|
21
|
+
bash << 'SCRIPT_EOF'
|
|
22
|
+
#!/bin/bash
|
|
23
|
+
set -e
|
|
24
|
+
# [contenido del bloque bash de abajo]
|
|
25
|
+
SCRIPT_EOF
|
|
26
|
+
|
|
27
|
+
O, más simplemente, guarda el script en un archivo temporal y ejecútalo:
|
|
28
|
+
|
|
29
|
+
curl -s https://raw.githubusercontent.com/.../ | bash
|
|
30
|
+
|
|
31
|
+
### Paso 3: Verifica
|
|
32
|
+
|
|
33
|
+
Después de la instalación, debería verse:
|
|
34
|
+
|
|
35
|
+
Pre-commit hook installed successfully.
|
|
36
|
+
|
|
37
|
+
## Script Installer
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
#!/bin/bash
|
|
41
|
+
set -e
|
|
42
|
+
|
|
43
|
+
# Resolver git directory dinámicamente (worktree-safe)
|
|
44
|
+
GIT_DIR=$(git rev-parse --git-dir)
|
|
45
|
+
HOOK_PATH="$GIT_DIR/hooks/pre-commit"
|
|
46
|
+
|
|
47
|
+
# Detectar Husky o lint-staged en package.json
|
|
48
|
+
if grep -q '"husky"' package.json 2>/dev/null || grep -q '"lint-staged"' package.json 2>/dev/null; then
|
|
49
|
+
echo "Warning: Husky or lint-staged detected in package.json. Installation skipped."
|
|
50
|
+
exit 0
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
# Verificar si un pre-commit hook ya existe
|
|
54
|
+
if [ -f "$HOOK_PATH" ]; then
|
|
55
|
+
echo "Warning: Pre-commit hook already exists at $HOOK_PATH. Not overwriting."
|
|
56
|
+
exit 0
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Crear directorio hooks si no existe
|
|
60
|
+
mkdir -p "$GIT_DIR/hooks"
|
|
61
|
+
|
|
62
|
+
# Escribir el hook pre-commit
|
|
63
|
+
cat > "$HOOK_PATH" << 'HOOK_EOF'
|
|
64
|
+
#!/bin/bash
|
|
65
|
+
bun run typecheck || exit 1
|
|
66
|
+
bun run lint || exit 1
|
|
67
|
+
bun run test || exit 1
|
|
68
|
+
HOOK_EOF
|
|
69
|
+
|
|
70
|
+
# Hacer el hook ejecutable
|
|
71
|
+
chmod +x "$HOOK_PATH"
|
|
72
|
+
|
|
73
|
+
echo "Pre-commit hook installed successfully."
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Notas de implementación
|
|
77
|
+
|
|
78
|
+
- **Sin dependencias externas**: El script no instala Husky, lint-staged, ni ninguna otra herramienta. Solo escribe un archivo shell y configura permisos.
|
|
79
|
+
- **Resolución dinámica de git dir**: Usa `git rev-parse --git-dir` para localizar el directorio correcto, incluso en worktrees.
|
|
80
|
+
- **Detección de conflictos**: Si Husky o lint-staged ya está en `package.json`, el script avisa y no instala para evitar conflictos.
|
|
81
|
+
- **Protección de hooks existentes**: Si ya existe un `.git/hooks/pre-commit`, el script no lo sobrescribe.
|
|
82
|
+
- **Solo Bun**: El hook ejecuta `bun run typecheck`, `bun run lint` y `bun run test`. Asegúrate de que estos scripts están definidos en `package.json`.
|
|
83
|
+
|
|
84
|
+
## Verificación
|
|
85
|
+
|
|
86
|
+
Después de instalar, verifica que el hook está en su lugar.
|
|
87
|
+
|
|
88
|
+
Para verificar, ejecuta:
|
|
89
|
+
|
|
90
|
+
ls -la .git/hooks/pre-commit
|
|
91
|
+
|
|
92
|
+
Debe mostrar algo como:
|
|
93
|
+
|
|
94
|
+
-rwxr-xr-x user group ... .git/hooks/pre-commit
|
|
95
|
+
|
|
96
|
+
Luego, intenta hacer un commit. Si hay errores de tipo o tests fallidos, el commit será bloqueado:
|
|
97
|
+
|
|
98
|
+
git add .
|
|
99
|
+
git commit -m "test"
|
|
100
|
+
# Si typecheck o test falla, verás el error y el commit será abortado.
|
|
101
|
+
|
|
102
|
+
## Troubleshooting
|
|
103
|
+
|
|
104
|
+
### "Warning: Pre-commit hook already exists"
|
|
105
|
+
|
|
106
|
+
Ya hay un hook pre-commit. Revisa su contenido:
|
|
107
|
+
|
|
108
|
+
cat .git/hooks/pre-commit
|
|
109
|
+
|
|
110
|
+
Si quieres reemplazarlo, bórralo y ejecuta el script nuevamente:
|
|
111
|
+
|
|
112
|
+
rm .git/hooks/pre-commit
|
|
113
|
+
bash /path/to/installer
|
|
114
|
+
|
|
115
|
+
### "Warning: Husky or lint-staged detected"
|
|
116
|
+
|
|
117
|
+
Tu proyecto usa Husky o lint-staged. Este gate no se instala para evitar conflictos. Si quieres usar este gate, remove Husky/lint-staged de `package.json` y ejecuta de nuevo.
|
|
118
|
+
|
|
119
|
+
### Hook no se ejecuta al hacer commit
|
|
120
|
+
|
|
121
|
+
Verifica que el hook es ejecutable:
|
|
122
|
+
|
|
123
|
+
chmod +x .git/hooks/pre-commit
|
|
124
|
+
|
|
125
|
+
Verifica que `bun run typecheck`, `bun run lint` y `bun run test` existen en `package.json`:
|
|
126
|
+
|
|
127
|
+
cat package.json | grep -A 5 '"scripts"'
|
|
128
|
+
|
|
129
|
+
### "command not found: bun"
|
|
130
|
+
|
|
131
|
+
Bun no está instalado o no está en PATH. Instala Bun desde https://bun.sh o configura PATH adecuadamente.
|
|
132
|
+
|
|
133
|
+
## Adicional: Desinstalación
|
|
134
|
+
|
|
135
|
+
Para remover el hook, simplemente bórralo:
|
|
136
|
+
|
|
137
|
+
rm .git/hooks/pre-commit
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
|
3
3
|
"env": {
|
|
4
4
|
"CLAUDE_CODE_ATTRIBUTION_HEADER": "0",
|
|
5
|
-
"CLAUDE_CODE_DISABLE_1M_CONTEXT": "
|
|
5
|
+
"CLAUDE_CODE_DISABLE_1M_CONTEXT": "0",
|
|
6
6
|
"CLAUDE_CODE_DISABLE_AUTO_MEMORY": "1",
|
|
7
7
|
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
|
|
8
8
|
"CLAUDE_CODE_DISABLE_TERMINAL_TITLE": "1",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT": "1",
|
|
14
14
|
"ENABLE_TOOL_SEARCH": "auto",
|
|
15
15
|
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "80",
|
|
16
|
-
"CLAUDE_CODE_SUBPROCESS_ENV_SCRUB": "
|
|
16
|
+
"CLAUDE_CODE_SUBPROCESS_ENV_SCRUB": "0",
|
|
17
17
|
"CLAUDE_CODE_SUBAGENT_MODEL": "haiku",
|
|
18
18
|
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
|
|
19
19
|
"MAX_THINKING_TOKENS": "24000",
|
|
@@ -85,20 +85,6 @@
|
|
|
85
85
|
"Bash(docker compose ps*)",
|
|
86
86
|
"Bash(docker compose logs*)",
|
|
87
87
|
"Read(**)",
|
|
88
|
-
"Write(./src/**)",
|
|
89
|
-
"Write(./app/**)",
|
|
90
|
-
"Write(./pages/**)",
|
|
91
|
-
"Write(./components/**)",
|
|
92
|
-
"Write(./lib/**)",
|
|
93
|
-
"Write(./tests/**)",
|
|
94
|
-
"Write(./test/**)",
|
|
95
|
-
"Write(./__tests__/**)",
|
|
96
|
-
"Write(./prisma/**)",
|
|
97
|
-
"Write(./drizzle/**)",
|
|
98
|
-
"Write(./public/**)",
|
|
99
|
-
"Write(./styles/**)",
|
|
100
|
-
"Write(./scripts/**)",
|
|
101
|
-
"Write(./docs/**)",
|
|
102
88
|
"Edit(**)",
|
|
103
89
|
"WebFetch(*)"
|
|
104
90
|
],
|
|
@@ -144,34 +130,18 @@
|
|
|
144
130
|
"Read(~/.ssh/**)",
|
|
145
131
|
"Read(~/.aws/**)",
|
|
146
132
|
"Read(~/.gnupg/**)",
|
|
147
|
-
"Write(./.env)",
|
|
148
|
-
"Write(./.env.*)",
|
|
149
|
-
"Write(./**/.env)",
|
|
150
133
|
"Edit(./.env)",
|
|
151
134
|
"Edit(./.env.*)",
|
|
152
135
|
"Edit(./**/.env)"
|
|
153
136
|
],
|
|
154
137
|
"ask": [
|
|
155
|
-
"Bash(git push*)",
|
|
156
138
|
"Bash(git push --force*)",
|
|
157
139
|
"Bash(git reset --hard*)",
|
|
158
|
-
"Bash(npm install*)",
|
|
159
|
-
"Bash(npm i *)",
|
|
160
|
-
"Bash(pnpm install*)",
|
|
161
|
-
"Bash(pnpm add *)",
|
|
162
|
-
"Bash(yarn add *)",
|
|
163
|
-
"Bash(pip install*)",
|
|
164
140
|
"Bash(docker run*)",
|
|
165
141
|
"Bash(docker compose up*)",
|
|
166
|
-
"Bash(docker compose down*)"
|
|
167
|
-
"Bash(./gradlew build*)",
|
|
168
|
-
"Bash(./gradlew bootRun*)",
|
|
169
|
-
"Bash(mvn install*)",
|
|
170
|
-
"Bash(mvn deploy*)",
|
|
171
|
-
"Bash(vercel*)",
|
|
172
|
-
"Bash(npx vercel*)"
|
|
142
|
+
"Bash(docker compose down*)"
|
|
173
143
|
],
|
|
174
|
-
"defaultMode": "
|
|
144
|
+
"defaultMode": "bypassPermissions",
|
|
175
145
|
"disableBypassPermissionsMode": "disable"
|
|
176
146
|
},
|
|
177
147
|
"hooks": {
|
|
@@ -200,7 +170,7 @@
|
|
|
200
170
|
"hooks": [
|
|
201
171
|
{
|
|
202
172
|
"type": "command",
|
|
203
|
-
"command": "if echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '(\\.env|secrets/|id_rsa|\\.pem|\\.key)\\b' && echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '(cat|less|more|head|tail|cp |mv |scp )'; then echo 'Bloqueado: intento de leer archivos sensibles' >&2; exit 2; fi"
|
|
173
|
+
"command": "if echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '(\\.env|secrets/|id_rsa|\\.pem|\\.key)\\b' && echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '(cat|less|more|head|tail|cp |mv |scp )'; then echo 'Bloqueado: intento de leer archivos sensibles' >&2; exit 2; elif echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '^\\s*git\\s+(push|reset\\s+--hard)' || echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '^\\s*git\\s+clean\\s+(-[a-z]*f[a-z]*|--force)' || echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '^\\s*git\\s+branch\\s+(-D|--delete\\s+--force)' || echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '^\\s*git\\s+checkout\\s+(-f|--force|--discard-changes|--theirs|--ours|-\\s|-$)' || echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '^\\s*git\\s+restore\\s+(-f|--force|--discard-changes|--theirs|--ours)'; then echo \"Bloqueado: El agente no tiene autoridad sobre este comando.\" >&2; exit 2; fi"
|
|
204
174
|
}
|
|
205
175
|
]
|
|
206
176
|
}
|
|
@@ -240,17 +210,9 @@
|
|
|
240
210
|
"allowLocalBinding": true
|
|
241
211
|
},
|
|
242
212
|
"filesystem": {
|
|
243
|
-
"denyRead": [
|
|
244
|
-
"~/.ssh",
|
|
245
|
-
"~/.aws",
|
|
246
|
-
"~/.gnupg",
|
|
247
|
-
"./.env",
|
|
248
|
-
"./.env.*"
|
|
249
|
-
]
|
|
213
|
+
"denyRead": ["~/.ssh", "~/.aws", "~/.gnupg", "./.env", "./.env.*"]
|
|
250
214
|
},
|
|
251
|
-
"excludedCommands": [
|
|
252
|
-
"docker *"
|
|
253
|
-
]
|
|
215
|
+
"excludedCommands": ["docker *"]
|
|
254
216
|
},
|
|
255
217
|
"extraKnownMarketplaces": {
|
|
256
218
|
"agricidaniel-claude-seo": {
|
|
@@ -264,7 +226,7 @@
|
|
|
264
226
|
"feedbackSurveyRate": 0,
|
|
265
227
|
"spinnerTipsEnabled": false,
|
|
266
228
|
"alwaysThinkingEnabled": true,
|
|
267
|
-
"effortLevel": "
|
|
229
|
+
"effortLevel": "medium",
|
|
268
230
|
"awaySummaryEnabled": false,
|
|
269
231
|
"showClearContextOnPlanAccept": true,
|
|
270
232
|
"autoUpdatesChannel": "stable",
|
|
@@ -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
|
|
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:
|