kodelyth-ecc 2.25.0 → 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 +158 -0
- package/CLAUDE.md +2 -2
- package/README.md +2 -2
- package/agents/super-agent.md +102 -0
- package/bin/kodelyth-ecc.js +39 -1
- package/commands/super-agent.md +47 -0
- package/hooks/memory/capture-stop.js +1 -1
- package/install.ps1 +12 -1
- package/install.sh +14 -1
- package/package.json +5 -2
- package/rules/common/agent-intent-routing.md +2 -1
- package/scripts/cli/menu.js +1 -1
- package/scripts/hooks/post-bash-command-log.js +4 -11
- package/scripts/hooks/session-start.js +13 -0
- package/scripts/lib/redact.js +58 -0
- package/scripts/lib/state-store/index.js +36 -1
- package/scripts/lib/state-store/schema.js +18 -1
- package/scripts/mcp/register-self.js +59 -16
- package/scripts/memory/cli.js +35 -0
- package/scripts/memory/embedding-providers/local-transformers.js +44 -0
- package/scripts/memory/embeddings.js +98 -0
- package/scripts/memory/pending.js +125 -0
- package/scripts/memory/project-id.js +93 -0
- package/scripts/memory/store.js +123 -13
- package/scripts/super-agent/cli.js +135 -0
- package/scripts/super-agent/dag.js +123 -0
- package/scripts/super-agent/integrate.js +91 -0
- package/scripts/super-agent/orchestrator.js +175 -0
- package/scripts/super-agent/state.js +136 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,164 @@
|
|
|
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
|
+
|
|
5
163
|
## v2.25.0 — Foundations: honest numbers, a memory that learns, MCP beyond Claude (November 2026)
|
|
6
164
|
|
|
7
165
|
The first cut of the v3.0 "Foundations" track. Almost no new surface area — this
|
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,
|
|
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
|
|
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
|
|
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
|
-
| **
|
|
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
|
|
@@ -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.
|
package/bin/kodelyth-ecc.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
@@ -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 —
|
|
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.
|
|
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"
|
|
@@ -66,7 +66,8 @@ Beyond the 10 priority tiers below, watch for these newer signals — they map t
|
|
|
66
66
|
| "record this decision" / "write an ADR" / "architecture decision record" | `codebase-memory-mcp` via `manage_adr` |
|
|
67
67
|
| "remove ECC" / "uninstall kodelythecc" / "clean this up" | Suggest `kodelythecc uninstall --dry-run` |
|
|
68
68
|
| "how much did I save" / "show my token savings" / "RTK stats" | `kodelythecc dashboard` OR `kodelythecc rtk gain` |
|
|
69
|
-
| "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. |
|
|
70
71
|
|
|
71
72
|
### 5. Compound intent → parallel agents
|
|
72
73
|
|
package/scripts/cli/menu.js
CHANGED
|
@@ -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();
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
const os = require('os');
|
|
6
6
|
const path = require('path');
|
|
7
|
+
const { redact } = require('../lib/redact');
|
|
7
8
|
|
|
8
9
|
const MAX_STDIN = 1024 * 1024;
|
|
9
10
|
let raw = '';
|
|
@@ -20,17 +21,9 @@ const MODE_CONFIG = {
|
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
function sanitizeCommand(command) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.replace(/Authorization:[: ]*[^ ]*[: ]*[^ ]*/gi, 'Authorization:<REDACTED>')
|
|
27
|
-
.replace(/\bAKIA[A-Z0-9]{16}\b/g, '<REDACTED>')
|
|
28
|
-
.replace(/\bASIA[A-Z0-9]{16}\b/g, '<REDACTED>')
|
|
29
|
-
.replace(/password[= ][^ ]*/gi, 'password=<REDACTED>')
|
|
30
|
-
.replace(/\bghp_[A-Za-z0-9_]+\b/g, '<REDACTED>')
|
|
31
|
-
.replace(/\bgho_[A-Za-z0-9_]+\b/g, '<REDACTED>')
|
|
32
|
-
.replace(/\bghs_[A-Za-z0-9_]+\b/g, '<REDACTED>')
|
|
33
|
-
.replace(/\bgithub_pat_[A-Za-z0-9_]+\b/g, '<REDACTED>');
|
|
24
|
+
// Flatten to one log line, then run the shared credential redactor (which now
|
|
25
|
+
// covers more token formats than this hook's old inline list did).
|
|
26
|
+
return redact(String(command || '').replace(/\n/g, ' '));
|
|
34
27
|
}
|
|
35
28
|
|
|
36
29
|
function appendLine(filePath, line) {
|
|
@@ -392,6 +392,19 @@ async function main() {
|
|
|
392
392
|
additionalContextParts.push(structuredInstinctSummary);
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
+
// Surface the auto-capture review queue so candidates the last session proposed
|
|
396
|
+
// are discoverable now, not just at the end of that session. Consent-first:
|
|
397
|
+
// this only points at the review command; nothing is stored without the user
|
|
398
|
+
// running promote-pending.
|
|
399
|
+
try {
|
|
400
|
+
const n = require('../memory/pending').countPending();
|
|
401
|
+
if (n > 0) {
|
|
402
|
+
additionalContextParts.push(
|
|
403
|
+
`${n} memory candidate(s) await review — list with "kodelythecc memory list-pending", confirm with "promote-pending <id|all>".`
|
|
404
|
+
);
|
|
405
|
+
}
|
|
406
|
+
} catch { /* never block session start */ }
|
|
407
|
+
|
|
395
408
|
// Check for recent session files (last 7 days)
|
|
396
409
|
const recentSessions = dedupeRecentSessions(sessionSearchDirs);
|
|
397
410
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// scripts/lib/redact.js
|
|
2
|
+
//
|
|
3
|
+
// One place to scrub credentials out of text before it is stored or logged.
|
|
4
|
+
// Used by the memory capture path (so a leaked key is never written into
|
|
5
|
+
// memories.jsonl, where it would then be surfaced by recall and injected into a
|
|
6
|
+
// future session) and by the bash-command logger.
|
|
7
|
+
//
|
|
8
|
+
// Two rule families:
|
|
9
|
+
// - High-confidence provider token FORMATS, matched anywhere (prose or a
|
|
10
|
+
// command line) — AWS, GitHub, OpenAI/Anthropic, Stripe, Slack, Google, npm,
|
|
11
|
+
// JWTs, PEM private-key blocks.
|
|
12
|
+
// - Assignment / header forms — `--token=`, `Authorization:`, `password=`,
|
|
13
|
+
// `api_key=`, etc.
|
|
14
|
+
//
|
|
15
|
+
// Every pattern is linear (no nested quantifiers, no adjacent `\s*\s*`) so none
|
|
16
|
+
// can backtrack catastrophically on hostile input — the ReDoS lesson from the
|
|
17
|
+
// prompt-injection guard applies here too.
|
|
18
|
+
'use strict';
|
|
19
|
+
|
|
20
|
+
const RULES = [
|
|
21
|
+
// ── Provider token formats (match anywhere) ──
|
|
22
|
+
[/-----BEGIN (?:RSA |EC |OPENSSH |DSA |PGP )?PRIVATE KEY-----[\s\S]*?-----END (?:RSA |EC |OPENSSH |DSA |PGP )?PRIVATE KEY-----/g, '<REDACTED:private-key>'],
|
|
23
|
+
[/\bAKIA[0-9A-Z]{16}\b/g, '<REDACTED:aws-key>'],
|
|
24
|
+
[/\bASIA[0-9A-Z]{16}\b/g, '<REDACTED:aws-temp-key>'],
|
|
25
|
+
[/\bghp_[A-Za-z0-9]{20,}\b/g, '<REDACTED:github-token>'],
|
|
26
|
+
[/\bgho_[A-Za-z0-9]{20,}\b/g, '<REDACTED:github-token>'],
|
|
27
|
+
[/\bghs_[A-Za-z0-9]{20,}\b/g, '<REDACTED:github-token>'],
|
|
28
|
+
[/\bghr_[A-Za-z0-9]{20,}\b/g, '<REDACTED:github-token>'],
|
|
29
|
+
[/\bgithub_pat_[A-Za-z0-9_]{22,}\b/g, '<REDACTED:github-pat>'],
|
|
30
|
+
[/\bsk-ant-[A-Za-z0-9_-]{20,}/g, '<REDACTED:anthropic-key>'],
|
|
31
|
+
[/\bsk-[A-Za-z0-9_-]{20,}/g, '<REDACTED:openai-key>'],
|
|
32
|
+
[/\b(?:sk|rk|pk)_(?:live|test)_[A-Za-z0-9]{16,}\b/g, '<REDACTED:stripe-key>'],
|
|
33
|
+
[/\bxox[baprs]-[A-Za-z0-9-]{10,}\b/g, '<REDACTED:slack-token>'],
|
|
34
|
+
[/\bAIza[0-9A-Za-z_-]{35}\b/g, '<REDACTED:google-key>'],
|
|
35
|
+
[/\bnpm_[A-Za-z0-9]{36}\b/g, '<REDACTED:npm-token>'],
|
|
36
|
+
[/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g, '<REDACTED:jwt>'],
|
|
37
|
+
// ── Assignment / header forms ──
|
|
38
|
+
[/(--token[= ])\S+/g, '$1<REDACTED>'],
|
|
39
|
+
[/(Authorization:\s*)(?:Bearer\s+)?\S+/gi, '$1<REDACTED>'],
|
|
40
|
+
[/(\bpassword\s*[=:]\s*)\S+/gi, '$1<REDACTED>'],
|
|
41
|
+
[/(\b(?:api[_-]?key|secret|access[_-]?token|auth[_-]?token)\s*[=:]\s*)["']?[A-Za-z0-9\-_.]{8,}["']?/gi, '$1<REDACTED>'],
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
// Replace any credentials in `text` with labelled placeholders. Non-strings pass
|
|
45
|
+
// through unchanged (null/undefined stay as they are).
|
|
46
|
+
function redact(text) {
|
|
47
|
+
if (typeof text !== 'string') return text;
|
|
48
|
+
let out = text;
|
|
49
|
+
for (const [re, repl] of RULES) out = out.replace(re, repl);
|
|
50
|
+
return out;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// True when redaction would change the text — i.e. a credential is present.
|
|
54
|
+
function hasSecret(text) {
|
|
55
|
+
return typeof text === 'string' && redact(text) !== text;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
module.exports = { redact, hasSecret, RULES };
|