austere-axi 0.2.0 → 0.3.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 +136 -102
- package/dist/austere.js +128 -153
- package/dist/catalog.json +1 -0
- package/dist/chrome/chrome.css +1 -1
- package/dist/chrome/chrome.js +5 -4
- package/dist/cli.mjs +1876 -278
- package/dist/pack-kit.mjs +284 -0
- package/dist/packs/mermaid/catalog.json +53 -0
- package/dist/packs/mermaid/pack.js +25 -0
- package/dist/prompt.md +4 -17
- package/package.json +2 -2
- package/skills/austere-setup/SKILL.md +83 -0
package/README.md
CHANGED
|
@@ -8,11 +8,7 @@
|
|
|
8
8
|
[](https://www.npmjs.com/package/austere-axi)
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
|
|
11
|
-
Review
|
|
12
|
-
|
|
13
|
-
The agent writes a short program: one named statement per line, built from a fixed set of components. The reviewer opens it in the browser, points at anything, and the agent gets the feedback back addressed by statement name. To revise, the agent edits only the statements the feedback names, and the page updates in place.
|
|
14
|
-
|
|
15
|
-
It is the same loop as [lavish-axi](https://github.com/kunchenguid/lavish-axi). The difference is that the agent never writes CSS or layout.
|
|
11
|
+
Review pages for coding agents. The agent writes a short [OpenUI Lang](https://github.com/thesysdev/openui) program, not HTML. You open it in the browser, click on any part, and write a note. The agent gets each note with the name of the statement it points at. It edits only those statements, and the page updates in place.
|
|
16
12
|
|
|
17
13
|
```
|
|
18
14
|
root = Stack([intro, flow, options, decide], "column", "l")
|
|
@@ -31,78 +27,76 @@ decide = Form("rollout", Buttons([Button("Send decision", @ToAssistant("Decision
|
|
|
31
27
|
strategyField = FormControl("Rollout", RadioGroup("strategy", [RadioItem("Big bang", "", "bigbang"), RadioItem("Dual-write", "", "dualwrite")]))
|
|
32
28
|
```
|
|
33
29
|
|
|
34
|
-
[`examples/session-migration.html`](examples/session-migration.html) is a full page
|
|
30
|
+
[`examples/session-migration.html`](examples/session-migration.html) is a full page (KPIs, diagram, table, chart, diff, decision form) in about 1,000 tokens.
|
|
35
31
|
|
|
36
32
|
## Why
|
|
37
33
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
austere-axi changes three things:
|
|
34
|
+
The loop is the same as [lavish-axi](https://github.com/kunchenguid/lavish-axi). The difference: the agent never writes HTML, CSS or layout.
|
|
41
35
|
|
|
42
36
|
| | lavish-axi | austere-axi |
|
|
43
37
|
|---|---|---|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
| Feedback
|
|
47
|
-
| Validation |
|
|
48
|
-
| Look |
|
|
49
|
-
|
|
50
|
-
## How it works
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
agent writes plan.html ──► austere-axi plan.html ──► local server + browser review
|
|
54
|
-
│ reviewer annotates, picks options,
|
|
55
|
-
│ types, presses Send
|
|
56
|
-
agent edits statements ◄── austere-axi poll plan.html ◄─┘ (long-poll returns the batch)
|
|
57
|
-
│
|
|
58
|
-
└─► page updates in place and flashes the changed statements
|
|
59
|
-
```
|
|
38
|
+
| Agent writes | Full HTML + CSS + SVG | OpenUI Lang statements |
|
|
39
|
+
| After feedback | Writes the file again | Edits the named statements; the page patches in place |
|
|
40
|
+
| Feedback points at | CSS selector + text | Statement name and line, plus table cell, diff line, diagram node or selected text |
|
|
41
|
+
| Validation | Layout audit in the browser | `austere-axi check`, in Node, no browser |
|
|
42
|
+
| Look | Different for each agent | One dark design |
|
|
60
43
|
|
|
61
|
-
|
|
62
|
-
- **The runtime** bundles the OpenUI React renderer with a curated component library: 58 of the stock components, plus `Architecture` (with `Node`, `Edge` and `Group`), `Mermaid`, `Diff` and `FileTree`. Every rendered statement is tagged with its name.
|
|
63
|
-
- **Architecture diagrams** are laid out automatically ([dagre](https://github.com/dagrejs/dagre)): the agent writes nodes, edges and groups as statements and never a coordinate. Each node and edge is its own click target, so feedback on a diagram arrives as `annotation: api (Node)` with its line. The layout runs across when that stays legible at the page width and down otherwise, so a phone gets a tall diagram. For a system split by owner or tier, `lanes` turns each group into a column with right-angle lines between them (stacked as bands on a phone); `tone` tints a box or line to mark risk or a store family. Mermaid stays for sequences, state machines, ER and gantt.
|
|
64
|
-
- **Annotations** resolve to the innermost named statement. They also carry precise detail where it exists: table row and column, `file:+line` for diff lines, the label of a diagram node, or the selected text. The popover shows the parent chain, so the reviewer can retarget a note to an enclosing section.
|
|
65
|
-
- **Buttons and forms** are feedback channels. `@ToAssistant("…")` queues a message along with the form's values. A button with no action sends its label.
|
|
66
|
-
- **Remote review.** When Tailscale is running, the server also listens on this machine's tailnet IP, and `open` prints a phone link. The review UI has a mobile layout with a conversation sheet.
|
|
44
|
+
Fewer output tokens means faster pages and lower cost.
|
|
67
45
|
|
|
68
46
|
## Install
|
|
69
47
|
|
|
70
|
-
|
|
48
|
+
You need Node.js 20 or later.
|
|
71
49
|
|
|
72
|
-
**
|
|
50
|
+
**Let your agent do it.** Install the setup skill, then ask your agent to "set up austere-axi":
|
|
73
51
|
|
|
74
52
|
```sh
|
|
75
|
-
npx
|
|
53
|
+
npx skills add MandalorianBatman/austere-axi --skill austere-setup
|
|
76
54
|
```
|
|
77
55
|
|
|
78
|
-
|
|
56
|
+
It checks Node, installs the `austere` skill, offers the optional items below, and opens a test page.
|
|
79
57
|
|
|
80
|
-
**Or
|
|
58
|
+
**Or do it yourself.** Agents can run the CLI with no install:
|
|
81
59
|
|
|
82
60
|
```sh
|
|
83
|
-
|
|
84
|
-
austere-axi --help
|
|
61
|
+
npx -y austere-axi --help
|
|
85
62
|
```
|
|
86
63
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
**Agent skill (optional):**
|
|
64
|
+
`-y` skips the npm prompt, so an agent does not stop on it. Optional:
|
|
90
65
|
|
|
91
66
|
```sh
|
|
92
|
-
|
|
67
|
+
npm install -g austere-axi # `austere-axi` command, no npx
|
|
68
|
+
npx skills add MandalorianBatman/austere-axi --skill austere # tells agents when to make a page; adds /austere
|
|
93
69
|
```
|
|
94
70
|
|
|
95
|
-
The
|
|
71
|
+
The `austere` skill is a stub that points at `--help` and `spec`, so it does not go out of date. A global install stays on its version until `npm update -g austere-axi`.
|
|
96
72
|
|
|
97
73
|
## Quick start
|
|
98
74
|
|
|
99
75
|
```sh
|
|
100
|
-
npx -y austere-axi spec # component reference
|
|
76
|
+
npx -y austere-axi spec # component reference (read once per session)
|
|
101
77
|
npx -y austere-axi plan.html # validate and open the page for review
|
|
102
|
-
npx -y austere-axi poll plan.html # wait
|
|
78
|
+
npx -y austere-axi poll plan.html # wait until the reviewer presses Send
|
|
103
79
|
```
|
|
104
80
|
|
|
105
|
-
`--help` prints the file skeleton and the full
|
|
81
|
+
`--help` prints the file skeleton and the full loop.
|
|
82
|
+
|
|
83
|
+
## How it works
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
agent writes plan.html ──► austere-axi plan.html ──► local server + browser review
|
|
87
|
+
│ reviewer annotates, picks options,
|
|
88
|
+
│ types, presses Send
|
|
89
|
+
agent edits statements ◄── austere-axi poll plan.html ◄─┘ (long-poll returns the batch)
|
|
90
|
+
│
|
|
91
|
+
└─► page updates in place and flashes the changed statements
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- **A page is a plain `.html` file**: one runtime `<script>` tag and one `<script type="text/openui">` block. Opened directly, it loads the runtime from the CDN. Under review, the server serves a local copy.
|
|
95
|
+
- **Components**: 58 stock OpenUI components, plus `Architecture` (`Node`, `Edge`, `Group`), `Diff` and `FileTree`. `Mermaid` is a bundled [pack](#components-and-packs).
|
|
96
|
+
- **Architecture diagrams** lay out automatically ([dagre](https://github.com/dagrejs/dagre)). The agent never writes coordinates. Each node and edge is a click target. `lanes` puts each group in a column; `tone` colors a box or line to show risk. Use Mermaid for sequences, state machines, ER and gantt.
|
|
97
|
+
- **Annotations** go to the smallest named statement under the click, with detail where it exists: table row and column, `file:+line` in a diff, a diagram node, or selected text. The reviewer can move a note to a parent section.
|
|
98
|
+
- **Buttons and forms** send feedback. `@ToAssistant("…")` sends a message with the form values. A button with no action sends its label.
|
|
99
|
+
- **Phone review**: when Tailscale runs, the server also listens on the tailnet IP and prints a phone link. The review UI has a mobile layout.
|
|
106
100
|
|
|
107
101
|
## CLI
|
|
108
102
|
|
|
@@ -112,99 +106,139 @@ austere-axi <file> validate + open a review [--no-open] [--reope
|
|
|
112
106
|
austere-axi poll <file> long-poll for feedback [--agent-reply "..."] [--takeover]
|
|
113
107
|
austere-axi reply <file> post a reply without polling
|
|
114
108
|
austere-axi end <file> end the review as the agent
|
|
115
|
-
austere-axi
|
|
109
|
+
austere-axi feedback <file> feedback no agent has answered yet [--all] [--peek]
|
|
110
|
+
austere-axi check <file> validate the program (no browser) [--fix]
|
|
116
111
|
austere-axi patch <file> merge statements from stdin into the program
|
|
117
|
-
austere-axi spec [group...]
|
|
112
|
+
austere-axi spec [group|pack...] component reference (~5.8k tokens; groups narrow it)
|
|
113
|
+
austere-axi components ... list | search | show | add | remove | new | build
|
|
118
114
|
austere-axi export <file> one self-contained HTML file, works offline
|
|
115
|
+
austere-axi hub on|off|status|list|open persistent server with an index of every page
|
|
119
116
|
austere-axi stop stop the background server
|
|
120
117
|
```
|
|
121
118
|
|
|
122
|
-
Output is compact YAML
|
|
119
|
+
Output is compact YAML for agents. Each `poll` item has its statement and that statement's line, so the agent does not need to read the file again.
|
|
120
|
+
|
|
121
|
+
Session rules:
|
|
123
122
|
|
|
124
|
-
|
|
123
|
+
- One poll listens on a session at a time.
|
|
124
|
+
- Feedback sent while no agent listens waits for the next poll.
|
|
125
|
+
- A review the user ended does not open again unless you pass `--reopen`.
|
|
126
|
+
- If all review tabs stay closed, `poll` returns `browser_disconnected`: 10 s after a tab closes, or 5 min after a dropped connection (for example, a locked phone).
|
|
127
|
+
- `feedback <file>` returns notes no agent has answered, also from earlier days. Reading them marks them received; `reply` marks them answered.
|
|
125
128
|
|
|
126
|
-
|
|
127
|
-
- Feedback sent while no agent is listening is queued until the next poll.
|
|
128
|
-
- A review the user ended is not reopened unless `--reopen` is passed.
|
|
129
|
-
- If every review tab stays closed, `poll` returns `browser_disconnected`. The wait is 10 s after a tab is closed, or 5 min after a dropped connection, such as a phone screen locking.
|
|
129
|
+
## Components and packs
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
`spec` covers the common components (~5.8k tokens). Rare ones (area and scatter charts, sliders, switches, editable tables, …) are in the library but not in `spec`. Find them with `components`:
|
|
132
|
+
|
|
133
|
+
```sh
|
|
134
|
+
austere-axi components # every component, by group
|
|
135
|
+
austere-axi components search scatter # search by name, group, description
|
|
136
|
+
austere-axi components show AreaChart # signature, notes, example
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Packs** add components. A pack is an npm package with `dist/pack.js` (the components, a few KB) and `dist/catalog.json` (signatures, examples, schema).
|
|
140
|
+
|
|
141
|
+
```sh
|
|
142
|
+
austere-axi components add austere-pack-gantt --trust # npm name, folder, or .tgz
|
|
143
|
+
austere-axi check --fix plan.html # adds the pack tag to the page
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
A page names its packs in the head, so it renders wherever you open it:
|
|
147
|
+
|
|
148
|
+
```html
|
|
149
|
+
<meta name="austere-packs" content="austere-pack-gantt@1.2.0 sha384-…">
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
- Under review, the server serves installed packs only while they match the hash in `~/.austere-axi/packs.json`. Opened directly, the page loads them from jsDelivr with Subresource Integrity. `export` inlines them.
|
|
153
|
+
- A pack component with no pack tag is a `missing-pack` error. `check --fix` repairs it.
|
|
154
|
+
- Mermaid ships as a bundled pack. It loads only when the page calls `Mermaid(...)` and needs no tag.
|
|
155
|
+
|
|
156
|
+
**Trust.** Pack code runs inside your review pages, where notes and button presses also come from. Packs under `@austere-axi/` on npm install directly. Other npm packs and any `.tgz` need `--trust`; read them first. A local folder counts as your own. A page with third-party packs shows a warning, and `poll` tells the agent.
|
|
157
|
+
|
|
158
|
+
**Write a pack:**
|
|
159
|
+
|
|
160
|
+
```sh
|
|
161
|
+
austere-axi components new austere-pack-timeline
|
|
162
|
+
cd austere-pack-timeline && npm install && npm run build
|
|
163
|
+
austere-axi components add .
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Each component uses `austereComponent` from `austere-axi/pack`: a PascalCase name, zod props in positional order (append-only after you publish), a one-line description and an example. The build loads the pack in Node, so build only code you trust. Publish with `npm publish`.
|
|
167
|
+
|
|
168
|
+
## Hub
|
|
169
|
+
|
|
170
|
+
The server starts when needed and stops after 30 idle minutes. `hub on` keeps it running and indexes every page you open or check:
|
|
171
|
+
|
|
172
|
+
```sh
|
|
173
|
+
austere-axi hub on # http://127.0.0.1:4388/: pages by project and day, with search
|
|
174
|
+
austere-axi hub list # the same, for an agent: [words] [--project dir]
|
|
175
|
+
austere-axi hub off # back to on-demand; the index stays
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
The home page shows which reviews are live and how much feedback the agent has answered. The index is SQLite (`~/.austere-axi/hub.db`), copied from the session files; the review loop does not need it. The hub needs Node 22.13 or later (`node:sqlite`).
|
|
179
|
+
|
|
180
|
+
## Environment
|
|
132
181
|
|
|
133
182
|
| Variable | Default | |
|
|
134
183
|
|---|---|---|
|
|
135
184
|
| `AUSTERE_AXI_PORT` | `4388` | server port |
|
|
136
185
|
| `AUSTERE_AXI_STATE_DIR` | `~/.austere-axi` | sessions, server log |
|
|
137
|
-
| `AUSTERE_AXI_NO_OPEN` | | `1` = never
|
|
138
|
-
| `AUSTERE_AXI_HOST` | | extra
|
|
186
|
+
| `AUSTERE_AXI_NO_OPEN` | | `1` = never open a browser |
|
|
187
|
+
| `AUSTERE_AXI_HOST` | | extra bind address (never `0.0.0.0`) |
|
|
139
188
|
| `AUSTERE_AXI_NO_TAILSCALE` | | `1` = loopback only |
|
|
140
|
-
| `AUSTERE_AXI_LINK_HOST` | | host
|
|
189
|
+
| `AUSTERE_AXI_LINK_HOST` | | host in the printed remote link |
|
|
141
190
|
| `AUSTERE_AXI_ALLOWED_HOSTS` | | extra `Host` headers to accept (reverse proxy) |
|
|
142
|
-
| `AUSTERE_AXI_DISCONNECT_GRACE_MS` | `300000` | how long a dropped connection
|
|
143
|
-
| `AUSTERE_AXI_IDLE_TIMEOUT_MS` | `1800000` | idle
|
|
191
|
+
| `AUSTERE_AXI_DISCONNECT_GRACE_MS` | `300000` | how long a dropped connection can stay away before `poll` returns; `0` disables |
|
|
192
|
+
| `AUSTERE_AXI_IDLE_TIMEOUT_MS` | `1800000` | idle shutdown; `0` disables (the hub never idles out) |
|
|
193
|
+
| `AUSTERE_AXI_NPM_REGISTRY` | `npm_config_registry`, else npmjs | where `components add` gets packs |
|
|
144
194
|
|
|
145
195
|
## Security
|
|
146
196
|
|
|
147
|
-
The server binds to loopback, plus the Tailscale IP when Tailscale is up. It never binds to
|
|
197
|
+
The server binds to loopback, plus the Tailscale IP when Tailscale is up. It never binds to all interfaces.
|
|
148
198
|
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
199
|
+
- `/api/*` answers only loopback callers and refuses browser requests.
|
|
200
|
+
- `Host` headers must be on an allowlist (DNS-rebinding defense).
|
|
201
|
+
- Browser routes that change state refuse a foreign `Origin`.
|
|
202
|
+
- The page runs in a sandboxed iframe with no same-origin access. Packs run there too.
|
|
203
|
+
- The server serves files only from the page's own directory, with no dotfiles.
|
|
204
|
+
- Third-party packs need `--trust`. Installed packs must match their lockfile hash; CDN loads use Subresource Integrity.
|
|
154
205
|
|
|
155
|
-
|
|
206
|
+
OpenUI's Node side has PostHog telemetry. The CLI sets `OPENUI_TELEMETRY_DISABLED=1`. The browser runtime sends no telemetry.
|
|
156
207
|
|
|
157
208
|
## Not in v1
|
|
158
209
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
- **Themes:** there is one dark theme. Per-project accents via OpenUI's `ThemeProvider` are an easy follow-up.
|
|
164
|
-
- **Hosted sharing:** use `export` to produce a single offline file instead.
|
|
210
|
+
- Image attachments in feedback.
|
|
211
|
+
- Live data: `Query` and `Mutation` are off, so pages are static.
|
|
212
|
+
- Themes: one dark theme only.
|
|
213
|
+
- Hosted sharing: use `export` to make one offline file.
|
|
165
214
|
|
|
166
215
|
## Development
|
|
167
216
|
|
|
168
217
|
```sh
|
|
169
218
|
npm install
|
|
170
|
-
npm run build # dist/:
|
|
219
|
+
npm run build # dist/: runtime, packs, pack kit, Mermaid, spec, catalog, review UI, cli.mjs
|
|
171
220
|
npm test
|
|
172
221
|
node dist/cli.mjs examples/session-migration.html
|
|
173
222
|
```
|
|
174
223
|
|
|
175
224
|
| Path | Contents |
|
|
176
225
|
|---|---|
|
|
177
|
-
| `src/runtime/components/` | Custom components (`Architecture` family, `Diff`, `
|
|
178
|
-
| `src/runtime/stock.js` | Which stock
|
|
179
|
-
| `
|
|
180
|
-
| `src/
|
|
181
|
-
| `src/
|
|
182
|
-
| `src/
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
- every component sits in a prompt group
|
|
187
|
-
- the component reference stays within its token budget
|
|
188
|
-
- released prop orders are append-only (`npm run signatures`)
|
|
189
|
-
- every example passes `check`
|
|
190
|
-
|
|
191
|
-
For visual checks, `npm run gallery` and `npm run shot` render the components headlessly. `npm run test:browser` drives the real review loop in headless Chrome. It needs Chrome, or `CHROME_PATH` set to a browser, and it checks:
|
|
192
|
-
|
|
193
|
-
- every component and example renders at desktop and phone width without errors or sideways scrolling
|
|
194
|
-
- every clickable part reaches `poll` correctly
|
|
195
|
-
|
|
196
|
-
Before committing, [`.agents/skills/review-change`](.agents/skills/review-change/SKILL.md) runs these checks plus three review agents from `.agents/agents/`:
|
|
197
|
-
|
|
198
|
-
- **change-reviewer:** an independent code review
|
|
199
|
-
- **visual-qa:** looks at screenshots, including stress inputs
|
|
200
|
-
- **cold-start-author:** writes a page from `--help` and `spec` alone, to test the agent-facing docs
|
|
226
|
+
| `src/runtime/components/` | Custom components (`Architecture` family, `Diff`, `FileTree`), one file each |
|
|
227
|
+
| `src/runtime/stock.js` | Which stock components ship, which stay out of `spec`, their groups |
|
|
228
|
+
| `packs/` | Packs bundled with austere-axi (`mermaid`) |
|
|
229
|
+
| `src/runtime/pack-api.js`, `src/pack-kit/` | `austere-axi/pack` and the `components build` pipeline |
|
|
230
|
+
| `src/shared/catalog.js` | Component catalog and prompt tiers |
|
|
231
|
+
| `src/runtime/` | Library, annotation layer, review bridge, styles |
|
|
232
|
+
| `src/chrome/` | Review UI around the page iframe |
|
|
233
|
+
| `src/cli/` | CLI, server, sessions, `check`, `export`, packs, hub |
|
|
234
|
+
| `skills/` | Published skills: `austere`, `austere-setup` |
|
|
201
235
|
|
|
202
|
-
|
|
236
|
+
Maintainer guides (not published): [`AGENTS.md`](AGENTS.md), [`.agents/skills/add-component`](.agents/skills/add-component/SKILL.md) to add a component, [`.agents/skills/review-change`](.agents/skills/review-change/SKILL.md) before you commit. Tests enforce the component rules: every component has a group, `spec` stays in its token budget, released prop orders are append-only (`npm run signatures`), and every example passes `check`.
|
|
203
237
|
|
|
204
|
-
|
|
238
|
+
Visual checks: `npm run gallery`, `npm run shot`, and `npm run test:browser` (real review loop in headless Chrome; needs Chrome or `CHROME_PATH`).
|
|
205
239
|
|
|
206
|
-
|
|
240
|
+
**CI** builds and tests every push to `main` and every pull request (Node 20, 22, 24 on Linux; Node 24 on Windows; browser suite). **Release:** bump `version` in `package.json`, push, and publish a GitHub Release. `publish.yml` tests again and publishes to npm with trusted publishing.
|
|
207
241
|
|
|
208
242
|
## License
|
|
209
243
|
|
|
210
|
-
MIT. Builds on [OpenUI](https://github.com/thesysdev/openui) (MIT)
|
|
244
|
+
MIT. Builds on [OpenUI](https://github.com/thesysdev/openui) (MIT). The review loop design comes from [lavish-axi](https://github.com/kunchenguid/lavish-axi) (MIT).
|