Skip to content

Commit 376ddc9

Browse files
authored
Merge pull request #3 from ashlrai/feat/v5-open-fleet
v5 Open Fleet — polyglot, self-improving, conducted fleet (M50-M57, incl. v4)
2 parents d733427 + d082c35 commit 376ddc9

106 files changed

Lines changed: 18083 additions & 310 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/commands/goal.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
description: Create, plan, and advance an ashlr goal — sandboxed, proposal-only, routed across the polyglot backend fleet (M55).
3+
argument-hint: "<objective>" [--project <repo>] [--allow-cloud]
4+
---
5+
6+
Run the ashlr **goal conductor** for this objective:
7+
8+
$ARGUMENTS
9+
10+
Execute it:
11+
12+
```bash
13+
ashlr goal $ARGUMENTS
14+
```
15+
16+
`ashlr goal` creates a goal, plans it into milestones, and advances the next
17+
milestone as a **sandboxed, proposal-only** run — routed across the polyglot
18+
backend roster (local · Hermes · Claude · Codex · NVIDIA NIMs · Kimi K2.7 · …) by
19+
capability and trust tier. **Nothing is applied to the working tree or `main`**
20+
the run files a PENDING proposal.
21+
22+
After it completes, summarize the proposal that was filed and remind the user to
23+
review it with `ashlr inbox`. The kill-switch (`~/.ashlr/KILL`) halts everything.

.claude/commands/loop.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
description: Run the autonomous ashlr fleet over every enrolled repo — one tick or continuous, proposal-only (M55).
3+
argument-hint: [--watch] [--dry-run]
4+
---
5+
6+
Run the ashlr **fleet conductor**:
7+
8+
```bash
9+
ashlr loop $ARGUMENTS
10+
```
11+
12+
`ashlr loop` renders the live control plane (per-backend throughput, queue depth,
13+
quota, merges-to-`main` today) and then runs the autonomous fleet over every
14+
enrolled repo: it discovers work, routes each item across the polyglot roster by
15+
trust tier, runs it **sandboxed**, and files **PENDING proposals** — nothing is
16+
applied by default. Default is a single tick; pass `--watch` for the continuous
17+
loop, `--dry-run` to plan without dispatching.
18+
19+
It respects the kill-switch (`~/.ashlr/KILL`) and the daily budget. After it runs,
20+
report the fleet status and any proposals filed (review via `ashlr inbox`).

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,52 @@ hub (M1–M20). Entries below detail each milestone; dates are merge dates into
1818
Milestones M34–M40, thirteen new team safety invariants, registered as a
1919
living ashlr goal. ROADMAP and contracts README updated to point at it.
2020

21+
## [3.0.0] — 2026-06-17 — v3-Weapon · v4-Foundry · v5-Open-Fleet (M41–M60)
22+
23+
A major leap: local models became an engineering weapon, then a fleet of
24+
backends that builds and maintains the ecosystem autonomously — proposal-only,
25+
trust-gated, contained. Same safety floor; zero new runtime deps.
26+
27+
### v3-Weapon (M41–M44)
28+
- Adaptive, model-sized prompts; the sandboxed engineering tool surface
29+
(write/edit/bash confined to a worktree, diffs → inbox, never the live tree);
30+
the verify→repair loop; and `ashlr eval` proving the local uplift.
31+
32+
### v4-Foundry (M45–M49)
33+
- `runEngineSandboxed`: run an external agent CLI inside a throwaway git
34+
worktree, sever git push, capture ONLY the scrubbed diff as a PENDING
35+
proposal, trust-tagged `{engineModel, engineTier}`.
36+
- Backend router + rate/quota scheduler; the tiered-trust merge-to-`main` gate
37+
with HMAC-signed provenance (M47.1); the 24/7 fleet supervisor; the fleet
38+
control plane (`ashlr fleet status/pause/resume` + `#fleet` web view).
39+
40+
### v5-Open-Fleet (M50–M60)
41+
- **M50** declarative engine registry (adding a backend is config-only) + a real
42+
OpenAI-compatible API client (Hermes, OpenCode, NVIDIA NIMs, Kimi K2.7 …);
43+
existing engines reproduce byte-identical argv.
44+
- **M51** tri-tier trust (`local | mid | frontier`); authority never leaks
45+
upward (`frontier→main`, `mid→branch`, `local→proposal-only`).
46+
- **M52** OS-level confinement (macOS `sandbox-exec` read-jail + egress gate)
47+
closing v4's read-residual.
48+
- **M53** fleet intelligence — learned routing, budget-breach tier cascade,
49+
per-run cost-anomaly holds (all proposal-only).
50+
- **M54** self-improving fleet — a never-weaken guard (refuses any diff that
51+
deletes/weakens a safety test) + a green-flag-off-AND-on self-eval harness.
52+
- **M55** the conductor — `ashlr goal` + `ashlr loop` + Claude Code `/goal`
53+
`/loop`.
54+
- **M56** `mid→branch` auto-apply (verified mid-tier opens a PR, never `main`),
55+
behind a separate default-off `midToBranch` flag.
56+
- **M57** `cfg.foundry` example + `docs/FOUNDRY-CONFIG.md`.
57+
- **M58/M60** two reference plugins (scanner + template) seeding the ecosystem.
58+
- **M59** `ashlr fleet init` (config bootstrap) + typed `cfg.foundry.intelligence`.
59+
60+
### Safety
61+
Everything can reach `main` — but only a frontier merge-authority model, fully
62+
verified, with valid HMAC provenance. Auto-merge (main and mid→branch) is
63+
DEFAULT OFF. Kill-switch (`~/.ashlr/KILL`) halts every backend.
64+
65+
---
66+
2167
## [2.2.0] — 2026-06-12 — v2.2 "Agent-Native Ecosystem" (M31–M33)
2268

