kodelyth-ecc 1.5.9 → 1.7.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 (123) hide show
  1. package/.github/workflows/publish.yml +19 -0
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +455 -0
  4. package/CLAUDE.md +48 -16
  5. package/README.md +265 -81
  6. package/VERSION +1 -1
  7. package/actions/ecc-review/README.md +243 -0
  8. package/actions/ecc-review/action.yml +158 -0
  9. package/actions/ecc-review/post-comment.js +171 -0
  10. package/actions/ecc-review/run-review.js +285 -0
  11. package/agents/backdoor-hunter.md +260 -0
  12. package/agents/chaos-engineer.md +251 -0
  13. package/agents/code-stealer-detector.md +228 -0
  14. package/agents/jailbreak-tester.md +222 -0
  15. package/agents/license-violation-finder.md +212 -0
  16. package/agents/prompt-injection-hunter.md +126 -0
  17. package/agents/secret-hunter.md +209 -0
  18. package/agents/supply-chain-auditor.md +195 -0
  19. package/bin/kodelyth-ecc.js +875 -1
  20. package/bundles/enterprise.md +172 -0
  21. package/bundles/indie-hacker.md +106 -0
  22. package/bundles/red-team.md +138 -0
  23. package/cat +0 -0
  24. package/commands/dashboard.md +67 -0
  25. package/commands/devil-mode.md +121 -0
  26. package/commands/memory-evolve.md +71 -0
  27. package/commands/replay.md +61 -0
  28. package/commands/route-model.md +48 -0
  29. package/commands/swarm.md +68 -0
  30. package/commands/verify-supply-chain.md +59 -0
  31. package/docs/dashboard.md +211 -0
  32. package/docs/evolve.md +303 -0
  33. package/docs/mcp-clients.md +167 -0
  34. package/docs/mcp.md +178 -0
  35. package/docs/replay.md +244 -0
  36. package/docs/supply-chain.md +207 -0
  37. package/docs/swarm.md +243 -0
  38. package/hooks/hooks.json +52 -0
  39. package/hooks/memory/auto-recall.js +29 -1
  40. package/hooks/safety/README.md +124 -0
  41. package/hooks/safety/lib/patterns.js +179 -0
  42. package/hooks/safety/prompt-injection-guard.js +179 -0
  43. package/hooks/safety/token-budget.js +229 -0
  44. package/install.ps1 +199 -2
  45. package/install.sh +286 -4
  46. package/package.json +30 -4
  47. package/rules/common/agent-intent-routing.md +182 -0
  48. package/rules/common/cost-aware-model-routing.md +152 -0
  49. package/scripts/dashboard/data.js +353 -0
  50. package/scripts/dashboard/server.js +324 -0
  51. package/scripts/dashboard/static/index.html +645 -0
  52. package/scripts/evolve/analyze.js +303 -0
  53. package/scripts/evolve/proposals.js +162 -0
  54. package/scripts/evolve/stats.js +219 -0
  55. package/scripts/mcp/catalog.js +244 -0
  56. package/scripts/mcp/client.js +181 -0
  57. package/scripts/mcp/prompts.js +133 -0
  58. package/scripts/mcp/resources.js +94 -0
  59. package/scripts/mcp/server.js +153 -0
  60. package/scripts/mcp/tools.js +465 -0
  61. package/scripts/replay/bundle.js +191 -0
  62. package/scripts/replay/replay.js +107 -0
  63. package/scripts/router/classify.js +232 -0
  64. package/scripts/supply-chain/manifest.js +154 -0
  65. package/scripts/supply-chain/sbom.js +202 -0
  66. package/scripts/supply-chain/verify.js +102 -0
  67. package/scripts/swarm/build-plan.js +193 -0
  68. package/skills/cost-aware-model-routing/SKILL.md +153 -0
  69. package/skills/kodelyth-quickstart/SKILL.md +7 -0
  70. package/skills/observability-dashboard/SKILL.md +119 -0
  71. package/skills/self-evolving-memory/SKILL.md +175 -0
  72. package/skills/session-replay/SKILL.md +199 -0
  73. package/skills/supply-chain-verification/SKILL.md +201 -0
  74. package/skills/swarm-orchestrator/SKILL.md +177 -0
  75. package/social/card-install.svg +1 -1
  76. package/social/facebook-group/POST.md +121 -0
  77. package/social/facebook-group/fb-1-3am-debug.png +0 -0
  78. package/social/facebook-group/fb-1-3am-debug.svg +97 -0
  79. package/social/facebook-group/fb-2-cpu-upgrade.png +0 -0
  80. package/social/facebook-group/fb-2-cpu-upgrade.svg +132 -0
  81. package/social/facebook-group/fb-3-before-after.png +0 -0
  82. package/social/facebook-group/fb-3-before-after.svg +94 -0
  83. package/social/facebook-v150.svg +5 -5
  84. package/social/github-social-preview.svg +119 -100
  85. package/social/readme-hero.svg +11 -11
  86. package/social/section-agents.svg +57 -0
  87. package/social/section-author.svg +54 -0
  88. package/social/section-dashboard.svg +59 -0
  89. package/social/section-devil.svg +54 -0
  90. package/social/section-hooks.svg +51 -0
  91. package/social/section-install.svg +42 -0
  92. package/social/section-learning.svg +52 -0
  93. package/social/section-mcp.svg +46 -0
  94. package/social/section-memory.svg +57 -0
  95. package/social/section-parallel.svg +72 -0
  96. package/social/section-routing.svg +51 -0
  97. package/social/x-card-agents-grid.svg +6 -6
  98. package/tests/dashboard/data.test.js +235 -0
  99. package/tests/dashboard/server.test.js +240 -0
  100. package/tests/evolve/analyze.test.js +169 -0
  101. package/tests/evolve/proposals.test.js +173 -0
  102. package/tests/evolve/stats.test.js +159 -0
  103. package/tests/mcp/catalog.test.js +98 -0
  104. package/tests/mcp/client.test.js +109 -0
  105. package/tests/mcp/resources-prompts.test.js +70 -0
  106. package/tests/mcp/tools.test.js +159 -0
  107. package/tests/replay/bundle.test.js +181 -0
  108. package/tests/replay/replay.test.js +131 -0
  109. package/tests/router/classify.test.js +164 -0
  110. package/tests/safety/patterns.test.js +94 -0
  111. package/tests/safety/prompt-injection-guard.test.js +111 -0
  112. package/tests/safety/token-budget.test.js +119 -0
  113. package/tests/supply-chain/manifest.test.js +147 -0
  114. package/tests/supply-chain/sbom.test.js +170 -0
  115. package/tests/supply-chain/verify.test.js +146 -0
  116. package/tests/swarm/build-plan.test.js +188 -0
  117. package/wiki/Agent-Reference.md +58 -7
  118. package/wiki/FAQ.md +204 -7
  119. package/wiki/Home.md +104 -28
  120. package/wiki/Hook-Reference.md +1 -1
  121. package/wiki/Installation-Guide.md +109 -6
  122. package/wiki/Platform-Support.md +239 -25
  123. package/wiki/Skill-Reference.md +101 -6
@@ -39,3 +39,22 @@ jobs:
39
39
  run: npm publish --provenance --access public
