kodelyth-ecc 1.5.10 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +19 -0
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +447 -0
- package/CLAUDE.md +48 -16
- package/README.md +265 -81
- package/VERSION +1 -1
- package/actions/ecc-review/README.md +243 -0
- package/actions/ecc-review/action.yml +158 -0
- package/actions/ecc-review/post-comment.js +171 -0
- package/actions/ecc-review/run-review.js +285 -0
- package/agents/backdoor-hunter.md +260 -0
- package/agents/chaos-engineer.md +251 -0
- package/agents/code-stealer-detector.md +228 -0
- package/agents/jailbreak-tester.md +222 -0
- package/agents/license-violation-finder.md +212 -0
- package/agents/prompt-injection-hunter.md +126 -0
- package/agents/secret-hunter.md +209 -0
- package/agents/supply-chain-auditor.md +195 -0
- package/bin/kodelyth-ecc.js +875 -1
- package/bundles/enterprise.md +172 -0
- package/bundles/indie-hacker.md +106 -0
- package/bundles/red-team.md +138 -0
- package/cat +0 -0
- package/commands/dashboard.md +67 -0
- package/commands/devil-mode.md +121 -0
- package/commands/memory-evolve.md +71 -0
- package/commands/replay.md +61 -0
- package/commands/route-model.md +48 -0
- package/commands/swarm.md +68 -0
- package/commands/verify-supply-chain.md +59 -0
- package/docs/dashboard.md +211 -0
- package/docs/evolve.md +303 -0
- package/docs/mcp-clients.md +167 -0
- package/docs/mcp.md +178 -0
- package/docs/replay.md +244 -0
- package/docs/supply-chain.md +207 -0
- package/docs/swarm.md +243 -0
- package/hooks/hooks.json +52 -0
- package/hooks/memory/auto-recall.js +29 -1
- package/hooks/safety/README.md +124 -0
- package/hooks/safety/lib/patterns.js +179 -0
- package/hooks/safety/prompt-injection-guard.js +179 -0
- package/hooks/safety/token-budget.js +229 -0
- package/install.ps1 +199 -2
- package/install.sh +285 -3
- package/package.json +30 -4
- package/rules/common/agent-intent-routing.md +182 -0
- package/rules/common/cost-aware-model-routing.md +152 -0
- package/scripts/dashboard/data.js +353 -0
- package/scripts/dashboard/server.js +324 -0
- package/scripts/dashboard/static/index.html +645 -0
- package/scripts/evolve/analyze.js +303 -0
- package/scripts/evolve/proposals.js +162 -0
- package/scripts/evolve/stats.js +219 -0
- package/scripts/mcp/catalog.js +244 -0
- package/scripts/mcp/client.js +181 -0
- package/scripts/mcp/prompts.js +133 -0
- package/scripts/mcp/resources.js +94 -0
- package/scripts/mcp/server.js +153 -0
- package/scripts/mcp/tools.js +465 -0
- package/scripts/replay/bundle.js +191 -0
- package/scripts/replay/replay.js +107 -0
- package/scripts/router/classify.js +232 -0
- package/scripts/supply-chain/manifest.js +154 -0
- package/scripts/supply-chain/sbom.js +202 -0
- package/scripts/supply-chain/verify.js +102 -0
- package/scripts/swarm/build-plan.js +193 -0
- package/skills/cost-aware-model-routing/SKILL.md +153 -0
- package/skills/kodelyth-quickstart/SKILL.md +7 -0
- package/skills/observability-dashboard/SKILL.md +119 -0
- package/skills/self-evolving-memory/SKILL.md +175 -0
- package/skills/session-replay/SKILL.md +199 -0
- package/skills/supply-chain-verification/SKILL.md +201 -0
- package/skills/swarm-orchestrator/SKILL.md +177 -0
- package/social/card-install.svg +1 -1
- package/social/facebook-group/POST.md +121 -0
- package/social/facebook-group/fb-1-3am-debug.png +0 -0
- package/social/facebook-group/fb-1-3am-debug.svg +97 -0
- package/social/facebook-group/fb-2-cpu-upgrade.png +0 -0
- package/social/facebook-group/fb-2-cpu-upgrade.svg +132 -0
- package/social/facebook-group/fb-3-before-after.png +0 -0
- package/social/facebook-group/fb-3-before-after.svg +94 -0
- package/social/facebook-v150.svg +5 -5
- package/social/github-social-preview.svg +119 -100
- package/social/readme-hero.svg +11 -11
- package/social/section-agents.svg +57 -0
- package/social/section-author.svg +54 -0
- package/social/section-dashboard.svg +59 -0
- package/social/section-devil.svg +54 -0
- package/social/section-hooks.svg +51 -0
- package/social/section-install.svg +42 -0
- package/social/section-learning.svg +52 -0
- package/social/section-mcp.svg +46 -0
- package/social/section-memory.svg +57 -0
- package/social/section-parallel.svg +72 -0
- package/social/section-routing.svg +51 -0
- package/social/x-card-agents-grid.svg +6 -6
- package/tests/dashboard/data.test.js +235 -0
- package/tests/dashboard/server.test.js +240 -0
- package/tests/evolve/analyze.test.js +169 -0
- package/tests/evolve/proposals.test.js +173 -0
- package/tests/evolve/stats.test.js +159 -0
- package/tests/mcp/catalog.test.js +98 -0
- package/tests/mcp/client.test.js +109 -0
- package/tests/mcp/resources-prompts.test.js +70 -0
- package/tests/mcp/tools.test.js +159 -0
- package/tests/replay/bundle.test.js +181 -0
- package/tests/replay/replay.test.js +131 -0
- package/tests/router/classify.test.js +164 -0
- package/tests/safety/patterns.test.js +94 -0
- package/tests/safety/prompt-injection-guard.test.js +111 -0
- package/tests/safety/token-budget.test.js +119 -0
- package/tests/supply-chain/manifest.test.js +147 -0
- package/tests/supply-chain/sbom.test.js +170 -0
- package/tests/supply-chain/verify.test.js +146 -0
- package/tests/swarm/build-plan.test.js +188 -0
- package/wiki/Agent-Reference.md +58 -7
- package/wiki/FAQ.md +204 -7
- package/wiki/Home.md +104 -28
- package/wiki/Hook-Reference.md +1 -1
- package/wiki/Installation-Guide.md +109 -6
- package/wiki/Platform-Support.md +239 -25
- package/wiki/Skill-Reference.md +101 -6
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# BUNDLE — Enterprise
|
|
2
|
+
|
|
3
|
+
You are running in **Enterprise** mode. This installation was configured for teams operating under compliance, audit, and supply-chain accountability requirements (SOC 2, ISO 27001, HIPAA-adjacent, regulated industries).
|
|
4
|
+
|
|
5
|
+
The full ECC toolkit is installed — this file biases the AI toward workflows that produce auditable, attributable, reproducible work. Read this on every session start.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Mindset
|
|
10
|
+
|
|
11
|
+
- **Auditability is a feature.** Every change traces to a ticket, a reviewer, a justification.
|
|
12
|
+
- **Reproducible builds.** No "works on my machine." Lockfiles, signed tags, pinned versions.
|
|
13
|
+
- **License hygiene is non-optional.** Procurement reads your SBOM. Lawyers read your LICENSE bundle.
|
|
14
|
+
- **Supply chain is a threat surface.** Direct deps + transitive deps + build environment.
|
|
15
|
+
- **Documentation is a deliverable.** Code without runbooks is debt.
|
|
16
|
+
- **Security gates are blocking, not advisory.** CRITICAL findings stop releases.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Featured Agents
|
|
21
|
+
|
|
22
|
+
| Agent | Role |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `architect` | System design with explicit constraints, trade-off documentation, ADRs |
|
|
25
|
+
| `code-architect` | Implementation matching architecture; produces audit-friendly diffs |
|
|
26
|
+
| `code-reviewer` | Quality bar enforced uniformly; documented review decisions |
|
|
27
|
+
| `security-reviewer` | OWASP Top 10 + project-specific threat model |
|
|
28
|
+
| `api-guardian` | Contract management, breaking-change discipline, OpenAPI authority |
|
|
29
|
+
| `performance-optimizer` | Measured optimization with before/after benchmarks |
|
|
30
|
+
| `release-captain` | Tag, sign, ship, document — with full release notes |
|
|
31
|
+
| `doc-updater` | Every code change reflected in docs |
|
|
32
|
+
| `migration-guide` | Phased migrations with rollback plans, version compat matrices |
|
|
33
|
+
| `incident-commander` | Production response with formal postmortem discipline |
|
|
34
|
+
|
|
35
|
+
### Required adversarial crew (compliance-relevant)
|
|
36
|
+
|
|
37
|
+
| Agent | Compliance role |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `license-violation-finder` | SBOM hygiene, copyleft tracking, attribution bundles |
|
|
40
|
+
| `supply-chain-auditor` | SLSA-style attestation, lockfile integrity, dep provenance |
|
|
41
|
+
| `secret-hunter` | Quarterly mandated key audits, rotation evidence |
|
|
42
|
+
| `code-stealer-detector` | M&A due diligence, IP audit before any disclosure |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Featured Commands
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
/team-review # Multi-angle code review for PR sign-off
|
|
50
|
+
/pre-release # Release readiness gate (3-agent parallel)
|
|
51
|
+
/security-audit # Standard 3-agent security sweep
|
|
52
|
+
/devil-mode --pre-launch # Adversarial sweep before any major release
|
|
53
|
+
/devil-mode --pre-public # Before any open-source publication or public API change
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Suggested Workflow
|
|
59
|
+
|
|
60
|
+
### Per-PR (every change)
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
1. PR opened — author runs /team-review on local branch
|
|
64
|
+
2. CI runs:
|
|
65
|
+
- lint + tests + coverage gate
|
|
66
|
+
- /devil-mode auto-runs on diff
|
|
67
|
+
- SBOM generated, license check
|
|
68
|
+
3. Review by humans references CI output
|
|
69
|
+
4. Merge requires green CI + 1+ approvals
|
|
70
|
+
5. doc-updater confirms docs match code
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Per-release (cut version)
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
1. /pre-release agent crew runs:
|
|
77
|
+
- release-captain: changelog + tag plan
|
|
78
|
+
- security-reviewer: full sweep
|
|
79
|
+
- code-reviewer: regression risk
|
|
80
|
+
2. /devil-mode --pre-launch:
|
|
81
|
+
- prompt-injection-hunter (if AI features touched)
|
|
82
|
+
- supply-chain-auditor (lockfile + provenance)
|
|
83
|
+
- secret-hunter (env var leaks)
|
|
84
|
+
- backdoor-hunter (third-party code review)
|
|
85
|
+
3. SBOM generated, signed with cosign
|
|
86
|
+
4. SLSA Level 3 attestation generated
|
|
87
|
+
5. Release notes published, tag signed, artifacts pushed
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Quarterly (compliance cadence)
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
1. license-violation-finder: full dep audit, attribution bundle refreshed
|
|
94
|
+
2. secret-hunter: mandatory rotation audit (proves all keys < 90 days old)
|
|
95
|
+
3. code-stealer-detector: provenance audit, M&A-ready
|
|
96
|
+
4. /devil-mode --all: comprehensive adversarial sweep
|
|
97
|
+
5. supply-chain-auditor: SBOM diff vs last quarter
|
|
98
|
+
6. Document all findings; close or accept-with-justification
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Pre-incident (every quarter)
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
1. chaos-engineer designs game-day scenarios
|
|
105
|
+
2. Run in staging with full team observing
|
|
106
|
+
3. Document findings as runbook entries
|
|
107
|
+
4. Update incident response runbooks
|
|
108
|
+
5. incident-commander reviews postmortem template
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Required Defaults
|
|
114
|
+
|
|
115
|
+
- **Lockfiles strict** — `npm ci`, `pnpm install --frozen-lockfile`, `yarn install --frozen-lockfile` only in CI/prod
|
|
116
|
+
- **Signed tags only** — sigstore/cosign signing on every release tag
|
|
117
|
+
- **SBOM generation** — CycloneDX format on every release
|
|
118
|
+
- **License bundle** — `THIRD-PARTY.md` regenerated on every dep change
|
|
119
|
+
- **Audit log** — every agent invocation logged with input/output for compliance review
|
|
120
|
+
- **No telemetry** — verified by `secret-hunter` periodic scan of code
|
|
121
|
+
- **Branch protection** — main requires PR + reviews + green CI + signed commits
|
|
122
|
+
- **Secret store integration** — Vault / AWS Secrets Manager / Doppler / Infisical, never `.env` in production
|
|
123
|
+
- **CVE policy** — CRITICAL CVEs block release, HIGH require triage doc
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Compliance Mode Hooks
|
|
128
|
+
|
|
129
|
+
Recommended hooks to enable for SOC 2 / ISO 27001 readiness:
|
|
130
|
+
|
|
131
|
+
- `pre-commit` — `gitleaks`, `detect-secrets`, `lint`, `test --bail`
|
|
132
|
+
- `pre-push` — `npm audit --audit-level=high` blocking
|
|
133
|
+
- `post-merge` — SBOM regenerate, license diff
|
|
134
|
+
- `pre-tag` — full `/devil-mode` + `/pre-release` parallel run
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## What This Bundle Surfaces First
|
|
139
|
+
|
|
140
|
+
You still have all 70 agents — but routing is biased toward:
|
|
141
|
+
|
|
142
|
+
1. **Auditability** — every recommendation comes with rationale
|
|
143
|
+
2. **Documentation** — every change has a doc impact note
|
|
144
|
+
3. **Reproducibility** — no "magic" commands, everything pinned
|
|
145
|
+
4. **Risk-tiered triage** — CRITICAL / HIGH / MEDIUM / LOW classifications match common compliance frameworks
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Anti-Patterns This Bundle Catches
|
|
150
|
+
|
|
151
|
+
- "Trust me bro" PRs without justification → `code-reviewer` requires reasoning
|
|
152
|
+
- Undocumented architectural decisions → `architect` writes ADRs
|
|
153
|
+
- Unsigned releases → `release-captain` blocks
|
|
154
|
+
- Floating dep versions → `dependency-doctor` flags
|
|
155
|
+
- License cocktails without attribution bundles → `license-violation-finder` blocks
|
|
156
|
+
- Production patches without postmortem → `incident-commander` enforces
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## When You Need Even Stricter
|
|
161
|
+
|
|
162
|
+
If your compliance posture is HIPAA / PCI / FedRAMP, layer the relevant skill bundles:
|
|
163
|
+
|
|
164
|
+
- `healthcare-phi-compliance` (HIPAA)
|
|
165
|
+
- `healthcare-eval-harness` (clinical safety gating)
|
|
166
|
+
- `defi-amm-security` (financial protocol hardening)
|
|
167
|
+
|
|
168
|
+
These provide additional audit playbooks on top of the enterprise baseline.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
**Powered by Kodelyth ECC v1.6.0+ · Enterprise bundle**
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# BUNDLE — Indie Hacker
|
|
2
|
+
|
|
3
|
+
You are running in **Indie Hacker** mode. This installation was configured for solo founders and small teams shipping fast, validating quickly, and hardening before the audience grows.
|
|
4
|
+
|
|
5
|
+
The full ECC toolkit is installed — this file biases the AI toward workflows that match how indie builders work. Read this on every session start.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Mindset
|
|
10
|
+
|
|
11
|
+
- **Ship beats polish** until product-market fit. Don't gold-plate.
|
|
12
|
+
- **One bug at a time.** Don't refactor while debugging.
|
|
13
|
+
- **Cost is real.** Prefer Sonnet/Haiku over Opus unless the task warrants it.
|
|
14
|
+
- **Distribution is the moat.** SEO, accessibility, and onboarding matter as much as code.
|
|
15
|
+
- **Security debt is real but staged.** Critical issues now (secrets, auth) — full audit before public launch.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Featured Agents (start with these)
|
|
20
|
+
|
|
21
|
+
| Agent | When to reach for it |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `kodelyth-advisor` | When unsure where to start, what to prioritize, or which approach to take |
|
|
24
|
+
| `pair-programmer` | About to write a feature — get the approach right before coding |
|
|
25
|
+
| `debug-detective` | Bug, error, unexpected behavior — root cause not symptom |
|
|
26
|
+
| `tdd-guide` | Adding a feature you'll later regret — write the test first |
|
|
27
|
+
| `ux-reviewer` | Form feels clunky, mobile broken, accessibility gaps |
|
|
28
|
+
| `seo-specialist` | Page not ranking, meta tags, structured data |
|
|
29
|
+
| `dependency-doctor` | `npm install` failing, CVE alert, dep upgrade |
|
|
30
|
+
| `build-error-resolver` | Vercel / Railway / build failing |
|
|
31
|
+
| `security-reviewer` | Auth, payments, user input — single-file security focus |
|
|
32
|
+
| `release-captain` | Cut a version, tag, ship |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Featured Commands (paste-and-go)
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
/project-launch # New project — 5 agents plan in parallel
|
|
40
|
+
/devil-mode --pre-public # Before going open-source — full red-team sweep
|
|
41
|
+
/tdd # TDD workflow on a single feature
|
|
42
|
+
/debug-blitz # Bug stuck >30min — 3-agent parallel attack
|
|
43
|
+
/team-review # Pre-deploy review — code + security + perf + API
|
|
44
|
+
/memory # See / search / capture solutions across projects
|
|
45
|
+
/lessons # Save preferences ("we use pnpm not npm")
|
|
46
|
+
/onboard # New repo or new collaborator — 3-agent overview
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Suggested Workflow (typical indie sprint)
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Day 1 — Idea
|
|
55
|
+
→ Use /project-launch to get a parallel plan from architect + pair-programmer + ux-reviewer + tdd-guide + security-reviewer
|
|
56
|
+
|
|
57
|
+
Day 2-N — Build
|
|
58
|
+
→ Each new feature: pair-programmer → tdd-guide → impl → code-reviewer
|
|
59
|
+
→ Memory captures patterns automatically; corrections stack into tasks/lessons.md
|
|
60
|
+
|
|
61
|
+
Pre-launch — Harden
|
|
62
|
+
→ /devil-mode --pre-public (secret scan + supply chain + AI safety + backdoors)
|
|
63
|
+
→ /team-review (code quality + perf + API surface)
|
|
64
|
+
→ /pre-release (release-captain confirms tag-readiness)
|
|
65
|
+
|
|
66
|
+
Post-launch — Iterate
|
|
67
|
+
→ /debug-blitz on stubborn bugs
|
|
68
|
+
→ /memory recall <topic> to surface past solutions
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Cost-Aware Defaults
|
|
74
|
+
|
|
75
|
+
This bundle prefers cheap models for routine work:
|
|
76
|
+
|
|
77
|
+
- Trivial tasks (rename, format, JSDoc) → Haiku / Gemini Flash
|
|
78
|
+
- Standard tasks (review, simple bug fix) → Sonnet (default)
|
|
79
|
+
- Hard tasks (architecture, complex debug, security) → Opus / GPT-5
|
|
80
|
+
|
|
81
|
+
If you have `/model-route` available, lean on it.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## What This Bundle Skips by Default
|
|
86
|
+
|
|
87
|
+
You still have access to all 70 agents — these just aren't surfaced first:
|
|
88
|
+
|
|
89
|
+
- Heavy enterprise agents (`compliance-checker` patterns, `architect-of-architects`)
|
|
90
|
+
- Most language-specific reviewers if you're TypeScript/Python only — they're there if you need them
|
|
91
|
+
- Multi-agent enterprise workflows (`/team-review` is plenty)
|
|
92
|
+
|
|
93
|
+
Run `/devil-mode --all` or `use <agent-name>` any time to access the full crew.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Anti-Patterns This Bundle Catches
|
|
98
|
+
|
|
99
|
+
- Fixing symptoms instead of root cause → routes to `debug-detective`
|
|
100
|
+
- "Just one more feature" before fixing tech debt → `kodelyth-advisor` gets a word in
|
|
101
|
+
- Going public without secret/license sweep → `/devil-mode --pre-public` reminder
|
|
102
|
+
- Slow iteration loop because of bad TDD → `tdd-guide` enforces test-first rhythm
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
**Powered by Kodelyth ECC v1.6.0+ · Indie Hacker bundle**
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# BUNDLE — Red Team
|
|
2
|
+
|
|
3
|
+
You are running in **Red Team** mode. This installation was configured for security-focused engineers, pentesters, and teams shipping AI features who need adversarial review on every commit.
|
|
4
|
+
|
|
5
|
+
The full ECC toolkit is installed — this file biases the AI toward attacker-mindset workflows. Read this on every session start.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Mindset
|
|
10
|
+
|
|
11
|
+
- **Read every line as malicious until proven benign.** Especially third-party code.
|
|
12
|
+
- **Every input is hostile.** Every byte the LLM sees was written by an attacker until verified.
|
|
13
|
+
- **Hidden assumptions are bugs.** What can break your system, will, eventually.
|
|
14
|
+
- **Defense in depth.** No single control is enough.
|
|
15
|
+
- **Disclosure is the deliverable.** Findings without proof and fix paths are not findings.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Featured Agents (the devil-mode crew)
|
|
20
|
+
|
|
21
|
+
The 8-agent adversarial crew is the heart of this bundle. Lead with these:
|
|
22
|
+
|
|
23
|
+
| Agent | Hunts |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `prompt-injection-hunter` | Jailbreaks, indirect injection, system-prompt leaks, tool hijacking |
|
|
26
|
+
| `supply-chain-auditor` | Typosquats, malicious postinstall, lockfile drift, slopsquats |
|
|
27
|
+
| `secret-hunter` | Leaked creds in code + git history + encoded blobs + bundled to client |
|
|
28
|
+
| `license-violation-finder` | GPL contamination, missing attributions, license cocktails |
|
|
29
|
+
| `jailbreak-tester` | 10-tier live AI feature red-team (refusal bypass to PII exfil) |
|
|
30
|
+
| `code-stealer-detector` | Code provenance, copy-paste origins, AI-gen code with copyleft hits |
|
|
31
|
+
| `backdoor-hunter` | Obfuscated payloads, beacons, time bombs, reverse shells, cryptominers |
|
|
32
|
+
| `chaos-engineer` | Hypothesis-first fault injection (kill processes, network partition, fuzz inputs) |
|
|
33
|
+
|
|
34
|
+
Plus the standard security crew:
|
|
35
|
+
|
|
36
|
+
| Agent | Role |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `security-reviewer` | OWASP Top 10, single-file security focus |
|
|
39
|
+
| `api-guardian` | API contract security, exposed endpoints, broken auth |
|
|
40
|
+
| `dependency-doctor` | CVE scan, dep updates, vulnerability triage |
|
|
41
|
+
| `incident-commander` | When the threat is actually live in production |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Featured Commands
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
/devil-mode # 4-agent default sweep (the daily driver)
|
|
49
|
+
/devil-mode --all # All 8 adversarial agents
|
|
50
|
+
/devil-mode --pre-public # Pre-open-source — adds license + theft check
|
|
51
|
+
/devil-mode --pre-launch # Pre-launch — adds AI red-team + chaos planning
|
|
52
|
+
/security-audit # Standard 3-agent security sweep
|
|
53
|
+
/pre-release # Tag-readiness with security gate
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Suggested Workflow
|
|
59
|
+
|
|
60
|
+
### Daily security review (per-PR)
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
1. /devil-mode (4-agent parallel sweep on diff)
|
|
64
|
+
2. Manual review of CRITICAL findings
|
|
65
|
+
3. Fix or quarantine
|
|
66
|
+
4. /security-audit on touched files (deeper dive on auth/API surface)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Pre-public sweep (before any repo goes open)
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
1. /devil-mode --pre-public (secret + license + IP + supply chain)
|
|
73
|
+
2. Address every CRITICAL — rotate, replace, attribute
|
|
74
|
+
3. Manual review of all HIGH findings
|
|
75
|
+
4. Document residual risk in SECURITY.md
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Pre-launch sweep (before any AI feature goes public)
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
1. jailbreak-tester running 10-tier battery
|
|
82
|
+
2. prompt-injection-hunter reviewing the prompt + RAG pipeline
|
|
83
|
+
3. /devil-mode --pre-launch (full sweep)
|
|
84
|
+
4. chaos-engineer designs failure-mode game day
|
|
85
|
+
5. Run game day in staging
|
|
86
|
+
6. Ship only when green
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Post-compromise sweep (after security alert)
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
1. /devil-mode --all (entire crew on the codebase)
|
|
93
|
+
2. backdoor-hunter focused on the touched files / time window
|
|
94
|
+
3. secret-hunter checking key validity (rotate any active leaks)
|
|
95
|
+
4. supply-chain-auditor on the implicated dep
|
|
96
|
+
5. Document IOCs and report to vendor / users
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Strict Defaults
|
|
102
|
+
|
|
103
|
+
This bundle assumes adversarial environments. Defaults to:
|
|
104
|
+
|
|
105
|
+
- Token budget enforced via hooks (no runaway model spend)
|
|
106
|
+
- Output sanitization layer on any LLM-rendered content
|
|
107
|
+
- Outbound network calls flagged in code review
|
|
108
|
+
- `npm ci` instead of `npm install` (lockfile-strict)
|
|
109
|
+
- Pre-commit hooks: `gitleaks` + `detect-secrets` + lint
|
|
110
|
+
- Sigstore / cosign signed tags expected on releases
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Required Reading
|
|
115
|
+
|
|
116
|
+
The first 4 agents in this bundle ship with full attacker playbooks. Read them before running:
|
|
117
|
+
|
|
118
|
+
- `agents/prompt-injection-hunter.md`
|
|
119
|
+
- `agents/supply-chain-auditor.md`
|
|
120
|
+
- `agents/secret-hunter.md`
|
|
121
|
+
- `agents/backdoor-hunter.md`
|
|
122
|
+
|
|
123
|
+
Each ~300 lines of real audit logic, not theatrical persona.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Anti-Patterns This Bundle Catches
|
|
128
|
+
|
|
129
|
+
- Trusting `package.json` `license` field over actual `LICENSE` file
|
|
130
|
+
- Treating "no error" as "no problem" in AI features
|
|
131
|
+
- Running chaos in production without abort criteria
|
|
132
|
+
- Considering CVE-free deps as safe (typosquats and slopsquats are CVE-less)
|
|
133
|
+
- Treating system prompt as confidential when it's user-extractable
|
|
134
|
+
- Calling `npm install` directly in production deploy
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
**Powered by Kodelyth ECC v1.6.0+ · Red Team bundle**
|
package/cat
ADDED
|
File without changes
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Boot the localhost-only Kodelyth ECC observability dashboard. Visualizes memory, evolve signals, catalog, swarm sessions, and token-budget snapshots. Read-only. Zero telemetry.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /dashboard
|
|
6
|
+
|
|
7
|
+
A localhost web UI over every local data source ECC produces. No external dependencies, no telemetry, no network access. Auto-opens your browser.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/dashboard # default: 127.0.0.1:5747, opens browser
|
|
13
|
+
/dashboard --port 8088 # custom port
|
|
14
|
+
/dashboard --no-open # don't auto-open browser
|
|
15
|
+
/dashboard --host localhost # explicit localhost binding
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## What you'll see
|
|
19
|
+
|
|
20
|
+
| Tab | Content |
|
|
21
|
+
|---|---|
|
|
22
|
+
| **Overview** | Counts of every shipped asset, captured memories, surfaces, routing misses, pending proposals, swarm sessions, plus token-budget snapshot. |
|
|
23
|
+
| **Memory** | Live BM25 search box + recent captures with tags. |
|
|
24
|
+
| **Evolve** | Top reused memories, top miss clusters, proposals with status pills. |
|
|
25
|
+
| **Catalog** | Searchable browser over every agent / skill / command / rule / bundle. |
|
|
26
|
+
| **Sessions** | Swarm/orchestration sessions with per-worker drill-down. |
|
|
27
|
+
|
|
28
|
+
## Hard rules
|
|
29
|
+
|
|
30
|
+
1. **GET-only.** No mutation endpoints. The dashboard cannot accept proposals, capture memories, or change any state. Mutations stay in the CLI.
|
|
31
|
+
2. **Localhost-only by default.** Refuses to bind `0.0.0.0` or remote IPs without `KODELYTH_DASHBOARD_ALLOW_REMOTE=1` (intentionally noisy escape hatch).
|
|
32
|
+
3. **No external assets.** No CDNs, no Google Fonts. Works fully offline.
|
|
33
|
+
4. **No cache.** Always-fresh data on refresh.
|
|
34
|
+
5. **No telemetry.** All data stays on this machine.
|
|
35
|
+
|
|
36
|
+
## API endpoints (curl-friendly)
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
GET /api/health
|
|
40
|
+
GET /api/overview
|
|
41
|
+
GET /api/memory[?limit=N]
|
|
42
|
+
GET /api/memory/search?q=…
|
|
43
|
+
GET /api/evolve
|
|
44
|
+
GET /api/catalog?kind=skills&q=…
|
|
45
|
+
GET /api/sessions
|
|
46
|
+
GET /api/sessions/:name
|
|
47
|
+
GET /api/token-budget
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The frontend is a thin consumer of these. Anything the UI shows you can also pipe through `jq`.
|
|
51
|
+
|
|
52
|
+
## Companion commands
|
|
53
|
+
|
|
54
|
+
- **`/memory remember`** — capture a memory; appears in the Memory tab on next refresh.
|
|
55
|
+
- **`kodelyth-ecc evolve analyze`** — generates proposals; they appear in the Evolve tab as pending.
|
|
56
|
+
- **`kodelyth-ecc evolve accept <id>`** — write a draft to disk; status pill flips.
|
|
57
|
+
- **`kodelyth-ecc swarm --task "…"`** — spawns sessions visible in the Sessions tab.
|
|
58
|
+
|
|
59
|
+
## Implementation
|
|
60
|
+
|
|
61
|
+
Backed by:
|
|
62
|
+
|
|
63
|
+
- `scripts/dashboard/server.js` — HTTP server using only Node built-ins (`http`, `fs`, `path`, `child_process`)
|
|
64
|
+
- `scripts/dashboard/data.js` — pure aggregators across memory/evolve/catalog/sessions/token-budget
|
|
65
|
+
- `scripts/dashboard/static/index.html` — single-page UI with hand-rolled CSS, vanilla JS, no build
|
|
66
|
+
|
|
67
|
+
Skill: `observability-dashboard`. Full reference: `docs/dashboard.md`.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Parallel adversarial sweep — fires prompt-injection-hunter + supply-chain-auditor + secret-hunter + backdoor-hunter simultaneously. The full attacker-mindset audit in one command.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /devil-mode — Adversarial Parallel Sweep
|
|
6
|
+
|
|
7
|
+
Four red-team specialists attack your codebase from every angle attackers actually use. What would take a security firm a week of billable hours, your repo gets in 20 minutes.
|
|
8
|
+
|
|
9
|
+
> **Read the brief first.** Each agent thinks like a hostile actor. Findings will be uncomfortable. That's the point.
|
|
10
|
+
|
|
11
|
+
## What Gets Launched in Parallel
|
|
12
|
+
|
|
13
|
+
| Agent | Hunts |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `prompt-injection-hunter` | Jailbreak vectors, indirect injection, system-prompt leaks, tool-call hijacking |
|
|
16
|
+
| `supply-chain-auditor` | Typosquats, malicious post-install, lockfile drift, slopsquats, compromised deps |
|
|
17
|
+
| `secret-hunter` | Live secrets, git history leaks, encoded creds, bundled-to-client env vars |
|
|
18
|
+
| `backdoor-hunter` | Obfuscated payloads, network beacons, time bombs, eval/exec abuse, cryptominers |
|
|
19
|
+
|
|
20
|
+
## Optional Extension Agents
|
|
21
|
+
|
|
22
|
+
Use these flags to add more agents to the sweep:
|
|
23
|
+
|
|
24
|
+
| Flag | Adds |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `--license` | `license-violation-finder` (GPL contamination, attribution gaps) |
|
|
27
|
+
| `--theft` | `code-stealer-detector` (copy-paste provenance, copyleft hits) |
|
|
28
|
+
| `--jailbreak` | `jailbreak-tester` (live AI feature red-team) |
|
|
29
|
+
| `--chaos` | `chaos-engineer` (fault-injection plan generation) |
|
|
30
|
+
| `--all` | All 8 agents — the **full devil sweep** |
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
/devil-mode # 4-agent default sweep
|
|
36
|
+
/devil-mode --all # all 8 adversarial agents
|
|
37
|
+
/devil-mode src/auth/ # focus on auth module
|
|
38
|
+
/devil-mode --pre-public # before going open-source: --license + --theft + default
|
|
39
|
+
/devil-mode --pre-launch # before public launch: --jailbreak + default + --chaos
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Report Format
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
## DEVIL MODE REPORT
|
|
46
|
+
|
|
47
|
+
### Prompt Injection Surface (prompt-injection-hunter)
|
|
48
|
+
CRITICAL: [list]
|
|
49
|
+
HIGH: [list]
|
|
50
|
+
DEFENSE GAPS: [where existing protections can be bypassed]
|
|
51
|
+
|
|
52
|
+
### Supply Chain (supply-chain-auditor)
|
|
53
|
+
THREATS: [confirmed malicious / typosquat / drift]
|
|
54
|
+
WATCHLIST: [suspicious patterns]
|
|
55
|
+
LOCKFILE: [OK / drift / missing]
|
|
56
|
+
|
|
57
|
+
### Leaked Secrets (secret-hunter)
|
|
58
|
+
ACTIVE: [rotate now — still valid]
|
|
59
|
+
HISTORICAL: [git history leaks — assume compromised]
|
|
60
|
+
BUNDLED: [exposed to every client visit]
|
|
61
|
+
|
|
62
|
+
### Backdoors / Malicious Code (backdoor-hunter)
|
|
63
|
+
CRITICAL: [confirmed reverse-shell / RCE / exfiltration]
|
|
64
|
+
SUSPICIOUS: [needs manual decode/review]
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
TOTAL EXPOSURE: X critical, Y high, Z medium across N agents
|
|
68
|
+
PRIORITIZED ACTIONS:
|
|
69
|
+
1. [first action — usually rotate or revert]
|
|
70
|
+
2. [second]
|
|
71
|
+
3. [third]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## When to Use
|
|
75
|
+
|
|
76
|
+
- **Before going open-source** — any repo about to be public, run with `--pre-public`
|
|
77
|
+
- **Before any public launch** — run with `--pre-launch`
|
|
78
|
+
- **After accepting code from new contractor / contributor** — full audit with `--all`
|
|
79
|
+
- **Quarterly red-team review** — schedule it
|
|
80
|
+
- **After any compromise alert / vendor security advisory** — verify your exposure
|
|
81
|
+
- **Before M&A due diligence** — what their lawyers will find, you find first
|
|
82
|
+
- **After major dep update** — supply-chain + backdoor + secret sweep
|
|
83
|
+
|
|
84
|
+
## When NOT to Use
|
|
85
|
+
|
|
86
|
+
- ❌ On code you don't have permission to audit (run only on your own repos / authorized targets)
|
|
87
|
+
- ❌ On production systems for `chaos-engineer` flag — chaos requires `--staging` or signed-off blast radius
|
|
88
|
+
- ❌ As a substitute for actual security review — this finds patterns; humans verify exploitability
|
|
89
|
+
|
|
90
|
+
## Execute Now
|
|
91
|
+
|
|
92
|
+
Invoking this command is confirmation to proceed. Execute immediately:
|
|
93
|
+
|
|
94
|
+
1. Parse `$ARGUMENTS` for scope path and flags (`--all`, `--license`, `--theft`, `--jailbreak`, `--chaos`, `--pre-public`, `--pre-launch`).
|
|
95
|
+
2. Determine the agent set:
|
|
96
|
+
- Default: `prompt-injection-hunter`, `supply-chain-auditor`, `secret-hunter`, `backdoor-hunter`
|
|
97
|
+
- `--pre-public`: default + `license-violation-finder` + `code-stealer-detector`
|
|
98
|
+
- `--pre-launch`: default + `jailbreak-tester` + `chaos-engineer`
|
|
99
|
+
- `--all`: all 8
|
|
100
|
+
3. Spawn all selected agents simultaneously with `run_in_background: true`.
|
|
101
|
+
4. Wait for all to complete.
|
|
102
|
+
5. Aggregate findings into the Devil Mode Report format above.
|
|
103
|
+
6. Prioritize actions by severity (critical first), with concrete recommended fix for each.
|
|
104
|
+
7. End with: "Which threat do you want to neutralize first?"
|
|
105
|
+
|
|
106
|
+
## Severity Priority Order
|
|
107
|
+
|
|
108
|
+
When aggregating across agents, sort findings by:
|
|
109
|
+
|
|
110
|
+
1. **Active credential leak** (still valid keys) — rotate immediately
|
|
111
|
+
2. **Confirmed backdoor / malicious code** in current dep — quarantine + revert
|
|
112
|
+
3. **Confirmed prompt injection** with tool-call abuse possible — disable affected agent
|
|
113
|
+
4. **Critical supply-chain threat** (typosquat, malicious postinstall) — remove dep
|
|
114
|
+
5. **Historical credential leak** in git history — rotate, plan history rewrite
|
|
115
|
+
6. **High-severity prompt injection** without tool abuse — patch + monitor
|
|
116
|
+
7. **License/IP exposure** — remediate before any public action
|
|
117
|
+
8. **Suspicious patterns needing manual review** — schedule deep dive
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
**Remember:** The devil-mode report is uncomfortable on purpose. Every finding here is one an attacker can find too — the only question is whether you fix it first.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Phase 3.4 self-evolving memory. Convert reuse + routing-miss signals into PR-ready proposals (skill drafts + routing-rule additions). Never auto-applies.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /memory-evolve
|
|
6
|
+
|
|
7
|
+
Run the self-evolving memory loop. Inspect what ECC has learned from your sessions, generate proposals, accept the ones you want as drafts, reject the rest. **Nothing is ever committed automatically** — accept writes a draft file you review.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/memory-evolve # default: stats + analyze + list
|
|
13
|
+
/memory-evolve stats # snapshot of recorded signals
|
|
14
|
+
/memory-evolve analyze # signals → proposals (idempotent)
|
|
15
|
+
/memory-evolve list # show all proposals
|
|
16
|
+
/memory-evolve list --status pending
|
|
17
|
+
/memory-evolve show <id> # full proposed content + evidence
|
|
18
|
+
/memory-evolve accept <id> # write draft file to disk (NEVER commits)
|
|
19
|
+
/memory-evolve reject <id> --note "covered by existing agent"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Behavior
|
|
23
|
+
|
|
24
|
+
1. **stats** prints the current signal snapshot:
|
|
25
|
+
- reuse: how many memories are tracked, total surfaces, top reused
|
|
26
|
+
- routing misses: how many substantive prompts had zero memory matches, top token clusters
|
|
27
|
+
2. **analyze** applies thresholds and writes proposals to `~/.kodelyth/evolve/proposals.jsonl`. Stable IDs — re-running does NOT duplicate.
|
|
28
|
+
3. **list** filters by state. **show** prints the full draft markdown + evidence.
|
|
29
|
+
4. **accept** writes the draft to its target path under `--root` (defaults to package root). Refuses to overwrite without `--overwrite`. Marks the proposal `accepted` with the absolute path.
|
|
30
|
+
5. **reject** marks a proposal rejected with optional note.
|
|
31
|
+
|
|
32
|
+
## Default thresholds
|
|
33
|
+
|
|
34
|
+
| Signal | Default threshold | Override flag |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| Memory reuse count | 3 | `--reuse-min N` |
|
|
37
|
+
| Distinct sessions per memory | 2 | `--reuse-min-sessions N` |
|
|
38
|
+
| Routing-miss cluster total | 3 | `--miss-min N` |
|
|
39
|
+
| Distinct prompts per cluster | 2 | `--miss-min-distinct N` |
|
|
40
|
+
|
|
41
|
+
## Use cases
|
|
42
|
+
|
|
43
|
+
- **Promote a recurring memory to a skill.** A memory that's been recalled 5 times across 4 sessions is probably ready to graduate.
|
|
44
|
+
- **Find routing gaps.** Ten substantive prompts about "feature flags" that hit zero memories and (you suspect) no specialist agent → propose a routing entry.
|
|
45
|
+
- **Audit what ECC has learned.** Before tagging a release, see what proposals are pending and decide which to accept.
|
|
46
|
+
- **Reject noisy patterns.** Some clusters look real but cover ground that's already covered by an existing agent. Reject with a note for the audit trail.
|
|
47
|
+
|
|
48
|
+
## Companion commands
|
|
49
|
+
|
|
50
|
+
- **`/memory remember`** — manual memory capture. Without captured memories, evolve has nothing to learn from.
|
|
51
|
+
- **`/skill-create`** — alternative path: create a skill from scratch instead of from an evolved memory.
|
|
52
|
+
- **`/devil-mode`** — adversarial review of the accepted draft before commit.
|
|
53
|
+
|
|
54
|
+
## Hard rules
|
|
55
|
+
|
|
56
|
+
1. **NEVER commit accepted drafts automatically.** The CLI writes the file. The user reviews, edits, commits.
|
|
57
|
+
2. **NEVER overwrite an existing file** without `--overwrite`. Even on accept.
|
|
58
|
+
3. **Routing-addition diffs ship `TODO-agent`** intentionally so they cannot accidentally route real traffic.
|
|
59
|
+
4. **All recording is fire-and-forget.** Hooks NEVER block on signal write failure.
|
|
60
|
+
5. **Append-only proposal log.** State changes preserve the full audit trail.
|
|
61
|
+
|
|
62
|
+
## Implementation
|
|
63
|
+
|
|
64
|
+
Backed by:
|
|
65
|
+
|
|
66
|
+
- `scripts/evolve/stats.js` — pure record/read of `~/.kodelyth/evolve/{reuse.json, routing-misses.jsonl}`
|
|
67
|
+
- `scripts/evolve/analyze.js` — pure functions: signals → proposals
|
|
68
|
+
- `scripts/evolve/proposals.js` — append-only proposal log with state transitions
|
|
69
|
+
- `hooks/memory/auto-recall.js` — fire-and-forget signal recording on every UserPromptSubmit
|
|
70
|
+
|
|
71
|
+
CLI surface: `kodelyth-ecc evolve <stats|analyze|list|show|accept|reject>`. Skill: `self-evolving-memory`. Full reference: `docs/evolve.md`.
|