agengo 0.3.0 → 0.4.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/CHANGELOG.md +42 -0
- package/README.md +28 -13
- package/npm-shrinkwrap.json +2 -2
- package/package.json +23 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **Project principles for the spec and plan agents.** `agengo init` creates `.agengo/principles.md`, a short template for the project's stack, commands, conventions and what agents must never do, and never overwrites it afterwards. `agengo spec` and `agengo plan` send it, without its guidance comments, as `principles`, so the agents use the project's own test commands and conventions instead of inferring them from the repository, and ask nothing it already settles. An empty template is ignored, and a file longer than 32 KiB is rejected. The skill offers to fill it from the repository and writes it only after the user agrees.
|
|
7
|
+
- **Plans record the planner's assumptions.** The planner now lists each choice the goal, spec and principles left open (a storage format, a library, a default) with its impact and what would change if it is wrong, and `plan --brief` shows the high and medium ones next to the tasks, so the approver sees what was guessed before a run spends money. Plans store them as `assumptions`; they do not change the run.
|
|
8
|
+
- **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
|
+
- **`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
|
+
- **`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/guide.md#metrics).
|
|
12
|
+
- **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
|
+
- **`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
|
+
- **`--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).
|
|
16
|
+
- **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
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- **Review findings have a severity, and only `critical` and `high` findings block.** The Reviewer now rates each finding `critical`, `high`, `medium` or `low`. `medium` and `low` findings are stored as `advisory`, shown in `status --json`, and no longer send the task back to the Builder, so a review can pass with them. Adapters that omit `severity` keep the old behavior: their findings count as `high`. This also applies to the whole-branch review, where reuse findings that only suggest sharing code are now `medium`.
|
|
20
|
+
- **Sharper review instructions.** The Reviewer reads the code around each change, reports only findings it is confident about with evidence, merges repeats of one root cause into one finding, skips style and unchanged code, and checks for silent failures (swallowed errors, fallbacks that hide failures) and security problems. The guidance is adapted from the MIT-licensed [ECC](https://github.com/affaan-m/ECC) reviewer agents.
|
|
21
|
+
- **Build candidates are pinned under `refs/agengo/builds/<run>/<attempt>`** instead of `refs/agent-flow/builds/…`, matching the project name. Refs left by 0.3.x are moved automatically by the next command that works on runs (`run`, `resume`, `respond`, `status`, `clean`, …), so paused runs resume with the same candidates. The state directory `.git/agent-flow/` keeps its name.
|
|
22
|
+
- **Agent replies are checked when they arrive.** Requests and replies are typed (`src/agent.rs`): a reply with an unknown `status` or `blocker.kind`, a non-string `summary`, or a field of the wrong type becomes an incident whose message names the field (for example `invalid agent reply: unknown variant "finished"`), instead of failing later with a generic error or being read as `null`. Missing lists still count as empty and unknown fields are still ignored. Stored requests from earlier versions are read unchanged.
|
|
23
|
+
- **Internal:** plans and tasks are now typed Rust structs (`src/plan.rs`) instead of `serde_json::Value` read by string keys, so a misspelled field is a compile error rather than a silently empty list (which, for `verify`, would have skipped the checks). The stored and transmitted JSON is unchanged; a task id missing from the plan is now an error instead of an empty task.
|
|
24
|
+
- Repository hooks no longer run during agengo's own merges and worktree operations. Hooks still run for Git commands the agents themselves execute.
|
|
25
|
+
- A setup command that installs hooks or changes Git configuration (for example husky or pre-commit) stops the run once with an `action` request; resuming accepts the change.
|
|
26
|
+
|
|
27
|
+
### Security
|
|
28
|
+
- **An agent could plant Git hooks or configuration that ran outside its worktree.** Worktrees share `hooks/` and `config` with your repository, so a Builder could install, say, a `post-checkout` hook that agengo's next `git worktree add` (and your own Git commands later) would run. agengo's Git commands now run with `core.hooksPath=/dev/null` and `core.fsmonitor=false`. During a run, agengo also records the repository's `config`, `config.worktree`, `hooks/` and `info/attributes`; if an agent attempt or a check changes them, the result is rejected and the task waits for an `action` request.
|
|
29
|
+
- agengo warns when one of your branches or tags moves while agents are running.
|
|
30
|
+
- **The bundled SQLite is updated to 3.54** (`rusqlite` 0.43, `libsqlite3-sys` 0.40) for [RUSTSEC-2026-0459](https://rustsec.org/advisories/RUSTSEC-2026-0459) (CVE-2026-119375): earlier SQLite could return uninitialized memory when it opened a database together with a crafted `-wal` file. agengo opens only its own state database in `.git/agent-flow/`, so exposure needed someone who could already write there. CI now checks dependencies against the RustSec advisory database with `cargo-deny`.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
- **Piping agengo into a command that stops reading early (`agengo status demo | head`) no longer prints a panic.** agengo now exits quietly with status 141, the code shells report for a closed pipe.
|
|
34
|
+
- After `agengo spec --decision`, the spec header said "round 3 of 2"; rounds added after the interview now read "round 3, after the interview".
|
|
35
|
+
- **Build artifacts left by tests no longer block tasks in repositories without a `.gitignore`.** A Builder or Reviewer that ran `python3 -m unittest` left `__pycache__/*.pyc` behind, so the build was rejected with "files outside owns" and the review with "worktree has uncommitted changes". When agengo captures a build and checks that a worktree is clean, it now also ignores untracked `__pycache__/`, `*.py[cod]`, `.pytest_cache/`, `.mypy_cache/`, `.ruff_cache/`, `node_modules/`, `.DS_Store` and `Thumbs.db`, on top of the repository's own ignore rules. Your `core.excludesFile` and `.git/info/exclude` are left alone, and files Git already tracks are still captured. A task whose `owns` names such a path, or a path inside one, still commits it; owning `pkg` alone does not claim `pkg/__pycache__`. The planner is also told to have the task that sets up a project own and create `.gitignore` when the repository has none for its build outputs.
|
|
36
|
+
- **A check that left a background process running was reported as a timeout.** A command such as `sh -c "server & run-tests"` succeeded, but agengo waited for the background process to close its output and failed the check after `--timeout` (15 minutes by default). agengo now waits 2 seconds after the command exits, then stops what is left in its process group.
|
|
37
|
+
- The JSON schema passed to Claude Code with `--json-schema` is now a single line. Windows refuses line breaks in arguments to a batch file such as `claude.cmd`.
|
|
38
|
+
|
|
39
|
+
### Upgrading from 0.3.x
|
|
40
|
+
- Custom planners: `specs/planner-output.schema.json` now returns acceptance criteria as `{id, text, refs}` and adds `assumptions`. Plans with plain-text criteria and no assumptions still validate.
|
|
41
|
+
- Custom roles files: `specify` is optional, like `verify`; a file without it uses the built-in role.
|
|
42
|
+
- State databases from 0.3.x open unchanged; the new `run_specs` table is created on first use.
|
|
43
|
+
- `agengo init` now also creates `.agengo/principles.md`. Re-run it after upgrading and commit the files.
|
|
44
|
+
|
|
3
45
|
## 0.3.0
|
|
4
46
|
|
|
5
47
|
### Fixed
|
package/README.md
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
[](https://www.rust-lang.org)
|
|
11
11
|
[](https://github.com/nguyentan510/agengo/actions/workflows/ci.yml)
|
|
12
|
-
[](#requirements)
|
|
12
|
+
[](#requirements)
|
|
13
13
|
[](https://claude.com/claude-code)
|
|
14
|
-
[](CHANGELOG.md)
|
|
15
15
|
|
|
16
16
|
[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
17
|
|
|
@@ -49,11 +49,13 @@ Running an agent directly on your repository is fast but hard to control. It may
|
|
|
49
49
|
- 🌳 **Git worktree isolation:** every build, review and integration attempt runs in its own worktree, and worktrees are cleaned up automatically.
|
|
50
50
|
- ⚡ **Safe parallelism:** `--jobs N` runs independent tasks concurrently; tasks with overlapping file scopes are serialized, and `depends` ordering is enforced.
|
|
51
51
|
- ✅ **Mandatory verification:** each task's `verify` commands, `integration_verify` after every merge, and `final_verify` before hand-off.
|
|
52
|
-
- 🔍 **Tracked review findings:** findings (`F-01`, …) are tied to acceptance criteria and followed across fix rounds. An optional whole-branch review is available.
|
|
52
|
+
- 🔍 **Tracked review findings:** findings (`F-01`, …) are tied to acceptance criteria, carry a severity, and are followed across fix rounds. Only `critical` and `high` findings block; `medium` and `low` ones are kept as advisory notes for you. An optional whole-branch review is available, and `quality.verify_findings` has a second agent try to refute blocking findings before the task goes back to the Builder.
|
|
53
|
+
- 💬 **From rough idea to spec:** `agengo spec` turns a one-line idea into a spec of what to build (user stories, measurable success criteria, what is out of scope, visible assumptions) by asking at most a few multiple-choice questions in plain words, never about technology. agengo enforces the question limits and locks the approved spec with a digest. In Claude Code the questions appear as clickable choices.
|
|
53
54
|
- 🧑⚖️ **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.
|
|
54
55
|
- 🧬 **Quality gates:** tree-sitter–based detection of duplicated Python functions (`off`/`warn`/`block`), plus any lint or test commands you add.
|
|
55
56
|
- 💾 **Crash-safe:** transactional SQLite state, a per-run lock, and timeouts and output limits for agent processes.
|
|
56
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/guide.md#metrics).
|
|
57
59
|
|
|
58
60
|
## How it works
|
|
59
61
|
|
|
@@ -66,14 +68,14 @@ Tasks move through `pending → building → ready_review → reviewing → pass
|
|
|
66
68
|
|
|
67
69
|
## Requirements
|
|
68
70
|
|
|
69
|
-
- Linux or
|
|
71
|
+
- Linux, macOS or Windows 10/11. On Windows, Claude Code needs [Git for Windows](https://git-scm.com/downloads/win).
|
|
70
72
|
- 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.
|
|
71
73
|
- Git 2.31+ with `user.name` and `user.email` configured.
|
|
72
74
|
- Either [Claude Code](https://claude.com/claude-code) on `PATH` and logged in, or your own adapter passed with `--agent <executable>`.
|
|
73
75
|
|
|
74
76
|
## Installation
|
|
75
77
|
|
|
76
|
-
Prebuilt binaries are available for Linux and macOS (x64 and arm64).
|
|
78
|
+
Prebuilt binaries are available for Linux and macOS (x64 and arm64) and Windows (x64).
|
|
77
79
|
|
|
78
80
|
```bash
|
|
79
81
|
npm install -g agengo # or try it without installing: npx agengo --help
|
|
@@ -83,6 +85,10 @@ npm install -g agengo # or try it without installing: npx agengo --help
|
|
|
83
85
|
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/nguyentan510/agengo/releases/latest/download/agengo-installer.sh | sh
|
|
84
86
|
```
|
|
85
87
|
|
|
88
|
+
```powershell
|
|
89
|
+
powershell -ExecutionPolicy ByPass -c "irm https://github.com/nguyentan510/agengo/releases/latest/download/agengo-installer.ps1 | iex" # Windows
|
|
90
|
+
```
|
|
91
|
+
|
|
86
92
|
```bash
|
|
87
93
|
cargo install agengo --locked # builds from source
|
|
88
94
|
```
|
|
@@ -105,6 +111,7 @@ final_verify: [["python3", "-m", "pytest", "-q"]]
|
|
|
105
111
|
```
|
|
106
112
|
|
|
107
113
|
```bash
|
|
114
|
+
agengo init # once per repository: teach your coding agents when to call agengo
|
|
108
115
|
agengo plan --file plan.yaml --brief # validate the plan without calling an agent
|
|
109
116
|
agengo run plan.yaml --id demo # build → review → integrate → deliver
|
|
110
117
|
agengo status demo # progress
|
|
@@ -114,7 +121,7 @@ git log --oneline main..af/demo # inspect the result before merging
|
|
|
114
121
|
|
|
115
122
|
<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%">
|
|
116
123
|
|
|
117
|
-
No plan yet? Let the agent draft one: `agengo plan --goal "Add a login API" --format yaml > plan.yaml`.
|
|
124
|
+
No plan yet? Let the agent draft one: `agengo plan --goal "Add a login API" --format yaml > plan.yaml`. Only a rough idea? Settle it first with `agengo spec --idea "a booking app for my barbershop"`, then draft a plan that must cover it with `agengo plan --spec spec.yaml` (see [Clarifying an idea](docs/guide.md#clarifying-an-idea)).
|
|
118
125
|
|
|
119
126
|
Exit codes: `0` delivered · `2` waiting for your answer (then run `resume`) · `1` error · `130` interrupted (run `resume`).
|
|
120
127
|
|
|
@@ -134,7 +141,7 @@ A plan is YAML or JSON, validated against [specs/plan.schema.json](specs/plan.sc
|
|
|
134
141
|
| `tasks[].setup`, `setup` | | Commands that prepare each worktree, e.g. `[["npm","ci"]]` |
|
|
135
142
|
| `integration_verify` | | Commands run after every merge |
|
|
136
143
|
| `final_verify` | ✔ | Commands run on the final branch before delivery |
|
|
137
|
-
| `quality` | | `python_duplicates: off \| warn \| block`, `ignore_paths`, extra `checks`, `review: true` for a whole-branch review |
|
|
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 |
|
|
138
145
|
|
|
139
146
|
Commands are argv arrays and never go through a shell. Use `["sh", "-c", "..."]` if you need shell syntax.
|
|
140
147
|
|
|
@@ -143,12 +150,14 @@ Commands are argv arrays and never go through a shell. Use `["sh", "-c", "..."]`
|
|
|
143
150
|
| Command | Purpose |
|
|
144
151
|
|---|---|
|
|
145
152
|
| `plan --file F` / `--goal G` / `--from F` | Validate a plan, or have the agent draft one |
|
|
146
|
-
| `run PLAN [--id ID] [--jobs N] [--base REV]` | Start a run (`--review-limit`, `--gate-limit`, `--timeout`, `--builder-handoff worktree\|commit`, `--agent`, `--await-approval`) |
|
|
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`) |
|
|
147
154
|
| `resume ID` / `resume ID --task T` / `pause ID --task T` | Continue a run, unpause a task, pause a task |
|
|
148
|
-
| `status ID [--json]` · `inbox ID [--json]` · `metrics ID [--json]` | Progress, pending requests, timing, tokens and
|
|
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 |
|
|
149
157
|
| `respond ID Y-xx --choice A\|B\|approve\|reject --note N [--plan F]` | Answer a request |
|
|
150
158
|
| `resolve ID TASK --note N` · `amend ID PLAN --note N` | Reopen a blocked task · approve a new plan revision |
|
|
151
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 |
|
|
152
161
|
|
|
153
162
|
## Adapter protocol
|
|
154
163
|
|
|
@@ -166,7 +175,7 @@ With `--agent <exe>`, agengo runs the executable once per assignment, inside the
|
|
|
166
175
|
|
|
167
176
|
An adapter may add an optional top-level `usage` object, following [specs/usage.schema.json](specs/usage.schema.json): `input_tokens` (uncached input), `output_tokens`, `cache_read_tokens`, `cache_write_tokens`, `cost_usd` and `model`. Malformed fields are dropped and never fail an attempt. agengo does not price tokens itself. For Claude Code, usage and `total_cost_usd` are read automatically. Mappings for the Anthropic, OpenAI, Gemini and Ollama APIs are in the [user guide](docs/guide.md#token-and-cost-usage-optional).
|
|
168
177
|
|
|
169
|
-
The Builder returns `done` (commit handoff) or `ready` (worktree handoff). The Reviewer returns `pass` or `changes_requested
|
|
178
|
+
The Builder returns `done` (commit handoff) or `ready` (worktree handoff). The Reviewer returns `pass` or `changes_requested`; each finding has a `severity` (`critical`, `high`, `medium` or `low`, `high` when omitted). Any role may return `blocked` with a `blocker` (`action`, `decision` or `information`). A non-zero exit, output that is not JSON, or a timeout becomes a `Y-xx` decision. A complete reference adapter lives in [tests/support/mod.rs](tests/support/mod.rs).
|
|
170
179
|
|
|
171
180
|
## FAQ
|
|
172
181
|
|
|
@@ -176,17 +185,23 @@ No. It only creates and updates the local branch `af/<run-id>` and never pushes.
|
|
|
176
185
|
**Can I use an agent other than Claude Code?**
|
|
177
186
|
Yes. Any executable that speaks the [JSON adapter protocol](#adapter-protocol) works.
|
|
178
187
|
|
|
188
|
+
**Does it use my Claude or ChatGPT subscription, or an API key?**
|
|
189
|
+
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.
|
|
190
|
+
|
|
191
|
+
**How does Claude Code or Codex know to call agengo?**
|
|
192
|
+
Run `agengo init` in the repository. It installs an agengo skill that both agents load, describing when to hand work to agengo and how to drive a run.
|
|
193
|
+
|
|
179
194
|
**What happens if the agent hangs or crashes?**
|
|
180
195
|
Each attempt has a timeout (`--timeout`, 900 s by default). Failures turn into `Y-xx` requests. Answer with `agengo respond`, then run `agengo resume`.
|
|
181
196
|
|
|
182
197
|
**Where is data stored?**
|
|
183
|
-
State is kept in `.git/agent-flow/state.sqlite3`. Temporary worktrees live under `~/.cache/agengo/worktrees` (override with `AGENGO_WORKTREES`) and are removed after delivery or by `agengo clean <run>`.
|
|
198
|
+
State is kept in `.git/agent-flow/state.sqlite3`. 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>`.
|
|
184
199
|
|
|
185
200
|
**Is it a sandbox?**
|
|
186
|
-
No. agengo checks file scope, commit SHAs, the index and branches after every attempt,
|
|
201
|
+
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).
|
|
187
202
|
|
|
188
203
|
**What does it cost?**
|
|
189
|
-
agengo itself is free. You pay for the agent you use, such as Claude Code. Every task needs at least one build attempt and one review attempt, and on small tasks the review can cost nearly as much as the build. `agengo metrics` reports real tokens and cost per role and per task. Recording them adds about 1 ms per attempt and makes no extra API calls.
|
|
204
|
+
agengo itself is free. You pay for the agent you use, such as Claude Code. Every task needs at least one build attempt and one review attempt, and on small tasks the review can cost nearly as much as the build. `agengo metrics` reports real tokens and cost per role and per task. Recording them adds about 1 ms per attempt and makes no extra API calls. To see what the reviews cost you in rework, `agengo metrics ID` also shows how many tasks passed their first review and how many build attempts each integrated task took; `agengo metrics --all` totals cost and first-review pass rate across runs and per model. These reports only read the state database.
|
|
190
205
|
|
|
191
206
|
## Documentation
|
|
192
207
|
|
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.4.0"
|
|
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.4.0"
|
|
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.4.0"
|
|
4
4
|
],
|
|
5
5
|
"bin": {
|
|
6
6
|
"agengo": "run-agengo.js"
|
|
@@ -47,6 +47,13 @@
|
|
|
47
47
|
},
|
|
48
48
|
"zipExt": ".tar.xz"
|
|
49
49
|
},
|
|
50
|
+
"aarch64-pc-windows-msvc": {
|
|
51
|
+
"artifactName": "agengo-x86_64-pc-windows-msvc.zip",
|
|
52
|
+
"bins": {
|
|
53
|
+
"agengo": "agengo.exe"
|
|
54
|
+
},
|
|
55
|
+
"zipExt": ".zip"
|
|
56
|
+
},
|
|
50
57
|
"aarch64-unknown-linux-gnu": {
|
|
51
58
|
"artifactName": "agengo-aarch64-unknown-linux-gnu.tar.xz",
|
|
52
59
|
"bins": {
|
|
@@ -61,6 +68,20 @@
|
|
|
61
68
|
},
|
|
62
69
|
"zipExt": ".tar.xz"
|
|
63
70
|
},
|
|
71
|
+
"x86_64-pc-windows-gnu": {
|
|
72
|
+
"artifactName": "agengo-x86_64-pc-windows-msvc.zip",
|
|
73
|
+
"bins": {
|
|
74
|
+
"agengo": "agengo.exe"
|
|
75
|
+
},
|
|
76
|
+
"zipExt": ".zip"
|
|
77
|
+
},
|
|
78
|
+
"x86_64-pc-windows-msvc": {
|
|
79
|
+
"artifactName": "agengo-x86_64-pc-windows-msvc.zip",
|
|
80
|
+
"bins": {
|
|
81
|
+
"agengo": "agengo.exe"
|
|
82
|
+
},
|
|
83
|
+
"zipExt": ".zip"
|
|
84
|
+
},
|
|
64
85
|
"x86_64-unknown-linux-gnu": {
|
|
65
86
|
"artifactName": "agengo-x86_64-unknown-linux-gnu.tar.xz",
|
|
66
87
|
"bins": {
|
|
@@ -69,7 +90,7 @@
|
|
|
69
90
|
"zipExt": ".tar.xz"
|
|
70
91
|
}
|
|
71
92
|
},
|
|
72
|
-
"version": "0.
|
|
93
|
+
"version": "0.4.0",
|
|
73
94
|
"volta": {
|
|
74
95
|
"node": "18.14.1",
|
|
75
96
|
"npm": "9.5.0"
|