baro-ai 0.18.0 → 0.20.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
@@ -40,7 +40,10 @@ baro --model opus "Complex architecture redesign"
40
40
  # Disable model routing (use opus everywhere)
41
41
  baro --no-model-routing "Build entire app"
42
42
 
43
- # Resume interrupted execution
43
+ # Dry run - generate plan without executing
44
+ baro --dry-run "Add REST API"
45
+
46
+ # Resume interrupted execution (or execute a dry-run plan)
44
47
  baro --resume
45
48
 
46
49
  # Specify working directory
@@ -66,13 +69,42 @@ baro --cwd ~/projects/myapp "Add REST API"
66
69
  - **Build detection** — auto-detects project type (Cargo, npm, Go, Python, Make) and runs builds during review
67
70
  - **Git coordination** — mutex-protected commits, auto-push with retry, pull --rebase, conflict detection
68
71
  - **Branch per run** — creates `baro/<name>` branch, keeps main clean
72
+ - **Dry run** — `--dry-run` generates plan and saves to `prd.json` without executing, then `--resume` to run it
69
73
  - **Resume** — detects `prd.json` and resumes incomplete executions
70
74
  - **PR creation** — creates GitHub PR with stories table, stats, time saved, and review summary
71
75
  - **Configurable parallelism** — `--parallel N` to limit concurrent story execution
72
76
  - **Story timeout** — `--timeout SECONDS` kills stuck agents (default: 10 minutes)
73
77
  - **Time saved** — shows parallel speedup vs sequential execution
74
- - **System notifications** — terminal bell + OS notification (macOS/Linux) when done
78
+ - **System notifications** — terminal bell + OS notification (macOS/Linux/Windows) when done
75
79
  - **Retry logic** — failed stories retry automatically (configurable per story)
80
+ - **Interactive settings** — configure model, parallelism, timeout, context, and planner on the welcome screen with Tab/arrow keys
81
+ - **Project config** — `.barorc` file in project root sets defaults (no CLI flags needed)
82
+ - **Session lock** — prevents multiple baro instances from running in the same directory
83
+
84
+ ## Config file
85
+
86
+ Create a `.barorc` in your project root to set defaults:
87
+
88
+ ```json
89
+ {
90
+ "model": "routed",
91
+ "parallel": 3,
92
+ "timeout": 600,
93
+ "skipContext": false,
94
+ "planner": "claude"
95
+ }
96
+ ```
97
+
98
+ All fields are optional. CLI flags override `.barorc`, and interactive changes on the welcome screen override both.
99
+
100
+ | Field | Values | Default |
101
+ |-------|--------|---------|
102
+ | `model` | `"routed"`, `"opus"`, `"sonnet"`, `"haiku"` | `"routed"` |
103
+ | `parallel` | `0` (unlimited) or any number | `0` |
104
+ | `timeout` | seconds per story | `600` |
105
+ | `skipContext` | `true` / `false` | `false` |
106
+ | `planner` | `"claude"`, `"openai"` | `"claude"` |
107
+ | `dryRun` | `true` / `false` | `false` |
76
108
 
77
109
  ## Options
78
110
 
@@ -88,21 +120,90 @@ Options:
88
120
  --no-model-routing Use opus for everything (disables routing)
89
121
  --parallel <N> Max concurrent stories, 0 = unlimited (default: 0)
90
122
  --timeout <seconds> Story timeout in seconds (default: 600)
91
- --resume Resume from existing prd.json
123
+ --dry-run Generate plan only, save to prd.json, do not execute
124
+ --resume Resume from existing prd.json (also runs dry-run plans)
125
+ --skip-context Skip CLAUDE.md auto-generation
92
126
  --cwd <path> Working directory (default: current)
127
+ --with-critic Enable live Critic — reviews each agent turn
128
+ against acceptance criteria via `claude --model haiku`
129
+ and injects corrective feedback (default: off)
130
+ --critic-model <name> Model for the Critic (default: haiku)
131
+ --no-librarian Disable cross-agent runtime memory (default: on)
132
+ --no-sentry Disable file-touch conflict detector (default: on)
133
+ --with-surgeon Enable adaptive DAG: drop / replace failing stories
134
+ at level boundaries instead of stalling (default: off)
135
+ --surgeon-use-llm Use `claude --model …` for richer Surgeon replans
136
+ (default: deterministic skip-only)
137
+ --surgeon-model <name> Model for Surgeon when --surgeon-use-llm is on
138
+ (default: opus)
93
139
  -h, --help Print help