40
40
  env:
41
41
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
42
+
43
+ # ── Phase 2.9: SLSA / SBOM ───────────────────────────────────────────
44
+ # npm publish above already issues SLSA Level 3 build provenance via
45
+ # npm's sigstore integration (--provenance). Below we additionally emit a
46
+ # CycloneDX SBOM and a content manifest, both attached to the release.
47
+ - name: Generate CycloneDX SBOM
48
+ run: node bin/kodelyth-ecc.js sbom --out kodelyth-ecc-sbom.cdx.json
49
+
50
+ - name: Generate content manifest
51
+ run: node bin/kodelyth-ecc.js manifest --out kodelyth-ecc-manifest.json
52
+
53
+ - name: Upload SBOM + manifest to the GitHub release
54
+ env:
55
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56
+ run: |
57
+ gh release upload "$GITHUB_REF_NAME" \
58
+ kodelyth-ecc-sbom.cdx.json \
59
+ kodelyth-ecc-manifest.json \
60
+ --clobber
package/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AGENTS.md
2
2
 
3
- This file is read by AI agents (Cascade, Cursor, Codex, etc.) on every session. It tells them how to work in this repo and how to use the 61 specialist agents and 188 skills shipped with Kodelyth ECC.
3
+ This file is read by AI agents (Cascade, Cursor, Codex, etc.) on every session. It tells them how to work in this repo and how to use the 70 specialist agents and 194 skills shipped with Kodelyth ECC.
4
4
 
5
5
  ---
6
6
 
package/CHANGELOG.md CHANGED
@@ -2,6 +2,461 @@
2
2
 
3
3
  All notable changes to Kodelyth ECC are documented here.
4
4
 
