@r5n/ariadne 0.2.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/README.md +50 -7
- package/dist/cli.js +233 -124
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,11 +12,11 @@ Requires [Bun](https://bun.sh) and git.
|
|
|
12
12
|
|
|
13
13
|
## Quick start
|
|
14
14
|
|
|
15
|
-
Install it with Bun, then
|
|
15
|
+
Install it with Bun, then run the guided setup in a repository that has at least one commit:
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
18
|
bun add -g @r5n/ariadne
|
|
19
|
-
ari
|
|
19
|
+
ari install
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
To try an unreleased change, build it from this repository and link the single-file CLI onto your `PATH` instead:
|
|
@@ -27,7 +27,17 @@ bun --filter @r5n/ariadne build
|
|
|
27
27
|
ln -s "$PWD/packages/ariadne/dist/cli.js" ~/.local/bin/ari
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
`ari
|
|
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, the `ariadne` skill, 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
|
+
|
|
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
|
+
|
|
34
|
+
```sh
|
|
35
|
+
ari install --init --agent claude,codex --yes
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
After it writes, `ari install` prints what changed with the command that undoes each part, and the commands that lead back to your tasks. `ari doctor` checks the whole setup later without changing anything and names the fix for each problem; `ari install --check` does the same for a pipeline; `ari uninstall` removes hooks, MCP servers, skills and git hooks again and gives every file back byte for byte, leaving `.ari/` and your tasks alone.
|
|
39
|
+
|
|
40
|
+
`ari install` is built from smaller commands you can also run yourself: `ari init` creates the configuration and the `AGENTS.md` block, and `ari hooks install`, `ari mcp install`, `ari skills install` and `ari agents add` set up one target each.
|
|
31
41
|
|
|
32
42
|
Create a task and write its contract:
|
|
33
43
|
|
|
@@ -82,29 +92,62 @@ Memory is tiered by how often it changes:
|
|
|
82
92
|
| Task notes | the task record | with the task |
|
|
83
93
|
| Knowledge | `.ari/knowledge/*.md` | until archived |
|
|
84
94
|
|
|
85
|
-
`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.
|
|
95
|
+
`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.
|
|
86
96
|
|
|
87
97
|
## Integrations
|
|
88
98
|
|
|
89
99
|
| Layer | Works with | Set up with |
|
|
90
100
|
| --- | --- | --- |
|
|
101
|
+
| Everything below at once | the agents you choose | `ari install` |
|
|
91
102
|
| Instructions | every agent that reads `AGENTS.md` | `ari init` |
|
|
92
103
|
| Self-description | every agent with a shell | `ari --help --json` |
|
|
93
104
|
| Git hooks | every agent and person | `ari hooks install --agent git` (`pre-commit` runs `ari scope --staged`, `pre-push` runs `ari verify`) |
|
|
94
105
|
| CI | everything merged | `ari verify --base <ref>` as a required check, on a checkout with the full history |
|
|
95
106
|
| Agent hooks | Claude Code, Codex CLI, Gemini CLI; Cursor and GitHub Copilot CLI in part | `ari hooks install --agent <name>` |
|
|
96
|
-
|
|
|
107
|
+
| MCP tools | Claude Code, Codex CLI, Gemini CLI, Cursor | `ari mcp install --agent <name>` registers `ari mcp serve` |
|
|
108
|
+
| Skill | Claude Code, Codex CLI, Gemini CLI, Cursor | `ari skills install --agent <name>` |
|
|
109
|
+
| Headless runs | agents with a non-interactive mode | `ari agents add <preset>`, then `ari run`, with `routing` choosing the agent per stage |
|
|
110
|
+
| Review agents | agents with a read-only mode | `ari review`, and `review.agent` for the `review` gate |
|
|
111
|
+
|
|
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.
|
|
97
113
|
|
|
98
|
-
|
|
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 resolving stay with people. The skill teaches the loop, contract writing, the gates and the memory commands, and loads whenever a repository has `.ari/`.
|
|
99
115
|
|
|
100
116
|
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.
|
|
101
117
|
|
|
118
|
+
## Agents and review
|
|
119
|
+
|
|
120
|
+
`ari agents add` writes an agent from a preset with least-privilege, non-interactive flags, and `routing` decides who works on which stage. Here Claude Code implements, Codex reviews on another model, and Gemini CLI gives a second opinion:
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
ari agents add claude
|
|
124
|
+
ari agents add codex --role review --model gpt-5.5
|
|
125
|
+
ari agents add gemini --role review
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"routing": { "default": "claude", "review": "gemini" },
|
|
131
|
+
"review": { "command": null, "agent": "codex" }
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
`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
|
+
|
|
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).
|
|
138
|
+
|
|
139
|
+
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
|
+
|
|
141
|
+
## Trust
|
|
142
|
+
|
|
143
|
+
`.ari/config.json` and the project packs in `.ari/packs/` can start processes: agent commands, `review.command`, `review.argus`, `regression.setup` and `command` gates. Like direnv with an `.envrc`, ari starts them only after you trust them on this machine: `ari trust` shows the exact commands and records the SHA-256 of that configuration in `~/.ari/trust/`, and any change to those commands asks again. In CI, set `ARI_TRUST_CONFIG=1` for a repository that you control. Reading commands, `ari verify`, the git and agent hooks, the MCP read tools and gates that only run a contract's checks never need it. `ari init`, `ari install` and `ari agents add` keep trust for the configuration that they write themselves. See [the command reference](https://github.com/r5n-labs/clis/blob/develop/packages/ariadne/docs/reference.md#trust) and the [security policy](https://github.com/r5n-labs/clis/blob/develop/SECURITY.md).
|
|
144
|
+
|
|
102
145
|
## Documentation
|
|
103
146
|
|
|
104
147
|
- [Command reference](https://github.com/r5n-labs/clis/blob/develop/packages/ariadne/docs/reference.md): every command, its options, JSON output, exit codes and the hook adapters
|
|
105
148
|
- [Design](https://github.com/r5n-labs/clis/blob/develop/packages/ariadne/docs/design.md): contracts, gates, packs, memory and verification in detail
|
|
106
149
|
|
|
107
|
-
|
|
150
|
+
The `checks` and `invariants` of a task contract are shell commands from the repository, run with the same trust as package scripts, and the trust record does not cover them. Review a repository's `.ari/` before running `ari done` inside it. To report a vulnerability, read the [security policy](https://github.com/r5n-labs/clis/blob/develop/SECURITY.md).
|
|
108
151
|
|
|
109
152
|
## Licence
|
|
110
153
|
|