kodelyth-ecc 2.4.7 → 2.4.8
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 +24 -0
- package/VERSION +1 -1
- package/agents/security-reviewer.md +37 -3
- package/package.json +1 -1
- package/skills/ecc-token-savings/SKILL.md +106 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Kodelyth ECC are documented here.
|
|
4
4
|
|
|
5
|
+
## v2.4.8 — Phase 3: agent polish + token-savings skill (July 2026)
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
### Agent polish
|
|
10
|
+
|
|
11
|
+
- **`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.
|
|
12
|
+
- **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.
|
|
13
|
+
|
|
14
|
+
### New skill
|
|
15
|
+
|
|
16
|
+
- **`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.
|
|
17
|
+
|
|
18
|
+
### Assets
|
|
19
|
+
|
|
20
|
+
- SVG version badges → v2.4.8, all 31 8K PNGs re-rendered to match.
|
|
21
|
+
|
|
22
|
+
### Verified
|
|
23
|
+
|
|
24
|
+
- 384 tests, 0 failures
|
|
25
|
+
- All 15 security-reviewer detection patterns run clean against the repo
|
|
26
|
+
- New skill's 11 referenced CLI subcommands all resolve to real handlers
|
|
27
|
+
- Installed copies (agent + skill) synced to this machine
|
|
28
|
+
|
|
5
29
|
## v2.4.7 — Command frontmatter + 8K asset regeneration (July 2026)
|
|
6
30
|
|
|
7
31
|
Final review pass across every subsystem, plus asset refresh.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.4.
|
|
1
|
+
2.4.8
|
|
@@ -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
|
-
##
|
|
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
|
-
|
|
25
|
-
|
|
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.
|
|
3
|
+
"version": "2.4.8",
|
|
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.
|