@aman_asmuei/aman-agent 0.39.0 → 0.41.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 CHANGED
@@ -8,8 +8,8 @@
8
8
  <h1 align="center">aman-agent</h1>
9
9
 
10
10
  <p align="center">
11
- <strong>The AI companion that actually remembers you.</strong><br/>
12
- <sub>Learns from every conversation. Recalls what matters. Runs locally. Works with any LLM.</sub>
11
+ <strong>The AI companion that remembers you — and orchestrates your entire dev workflow.</strong><br/>
12
+ <sub>Per-message memory. Multi-agent orchestration. GitHub-native. Runs locally. Any LLM.</sub>
13
13
  </p>
14
14
 
15
15
  <p align="center">
@@ -17,7 +17,7 @@
17
17
  &nbsp;
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-865_passing-brightgreen?style=for-the-badge&logo=vitest&logoColor=white" alt="865 tests passing" />
20
+ <img src="https://img.shields.io/badge/tests-917_passing-brightgreen?style=for-the-badge&logo=vitest&logoColor=white" alt="917 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-384_KB-informational?style=flat-square" alt="Bundle size: 384 KB" />
30
+ <img src="https://img.shields.io/badge/bundle-388_KB-informational?style=flat-square" alt="Bundle size: 388 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,7 @@
39
39
  </p>
40
40
 
41
41
  <p align="center">
