compact-agent 1.24.2 → 1.26.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/README.md +140 -277
- package/bin/ecc-hooks.cjs +394 -394
- package/dist/codemaps.js +3 -2
- package/dist/codemaps.js.map +1 -1
- package/dist/config.d.ts +17 -0
- package/dist/config.js +89 -5
- package/dist/config.js.map +1 -1
- package/dist/cost-tracker.js +1 -1
- package/dist/ecc.js +10 -10
- package/dist/ecc.js.map +1 -1
- package/dist/hooks.js +3 -3
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +203 -19
- package/dist/index.js.map +1 -1
- package/dist/learning.js +1 -1
- package/dist/login.js +1 -1
- package/dist/memory.js +1 -1
- package/dist/mempalace/index.d.ts +6 -2
- package/dist/mempalace/index.js +10 -3
- package/dist/mempalace/index.js.map +1 -1
- package/dist/mempalace/store.d.ts +2 -2
- package/dist/mempalace/store.js +5 -5
- package/dist/mempalace/store.js.map +1 -1
- package/dist/mempalace/types.d.ts +4 -4
- package/dist/mempalace/types.js +2 -2
- package/dist/package-detect.d.ts +2 -2
- package/dist/package-detect.js +8 -6
- package/dist/package-detect.js.map +1 -1
- package/dist/query.js +17 -0
- package/dist/query.js.map +1 -1
- package/dist/rules.js +795 -795
- package/dist/rules.js.map +1 -1
- package/dist/sessions.js +1 -1
- package/dist/skills.js +1 -1
- package/dist/stitch.js +132 -132
- package/dist/system-prompt.js +85 -85
- package/dist/theme.js +1 -1
- package/dist/theme.js.map +1 -1
- package/dist/tools/stitch.d.ts +1 -1
- package/dist/users.js +1 -1
- package/dist/voice.d.ts +6 -0
- package/dist/voice.js +16 -0
- package/dist/voice.js.map +1 -1
- package/dist/walkthrough.js +111 -111
- package/package.json +73 -68
- package/resources/ecc/skills/repo-scan/SKILL.md +15 -15
package/README.md
CHANGED
|
@@ -1,352 +1,215 @@
|
|
|
1
|
+
# compact-agent
|
|
1
2
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
**A dense, feature-rich AI coding agent for the terminal.**
|
|
3
|
+
A terminal AI coding CLI for any OpenAI-compatible API.
|
|
5
4
|
|
|
6
5
|
[](https://www.npmjs.com/package/compact-agent)
|
|
7
6
|
[](LICENSE)
|
|
8
7
|
[](https://nodejs.org/)
|
|
9
|
-
[](https://www.typescriptlang.org/)
|
|
10
|
-
[](https://github.com/nousresearch/hermes-agent)
|
|
11
|
-
[](https://github.com/Crownelius/everything-claude-code)
|
|
12
|
-
|
|
13
|
-
Compact Agent is a single-command terminal AI coding CLI. It speaks any OpenAI-compatible API (OpenRouter, OpenAI, Anthropic via compatible endpoints, Ollama, LM Studio, DeepSeek, GLM). It ships with **80+ slash commands**, **8 operation modes** including the self-improving **Hermes** mode, the bundled **everything-claude-code** skill library, multi-agent orchestration, a cross-session learning system, and zero telemetry.
|
|
14
|
-
|
|
15
|
-
[Features](#-features) • [Modes](#-operation-modes) • [Skills](#-skills-system) • [Tools](#-tool-arsenal) • [Providers](#-supported-providers) • [Installation](#-installation) • [Commands](#-slash-commands) • [Privacy](#-privacy) • [Architecture](#-architecture)
|
|
16
8
|
|
|
17
|
-
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g compact-agent
|
|
11
|
+
compact-agent
|
|
12
|
+
```
|
|
18
13
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- **Single-command install** — `npm install -g compact-agent && compact-agent`. No clone, no build step, no Docker, no IDE extension.
|
|
22
|
-
- **Universal LLM transport** — works with any OpenAI-compatible API. Switch providers and models from inside the REPL with `/model`, `/provider`, `/route`.
|
|
23
|
-
- **9 operation modes** — `dev`, `review`, `tdd`, `research`, `plan`, `debug`, `architect`, `hermes` (self-improving learning loop), and `design` (Stitch-powered UI generation — describe what you want, the agent uses Stitch to design it and writes the result into your code). Each rewrites the system prompt to bias the agent toward its specific workflow.
|
|
24
|
-
- **Hermes self-improving mode** — recalls prior sessions, models the user across conversations, parallelizes independent subtasks, distills new skills from experience, and proposes what's worth banking before finishing. Inspired by [nousresearch/hermes-agent](https://github.com/nousresearch/hermes-agent).
|
|
25
|
-
- **Bundled everything-claude-code library** — 33 high-quality skills, 16 agents, 9 workflow commands, 7 language rule bundles, and 5 default security hooks. Auto-installed on first launch via [Crownelius/everything-claude-code](https://github.com/Crownelius/everything-claude-code).
|
|
26
|
-
- **Unified slash-command surface** — `/tdd`, `/review`, `/security-review`, `/plan`, `/refactor`, `/build-fix` automatically use the ECC prompts when ECC is installed. **No `/ecc-tdd` vs `/tdd` duplication.**
|
|
27
|
-
- **Multi-agent orchestration** — `/orchestrate`, `/multi-plan`, `/multi-execute`, `/multi-backend`, `/multi-frontend`, `/pr-loop` spawn parallel sub-tasks against the same project.
|
|
28
|
-
- **10 language-specific reviewers** — `/auto-review` (auto-detects the language) plus dedicated reviewers for TS, Python, Go, Rust, Java, C++, Kotlin, PHP, and SQL.
|
|
29
|
-
- **6 language-specific build fixers** — `/ts-build-fix`, `/go-build-fix`, `/rust-build-fix`, `/java-build-fix`, `/cpp-build-fix`, `/pytorch-fix`.
|
|
30
|
-
- **Learning system** — `/learn` extracts patterns from the current session into confidence-scored instincts. `/evolve` promotes high-confidence instincts into reusable skills. Confidence decays automatically; `/prune` removes stale patterns.
|
|
31
|
-
- **Cross-session memory** — `~/.crowcoder/memory/` retains project context across sessions. Hermes mode searches it before answering.
|
|
32
|
-
- **Sessions & checkpoints** — `/sessions`, `/save`, `/resume`, `/delete` for full session snapshots; `/checkpoint` for git-state snapshots inside a session.
|
|
33
|
-
- **Agent-led walkthrough** — type `/walkthrough` (or `/tour`, `/guide`) and the agent walks new users through every feature interactively.
|
|
34
|
-
- **Native security hooks** — by default, block `git --no-verify`, warn on reading `.env`/`.key`/`.pem`, warn when an edit leaves `console.*` statements, suggest tmux for long-running dev servers. Fully configurable in `~/.crowcoder/hooks.json`.
|
|
35
|
-
- **Permission modes** — `/perm ask` prompts before every tool use, `/perm auto` allows non-destructive ops, `/perm yolo` approves everything. Per-tool dry-run via `/dry-run`.
|
|
36
|
-
- **Cost & budget tracking** — `/usage`, `/budget` keep token counts and cost estimates entirely local in `~/.crowcoder/usage.json`. Cost-aware routing via `/route`.
|
|
37
|
-
- **Real web search** — `web_search` tool backed by DuckDuckGo Lite (no API key). The LLM gets unknown-tool errors with the valid tool list so free models that hallucinate `web_search_exa` can self-correct.
|
|
38
|
-
- **Google Stitch integration** — `/stitch <query>` interface to [Stitch](https://stitch.withgoogle.com/), Google's AI UI/UX design tool. List projects, generate UI from text, enhance design prompts. Ports the [gemini-cli-extensions/stitch](https://github.com/gemini-cli-extensions/stitch) extension; API-key auth.
|
|
39
|
-
- **Zero telemetry** — no analytics SDKs, no phone-home, no crash reporting. The only network calls are to your chosen LLM provider when you send a message.
|
|
14
|
+
First run prompts you for a provider, key, model, and permission mode. After that, `compact-agent` from any directory drops you into a REPL with a persistent bottom-anchored input box.
|
|
40
15
|
|
|
41
16
|
---
|
|
42
17
|
|
|
43
|
-
##
|
|
44
|
-
|
|
45
|
-
Switchable any time with `/mode <name>`. Each mode injects a specialized system-prompt addition.
|
|
46
|
-
|
|
47
|
-
### ⚡ dev — *default*
|
|
48
|
-
|
|
49
|
-
General coding. Write features, fix bugs, refactor. Reads files before editing, prefers minimal changes.
|
|
50
|
-
|
|
51
|
-
### 🔍 review
|
|
52
|
-
|
|
53
|
-
Code review with severity-rated findings (CRITICAL/HIGH/MEDIUM/LOW). Confidence-filtered: only reports issues the model is >80% sure about.
|
|
54
|
-
|
|
55
|
-
### 🧪 tdd
|
|
56
|
-
|
|
57
|
-
Strict RED → GREEN → REFACTOR cycle. Will **not** write implementation before a failing test. Lower temperature for tighter cycles.
|
|
58
|
-
|
|
59
|
-
### 🔭 research
|
|
60
|
-
|
|
61
|
-
Read-only exploration. The agent reads code, traces execution paths, maps architecture, and reports — without modifying files.
|
|
62
|
-
|
|
63
|
-
### 📋 plan
|
|
18
|
+
## What it does
|
|
64
19
|
|
|
65
|
-
|
|
20
|
+
- Speaks any OpenAI-compatible Chat Completions endpoint. OpenRouter, OpenAI, NVIDIA, DeepSeek, GLM, Ollama, LM Studio, or anything custom.
|
|
21
|
+
- Tool-call loop with `bash`, `read_file`, `write_file`, `edit_file`, `apply_patch`, `grep`, `glob`, `list_dir`, `web_search`, `web_fetch`, plus optional `stitch` (Google's UI generator) when configured.
|
|
22
|
+
- Permission gating: `/perm ask` prompts every tool call, `/perm auto` lets read-only and safe writes through, `/perm yolo` runs everything.
|
|
23
|
+
- Optional OS sandbox: `/sandbox standard` uses `sandbox-exec` (macOS) or `bwrap` (Linux) when available. No-op on Windows.
|
|
24
|
+
- Multi-key rotation pool: add several provider keys via `/keys add`. The agent round-robins and cools down keys that hit 429 / quota / auth errors so the others keep working.
|
|
25
|
+
- Parallel agent swarm: `/swarm <agent,agent,...> <task>` fans out N specialized ECC agents against the same prompt and prints attributed results.
|
|
26
|
+
- Bundled [everything-claude-code](https://github.com/Crownelius/everything-claude-code): 228 skills, 60 agents, 75 workflow commands, 19 language rule bundles. Auto-installed on first launch; refresh with `/ecc-install`.
|
|
27
|
+
- 9 modes (`/mode <name>`): `dev`, `review`, `tdd`, `research`, `plan`, `debug`, `architect`, `hermes`, `design`. Each rewrites the system-prompt addendum.
|
|
28
|
+
- Optional voice + accessibility: Whisper dictation, ElevenLabs TTS readout, and a 19-binding F-row hotkey scheme designed for blind / low-vision users (see [Accessibility](#accessibility)). Off by default — opt in with `/voice on`.
|
|
29
|
+
- Zero telemetry. The only outbound traffic is to your chosen LLM provider when you send a turn.
|
|
66
30
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
Systematic root-cause hunting. Reproduce → hypothesize → narrow → fix → verify. Never guesses — always confirms with evidence.
|
|
70
|
-
|
|
71
|
-
### 🏛 architect
|
|
72
|
-
|
|
73
|
-
System-level design. Component boundaries, data flow, technology choices, scalability, API design, database schemas, deployment.
|
|
74
|
-
|
|
75
|
-
### 🜲 hermes
|
|
76
|
-
|
|
77
|
-
**The agent that grows with you.** Recalls prior sessions and instincts before answering, builds a model of the user across conversations, parallelizes independent subtasks, distills skills from experience, nudges to persist knowledge at end of work, and proactively suggests scheduled follow-ups.
|
|
78
|
-
|
|
79
|
-
Activate with `/hermes` or `/mode hermes`.
|
|
80
|
-
|
|
81
|
-
### 🎨 design
|
|
31
|
+
---
|
|
82
32
|
|
|
83
|
-
|
|
33
|
+
## Modes
|
|
84
34
|
|
|
85
|
-
|
|
35
|
+
`/mode <name>` swaps the system-prompt addendum.
|
|
86
36
|
|
|
87
|
-
|
|
37
|
+
| Mode | What changes |
|
|
38
|
+
| :--- | :--- |
|
|
39
|
+
| `dev` | Default. General coding, minimal-change bias, reads before edits. |
|
|
40
|
+
| `review` | Severity-rated findings (CRITICAL / HIGH / MEDIUM / LOW). Confidence filter — only reports issues it's >80% sure about. |
|
|
41
|
+
| `tdd` | RED → GREEN → REFACTOR. Refuses to write implementation before a failing test. |
|
|
42
|
+
| `research` | Read-only. Maps architecture, traces paths, never modifies files. |
|
|
43
|
+
| `plan` | Numbered step-by-step plans with paths and trade-offs. No code. |
|
|
44
|
+
| `debug` | Reproduce → hypothesize → narrow → fix → verify. Refuses to guess. |
|
|
45
|
+
| `architect` | Component boundaries, data flow, scalability, schemas, deployment. |
|
|
46
|
+
| `hermes` | Recalls prior sessions, parallelizes independent subtasks, distills new skills from experience, suggests what's worth banking. |
|
|
47
|
+
| `design` | UI requests flow through Google Stitch automatically. Requires `/stitch-config`. |
|
|
88
48
|
|
|
89
49
|
---
|
|
90
50
|
|
|
91
|
-
##
|
|
51
|
+
## Providers
|
|
92
52
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
| Source | Stored as | Origin |
|
|
53
|
+
| Provider | Base URL | Notes |
|
|
96
54
|
| :--- | :--- | :--- |
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
55
|
+
| OpenRouter | `https://openrouter.ai/api/v1` | One key, hundreds of models, free tier. Recommended default. |
|
|
56
|
+
| OpenAI | `https://api.openai.com/v1` | GPT-4o, o-series. |
|
|
57
|
+
| NVIDIA | `https://integrate.api.nvidia.com/v1` | NIM-hosted Llama, Mistral, DeepSeek, etc. Free tier with rate limits. |
|
|
58
|
+
| DeepSeek | `https://api.deepseek.com/v1` | Cheap, strong on code. |
|
|
59
|
+
| GLM (ZhipuAI) | `https://open.bigmodel.cn/api/paas/v4` | GLM family. |
|
|
60
|
+
| Ollama | `http://localhost:11434/v1` | Local. No key. |
|
|
61
|
+
| LM Studio | `http://localhost:1234/v1` | Local. No key. |
|
|
62
|
+
| Custom | you provide | Anything that speaks OpenAI Chat Completions. |
|
|
100
63
|
|
|
101
|
-
|
|
64
|
+
Anthropic models reach you via OpenRouter (`anthropic/claude-sonnet-4` etc.) — the native Anthropic API isn't OpenAI-compatible.
|
|
102
65
|
|
|
103
66
|
---
|
|
104
67
|
|
|
105
|
-
##
|
|
68
|
+
## Key rotation
|
|
106
69
|
|
|
107
|
-
|
|
70
|
+
If you have multiple keys for the same provider (e.g. several free OpenRouter accounts), add them to a pool. The agent round-robins through them and cools off any key that hits 429, quota, or auth errors.
|
|
108
71
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
| `edit_file` | Find-and-replace within a file with optional `replace_all`. | W |
|
|
115
|
-
| `grep` | Search file contents. Uses ripgrep when available, falls back to grep. | R |
|
|
116
|
-
| `glob` | Find files by glob pattern (e.g. `src/**/*.ts`). | R |
|
|
117
|
-
| `list_dir` | List directory entries (type, size, name). | R |
|
|
118
|
-
| `web_fetch` | Fetch a URL and convert HTML → readable text. | R |
|
|
119
|
-
| `web_search` | Keyword search via DuckDuckGo Lite. Returns title/URL/snippet. No API key required. | R |
|
|
120
|
-
| `stitch` | Google Stitch MCP server — 12 tools across Project Management, Screen Management, AI Generation (gemini-3-flash / -pro, slow), and Design Systems. Auto-registered when `/stitch-config` has saved an API key. | RW |
|
|
72
|
+
```
|
|
73
|
+
/keys add sk-or-v1-…
|
|
74
|
+
/keys add sk-or-v1-…
|
|
75
|
+
/keys status
|
|
76
|
+
```
|
|
121
77
|
|
|
122
|
-
|
|
78
|
+
Cool-down policy: 60s for rate-limit (`429`, `rate.?limit`), 1h for quota / auth / 403. 404 model-not-found and 5xx server errors are NOT treated as key problems — they're surfaced upward without burning a key.
|
|
123
79
|
|
|
124
80
|
---
|
|
125
81
|
|
|
126
|
-
##
|
|
82
|
+
## Swarming
|
|
127
83
|
|
|
128
|
-
|
|
129
|
-
| :--- | :--- | :--- |
|
|
130
|
-
| **OpenRouter** | `https://openrouter.ai/api/v1` | One key, hundreds of models, free tier available. Recommended for new users. |
|
|
131
|
-
| **OpenAI** | `https://api.openai.com/v1` | GPT-4o / o-series. |
|
|
132
|
-
| **Anthropic** (via OpenRouter) | `https://openrouter.ai/api/v1` | Use `anthropic/claude-sonnet-4` etc. (native Anthropic API is not OpenAI-compatible). |
|
|
133
|
-
| **DeepSeek** | `https://api.deepseek.com/v1` | Cheap, strong on code. |
|
|
134
|
-
| **GLM (ZhipuAI)** | `https://open.bigmodel.cn/api/paas/v4` | GLM family. |
|
|
135
|
-
| **Ollama** | `http://localhost:11434/v1` | Local models — no API key needed. |
|
|
136
|
-
| **LM Studio** | `http://localhost:1234/v1` | Local models — no API key needed. |
|
|
137
|
-
| **Custom** | you provide | Anything that speaks OpenAI Chat Completions. |
|
|
138
|
-
|
|
139
|
-
---
|
|
84
|
+
Fan out the same task to N specialized agents in parallel.
|
|
140
85
|
|
|
141
|
-
## 📦 Installation
|
|
142
|
-
|
|
143
|
-
### Prerequisites
|
|
144
|
-
|
|
145
|
-
- [Node.js](https://nodejs.org/) **18 or newer** (tested on 18, 20, 22, 24)
|
|
146
|
-
- An API key from any supported provider (or use a local Ollama / LM Studio)
|
|
147
|
-
- A POSIX-like shell. Compact Agent spawns Git Bash for shell tools on Windows.
|
|
148
|
-
|
|
149
|
-
### Single-command install
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
npm install -g compact-agent
|
|
153
|
-
compact-agent
|
|
154
86
|
```
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
87
|
+
> /swarm code-architect,silent-failure-hunter,type-design-analyzer audit the auth flow
|
|
88
|
+
|
|
89
|
+
══════════════════════════════════════════════
|
|
90
|
+
code-architect (12.4s)
|
|
91
|
+
──────────────────────────────────────────────
|
|
92
|
+
…
|
|
93
|
+
══════════════════════════════════════════════
|
|
94
|
+
silent-failure-hunter (9.1s)
|
|
95
|
+
──────────────────────────────────────────────
|
|
96
|
+
…
|
|
165
97
|
```
|
|
166
98
|
|
|
167
|
-
|
|
99
|
+
Agents are pulled from the bundled ECC harness. Each runs against an empty tool list (analysis only — no edits or shell). Failures in one don't kill the others (`Promise.allSettled`). Cost = N model calls.
|
|
168
100
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
npm install -g compact-agent@latest
|
|
173
|
-
```
|
|
101
|
+
---
|
|
174
102
|
|
|
175
|
-
|
|
103
|
+
## Slash commands
|
|
176
104
|
|
|
177
|
-
|
|
178
|
-
npm uninstall -g compact-agent
|
|
179
|
-
rm -rf ~/.crowcoder # remove all local state (config, sessions, skills, ...)
|
|
180
|
-
```
|
|
105
|
+
130+ commands. The common ones:
|
|
181
106
|
|
|
182
|
-
|
|
107
|
+
| Command | What it does |
|
|
108
|
+
| :--- | :--- |
|
|
109
|
+
| `/walkthrough` | Agent-led tour. Aliases: `/tour`, `/guide`. |
|
|
110
|
+
| `/help` | Full command list. |
|
|
111
|
+
| `/mode <name>` | Switch mode. |
|
|
112
|
+
| `/model [name]` | Show or switch model. |
|
|
113
|
+
| `/perm ask\|auto\|yolo` | Change permission mode. |
|
|
114
|
+
| `/sandbox off\|standard\|strict` | OS sandbox level (macOS / Linux only). |
|
|
115
|
+
| `/keys add\|remove\|status\|clear` | Manage the key-rotation pool. |
|
|
116
|
+
| `/swarm <agents> <task>` | Parallel multi-agent fan-out. |
|
|
117
|
+
| `/tdd <feature>` | TDD workflow — failing test first. |
|
|
118
|
+
| `/review [target]` | Severity-rated code review. |
|
|
119
|
+
| `/audit` | Local project health check. Nothing leaves your machine. |
|
|
120
|
+
| `/orchestrate <task>` | Decompose, run sub-agents in parallel. |
|
|
121
|
+
| `/skills`, `/ecc-guide`, `/skill-show <name>` | Browse the bundled skill library. |
|
|
122
|
+
| `/learn`, `/evolve`, `/prune` | Cross-session learning system. |
|
|
123
|
+
| `/memory` | MemPalace-backed persistent memory (rooms, drawers, KG triples). |
|
|
124
|
+
| `/usage`, `/budget` | Local token and cost ledger. |
|
|
125
|
+
| `/voice on\|off\|config` | Toggle dictation + TTS. |
|
|
126
|
+
| `/accessibility screenReader on` | Screen-reader-friendly output. |
|
|
127
|
+
| `/sessions`, `/save`, `/resume` | Full session snapshots. |
|
|
128
|
+
| `/checkpoint` | Git-state snapshot inside a session. |
|
|
129
|
+
| `/export md\|json\|txt` | Save the conversation. |
|
|
130
|
+
| `!<cmd>` | Run a shell command without involving the LLM. |
|
|
131
|
+
| `/exit` | Quit. |
|
|
132
|
+
|
|
133
|
+
See **[COMMANDS.md](COMMANDS.md)** for the full reference.
|
|
183
134
|
|
|
184
135
|
---
|
|
185
136
|
|
|
186
|
-
##
|
|
137
|
+
## Permissions and safety
|
|
187
138
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
| Command | Description |
|
|
139
|
+
| Mode | Behavior |
|
|
191
140
|
| :--- | :--- |
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
| `/model [name]` | Switch model, or show the current one |
|
|
196
|
-
| `/perm <mode>` | Change permission mode (ask/auto/yolo) |
|
|
197
|
-
| `/tdd <feature>` | Test-driven workflow — tests first, then implementation |
|
|
198
|
-
| `/review [target]` | AI code review with severity ratings |
|
|
199
|
-
| `/orchestrate <task>` | Decompose a task and run sub-agents in parallel |
|
|
200
|
-
| `/skills` | List all skills (built-in, ECC bundled, learned) |
|
|
201
|
-
| `/learn` | Extract patterns from the current session into instincts |
|
|
202
|
-
| `/usage` | Show token + cost summary |
|
|
203
|
-
| `/audit` | Local-only project health check (no data leaves your machine) |
|
|
204
|
-
| `/export [md\|json\|txt]` | Save the current conversation to a file |
|
|
205
|
-
| `!<cmd>` | Run a shell command directly without involving the AI |
|
|
206
|
-
| `/exit` | Quit the REPL |
|
|
141
|
+
| `ask` | Prompts before each tool call. Default. |
|
|
142
|
+
| `auto` | Reads and safe writes go through. Bash + destructive ops still prompt. |
|
|
143
|
+
| `yolo` | Approves everything. Use with caution. |
|
|
207
144
|
|
|
208
|
-
|
|
145
|
+
A separate execpolicy gate intercepts dangerous bash patterns (`rm -rf`, `git ... --no-verify`, secret scanners) before they reach the shell — independent of the permission mode. Five default hooks (configurable in `~/.compact-agent/hooks.json`) cover console-leftover warnings, `.env` reads, missing tmux for dev servers, and a hard block on `--no-verify`.
|
|
209
146
|
|
|
210
|
-
|
|
147
|
+
---
|
|
211
148
|
|
|
212
|
-
|
|
149
|
+
## Privacy
|
|
213
150
|
|
|
214
|
-
| Data | Where it
|
|
151
|
+
| Data | Where it lives |
|
|
215
152
|
| :--- | :--- |
|
|
216
|
-
| Conversation messages | Your chosen
|
|
217
|
-
| Token counts, costs | `~/.
|
|
218
|
-
| Sessions | `~/.
|
|
219
|
-
|
|
|
220
|
-
|
|
|
221
|
-
| API keys | `~/.crowcoder/config.json` — plaintext, local only. **Protect this file.** |
|
|
222
|
-
| Hook execution | All hooks run locally in your shell. No external calls. |
|
|
223
|
-
|
|
224
|
-
The `web_fetch` and `web_search` tools only contact URLs the agent decides to fetch in response to your request. There is no background telemetry, no crash reporting, no auto-update beacon.
|
|
153
|
+
| Conversation messages | Your chosen provider only — required for inference. |
|
|
154
|
+
| Token counts, costs | `~/.compact-agent/usage.json`. Local. |
|
|
155
|
+
| Sessions, skills, instincts, memory | `~/.compact-agent/`. Local. |
|
|
156
|
+
| API keys | `~/.compact-agent/config.json`. Plaintext, local. Protect this file. |
|
|
157
|
+
| Hooks | Run locally in your shell. No outbound calls. |
|
|
225
158
|
|
|
226
|
-
|
|
159
|
+
No analytics SDKs, no crash reporting, no auto-update beacon. `rm -rf ~/.compact-agent` removes everything.
|
|
227
160
|
|
|
228
161
|
---
|
|
229
162
|
|
|
230
|
-
##
|
|
163
|
+
## Accessibility
|
|
231
164
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
| Event | Match | Behavior |
|
|
235
|
-
| :--- | :--- | :--- |
|
|
236
|
-
| `PreToolUse` | `bash` | **Block** `git ... --no-verify` and `--no-gpg-sign` — they skip pre-commit hooks |
|
|
237
|
-
| `PreToolUse` | `bash` | Warn (non-blocking) when running a dev server outside tmux on POSIX |
|
|
238
|
-
| `PreToolUse` | `read_file` | Warn when reading `.env`, `.key`, `.pem`, or paths containing `credentials`/`secrets`/`id_rsa` |
|
|
239
|
-
| `PostToolUse` | `edit_file` | Warn when an edit leaves `console.log`/`console.warn`/`console.error` statements in `.ts`/`.js` files |
|
|
240
|
-
| `PostToolUse` | `write_file` | Same console-statement warning on new files |
|
|
165
|
+
Built with blind / low-vision users in mind. `/accessibility screenReader on` strips ANSI colors and replaces Unicode glyphs with words so NVDA, JAWS, Narrator, Orca, and VoiceOver can read output cleanly. A 19-binding F-row hotkey scheme covers everything you'd otherwise have to scroll for:
|
|
241
166
|
|
|
242
|
-
|
|
167
|
+
| Key | Function |
|
|
168
|
+
| :--- | :--- |
|
|
169
|
+
| F1–F4 | Status: what's happening · where am I · re-read full last response · re-read summary |
|
|
170
|
+
| F5–F10 | Dictation + TTS playback: F5 push-to-talk · F6 pause · F7 replay · F8 skip · F9/F10 speed ± |
|
|
171
|
+
| **F11 / F12** | Read current input buffer · read your previous submitted turn |
|
|
172
|
+
| **Shift+F1–F4** | Queued input · key-pool health · last tool-call · toggle screen-reader |
|
|
173
|
+
| **Shift+F5 / F6** | Soft-cancel current turn · panic-stop TTS (5s suppression window) |
|
|
174
|
+
| **Shift+F12** | Read the hotkey list aloud (discoverability without sighted help) |
|
|
243
175
|
|
|
244
|
-
|
|
176
|
+
Every binding prints to stdout first, then layers TTS on top only if an ElevenLabs key is configured — so users running compact-agent alongside their OS-level screen reader get the announcements without paying for TTS.
|
|
245
177
|
|
|
246
|
-
|
|
178
|
+
Key choice rationale: bare F-keys and Shift+F-keys are the only space that's both screen-reader-safe (no Insert / CapsLock / Ctrl+Option modifier collisions with NVDA, JAWS, Narrator, Orca, or VoiceOver) and terminal-safe (no `readline` collisions). F11 and F12 specifically are browser-reserved keys that terminals don't grab.
|
|
247
179
|
|
|
248
|
-
|
|
249
|
-
src/
|
|
250
|
-
├── index.ts # REPL main loop + ~80 slash-command dispatcher
|
|
251
|
-
├── api.ts # OpenAI-compatible client (streaming, retries, 429-aware)
|
|
252
|
-
├── query.ts # Tool-call loop: stream chat → exec tools → feed back results
|
|
253
|
-
├── system-prompt.ts # System prompt assembly (env + mode + rules + ECC skill)
|
|
254
|
-
├── config.ts # ~/.crowcoder/config.json (CROWCODER_HOME-aware)
|
|
255
|
-
├── modes.ts # 8 operation modes — dev/review/tdd/research/plan/debug/architect/hermes
|
|
256
|
-
├── walkthrough.ts # /walkthrough — agent-led tour prompt
|
|
257
|
-
├── ecc.ts # everything-claude-code installer + skill/agent/command loader
|
|
258
|
-
├── stitch.ts # Google Stitch integration (MCP JSON-RPC client + prompt builder)
|
|
259
|
-
├── tools/ # 9 tools — each implements { name, parameters, call(input, cwd) }
|
|
260
|
-
│ ├── bash.ts # Shell exec with timeout, 10 MB buffer
|
|
261
|
-
│ ├── read.ts # Paged file read with size limit
|
|
262
|
-
│ ├── write.ts # File creation/overwrite, auto mkdir
|
|
263
|
-
│ ├── edit.ts # Find/replace with optional replace_all
|
|
264
|
-
│ ├── grep.ts # ripgrep with grep fallback
|
|
265
|
-
│ ├── glob.ts # File pattern matching
|
|
266
|
-
│ ├── list-dir.ts # Directory listing
|
|
267
|
-
│ ├── web-fetch.ts # URL fetch + HTML→text
|
|
268
|
-
│ ├── web-search.ts # DuckDuckGo Lite — no API key
|
|
269
|
-
│ ├── stitch.ts # Google Stitch MCP wrapper (opt-in via /stitch-config)
|
|
270
|
-
│ └── index.ts # ALL_TOOLS registry (stitch only listed when configured)
|
|
271
|
-
├── hooks.ts # PreToolUse / PostToolUse / SessionStart / SessionStop dispatcher
|
|
272
|
-
├── hook-controls.ts # Hook profile system (minimal/standard/strict)
|
|
273
|
-
├── permissions.ts # ask/auto/yolo gating per tool
|
|
274
|
-
├── security.ts # Dangerous-command + secret-write scanner
|
|
275
|
-
├── sessions.ts # ~/.crowcoder/sessions/*.json — save/load/resume
|
|
276
|
-
├── memory.ts # Cross-session project memory
|
|
277
|
-
├── learning.ts # Instincts: pattern extraction, confidence decay, pruning
|
|
278
|
-
├── skills.ts # Skill JSON store + trigger-based auto-injection
|
|
279
|
-
├── skill-create.ts # Distill new skills from git history patterns
|
|
280
|
-
├── orchestration.ts # /orchestrate + /multi-* parallel sub-agent prompts
|
|
281
|
-
├── autonomous-loops.ts # /pr-loop + multi-plan/multi-execute prompts
|
|
282
|
-
├── search-first.ts # /search-first /docs-lookup research-before-code prompts
|
|
283
|
-
├── modes.ts, codemaps.ts, compaction.ts, strategic-compaction.ts
|
|
284
|
-
├── verification.ts # /verify /test-coverage prompts + checkpoint helpers
|
|
285
|
-
├── refactor.ts # /refactor /refactor-clean prompts
|
|
286
|
-
├── evaluation.ts # /review /tdd /security-review /audit /plan prompts
|
|
287
|
-
├── content-engine.ts # /article /slides /investor-deck /chief-of-staff prompts
|
|
288
|
-
├── git-workflow.ts # /commit /pr /diff /log + branch helpers
|
|
289
|
-
├── agents.ts # 10 language-specific review + build-fix prompt builders
|
|
290
|
-
├── cost-tracker.ts # ~/.crowcoder/usage.json — token counts, cost estimates
|
|
291
|
-
├── model-router.ts # /route — complexity-based model switching
|
|
292
|
-
├── docs-sync.ts # /update-docs + project language detection
|
|
293
|
-
├── package-detect.ts # /detect — package manager / test runner / build tool
|
|
294
|
-
├── rules.ts # Language-specific coding rules (loaded into system prompt)
|
|
295
|
-
├── pm2-manager.ts # /pm2 wrapper
|
|
296
|
-
├── theme.ts # TUI colors + splash + banner + tool-call rendering
|
|
297
|
-
├── retry.ts # API call retry with backoff
|
|
298
|
-
├── export.ts # /export md/json/txt
|
|
299
|
-
├── html-parser.ts # HTML→text for web_fetch
|
|
300
|
-
└── types.ts # CrowcoderConfig, Message, Session, Mode types
|
|
301
|
-
|
|
302
|
-
bin/
|
|
303
|
-
└── crowcoder.js # CLI entry — DEP0040 suppress + dynamic import dist/index.js
|
|
304
|
-
|
|
305
|
-
resources/
|
|
306
|
-
└── ecc/ # Bundled everything-claude-code library
|
|
307
|
-
├── skills/ # 33 SKILL.md files (one per skill)
|
|
308
|
-
├── agents/ # 16 kiro agent JSON+MD pairs
|
|
309
|
-
├── commands/ # 9 workflow command prompts
|
|
310
|
-
├── rules/ # 39 language-specific rule files
|
|
311
|
-
└── prompts/ # 6 GitHub prompt files
|
|
312
|
-
|
|
313
|
-
tests/
|
|
314
|
-
├── smoke-commands.mjs # 88-command dispatch smoke test (no LLM calls)
|
|
315
|
-
├── llm-drive-all.mjs # End-to-end LLM driver against a real API
|
|
316
|
-
├── users.test.ts # Vitest unit tests
|
|
317
|
-
└── e2e/ # Playwright E2E
|
|
318
|
-
```
|
|
180
|
+
Voice setup: `/voice config` saves API keys, `/voice on` enables, `/voice test` confirms playback. ffmpeg is required for dictation but optional for TTS-only setups. Speed, voice IDs, and code-skipping behavior are all in `/voice` sub-commands.
|
|
319
181
|
|
|
320
182
|
---
|
|
321
183
|
|
|
322
|
-
##
|
|
184
|
+
## From source
|
|
323
185
|
|
|
324
|
-
|
|
186
|
+
```bash
|
|
187
|
+
git clone https://github.com/Crownelius/compact-agent.git
|
|
188
|
+
cd compact-agent
|
|
189
|
+
npm install
|
|
190
|
+
npm link
|
|
191
|
+
```
|
|
325
192
|
|
|
326
|
-
|
|
327
|
-
- Focused PRs — one thing per PR
|
|
328
|
-
- Conventional Commits (`feat:`, `fix:`, `chore:`, `docs:`)
|
|
329
|
-
- Never commit API keys, tokens, or paths containing your username
|
|
330
|
-
- Run `node tests/smoke-commands.mjs` before submitting — must report `88/88 pass`
|
|
193
|
+
Rebuild after edits with `npm run build` (or `npx tsc`). The `prepare` script also runs `tsc` on `npm install`, so a clean clone produces a working `dist/` without an extra step.
|
|
331
194
|
|
|
332
|
-
|
|
195
|
+
Update: `npm install -g compact-agent@latest`. Uninstall: `npm uninstall -g compact-agent && rm -rf ~/.compact-agent`.
|
|
333
196
|
|
|
334
197
|
---
|
|
335
198
|
|
|
336
|
-
##
|
|
199
|
+
## Contributing
|
|
337
200
|
|
|
338
|
-
|
|
201
|
+
PRs welcome. Strict TypeScript (avoid `any`), one thing per PR, Conventional Commits, no API keys in diffs. Run `node tests/smoke-commands.mjs` before submitting.
|
|
339
202
|
|
|
340
|
-
|
|
341
|
-
- [everything-claude-code](https://github.com/Crownelius/everything-claude-code) — agent harness library
|
|
342
|
-
- [nousresearch/hermes-agent](https://github.com/nousresearch/hermes-agent) — Hermes mode inspiration
|
|
203
|
+
For larger features (new mode, new tool, new orchestration pattern), open an issue first.
|
|
343
204
|
|
|
344
205
|
---
|
|
345
206
|
|
|
346
|
-
|
|
207
|
+
## License
|
|
347
208
|
|
|
348
|
-
|
|
209
|
+
[MIT](LICENSE).
|
|
349
210
|
|
|
350
|
-
|
|
211
|
+
Bundles content from:
|
|
212
|
+
- [everything-claude-code](https://github.com/Crownelius/everything-claude-code) — skill / agent / hook harness
|
|
213
|
+
- [nousresearch/hermes-agent](https://github.com/nousresearch/hermes-agent) — Hermes mode reference
|
|
351
214
|
|
|
352
|
-
|
|
215
|
+
[Bug reports](https://github.com/Crownelius/compact-agent/issues) · [Install guide](INSTALL.md) · [Commands](COMMANDS.md) · [npm](https://www.npmjs.com/package/compact-agent)
|