@r5n/ariadne 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/README.md +24 -6
- package/dist/cli.js +240 -210
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ bun --filter @r5n/ariadne build
|
|
|
27
27
|
ln -s "$PWD/packages/ariadne/dist/cli.js" ~/.local/bin/ari
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
`ari install` shows what is already set up, finds the agents on your `PATH` and asks what to install for each: `.ari/config.json` and a short managed block in `AGENTS.md` that teaches any agent the loop below, agent hooks, the MCP server,
|
|
30
|
+
`ari install` shows what is already set up, finds the agents on your `PATH` and asks what to install for each: `.ari/config.json` and a short managed block in `AGENTS.md` that teaches any agent the loop below, agent hooks, the MCP server, six `ariadne` skills that agents load on demand, git hooks and, optionally, which agents implement and review tasks. It warns before anything would run twice or clash with lefthook or husky, shows every file it will create or update, writes only after you confirm, then checks the result by starting `ari mcp serve`. Running it again is a status screen: when everything is current it asks nothing.
|
|
31
31
|
|
|
32
32
|
Without a terminal, or in a script, pass the choices as flags; `--yes` takes the recommended defaults and `--dry-run` prints the plan without writing:
|
|
33
33
|
|
|
@@ -52,6 +52,18 @@ ari ready add-profile-inheritance
|
|
|
52
52
|
ari start add-profile-inheritance
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
### Design a feature
|
|
56
|
+
|
|
57
|
+
To design before you build, create the task with the `feature` pack. Write its contract first, because the design has to list exactly the contract's criteria (`AC-1`, `AC-2` and so on):
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
ari new "Add profile inheritance" --pack feature --scope "src/profiles/**"
|
|
61
|
+
ari ready add-profile-inheritance
|
|
62
|
+
ari start add-profile-inheritance
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`ari new` also writes the design template to `.ari/designs/add-profile-inheritance.md`. The agent fills its sections, guided by the `ariadne-design` skill, and `ari check` lists every section that is still empty and every criterion that differs from the contract's. `ari snapshot --reason "design ready"` saves the plan, and then a person reads the design and runs `ari approve add-profile-inheritance`. `ari done` moves on to the implement and review stages.
|
|
66
|
+
|
|
55
67
|
## The loop
|
|
56
68
|
|
|
57
69
|
| Step | Command | What happens |
|
|
@@ -79,9 +91,12 @@ A pack is a methodology written as data: an ordered list of stages, each with an
|
|
|
79
91
|
| `spec-driven` | specify (approved), implement |
|
|
80
92
|
| `refactor` | refactor (tests unchanged) |
|
|
81
93
|
| `spike` | explore (a write-up in `.ari/designs/`) |
|
|
94
|
+
| `feature` | design (a structured design whose acceptance criteria match the contract's, and an approval), implement, review |
|
|
82
95
|
|
|
83
96
|
Choose the default with `ari init --pack tdd`, or per task with `ari new --pack bugfix`. A project can add its own packs in `.ari/packs/<name>.yaml`.
|
|
84
97
|
|
|
98
|
+
For a pack whose design stage lists required `sections`, such as `feature`, `ari new` also writes `.ari/designs/<id>.md` from a template, and `ari check` names every section that is still empty and every criterion id that the design and the contract do not share. The check is structural: a person's approval is what judges the design.
|
|
99
|
+
|
|
85
100
|
## Memory
|
|
86
101
|
|
|
87
102
|
Memory is tiered by how often it changes:
|
|
@@ -94,6 +109,8 @@ Memory is tiered by how often it changes:
|
|
|
94
109
|
|
|
95
110
|
`ari sleep` consolidates memory: it runs after every finished task and before an agent compacts its context. It prunes journals, archives duplicates and stale entries, keeps the knowledge within its byte budget and reports what needs judgement. Every pass is logged, `ari sleep --dry-run` shows what would change, and `ari sleep --undo` gives archived entries back byte for byte.
|
|
96
111
|
|
|
112
|
+
`ari snapshot` saves a task's plan (contract, stage, design files, notes) and its context pack in the worktree's git directory, so an agent whose context was reset or compacted can read back what it knew. `ari snapshot restore <id>` writes the design files back byte for byte and refuses when the contract changed or the task is done.
|
|
113
|
+
|
|
97
114
|
## Integrations
|
|
98
115
|
|
|
99
116
|
| Layer | Works with | Set up with |
|
|
@@ -104,14 +121,15 @@ Memory is tiered by how often it changes:
|
|
|
104
121
|
| Git hooks | every agent and person | `ari hooks install --agent git` (`pre-commit` runs `ari scope --staged`, `pre-push` runs `ari verify`) |
|
|
105
122
|
| CI | everything merged | `ari verify --base <ref>` as a required check, on a checkout with the full history |
|
|
106
123
|
| Agent hooks | Claude Code, Codex CLI, Gemini CLI; Cursor and GitHub Copilot CLI in part | `ari hooks install --agent <name>` |
|
|
107
|
-
| MCP tools | Claude Code, Codex CLI, Gemini CLI, Cursor | `ari mcp install --agent <name>` registers `ari mcp serve` |
|
|
108
|
-
|
|
|
124
|
+
| MCP tools | Claude Code, Codex CLI, Gemini CLI, Cursor | `ari mcp install --agent <name>` registers `ari mcp serve`; fifteen tools, among them `ari_snapshot`, `ari_snapshot_list` and `ari_snapshot_show` |
|
|
125
|
+
| Skills | Claude Code, Codex CLI, Gemini CLI, Cursor | `ari skills install --agent <name>` writes six skills that load on demand; `ari skills list` shows which are current |
|
|
109
126
|
| Headless runs | agents with a non-interactive mode | `ari agents add <preset>`, then `ari run`, with `routing` choosing the agent per stage |
|
|
110
127
|
| Review agents | agents with a read-only mode | `ari review`, and `review.agent` for the `review` gate |
|
|
128
|
+
| Snapshots | every agent with a shell | `ari snapshot`; also saved before a compaction (the `pre-compact` hook), after `ari approve` and when `ari done` advances a stage, unless `snapshots.auto` is `false` |
|
|
111
129
|
|
|
112
|
-
Agent hooks give early feedback: they deny edits and plain shell writes outside the scope, inside locked files or to ari's own records, refuse `ari approve`, `ari trust`, `ari uninstall` and commits that skip git hooks, keep the agent working until `ari done` has passed, and load the context pack when a session starts. The shell hook catches common mistakes. It [does not resolve shell code](https://github.com/r5n-labs/clis/blob/develop/packages/ariadne/docs/design.md#what-the-shell-hook-is-for), so an agent can get past it; `ari done`, `ari verify`, the git hooks and CI decide. `ari hooks uninstall --agent <name>` removes the hooks again. Ariadne never adds permission-bypass flags to an agent command.
|
|
130
|
+
Agent hooks give early feedback: they deny edits and plain shell writes outside the scope, inside locked files or to ari's own records, refuse `ari approve`, `ari trust`, `ari uninstall` and commits that skip git hooks, keep the agent working until `ari done` has passed, and load the context pack when a session starts (with no active task, a short brief of the tasks that can start, the latest snapshot and the project's constraints and decisions, up to `context.briefBytes`; `hooks.brief` turns it off). The shell hook catches common mistakes. It [does not resolve shell code](https://github.com/r5n-labs/clis/blob/develop/packages/ariadne/docs/design.md#what-the-shell-hook-is-for), so an agent can get past it; `ari done`, `ari verify`, the git hooks and CI decide. `ari hooks uninstall --agent <name>` removes the hooks again. Ariadne never adds permission-bypass flags to an agent command.
|
|
113
131
|
|
|
114
|
-
The MCP server gives the loop to agents as tools (`ari_next`, `ari_check`, `ari_done` and more) that return the same JSON documents as the commands; approving, amending and
|
|
132
|
+
The MCP server gives the loop to agents as tools (`ari_next`, `ari_check`, `ari_done`, `ari_snapshot` and more) that return the same JSON documents as the commands; approving, amending, resolving and restoring a snapshot stay with people. The six skills load on demand by their descriptions: `ariadne` (the loop and the gates, whenever a repository has `.ari/`), `ariadne-design`, `ariadne-contract`, `ariadne-implement`, `ariadne-review` and `ariadne-memory`. A skill is text that guides an agent and an agent may ignore it; the gates, the ledgers and the MCP tools are what is deterministic. Approving, amending, resolving and trusting stay with people, and so does restoring a snapshot over an approved design.
|
|
115
133
|
|
|
116
134
|
Every command that reports data accepts the global `--json` flag and then writes exactly one JSON document to stdout. Exit code 1 means a failure, including failing gates; exit code 2 means a usage error such as an unknown option.
|
|
117
135
|
|
|
@@ -134,7 +152,7 @@ ari agents add gemini --role review
|
|
|
134
152
|
|
|
135
153
|
`ari run` then drives a task with Claude Code, the `review` gate (as in the `sdlc` pack's review stage) asks Codex, and `ari review` asks Gemini CLI for its verdict without recording anything. A review agent works in a temporary copy of the change and must answer one JSON verdict; anything else, a timeout or a changed file fails the review.
|
|
136
154
|
|
|
137
|
-
A review can also see what [Argus](https://github.com/r5n-labs/clis/blob/develop/packages/argus/README.md) flags. Set `review.argus` to the path of an argus config that lives outside the repository, and the prompt gains a section "Candidates from a decision model (not verified defects)" with the answers that argus flagged in the files of the change, most confident first and cut to a byte cap. They are leads for the reviewer, never a verdict: the answer format and the fail-closed rules do not change, and if argus is missing or fails, the review runs without the section and says why. `mode: "cached"` (the default) reads answers that argus already holds and sends nothing anywhere; `mode: "run"` lets argus ask its model about the changed files, which sends their source to the model endpoint. `ari review --argus` insists on it and `--no-argus` skips it. See [the command reference](https://github.com/r5n-labs/clis/blob/develop/packages/ariadne/docs/reference.md#argus-candidates-as-evidence).
|
|
155
|
+
A review can also see what [Argus](https://github.com/r5n-labs/clis/blob/develop/packages/argus/README.md) flags. Set `review.argus` to the path of an argus config that lives outside the repository, and the prompt gains a section "Candidates from a decision model (not verified defects)" with the answers that argus flagged in the files of the change, most confident first and cut to a byte cap. They are leads for the reviewer, never a verdict: the answer format and the fail-closed rules do not change, and if argus is missing or fails, the review runs without the section and says why. `mode: "cached"` (the default) reads answers that argus already holds and sends nothing anywhere; `mode: "run"` lets argus ask its model about the changed files, which sends their source to the model endpoint. `ari review --argus` insists on it and `--no-argus` skips it. With `review.argus.verdicts` (or `--argus-verdicts`) each candidate also gets a short ID, and the reviewer may answer the leads that it checked with `confirmed`, `false_positive`, `deferred` or `uncertain` and a rationale; ari sends only those explicit answers to `argus verify --import`, never changes its own verdict because of them and leaves every unanswered candidate unreviewed. See [the command reference](https://github.com/r5n-labs/clis/blob/develop/packages/ariadne/docs/reference.md#argus-candidates-as-evidence).
|
|
138
156
|
|
|
139
157
|
An agent starts with a small base environment (`HOME`, `PATH` and the locale, terminal and `XDG_*` variables) plus the variables that its `env` names, so name an API key there: `"env": ["ANTHROPIC_API_KEY"]`. `"inheritEnv": true` passes everything instead and is an explicit choice.
|
|
140
158
|
|