kodelyth-ecc 2.24.11 → 2.29.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/CHANGELOG.md CHANGED
@@ -2,6 +2,214 @@
2
2
 
3
3
  All notable changes to Kodelyth ECC are documented here.
4
4
 
5
+ ## v2.29.0 — Publish fix: ajv was an undeclared dependency (November 2026)
6
+
7
+ **What happened:** v2.26.0, v2.27.0, and v2.28.0 were tagged and released on GitHub,
8
+ but their npm publishes all **failed** — so npm stayed at v2.25.0. The pre-publish
9
+ test step crashed with `Cannot find module 'ajv'`: `scripts/lib/state-store/
10
+ schema.js` required `ajv` at module load, but `ajv` was never a declared
11
+ dependency. It was present on the maintainer's machine (transitively) so local
12
+ tests passed, and absent in CI's clean install so the publish test failed. The
13
+ new `state-store` test (added in v2.26.0) imports state-store at the top level,
14
+ which is what surfaced it — the same undeclared-dependency bug class as sql.js.
15
+
16
+ **The fix:** `ajv` is now loaded lazily inside `getAjv()` (not at import), with a
17
+ clean `ECC_AJV_UNAVAILABLE` error if absent, and it is declared as an **optional**
18
+ dependency alongside `sql.js` so it travels with the SQLite state-store it
19
+ validates. Importing state-store no longer requires ajv; the module degrades the
20
+ same way it does without sql.js.
21
+
22
+ **This release rolls up everything from v2.26.0–v2.28.0** (Memory Core, Platform
23
+ reach, Super Agent) — all of which is already on `main` — and is the first of
24
+ them to actually reach npm. Because npm versions and GitHub tags are immutable,
25
+ those three versions could not be re-published under their own numbers; v2.29.0
26
+ carries their code to npm.
27
+
28
+ ## v2.28.0 — Super Agent (beta): the autonomous orchestrator (November 2026)
29
+
30
+ The driver the memory/orchestration audit found missing. ECC had the primitives —
31
+ the `blueprint` DAG decomposer, the tmux+worktree swarm, the GAN evaluation loop,
32
+ the Arena state machine — but nothing chained them, the swarm never merged its
33
+ worker branches, and no run could resume. This adds the chain.
34
+
35
+ **An Arena-style deterministic state machine.** `scripts/super-agent/`:
36
+
37
+ - `dag.js` — the plan as a dependency graph: which steps are runnable now, is it
38
+ complete, is it stalled, is it a valid DAG (cycle/dep/self-dep checks).
39
+ - `state.js` — resumable runs persisted after every step, plus the **budget
40
+ governor** (`--token-cap` / `--step-cap`) that bounds a whole run, not just one
41
+ session.
42
+ - `orchestrator.js` — a **pure** `nextAction(run)` that decides the next move, and
43
+ `submit*` recorders that advance the phase. Because the decision function is
44
+ pure, the entire control plane is tested (20 tests) **without spawning an
45
+ agent**: decompose → dispatch (in dependency order, parallel where independent)
46
+ → integrate → verify → done.
47
+ - `integrate.js` — the missing branch-merge piece: `mergeOrder` (dependency-first)
48
+ and `detectConflicts` via `git merge-tree --write-tree`, which finds conflicts
49
+ with **no working-tree side effects**.
50
+ - `cli.js` + `kodelythecc super-agent …` — the drivable surface (start / next /
51
+ plan / step / integrate / verify / status / list / resume).
52
+
53
+ **It cannot lie about its own state.** A step that didn't succeed is recorded
54
+ `failed`, and a failed dependency stalls the run instead of building on it.
55
+ Integration conflicts stop for a human. `verify --passed` requires real green
56
+ tests. The budget cap halts the run rather than being worked around.
57
+
58
+ **How it runs.** The state machine is tokenless; the driving LLM performs each
59
+ action it names (blueprint to decompose, the swarm to dispatch, the GAN loop to
60
+ evaluate, git to integrate) and reports back. New `super-agent` agent +
61
+ `/super-agent` command + routing teach it the loop.
62
+
63
+ *Beta:* the control plane, CLI, and branch integration are tested and working; the
64
+ LLM-driven execution of each action is delegated (exercised by the agent persona,
65
+ not CI). This is the 71st agent / 104th command — a count sweep across the
66
+ hardcoded docs and brand assets is a tracked follow-up; the catalog and site
67
+ derive their counts automatically.
68
+
69
+ ## v2.27.0 — Platform reach: Codex + Kiro get MCP & memory; Kiro is the 12th platform (November 2026)
70
+
71
+ MCP — and therefore the whole tool surface plus **memory** — now auto-wires for
72
+ **six** IDEs out of the box. Two releases ago it was Claude Code only.
73
+
74
+ **Codex CLI gets MCP (TOML).** Codex stores MCP servers in `~/.codex/config.toml`,
75
+ not JSON. A minimal, non-clobbering writer adds the `[mcp_servers."kodelyth-ecc"]`
76
+ table only when it is absent and otherwise leaves the file exactly as it is
77
+ (appending a table is order-independent in TOML, so other servers and settings
78
+ survive). Wired into the Codex post-install.
79
+
80
+ **Kiro is a first-class target now — the 12th platform.** `kodelythecc --target
81
+ kiro` installs the rules as always-on **steering** docs (`.kiro/steering/`) and
82
+ wires ECC's MCP server into `.kiro/settings/mcp.json`. Kiro is MCP-native, so the
83
+ full catalog — 70 agents, 196 skills, memory — arrives over MCP on demand rather
84
+ than as a 266-file dump into steering. Added to `install.sh`, `install.ps1`, and
85
+ the interactive menu.
86
+
87
+ **MCP auto-wiring now covers:** Claude Code, Cursor, Windsurf, Gemini CLI, Codex,
88
+ and Kiro. The merge is the same hardened one that protects `~/.claude.json` —
89
+ absent files created, present files merged without clobbering, unparseable files
90
+ refused.
91
+
92
+ **Honest limits (not papered over):** RTK upstream has no agent for Kiro or
93
+ Aider, so those don't get RTK filtering (and ECC doesn't pretend they do).
94
+ Cline / Roo Code MCP stays manual — their settings live in VS Code globalStorage
95
+ at an editor-version-specific path ECC won't guess. The `terse enable` secondary
96
+ flow still has project-vs-home path quirks for some IDEs (the main install copies
97
+ Terse correctly); tracked as a follow-up.
98
+
99
+ ## v2.26.0 — Memory Core, first cut: identity, redaction, fused recall (November 2026)
100
+
101
+ The first cut of the Memory Core track. It fixes the memory data model's biggest
102
+ correctness and safety gaps on the existing store, without the risk of a full
103
+ substrate swap. Everything ships with tests (51 test files, all passing).
104
+
105
+ **Memory stops orphaning on clone/move.** The store keyed each project by
106
+ `sha256(absolute path)`, so moving, cloning, or renaming a repo changed its path
107
+ and filed all future memories under a new id — hiding everything captured before.
108
+ Memory now keys by the **normalized git remote** (git-remote-first, path
109
+ fallback), which is stable where the path is not. `git@github.com:o/r.git`,
110
+ `https://github.com/o/r`, and `ssh://…/o/r` all resolve to one id. Backward
111
+ compatible by **read-both**: recall also matches the legacy path id, so nothing
112
+ captured under the old scheme is lost. New `scripts/memory/project-id.js`.
113
+
114
+ **Secrets never reach the memory log.** A captured memory is stored, recalled,
115
+ and injected into future sessions — so a leaked key in a `problem`/`approach`
116
+ would persist and re-surface. Capture now runs a shared credential redactor
117
+ (`scripts/lib/redact.js`) over everything it stores: AWS, GitHub, OpenAI/
118
+ Anthropic, Stripe, Slack, Google, npm tokens, JWTs, and PEM private-key blocks,
119
+ plus `--token=`/`Authorization:`/`password=`/`api_key=` forms. Every pattern is
120
+ linear (no ReDoS). The bash-command logger now shares the same redactor, which
121
+ also widened its coverage.
122
+
123
+ **Recall ranks by more than keywords.** BM25 still decides relevance, but among
124
+ similarly-relevant memories a **recent, proven** one now outranks an old or
125
+ failed one (relevance × recency × outcome). A memory whose approach didn't stick
126
+ (`resolved:false`) sinks; a confirmed one rises. Relevance still dominates — a
127
+ much more relevant memory is never buried by a newer one.
128
+
129
+ **`state.db` actually works now.** The optional SQLite layer (session store,
130
+ status DB, skill-evolution tracker) required `sql.js` at module load, but it was
131
+ never a declared dependency — so importing it threw "Cannot find module 'sql.js'"
132
+ on every install, before any caller's try/catch could run. `sql.js` is now a real
133
+ **optional** dependency, loaded lazily; a missing module becomes a clean, coded
134
+ error (`ECC_SQLITE_UNAVAILABLE`) that callers degrade on, and `isSqliteAvailable()`
135
+ is a non-throwing probe for `doctor`. The core (memory, RTK, Terse, graph) never
136
+ needed it and still doesn't.
137
+
138
+ **Opt-in on-device semantic recall.** An optional semantic tier, **off by
139
+ default**, that keeps the promise: the default session stays pure BM25, zero
140
+ dependency, zero network. Turn it on with `KODELYTH_MEMORY_EMBEDDINGS=on` and the
141
+ optional `@xenova/transformers` dependency, and recall blends BM25 with local,
142
+ on-device embedding similarity (hybrid rank fusion); embeddings live in a sidecar,
143
+ so `memories.jsonl` and its index are byte-for-byte unchanged. With it off — or
144
+ the dependency absent, or any failure — recall is exactly BM25. Inference runs
145
+ locally; only the first-ever model load touches the network. Pluggable provider
146
+ interface, so the fusion/gating logic is fully tested with a stub and the heavy
147
+ dependency is never required.
148
+
149
+ **Auto-capture that respects consent.** The Stop hook already auto-extracted
150
+ memory candidates from each finished session into a review queue — but nothing
151
+ could read or promote them, so the queue was a dead end (the `/memory
152
+ review-pending` it pointed at did not exist). Now `kodelythecc memory
153
+ list-pending` shows what a session proposed, `promote-pending <id|all>` stores the
154
+ ones you confirm (capture redacts them on the way in), and `discard-pending`
155
+ drops the rest. Candidates are collected automatically; storing them is one
156
+ explicit command, so nothing enters the recall store silently — the memory
157
+ protocol's "never capture without confirmation" holds. The next session surfaces
158
+ the pending count so proposals are not forgotten.
159
+
160
+ **On the substrate:** the full 5-store merge is moot by design — the core stays
161
+ pure-JS/JSONL and SQLite is an optional add-on, not the substrate.
162
+
163
+ ## v2.25.0 — Foundations: honest numbers, a memory that learns, MCP beyond Claude (November 2026)
164
+
165
+ The first cut of the v3.0 "Foundations" track. Almost no new surface area — this
166
+ release makes existing systems tell the truth and wires up machinery that was
167
+ built but never connected. Every change ships with tests (48 test files, all
168
+ passing).
169
+
170
+ **Truth-in-measurement.** Three claims did not match the code, and an enterprise
171
+ audit would catch all three:
172
+
173
+ - The Terse runtime ledger claimed "every terse-active turn is recorded" — but
174
+ nothing wrote it, and its per-turn savings were modeled from a fixed multiplier,
175
+ not measured. Rows are now flagged `estimated: true`, the docs say plainly the
176
+ figure is an estimate (the Terse *file* compressor stays a real measurement),
177
+ and the unshipped statusline badge claim is gone.
178
+ - The RTK "5,107,394 tokens / 64.1% — all real" headline was hand-authored copy,
179
+ not a computed number. It is now labelled an example snapshot that points at
180
+ `rtk gain` for your own live figures. RTK's `gain` measurement was, and stays,
181
+ real.
182
+ - The codebase-graph binary's `--version` is unreliable — builds report an old
183
+ number while exposing much newer tools. ECC no longer trusts it: it detects
184
+ what the binary can actually do and flags the inconsistency instead of showing
185
+ a number as fact.
186
+
187
+ **The memory that learns, now actually learns.** The structured instinct engine
188
+ recorded every correction with confidence, decay, and outcome scoring — and
189
+ nothing ever read it, so none of it influenced a session. Session start now
190
+ injects the high-confidence, non-stale instincts for the current project. The
191
+ dormant loop is closed.
192
+
193
+ **RTK won't wire the wrong binary.** `reachingforthejack/rtk` (Rust Type Kit)
194
+ ships a binary also called `rtk`; ECC used to treat any `rtk` on PATH as Rust
195
+ Token Killer and would patch hooks into the wrong tool. It now verifies the
196
+ signature (`rtk gain`) before wiring or measuring anything.
197
+
198
+ **MCP — and therefore memory — reaches beyond Claude Code.** ECC auto-registered
199
+ its MCP server for Claude only, so the whole tool surface, memory included, was
200
+ effectively Claude-exclusive. It now also writes the MCP config for Cursor,
201
+ Windsurf, and Gemini CLI (the IDEs that use the same JSON config shape), reusing
202
+ the hardened merge that never clobbers your other servers. Codex (TOML) and
203
+ Cline/Roo (editor storage) are the next step.
204
+
205
+ **Fixes found along the way.** `statusAll()` in the MCP registrar called a
206
+ function that no longer existed (`readJson`), so `kodelythecc doctor` and the
207
+ `mcp` status command both threw "readJson is not defined". Fixed.
208
+
209
+ **Routing.** The intent router learned the newer codebase-graph capabilities:
210
+ smart test selection (`detect_changes scope:tests`), hot-path/complexity queries,
211
+ code-to-docs links, and ADRs.
212
+
5
213
  ## v2.24.11 — every docs page gets its own diagram (October 2026)
