agengo 0.4.0 → 0.5.1
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/CHANGELOG.md +55 -2
- package/README.md +53 -74
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.5.1 - 2026-12-03
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- When an agent returns no JSON object, the error now shows the end of its stdout and stderr (or says it printed nothing), so an agent that prints nothing to a pipe can be told from one that answered in prose. For `agy`, a failed `status` in its envelope is reported as the error and `structured_output` is used when present, and a tool agy was denied (`denied_actions`, e.g. Bash, which headless agy cannot ask approval for) is named in the error with the fix. Run without a terminal, agy cannot ask for approval, so a tool it needs is denied and its reply is empty; allow the tool under `permissions.allow` in `~/.gemini/antigravity-cli/settings.json`.
|
|
9
|
+
|
|
10
|
+
## 0.5.0 - 2026-12-03
|
|
11
|
+
|
|
12
|
+
### Known limits of `--sandbox`
|
|
13
|
+
- On macOS, `--sandbox auto` does not confine plan commands (`setup`, `verify`, …); it says so once and runs them as before. `strict` refuses to run them.
|
|
14
|
+
- On native Windows, Claude Code has no sandbox. Run agengo under WSL2 or in the [dev container](docs/devcontainer/README.md).
|
|
15
|
+
- Codex has not been run end to end in a full agengo run yet; its sandbox support is untested beyond the adapter.
|
|
16
|
+
- `agy` is experimental and there is no evidence yet that its sandbox blocks anything.
|
|
17
|
+
- Verified: Claude Code in WSL2 ran a full run with the default `--sandbox auto`, and the Builder cleanup of stray test files passed 4/4 checks.
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- **`--sandbox auto` and `strict` confine plan commands on Linux.** With `bubblewrap`, `setup`, `verify` and the other commands in a plan run with a read-only file system except the worktree, its Git folder, a scratch `/tmp` and the package caches; credential folders (`~/.ssh`, `~/.aws`, …) are hidden; and the checks have no network (`setup` keeps it; `sandbox_check_network: true` and `sandbox_write: [...]` in `.agengo/config.yaml` loosen this). Where agengo cannot wrap them (macOS, Windows, no `bwrap`), `auto` says so once and runs them as before, and `strict` now refuses to run plan commands. See [Sandbox](docs/reference.md#sandbox).
|
|
21
|
+
- **`--sandbox` now covers Codex and `agy`.** Codex counts as sandboxed where its sandbox can start (macOS, Windows, Linux with `bwrap`), so `--sandbox strict` accepts it there; `agy` gets `--sandbox` in `auto` and `strict`, but agy ignores the flag silently when its sandbox is unavailable, so `strict` still refuses it. `agengo doctor` reports each installed agent's sandbox. See [Sandbox](docs/reference.md#sandbox).
|
|
22
|
+
- **A sample dev container for running agengo and its agents behind a firewall.** [docs/devcontainer](docs/devcontainer/README.md) has a `Dockerfile`, `devcontainer.json` and a firewall script that allows only GitHub and a short list of hosts (`allowed-domains.txt`), with `claude`, `codex` and `agengo` installed and each agent's login kept in a volume. It covers every agent and the plan commands, and works on Windows through Docker. It was built and its firewall checked once on Docker Desktop for Windows; logging in to the agents and a full run inside it are untested. See [Running in a container](docs/guide.md#running-in-a-container).
|
|
23
|
+
- **`--sandbox auto` and `strict` also give plan commands a short environment.** `setup`, `verify` and the other commands in a plan no longer inherit every variable (tokens such as `GITHUB_TOKEN`, `AWS_*`, `NPM_TOKEN`) or the agent's API keys; `sandbox_env:` in `.agengo/config.yaml` adds the ones they need. Their files and network are not confined yet. See [Sandbox](docs/reference.md#sandbox).
|
|
24
|
+
- **`--sandbox off|auto|strict` confines the agents, starting with Claude Code.** With `auto`, the Builder, Reviewer and verifier run Bash in Claude Code's own OS sandbox (writes in the worktree only, no network hosts allowed, no retry outside the sandbox) when it can start, and every agent receives only a short list of environment variables instead of your whole environment (add more under `sandbox_env:`). `strict` refuses any agent whose sandbox agengo cannot enforce. It is off by default; also `sandbox:` in `.agengo/config.yaml` and `agengo config set sandbox auto`. `agengo doctor` reports whether Claude Code's sandbox is available. Plan commands and the other agents are not sandboxed yet. See [Sandbox](docs/reference.md#sandbox).
|
|
25
|
+
- **`agengo config` shows and changes the repository's settings.** `agengo config set think.model opus`, `think.effort high`, `build.model …`, `agent codex` and `agengo config unset KEY` edit `.agengo/config.yaml` and refuse a value that would make it invalid. When several agents are installed and none is chosen, a terminal now asks once and keeps the answer; without a terminal the error prints the command to run (`agengo agent use codex`). See [Model and effort](docs/reference.md#model-and-effort).
|
|
26
|
+
- **Two model tiers and an effort level, the same on every agent.** `think` (plan, specify, review, verify) and `build` in `.agengo/config.yaml` take a `model` and an `effort` (`low`, `medium`, `high`, `max`); agengo forwards them as each agent's own flags (`--model`/`--effort` for Claude Code and `agy`, `-m` and `model_reasoning_effort` for Codex) and does not interpret model names. Nothing is set by default. Custom adapters get `tier`, `model` and `effort` in the request. See [Model and effort](docs/reference.md#model-and-effort).
|
|
27
|
+
- **agengo no longer assumes Claude Code.** Each command picks its agent: `--agent`, then `AGENGO_AGENT`, then `agent:` in `.agengo/config.yaml`, then the only agent installed (`claude`, `codex` or `agy` on `PATH`). New `agengo agent` lists what is installed and what commands will use; `agengo agent use NAME` keeps a choice for the repository. `agengo resume ID --agent NAME` continues a run with another agent, for when the first one is unavailable. `agengo doctor` checks every installed agent. See [Choosing the agent](docs/reference.md#choosing-the-agent).
|
|
28
|
+
- **`--agent codex` and `--agent agy` start those agents by name**, with their own login. They are listed in `specs/agents.yaml`; agengo sends the role's prompt and the reply schema, asks the agent to end with one JSON object, finds it in the output and asks once more if there is none. `agy` is experimental. See [Agents known by name](docs/reference.md#agents-known-by-name).
|
|
29
|
+
- **Plan approval lists every command the run will execute**, and marks risky ones with `!` (a shell string, `sudo`, network tools, `rm` outside the worktree, a download piped into a shell). Shown in `agengo run --await-approval` and in the `agengo plan --brief` draft. It is a reading aid, not a sandbox.
|
|
30
|
+
- **The Builder and Reviewer can no longer run the riskiest Bash commands.** agengo passes `--settings` with deny rules (`curl`, `wget`, `ssh`, `sudo`, `git push`, `git config`, `git remote`, `git worktree`, reads of `~/.ssh`, `~/.aws`, `.env`…) to `claude -p`. Prefix rules can be bypassed, so this narrows accidents and does not replace a container or VM.
|
|
31
|
+
- **`agengo doctor` checks every file `init` writes** (both skills with their version, the `AGENTS.md` section, `.agengo/principles.md`, `.agengo/plans/`) and says how to get a missing one back: `git restore <file>` when it is committed, otherwise `agengo init`. `agengo spec` and `agengo plan` note on stderr when there are no project principles, because the agents then guess the stack and commands.
|
|
32
|
+
- **`agengo init` gives the project a starting context.** It creates `.agengo/plans/.gitkeep` so the folder survives a clone, stamps the skill with the agengo version (`agengo doctor` warns when the installed skill is out of date), fills Stack and Commands in a new `.agengo/principles.md` from `Cargo.toml`, `package.json`, `pyproject.toml`, `requirements.txt` or `go.mod` (marked as detected, for you to check), and prints the `git add` command for the files it wrote. Re-run `agengo init` to refresh the skill.
|
|
33
|
+
- **`agengo doctor` checks that a machine and repository are ready**: git 2.31+ and identity, commits, uncommitted files, `init` done, Claude Code on `PATH` and logged in. Each line says what to do about it.
|
|
34
|
+
- **The eight invariants D1–D8 are now written down** in the README's Principles section and, with how to judge a proposed change, in [CONTRIBUTING.md](CONTRIBUTING.md#the-invariants): your branches are never touched, done means checked, nobody reviews their own work, scope is enforced, people decide, one record per decision, every run can be resumed and audited, any agent through one protocol. The README says what agengo is not, the user guide has the repository layout, naming conventions and task-shaping advice ([Conventions](docs/guide.md#conventions)), and the glossary separates task checks (`verify`) from the finding verifier.
|
|
35
|
+
- **Answering a planner question takes two commands instead of three, and the approval is tied to what the user saw.** `agengo spec S --decision` now lists what the round changed (each story, requirement, success criterion or assumption added, removed or changed, and changes to the problem, scope, actors, constraints or feasibility), because the agent may change more than the decision itself, and prints an approval code: the start of the revised spec's digest. `agengo plan --spec S --approve-spec CODE` approves the spec and drafts the plan in one step, but only if the spec is still the version that code was printed for. `agengo spec --json` adds `changes` and `approval_code`. The skill shows the user the changes before approving.
|
|
36
|
+
- **The planner revises its earlier draft instead of starting over.** A `plan --spec` draft that asks questions is kept in `.git/agent-flow/drafts/`; the next draft for the same spec and stories receives it as `previous_draft`, with the decisions recorded since, and keeps the tasks those decisions do not affect. A complete plan removes it.
|
|
37
|
+
- **`agengo init` creates `.agengo/plans/`**, so `agengo plan … > .agengo/plans/<run-id>.yaml` works straight away.
|
|
38
|
+
- **Commands say which agent and limits they use, and which model the agent reports.** `agengo spec`, `agengo plan` and `agengo run` print the agent, whether it uses the subscription login or API keys, and the timeout (plus handoff, jobs and limits for `run`) before any agent starts. `spec` and `plan` name the reported model next to their token and cost line, and `run` prints each model the first time an agent reports it.
|
|
39
|
+
- **`agengo status ID --watch [--interval SECONDS]`** prints the status and the attempts and cost so far every 10 seconds (or SECONDS) and stops when the run is delivered or failed, a request waits for you, no agengo process drives the run, or on Ctrl+C.
|
|
40
|
+
- **`agengo status ID` and `agengo inbox ID` say when nothing drives a run.** A run whose coordinator died (for example when the machine ran out of process resources) stayed `running`, and `status` kept printing `Active: <task>` until someone noticed. Both commands now probe the run lock once, without waiting, and when a `running` run has no agengo process they say so with the `agengo resume ID` command; `status` also lists attempts still marked active as stalled. `status --json` adds `driven` and `resume_command`, and `inbox --json` adds `resume_command`. They only report: nothing is written and the run is never resumed for you (D5). `status --watch` uses the same probe.
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
- **`--agent codex` defaults to `--builder-handoff worktree`.** Codex's sandbox keeps `.git` read-only and a worktree's `.git` lies outside its workspace, so a Builder that has to commit cannot; agengo now makes the commit unless you pass `--builder-handoff commit`. Other named agents and custom adapters keep `commit`.
|
|
44
|
+
- The README, user guide and skill no longer present Claude Code as the default agent: they list Claude Code, Codex and Antigravity, point to `agengo agent use` and `agengo config`, and say how to switch when a platform is unavailable.
|
|
45
|
+
- **With several agents installed and none chosen, `run`, `spec` and `plan` stop instead of using Claude Code.** The choice decides which login is used and who is billed, so agengo asks (`agengo agent use NAME`, `--agent NAME` or `AGENGO_AGENT`). With Claude Code as the only agent, nothing changes.
|
|
46
|
+
- **The installed skill follows the Agent Skills format more closely.** `description` no longer contains `<` or `>` (Claude Code shows them as `<`/`>`), the version moved from an HTML comment to `metadata.version`, and `license` and `compatibility` are set. `agengo doctor` reads both stamps. Re-run `agengo init` to refresh the skill.
|
|
47
|
+
- **`agengo init` is gentler with existing files.** A skill file that agengo did not write is saved as `SKILL.md.bak` before it is replaced; the report names the repository root, hints at `@AGENTS.md` when a `CLAUDE.md` exists without it, and ends with the next step. A `final_verify` that is missing or not a list of commands now says so with an example, and `agengo run` notes when `ANTHROPIC_API_KEY` is set and will be ignored.
|
|
48
|
+
- **Clearer first-run errors.** `agengo run` stops with a fix when the repository has no commits yet (it used to fail with `Needed a single revision`) and warns when files are not committed, since agents build from the last commit. `agengo init` and other commands outside a Git repository tell you to run `git init`.
|
|
49
|
+
- **Documentation reorganised.** The user guide is split into a task-oriented [guide](docs/guide.md) and an exact [reference](docs/reference.md) (anchors such as `guide.md#metrics` moved to `reference.md#metrics`), and there are now an [architecture map](docs/architecture.md), [CONTRIBUTING.md](CONTRIBUTING.md) and [AGENTS.md](AGENTS.md). `tests/docs.rs` and a `docs` CI job check that every CLI option is in the reference and that every relative link resolves. The skill's pointer to the principles now names the README. Re-run `agengo init` to refresh the skill.
|
|
50
|
+
- **`agengo run` without `--id` names the run after the plan file** (`.agengo/plans/p1-admin.yaml` → run `p1-admin`, branch `af/p1-admin`) when the name is a valid run ID; otherwise it generates one as before. If a run with that name exists, it stops and suggests `resume` or `--id`. agengo's own backlog moved from `plans/ecc-adoption/` to `.agengo/plans/` under this convention.
|
|
51
|
+
- **agengo keeps its files in `.agengo/`.** `agengo spec --idea` now writes `.agengo/spec.yaml` instead of `spec.yaml` at the repository root, creating the folder if needed; `-o` still chooses another path, and existing specs keep working wherever they are. The README, the user guide, the `AGENTS.md` section and the skill now keep one plan per run in `.agengo/plans/<run-id>.yaml` and name runs `<phase>-<scope>` (such as `p1-admin`), so the plan file, the branch `af/<run-id>` and the reports share one name. Re-run `agengo init` to refresh the skill.
|
|
52
|
+
|
|
53
|
+
- **The Builder deletes files its tests leave outside `owns`.** In worktree handoff the Builder prompt now says that running tests or verify commands can leave build output or generated files, and that any not git-ignored must be removed before it returns; before, such a file blocked the task with `files outside owns`.
|
|
54
|
+
- **`--sandbox` now defaults to `auto`.** Agents and plan commands receive only a short list of environment variables (tokens such as `GITHUB_TOKEN`, `AWS_*` and `NPM_TOKEN` are left out; add what you need under `sandbox_env:`), Claude Code's and Codex's sandboxes are switched on where they can start, and on Linux with `bubblewrap` plan commands run confined, with no network for the checks. Where a sandbox is not available (native Windows for Claude Code, macOS for plan commands, `agy`), one note says so and the run goes on. If a plan command now fails because it needed a variable, a folder or the network, list it under `sandbox_env:`, `sandbox_write:` or `sandbox_check_network: true`, or set `sandbox: off` in `.agengo/config.yaml` (or pass `--sandbox off`) to get the old behaviour. See [Sandbox](docs/reference.md#sandbox).
|
|
55
|
+
|
|
3
56
|
## 0.4.0
|
|
4
57
|
|
|
5
58
|
### Added
|
|
@@ -8,11 +61,11 @@
|
|
|
8
61
|
- **Planner questions about a spec go back into the spec.** With `--spec`, the planner now decides technical and verification matters itself: when part of the result cannot be checked where the agents run (such as a Windows program built on Linux), it plans automated checks for the rest and says in the task goal what the user must check by hand, and it asks only when the answer would change scope or acceptance, in plain words. A `--spec` draft that still has questions now exits with code `2` and lists them on stderr with the next step, instead of failing later at `run`. The new `agengo spec spec.yaml --decision "<text>"` records such an answer as a clarification with a fresh `Q-n` ID, revises the spec in one more round and clears its approval, so the approved spec stays the single record of decisions; `--context` remains for answers that change nothing the user gets. The `specify` role now recommends options whose result can be checked automatically in the user's environment and notes in `feasibility` what can only be checked by hand. The skill relays remaining planner questions to the user in plain words through `AskUserQuestion` and records the answers with `--decision`.
|
|
9
62
|
- **`agengo plan --spec` traces plans to the approved spec.** The planner sees only the chosen stories (`--stories`, default P1) and their requirements; each acceptance criterion carries `refs` to the requirements (`FR-n`) and success criteria (`SC-n`) it checks, and the plan records `spec: {path, digest, stories}`. Whenever a plan with a spec is drafted, validated, run, amended or replaced, agengo checks it: the spec must be the approved version the plan was drafted from (C0), refs must exist (C1), and every requirement of the chosen stories must be checked by some criterion (C2); refs to other stories (C3) and criteria without refs (C4) are warnings. A run keeps a copy of the spec, Builders and Reviewers receive the relevant requirements, success criteria and out-of-scope items as `context.spec`, and `status` shows the spec. The skill now plans from the spec instead of passing it as `--context`. Plans without a spec are unchanged; drafts without one still get plain-text criteria.
|
|
10
63
|
- **`agengo spec` turns a rough idea into an approved spec before any plan is drafted.** A one-line goal left the planner guessing, and the guesses were invisible. The new read-only `specify` role writes `spec.yaml`: problem, actors, prioritized user stories with scenarios, requirements `FR-n`, measurable success criteria `SC-n`, what is out of scope, and assumptions with what changes if they are wrong. It asks only questions whose answers change the result, each with a reason, 2–4 options with their consequences and a recommendation, and never asks about technology. agengo enforces the limits itself: invalid questions are dropped, at most 5 stay open, IDs `Q-n` are never reused, and round 3 (or `--proceed`) turns what is left into assumptions. `--depth quick|deep` lowers these ceilings to 3 questions over 2 rounds or raises them to 8 over 4; the skill picks the depth from the conversation. Answer with `--answer Q-n=KEY|yes|"own words"`; answers are kept under `clarifications`. `--approve` checks readiness (no open high-impact question, a P1 story, scenarios, requirements, success criteria, out-of-scope items) and locks the spec with a SHA-256 digest that any later edit invalidates. Exit code `2` means questions are waiting, as for `run`. The agengo skill installed by `agengo init` now settles rough ideas this way: it asks each question through the agent's multiple-choice prompt (`AskUserQuestion` in Claude Code, with the recommendation first and the agent's own free-text option for other answers), and leaves the answers and the approval to the user. A roles file without a `specify` role uses the built-in one. Inspired by the `specify` and `clarify` steps of GitHub's MIT-licensed [Spec Kit](https://github.com/github/spec-kit). Design: [docs/design/spec-stage.md](docs/design/spec-stage.md).
|
|
11
|
-
- **Reliability figures in `agengo metrics`, and `agengo metrics --all`.** `metrics ID` now adds a `reliability` object (a `[RELIABILITY]` block in text output): tasks reviewed, first-review pass count and rate, review rounds (mean and max), build attempts per integrated task, gate and review failures, findings by state and severity, and per-model attempts, cost and first-review pass rate, crediting each task to the model of its first build attempt. `metrics --all` lists every run in the state database with a combined row and per-model rows, so agents and models can be compared across runs. A rate whose denominator is 0 is omitted from the JSON and shown as `n/a`. Figures are read from existing tables; the state database schema is unchanged. Definitions are in the [user guide](docs/
|
|
64
|
+
- **Reliability figures in `agengo metrics`, and `agengo metrics --all`.** `metrics ID` now adds a `reliability` object (a `[RELIABILITY]` block in text output): tasks reviewed, first-review pass count and rate, review rounds (mean and max), build attempts per integrated task, gate and review failures, findings by state and severity, and per-model attempts, cost and first-review pass rate, crediting each task to the model of its first build attempt. `metrics --all` lists every run in the state database with a combined row and per-model rows, so agents and models can be compared across runs. A rate whose denominator is 0 is omitted from the JSON and shown as `n/a`. Figures are read from existing tables; the state database schema is unchanged. Definitions are in the [user guide](docs/reference.md#metrics).
|
|
12
65
|
- **Finding verification** (`quality.verify_findings: true`). When a Reviewer requests changes, a verifier agent tries to refute each new `critical` or `high` finding at the same commit. Only a refutation with confidence of at least 0.8 clears a finding, which is then kept as `advisory` with the verifier's reasoning; an unsure verdict or a verifier failure keeps it blocking. When every blocking finding is refuted, the review counts as a pass and the task does not go back to the Builder. Applies to task reviews and the whole-branch review. Custom adapters receive a new `verify` role only when the option is on; a roles file without a `verify` role uses the built-in verifier. Adapted from the adversarial verification step in the MIT-licensed [ECC](https://github.com/affaan-m/ECC) review workflow.
|
|
13
66
|
- **`agengo init` teaches the agents in a repository when to call agengo.** It installs the agengo skill in `.claude/skills/agengo/` (Claude Code) and `.agents/skills/agengo/` (Codex and other agents that read that folder), and adds a short marked section to `AGENTS.md` (skip it with `--no-agents-md`). Before this, an agent working in the repository had no way to know agengo existed, so it built multi-task work in the chat itself. The skill also tells agents to report an agengo failure instead of quietly doing the tasks themselves. Re-running `init` refreshes the files and leaves the rest of `AGENTS.md` alone.
|
|
14
67
|
- **`--auth subscription|api` on `run` and `plan`, default `subscription`.** Claude Code and Codex bill an API key in the environment ahead of the logged-in subscription, so a stray `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` (common inside other agents and CI shells) silently switched runs to API billing or made them fail authentication. In `subscription` mode agengo removes `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `OPENAI_API_KEY`, `CODEX_API_KEY`, `GEMINI_API_KEY` and `GOOGLE_API_KEY` from every agent's environment, custom adapters included; `CLAUDE_CODE_OAUTH_TOKEN` is kept. Use `--auth api` to pass keys through as before. The mode is stored with the run, so `resume` uses it too; runs started by earlier versions keep passing keys through.
|
|
15
|
-
- **agengo builds and runs natively on Windows** (x64, MSVC toolchain), without WSL. Releases include a Windows x64 binary, installed by npm or the new PowerShell installer, and CI runs on Windows too. Commands now run with one reader thread per pipe instead of `poll`, on every platform. On Windows each command starts suspended in a Job Object, so a timeout, Ctrl+C or a lingering background process stops everything it started, as the process group does on Unix. `claude`, `--agent` and the first word of `verify`/`setup` commands are looked up with `PATHEXT`, so `claude.cmd` (npm) and `npm.cmd` work; a custom adapter on Windows must be an `.exe`, `.cmd` or `.bat`. Worktrees default to `%LOCALAPPDATA%\agengo\worktrees`, and agengo's Git commands enable `core.longpaths`. Design: [docs/design/windows-support.md](docs/design/windows-support.md).
|
|
68
|
+
- **agengo builds and runs natively on Windows** (x64, MSVC toolchain), without WSL. Releases include a Windows x64 binary, installed by npm or the new PowerShell installer, and CI runs on Windows too. Commands now run with one reader thread per pipe instead of `poll`, on every platform. On Windows each command starts suspended in a Job Object, so a timeout, Ctrl+C or a lingering background process stops everything it started, as the process group does on Unix. `claude`, `--agent` and the first word of `verify`/`setup` commands are looked up with `PATHEXT`, so `claude.cmd` (npm) and `npm.cmd` work; a custom adapter on Windows must be an `.exe`, `.cmd` or `.bat`. Worktrees default to `%LOCALAPPDATA%\agengo\worktrees`, and agengo's Git commands enable `core.longpaths`. Design: [docs/design/archive/windows-support.md](docs/design/archive/windows-support.md).
|
|
16
69
|
- **Authentication failures become an `action` request that says how to log in.** Besides "not logged in", agengo now recognizes invalid or missing API keys, expired OAuth tokens, `401 Unauthorized` and low credit balances, from Claude Code and from custom adapters (for example one wrapping `codex exec`), instead of reporting a generic agent crash.
|
|
17
70
|
|
|
18
71
|
### Changed
|
package/README.md
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
[](https://github.com/nguyentan510/agengo/actions/workflows/ci.yml)
|
|
12
12
|
[](#requirements)
|
|
13
13
|
[](https://claude.com/claude-code)
|
|
14
|
-
[](https://crates.io/crates/agengo)
|
|
15
|
+
[](https://www.npmjs.com/package/agengo)
|
|
15
16
|
|
|
16
17
|
[Features](#features) · [How it works](#how-it-works) · [Quick start](#quick-start) · [Docs](docs/README.md) · [FAQ](#faq) · [Tiếng Việt](README.vi.md)
|
|
17
18
|
|
|
@@ -43,9 +44,34 @@ Running an agent directly on your repository is fast but hard to control. It may
|
|
|
43
44
|
| An interruption loses track of progress | State lives in SQLite; `resume` continues where it stopped, even after Ctrl‑C |
|
|
44
45
|
| Questions get lost in chat | A decision inbox lists each `Y-xx` request together with the command that answers it |
|
|
45
46
|
|
|
47
|
+
## Principles
|
|
48
|
+
|
|
49
|
+
agengo does not write code; it decides when an agent's work is accepted. Eight rules define it, and no option or preset bends them:
|
|
50
|
+
|
|
51
|
+
1. **Your branches are never touched.** Work lands only on `af/<run-id>`; agengo never merges into `main` and never pushes.
|
|
52
|
+
2. **Done means checked.** Your `verify` commands must pass in a clean worktree, and `final_verify` on the final branch.
|
|
53
|
+
3. **Nobody reviews their own work.** A separate Reviewer checks the exact commit. Review can be lighter; it cannot be off.
|
|
54
|
+
4. **Scope is enforced.** A task changes only the paths it `owns`; overlapping tasks never run at the same time.
|
|
55
|
+
5. **People decide, agents propose.** Spec questions, approvals and `Y-xx` requests are answered by a person, never by an agent.
|
|
56
|
+
6. **One record per decision.** Product decisions live in the approved spec, locked by a digest.
|
|
57
|
+
7. **Every run can be resumed and audited.** Durable state, and each attempt's request, result, timing, tokens and cost.
|
|
58
|
+
8. **Any agent, one protocol.** agengo records the model and cost the agent reports; it does not pick them.
|
|
59
|
+
|
|
60
|
+
agengo keeps its own files in one folder, so your repository root stays yours:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
.agengo/
|
|
64
|
+
├── principles.md # your stack, commands and conventions, read by the spec and plan agents
|
|
65
|
+
├── spec.yaml # the approved spec, from `agengo spec --idea`
|
|
66
|
+
└── plans/
|
|
67
|
+
└── p1-admin.yaml # one plan per run, named after its run ID → branch af/p1-admin
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
agengo is **not** a sandbox, a code generator, CI or a model router, and there is no mode that delivers unreviewed work. The invariants in full, and how to judge a proposed change, are in [CONTRIBUTING](CONTRIBUTING.md#the-invariants); the repository layout and naming conventions are in the [user guide](docs/guide.md#conventions).
|
|
71
|
+
|
|
46
72
|
## Features
|
|
47
73
|
|
|
48
|
-
- 🤖 **Multi-agent workflow:** Builder → verification → Reviewer → integration → final checks. Claude Code
|
|
74
|
+
- 🤖 **Multi-agent workflow:** Builder → verification → Reviewer → integration → final checks. Claude Code, Codex and Antigravity start by name with their own subscription login, and any other agent can plug in through a [JSON adapter](docs/reference.md#adapter-protocol).
|
|
49
75
|
- 🌳 **Git worktree isolation:** every build, review and integration attempt runs in its own worktree, and worktrees are cleaned up automatically.
|
|
50
76
|
- ⚡ **Safe parallelism:** `--jobs N` runs independent tasks concurrently; tasks with overlapping file scopes are serialized, and `depends` ordering is enforced.
|
|
51
77
|
- ✅ **Mandatory verification:** each task's `verify` commands, `integration_verify` after every merge, and `final_verify` before hand-off.
|
|
@@ -54,8 +80,8 @@ Running an agent directly on your repository is fast but hard to control. It may
|
|
|
54
80
|
- 🧑⚖️ **Human in the loop:** approve plans before they run, choose between options A and B, amend the plan as a new revision, and pause or resume individual tasks.
|
|
55
81
|
- 🧬 **Quality gates:** tree-sitter–based detection of duplicated Python functions (`off`/`warn`/`block`), plus any lint or test commands you add.
|
|
56
82
|
- 💾 **Crash-safe:** transactional SQLite state, a per-run lock, and timeouts and output limits for agent processes.
|
|
57
|
-
- 📊 **Cost transparency:** `status --json` records every attempt's request, result, duration, tokens and cost; `agengo metrics` totals tokens and cost per role and per task, for Claude Code or any adapter that reports [`usage`](#token-and-cost-usage).
|
|
58
|
-
- 🎯 **Reliability evidence:** `agengo metrics` also reports the first-review pass rate, review rounds, gate and review failures, findings by state and severity, and results per model; `agengo metrics --all` adds them up across every run in the repository, so you can compare agents and models. See [Metrics](docs/
|
|
83
|
+
- 📊 **Cost transparency:** `status --json` records every attempt's request, result, duration, tokens and cost; `agengo metrics` totals tokens and cost per role and per task, for Claude Code or any adapter that reports [`usage`](docs/reference.md#token-and-cost-usage-optional).
|
|
84
|
+
- 🎯 **Reliability evidence:** `agengo metrics` also reports the first-review pass rate, review rounds, gate and review failures, findings by state and severity, and results per model; `agengo metrics --all` adds them up across every run in the repository, so you can compare agents and models. See [Metrics](docs/reference.md#metrics).
|
|
59
85
|
|
|
60
86
|
## How it works
|
|
61
87
|
|
|
@@ -71,7 +97,7 @@ Tasks move through `pending → building → ready_review → reviewing → pass
|
|
|
71
97
|
- Linux, macOS or Windows 10/11. On Windows, Claude Code needs [Git for Windows](https://git-scm.com/downloads/win).
|
|
72
98
|
- Node.js 14.18+ for the npm package, or Rust/Cargo 1.90+ and a C compiler to build from source. Prebuilt binaries need neither.
|
|
73
99
|
- Git 2.31+ with `user.name` and `user.email` configured.
|
|
74
|
-
-
|
|
100
|
+
- A coding agent on `PATH` and logged in: [Claude Code](https://claude.com/claude-code) (`claude`), Codex (`codex`) or Antigravity (`agy`); or your own adapter passed with `--agent <executable>`. With several installed, run `agengo agent use NAME` once; `agengo config set think.model …` sets a stronger model for planning and review and a cheaper one for building.
|
|
75
101
|
|
|
76
102
|
## Installation
|
|
77
103
|
|
|
@@ -98,7 +124,7 @@ Binaries and checksums for each version are on the [Releases](https://github.com
|
|
|
98
124
|
## Quick start
|
|
99
125
|
|
|
100
126
|
```yaml
|
|
101
|
-
#
|
|
127
|
+
# .agengo/plans/demo.yaml
|
|
102
128
|
schema_version: 1
|
|
103
129
|
goal: Add a greeting helper
|
|
104
130
|
tasks:
|
|
@@ -111,71 +137,25 @@ final_verify: [["python3", "-m", "pytest", "-q"]]
|
|
|
111
137
|
```
|
|
112
138
|
|
|
113
139
|
```bash
|
|
114
|
-
agengo init
|
|
115
|
-
agengo plan --file
|
|
116
|
-
agengo run
|
|
117
|
-
agengo status demo
|
|
118
|
-
agengo inbox demo
|
|
119
|
-
git log --oneline main..af/demo
|
|
140
|
+
agengo init # once per repository: skill, .agengo/principles.md, .agengo/plans/
|
|
141
|
+
agengo plan --file .agengo/plans/demo.yaml --brief # validate the plan without calling an agent
|
|
142
|
+
agengo run .agengo/plans/demo.yaml --id demo # build → review → integrate → deliver
|
|
143
|
+
agengo status demo # progress
|
|
144
|
+
agengo inbox demo # pending requests, each with the command that answers it
|
|
145
|
+
git log --oneline main..af/demo # inspect the result before merging
|
|
120
146
|
```
|
|
121
147
|
|
|
122
148
|
<img src="assets/demo-terminal.png" alt="Real agengo output after a Claude Code run: delivered branch, per-role tokens and cost, and the merge graph" width="100%">
|
|
123
149
|
|
|
124
|
-
No plan yet? Let the agent draft one: `agengo plan --goal "Add a login API" --format yaml >
|
|
125
|
-
|
|
126
|
-
Exit codes: `0` delivered · `2` waiting for your answer (then run `resume`) · `1` error · `130` interrupted (run `resume`).
|
|
127
|
-
|
|
128
|
-
## Plan format
|
|
150
|
+
No plan yet? Let the agent draft one: `agengo plan --goal "Add a login API" --format yaml > .agengo/plans/p1-login.yaml`. Only a rough idea? Settle it first with `agengo spec --idea "a booking app for my barbershop"`, which writes `.agengo/spec.yaml`, then draft a plan that must cover it with `agengo plan --spec .agengo/spec.yaml` (see [Clarifying an idea](docs/guide.md#clarifying-an-idea)).
|
|
129
151
|
|
|
130
|
-
|
|
152
|
+
Name each run `<phase>-<scope>` (`p1-login`, `p2-voucher`) and its plan file after it, so the plan, the branch `af/<run-id>` and the reports share one name.
|
|
131
153
|
|
|
132
|
-
|
|
133
|
-
|---|---|---|
|
|
134
|
-
| `goal` | ✔ | Overall goal of the run |
|
|
135
|
-
| `tasks[].id` | ✔ | 1–64 characters from `A-Z a-z 0-9 _ -`, unique |
|
|
136
|
-
| `tasks[].goal` / `title` | goal ✔ | Instructions for the agent / short title for humans |
|
|
137
|
-
| `tasks[].owns` | ✔ | Files or directories the Builder may change. Tasks with overlapping scopes never run in parallel |
|
|
138
|
-
| `tasks[].acceptance` | ✔ | Acceptance criteria, as strings or `{id, text}` |
|
|
139
|
-
| `tasks[].verify` | ✔ | argv commands run on the candidate before review and again at integration |
|
|
140
|
-
| `tasks[].depends` | | Tasks that must be integrated first |
|
|
141
|
-
| `tasks[].setup`, `setup` | | Commands that prepare each worktree, e.g. `[["npm","ci"]]` |
|
|
142
|
-
| `integration_verify` | | Commands run after every merge |
|
|
143
|
-
| `final_verify` | ✔ | Commands run on the final branch before delivery |
|
|
144
|
-
| `quality` | | `python_duplicates: off \| warn \| block`, `ignore_paths`, extra `checks`, `review: true` for a whole-branch review, `verify_findings: true` to have a verifier try to refute blocking review findings first |
|
|
145
|
-
|
|
146
|
-
Commands are argv arrays and never go through a shell. Use `["sh", "-c", "..."]` if you need shell syntax.
|
|
147
|
-
|
|
148
|
-
## Commands
|
|
149
|
-
|
|
150
|
-
| Command | Purpose |
|
|
151
|
-
|---|---|
|
|
152
|
-
| `plan --file F` / `--goal G` / `--from F` | Validate a plan, or have the agent draft one |
|
|
153
|
-
| `run PLAN [--id ID] [--jobs N] [--base REV]` | Start a run (`--review-limit`, `--gate-limit`, `--timeout`, `--builder-handoff worktree\|commit`, `--agent`, `--auth subscription\|api`, `--await-approval`) |
|
|
154
|
-
| `resume ID` / `resume ID --task T` / `pause ID --task T` | Continue a run, unpause a task, pause a task |
|
|
155
|
-
| `status ID [--json]` · `inbox ID [--json]` · `metrics ID [--json]` | Progress, pending requests, timing, tokens, cost and reliability figures |
|
|
156
|
-
| `metrics --all [--json]` | Reliability and cost for every run in the repository, combined and per model |
|
|
157
|
-
| `respond ID Y-xx --choice A\|B\|approve\|reject --note N [--plan F]` | Answer a request |
|
|
158
|
-
| `resolve ID TASK --note N` · `amend ID PLAN --note N` | Reopen a blocked task · approve a new plan revision |
|
|
159
|
-
| `clean ID` | Remove the run's worktrees (and its temporary refs once delivered) |
|
|
160
|
-
| `init [--no-agents-md]` | Install the agengo skill for Claude Code and Codex, and a section in `AGENTS.md`, so agents in this repository hand multi-task work to agengo |
|
|
161
|
-
|
|
162
|
-
## Adapter protocol
|
|
163
|
-
|
|
164
|
-
With `--agent <exe>`, agengo runs the executable once per assignment, inside the assigned worktree:
|
|
165
|
-
|
|
166
|
-
- **Input:** a request JSON on **stdin**, following [specs/request.schema.json](specs/request.schema.json). It includes `role`, `task`, `head`, `base`, `context` with acceptance criteria and open findings, `decisions` and `relationships`.
|
|
167
|
-
- **Output:** one result JSON on **stdout**, following [specs/outcome.schema.json](specs/outcome.schema.json):
|
|
168
|
-
|
|
169
|
-
```json
|
|
170
|
-
{"status": "done", "head": "<sha>", "summary": "…", "blocker": null,
|
|
171
|
-
"findings": [], "finding_resolutions": [], "resolved_conflicts": []}
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### Token and cost usage
|
|
154
|
+
Exit codes: `0` delivered · `2` waiting for your answer (then run `resume`) · `1` error · `130` interrupted (run `resume`).
|
|
175
155
|
|
|
176
|
-
|
|
156
|
+
## Learn more
|
|
177
157
|
|
|
178
|
-
The
|
|
158
|
+
The [reference](docs/reference.md) has the exact [plan format](docs/reference.md#plan-format), every [command](docs/reference.md#commands) and the [adapter protocol](docs/reference.md#adapter-protocol). The [user guide](docs/guide.md) shows how to settle an idea, answer `Y-xx` requests and connect your coding agent.
|
|
179
159
|
|
|
180
160
|
## FAQ
|
|
181
161
|
|
|
@@ -183,7 +163,7 @@ The Builder returns `done` (commit handoff) or `ready` (worktree handoff). The R
|
|
|
183
163
|
No. It only creates and updates the local branch `af/<run-id>` and never pushes. Merging is your decision.
|
|
184
164
|
|
|
185
165
|
**Can I use an agent other than Claude Code?**
|
|
186
|
-
Yes.
|
|
166
|
+
Yes. `--agent codex` and `--agent agy` start Codex and Antigravity with their own login, `agengo agent use NAME` keeps the choice for a repository, and any executable that speaks the [JSON adapter protocol](docs/reference.md#adapter-protocol) works. If one platform is down, switch with `--agent` or `agengo resume ID --agent NAME`.
|
|
187
167
|
|
|
188
168
|
**Does it use my Claude or ChatGPT subscription, or an API key?**
|
|
189
169
|
Your subscription. By default (`--auth subscription`) agengo removes `ANTHROPIC_API_KEY`, `OPENAI_API_KEY` and similar variables from the agents' environment, because Claude Code and Codex would otherwise bill the key first. Log in once with the agent's own CLI (`claude` then `/login`, or `codex login`). Pass `--auth api` to use API keys instead.
|
|
@@ -195,7 +175,7 @@ Run `agengo init` in the repository. It installs an agengo skill that both agent
|
|
|
195
175
|
Each attempt has a timeout (`--timeout`, 900 s by default). Failures turn into `Y-xx` requests. Answer with `agengo respond`, then run `agengo resume`.
|
|
196
176
|
|
|
197
177
|
**Where is data stored?**
|
|
198
|
-
|
|
178
|
+
Your principles, spec and plans live in `.agengo/`; commit them. Run state is kept in `.git/agent-flow/state.sqlite3`, including a copy of each approved plan, so overwriting a plan file never changes a run. Temporary worktrees live under `~/.cache/agengo/worktrees` (`%LOCALAPPDATA%\agengo\worktrees` on Windows; override with `AGENGO_WORKTREES`) and are removed after delivery or by `agengo clean <run>`.
|
|
199
179
|
|
|
200
180
|
**Is it a sandbox?**
|
|
201
181
|
No. agengo checks file scope, commit SHAs, the index and branches after every attempt, ignores Git hooks in its own commands, and stops the run if an agent changes the repository's hooks or Git configuration. Agents can still run Bash, though. For untrusted code or agents, run agengo inside a container or VM. See [security limits](docs/guide.md#security-limits).
|
|
@@ -205,18 +185,17 @@ agengo itself is free. You pay for the agent you use, such as Claude Code. Every
|
|
|
205
185
|
|
|
206
186
|
## Documentation
|
|
207
187
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
188
|
+
| Read | When |
|
|
189
|
+
|---|---|
|
|
190
|
+
| [User guide](docs/guide.md) | You want to do something: install, run, answer requests, connect an agent |
|
|
191
|
+
| [Reference](docs/reference.md) | You need exact syntax: commands, plan format, adapter protocol, metrics |
|
|
192
|
+
| [Glossary](docs/glossary.md) | A term or CLI label is unclear |
|
|
193
|
+
| [CONTRIBUTING](CONTRIBUTING.md) · [Architecture](docs/architecture.md) | You want to change agengo |
|
|
194
|
+
| [CHANGELOG](CHANGELOG.md) · [Documentation index](docs/README.md) | You are upgrading, or want the full list |
|
|
213
195
|
|
|
214
196
|
## Development
|
|
215
197
|
|
|
216
|
-
|
|
217
|
-
cargo test --locked # unit + system tests with a simulated agent
|
|
218
|
-
AGENGO_CLAUDE_E2E=1 cargo test --locked --test system # plus one real Claude Code run (uses API credits)
|
|
219
|
-
```
|
|
198
|
+
See [CONTRIBUTING](CONTRIBUTING.md) for how to build, test and propose a change.
|
|
220
199
|
|
|
221
200
|
---
|
|
222
201
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"hasInstallScript": true,
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"name": "agengo",
|
|
22
|
-
"version": "0.
|
|
22
|
+
"version": "0.5.1"
|
|
23
23
|
},
|
|
24
24
|
"node_modules/detect-libc": {
|
|
25
25
|
"engines": {
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"requires": true,
|
|
51
|
-
"version": "0.
|
|
51
|
+
"version": "0.5.1"
|
|
52
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"artifactDownloadUrls": [
|
|
3
|
-
"https://github.com/nguyentan510/agengo/releases/download/v0.
|
|
3
|
+
"https://github.com/nguyentan510/agengo/releases/download/v0.5.1"
|
|
4
4
|
],
|
|
5
5
|
"bin": {
|
|
6
6
|
"agengo": "run-agengo.js"
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"zipExt": ".tar.xz"
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
|
-
"version": "0.
|
|
93
|
+
"version": "0.5.1",
|
|
94
94
|
"volta": {
|
|
95
95
|
"node": "18.14.1",
|
|
96
96
|
"npm": "9.5.0"
|