kodelyth-ecc 2.4.7 → 2.4.9

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/CHANGELOG.md CHANGED
@@ -2,6 +2,58 @@
2
2
 
3
3
  All notable changes to Kodelyth ECC are documented here.
4
4
 
5
+ ## v2.4.9 — Phase 4 audit + 6 new feature SVGs (July 2026)
6
+
7
+ Final audit round + the visual gap: the six headline 2.x features had **zero illustrations** in the README or website.
8
+
9
+ ### Phase 4 audit — findings
10
+
11
+ - **End-to-end swept every advertised feature** with real invocations: all 9 CLI subcommands, 16 MCP tools, swarm (builds real 4-worker plans), replay (validates args), all 8 parallel commands present, 3 bundles valid. **No dummy features found** — the real bugs were all caught in Phases 1-3.
12
+ - **Adversarial agents assessed** (`secret-hunter`, `backdoor-hunter`, `supply-chain-auditor`): already built with real detection commands (backdoor-hunter has 36, supply-chain-auditor has 8 real jq/npm lockfile-audit sections). No dummy gap like security-reviewer had — honest result, left them alone.
13
+
14
+ ### New — 6 feature SVGs (the visual gap)
15
+
16
+ Created on-brand 900×170 illustrations matching the existing `section-*.svg` design system, each with real data and a diagram:
17
+
18
+ - `section-rtk.svg` — input-savings pipeline (raw → RTK filter → compact, 5.1M/64% ledger)
19
+ - `section-terse.svg` — 4-level output-compression dial with before/after
20
+ - `section-codebase.svg` — AST graph nodes + query, 412k vs 3.4k token comparison
21
+ - `section-cli.svg` — interactive menu terminal + arrow keys + update check
22
+ - `section-token-savings.svg` — the three-layer stack combining to −55–65%
23
+ - `section-uninstall.svg` — clean-removal checklist + dry-run
24
+
25
+ All rendered to 8K PNG (37 exports total) and injected into the README's RTK / Terse / Codebase / Interactive-CLI sections.
26
+
27
+ ### Verified
28
+
29
+ - 384 tests, 0 failures
30
+ - All 6 SVGs render clean at 8K, no text overflow, on-brand
31
+ - README references the 4 new section SVGs
32
+
33
+ ## v2.4.8 — Phase 3: agent polish + token-savings skill (July 2026)
34
+
35
+ Phase 3 of the sequenced plan (audit → routing → skills/agents). Disciplined polish — fixed the one agent with a real actionable gap, added the one skill filling a real gap, and deliberately did **not** pad agents that are already complete.
36
+
37
+ ### Agent polish
38
+
39
+ - **`security-reviewer` — added a validated Active Hunt command library.** The agent described what to check (OWASP checklist, severity table) but had almost no concrete detection commands, so it could only review code it was shown, not actively hunt. Added 15 copy-paste ripgrep patterns covering hardcoded secrets, SQL/shell/code injection, XSS/DOM sinks, SSRF, authZ gaps (alg=none, decode-without-verify), weak crypto, and unsafe deserialization / prototype pollution. **Every pattern was run against the repo to confirm it parses and executes** — caught and fixed one that used a negative lookahead ripgrep's Rust regex engine rejects.
40
+ - **Assessed the other "thin" agents and left them alone.** `refactor-cleaner` (knip/depcheck/ts-prune + risk tiers) and `tdd-guide` (red-green-refactor + coverage) are short because those workflows are concise — they already have real commands. Padding them would be bloat, against KISS/YAGNI. Line count ≠ quality.
41
+
42
+ ### New skill
43
+
44
+ - **`skills/ecc-token-savings/SKILL.md`** — 195 skills existed but **only one referenced the new 2.x features and none unified the savings stack**. A user on 2.4.7 has three shipped savings layers (RTK input, Terse output, codebase-graph structural queries) and no single guide. This skill is the playbook: which axis each layer cuts, how to verify/enable each, a per-session-type recommendation table, how to measure real savings in the dashboard, and honest caveats (Terse per-turn overhead, RTK not covering built-in file tools, graph needing an index). All commands verified real. Now 196 skills.
45
+
46
+ ### Assets
47
+
48
+ - SVG version badges → v2.4.8, all 31 8K PNGs re-rendered to match.
49
+
50
+ ### Verified
51
+
52
+ - 384 tests, 0 failures
53
+ - All 15 security-reviewer detection patterns run clean against the repo
54
+ - New skill's 11 referenced CLI subcommands all resolve to real handlers
55
+ - Installed copies (agent + skill) synced to this machine
56
+
5
57
  ## v2.4.7 — Command frontmatter + 8K asset regeneration (July 2026)
6
58
 