6
214
 
7
215
  Documentation and site only. No code change.
package/CLAUDE.md CHANGED
@@ -12,7 +12,7 @@ Guidance for Claude Code when working with this repository.
12
12
  - **44 hook entries** across 8 events — quality gates, memory inject + capture, correction encoding, prompt-injection guard, token-budget enforcer
13
13
  - **15 rules** — always-on coding standards + semantic intent routing + memory protocol + self-improvement
14
14
 
15
- Works with Claude Code, Windsurf, Cursor, Codex CLI, Antigravity, OpenCode, Cline, Roo Code, Aider, Kimi, and Gemini CLI — **11 platforms** (13 install targets).
15
+ Works with Claude Code, Windsurf, Cursor, Codex CLI, Antigravity, OpenCode, Cline, Roo Code, Aider, Kimi, Gemini CLI, and Kiro — **12 platforms** (14 install targets). MCP (and therefore memory) auto-wires for Claude Code, Cursor, Windsurf, Gemini CLI, Codex, and Kiro.
16
16
 
17
17
  ## Architecture
18
18
 
@@ -131,7 +131,7 @@ These fire multiple specialist agents simultaneously:
131
131
  - Agent format: Markdown with YAML frontmatter (name, description, tools, model)
132
132
  - Skill format: Markdown with clear sections (description, when to use, how it works)
