@aman_asmuei/aman-agent 0.34.0 → 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 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-531_passing-brightgreen?style=for-the-badge&logo=vitest&logoColor=white" alt="531 tests passing" />
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
  &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>
@@ -39,7 +39,7 @@
39
39
  </p>
40
40
 
41
41
  <p align="center">
42
- <a href="#whats-new-in-v0330"><kbd> What's New </kbd></a>
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-v0330)
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.**
@@ -131,7 +254,7 @@ $ aman-agent dev ~/projects/amantrade
131
254
 
132
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.
133
256
 
134
- ---
257
+ </details>
135
258
 
136
259
  <details>
137
260
  <summary><strong>v0.32.0 — Install anywhere, zero prerequisites</strong></summary>
@@ -237,7 +360,7 @@ npx @aman_asmuei/aman-agent
237
360
 
238
361
  ## Architecture at a Glance
239
362
 
240
- aman-agent is the **runtime** at the center of the aman ecosystem — 38 focused TypeScript modules that stitch together 7 portable memory/identity/skill layers with any LLM you want.
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.
241
364
 
242
365
  ```mermaid
243
366
  flowchart LR
@@ -245,6 +368,7 @@ flowchart LR
245
368
 
246
369
  CLI --> Agent[agent.ts<br/>message orchestration]
247
370
  Agent --> Hooks[hooks.ts<br/>lifecycle events]
371
+ Agent --> Orch[orchestrator/<br/>DAG scheduler]
248
372
 
249
373
  Agent -->|recall &amp; extract| Memory[(amem-core<br/>SQLite + vectors)]
250
374
  Agent -->|who &amp; prefs| Identity[(acore-core<br/>identity)]
@@ -252,6 +376,9 @@ flowchart LR
252
376
  Agent -->|auto-trigger| Skills[skill-engine<br/>+ crystallization]
253
377
  Agent -->|telemetry| Obs[observation<br/>+ postmortem]
254
378
 
379
+ Orch -->|delegate tasks| Delegate[delegate.ts<br/>+ teams.ts]
380
+ Orch -->|tier routing| LLM
381
+
255
382
  Agent --> LLM{LLM Router}
256
383
  LLM --> Claude[Anthropic]
257
384
  LLM --> GPT[OpenAI]
@@ -263,9 +390,11 @@ flowchart LR
263
390
  classDef core fill:#58a6ff22,stroke:#58a6ff,color:#e6edf3,stroke-width:2px;
264
391
  classDef store fill:#3fb95022,stroke:#3fb950,color:#e6edf3,stroke-width:2px;
265
392
  classDef llm fill:#d29f2222,stroke:#d29f22,color:#e6edf3,stroke-width:1px;
393
+ classDef orch fill:#a371f722,stroke:#a371f7,color:#e6edf3,stroke-width:2px;
266
394
  class CLI,Agent,Hooks,Skills,Obs core
267
395
  class Memory,Identity,Rules store
268
396
  class Claude,GPT,Copilot,Ollama,LLM llm
397
+ class Orch,Delegate orch
269
398
  ```
270
399
 
271
400
  <details>
@@ -274,7 +403,11 @@ flowchart LR
274
403
  | Piece | What it does | Where it lives |
275
404
  |:---|:---|:---|
276
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) |
277
- | `commands.ts` | 58+ slash commands (`/memory`, `/skills`, `/plan`, `/delegate`, `/eval`, `/observe`, `/postmortem`, …) | `src/commands.ts` (98 KB) |
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/` |
278
411
  | `hooks.ts` | 5 lifecycle hooks that fire at startup, before/after tools, on workflow match, on session end | `src/hooks.ts` (26 KB) |
279
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` |
280
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` |
@@ -1391,6 +1524,8 @@ sequenceDiagram
1391
1524
  | `/help` | Show available commands |
1392
1525
  | `/plan` | Show active plan `[create\|done\|undo\|list\|switch\|show]` |
1393
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>]` |
1394
1529
  | `/delegate` | Delegate task to a profile `[<profile> <task>\|pipeline]` |
1395
1530
  | `/agents` | Multi-agent A2A `[list\|info <name>\|ping <name>]` |
1396
1531
  | `/team` | Manage agent teams `[create\|run\|list\|show\|delete]` |