7
59
  Final review pass across every subsystem, plus asset refresh.
package/README.md CHANGED
@@ -430,6 +430,8 @@ Full reference: [`docs/dashboard.md`](docs/dashboard.md).
430
430
 
431
431
  ## RTK — Input Token Savings (60-90%)
432
432
 
433
+ <div align="center"><img src="social/section-rtk.svg" alt="RTK — Input Token Savings (60-90%)" width="900"/></div>
434
+
433
435
  [RTK (Rust Token Killer)](https://github.com/rtk-ai/rtk) — Apache-2.0, single Rust binary — intercepts shell commands before they run and filters the output. Common commands like `git status`, `ls`, `cargo test`, `docker ps` return ~80% less text with zero information loss for the LLM.
434
436
 
435
437
  ECC bundles RTK end-to-end:
@@ -462,6 +464,8 @@ total_saved: 5,107,394 ← 64.1% average reduction
462
464
 
463
465
  ## Terse Mode — Output Token Savings (40-70%)
464
466
 
467
+ <div align="center"><img src="social/section-terse.svg" alt="Terse Mode — Output Token Savings (40-70%)" width="900"/></div>
468
+
465
469
  RTK compresses input. **Terse mode** compresses output. Together they stack — savings on both sides of every turn.
466
470
 
467
471
  ECC's own implementation, inspired by [Caveman](https://github.com/JuliusBrussee/caveman) (MIT), independently written. Ships as a skill + two slash commands + a deterministic zero-dep memory-file compressor.
@@ -497,6 +501,8 @@ kodelythecc terse --help
497
501
 
498
502
  ## Codebase Graph — 158 Languages, Structural Queries
499
503
 
504
+ <div align="center"><img src="social/section-codebase.svg" alt="Codebase Graph — 158 Languages, Structural Queries" width="900"/></div>
505
+
500
506
  Powered by [DeusData/codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp) (MIT). AST-parsed knowledge graph via tree-sitter across **158 languages**, Hybrid LSP semantic type resolution for 11 major languages, cross-service HTTP/gRPC/GraphQL linking, 14 MCP tools for structural queries.
501
507
 
502
508
  **Why this matters**: "Who calls `ProcessOrder`?" via file-by-file grep = ~412k tokens. Same question via the graph = ~3.4k tokens. That's a **99% reduction** on structural questions.
@@ -527,6 +533,8 @@ kodelythecc codebase --help
527
533
 
528
534
  ## Interactive CLI Menu
529
535
 
536
+ <div align="center"><img src="social/section-cli.svg" alt="Interactive CLI Menu" width="900"/></div>
537
+
530
538
  Type `kodelythecc` alone in a real terminal → arrow-key menu opens.
531
539
 
532
540
  ```
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.4.7
1
+ 2.4.9
@@ -18,13 +18,47 @@ You are an expert security specialist focused on identifying and remediating vul
18
18
  5. **Dependency Security** — Check for vulnerable npm packages
19
19
  6. **Security Best Practices** — Enforce secure coding patterns
20
20
 
21
- ## Analysis Commands
21
+ ## Active Hunt — run these first, don't wait to be shown code
22
+
23
+ You are a hunter, not a passive reviewer. On any security task, sweep the codebase with these before reasoning. Each is copy-paste ready (ripgrep; fall back to `grep -rn` if `rg` is absent). Triage every hit — most are real, some are false positives (see that section).
22
24
 
23
25
  ```bash
24
- npm audit --audit-level=high
25
- npx eslint . --plugin security
26
+ # ── Dependency + lint baseline ──────────────────────────────────────────────
27
+ npm audit --audit-level=high 2>/dev/null || pnpm audit || yarn audit
28
+ npx eslint . --plugin security --quiet 2>/dev/null
29
+
30
+ # ── Hardcoded secrets (CRITICAL) ────────────────────────────────────────────
31
+ rg -n --no-heading -i '(api[_-]?key|secret|passwd|password|token|private[_-]?key)\s*[:=]\s*["\x27][A-Za-z0-9/+_-]{16,}' --glob '!*.example' --glob '!*.test.*'
32
+ rg -n 'sk-[A-Za-z0-9]{20,}|ghp_[A-Za-z0-9]{36}|AKIA[0-9A-Z]{16}|xox[baprs]-[A-Za-z0-9-]+' # OpenAI, GitHub, AWS, Slack
33
+ rg -n -- '-----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----'
34
+
35
+ # ── Injection (CRITICAL) ────────────────────────────────────────────────────
36
+ rg -n 'query\(\s*[`"\x27].*\$\{|execute\(\s*f["\x27]|\.raw\(|sequelize\.query\([^,]*\+' # string-built SQL
37
+ rg -n 'exec\(|execSync\(|child_process|os\.system\(|subprocess\.(call|run|Popen)\(.*(shell\s*=\s*True|\+)' # shell injection
38
+ rg -n 'eval\(|new Function\(|setTimeout\(\s*["\x27]|vm\.runIn' # code injection
39
+
40
+ # ── XSS / DOM sinks (HIGH) ──────────────────────────────────────────────────
41
+ rg -n 'innerHTML\s*=|dangerouslySetInnerHTML|v-html|\.html\(|document\.write\('
42
+ rg -n 'res\.send\([^)]*req\.(query|params|body)|render\([^)]*\$\{req\.' # reflected
43
+
44
+ # ── SSRF (HIGH) ─────────────────────────────────────────────────────────────
45
+ rg -n '(fetch|axios|got|request|urllib|requests\.get)\([^)]*\b(req\.(query|params|body)|request\.)'
46
+
47
+ # ── AuthZ gaps (CRITICAL) ───────────────────────────────────────────────────
48
+ rg -n 'router\.(get|post|put|patch|delete)\(' -l | head # then verify each route has an auth guard
49
+ rg -n 'jwt\.(decode|verify)\([^,)]*\)' -A1 # decode-without-verify, missing secret/alg
50
+ rg -n 'algorithms?\s*:\s*\[?\s*["\x27]none|verify\([^,]*,\s*null' # alg=none / null secret
51
+
52
+ # ── Weak crypto + password handling (CRITICAL/HIGH) ─────────────────────────
53
+ rg -n 'createHash\(\s*["\x27](md5|sha1)|hashlib\.(md5|sha1)|password\s*===|==\s*req\.body\.password'
54
+ rg -n 'Math\.random\(\)' # non-CSPRNG for tokens/ids
55
+
56
+ # ── Unsafe deserialization + prototype pollution (HIGH) ─────────────────────
57
+ rg -n 'pickle\.loads|yaml\.load\(|Marshal\.load|JSON\.parse\([^)]*req\.|_\.merge\(\{\}|Object\.assign\(target' # yaml.load: confirm it lacks SafeLoader
26
58
  ```
27
59
 
60
+ Report every confirmed hit with: file:line, severity, the exact fix, and (for secrets) "rotate immediately."
61
+
28
62
  ## Review Workflow
29
63
 
30
64
  ### 1. Initial Scan
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kodelyth-ecc",
3
- "version": "2.4.7",
3
+ "version": "2.4.9",
4
4
  "description": "Production-grade AI coding toolkit — 70 agents (incl. devil-mode adversarial crew), 194 skills, 97 commands, parallel multi-agent commands, semantic intent routing, self-learning memory, and a built-in MCP server (16 tools / 6 prompts / 377 resources) that bridges to Claude Desktop, LangGraph, AutoGen, CrewAI, and OpenAI Agents SDK. Works with Claude Code, Windsurf, Cursor, Codex, Antigravity, OpenCode, Cline, RooCode, Aider, Kimi, and Gemini CLI.",
5
5
  "author": "Kodelyth <github.com/sifxprime>",
6
6
  "license": "MIT",
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: ecc-token-savings
3
+ description: Maximize token savings across an ECC-equipped session by combining the three shipped layers — RTK (input compression on shell output), Terse mode (output compression on AI replies), and the codebase graph (structural queries instead of file-by-file grep). Use when the user asks how to cut token cost, why a session is expensive, or how to use RTK/Terse/codebase-graph together.
4
+ origin: ECC
5
+ ---
6
+
7
+ # ECC Token Savings Stack
8
+
9
+ Kodelyth ECC ships three independent token-savings layers. They stack. Used together on a typical coding session they cut **55-65% of total token cost** — more on explain-heavy or exploration-heavy work. This skill is the unified playbook; the per-feature docs live in `docs/rtk.md`, `docs/terse-mode.md`, `docs/codebase-graph.md`.
10
+
11
+ ## The three layers (know which axis each cuts)
12
+
13
+ | Layer | Cuts | How | Typical saving |
14
+ |---|---|---|---|
15
+ | **RTK** | Input tokens | Filters shell-command output before the LLM sees it | 60-90% on `git`/`ls`/`test`/`docker`/... |
16
+ | **Terse mode** | Output tokens | Compresses what the AI writes, code stays byte-exact | 40-70% on replies |
17
+ | **Codebase graph** | Input tokens | One structural query replaces dozens of grep/read cycles | ~99% on "who calls X" questions |
18
+
19
+ They are orthogonal — RTK and codebase-graph shrink what goes *in*, Terse shrinks what comes *out*. Turning on all three compounds.
20
+
21
+ ## Verify what's active
22
+
23
+ ```bash
24
+ kodelythecc rtk status # RTK binary + wired IDEs + live ledger
25
+ kodelythecc terse status # skill installed? current ledger totals
26
+ kodelythecc codebase status # binary version + indexed projects
27
+ ```
28
+
29
+ If any is missing, install it:
30
+
31
+ ```bash
32
+ kodelythecc rtk enable --all # wire RTK into every ECC-installed IDE
33
+ kodelythecc terse enable --all # install /terse + /terse-compress
34
+ kodelythecc codebase install # install codebase-memory-mcp + register
35
+ ```
36
+
37
+ ## The workflow — what to actually do
38
+
39
+ ### 1. Let RTK ride silently (already on after install)
40
+
41
+ RTK is a PreToolUse hook. Once wired, every shell command the AI runs is auto-filtered. Nothing to do per-session. If you want the compact output in `Read`/`Grep` too, prefer shell (`rg`, `cat`, `find`) or explicit `rtk read`/`rtk grep` — the Bash hook doesn't cover the built-in file tools.
42
+
43
+ ### 2. Turn on Terse mode for the session
44
+
45
+ ```
46
+ /terse full # telegram-style fragments, ~50% output cut (default)
47
+ /terse ultra # maximum, ~70% cut — for expert users on familiar work
48
+ /terse lite # light trim, ~25% — when you still want readable prose
49
+ /terse off # restore normal voice (docs writing, teaching, onboarding)
50
+ ```
51
+
52
+ Rule of thumb: `full` for day-to-day coding, `off` when the *output itself is the deliverable* (documentation, explanations for others, teaching).
53
+
54
+ ### 3. Query the graph instead of grepping
55
+
56
+ Once a project is indexed (`"Index this project"` in your AI tool), replace exploration greps with structural queries:
57
+
58
+ ```bash
59
+ kodelythecc codebase query search_graph '{"name_pattern": ".*Handler.*"}'
60
+ kodelythecc codebase query trace_path '{"function_name": "processOrder"}'
61
+ kodelythecc codebase query get_architecture '{}'
62
+ ```
63
+
64
+ "Who calls X", "what's the impact of changing Y", "show the architecture" — all one query, ~3k tokens, versus ~400k tokens of file-by-file reading.
65
+
66
+ ### 4. Compress persistent memory files once, save forever
67
+
68
+ ```bash
69
+ kodelythecc terse compress CLAUDE.md # ~30% smaller, code/URLs/paths byte-exact
70
+ kodelythecc terse compress tasks/lessons.md
71
+ ```
72
+
73
+ Every session that loads these files now costs ~30% fewer input tokens — permanently, not per-turn.
74
+
75
+ ## Measure it — don't guess
76
+
77
+ ```bash
78
+ kodelythecc dashboard # Token Savings tab: RTK (input) + Terse (output), live ledgers
79
+ kodelythecc rtk gain --all # raw RTK savings numbers
80
+ kodelythecc terse stats # output tokens saved, by level
81
+ ```
82
+
83
+ The dashboard shows real ledger data, never estimates. Point the user there when they ask "how much am I actually saving."
84
+
85
+ ## Honest caveats — say these, don't oversell
86
+
87
+ - **Terse adds ~800-1200 input tokens per turn** (the skill prompt). On turns under ~2k output tokens it can be net-negative — skip Terse for short back-and-forth.
88
+ - **RTK only covers the Bash tool.** `Read`/`Grep`/`Glob` bypass it. Use shell equivalents to get RTK compression there.
89
+ - **The codebase graph must be indexed first** and re-indexed after big changes (`"Index this project"` or `codebase-memory-mcp` auto-watch).
90
+ - Native Windows RTK install is manual (`.zip` from releases); WSL and macOS/Linux auto-install.
91
+
92
+ ## Quick recommendation by session type
93
+
94
+ | Session type | RTK | Terse | Graph |
95
+ |---|:---:|:---:|:---:|
96
+ | Day-to-day coding | on | `full` | query on explore |
97
+ | Deep debugging | on | `lite` (keep reasoning readable) | `trace_path` heavily |
98
+ | Codebase exploration / onboarding | on | `off` | primary tool |
99
+ | Writing docs / teaching | on | `off` | as needed |
100
+ | Expert on familiar code | on | `ultra` | query on explore |
101
+
102
+ ## See also
103
+
104
+ - `docs/rtk.md`, `docs/terse-mode.md`, `docs/codebase-graph.md` — per-feature deep dives
105
+ - Skills: [[terse-mode]], [[token-budget-advisor]], [[cost-aware-model-routing]]
106
+ - The `cost-aware-model-routing` rule picks the model *tier*; this skill cuts the *token count* at whatever tier you're on.