133
133
  - Hook format: JSON with matcher conditions and command/notification hooks
134
- - No runtime deps in core — `@modelcontextprotocol/sdk` is an optionalDependency for MCP server only
134
+ - No **required** runtime deps — the core (agents, skills, memory, RTK, Terse, graph) is pure-JS and runs on a default install with nothing installed. Three `optionalDependencies`: `@modelcontextprotocol/sdk` (MCP server), `sql.js` (optional SQLite for the session store / status DB / skill-evolution tracker), and `@xenova/transformers` (optional on-device memory embeddings, off by default). Each degrades cleanly to the pure-JS path when absent.
135
135
 
136
136
  ## Contributing
137
137
 
package/README.md CHANGED
@@ -32,7 +32,7 @@ npx kodelyth-ecc
32
32
  ```
33
33
 
34
34
  Works on **macOS, Linux and Windows** with Claude Code, Windsurf, Cursor, Codex CLI,
35
- Google Antigravity, OpenCode, Cline, Roo Code, Aider, Kimi and Gemini CLI.
35
+ Google Antigravity, OpenCode, Cline, Roo Code, Aider, Kimi, Gemini CLI and Kiro.
36
36
 
37
37
  ---
38
38
 
@@ -99,7 +99,7 @@ Most "AI agent kits" are folders of markdown files you have to remember the name
99
99
  | **8 parallel commands** | Fire 3-8 agents simultaneously, aggregate results | Rare |
100
100
  | **Compound memory** | BM25 local recall + auto-inject + project lessons | Cloud-only or absent |
101
101
  | **44 hook entries** | Quality gates, secret scan, project-DNA detection | Often missing |
102
- | **11 IDE platforms** | Claude Code, Windsurf, Cursor, Codex, Antigravity, OpenCode, Cline, Roo Code, Aider, Kimi, Gemini CLI (13 install targets) | 1-2 platforms typical |
102
+ | **12 IDE platforms** | Claude Code, Windsurf, Cursor, Codex, Antigravity, OpenCode, Cline, Roo Code, Aider, Kimi, Gemini CLI, Kiro (14 install targets) | 1-2 platforms typical |
103
103
  | **Zero telemetry** | Everything stays on your disk; verifiable | Many kits phone home |
104
104
 
105
105
  ### Quick Comparison vs Other Kits
@@ -524,13 +524,16 @@ kodelythecc rtk gain --all # raw rtk savings output
524
524
  kodelythecc rtk --help # focused help
525
525
  ```