94
140
  ```
95
141
 
142
+ ### Phase 2/3/4 observers (Mozaik bus)
143
+
144
+ baro 0.19+ runs every story through a TypeScript Mozaik orchestrator.
145
+ Stories on the same DAG level run truly in parallel and observers can
146
+ react to one another's bus events:
147
+
148
+ - **Librarian** (default ON) — when one agent reads a file or runs grep,
149
+ later agents in the run see the digest in their prompt and skip the
150
+ redundant exploration. Measurable token savings on multi-story runs.
151
+ - **Sentry** (default ON) — flags overlapping Edit/Write tool calls
152
+ across concurrent stories.
153
+ - **Critic** (`--with-critic`, default OFF) — Haiku evaluator reviews
154
+ each agent turn against acceptance criteria; on a fail verdict, an
155
+ inline corrective message lands as the agent's next turn so it
156
+ self-corrects before commit.
157
+ - **Surgeon** (`--with-surgeon`, default OFF) — when a story fails its
158
+ retry budget, a ReplanItem is emitted on the bus and the Conductor
159
+ recomputes the DAG at the next level boundary. The simplest mode just
160
+ drops failing stories so dependents unblock; with `--surgeon-use-llm`
161
+ Opus proposes splits, prerequisite inserts, or dependency rewires.
162
+
96
163
  ## Requirements
97
164
 
98
165
  - [Claude CLI](https://docs.anthropic.com/en/docs/claude-cli) installed and authenticated
99
- - macOS (arm64/x64) or Linux (x64/arm64)
100
- - Node.js 18+ (only if using `--planner openai`)
166
+ - macOS (arm64/x64), Linux (x64/arm64), or Windows (x64)
167
+ - **Node.js 20+** (orchestrator runtime)
101
168
  - `gh` CLI (optional, for automatic PR creation)
102
169
 
170
+ > **Windows note:** Windows 10+ is required. For best TUI experience, use [Windows Terminal](https://aka.ms/terminal) or another modern terminal emulator.
171
+
103
172
  ## Architecture
104
173
 
105
- Rust binary distributed via npm. TUI built with ratatui, async execution with tokio, one Claude CLI process per story.
174
+ Rust binary distributed via npm. TUI built with ratatui, async execution
175
+ with tokio. Each `baro` invocation spawns the bundled TypeScript
176
+ [Mozaik](https://github.com/jigjoy-ai/mozaik) orchestrator as a
177
+ subprocess; the orchestrator owns story execution and emits typed
178
+ events into a shared `AgenticEnvironment` bus. Each story is one
179
+ `claude` CLI subprocess (auth inherits from your Claude CLI session —
180
+ no API key needed).
181
+
182
+ The orchestrator is itself a Mozaik agentic environment: there is no
183
+ imperative `run()` method, no top-level `Promise.all` loop. The
184
+ **Conductor** is a state machine that reacts to typed bus events
185
+ (`RunStartRequest` → `LevelComputeRequest` → `StorySpawnRequest` →
186
+ `StoryResult` → `LevelCompleted` → …). Spawning a story, evaluating a
187
+ turn, and replanning the DAG are all reactions, not steps in a loop.
188
+
189
+ Ten participants share that bus:
190
+
191
+ | Participant | Role |
192
+ | --------------- | ----------------------------------------------------------------- |
193
+ | `Conductor` | Orchestration state machine — drives the run by reacting |
194
+ | `StoryFactory` | Spawns Story Agents on each `StorySpawnRequest` |
195
+ | `StoryAgent` | Runs one story via Claude CLI, with retries and timeout |
196
+ | `Librarian` | Cross-agent memory — indexes outputs of exploration tools |
197
+ | `Sentry` | Flags overlapping file writes across concurrent stories |
198
+ | `Critic` | Per-turn acceptance-criteria evaluator (opt-in: `--with-critic`) |
199
+ | `Surgeon` | Emits DAG replans when a story fails terminally (opt-in: `--with-surgeon`) |
200
+ | `Operator` | Bridges external user commands (TUI, web UI) into bus events |
201
+ | `Auditor` | JSONL log of every event on the bus |
202
+ | `Cartographer` | Translates bus events into UI frames for the Rust TUI |
203
+
204
+ The bus is open. New participants — CI deployers, Slack notifiers,
205
+ external ticket triggers — are subscribers and emitters with no changes
206
+ to the orchestrator.
106
207
 
107
208
  ## License
108
209