@aman_asmuei/aman-agent 0.33.9 → 0.39.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 +160 -15
- package/dist/delegate.js.map +1 -1
- package/dist/index.js +1073 -43
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
|
20
|
-
<img src="https://img.shields.io/badge/tests-
|
|
20
|
+
<img src="https://img.shields.io/badge/tests-865_passing-brightgreen?style=for-the-badge&logo=vitest&logoColor=white" alt="865 tests passing" />
|
|
21
21
|
|
|
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>
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
</p>
|
|
40
40
|
|
|
41
41
|
<p align="center">
|
|
42
|
-
<a href="#whats-new-in-
|
|
42
|
+
<a href="#whats-new-in-v0350"><kbd> What's New </kbd></a>
|
|
43
43
|
<a href="#quick-start"><kbd> Quick Start </kbd></a>
|
|
44
44
|
<a href="#project-dev-mode-recommended"><kbd> Dev Mode </kbd></a>
|
|
45
45
|
<a href="#architecture-at-a-glance"><kbd> Architecture </kbd></a>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<details>
|
|
62
62
|
<summary><strong>Table of Contents</strong></summary>
|
|
63
63
|
|
|
64
|
-
- [What's New](#whats-new-in-
|
|
64
|
+
- [What's New](#whats-new-in-v0350)
|
|
65
65
|
- [The Problem](#the-problem)
|
|
66
66
|
- [The Solution](#the-solution)
|
|
67
67
|
- [Architecture at a Glance](#architecture-at-a-glance)
|
|
@@ -97,6 +97,129 @@
|
|
|
97
97
|
|
|
98
98
|
---
|
|
99
99
|
|
|
100
|
+
## What's New in v0.35.0
|
|
101
|
+
|
|
102
|
+
> **From companion to orchestrator.**
|
|
103
|
+
|
|
104
|
+
### DAG-Based Task Orchestration Engine
|
|
105
|
+
|
|
106
|
+
aman-agent can now decompose complex requirements into parallel task graphs and execute them with multiple specialized agents:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
/orchestrate Build a REST API with auth, CRUD endpoints, input validation, and tests
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
Decomposing requirement into task DAG...
|
|
114
|
+
|
|
115
|
+
## REST API with Auth
|
|
116
|
+
**Goal:** Build authenticated REST API with full test coverage
|
|
117
|
+
**Tasks:** 5 | **Gates:** 1
|
|
118
|
+
|
|
119
|
+
- **Design API schema** → architect [advanced] (root)
|
|
120
|
+
- **Implement auth middleware** → coder [standard] (after: design)
|
|
121
|
+
- **Implement CRUD endpoints** → coder [standard] (after: design)
|
|
122
|
+
- **Write test suite** → tester [standard] (after: auth, crud)
|
|
123
|
+
- **Security review** → security [standard] (after: tests)
|
|
124
|
+
- 🔒 **Human approval before deploy** [approval]
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
| Feature | Details |
|
|
128
|
+
|:---|:---|
|
|
129
|
+
| **DAG scheduler** | Parallel execution of independent tasks, respects dependency ordering |
|
|
130
|
+
| **Multi-tier model routing** | Routes tasks to fast/standard/advanced LLM tiers by complexity |
|
|
131
|
+
| **Human approval gates** | Pauses orchestration at critical points for human review |
|
|
132
|
+
| **Structured audit trail** | Every state transition logged with timestamps and context |
|
|
133
|
+
| **LLM decomposition** | Natural language requirements → validated task DAGs via your LLM |
|
|
134
|
+
| **Immutable state machine** | Correctness-critical orchestration lifecycle with 40+ transition tests |
|
|
135
|
+
|
|
136
|
+
New module: `src/orchestrator/` (8 files, 114 tests).
|
|
137
|
+
|
|
138
|
+
### GitHub-Native Automation (Phase 2)
|
|
139
|
+
|
|
140
|
+
aman-agent now speaks GitHub natively. Issues become orchestration plans, CI status gates your workflow, and PRs get created automatically:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
/github plan 42 # Decompose issue #42 into a task DAG
|
|
144
|
+
/github issues # List open issues
|
|
145
|
+
/github prs # List open PRs
|
|
146
|
+
/github ci main # Check CI status for a branch
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
| Feature | Details |
|
|
150
|
+
|:---|:---|
|
|
151
|
+
| **Issue-to-DAG pipeline** | Fetch any GitHub issue and decompose it into an orchestrator task DAG via your LLM |
|
|
152
|
+
| **PR automation** | Create branches, open PRs, post review comments — all via `gh` CLI |
|
|
153
|
+
| **CI gate polling** | Poll workflow run status, wait for CI to pass before proceeding |
|
|
154
|
+
| **Safe CLI wrapper** | All `gh` commands use `execFile` (no shell) — immune to command injection |
|
|
155
|
+
| **Repo-aware config** | Optional `github` config block for default repo, branch, and auto-PR settings |
|
|
156
|
+
|
|
157
|
+
New module: `src/github/` (6 files, 64 tests).
|
|
158
|
+
|
|
159
|
+
### Agent Factory Profiles & Templates (Phase 3)
|
|
160
|
+
|
|
161
|
+
Specialized agent profiles power the orchestrator's multi-agent delegation. Each profile is tuned for its role:
|
|
162
|
+
|
|
163
|
+
| Profile | Tier | Role |
|
|
164
|
+
|:---|:---|:---|
|
|
165
|
+
| **Architect** | advanced | System design, module decomposition, interface planning |
|
|
166
|
+
| **Security** | standard | OWASP review, CVE audit, secrets detection, vulnerability triage |
|
|
167
|
+
| **Tester** | standard | Test generation, edge case identification, coverage analysis |
|
|
168
|
+
| **Reviewer** | standard | Code review with confidence-scored findings (critical/important/suggestion) |
|
|
169
|
+
|
|
170
|
+
Pre-built orchestration templates for common workflows:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Available templates:
|
|
174
|
+
fullFeatureTemplate # architect → parallel coders → review + test → finalize
|
|
175
|
+
bugFixTemplate # reproduce → fix → test → review
|
|
176
|
+
securityAuditTemplate # scan → triage → [approval gate] → fix → rescan → review
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Self-review loop: after orchestration completes, reviewer + tester agents automatically evaluate the output before marking success.
|
|
180
|
+
|
|
181
|
+
New modules: `src/profiles/` (1 file), `src/orchestrator/templates/` (1 file), `src/orchestrator/review-loop.ts`. 49 new tests.
|
|
182
|
+
|
|
183
|
+
### Universal Project Manager (Phase 4)
|
|
184
|
+
|
|
185
|
+
aman-agent now understands your project type and structures orchestration accordingly:
|
|
186
|
+
|
|
187
|
+
| Feature | Details |
|
|
188
|
+
|:---|:---|
|
|
189
|
+
| **Project classification** | Auto-detects project type (web-frontend, api-backend, mobile, ml-data, monorepo, etc.) from stack profile |
|
|
190
|
+
| **Template mapping** | Maps project type → recommended orchestration template and agent profiles |
|
|
191
|
+
| **Module boundary mapping** | Analyzes directory structure to assign non-overlapping file regions for parallel agents |
|
|
192
|
+
| **Orchestration monitoring** | Structured metrics: phase timing, per-agent performance, approval gate tracking, formatted summaries |
|
|
193
|
+
|
|
194
|
+
New module: `src/project/` (4 files, 33 tests).
|
|
195
|
+
|
|
196
|
+
### Enterprise Hardening (Phase 5)
|
|
197
|
+
|
|
198
|
+
Production-grade reliability and governance for orchestration at scale:
|
|
199
|
+
|
|
200
|
+
| Feature | Details |
|
|
201
|
+
|:---|:---|
|
|
202
|
+
| **Circuit breaker** | Per-agent failure tracking with closed/open/half-open states. Prevents cascade failures when an agent is consistently failing. Auto-recovers after cooldown. |
|
|
203
|
+
| **Checkpoint/resume** | Serialize full orchestration state to disk. Resume from crash — no lost progress on long-running orchestrations. |
|
|
204
|
+
| **Cost tracker** | Token counting per LLM tier with budget enforcement. Tracks input/output tokens, estimates cost using tier-specific rates, blocks over-budget orchestrations. |
|
|
205
|
+
| **Policy engine** | 7 built-in rules: max task count, requires review/testing, no orphan nodes, approval before deploy, advanced tier awareness, max depth. Custom rules supported. |
|
|
206
|
+
|
|
207
|
+
All Phase 5 modules integrated into the orchestrator public API. 60 new tests. The [Universal Master Orchestrator](docs/superpowers/plans/2026-04-12-master-orchestrator-architecture.md) vision is now complete.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
<details>
|
|
212
|
+
<summary><strong>v0.34.0 — Multi-editor dev mode</strong></summary>
|
|
213
|
+
|
|
214
|
+
- `aman-agent dev --copilot` targets GitHub Copilot (writes `.github/copilot-instructions.md`)
|
|
215
|
+
- `aman-agent dev --cursor` targets Cursor (writes `.cursorrules`)
|
|
216
|
+
- Multi-project simultaneous sessions sharing the same memory database
|
|
217
|
+
|
|
218
|
+
</details>
|
|
219
|
+
|
|
220
|
+
<details>
|
|
221
|
+
<summary><strong>v0.33.0 — Project Dev Mode</strong></summary>
|
|
222
|
+
|
|
100
223
|
## What's New in v0.33.0
|
|
101
224
|
|
|
102
225
|
> **One command. Full context. Zero setup.**
|
|
@@ -121,15 +244,17 @@ $ aman-agent dev ~/projects/amantrade
|
|
|
121
244
|
|
|
122
245
|
| Flag | What it does |
|
|
123
246
|
|:---|:---|
|
|
124
|
-
| `--smart` | Use your configured LLM to synthesize a smarter
|
|
125
|
-
| `--yolo` | Launch
|
|
126
|
-
| `--
|
|
247
|
+
| `--smart` | Use your configured LLM to synthesize a smarter context file |
|
|
248
|
+
| `--yolo` | Launch with skip-permissions (Claude Code only) |
|
|
249
|
+
| `--copilot` | Target GitHub Copilot — writes `.github/copilot-instructions.md`, opens VS Code |
|
|
250
|
+
| `--cursor` | Target Cursor — writes `.cursorrules`, opens Cursor |
|
|
251
|
+
| `--no-launch` | Generate context file only, don't launch editor |
|
|
127
252
|
| `--diff` | Preview what would change without writing |
|
|
128
|
-
| `--force` | Regenerate even if
|
|
253
|
+
| `--force` | Regenerate even if context file is fresh |
|
|
129
254
|
|
|
130
255
|
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.
|
|
131
256
|
|
|
132
|
-
|
|
257
|
+
</details>
|
|
133
258
|
|
|
134
259
|
<details>
|
|
135
260
|
<summary><strong>v0.32.0 — Install anywhere, zero prerequisites</strong></summary>
|
|
@@ -235,7 +360,7 @@ npx @aman_asmuei/aman-agent
|
|
|
235
360
|
|
|
236
361
|
## Architecture at a Glance
|
|
237
362
|
|
|
238
|
-
aman-agent is the **runtime** at the center of the aman ecosystem —
|
|
363
|
+
aman-agent is the **runtime** at the center of the aman ecosystem — 52 focused TypeScript modules that stitch together 7 portable memory/identity/skill layers with any LLM you want.
|
|
239
364
|
|
|
240
365
|
```mermaid
|
|
241
366
|
flowchart LR
|
|
@@ -243,6 +368,7 @@ flowchart LR
|
|
|
243
368
|
|
|
244
369
|
CLI --> Agent[agent.ts<br/>message orchestration]
|
|
245
370
|
Agent --> Hooks[hooks.ts<br/>lifecycle events]
|
|
371
|
+
Agent --> Orch[orchestrator/<br/>DAG scheduler]
|
|
246
372
|
|
|
247
373
|
Agent -->|recall & extract| Memory[(amem-core<br/>SQLite + vectors)]
|
|
248
374
|
Agent -->|who & prefs| Identity[(acore-core<br/>identity)]
|
|
@@ -250,6 +376,9 @@ flowchart LR
|
|
|
250
376
|
Agent -->|auto-trigger| Skills[skill-engine<br/>+ crystallization]
|
|
251
377
|
Agent -->|telemetry| Obs[observation<br/>+ postmortem]
|
|
252
378
|
|
|
379
|
+
Orch -->|delegate tasks| Delegate[delegate.ts<br/>+ teams.ts]
|
|
380
|
+
Orch -->|tier routing| LLM
|
|
381
|
+
|
|
253
382
|
Agent --> LLM{LLM Router}
|
|
254
383
|
LLM --> Claude[Anthropic]
|
|
255
384
|
LLM --> GPT[OpenAI]
|
|
@@ -261,9 +390,11 @@ flowchart LR
|
|
|
261
390
|
classDef core fill:#58a6ff22,stroke:#58a6ff,color:#e6edf3,stroke-width:2px;
|
|
262
391
|
classDef store fill:#3fb95022,stroke:#3fb950,color:#e6edf3,stroke-width:2px;
|
|
263
392
|
classDef llm fill:#d29f2222,stroke:#d29f22,color:#e6edf3,stroke-width:1px;
|
|
393
|
+
classDef orch fill:#a371f722,stroke:#a371f7,color:#e6edf3,stroke-width:2px;
|
|
264
394
|
class CLI,Agent,Hooks,Skills,Obs core
|
|
265
395
|
class Memory,Identity,Rules store
|
|
266
396
|
class Claude,GPT,Copilot,Ollama,LLM llm
|
|
397
|
+
class Orch,Delegate orch
|
|
267
398
|
```
|
|
268
399
|
|
|
269
400
|
<details>
|
|
@@ -272,7 +403,11 @@ flowchart LR
|
|
|
272
403
|
| Piece | What it does | Where it lives |
|
|
273
404
|
|:---|:---|:---|
|
|
274
405
|
| `agent.ts` | The main event loop — reads your message, recalls memories, streams the LLM response, executes tools, extracts new memories | `src/agent.ts` (40 KB) |
|
|
275
|
-
| `commands.ts` |
|
|
406
|
+
| `commands.ts` | 60+ slash commands (`/memory`, `/skills`, `/plan`, `/delegate`, `/orchestrate`, `/eval`, `/observe`, `/postmortem`, …) | `src/commands.ts` (100 KB) |
|
|
407
|
+
| `orchestrator/` | DAG-based task decomposition, parallel scheduling, multi-tier model routing, approval gates, audit trails | `src/orchestrator/` (8 files) |
|
|
408
|
+
| `github/` | GitHub-native automation — issue planning, PR management, CI gates, safe `gh` CLI wrapper | `src/github/` (6 files) |
|
|
409
|
+
| `profiles/` | Specialized agent profiles for orchestrator delegation (architect, security, tester, reviewer) | `src/profiles/` |
|
|
410
|
+
| `orchestrator/templates/` | Pre-built DAG templates for common workflows (full-feature, bug-fix, security-audit) | `src/orchestrator/templates/` |
|
|
276
411
|
| `hooks.ts` | 5 lifecycle hooks that fire at startup, before/after tools, on workflow match, on session end | `src/hooks.ts` (26 KB) |
|
|
277
412
|
| `memory.ts` + `memory-extractor.ts` | Per-message recall and silent, non-blocking extraction of preferences, decisions, patterns, corrections | delegates to `@aman_asmuei/amem-core@0.5` |
|
|
278
413
|
| `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` |
|
|
@@ -407,14 +542,22 @@ aman-agent dev --smart
|
|
|
407
542
|
|
|
408
543
|
The LLM merges related corrections into single convention statements and removes redundancy. Falls back to template mode automatically if the LLM call fails.
|
|
409
544
|
|
|
410
|
-
**
|
|
545
|
+
**Multi-editor support** — Same memory, any editor:
|
|
411
546
|
|
|
412
547
|
```bash
|
|
413
|
-
aman-agent dev
|
|
414
|
-
aman-agent dev --
|
|
548
|
+
aman-agent dev # Claude Code (default) → CLAUDE.md
|
|
549
|
+
aman-agent dev --copilot # VS Code + Copilot → .github/copilot-instructions.md
|
|
550
|
+
aman-agent dev --cursor # Cursor → .cursorrules
|
|
415
551
|
```
|
|
416
552
|
|
|
417
|
-
|
|
553
|
+
All three use the same pipeline: stack detection → amem recall → context assembly. Only the output file and launcher differ.
|
|
554
|
+
|
|
555
|
+
**Yolo mode** — Full autonomous, no permission prompts (Claude Code only):
|
|
556
|
+
|
|
557
|
+
```bash
|
|
558
|
+
aman-agent dev --yolo # skip permissions
|
|
559
|
+
aman-agent dev --yolo --smart # skip permissions + LLM-generated context
|
|
560
|
+
```
|
|
418
561
|
|
|
419
562
|
**Multi-project workflow** — Each terminal is independent:
|
|
420
563
|
|
|
@@ -1367,7 +1510,7 @@ sequenceDiagram
|
|
|
1367
1510
|
| Command | Description |
|
|
1368
1511
|
|:---|:---|
|
|
1369
1512
|
| `aman-agent` | Start interactive chat session |
|
|
1370
|
-
| `aman-agent dev [path]` | Scan project, generate
|
|
1513
|
+
| `aman-agent dev [path]` | Scan project, generate context, launch editor `[--smart\|--yolo\|--copilot\|--cursor\|--no-launch\|--force\|--diff]` |
|
|
1371
1514
|
| `aman-agent init` | Set up your AI companion with a guided wizard |
|
|
1372
1515
|
| `aman-agent serve` | Run as a local MCP server for agent delegation `[--name\|--profile]` |
|
|
1373
1516
|
| `aman-agent setup` | Full reconfiguration wizard |
|
|
@@ -1381,6 +1524,8 @@ sequenceDiagram
|
|
|
1381
1524
|
| `/help` | Show available commands |
|
|
1382
1525
|
| `/plan` | Show active plan `[create\|done\|undo\|list\|switch\|show]` |
|
|
1383
1526
|
| `/profile` | Your profile + agent profiles `[me\|edit\|setup\|create\|list\|show\|delete]` |
|
|
1527
|
+
| `/orchestrate` | Decompose requirement into task DAG and execute with parallel agents `[<requirement>]` |
|
|
1528
|
+
| `/github` | GitHub operations `[issues\|prs\|plan <number>\|ci <branch>]` |
|
|
1384
1529
|
| `/delegate` | Delegate task to a profile `[<profile> <task>\|pipeline]` |
|
|
1385
1530
|
| `/agents` | Multi-agent A2A `[list\|info <name>\|ping <name>]` |
|
|
1386
1531
|
| `/team` | Manage agent teams `[create\|run\|list\|show\|delete]` |
|