526
526
 
527
- ### Live proof (from this repo maintainer's Mac)
527
+ ### Example snapshot (one maintainer's Mac, one point in time)
528
+
529
+ Not a guaranteed figure — RTK measures savings per command, and yours depend on
530
+ which commands you run. Run `rtk gain` to see your own live numbers.
528
531
 
529
532
  ```
530
533
  total_commands: 1,285
531
534
  total_input: 7,964,612 (raw)
532
535
  total_output: 2,858,501 (after RTK filter)
533
- total_saved: 5,107,394 ← 64.1% average reduction
536
+ total_saved: 5,107,394 ← 64.1% on this sample
534
537
  ```
535
538
 
536
539
  ---
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: super-agent
3
+ description: Autonomous multi-step orchestrator — Kodelyth. Takes a single large objective and drives it to done through a deterministic state machine: decompose into a dependency DAG, route and dispatch each step (parallel where independent), evaluate against exit criteria, merge the worker branches with conflict detection, and verify. Resumable and budget-governed. Use for objectives that are too big for one pass and decompose into dependent steps. NOT for a single edit or a one-file change.
4
+ tools: Read, Grep, Glob, Bash, Write, Edit, Task
5
+ model: opus
6
+ ---
7
+
8
+ # Super Agent — the autonomous orchestrator
9
+
10
+ You are the driver of a tokenless state machine. You do **not** improvise the
11
+ control flow — the machine owns it, so a run is deterministic, resumable, and
12
+ bounded. Your job is to perform each action the machine asks for, using ECC's
13
+ existing primitives, and report the result back.
14
+
15
+ The machine lives in `scripts/super-agent/` and is driven entirely through:
16
+
17
+ ```bash
18
+ kodelythecc super-agent <command> ...
19
+ ```
20
+
21
+ ## The loop
22
+
23
+ 1. **Start** a run from the objective:
24
+ ```bash
25
+ kodelythecc super-agent start --goal "<objective>" [--token-cap N] [--step-cap N] [--scope .]
26
+ ```
27
+ Always set a `--step-cap` or `--token-cap`. An autonomous run without a budget
28
+ is how costs run away. The output gives you a `runId` and the first action.
29
+
30
+ 2. **Ask what to do next**, and do exactly that:
31
+ ```bash
32
+ kodelythecc super-agent next <runId>
33
+ ```
34
+ The JSON `action` is one of:
35
+
36
+ - **`decompose`** — Break the goal into a dependency DAG. Use the `blueprint`
37
+ skill to produce it: each step is `{ id, description, deps: [ids],
38
+ contextBrief, exitCriteria }`. `contextBrief` must let a fresh agent execute
39
+ the step cold. Write the array to a file and install it:
40
+ ```bash
41
+ kodelythecc super-agent plan <runId> --file plan.json
42
+ ```
43
+
44
+ - **`dispatch`** — The listed steps are ready (their dependencies are done).
45
+ For a single small step, do it yourself or with one subagent. For several
46
+ independent steps, run them in parallel (the Task tool, or
47
+ `kodelythecc swarm` for isolated git worktrees). Each step does its work on
48
+ its **own branch**. As each finishes, report it:
49
+ ```bash
50
+ kodelythecc super-agent step <runId> <stepId> --status done --branch <branch> [--tokens N]
51
+ # or, if it could not be completed:
52
+ kodelythecc super-agent step <runId> <stepId> --status failed
53
+ ```
54
+ A failed step whose result others depend on stalls the run — that is the
55
+ machine protecting you from building on a broken foundation.
56
+
57
+ - **`integrate`** — All steps are done. Merge the worker branches. Detect
58
+ conflicts first, without touching the tree, via
59
+ `scripts/super-agent/integrate.js` (`mergeOrder` for the order,
60
+ `detectConflicts` for the check). If clean, merge in that order and:
61
+ ```bash
62
+ kodelythecc super-agent integrate <runId>
63
+ ```
64
+ If branches conflict, do **not** force it — report the conflicting files and
65
+ stop for a human:
66
+ ```bash
67
+ kodelythecc super-agent integrate <runId> --conflicts path/a,path/b
68
+ ```
69
+
70
+ - **`verify`** — Run the real verification gate (tests, build, type-check — use
71
+ `/verify`). Then:
72
+ ```bash
73
+ kodelythecc super-agent verify <runId> --passed --detail "693 tests pass"
74
+ # or --failed --detail "2 tests red"
75
+ ```
76
+
77
+ - **`halt`** — The budget cap was reached or the plan stalled. Stop and report
78
+ the reason. Do not work around the cap.
79
+
80
+ - **`report`** — The run is done, failed, or stopped. Summarize with
81
+ `kodelythecc super-agent status <runId>`.
82
+
83
+ 3. **Repeat** `next` → act → submit until the action is `report`.
84
+
85
+ ## Resuming
86
+
87
+ A run persists after every step. To pick up a crashed or earlier run:
88
+ `kodelythecc super-agent list`, then `kodelythecc super-agent next <runId>` — it
89
+ continues from exactly where it stopped.
90
+
91
+ ## Rules
92
+
93
+ - Never fabricate a step result. If a step did not actually succeed, submit it as
94
+ `--status failed` — the machine handles the consequences honestly.
95
+ - Never bypass the budget or an `integrate` conflict. Those stops exist on purpose.
96
+ - The verification gate is real: only submit `--passed` when tests/build actually
97
+ pass, with evidence in `--detail`.
98
+ - Decompose into the smallest steps that still make sense as a unit of work, with
99
+ honest dependency edges — parallelism and correct integration both depend on
100
+ the edges being right.
101
+
102
+ You are the calm operator of a machine that cannot lie about its own state.
@@ -419,11 +419,49 @@ if (args[0] === 'memory') {
419
419
  w(`Top tags: ${s.topTags.slice(0, 8).map(t => t[0] + '(' + t[1] + ')').join(', ')}`);
420
420
  process.exit(0);
421
421
  }