5
+ ## v1.7.0 — MCP SERVER: Universal adapter for any agent framework (May 2026)
6
+
7
+ ECC is now consumable from Claude Desktop, LangGraph, AutoGen, CrewAI, OpenAI Agents SDK, Cursor, Windsurf, and any MCP-compatible client. Every framework that speaks Model Context Protocol can now route to ECC's 70 agents, 194 skills, 97 commands, and the local self-learning memory store.
8
+
9
+ ### New: MCP server (`npx kodelyth-ecc mcp`)
10
+
11
+ A thin, stdio-only MCP server (Node, JSON-RPC) that exposes the full ECC stack:
12
+
13
+ - **16 tools** — `route_intent`, `list_agents`, `list_skills`, `list_commands`, `list_rules`, `list_bundles`, `get_agent`, `get_skill`, `get_command`, `get_rule`, `get_bundle`, `recall_memory`, `capture_memory`, `memory_stats`, `catalog_stats`, `audit_skill_match`.
14
+ - **6 prompts** — `routing-rule` (full 10-tier intent routing), `agents-overview`, `skills-overview`, `commands-overview`, `handoff-chains`, `devil-mode`.
15
+ - **365 resources** — every agent, skill, command, rule, and bundle addressable via `kodelyth://agents/<name>`, `kodelyth://skills/<name>`, `kodelyth://commands/<name>`, `kodelyth://rules/<name>`, `kodelyth://bundles/<name>`. All `text/markdown`.
16
+
17
+ Design principles:
18
+
19
+ - **Pure file reads + memory passthrough.** Server adds zero LLM calls of its own.
20
+ - **Local only.** stdio transport. No network egress. No telemetry.
21
+ - **Optional dependency.** `@modelcontextprotocol/sdk` is in `optionalDependencies` — installs work without it; the `mcp` subcommand prints a friendly install hint if missing.
22
+ - **Cached catalog.** Sub-millisecond catalog reads after first hit.
23
+ - **Project-aware memory.** `recall_memory` accepts an optional `project_root` to scope BM25 results, falling back to global memories if scoped results are sparse.
24
+
25
+ ### New files
26
+
27
+ - `scripts/mcp/server.js` — SDK wiring + stdio transport (lazy-loaded).
28
+ - `scripts/mcp/tools.js` — 16 tool handlers + tool definitions.
29
+ - `scripts/mcp/prompts.js` — 6 prompt definitions.
30
+ - `scripts/mcp/resources.js` — 365-resource catalog with `kodelyth://` URIs.
31
+ - `scripts/mcp/catalog.js` — read-only loader for agents/skills/commands/rules/bundles with minimal YAML frontmatter parser.
32
+ - `docs/mcp.md` — full reference, client config snippets, design notes, troubleshooting.
33
+ - `tests/mcp/catalog.test.js` — catalog loader + frontmatter parser (12 tests).
34
+ - `tests/mcp/tools.test.js` — pure-function tool handlers including memory roundtrip (15 tests).
35
+ - `tests/mcp/resources-prompts.test.js` — resource discovery + prompt rendering (8 tests).
36
+
37
+ ### Updated files
38
+
39
+ - `bin/kodelyth-ecc.js` — `mcp` subcommand dispatch, help text updated.
40
+ - `package.json` — `mcp` and `model-context-protocol` keywords, `optionalDependencies` for `@modelcontextprotocol/sdk@^1.0.4`, `npm run mcp` script.
41
+ - `README.md` — new "MCP server" section under install options with Claude Desktop config snippet.
42
+
43
+ ### CLI surface
44
+
45
+ ```bash
46
+ npx kodelyth-ecc mcp # start stdio MCP server
47
+ npx kodelyth-ecc --help # mcp subcommand documented
48
+ ```
49
+
50
+ ### Test count
51
+
52
+ 47 → **82 tests** (added 35 MCP server tests). Final v1.7.0 count is **336 tests** — covering MCP server, model router, swarm orchestrator, session replay, supply-chain tooling, safety hooks, self-evolving memory, and the local observability dashboard.
53
+
54
+ ### Counts (post-1.7.0)
55
+
56
+ | Asset | Count |
57
+ |------------------|-------|
58
+ | Agents | 70 |
59
+ | Skills | 194 |
60
+ | Slash commands | 97 |
61
+ | Parallel commands| 8 |
62
+ | Rules | 14 |
63
+ | Power bundles | 3 |
64
+ | MCP tools | 16 |
65
+ | MCP prompts | 6 |
66
+ | MCP resources | 377 |
67
+ | Hooks | 22+ (incl. prompt-injection-guard + token-budget) |
68
+ | Install targets | 12 |
69
+ | Tests | 336 |
70
+
71
+ ### New: Local observability dashboard
72
+
73
+ A localhost-only single-page web UI over every local data source ECC produces. Zero telemetry, zero external runtime dependencies, fully offline, read-only.
74
+
75
+ Delivered surfaces:
76
+
77
+ - **`scripts/dashboard/server.js`** — HTTP server using ONLY Node.js built-ins (`http`, `fs`, `path`, `child_process`). Eight JSON API routes + one static-file route. GET-only — any other method returns 405. Hardened response headers on every reply (`X-Frame-Options: DENY`, `X-Content-Type-Options: nosniff`, `Referrer-Policy: no-referrer`, `Cache-Control: no-store`). Path-traversal-safe static resolution sandboxed under `scripts/dashboard/static/`.
78
+ - **`scripts/dashboard/data.js`** — pure aggregators across catalog, BM25 memory store, evolve signals + proposals, swarm/orchestration sessions, and token-budget hook state. Every read defensively wrapped — broken data sources render empty cards, never crash the dashboard.
79
+ - **`scripts/dashboard/static/index.html`** — single-page UI. Hand-rolled CSS (no Tailwind, no CDN), vanilla JavaScript (`fetch`-only), no build step, no transpilation. Five tabs: Overview / Memory / Evolve / Catalog / Sessions. Lazy-loads each tab's data only when shown. 15-second health-ping pulses a green liveness indicator.
80
+ - **`bin/kodelyth-ecc.js`** — new `dashboard` subcommand. `--port N`, `--host H`, `--no-open` flags. **Refuses to bind non-localhost without `KODELYTH_DASHBOARD_ALLOW_REMOTE=1`** — the escape hatch is intentionally noisy. Default port 5747. Auto-opens browser on macOS (`open`), Linux (`xdg-open`), Windows (`start`).
81
+ - **`skills/observability-dashboard/SKILL.md`** + **`commands/dashboard.md`** + **`docs/dashboard.md`** — explicit-invocation skill, slash command, and full reference docs with curl examples.
82
+ - **`tests/dashboard/{data,server}.test.js`** — 39 new tests. Aggregator tests cover overview shape, catalog filtering, session detail reading, token-budget JSON aggregation, malformed-input resilience. Server tests boot the real HTTP server on ephemeral ports and exercise every route + every security guardrail (POST blocked, bad-kind 400, path traversal blocked, hardened headers present, remote-bind refused, override env var honored).
83
+
84
+ API surface (read-only, GET-only):
85
+
86
+ ```
87
+ GET /api/health # liveness
88
+ GET /api/overview # counts + storage paths
89
+ GET /api/memory[?limit=N] # stats + recent captures
90
+ GET /api/memory/search?q=…[&limit=N] # BM25 search
91
+ GET /api/evolve[?limit=N] # reuse + miss + proposals
92
+ GET /api/catalog?kind=…[&q=…&limit=N] # agents | skills | commands | rules | bundles
93
+ GET /api/sessions[?limit=N] # swarm session list
94
+ GET /api/sessions/:name # one session, all workers
95
+ GET /api/token-budget # per-session token usage
96
+ ```
97
+
98
+ The frontend is a thin consumer of these. Anything the UI shows you can also pipe through `jq`:
99
+
100
+ ```bash
101
+ curl -s http://127.0.0.1:5747/api/evolve | jq '.proposals[] | select(.status == "pending")'
102
+ ```
103
+
104
+ Verified end-to-end: booted on an ephemeral port → 200 OK on every happy path → 400 on bad kind → 404 on unknown route → 405 on POST → hardened headers present on every response → remote bind to `0.0.0.0` refused with the documented error message → override env var allows it.
105
+
106
+ Pairs with: BM25 memory store (Memory tab data source), swarm orchestrator (Sessions tab), token-budget hook (Overview budget snapshot), and self-evolving memory (Evolve tab). The Evolve tab makes the proposal state machine visible at a glance — status pills (⏸ ✓ ✗ ★) reflect the same state the CLI sees.
107
+
108
+ ### New: Self-evolving memory
109
+
110
+ The BM25 memory system now closes its own learning loop. Repeated memory hits become draft skills. Repeated routing misses become proposed routing-rule additions. **Nothing is ever auto-applied** — the user reviews, accepts (writes a draft file to disk), edits, and commits.
111
+
112
+ Delivered surfaces:
113
+
114
+ - **`scripts/evolve/stats.js`** — pure record/read of two signal streams in `~/.kodelyth/evolve/`:
115
+ - `reuse.json` — per-memory surface counter, idempotent per (memoryId, sessionId), tracks distinct sessions + projects
116
+ - `routing-misses.jsonl` — append-only log of substantive prompts where memory recall returned zero matches; capped at 1000 chars per prompt
117
+ - **`scripts/evolve/analyze.js`** — pure, deterministic, no I/O. Two analysis paths:
118
+ - reuse → skill-upgrade proposals (default thresholds: count≥3 AND sessions≥2)
119
+ - misses → routing-addition proposals (cluster by ≥2-token overlap; default thresholds: count≥3 AND distinct≥2)
120
+ - proposal IDs are deterministic over evidence → re-running `analyze` never duplicates
121
+ - **`scripts/evolve/proposals.js`** — append-only proposal log with state transitions: `pending → accepted → applied` or `pending → rejected`. Full audit trail preserved (every state change is a new event). `applyProposalToDisk` refuses to overwrite without `--overwrite`.
122
+ - **`hooks/memory/auto-recall.js`** — minimal augmentation. Two fire-and-forget calls: `recordSurface` when a memory is shown to the user, `recordRoutingMiss` when a substantive prompt yields zero matches. Both wrapped in try/catch — the hook NEVER blocks recall on stats failure.
123
+ - **`bin/kodelyth-ecc.js`** — new `evolve` subcommand with six sub-actions: `stats`, `analyze`, `list`, `show`, `accept`, `reject`. All support `--json`. Accept refuses to clobber existing files unless `--overwrite` is explicit.
124
+ - **`skills/self-evolving-memory/SKILL.md`** — explicit-invocation skill with full CLI reference, hard rules, composition matrix.
125
+ - **`commands/memory-evolve.md`** — `/memory-evolve` slash command (avoids collision with the pre-existing `/evolve` command for `continuous-learning-v2`).
126
+ - **`docs/evolve.md`** — full reference: signal definitions, threshold flags, proposal anatomy, sample diffs, worked example, hard rules.
127
+ - **`tests/evolve/{stats,analyze,proposals}.test.js`** — 42 new tests. Cover counter idempotence per session, distinct-session bumping, project deduplication, miss aggregation by hash, prompt capping, threshold gating, deterministic IDs, cluster overlap rules, append-only audit trail across pending→rejected→accepted, overwrite refusal, malformed input rejection, and combined `analyzeAll` cross-stream output.
128
+
129
+ Routing-addition diffs intentionally ship `TODO-agent` as the placeholder — even if accepted and committed verbatim, no real traffic gets routed until the user fills in the agent name. This is a deliberate safety property.
130
+
131
+ Verified end-to-end: seeded a memory, surfaced it 4x across 4 sessions, logged 3 routing-miss prompts on a shared token cluster, ran `evolve analyze` → 2 proposals generated, `evolve accept` wrote the skill draft to disk + marked accepted, `evolve reject --note` recorded the routing rejection. Re-running `analyze` did not duplicate. Append-only log preserved every state event.
132
+
133
+ CLI snapshot:
134
+
135
+ ```bash
136
+ # After a few weeks of normal ECC usage:
137
+ npx kodelyth-ecc evolve stats # snapshot of recorded signals
138
+ npx kodelyth-ecc evolve analyze # signals → proposals (idempotent)
139
+ npx kodelyth-ecc evolve list # what's pending
140
+ npx kodelyth-ecc evolve show <id> # full draft + evidence
141
+ npx kodelyth-ecc evolve accept <id> # write draft to disk (NEVER commits)
142
+ npx kodelyth-ecc evolve reject <id> --note "covered by existing agent"
143
+ ```
144
+
145
+ Pairs with the BM25 memory store (signal source), `/memory remember` (manual capture), `rules/common/agent-intent-routing.md` (target for routing-addition proposals), swarm orchestrator (repeated swarm-task memories → skills the picker can choose), session replay (replay re-triggers reuse signals), and token-budget hook (skills are cheaper than per-prompt memory recalls).
146
+
147
+ ### New: Supply chain — SLSA + SBOM + content manifest
148
+
149
+ Enterprise-grade supply-chain credentials. Every kodelyth-ecc release now ships with three independent attestations a downstream consumer can verify without trusting kodelyth-ecc:
150
+
151
+ 1. **SLSA Level 3 build provenance** — sigstore-signed via `npm publish --provenance`. Verifiable on npmjs.com and via `npm audit signatures`.
152
+ 2. **CycloneDX 1.5 SBOM** — `kodelyth-ecc-sbom.cdx.json`, attached to the GitHub release. Lists every component in `package-lock.json` with purl, license, and SHA-512 integrity.
153
+ 3. **sha256 content manifest** — `kodelyth-ecc-manifest.json`, attached to the GitHub release. Hashes every shipped asset (730 files) so any consumer can detect tamper.
154
+
155
+ Delivered surfaces:
156
+
157
+ - **`scripts/supply-chain/sbom.js`** — CycloneDX 1.5 generator. Pure function, zero deps. Reads `package.json` + `package-lock.json` v3. Stable `serialNumber` derived from `name@version + timestamp`. Components carry purl (`pkg:npm/...`), normalized license, and base64→hex SRI hashes.
158
+ - **`scripts/supply-chain/manifest.js`** — deterministic content manifest. Walks `agents/`, `skills/`, `commands/`, `rules/`, `hooks/`, `scripts/`, `bin/`, `parallel-commands/`, `bundles/`, plus root files. Skips `node_modules/`, `.git/`, `.DS_Store`, `__pycache__/`, `*.pyc`. Top-level digest is sha256 over deterministic JSON of entries — reproducible.
159
+ - **`scripts/supply-chain/verify.js`** — pure-function verifier. Categorizes every file into `ok / modified / missing / extra`. Modified or missing files fail verify; extras are advisory. Schema-versioned at `kodelyth.content-manifest/v1`.
160
+ - **`bin/kodelyth-ecc.js`** — three new subcommands: `sbom [--out FILE] [--json]`, `manifest [--out FILE] [--json]`, `verify [--manifest FILE] [--json]`. `verify` exits 1 on any tamper.
161
+ - **`.github/workflows/publish.yml`** — extended to emit the SBOM + manifest after `npm publish --provenance` and upload both to the GitHub release via `gh release upload`.
162
+ - **`skills/supply-chain-verification/SKILL.md`** — explicit-invocation skill with full CLI reference, programmatic API, hard rules.
163
+ - **`commands/verify-supply-chain.md`** — `/verify-supply-chain` slash command.
164
+ - **`docs/supply-chain.md`** — full reference: artifact table, downstream verification flow, `npm audit signatures` integration, composition with other phases.
165
+ - **`tests/supply-chain/sbom.test.js`** + **`tests/supply-chain/manifest.test.js`** + **`tests/supply-chain/verify.test.js`** — 31 new tests. Cover SBOM round-trip on synthetic + real lockfiles, scoped purl, SRI base64→hex, deterministic manifest digest, all four verify categories (ok/modified/missing/extra), schema validation, round-trip across copy.
166
+
167
+ Verified end-to-end on the real repo: 730 files manifested, 91 SBOM components, full round-trip clean, single-byte tamper detected.
168
+
169
+ CLI snapshot:
170
+
171
+ ```bash
172
+ # Generate the three artifacts
173
+ npx kodelyth-ecc sbom --out kodelyth-ecc-sbom.cdx.json
174
+ npx kodelyth-ecc manifest --out kodelyth-ecc-manifest.json
175
+
176
+ # Verify a downstream install
177
+ npx kodelyth-ecc verify --manifest kodelyth-ecc-manifest.json
178
+ # → exit 0 if clean, exit 1 if any file is tampered or missing
179
+
180
+ # CI-friendly
181
+ npx kodelyth-ecc verify --manifest manifest.json --json | jq .ok
182
+ ```
183
+
184
+ Pairs with swarm orchestrator (pre-flight verify), session replay (replay bundles can carry the producing toolkit's manifest digest), safety hooks (can warn on tampered toolkit), and the MCP server (can expose `verify` to downstream agents).
185
+
186
+ ### New: Session replay
187
+
188
+ Every swarm coordination dir is now a portable, replayable artifact. Bundle a session into a single JSON file, ship it anywhere, re-run it with optional A/B variations (different harness, different agents, different base ref). Composes with swarm orchestrator and cost-aware model router for prompt regression testing and model A/B comparison.
189
+
190
+ - **`scripts/replay/bundle.js`** — pure read/write of session bundles. Stable schema `kodelyth.session-bundle/v1`. Exports task/handoff/status per worker, validates on import, supports diff between two bundles, auto-generates `-replay-N` session names.
191
+ - **`scripts/replay/replay.js`** — replay engine. Extracts shared task from bundle (prefers `meta.task`, falls back to parsing the worker's `## Shared Task` block, final fallback to orchestrator's `## Objective` block). Wires bundle + swarm builder + orchestrator with full variation support.
192
+ - **`bin/kodelyth-ecc.js`** — three new subcommands: `session-export <session> [--task] [--agents] [--harness] [--base-ref] [--out]`, `session-import <bundle> [--target] [--overwrite]`, `replay <bundle|session> [--harness] [--agents] [--base-ref] [--session] [--replace] [--execute|--write-only|--json]`.
193
+ - **`skills/session-replay/SKILL.md`** — explicit-invocation form with examples for bug-report bundles, model A/B tests, regression checks.
194
+ - **`commands/replay.md`** — `/replay` slash command.
195
+ - **`docs/replay.md`** — full reference: CLI commands, bundle format, replay reconstruction logic, variation matrix, hard rules, programmatic API.
196
+ - **`tests/replay/bundle.test.js`** + **`tests/replay/replay.test.js`** — 27 new tests covering bundle round-trip, schema validation, diff correctness, import/overwrite semantics, replay name generation, task extraction (3 fallback paths), variation flags, and orchestrator integration.
197
+
198
+ CLI snapshot:
199
+
200
+ ```bash
201
+ # Export a finished swarm with rich meta
202
+ npx kodelyth-ecc session-export swarm-2026-05-10-4a \
203
+ --task "audit oauth flow" \
204
+ --agents security-reviewer,code-reviewer,pair-programmer,tdd-guide \
205
+ --harness claude \
206
+ --out oauth-audit.bundle.json
207
+
208
+ # Replay with a different harness (model A/B test)
209
+ npx kodelyth-ecc replay oauth-audit.bundle.json --harness codex --execute
210
+
211
+ # Replay with different agents
212
+ npx kodelyth-ecc replay oauth-audit.bundle.json \
213
+ --agents supply-chain-auditor,prompt-injection-hunter,secret-hunter \
214
+ --execute
215
+
216
+ # Replay against new code
217
+ npx kodelyth-ecc replay oauth-audit.bundle.json --base-ref refactor/oauth-rewrite --execute
218
+ ```
219
+
220
+ Replays auto-name as `<original>-replay-N` to never collide. Bundles are pure JSON — diff-friendly for regression review and shippable as bug-report artifacts.
221
+
222
+ ### New: Swarm orchestrator
223
+
224
+ The generalized form of `/devil-mode`, `/team-review`, `/security-audit`, and `/pre-release`. Pick any task, pick any agents (or let ECC pick from task signals), get N parallel git-worktrees + a tmux session ready to attach. Promotes the existing `tmux-worktree-orchestrator` infrastructure to a first-class CLI surface.
225
+
226
+ - **`scripts/swarm/build-plan.js`** — pure-function plan builder. Takes simple flags and produces a config compatible with the orchestrator. Smart agent picker: 14 signal classes (security, perf, API, tests, …), baseline anchors (code-reviewer + pair-programmer), 4/6/8-agent default rotations. Per-agent task shaping (required handoff sections).
227
+ - **`bin/kodelyth-ecc.js`** — new `swarm` subcommand: `--task`, `--agents N|name1,name2,...`, `--harness claude|codex|opencode|windsurf|echo`, `--seed`, `--session`, `--base-ref`, `--replace`, `--execute`/`--write-only`/`--dry-run`/`--json`, plus power-user `--plan plan.json`.
228
+ - **`skills/swarm-orchestrator/SKILL.md`** — explicit-invocation form; full pairing matrix with cost-router (2.4), token-budget hook (2.10), MCP client mode (2.5).
229
+ - **`commands/swarm.md`** — `/swarm` slash command.
230
+ - **`docs/swarm.md`** — full reference: CLI flags, smart agent picker, harness adapters, coordination protocol, lifecycle, troubleshooting.
231
+ - **`tests/swarm/build-plan.test.js`** — 21 new tests covering pickAgents (signal-driven, baseline, rotation, dedup, count clamping), shapeTaskForAgent, buildWorker (4 harnesses + custom), buildSwarmPlan (validation, orchestrator integration, explicit agents preserved, full pass-through).
232
+
233
+ CLI snapshot:
234
+
235
+ ```bash
236
+ # Smart agent picking from signals:
237
+ npx kodelyth-ecc swarm --task "audit oauth flow for security regressions" --agents 4
238
+ # → picks security-reviewer + code-reviewer + pair-programmer + tdd-guide
239
+
240
+ # Explicit agents:
241
+ npx kodelyth-ecc swarm \
242
+ --task "ship v2.0" \
243
+ --agents release-captain,security-reviewer,e2e-runner \
244
+ --execute
245
+
246
+ # Pre-launch full sweep:
247
+ npx kodelyth-ecc swarm --task "Pre-launch sweep for v2.0" --agents 8 --replace --execute
248
+ tmux attach -t swarm-2026-05-10-8a
249
+ ```
250
+
251
+ Default mode is **dry-run** — prints a summary, doesn't spawn anything. `--write-only` materializes the coordination files (task.md / handoff.md / status.md per worker). `--execute` creates worktrees + tmux + launches agents with full rollback on failure.
252
+
253
+ ### New: MCP client mode
254
+
255
+ The other half of MCP. While 2.1 serves ECC to any client, 2.5 lets ECC **consume** any external MCP server (Stripe, GitHub, Postgres, Redis, Brave, Filesystem, Shopify, anything). ECC is now the MCP **hub**.
256
+
257
+ - **`scripts/mcp/client.js`** — registry + connect/list-tools/call-tool/list-resources/read-resource/list-prompts/get-prompt helpers. Lazy-loads `@modelcontextprotocol/sdk` with a friendly install hint if missing.
258
+ - **`bin/kodelyth-ecc.js`** — five new subcommands: `mcp-add`, `mcp-list`, `mcp-remove`, `mcp-tools`, `mcp-resources`, `mcp-prompts`, `mcp-call`. JSON args via `--json '{"arg":"value"}'`. Env vars via `--env KEY=VAL`.
259
+ - **`docs/mcp-clients.md`** — full reference, examples for github/postgres/stripe/brave/filesystem/redis, programmatic API, privacy notes, troubleshooting.
260
+ - **`tests/mcp/client.test.js`** — 9 new tests including end-to-end stdio handshake using the LOCAL kodelyth MCP server itself as a real test target (registry persistence, addServer validation, listTools, callTool, listResources, listPrompts, error path).
261
+
262
+ CLI snapshot:
263
+
264
+ ```bash
265
+ # Register
266
+ npx kodelyth-ecc mcp-add github \
267
+ --env GITHUB_PERSONAL_ACCESS_TOKEN=ghp_... \
268
+ -- npx -y @modelcontextprotocol/server-github
269
+
270
+ # Inspect
271
+ npx kodelyth-ecc mcp-list
272
+ npx kodelyth-ecc mcp-tools github
273
+
274
+ # Call
275
+ npx kodelyth-ecc mcp-call github create_issue \
276
+ --json '{"owner":"sifxprime","repo":"kodelyth-ecc","title":"hi from ECC"}'
277
+ ```
278
+
279
+ The registry lives at `~/.kodelyth/mcp-clients.json` (override with `KODELYTH_MCP_CLIENT_DIR`). Each call spawns a fresh stdio subprocess — no long-lived process pool, no credential leakage between sessions.
280
+
281
+ ### New: Cost-aware model router
282
+
283
+ The orthogonal companion to agent intent routing. While intent routing picks _which specialist agent_ handles a task, this router picks _which model tier_ runs it — keeping teams from burning frontier-model tokens on doc typos and rename refactors.
284
+
285
+ - **`rules/common/cost-aware-model-routing.md`** — always-on rule. Three tiers (trivial/standard/hard) with weighted signal classification. Hard rules: security/incident/adversarial agents never downgrade; production framing wins; multi-file (3+) refactors never go to trivial; respect explicit user choice; bias downward when token-budget > 70%.
286
+ - **`skills/cost-aware-model-routing/SKILL.md`** — explicit-invocation form for "what model should I use" questions.
287
+ - **`commands/route-model.md`** — `/route-model` slash command for ad-hoc on-demand routing.
288
+ - **`scripts/router/classify.js`** — pure-function deterministic classifier with full config loader (env vars + `.kodelyth/router.json` project file).
289
+ - **`bin/kodelyth-ecc.js`** — new `route` CLI subcommand: `npx kodelyth-ecc route "<task>" [--files N] [--agent <name>] [--current <model>] [--json]`.
290
+ - **`tests/router/classify.test.js`** — 19 new tests covering classification, config precedence (env > project file > defaults), agent override, and disabled-mode.
291
+
292
+ Configuration surface:
293
+
294
+ ```bash
295
+ # Disable entirely
296
+ KODELYTH_ROUTER=off
297
+
298
+ # Override per tier (provider-agnostic)
299
+ KODELYTH_ROUTER_TRIVIAL=gpt-4.1-mini
300
+ KODELYTH_ROUTER_STANDARD=claude-sonnet-4-6
301
+ KODELYTH_ROUTER_HARD=gpt-5
302
+
303
+ # Or via .kodelyth/router.json at project root
304
+ { "trivial": "...", "standard": "...", "hard": "...", "notes": "set by infra team" }
305
+ ```
306
+
307
+ Pairs with the `token-budget` safety hook for full cost discipline (the hook caps total spend; the router cuts the steady leak from frontier-model overuse on routine work). Together they typically reduce LLM bills by 50–70% with no measurable quality drop on standard tasks.
308
+
309
+ ### New: Safety hooks
310
+
311
+ Two production-ready safety primitives that ride on the existing hook pipeline. **Off by default** — opt in via env vars so existing users see zero behavior change.
312
+
313
+ - **`hooks/safety/prompt-injection-guard.js`** — scans inbound text on `UserPromptSubmit` and `PostToolUse` (Read, WebFetch, mcp__*) for jailbreak / instruction-override patterns. Three modes: `off` (default), `warn`, `block`. Detects 11 pattern classes across 3 severity tiers (critical / high / medium) plus base64-decoded payload jailbreak detection. Configurable audit log at `KODELYTH_PI_GUARD_LOG`.
314
+ - **`hooks/safety/token-budget.js`** — per-session token-budget enforcer on `SessionStart` and `Stop`. Tracks usage via 4-chars-per-token heuristic over transcript size + visible message lengths. Three modes: `off` (default), `warn`, `<positive integer>`. Blocks `SessionStart` once usage ≥ budget; warns at 70%. State files live at `${KODELYTH_TOKEN_BUDGET_DIR}/budget-<sessionId>.json`.
315
+ - **`hooks/safety/lib/patterns.js`** — shared, auditable regex pattern catalog. 11 named patterns + decoded base64 probe.
316
+ - **`hooks/safety/README.md`** — full configuration + rollout guide.
317
+ - **`tests/safety/*.test.js`** — 29 new tests covering pattern detection, hook block/warn/off paths, malformed JSON recovery, and reset flow.
318
+
319
+ Both hooks always exit 0 on internal errors so they never block users due to a bug.
320
+
321
+ ### Test count
322
+
323
+ 47 → **336 tests** (added 35 MCP server + 9 MCP client + 29 safety + 19 router + 21 swarm + 27 replay + 31 supply-chain + 42 self-evolving memory + 39 dashboard + 37 from prior phases). All pass.
324
+
325
+ ### What shipped in v1.7.0
326
+
327
+ - ✅ Devil-mode adversarial agents (8 agents + `/devil-mode` command)
328
+ - ✅ MCP server (16 tools, 6 prompts, 370+ resources)
329
+ - ✅ Local observability dashboard
330
+ - ✅ Cost-aware model router
331
+ - ✅ MCP client mode (consume external MCP servers)
332
+ - ✅ Swarm orchestrator (parallel agents in git worktrees)
333
+ - ✅ Session replay + portable bundles
334
+ - ✅ SLSA L3 + SBOM + content manifest
335
+ - ✅ Safety hooks (prompt-injection-guard + token-budget)
336
+ - ✅ Self-evolving memory (proposals from usage patterns)
337
+ - ✅ Power bundles (indie-hacker / red-team / enterprise)
338
+ - ✅ GitHub Action (CI/CD PR review integration)
339
+ - ✅ 5 new IDE platforms (Cline, Roo Code, Aider, Kimi, Gemini CLI)
340
+ - ✅ README rewrite (infrastructure-first framing)
341
+
342
+ ---
343
+
344
+ ## v1.6.0 — DEVIL MODE: Adversarial agent crew + `/devil-mode` parallel sweep (May 2026)
345
+
346
+ This release introduces the 8-agent adversarial red-team crew, a new parallel command that fires four of them in one shot, power bundles, and 5 new IDE platform targets.
347
+
348
+ ### New Agents (8 — adversarial / red-team mindset)
349
+
350
+ Each ships with a full attacker-mindset playbook, real bash-grep patterns, severity calibration, and remediation steps. Not theatrical personas — they do real audit work.
351
+
352
+ - **`prompt-injection-hunter`** — adversarial AI safety auditor. Hunts jailbreaks, indirect injection, system-prompt leaks, tool-call hijacking. Probes RAG pipelines, MCP servers, and any code that feeds untrusted text into an LLM.
353
+ - **`supply-chain-auditor`** — dependency attacker review. Detects typosquats, malicious post-install scripts, lockfile drift, slopsquats (AI-generated phantom packages), tarball-vs-repo divergence.
354
+ - **`secret-hunter`** — leaked-credential detective. Scans live code, git history, env files, build artifacts, CI logs, encoded blobs (base64/hex), and bundled-to-client env vars. Includes provider pattern catalog (AWS, Stripe, GitHub, Slack, JWT, etc.) and key-validity probing.
355
+ - **`license-violation-finder`** — IP / copyleft contamination auditor. Hunts GPL/AGPL deps in proprietary code, missing attributions, license cocktails, license changes between versions (Elastic/Mongo/HashiCorp pattern), AI-generated code with copyleft training data.
356
+ - **`jailbreak-tester`** — live AI-feature red-teamer. 10-tier attack battery: surface filter bypass, fictional framing, instruction-following hijack, system-prompt extraction, encoded payloads, tool abuse, multi-turn drift, overrefusal probing, PII exfil, output-channel abuse.
357
+ - **`code-stealer-detector`** — code-provenance auditor. Hunts copy-pasted Stack Overflow snippets, copyleft contamination, leaked private code, AI-generated code with unverified provenance, vendored libs without attribution, embedded encoded blobs.
358
+ - **`backdoor-hunter`** — malicious-code-pattern detector. 12 hunt categories: obfuscated execution, network beacons, time bombs (xz utils CVE-2024-3094 pattern), reverse shells, credential exfiltration, build-time injection, webshells, dynamic loading, cryptominers, telemetry exfil.
359
+ - **`chaos-engineer`** — adversarial reliability tester. Hypothesis-first fault injection: process death, network partition, latency injection, DNS failure, disk full, clock skew, memory pressure, dependency failure, concurrency abuse, input fuzzing. Includes pre-flight checklist + abort criteria for safe execution.
360
+
361
+ ### New Parallel Command
362
+
363
+ - **`/devil-mode`** — fires `prompt-injection-hunter` + `supply-chain-auditor` + `secret-hunter` + `backdoor-hunter` simultaneously. The "attacker mindset on the whole codebase" sweep.
364
+ - `/devil-mode --all` — fires all 8 adversarial agents
365
+ - `/devil-mode --pre-public` — pre-open-source sweep (adds license + theft check)
366
+ - `/devil-mode --pre-launch` — pre-launch sweep (adds AI red-team + chaos planning)
367
+
368
+ ### Intent Routing Updates
369
+
370
+ - Added a new "Devil-Mode Adversarial Crew" section under Priority 3 with intent patterns for all 8 agents
371
+ - Added `/devil-mode` to the parallel commands section with full trigger matrix
372
+ - Added 11 new rows to the Quick Reference Table covering attacker-mindset phrasings ("think like an attacker", "going open-source full audit", "we were hacked", etc.)
373
+ - Users can now route to any devil-mode agent or command in plain language without remembering names
374
+
375
+ ### Power Bundles
376
+
377
+ Three audience-tailored bundles installable via `--bundle` flag. Each installs the full ECC toolkit + a curated `BUNDLE.md` cheat sheet that biases the AI toward workflows fit for that audience.
378
+
379
+ ```bash
380
+ npx kodelyth-ecc --bundle indie-hacker # Solo founder / SaaS — ship fast, validate, harden
381
+ npx kodelyth-ecc --bundle red-team # Security engineer — devil-mode + adversarial workflows
382
+ npx kodelyth-ecc --bundle enterprise # Compliance team — SBOM, license, supply chain
383
+ ```
384
+
385
+ - New files: `bundles/indie-hacker.md`, `bundles/red-team.md`, `bundles/enterprise.md`
386
+ - `install.sh` and `install.ps1` accept `--bundle` / `-Bundle` flag, both with full alias support (`indie`, `redteam`, `security`, `compliance`)
387
+ - Bundle pre-selects sensible language modules (`typescript+python` for indie/red-team, `typescript+java+python` for enterprise)
388
+ - `BUNDLE.md` is copied to install destination so the AI reads it on every session start
389
+ - Bundle name persisted in `kodelyth-ecc-install-state.json`
390
+ - Bundle-specific reminder displayed at install end with the right lead-with commands
391
+
392
+ ### New IDE Platforms
393
+
394
+ ECC now installs natively to **5 additional AI coding platforms**, closing the platform-coverage gap with `agency-agents` and unlocking new communities:
395
+
396
+ ```bash
397
+ npx kodelyth-ecc --target cline # Cline (VS Code) — .clinerules/
398
+ npx kodelyth-ecc --target roocode # Roo Code (VS Code) — .roo/
399
+ npx kodelyth-ecc --target aider # Aider terminal agent — .aider-ecc/ + CONVENTIONS.md
400
+ npx kodelyth-ecc --target kimi # Kimi Code — .kimi/
401
+ npx kodelyth-ecc --target gemini-project # Gemini CLI (project) — .gemini/
402
+ npx kodelyth-ecc --target gemini-home # Gemini CLI (global) — ~/.gemini/
403
+ ```
404
+
405
+ Per-target install layouts:
406
+
407
+ | Target | Destination | Layout |
408
+ |---|---|---|
409
+ | `cline` | `./.clinerules/` | Flat: rules + agents + commands all merged as `.md` |
410
+ | `roocode` | `./.roo/` | Subdirs: `rules/`, `agents/`, `skills/`, `commands/` |
411
+ | `aider` | `./.aider-ecc/` + `./CONVENTIONS.md` | Subdirs + auto-generated CONVENTIONS.md if missing |
412
+ | `kimi` | `./.kimi/` | Subdirs: `rules/`, `agents/`, `skills/`, `commands/` |
413
+ | `gemini-project` | `./.gemini/` + `GEMINI.md` | Subdirs: `agents/`, `skills/`, `rules/` |
414
+ | `gemini-home` | `~/.gemini/` + `GEMINI.md` | Same as above, global |
415
+
416
+ Each target writes a tailored "what to do now" message at install end, and Aider/Gemini get auto-generated bootstrap files (`CONVENTIONS.md`, `GEMINI.md`) that their CLIs auto-load.
417
+
418
+ Total IDE coverage jumps from **6** to **11** platforms — making ECC easily the most cross-platform AI coding toolkit shipped.
419
+
420
+ ### README Rewrite
421
+
422
+ - Sharper "Why ECC ≠ Another Agent Collection" hero anchored on the **infrastructure thesis** (layered stack vs flat agent folders)
423
+ - New **Layer Stack** table showing what each layer does and how it's missing from competitors
424
+ - New **Quick Comparison vs Other Kits** table — 13 rows comparing ECC against `agency-agents`, `awesome-claude-agents`, generic prompt libs
425
+ - New **Devil Mode** showcase block in hero
426
+ - New **Power Bundles** section under Install
427
+ - "What's Inside" updated to v1.6.0 counts + new Parallel Commands row
428
+
429
+ ### Counts
430
+
431
+ | Metric | v1.5.10 | v1.6.0 |
432
+ |---|---|---|
433
+ | Agents | 62 | **70** |
434
+ | Commands | 90 | **91** |
435
+ | Parallel commands | 7 | **8** |
436
+ | Power bundles | 0 | **3** |
437
+ | Audience-tailored installs | 0 | **3** |
438
+ | IDE platform targets | 7 | **13** (added cline, roocode, aider, kimi, gemini-project, gemini-home) |
439
+ | IDE platform families | 6 | **11** |
440
+
441
+ ### What shipped in v1.6.0
442
+
443
+ - 8 adversarial devil-mode agents (prompt-injection-hunter, supply-chain-auditor, secret-hunter, license-violation-finder, jailbreak-tester, code-stealer-detector, backdoor-hunter, chaos-engineer)
444
+ - `/devil-mode` parallel command — attacker-mindset sweep with `--all`, `--pre-public`, `--pre-launch` variants
445
+ - 3 power bundles (`indie-hacker`, `red-team`, `enterprise`) installable via `--bundle` flag
446
+ - 6 new IDE platform targets (cline, roocode, aider, kimi, gemini-project, gemini-home)
447
+ - Revamped README with comparison table and Layer Stack section
448
+ - Full intent routing for all 8 devil-mode agents in plain language
449
+
450
+ ---
451
+
452
+ ## v1.5.10 — Fix install crash on macOS bash 3.2 (May 2026)
453
+
454
+ ### Bug Fix
455
+
456
+ - **`install.sh` crashes after Rules (common) on `claude-home` target** — `set -euo pipefail` + bash 3.2 (macOS default) treats an empty array `"${LANGUAGE_MODULES[@]}"` as an unbound variable and exits. Fixed by using the bash 3.2-safe empty-array expansion `"${LANGUAGE_MODULES[@]+"${LANGUAGE_MODULES[@]}"}"`, matching the pattern already correctly used for the JSON install state on line 430. Users who install without any `--profile` or language flags (the majority) were affected.
457
+
458
+ ---
459
+
5
460
  ## v1.5.9 — Intent routing for all 5 parallel commands (May 2026)
6
461
 
7
462
  ### Bug Fix / Feature
package/CLAUDE.md CHANGED
@@ -6,24 +6,27 @@ Guidance for Claude Code when working with this repository.
6
6
 
7
7
  **Kodelyth ECC** — a production-grade AI coding toolkit:
8
8
 
9
- - **62 specialist agents** — debug-detective, incident-commander, load-tester, image-architect, kodelyth-memory, security-reviewer, etc.
10
- - **188 skills** — domain knowledge, patterns, testing, security, intent routing, local memory
11
- - **88 commands** — slash workflows (`/tdd`, `/plan`, `/code-review`, `/team-review`, `/project-launch`, `/debug-blitz`, `/security-audit`, ...)
12
- - **20+ hooks** — automated quality gates, session memory, memory inject + capture, correction encoding
13
- - **17 rules** — always-on coding standards + semantic intent routing + memory protocol
9
+ - **70 specialist agents** — debug-detective, incident-commander, load-tester, image-architect, kodelyth-memory, security-reviewer, plus 8 adversarial devil-mode agents
10
+ - **194 skills** — domain knowledge, patterns, testing, security, intent routing, local memory, swarm orchestration, MCP integration
11
+ - **97 commands** — slash workflows (`/tdd`, `/plan`, `/code-review`, `/team-review`, `/devil-mode`, `/debug-blitz`, `/security-audit`, ...)
12
+ - **22+ hooks** — quality gates, memory inject + capture, correction encoding, prompt-injection guard, token-budget enforcer
13
+ - **14 rules** — always-on coding standards + semantic intent routing + memory protocol + self-improvement
14
14
 
15
- Works with Claude Code, Windsurf, Cursor, Codex CLI, Antigravity, and OpenCode.
15
+ Works with Claude Code, Windsurf, Cursor, Codex CLI, Antigravity, OpenCode, Cline, Roo Code, Aider, Kimi, and Gemini CLI — **12 platforms total**.
16
16
 
17
17
  ## Architecture
18
18
 
19
19
  ```
20
- agents/ → Specialist subagents (planner, code-reviewer, debug-detective, ...)
21
- skills/ Workflow + domain knowledge files (loadable via slash commands)
22
- commands/ Slash commands users invoke directly
23
- hooks/ → Trigger-based automations (pre-commit, session memory, etc.)
24
- rules/ → Always-on guidelines including agent-intent-routing.md
25
- scripts/ → Cross-platform Node.js utilities for hooks and setup
26
- tests/ Test suite for scripts and hooks
20
+ agents/ → 70 specialist subagents (planner, code-reviewer, debug-detective, devil-mode crew, ...)
21
+ commands/ 97 slash commands (8 parallel multi-agent, rest single-agent)
22
+ skills/ 194 workflow + domain knowledge files (loadable via slash commands)
23
+ hooks/ → 22+ automations (pre-commit, session memory, prompt-injection guard, token-budget)
24
+ rules/ → 14 always-on guidelines (agent-intent-routing, self-improvement, memory-protocol, ...)
25
+ scripts/ → Node.js utilities: MCP server, dashboard, swarm, replay, router, memory, supply-chain
26
+ bundles/ 3 power bundles (indie-hacker, red-team, enterprise)
27
+ actions/ → GitHub Action (CI/CD integration for PR review)
28
+ docs/ → Feature docs (mcp.md, dashboard.md, swarm.md, replay.md, evolve.md, supply-chain.md)
29
+ tests/ → 336 passing tests across 24 test files
27
30
  ```
28
31
 
29
32
  ## Running Tests
@@ -34,7 +37,25 @@ npm test
34
37
  node tests/run-all.js
35
38
  ```
36
39
 
37
- ## Intent Routing (v1.3.0+)
40
+ ## CLI Subcommands
41
+
42
+ Beyond install, the `npx kodelyth-ecc` CLI exposes:
43
+
44
+ ```bash
45
+ npx kodelyth-ecc mcp # Start MCP server (stdio JSON-RPC)
46
+ npx kodelyth-ecc route "<task>" # Cost-aware model-tier recommendation
47
+ npx kodelyth-ecc swarm --task "..." # Parallel agents in git worktrees
48
+ npx kodelyth-ecc dashboard # Localhost observability dashboard
49
+ npx kodelyth-ecc evolve analyze # Self-evolving memory proposals
50
+ npx kodelyth-ecc replay <bundle> # Re-run a past session
51
+ npx kodelyth-ecc sbom # CycloneDX 1.5 SBOM
52
+ npx kodelyth-ecc manifest # sha256 content manifest
53
+ npx kodelyth-ecc verify # Verify install against manifest
54
+ npx kodelyth-ecc mcp-add <name> -- <cmd> # Register external MCP server
55
+ npx kodelyth-ecc session-export <session> # Export session bundle
56
+ ```
57
+
58
+ ## Intent Routing
38
59
 
39
60
  The toolkit ships with a god-tier intent routing rule (`rules/common/agent-intent-routing.md`) that auto-loads on every session. It maps user intent → specialist agent across 10 priority tiers.
40
61
 
@@ -47,7 +68,7 @@ When a user message matches a routing pattern, you MUST:
47
68
 
48
69
  ## Parallel Commands (Fastest Paths — Multi-Agent)
49
70
 
50
- These fire multiple specialist agents simultaneously. Use these for the fastest results:
71
+ These fire multiple specialist agents simultaneously:
51
72
 
52
73
  | Command | Agents Fired | Best For |
53
74
  |---|---|---|
@@ -58,6 +79,7 @@ These fire multiple specialist agents simultaneously. Use these for the fastest
58
79
  | `/refactor-sprint` | refactor-cleaner + code-simplifier + type-design-analyzer + tdd-guide | Full cleanup before a feature sprint |
59
80
  | `/pre-release` | release-captain + security-reviewer + code-reviewer | Go/no-go verdict before shipping |
60
81
  | `/onboard` | code-explorer + architect + doc-updater | Understand any codebase in 15 minutes |
82
+ | `/devil-mode` | prompt-injection-hunter + supply-chain-auditor + secret-hunter + backdoor-hunter | Adversarial sweep (use `--all` for all 8) |
61
83
 
62
84
  ## Key Commands
63
85
 
@@ -68,6 +90,10 @@ These fire multiple specialist agents simultaneously. Use these for the fastest
68
90
  - `/code-review` — quality review
69
91
  - `/git-mastery` — git workflows + recovery patterns
70
92
  - `/observability` — logging, metrics, OpenTelemetry, SLOs
93
+ - `/dashboard` — launch local observability dashboard
94
+ - `/route-model` — cost-aware model selection
95
+ - `/swarm` — parallel agent swarm in git worktrees
96
+ - `/memory-evolve` — self-evolving memory proposals
71
97
 
72
98
  ## Specialist Agents (Pick the Right One)
73
99
 
@@ -91,14 +117,20 @@ These fire multiple specialist agents simultaneously. Use these for the fastest
91
117
  | Tests / coverage | `tdd-guide` |
92
118
  | Refactor / cleanup | `refactor-cleaner` |
93
119
  | Open-source a project | `opensource-forker` (chain start) |
120
+ | Leaked secrets in code/history | `secret-hunter` |
121
+ | Malicious deps / supply chain | `supply-chain-auditor` |
122
+ | AI feature jailbreak safety | `prompt-injection-hunter` |
123
+ | Backdoors / obfuscated code | `backdoor-hunter` |
124
+ | Chaos / fault injection testing | `chaos-engineer` |
94
125
 
95
126
  ## Development Notes
96
127
 
97
128
  - Package manager detection: npm, pnpm, yarn, bun
98
129
  - Cross-platform: Windows (`install.ps1`), macOS / Linux (`install.sh`), or `npx` anywhere
99
- - Agent format: Markdown with YAML frontmatter (name, description, tools)
130
+ - Agent format: Markdown with YAML frontmatter (name, description, tools, model)
100
131
  - Skill format: Markdown with clear sections (description, when to use, how it works)
101
132
  - Hook format: JSON with matcher conditions and command/notification hooks
133
+ - No runtime deps in core — `@modelcontextprotocol/sdk` is an optionalDependency for MCP server only
102
134
 
103
135
  ## Contributing
104
136