@aman_asmuei/aman-agent 0.32.0 → 0.33.1

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 CHANGED
@@ -17,7 +17,7 @@
17
17
   
18
18
  <a href="https://github.com/amanasmuei/aman-agent/actions"><img src="https://img.shields.io/github/actions/workflow/status/amanasmuei/aman-agent/ci.yml?style=for-the-badge&logo=github&label=CI" alt="CI status" /></a>
19
19
  &nbsp;
20
- <img src="https://img.shields.io/badge/tests-490_passing-brightgreen?style=for-the-badge&logo=vitest&logoColor=white" alt="490 tests passing" />
20
+ <img src="https://img.shields.io/badge/tests-531_passing-brightgreen?style=for-the-badge&logo=vitest&logoColor=white" alt="531 tests passing" />
21
21
  &nbsp;
22
22
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="MIT License" /></a>
23
23
  </p>
@@ -27,7 +27,7 @@
27
27
  &nbsp;
28
28
  <img src="https://img.shields.io/badge/typescript-strict-3178c6?style=flat-square&logo=typescript&logoColor=white" alt="Strict TypeScript" />
29
29
  &nbsp;
30
- <img src="https://img.shields.io/badge/bundle-340_KB-informational?style=flat-square" alt="Bundle size: 340 KB" />
30
+ <img src="https://img.shields.io/badge/bundle-384_KB-informational?style=flat-square" alt="Bundle size: 384 KB" />
31
31
  &nbsp;
32
32
  <img src="https://img.shields.io/badge/LLMs-6_providers-8a2be2?style=flat-square" alt="6 LLM providers" />
33
33
  &nbsp;
@@ -39,7 +39,9 @@
39
39
  </p>
40
40
 
41
41
  <p align="center">
42
+ <a href="#whats-new-in-v0330"><kbd> What's New </kbd></a>
42
43
  <a href="#quick-start"><kbd> Quick Start </kbd></a>
44
+ <a href="#project-dev-mode-recommended"><kbd> Dev Mode </kbd></a>
43
45
  <a href="#architecture-at-a-glance"><kbd> Architecture </kbd></a>
44
46
  <a href="#features"><kbd> Features </kbd></a>
45
47
  <a href="#commands"><kbd> Commands </kbd></a>
@@ -59,12 +61,13 @@
59
61
  <details>
60
62
  <summary><strong>Table of Contents</strong></summary>
61
63
 