422
- process.stderr.write('unknown memory subcommand. try: capture | recall | list | stats\n');
422
+ // Auto-capture review queue: the Stop hook auto-queues candidates; these are
423
+ // the consent gate that turns them into stored memories.
424
+ if (sub === 'list-pending' || sub === 'review-pending') {
425
+ const pending = require(path.join(ROOT, 'scripts', 'memory', 'pending.js'));
426
+ const items = pending.listPending();
427
+ if (!items.length) { w('No memory candidates pending review.'); process.exit(0); }
428
+ w(`${items.length} candidate(s) pending review:`);
429
+ for (const c of items) w(` [${c.id}] (score ${c.score ?? '-'}) ${(c.problem || '').slice(0, 70)}`);
430
+ w('Confirm: kodelythecc memory promote-pending <id|all> · drop: kodelythecc memory discard-pending <id|all>');
431
+ process.exit(0);
432
+ }
433
+ if (sub === 'promote-pending') {
434
+ const pending = require(path.join(ROOT, 'scripts', 'memory', 'pending.js'));
435
+ const sel = rest.find(a => !a.startsWith('--')) || 'all';
436
+ const stored = pending.promotePending(sel);
437
+ if (!stored.length) { w('Nothing promoted (no matching pending candidate).'); process.exit(0); }
438
+ w(`✓ stored ${stored.length} memor${stored.length === 1 ? 'y' : 'ies'}:`);
439
+ for (const m of stored) w(` ${m.id} ${(m.problem || '').slice(0, 60)}`);
440
+ process.exit(0);
441
+ }
442
+ if (sub === 'discard-pending') {
443
+ const pending = require(path.join(ROOT, 'scripts', 'memory', 'pending.js'));
444
+ const sel = rest.find(a => !a.startsWith('--')) || 'all';
445
+ w(`Discarded ${pending.discardPending(sel)} pending candidate(s).`);
446
+ process.exit(0);
447
+ }
448
+ process.stderr.write('unknown memory subcommand. try: capture | recall | list | stats | list-pending | promote-pending | discard-pending\n');
423
449
  process.exit(2);