2369
Makes ashlr's intelligence first-class INSIDE agent sessions — CLI-first, with

README.md

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ Self-heal is always bounded (never loops), opt-out (`ASHLR_NO_HEAL=1`), and neve
580580
| **Portfolio intelligence (v2)** | `ashlr knowledge build/impact/graph` · `ashlr ask` · `ashlr reflect` · `ashlr health` · `ashlr digest` |
581581
| **Cloud-ready seams (v2)** | `ashlr seams` |
582582
| **Harden & prove (v2.1)** | `ashlr verify-safety` · `ashlr sandbox gc` · `ashlr audit` · `ashlr preflight` · `ashlr onboard` · `ashlr demo` |
583+
| **Local Weapon (v3)** | `ashlr run --engineer [--bash]` · `ashlr eval` · adaptive prompts (`models.adaptivePrompts`) |
583584
| **Maintain** | `ashlr update` |
584585

585586
It is **local-first by design**. Index, config, runs, rollups, and memory all live under `~/.ashlr/`. Agent runs default to local models and refuse to touch a cloud endpoint unless you explicitly opt in. Telemetry is metadata-only; secrets flow through Phantom, never through the hub.
@@ -643,7 +644,7 @@ Runs stream progress live to stderr (task starts, model deltas, tool calls, retr
643644
| `ashlr run show <id>` | Print the full `RunState` for a past run. |
644645
| `ashlr runs [--json]` | List all past runs, newest first. |
645646

646-
Key flags: `--budget N` · `--max-steps N` · `--parallel N` · `--engine builtin|ashlrcode|aw|claude` · `--stream / --no-stream` · `--allow-cloud` · `--no-memory` · `--no-capture` · `--resume <id>`.
647+
Key flags: `--budget N` · `--max-steps N` · `--parallel N` · `--engine builtin|ashlrcode|aw|claude` · `--engineer [--bash]` (sandboxed engineering tools → inbox; see [Local Weapon](#local-weapon-v3--make-local-models-genuinely-capable)) · `--stream / --no-stream` · `--allow-cloud` · `--no-memory` · `--no-capture` · `--resume <id>`.
647648

648649
```sh
649650
ashlr run "Summarize the last 5 commits and flag risky changes"
@@ -693,6 +694,61 @@ ashlr models start # best-effort start of an installed-but-idle Ollam
693694
Local savings (est): $0.42 | Cloud would-have-been: $0.47 | Projected 30d: $0.18
694695
```
695696

697+
### Local Weapon (v3) — make local models genuinely capable
698+
699+
v3 is a focused push to close the quality gap between local models (Ollama / LM Studio) and the cloud, without ever leaving your machine. Four shipped pieces — all opt-in, all bounded.
700+
701+
#### Adaptive prompts (M41)
702+
703+
A model-adaptive, layered system-prompt suite. ashlr auto-detects a per-model profile from the model name (size band + coder/general/small) and tunes **prompt verbosity, ReAct step cap, and sampling temperature** to fit the model actually serving the task — a 1.5B chat model and a 32B coder get very different scaffolding. Off by default; opt-in.
704+
705+
```sh
706+
ashlr config set models.adaptivePrompts true # config opt-in (default: false)
707+
ASHLR_ADAPTIVE_PROMPTS=1 ashlr run "<goal>" # env opt-in (overrides config)
708+
```
709+
710+
With the flag off the harness uses its legacy prompts and step cap unchanged — the whole suite is additive and gated.
711+
712+
#### Engineering tool surface (M42)
713+
714+
Give the local agent **real, sandboxed engineering tools** — read / glob / grep / write / edit — confined to a throwaway git worktree. The agent never touches your live working tree: the resulting diff is routed to the Approval Inbox as a PENDING proposal, exactly like every other outward action.
715+
716+
```sh
717+
ashlr run "<goal>" --engineer # sandboxed read/glob/grep/write/edit → inbox
718+
ashlr run "<goal>" --engineer --bash # also allow sandboxed command/test execution
719+
ashlr inbox # review the proposed diff; nothing applies until you approve
720+
```
721+
722+
Requires the repo to be **enrolled** (`ashlr enroll add <repo>`) and the kill switch off. Off by default.
723+
724+
**Security posture** (structurally enforced):
725+
726+
- **Kill-switch gated** — every mutating tool is REFUSED when `~/.ashlr/KILL` is set; checked first, cannot be bypassed.
727+
- **Workspace-boundary + enrollment enforced** — writes resolve only inside the sandbox worktree of an enrolled repo; paths outside the boundary are refused.
728+
- **Secret-scrubbed output** — tool output is secret-scrubbed before it reaches the model or any store.
729+
- **Diffs to inbox, never the live tree**`write`/`edit` produce a proposal; approval is human-only via `ashlr inbox approve` (there is no agent-reachable apply path).
730+
- **Double opt-in for bash**`--bash` is local code execution and requires `--engineer` **and** `--bash` together; it too is kill-switch gated and confined to the sandbox.
731+
732+
#### Verify→repair loop (M43)
733+
734+
After each task the agent runs the repo's detected typecheck / test / lint commands and feeds any failures back into a bounded repair pass. This generalizes the prior single retry into a loop — bounded by `--max-steps` and the run budget, so it can never spin without limit. Tune the headroom via the run budget flags (`--budget` / `--max-steps`).
735+
736+
#### Eval harness (M44)
737+
738+
Measure the local-model uplift on your own machine. `ashlr eval` runs a fixed fixture set through the agent loop twice per fixture — adaptive prompts **OFF** then **ON** — and reports steps-to-done, done count, and tokens for each.
739+
740+
```sh
741+
ashlr eval # full fixture set, table output
742+
ashlr eval --limit 3 # only the first 3 fixtures
743+
ashlr eval --budget 8000 --json # per-run token budget; machine-readable output
744+
```
745+
746+
Needs a local model running (Ollama / LM Studio). When none is reachable it **skips gracefully** — prints a hint and exits 0, never an error.
747+
748+
#### Cross-platform
749+
750+
ashlr runs on **macOS, Linux, and Windows**. The engineering tools resolve the platform shell at runtime (e.g. `cmd.exe` on Windows, so `npm.cmd` / `npx.cmd` shims resolve via `PATHEXT`), and the local-model providers (Ollama / LM Studio) are plain HTTP, so no platform-specific runtime is required.
751+
696752
### Observe
697753

698754
```sh
@@ -803,7 +859,8 @@ ashlr telemetry test # emit a synthetic test span; reports ok/fail
803859

804860
## Requirements
805861

806-
- **macOS** · **Node.js 22+** · `~/.local/bin` on your `PATH`
862+
- **macOS, Linux, or Windows** · **Node.js 22+** · `~/.local/bin` on your `PATH` (POSIX)
863+
- The engineering tools (M42) resolve the platform shell at runtime (`cmd.exe` on Windows); the local-model providers are HTTP-based, so no platform-specific runtime is required.
807864
- Optional: [Ollama](https://ollama.com) or [LM Studio](https://lmstudio.ai) for local agent runs; [`phantom`](https://github.com/nicholasgasior/phantom) for secrets management; [Raycast](https://raycast.com) for the extension.
808865

809866
---

0 commit comments

Comments
 (0)