62
- - [What's New](#whats-new-in-v0300)
64
+ - [What's New](#whats-new-in-v0330)
63
65
  - [The Problem](#the-problem)
64
66
  - [The Solution](#the-solution)
65
67
  - [Architecture at a Glance](#architecture-at-a-glance)
66
68
  - [Quick Start](#quick-start)
67
69
  - [Usage Guide](#usage-guide)
70
+ - [Project Dev Mode](#project-dev-mode-recommended)
68
71
  - [Your First Conversation](#your-first-conversation)
69
72
  - [How Memory Works](#how-memory-works)
70
73
  - [Files & Images](#working-with-files--images)
@@ -94,42 +97,69 @@
94
97
 
95
98
  ---
96
99
 
97
- ## What's New in v0.31.0
100
+ ## What's New in v0.33.0
98
101
 
99
- > **Multi-agent (A2A) via MCP server mode.**<br/>
100
- > Multiple `aman-agent` instances on the same machine can now discover each other via a local registry and delegate tasks to each other over the MCP protocol. No new wire format, no broker, no new runtime daemon.
102
+ > **One command. Full context. Zero setup.**
101
103
 
102
- <table>
103
- <tr>
104
- <td width="33%" valign="top">
104
+ ### `aman-agent dev` — Your New Way to Start Coding
105
105
 
106
- **`aman-agent serve`**
106
+ ```bash
107
+ cd ~/projects/amantrade && aman-agent dev
108
+ ```
107
109
 
108
- Run any profile as a local MCP server. Registers in `~/.aman-agent/registry.json` (mode `0600`), exposes `agent.info`, `agent.delegate`, and `agent.send` tools over localhost HTTP with bearer auth.
110
+ Open any project, and aman-agent **automatically detects your stack**, **recalls your past decisions from memory**, and **generates a project-specific CLAUDE.md** then launches Claude Code with everything loaded. No more re-explaining yourself.
111
+
112
+ ```
113
+ $ aman-agent dev ~/projects/amantrade
109
114
 
110
- </td>
111
- <td width="33%" valign="top">
115
+ Detected: Go (Fiber) + Postgresql + Docker + Github-actions
116
+ Recalled: 8 memories (4 decisions, 3 corrections, 1 convention)
117
+ ✓ CLAUDE.md written (template mode)
112
118
 
113
- **`/delegate @coder <task>`**
119
+ Launching Claude Code...
120
+ ```
114
121
 
115
- From any other `aman-agent`, delegate to a running serve instance by handle. The `@`-prefix routes through `delegateRemote` which dials via `StreamableHTTPClientTransport` using the bearer from the registry.
122
+ | Flag | What it does |
123
+ |:---|:---|
124
+ | `--smart` | Use your configured LLM to synthesize a smarter CLAUDE.md |
125
+ | `--no-launch` | Generate CLAUDE.md only, don't start Claude Code |
126
+ | `--diff` | Preview what would change without writing |
127
+ | `--force` | Regenerate even if CLAUDE.md is fresh |
116
128
 
117
- </td>
118
- <td width="33%" valign="top">
129
+ Works with **multiple projects** simultaneously — each terminal gets its own `aman-agent dev`, all sharing the same memory database. Decisions from one project flow into the next.
119
130
 
120
- **`/agents list|info|ping`**
131
+ ---
121
132
 
122
- Discover, inspect, and latency-check every agent currently running on this machine. `/agents list` merges local registry entries with remotes (local wins on name collision).
133
+ <details>
134
+ <summary><strong>v0.32.0 — Install anywhere, zero prerequisites</strong></summary>
123
135
 
124
- </td>
125
- </tr>
126
- </table>
136
+ ### Install on any machine — no Node.js required
137
+
138
+ ```bash
139
+ curl -fsSL https://raw.githubusercontent.com/amanasmuei/aman-agent/main/install.sh | bash
140
+ ```
141
+
142
+ Works on **Linux** (x64, arm64, armv7l), **macOS** (x64, Apple Silicon), **Raspberry Pi**, **VPS**, and **servers**. Vendors Node.js 22 LTS invisibly. No sudo needed.
143
+
144
+ | Feature | Details |
145
+ |:---|:---|
146
+ | **Consolidated config** | All state now lives under `~/.aman-agent/` — one directory to backup, sync, or `scp` to a new machine. Existing users are auto-migrated on first run. |
147
+ | **Docker support** | `docker run -it -e ANTHROPIC_API_KEY=sk-... ghcr.io/amanasmuei/aman-agent` — multi-arch image (amd64 + arm64). |
148
+ | **`aman-agent setup`** | Full configuration wizard — provider, identity, and presets. |
149
+ | **`aman-agent update`** | Self-update, works with both vendored and npm installs. |
150
+ | **`aman-agent uninstall`** | Clean removal of all data and config. |
151
+ | **Headless mode** | Auto-detects LLM provider from env vars. Clean error when no TTY (systemd, Docker, CI). |
127
152
 
128
- See the [Multi-agent (A2A)](#multi-agent-a2a) section below for the full walkthrough.
153
+ </details>
129
154
 
130
155
  <details>
131
156
  <summary><strong>Highlights from earlier releases</strong></summary>
132
157
 
158
+ **v0.31 — Multi-agent (A2A) via MCP server mode**
159
+ - `aman-agent serve` runs any profile as a local MCP server
160
+ - `/delegate @coder <task>` for cross-agent delegation
161
+ - `/agents list|info|ping` for discovery and health checks
162
+
133
163
  **v0.30 — Agent hardening**
134
164
  - Delegation confirmation prompts (no more silent sub-agents)
135
165
  - Persistent background task state surviving crashes
@@ -247,6 +277,7 @@ flowchart LR
247
277
  | `skill-engine.ts` + `crystallization.ts` | Auto-triggers domain skills from context; promotes post-mortem lessons into reusable, versioned skills | `src/skill-engine.ts`, `src/crystallization.ts` |
248
278
  | `user-model.ts` + `personality.ts` | Cross-session trust (EMA), sentiment baseline, burnout risk, time-of-day tone shifts, wellbeing nudges | `src/user-model.ts`, `src/personality.ts` |
249
279
  | `observation.ts` + `postmortem.ts` | Passive session telemetry + LLM-generated structured post-mortems on session end | `src/observation.ts`, `src/postmortem.ts` |
280
+ | `dev/` | Project stack detection, context assembly, CLAUDE.md generation — powers `aman-agent dev` | `src/dev/` |
250
281
  | `llm/` | 6 pluggable providers — Anthropic, OpenAI, Ollama, GitHub Copilot, OpenAI-compatible, Claude Code CLI | `src/llm/` |
251
282
  | `mcp/` | MCP v1.27 client with stdio transport and auto-reconnect | `src/mcp/` |
252
283
 
@@ -274,7 +305,11 @@ docker run -it -e ANTHROPIC_API_KEY=sk-... ghcr.io/amanasmuei/aman-agent
274
305
  ### 2. Run
275
306
 
276
307
  ```bash
308
+ # Start a conversation
277
309
  aman-agent
310
+
311
+ # Or jump straight into a project with full context
312
+ aman-agent dev ~/projects/my-app
278
313
  ```
279
314
 
280
315
  **Zero config if you already have an API key in your environment:**
@@ -336,6 +371,70 @@ aman-agent --budget 12000
336
371
  A step-by-step walkthrough of how to use aman-agent day-to-day. Click any section below to expand.
337
372
 
338
373
  <details open>
374
+ <summary><strong>Project Dev Mode (recommended)</strong></summary>
375
+
376
+ ### Project Dev Mode
377
+
378
+ The fastest way to start working on any project. One command sets up everything:
379
+
380
+ ```bash
381
+ aman-agent dev
382
+ ```
383
+
384
+ **What happens:**
385
+
386
+ 1. **Stack Detection** — Scans your project directory for `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`, `pubspec.yaml`, `docker-compose.yml`, `.github/workflows/`, and more
387
+ 2. **Memory Recall** — Queries your amem database for past decisions, corrections, and conventions related to this project and stack
388
+ 3. **Context Assembly** — Pulls your identity (acore), guardrails (arules), and developer preferences into a structured CLAUDE.md
389
+ 4. **Auto-Launch** — Launches Claude Code in the project directory with full context loaded
390
+
391
+ ```
392
+ $ aman-agent dev ~/projects/amantrade
393
+
394
+ Detected: Go (Fiber) + Postgresql + Docker + Github-actions
395
+ Recalled: 8 memories (4 decisions, 3 corrections, 1 convention)
396
+ ✓ CLAUDE.md written (template mode)
397
+
398
+ Launching Claude Code...
399
+ ```
400
+
401
+ **Smart mode** — Use your LLM to synthesize a more tailored CLAUDE.md:
402
+
403
+ ```bash
404
+ aman-agent dev --smart
405
+ ```
406
+
407
+ The LLM merges related corrections into single convention statements and removes redundancy. Falls back to template mode automatically if the LLM call fails.
408
+
409
+ **Multi-project workflow** — Each terminal is independent:
410
+
411
+ ```bash
412
+ # Terminal 1
413
+ aman-agent dev ~/projects/amantrade
414
+
415
+ # Terminal 2
416
+ aman-agent dev ~/projects/aman-mcp
417
+
418
+ # Terminal 3
419
+ aman-agent dev ~/projects/new-api
420
+ ```
421
+
422
+ All three share the same amem database. A decision you make in one project is available to the others on next run.
423
+
424
+ **Staleness detection** — If you've made new decisions since the last CLAUDE.md generation, `aman-agent dev` auto-updates it and shows you what changed:
425
+
426
+ ```
427
+ ✓ CLAUDE.md updated (3 changes)
428
+ + Added: zerolog convention (from correction 2026-04-10)
429
+ + Added: rate limiting at gateway level (from decision 2026-04-11)
430
+ - Removed: slog preference (superseded by zerolog correction)
431
+ ```
432
+
433
+ If the CLAUDE.md is still fresh, it skips regeneration and launches Claude Code immediately.
434
+
435
+ </details>
436
+
437
+ <details>
339
438
  <summary><strong>Your First Conversation</strong></summary>
340
439
 
341
440
  ### Your First Conversation
@@ -928,25 +1027,32 @@ Here's what a typical day looks like with aman-agent:
928
1027
 
929
1028
  ```
930
1029
  Morning:
931
- $ cd ~/project && aman-agent
932
- Loads project context, active plan, memories
1030
+ $ aman-agent dev ~/projects/amantrade
1031
+ Detects stack: Go (Fiber) + PostgreSQL + Docker
1032
+ → Recalls 12 memories (decisions, conventions, corrections)
1033
+ → Generates project-specific CLAUDE.md
1034
+ → Launches Claude Code — full context loaded, zero re-explaining
933
1035
  → "Welcome back. You're on step 3 of Auth API."
934
- → Work on your plan, skills auto-activate as needed
935
- /plan done after each step, commit your work
1036
+
1037
+ # Working on a second project in parallel?
1038
+ $ aman-agent dev ~/projects/aman-mcp # new terminal
1039
+ → Same memory database, different project context
1040
+ → Decisions from amantrade are available here too
936
1041
 
937
1042
  Afternoon:
1043
+ → Work on your plan, skills auto-activate as needed
1044
+ → /plan done after each step, commit your work
938
1045
  → Personality shifts to steady pace
939
- → Skills level up as you demonstrate mastery
940
- → Knowledge library suggests snippets when relevant
941
1046
 
942
1047
  Evening:
943
1048
  → /quit or Ctrl+C
944
1049
  → Session auto-saved to memory
945
- → Project context.md updated
946
1050
  → Plan progress persisted
947
1051
  → Optional quick session rating
948
1052
 
949
1053
  Next morning:
1054
+ $ aman-agent dev # in any project
1055
+ → CLAUDE.md auto-updates if new memories exist
950
1056
  → Everything picks up where you left off
951
1057
  ```
952
1058
 
@@ -1246,6 +1352,20 @@ sequenceDiagram
1246
1352
 
1247
1353
  ## Commands
1248
1354
 
1355
+ ### CLI Commands
1356
+
1357
+ | Command | Description |
1358
+ |:---|:---|
1359
+ | `aman-agent` | Start interactive chat session |
1360
+ | `aman-agent dev [path]` | Scan project, generate CLAUDE.md, launch Claude Code `[--smart\|--no-launch\|--force\|--diff]` |
1361
+ | `aman-agent init` | Set up your AI companion with a guided wizard |
1362
+ | `aman-agent serve` | Run as a local MCP server for agent delegation `[--name\|--profile]` |
1363
+ | `aman-agent setup` | Full reconfiguration wizard |
1364
+ | `aman-agent update` | Self-update to latest version |
1365
+ | `aman-agent uninstall` | Clean removal of all data and config |
1366
+
1367
+ ### Slash Commands (inside a session)
1368
+
1249
1369
  | Command | Description |
1250
1370
  |:---|:---|
1251
1371
  | `/help` | Show available commands |