424
450
  } catch (e) { process.stderr.write(`[memory] ${e.message}\n`); process.exit(1); }
425
451
  }
426
452
 
453
+ // ── Subcommand: super-agent (autonomous orchestrator driver) ─────────────────
454
+ // Arena-style state machine: it does not run agents, it tells the driving LLM
455
+ // what to do next. start → plan → step… → integrate → verify → done, resumable.
456
+ // kodelythecc super-agent start --goal "<objective>" [--token-cap N] [--step-cap N]
457
+ // kodelythecc super-agent next|status|list <id> ; plan/step/integrate/verify to advance
458
+ if (args[0] === 'super-agent' || args[0] === 'superagent') {
459
+ try {
460
+ require(path.join(ROOT, 'scripts', 'super-agent', 'cli.js')).main(args.slice(1));
461
+ process.exit(0);
462
+ } catch (e) { process.stderr.write(`[super-agent] ${e.message}\n`); process.exit(1); }
463
+ }
464
+
427
465
  // ── Subcommand: god / evil / arena (the adversarial arena) ──────────────────
428
466
  // Usage:
429
467
  // kodelythecc god --task "<task>" [--json] plan a GOD-mode build
@@ -1883,7 +1921,24 @@ function runPostInstall(status, args) {
1883
1921
  const marker = r.action === 'added' ? '✓ added' : r.action === 'updated' ? '✓ updated' : r.action === 'unchanged' ? '· unchanged' : `· ${r.action}`;
1884
1922
  process.stdout.write(` ${marker}: ${r.file}\n`);
1885
1923
  }