42
- <a href="#whats-new-in-v0350"><kbd> What's New </kbd></a>
42
+ <a href="#whats-new-in-v0390"><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-v0350)
64
+ - [What's New](#whats-new-in-v0390)
65
65
  - [The Problem](#the-problem)
66
66
  - [The Solution](#the-solution)
67
67
  - [Architecture at a Glance](#architecture-at-a-glance)
@@ -78,6 +78,8 @@
78
78
  - [Customization](#customization)
79
79
  - [Showcase Templates](#showcase-templates)
80
80
  - [Profiles](#your-profile-vs-agent-profiles)
81
+ - [Task Orchestration](#task-orchestration)
82
+ - [GitHub Automation](#github-automation)
81
83
  - [Delegation](#agent-delegation)
82
84
  - [Teams](#agent-teams)
83
85
  - [Multi-agent (A2A)](#multi-agent-a2a)
@@ -97,23 +99,16 @@
97
99
 
98
100
  ---
99
101
 
100
- ## What's New in v0.35.0
102
+ ## What's New in v0.39.0
101
103
 
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:
104
+ > **From companion to orchestrator.** Describe what you want to build — aman-agent decomposes it, delegates to specialized agents, and delivers reviewed results.
107
105
 
108
106
  ```bash
109
107
  /orchestrate Build a REST API with auth, CRUD endpoints, input validation, and tests
110
108
  ```
111
109
 
112
110
  ```
113
- Decomposing requirement into task DAG...
114
-
115
111
  ## REST API with Auth
116
- **Goal:** Build authenticated REST API with full test coverage
117
112
  **Tasks:** 5 | **Gates:** 1
118
113
 
119
114
  - **Design API schema** → architect [advanced] (root)
@@ -124,87 +119,32 @@ Decomposing requirement into task DAG...
124
119
  - 🔒 **Human approval before deploy** [approval]
125
120
  ```
126
121
 
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
- ```
122
+ Five new modules shipped as the Universal Master Orchestrator:
148
123
 
149
- | Feature | Details |
124
+ | Phase | What it adds |
150
125
  |:---|:---|
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:
126
+ | **1. Orchestrator Engine** | DAG scheduler, multi-tier LLM routing (fast/standard/advanced), approval gates, audit trails |
127
+ | **2. GitHub-Native** | `/github plan 42` turns issues into DAGs, auto PRs, CI gate polling, safe `gh` CLI wrapper |
128
+ | **3. Agent Factory** | 4 profiles (architect, security, tester, reviewer), 3 workflow templates, self-review loop |
129
+ | **4. Project Manager** | Auto-classifies project type, maps module boundaries for parallel agents, orchestration monitoring |
130
+ | **5. Enterprise** | Circuit breakers, checkpoint/resume, cost tracking with budget enforcement, 7-rule policy engine |
162
131
 
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
- ```
132
+ **+334 tests** (867 total) across 25 new source files. [Full release notes →](https://github.com/amanasmuei/aman-agent/releases/tag/v0.39.0)
178
133
 
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:
134
+ <details>
135
+ <summary><strong>Phase-by-phase details</strong></summary>
186
136
 
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 |
137
+ **Orchestrator Engine** Decomposes requirements into a validated DAG (directed acyclic graph) via your LLM. Scheduler runs parallel branches respecting dependencies, pauses at human approval gates, routes each task to the right LLM tier. Immutable state machine prevents invalid transitions. Structured audit trail logs every event.
193
138
 
194
- New module: `src/project/` (4 files, 33 tests).
139
+ **GitHub-Native Automation** — `/github plan <issue#>` fetches an issue and decomposes it. `/github ci <branch>` polls workflow status. PR manager creates branches, opens PRs, and posts review comments. All commands use `execFile` (no shell injection).
195
140
 
196
- ### Enterprise Hardening (Phase 5)
141
+ **Agent Factory** Four specialized profiles: **Architect** (system design, tier: advanced), **Security** (OWASP, CVE audit), **Tester** (test generation, edge cases), **Reviewer** (confidence-scored findings). Three DAG templates: `fullFeatureTemplate` (architect → coders → review + test → finalize), `bugFixTemplate`, `securityAuditTemplate`. Self-review loop runs reviewer + tester on completed output.
197
142
 
198
- Production-grade reliability and governance for orchestration at scale:
143
+ **Project Manager** — Classifies projects as web-frontend, api-backend, mobile, ml-data, monorepo, etc. Maps project type to recommended template and profiles. Module boundary mapper assigns non-overlapping file regions for parallel agents. Monitoring tracks phase timing, per-agent performance, and approval gates.
199
144
 
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. |
145
+ **Enterprise Hardening** Circuit breaker per agent (closed/open/half-open with auto-recovery). Checkpoint/resume serializes orchestration state to disk. Cost tracker counts tokens per tier with budget enforcement. Policy engine enforces 7 built-in rules (max tasks, requires review/testing, approval before deploy, etc.) with custom rule support.
206
146
 
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.
147
+ </details>
208
148
 
209
149
  ---
210
150
 
@@ -220,11 +160,9 @@ All Phase 5 modules integrated into the orchestrator public API. 60 new tests. T
220
160
  <details>
221
161
  <summary><strong>v0.33.0 — Project Dev Mode</strong></summary>
222
162
 
223
- ## What's New in v0.33.0
224
-
225
- > **One command. Full context. Zero setup.**
163
+ **One command. Full context. Zero setup.**
226
164
 
227
- ### `aman-agent dev` — Your New Way to Start Coding
165
+ **`aman-agent dev` — Your New Way to Start Coding**
228
166
 
229
167
  ```bash
230
168
  cd ~/projects/amantrade && aman-agent dev
@@ -348,7 +286,7 @@ Other "memory" solutions are just markdown files the AI reads on startup — the
348
286
 
349
287
  ## The Solution
350
288
 
351
- **aman-agent** is the first open-source AI companion that genuinely learns from conversation. It doesn't just store memories — it recalls them per-message, extracts new knowledge automatically, and uses your LLM to intelligently compress context instead of truncating it.
289
+ **aman-agent** is the first open-source AI companion that genuinely learns from conversation and orchestrates multi-agent workflows. It recalls memories per-message, extracts new knowledge automatically, decomposes complex requirements into parallel task graphs, and delegates to specialized agents all running locally with any LLM.
352
290
 
353
291
  ```bash
354
292
  npx @aman_asmuei/aman-agent
@@ -360,41 +298,76 @@ npx @aman_asmuei/aman-agent
360
298
 
361
299
  ## Architecture at a Glance
362
300
 
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.
301
+ aman-agent is the **runtime** at the center of the aman ecosystem — 78 TypeScript modules that stitch together memory, identity, orchestration, and any LLM into one coherent system.
364
302
 
365
303
  ```mermaid
366
- flowchart LR
367
- User([You]) <--> CLI[aman-agent CLI<br/>chat loop]
304
+ flowchart TB
305
+ User([You]) <--> CLI[aman-agent CLI]
306
+
307
+ subgraph core [" Agent Core "]
308
+ Agent[agent.ts<br/>message loop]
309
+ Hooks[hooks.ts<br/>lifecycle]
310
+ Skills[skill-engine<br/>+ crystallization]
311
+ Obs[observation<br/>+ postmortem]
312
+ Personality[user-model<br/>+ personality]
313
+ end
368
314
 
369
- CLI --> Agent[agent.ts<br/>message orchestration]
370
- Agent --> Hooks[hooks.ts<br/>lifecycle events]
371
- Agent --> Orch[orchestrator/<br/>DAG scheduler]
315
+ subgraph orchestrator [" Orchestrator Engine "]
316
+ DAG[DAG scheduler<br/>parallel execution]
317
+ Decompose[LLM decompose<br/>requirement → DAG]
318
+ Templates[workflow templates<br/>feature · bugfix · audit]
319
+ ReviewLoop[self-review loop<br/>reviewer + tester]
320
+ Gate[approval gates<br/>+ CI gates]
321
+ CB[circuit breaker<br/>+ checkpoint]
322
+ Policy[policy engine<br/>+ cost tracker]
323
+ end
372
324
 
325
+ subgraph github [" GitHub-Native "]
326
+ GH[gh CLI wrapper]
327
+ Issues[issue → DAG<br/>planner]
328
+ PRs[PR manager<br/>+ CI polling]
329
+ end
330
+
331
+ subgraph project [" Project Manager "]
332
+ Detect[project classifier<br/>stack → type]
333
+ ModMap[module boundary<br/>mapper]
334
+ Monitor[orchestration<br/>monitoring]
335
+ end
336
+
337
+ CLI --> Agent
338
+ Agent --> Hooks
339
+ Agent --> orchestrator
373
340
  Agent -->|recall &amp; extract| Memory[(amem-core<br/>SQLite + vectors)]
374
- Agent -->|who &amp; prefs| Identity[(acore-core<br/>identity)]
375
- Agent -->|boundaries| Rules[(arules-core<br/>guardrails)]
376
- Agent -->|auto-trigger| Skills[skill-engine<br/>+ crystallization]
377
- Agent -->|telemetry| Obs[observation<br/>+ postmortem]
341
+ Agent -->|identity| Identity[(acore-core)]
342
+ Agent -->|guardrails| Rules[(arules-core)]
378
343
 
379
- Orch -->|delegate tasks| Delegate[delegate.ts<br/>+ teams.ts]
380
- Orch -->|tier routing| LLM
344
+ orchestrator --> Delegate[delegate.ts<br/>+ teams.ts]
345
+ orchestrator --> Profiles[agent profiles<br/>architect · security<br/>tester · reviewer]
346
+ orchestrator --> github
347
+ orchestrator --> project
381
348
 
382
349
  Agent --> LLM{LLM Router}
383
350
  LLM --> Claude[Anthropic]
384
351
  LLM --> GPT[OpenAI]
385
352
  LLM --> Copilot[GH Copilot]
386
- LLM --> Ollama[Ollama local]
353
+ LLM --> Ollama[Ollama]
387
354
 
388
- Agent <--> MCP[MCP tools<br/>aman-mcp · amem]
355
+ Agent <-->|MCP| MCP[aman-mcp · amem]
389
356
 
390
- classDef core fill:#58a6ff22,stroke:#58a6ff,color:#e6edf3,stroke-width:2px;
391
- classDef store fill:#3fb95022,stroke:#3fb950,color:#e6edf3,stroke-width:2px;
357
+ classDef core fill:#58a6ff15,stroke:#58a6ff,color:#e6edf3,stroke-width:2px;
358
+ classDef orch fill:#a371f715,stroke:#a371f7,color:#e6edf3,stroke-width:2px;
359
+ classDef gh fill:#3fb95015,stroke:#3fb950,color:#e6edf3,stroke-width:2px;
360
+ classDef proj fill:#d29f2215,stroke:#d29f22,color:#e6edf3,stroke-width:2px;
361
+ classDef store fill:#3fb95022,stroke:#3fb950,color:#e6edf3,stroke-width:1px;
392
362
  classDef llm fill:#d29f2222,stroke:#d29f22,color:#e6edf3,stroke-width:1px;
393
- classDef orch fill:#a371f722,stroke:#a371f7,color:#e6edf3,stroke-width:2px;
394
- class CLI,Agent,Hooks,Skills,Obs core
363
+
364
+ class Agent,Hooks,Skills,Obs,Personality core
365
+ class DAG,Decompose,Templates,ReviewLoop,Gate,CB,Policy orch
366
+ class GH,Issues,PRs gh
367
+ class Detect,ModMap,Monitor proj
395
368
  class Memory,Identity,Rules store
396
369
  class Claude,GPT,Copilot,Ollama,LLM llm
397
- class Orch,Delegate orch
370
+ class Delegate,Profiles,MCP core
398
371
  ```
399
372
 
400
373
  <details>
@@ -969,6 +942,99 @@ Each agent profile has its own identity, rules, and skills — but shares the sa
969
942
 
970
943
  </details>
971
944
 
945
+ <details>
946
+ <summary><strong>Task Orchestration</strong> (new in v0.39)</summary>
947
+
948
+ ### Task Orchestration
949
+
950
+ Describe what you want to build — aman-agent decomposes it into a DAG of tasks, assigns each to the right specialist agent, and executes them in parallel:
951
+
952
+ ```
953
+ You > /orchestrate Add user authentication with JWT, password hashing, and rate limiting
954
+
955
+ Decomposing requirement into task DAG...
956
+
957
+ ## User Authentication
958
+ **Goal:** JWT auth with security hardening
959
+ **Tasks:** 5 | **Gates:** 1
960
+
961
+ - **Design auth architecture** → architect [advanced] (root)
962
+ - **Implement JWT middleware** → coder [standard] (after: design)
963
+ - **Add rate limiting** → coder [standard] (after: design)
964
+ - **Write test suite** → tester [standard] (after: jwt, rate-limit)
965
+ - **Security review** → security [standard] (after: tests)
966
+ - 🔒 **Human approval** [approval]
967
+ ```
968
+
969
+ **How it works:**
970
+ 1. Your LLM decomposes the requirement into a validated DAG (no cycles, valid refs)
971
+ 2. The scheduler runs independent tasks in parallel (configurable concurrency)
972
+ 3. Each task is routed to the right LLM tier — Haiku for simple, Sonnet for coding, Opus for architecture
973
+ 4. Approval gates pause execution for human review at critical points
974
+ 5. After completion, the self-review loop runs reviewer + tester agents on the output
975
+ 6. Circuit breakers prevent cascade failures; checkpoints enable crash recovery
976
+
977
+ **Pre-built templates:**
978
+
979
+ ```
980
+ /orchestrate --template full-feature # architect → coders → review + test
981
+ /orchestrate --template bug-fix # reproduce → fix → test → review
982
+ /orchestrate --template security-audit # scan → triage → fix → rescan
983
+ ```
984
+
985
+ **Cost awareness:** The cost tracker monitors token usage per tier. Set a budget limit in config to prevent runaway costs.
986
+
987
+ </details>
988
+
989
+ <details>
990
+ <summary><strong>GitHub Automation</strong> (new in v0.39)</summary>
991
+
992
+ ### GitHub Automation
993
+
994
+ aman-agent speaks GitHub natively via the `gh` CLI:
995
+
996
+ ```
997
+ You > /github
998
+
999
+ Repo: amanasmuei/aman-agent (authenticated)
1000
+ Branch: main
1001
+
1002
+ You > /github issues --limit 5
1003
+
1004
+ #42 Add user auth feature, security alice
1005
+ #41 Fix login redirect bug bob
1006
+ #40 Update dependencies chore unassigned
1007
+ ...
1008
+
1009
+ You > /github plan 42
1010
+
1011
+ Fetching issue #42: "Add user auth"...
1012
+ Decomposing into task DAG...
1013
+
1014
+ ## Add user auth
1015
+ **Tasks:** 4 | **Gates:** 1
1016
+ - **Design auth flow** → architect [advanced] (root)
1017
+ - **Implement JWT** → coder [standard] (after: design)
1018
+ - **Write tests** → tester [standard] (after: implement)
1019
+ - **Security review** → security [standard] (after: tests)
1020
+
1021
+ You > /github ci main
1022
+
1023
+ CI Status: ✓ passing (workflow: ci.yml, 2m ago)
1024
+ ```
1025
+
1026
+ **Available commands:**
1027
+
1028
+ | Command | Description |
1029
+ |:---|:---|
1030
+ | `/github` | Show current repo info and auth status |
1031
+ | `/github issues` | List open issues |
1032
+ | `/github prs` | List open pull requests |
1033
+ | `/github plan <number>` | Decompose issue into orchestrator task DAG |
1034
+ | `/github ci <branch>` | Check CI status for a branch |
1035
+
1036
+ </details>
1037
+
972
1038
  <details>
973
1039
  <summary><strong>Agent Delegation</strong></summary>
974
1040