1886
- process.stdout.write(` · Restart Claude Code / Claude Desktop to pick up the server\n`);
1924
+
1925
+ // Also wire ECC's MCP server into the specific non-Claude IDE this install
1926
+ // targeted, when that IDE uses a JSON MCP config we can safely merge
1927
+ // (Cursor, Windsurf, Gemini CLI). This is what extends memory and the whole
1928
+ // MCP tool surface beyond Claude Code — previously they were Claude-only.
1929
+ const mcpTargetIdx = args.indexOf('--target');
1930
+ const mcpRawTarget = mcpTargetIdx >= 0 && args[mcpTargetIdx + 1] ? args[mcpTargetIdx + 1] : 'claude-code';
1931
+ if (!/^claude/.test(mcpRawTarget)) {
1932
+ for (const r of reg.registerForTarget(mcpRawTarget, { cwd: process.cwd(), log: () => {} })) {
1933
+ if (r.action === 'added' || r.action === 'updated') {
1934
+ process.stdout.write(` ✓ ${r.action}: ${r.file}\n`);
1935
+ } else if (r.action === 'error') {
1936
+ process.stdout.write(` · skipped ${r.file}: ${r.error}\n`);
1937
+ }
1938
+ // 'unsupported' / 'unchanged' stay quiet — not every target has a JSON MCP config
1939
+ }
1940
+ }
1941
+ process.stdout.write(` · Restart your AI tool to pick up the server\n`);
1887
1942
  } catch (e) {
1888
1943
  process.stderr.write(`[mcp] self-register skipped: ${e.message}\n`);
1889
1944
  }
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: super-agent
3
+ description: Drive a large objective to completion through the autonomous orchestrator — decompose, dispatch (parallel), integrate branches, verify. Resumable, budget-governed.
4
+ ---
5
+
6
+ # /super-agent
7
+
8
+ Turn one big objective into a finished, verified result by running it through the
9
+ **super-agent** orchestrator — a deterministic, resumable, budget-governed state
10
+ machine (`scripts/super-agent/`).
11
+
12
+ ## Usage
13
+
14
+ ```
15
+ /super-agent <objective> e.g. /super-agent build a rate-limited login API with tests
16
+ /super-agent resume <runId> continue a crashed or earlier run
17
+ ```
18
+
19
+ ## What it does
20
+
21
+ Behaves as the `super-agent` agent and runs the loop:
22
+
23
+ 1. `kodelythecc super-agent start --goal "<objective>" --step-cap <N>` — always with a budget.
24
+ 2. `kodelythecc super-agent next <id>` → perform the action it names:
25
+ - **decompose** → build a dependency DAG with the `blueprint` skill, `… plan <id> --file`.
26
+ - **dispatch** → run each ready step (parallel where independent, each on its own branch), `… step <id> <step> --status done --branch`.
27
+ - **integrate** → conflict-check with `scripts/super-agent/integrate.js`, merge in `mergeOrder`, `… integrate <id>` (or `--conflicts …` to stop).
28
+ - **verify** → run `/verify`, then `… verify <id> --passed|--failed`.
29
+ 3. Repeat until **report**.
30
+
31
+ ## When to use it
32
+
33
+ - A feature or change too large for one pass, that splits into dependent steps.
34
+ - You want parallel execution of independent steps with correct, conflict-checked integration.
35
+ - You want the run to survive a crash and resume.
36
+
37
+ ## When NOT to use it
38
+
39
+ - A single edit, one-file change, or a quick fix — just do it, or use the specific specialist.
40
+ - Something with no real internal dependencies — the swarm (`/swarm`) or a single agent is lighter.
41
+
42
+ ## Guarantees
43
+
44
+ - Nothing is faked: a step that did not succeed is recorded `failed`, and a failed
45
+ dependency stalls the run instead of building on it.
46
+ - The budget cap and integration-conflict stop are honored, never bypassed.
47
+ - `verify --passed` requires the tests/build to actually pass, with evidence.
@@ -70,7 +70,7 @@ function main() {
70
70
  // ── Improvement A: build contextual advisory from session activity ────────
71
71
  const parts = [];
72
72
  if (candidates.length > 0) {
73
- parts.push(`${candidates.length} memory candidate(s) queued — run "/memory review-pending" to confirm`);
73
+ parts.push(`${candidates.length} memory candidate(s) queued — review with "kodelythecc memory list-pending", then "promote-pending <id|all>" to confirm`);
74
74
  }
75
75
  if (hadFileWrites) {
76
76
  parts.push('files written this session — run "/memory save" or "/learn-eval" to save what we learned');
package/install.ps1 CHANGED
@@ -155,6 +155,17 @@ switch ($Target) {
155
155
  $HooksDest = ""
156
156
  $RulesDest = "$Dest\rules"
157
157
  }
158
+ "kiro" {
159
+ # Kiro (AWS AI IDE): rules become always-on steering; the full catalog
160
+ # arrives via the MCP server the Node post-install wires into
161
+ # .kiro\settings\mcp.json. MCP-native, so no file dump into steering.
162
+ $Dest = "$(Get-Location)\.kiro"
163
+ $AgentsDest = ""
164
+ $SkillsDest = ""
165
+ $CommandsDest = ""
166
+ $HooksDest = ""
167
+ $RulesDest = "$Dest\steering"
168
+ }
158
169
  "cline" {
159
170
  $Dest = "$(Get-Location)\.clinerules"
160
171
  $AgentsDest = ""
@@ -205,7 +216,7 @@ switch ($Target) {
205
216
  }
206
217
  default {
207
218
  Write-Host "Unknown target: $Target" -ForegroundColor Red
208
- Write-Host "Valid targets: claude-home, windsurf-project, windsurf-home, antigravity, cursor-project, codex-home, opencode, cline, roocode, aider, kimi, gemini-project, gemini-home"
219
+ Write-Host "Valid targets: claude-home, windsurf-project, windsurf-home, antigravity, cursor-project, codex-home, opencode, cline, roocode, aider, kimi, gemini-project, gemini-home, kiro"
209
220
  exit 1
210
221
  }
211
222
  }
package/install.sh CHANGED
@@ -359,9 +359,22 @@ case "$TARGET" in
359
359
  RULES_DEST="$DEST/rules"
360
360
  INSTALL_MODE="user"
361
361
  ;;
362
+ kiro|kiro-project)
363
+ # Kiro (AWS AI IDE). Rules become always-on steering docs; the full catalog
364
+ # (agents, skills, commands, memory) arrives via the MCP server the Node
365
+ # post-install wires into .kiro/settings/mcp.json. Kiro is MCP-native, so we
366
+ # do not dump 266 agent/skill files into steering — that is what MCP is for.
367
+ DEST="$(pwd)/.kiro"
368
+ AGENTS_DEST=""
369
+ SKILLS_DEST=""
370
+ COMMANDS_DEST=""
371
+ HOOKS_DEST=""
372
+ RULES_DEST="$DEST/steering"
373
+ INSTALL_MODE="project"
374
+ ;;
362
375
  *)
363
376
  echo -e "${RED}Unknown target: $TARGET${RESET}"
364
- echo "Valid targets: claude-home (aka claude-code), antigravity, cursor-project, windsurf-project, windsurf-home, codex-home, opencode, cline, roocode, aider, kimi, gemini-project, gemini-home"
377
+ echo "Valid targets: claude-home (aka claude-code), antigravity, cursor-project, windsurf-project, windsurf-home, codex-home, opencode, cline, roocode, aider, kimi, gemini-project, gemini-home, kiro"
365
378
  exit 1
366
379
  ;;
367
380
  esac
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kodelyth-ecc",
3
- "version": "2.24.11",
3
+ "version": "2.29.0",
4
4
  "description": "Production-grade AI coding toolkit — 70 agents (incl. devil-mode adversarial crew), 196 skills, 103 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 on macOS, Linux and Windows 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",
@@ -75,7 +75,10 @@
75
75
  "portability": "node scripts/portability/scan.js agents commands skills hooks rules scripts"
76
76
  },
77
77
  "optionalDependencies": {
78
- "@modelcontextprotocol/sdk": "^1.0.4"
78
+ "@modelcontextprotocol/sdk": "^1.0.4",
79
+ "sql.js": "^1.8.0",
80
+ "@xenova/transformers": "^2.17.2",
81
+ "ajv": "^8.12.0"
79
82
  },
80
83
  "engines": {
81
84
  "node": ">=18.0.0"
@@ -60,9 +60,14 @@ Beyond the 10 priority tiers below, watch for these newer signals — they map t
60
60
  | "talk shorter" / "be brief" / "less verbose" / "caveman mode" | `/terse` (skill activation) |
61
61
  | "who calls X" / "where is X used" / "trace the call chain" / "impact analysis" | `codebase-memory-mcp` via `search_graph` / `trace_path` |
62
62
  | "index this project" / "build the graph" / "scan the codebase" | `codebase-memory-mcp` via `index_repository` |
63
+ | "which tests does this change affect" / "what tests should I run" / "smart test selection" | `codebase-memory-mcp` via `detect_changes` with `scope: "tests"` (Smart CI) |
64
+ | "find the bottleneck" / "hottest paths" / "most complex functions" / "refactor candidates" | `codebase-memory-mcp` via `query_graph` (complexity / hot-path metrics) |
65
+ | "what docs explain X" / "where is X documented" / "link code to docs" | `codebase-memory-mcp` via `trace_path` (inbound `MENTIONS` edges) |
66
+ | "record this decision" / "write an ADR" / "architecture decision record" | `codebase-memory-mcp` via `manage_adr` |
63
67
  | "remove ECC" / "uninstall kodelythecc" / "clean this up" | Suggest `kodelythecc uninstall --dry-run` |
64
68
  | "how much did I save" / "show my token savings" / "RTK stats" | `kodelythecc dashboard` OR `kodelythecc rtk gain` |
65
- | "install for another IDE" / "add to Cursor / Windsurf / Antigravity" | `kodelythecc --target <ide>` |
69
+ | "install for another IDE" / "add to Cursor / Windsurf / Antigravity / Kiro" | `kodelythecc --target <ide>` |
70
+ | "orchestrate this" / "build the whole X end-to-end" / "autonomously build" / "break this big goal into steps and build it" / "run it until it's done" | `super-agent` (the autonomous orchestrator) — decompose → dispatch (parallel) → integrate → verify, resumable + budget-governed. Not for a single edit. |
66
71
 
67
72
  ### 5. Compound intent → parallel agents
68
73
 
@@ -144,7 +144,7 @@ async function pickIdeAndInstall(ROOT) {
144
144
  const targets = [
145
145
  'claude-code', 'cursor-project', 'windsurf-home', 'windsurf-project',
146
146
  'antigravity', 'codex-home', 'opencode', 'cline', 'roocode',
147
- 'gemini-home', 'gemini-project', 'kimi', 'aider',
147
+ 'gemini-home', 'gemini-project', 'kimi', 'aider', 'kiro',
148
148
  ];
149
149
  const chosen = await pick('Pick an IDE to install for', targets);
150
150
  if (chosen == null) return main();