arbiterdesign 0.1.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/LICENSE +21 -0
- package/README.md +143 -0
- package/dist/candidates.js +155 -0
- package/dist/commands/board.js +41 -0
- package/dist/commands/candidate.js +168 -0
- package/dist/commands/drift.js +67 -0
- package/dist/commands/export.js +160 -0
- package/dist/commands/init.js +194 -0
- package/dist/commands/prompt.js +69 -0
- package/dist/commands/publish.js +139 -0
- package/dist/commands/pull.js +27 -0
- package/dist/commands/record.js +408 -0
- package/dist/commands/review.js +135 -0
- package/dist/commands/rules.js +152 -0
- package/dist/commands/snapshot.js +32 -0
- package/dist/commands/sweep.js +87 -0
- package/dist/commands/verify.js +41 -0
- package/dist/destination.js +99 -0
- package/dist/findings.js +70 -0
- package/dist/format.js +247 -0
- package/dist/hosted.js +222 -0
- package/dist/index.js +232 -0
- package/dist/overlap.js +71 -0
- package/dist/schema.js +233 -0
- package/dist/store.js +133 -0
- package/dist/sweep.js +128 -0
- package/dist/test/hosted.test.js +189 -0
- package/dist/test/init.test.js +54 -0
- package/dist/test/pending.test.js +198 -0
- package/dist/test/polish.test.js +130 -0
- package/dist/test/record.test.js +102 -0
- package/dist/test/stages.test.js +188 -0
- package/dist/verify.js +78 -0
- package/dist/work.js +64 -0
- package/package.json +44 -0
- package/templates/SKILL.md +338 -0
- package/templates/review.html +479 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arbiter
|
|
3
|
+
description: Record design decisions made during UI work so they never have to be re-made. Use after building or changing any UI, and whenever the user says "record that", "make that a rule", "reject that", "going with X instead", or similar.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Arbiter
|
|
7
|
+
|
|
8
|
+
`DECISIONS.md` holds the design calls this project has already made — what was chosen, what was rejected, and why. Your job is to apply them, and to capture new ones as they happen, without asking the user to write anything.
|
|
9
|
+
|
|
10
|
+
## Before UI work
|
|
11
|
+
|
|
12
|
+
If `DECISIONS.md` exists, read it before building or changing any component, screen, or style. Treat every entry as settled. Do not re-decide, do not ask about, and do not deviate from an active rule unless the user explicitly asks you to. Do not try the alternatives it lists as rejected.
|
|
13
|
+
|
|
14
|
+
## After UI work — queue, don't interrupt
|
|
15
|
+
|
|
16
|
+
Design work is iterative. A screen redesigned six times is one piece of work, not six. Never surface decisions mid-iteration.
|
|
17
|
+
|
|
18
|
+
**While the user is iterating on the same thing: say nothing about decisions.** Keep a private running list. Each version they moved past becomes a rejected alternative on the version that replaced it — note why it lost, in their words if they gave a reason.
|
|
19
|
+
|
|
20
|
+
**When the work settles** — they move to a different screen or component, say "good" / "ship it" / "done" / "next", or the session is clearly wrapping up — write each queued decision to the pending file, silently:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
npx arbiter record --pending '<json>'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
(JSON shape below). Then — **only if the piece of work included a `feature`-level decision** — add one line to your reply carrying its Change line, not a count:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Queued: Settings is now a tab-row shell with four routes under it (+2 pattern, +4 polish) — /arbiter when you're ready.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
A count on every reply gets ignored; a sentence about what changed, only after something big, gets read. **At most once per session.** After that, queue silently — the user knows the queue exists. If the work was only patterns and polish, say nothing. Never phrase it as a question ("should we run arbiter?") — it's a statement of what was queued, and the user decides when. Do not show the widget. Do not list the decisions. The queue lives in `.arbiter/pending.md`, so it survives the session; the user can judge it here, in the review page, or never.
|
|
33
|
+
|
|
34
|
+
**When they ask** — `/arbiter`, "let's review", "what did you decide" — read the queue with `npx arbiter rules --pending --json`. It comes back grouped by piece of work (`groups[].trigger`), feature and pattern items in `items`, polish in `polish`. Present the feature and pattern items (below); polish is never presented individually. Judge each answer with:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
npx arbiter record P-0003 --as accept # Confirm
|
|
38
|
+
npx arbiter record P-0003 --as rule # Make it a rule
|
|
39
|
+
npx arbiter record P-0003 --as skip # typed "skip" in Other
|
|
40
|
+
npx arbiter record P-0003 --as fix --to "<what they typed>"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Bulk answers are one command, not a loop:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
npx arbiter record --all --as accept --level polish # "confirm all polish"
|
|
47
|
+
npx arbiter record --all --as accept # "confirm all"
|
|
48
|
+
npx arbiter record --all --as rule --level pattern # "rule the patterns…"
|
|
49
|
+
npx arbiter record --all --as accept --level feature # "…confirm the rest"
|
|
50
|
+
npx arbiter record --all --as accept --trigger "Settings build" # one piece of work
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`--as rule` can exit `2` (overlap) — follow the overlap flow below and re-run with `--supersedes` or `--keep-both`. In a bulk run an overlap shows up under `failed`; handle those one at a time afterwards.
|
|
54
|
+
|
|
55
|
+
### What counts as a decision
|
|
56
|
+
|
|
57
|
+
A point where a reasonable alternative existed and you picked one, that was **not** dictated by the request and **not** already covered by `DECISIONS.md`. Look along these dimensions:
|
|
58
|
+
|
|
59
|
+
| Dimension | What to look for |
|
|
60
|
+
|---|---|
|
|
61
|
+
| `structure` | Layout, hierarchy, grouping, what's above the fold, tabs vs. scroll |
|
|
62
|
+
| `interaction` | Pattern choice — modal / sheet / inline, hover / click, confirm flows |
|
|
63
|
+
| `states` | Empty, loading, error, success — what was shown and what was skipped |
|
|
64
|
+
| `content` | Labels, tone, button verbs, error copy, headings |
|
|
65
|
+
| `visual` | Tokens, spacing, type scale, colour, radii |
|
|
66
|
+
| `motion` | Transitions, durations, what animates and what doesn't |
|
|
67
|
+
| `access` | Focus order, contrast, hit targets, announcements |
|
|
68
|
+
|
|
69
|
+
For each decision, note what it was chosen **over**. Rejected alternatives come from three places:
|
|
70
|
+
|
|
71
|
+
1. **Iterations in this session.** The user asked for a sheet, looked at it, then asked for a modal. The sheet is rejected, and you saw why.
|
|
72
|
+
2. **Options you weighed and didn't build.** You considered tabs, went with a single page. Tabs are rejected, with your reason.
|
|
73
|
+
3. **Corrections.** Whatever you did that the user then changed is rejected; what they asked for is the decision.
|
|
74
|
+
|
|
75
|
+
Skip mechanical necessities (imports, prop plumbing, file placement) and anything the user told you to do.
|
|
76
|
+
|
|
77
|
+
**Size every decision.** A 7px height fix and a new settings architecture are not the same kind of call, and the review must not treat them the same. Set `level`:
|
|
78
|
+
|
|
79
|
+
| Level | What it is | Examples | Review behaviour |
|
|
80
|
+
|---|---|---|---|
|
|
81
|
+
| `feature` | A new surface, flow, or structure | Settings shell with four routes; a second card on Audit; a stage-aware back link | Always presented |
|
|
82
|
+
| `pattern` | A reusable call that could apply elsewhere | Icon-only buttons on half-width cards; "Status" not "Health"; save buttons bottom-right | Presented; "make it a rule" is the likely answer |
|
|
83
|
+
| `polish` | A one-off fix to one screen | Match heights at `h-9`; drop a chevron; remove a pill | **Never presented.** Queued, then logged automatically when the group is reviewed |
|
|
84
|
+
|
|
85
|
+
Polish still gets queued — it's part of the record — but the user never gets a question about it; they see "+6 polish logged" in the summary. Rules only ever come from `feature` or `pattern`. When unsure between `pattern` and `polish`, ask: would this apply on a screen that doesn't exist yet? If yes, `pattern`. There's no cap on polish; keep feature + pattern to seven per piece of work.
|
|
86
|
+
|
|
87
|
+
### Present with the selection widget
|
|
88
|
+
|
|
89
|
+
Only when asked (see above). If you have a question tool that presents options (in Claude Code, `AskUserQuestion`), use it. Up to four questions per call, in queue order; the heading inside each question names its piece of work, so a call may span more than one. Before the call, one line: `Queued across 2 pieces of work — Rescan button (1), Settings (2) · +5 polish logged`.
|
|
90
|
+
|
|
91
|
+
Each question:
|
|
92
|
+
|
|
93
|
+
- **header** — the dimension, Title case: `Structure`, `Interaction`, `States`, `Content`, `Visual`
|
|
94
|
+
- **question** — a heading line, a blank line, then four labelled lines:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
Rescan button · 1 of 1
|
|
98
|
+
|
|
99
|
+
Change — The Rescan button on the small Health check card is now just an icon
|
|
100
|
+
Pattern — Half-width cards use icon-only action buttons with aria-label and title
|
|
101
|
+
Rejected — Full-label button: wrapped to a second row on mobile
|
|
102
|
+
Applies to — Compact card actions, anywhere
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
- The heading is **the thing the user was working on, at the grain they worked at** — `Rescan button`, `Delete flow`, `Settings`, `Billing page`. Say it the way they'd say it. It's the `trigger`. Then `n of N` within that piece of work.
|
|
106
|
+
- `Change` is what happened, as a PM would say it. `Pattern` is the rule-shaped sentence (`decision`). `Rejected` is each alternative with why it lost, `·`-separated if more than one; omit the line if nothing was rejected. `Applies to` is the scope in words: a file name, `<Pattern name>, anywhere`, or `Everywhere`.
|
|
107
|
+
- **options**, always these two, in this order:
|
|
108
|
+
- `Confirm` — *Saved to the decision log.*
|
|
109
|
+
- `Make it a rule` — *Kept in DECISIONS.md, referenced in future sessions.*
|
|
110
|
+
- The built-in **Other** box is the correction path. If the user types there, treat it as a fix: what they typed is the decision, what you did is rejected. If they type `skip`, drop the item.
|
|
111
|
+
- The widget's own **Skip** button means "not now" — everything stays in the queue. Don't add a Skip option.
|
|
112
|
+
|
|
113
|
+
### Fallback: present as text
|
|
114
|
+
|
|
115
|
+
If no selection widget is available, use exactly this shape — grouped by piece of work, three labelled lines per item, Change first:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
Audit page — 3 decisions, +2 polish
|
|
119
|
+
|
|
120
|
+
1. Change: The Audit page now has a second card, Health check, beside the score [feature]
|
|
121
|
+
Pattern: Audit shows score and health as two half-width cards
|
|
122
|
+
Rejected: single wide card — health got buried under the score chart
|
|
123
|
+
2. Change: The Rescan button on the small Health check card is now just an icon [pattern]
|
|
124
|
+
Pattern: Half-width cards use icon-only action buttons
|
|
125
|
+
Rejected: full-label button — wrapped to a second row at phone width
|
|
126
|
+
3. Change: The health card says Status, not Health [pattern]
|
|
127
|
+
Pattern: Card headings name the thing shown, not the concept
|
|
128
|
+
|
|
129
|
+
Settings build — 2 decisions, +4 polish
|
|
130
|
+
|
|
131
|
+
4. Change: Settings is now a tab-row shell with four routes under it [feature]
|
|
132
|
+
…
|
|
133
|
+
|
|
134
|
+
Applied from DECISIONS.md: D-0003, D-0008
|
|
135
|
+
|
|
136
|
+
Reply per number — confirm · rule · skip · or type what it should be
|
|
137
|
+
or in bulk — "confirm all" · "confirm all polish" · "rule the patterns, confirm the rest"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Omit the `Rejected` line when there's nothing rejected. Omit the `Applied from` line if no active rules were used. Never ask an open question — present what was decided and ask for a selection. Map bulk replies to `record --all` (above). Items they don't address are skipped. Polish isn't listed; it's logged with the group unless they say "skip polish".
|
|
141
|
+
|
|
142
|
+
## Reading the answer
|
|
143
|
+
|
|
144
|
+
| User picked | `--as` | What you do |
|
|
145
|
+
|---|---|---|
|
|
146
|
+
| Confirm | `accept` | Judge it. Logged in the archive. |
|
|
147
|
+
| Make it a rule | `rule` | Judge it. It enters `DECISIONS.md`. |
|
|
148
|
+
| Other: `skip` (or "not a decision") | `skip` | Dropped from the queue, recorded nowhere. |
|
|
149
|
+
| Other: a correction | `fix --to "…"` | Change the code to match, then judge it. What you did becomes a rejected alternative automatically. |
|
|
150
|
+
| Widget Skip button | — | Nothing. The queue waits. |
|
|
151
|
+
|
|
152
|
+
Never judge anything before the user answers.
|
|
153
|
+
|
|
154
|
+
## The JSON shape
|
|
155
|
+
|
|
156
|
+
Used by `record --pending` (queue) and `record` (record now):
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"change": "The Rescan button on the small Health check card is now just an icon",
|
|
161
|
+
"decision": "Half-width cards use icon-only action buttons",
|
|
162
|
+
"rationale": "A labelled button wrapped under the text on mobile",
|
|
163
|
+
"rejected": ["Full-label button — wrapped to a second row at phone width"],
|
|
164
|
+
"level": "pattern",
|
|
165
|
+
"trigger": "Audit page",
|
|
166
|
+
"scope": "pattern:compact-card-actions",
|
|
167
|
+
"dimension": "interaction",
|
|
168
|
+
"class": "judgment"
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Two sentences, two jobs. **Write `change` as what a PM would say happened** — concrete, past tense, names the thing on the screen. **Write `decision` as the rule someone could follow** — general, present tense. The user judges from `change`; future sessions obey `decision`. Never cram both into one line.
|
|
173
|
+
|
|
174
|
+
`verdict` is omitted when queueing (`--pending`); include it (`accept | rule | fix`) only when recording directly.
|
|
175
|
+
|
|
176
|
+
For **mechanical** decisions, add evidence so Arbiter can check the claim against the files you wrote:
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
"files": ["src/components/Button.tsx"],
|
|
180
|
+
"expect": { "present": ["brand-500"], "absent": ["#3B7BE0"] }
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
`present` strings must appear in at least one of the files; `absent` strings in none. Write `regex:<pattern>` for a pattern (`regex:#[0-9a-fA-F]{6}\b` = any hex colour). Arbiter reads only those files. If they contradict the claim, `record` exits `4` and writes nothing — fix the code, or correct the claim. Never pass `--unverified` without telling the user the claim didn't check out.
|
|
184
|
+
|
|
185
|
+
If the work belongs to a candidate (below), add `"candidate": "C-0001"` or pass `--candidate C-0001`.
|
|
186
|
+
|
|
187
|
+
If the session mentioned a ticket — a Linear or Jira key like `ENG-123`, a GitHub issue, a pasted tracker link — add `"ref": "<url or key>"` or pass `--ref`. It's how the board links each decision to the work it came from. Never ask for one; leave it out when nothing was mentioned. `--ref` on a bulk `--all` stamps every item.
|
|
188
|
+
|
|
189
|
+
- `change` — what happened, in plain words. One line. Required. This is what the person judging reads.
|
|
190
|
+
- `decision` — the same call as a rule someone could follow. Present tense. One line. This is what future sessions read. For `polish` it can repeat `change`.
|
|
191
|
+
- `level` — `feature | pattern | polish` (table above). Default is `pattern`; set it every time.
|
|
192
|
+
- `trigger` — the thing the user was working on, named the way they'd say it, at the grain they worked at: `Rescan button`, `Delete flow`, `Settings`, `Billing page`. Every decision from the same piece of work gets the **same** trigger — it's the grouping key and the heading they see.
|
|
193
|
+
- `rationale` — why it won. One line. Required.
|
|
194
|
+
- `rejected` — each alternative as `<option> — <why it lost>`. One line each. Empty array if there were none.
|
|
195
|
+
- `scope` — `pattern:<kebab-name>` for a recurring UI pattern (`destructive-confirm`, `empty-state`, `sheet-actions`) — this is the usual case. `file:<path>` only when it's genuinely about one screen. `global` when it applies everywhere.
|
|
196
|
+
- `dimension` — one of the seven above.
|
|
197
|
+
- `class` — `mechanical` if it could be checked against a token or lint rule (colours, spacing, type scale, radii); `judgment` otherwise. Most rules are judgment.
|
|
198
|
+
- `files` / `expect` — mechanical only. Name the files you touched and the literal strings that prove the claim.
|
|
199
|
+
- `paths` — mechanical rules only: where the rule applies, as directories or files (`["app/components", "app/(marketing)"]`). Sweep scans only these. A `pattern:` rule with no `paths` sweeps the whole project, including token definitions and reference HTML — name the directories.
|
|
200
|
+
|
|
201
|
+
The command prints JSON and exits:
|
|
202
|
+
|
|
203
|
+
- `0` — recorded. Note the `id`. If the output has a `sweep` block with violations, see **Sweep** below.
|
|
204
|
+
- `1` — invalid. Fix the payload and retry.
|
|
205
|
+
- `2` — **overlap**. Nothing was written. See below.
|
|
206
|
+
- `3` — `DECISIONS.md` is at its cap. Tell the user, and ask which existing rule this replaces.
|
|
207
|
+
- `4` — **contradicted**. The files don't match the claim. Nothing was written. Fix the code or the claim.
|
|
208
|
+
|
|
209
|
+
## Overlap
|
|
210
|
+
|
|
211
|
+
When `record` exits `2`, it found an active rule with the same scope or similar wording, and tells you which with a confidence marker (`exact` or `possible`). Present it as a selection, never an open question. With the widget:
|
|
212
|
+
|
|
213
|
+
- **header** — `Overlap`
|
|
214
|
+
- **question** — `"<new decision>" overlaps D-0007 · <existing decision> (exact — same scope)`
|
|
215
|
+
- **options** — `Replace D-0007` · `Keep both`
|
|
216
|
+
|
|
217
|
+
As text: the same two options on one line. Then re-run with `--supersedes D-0007` or `--keep-both`.
|
|
218
|
+
|
|
219
|
+
## Sweep — a new mechanical rule reaches backwards
|
|
220
|
+
|
|
221
|
+
When a mechanical rule with `expect.absent` is recorded, the output includes how much existing code already breaks it:
|
|
222
|
+
|
|
223
|
+
```json
|
|
224
|
+
"sweep": { "violations": 6, "files": 4, "command": "npx arbiter sweep D-0004" }
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
If violations are more than zero, add one line and offer a selection — never start editing on your own:
|
|
228
|
+
|
|
229
|
+
> Rule recorded. 6 existing violations in 4 files — **Fix now** · **Queue for review** · **Ignore**
|
|
230
|
+
|
|
231
|
+
- **Fix now** — run `npx arbiter sweep D-0004 --json`, edit each listed file to comply, then say what changed in one line.
|
|
232
|
+
- **Queue for review** — run `npx arbiter sweep D-0004 --queue`. Each file becomes a pending item; the user confirms it as an exception or asks for a fix later.
|
|
233
|
+
- **Ignore** — do nothing.
|
|
234
|
+
|
|
235
|
+
Judgment rules never sweep. Don't offer it for them.
|
|
236
|
+
|
|
237
|
+
## Screenshots — after feature-level work
|
|
238
|
+
|
|
239
|
+
When a piece of feature-level work settles — the user moves on, says "good", or the session is wrapping up — and the app is running and you have a browser tool: open what you built, take a screenshot, save it to a file, and attach it to that piece of work, named the way its decisions named it (the `trigger`):
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
npx arbiter snapshot "Settings build" --file /path/to/shot.png
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Once per piece of work, after it settles — not on every iteration. Do it without asking. It's a picture for the board; the decisions stand without it. If you can't (no browser tool, app not running), say so in the one-line summary and offer: `npx arbiter snapshot "Settings build" --capture` — the user drags a rectangle over whatever is on their screen and it's saved.
|
|
246
|
+
|
|
247
|
+
Directions (below) are different: each candidate gets its own snapshot.
|
|
248
|
+
|
|
249
|
+
## Candidates — several directions for one thing
|
|
250
|
+
|
|
251
|
+
When you produce a screen or component that is one of several possible directions — the user asked to "try" something, or to see two or three options — register each as a candidate, silently:
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
npx arbiter candidate add "Settings — single page" --feature settings
|
|
255
|
+
npx arbiter candidate add "Settings — tabs" --feature settings
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Queue that direction's decisions with `--candidate C-0001` so they stay attached.
|
|
259
|
+
|
|
260
|
+
**Snapshot it.** A candidate without a picture is half a record. If you have a browser tool and the app is running, open the screen you built, take a screenshot, save it to a file, and attach it:
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
npx arbiter candidate C-0001 --snapshot /path/to/shot.png
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Do this without asking. If you can't (no browser tool, app not running), say so in the one-line summary and offer: `npx arbiter candidate C-0001 --capture` — the user drags a rectangle over whatever is on their screen and it's saved.
|
|
267
|
+
|
|
268
|
+
When the user picks one — "go with the single page", "the first one" — approve it with their reason in their words. The other directions for that feature are superseded automatically, reason retained:
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
npx arbiter candidate C-0001 --state approved --why "tabs hid the danger zone"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
When they reject one outright: `--state rejected --why "…"`. Then one line: `C-0001 approved · C-0002 superseded`. `npx arbiter board` shows all of it.
|
|
275
|
+
|
|
276
|
+
Don't register a candidate for ordinary single-direction work. Candidates are for exploration, where the rejected branches are worth keeping. Ordinary work still gets a screenshot — see above — and still reaches the board, as a card named for the piece of work.
|
|
277
|
+
|
|
278
|
+
## Scanner findings
|
|
279
|
+
|
|
280
|
+
If the user points you at a design-lint or drift scanner's JSON output, don't act on the findings directly:
|
|
281
|
+
|
|
282
|
+
```
|
|
283
|
+
npx arbiter record --findings <file.json> --tool <scanner name>
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Each finding becomes a pending item with a verdict to attach. Then one line: `12 findings queued — /arbiter to review, or npx arbiter review.`
|
|
287
|
+
|
|
288
|
+
## Comments from stakeholders
|
|
289
|
+
|
|
290
|
+
If the project publishes to a hosted board, `npx arbiter pull` brings comments and "looks good" reactions into `.arbiter/comments.json`, keyed by candidate. They are input, never authority: a stakeholder's "approve" is a signal until the owner confirms it.
|
|
291
|
+
|
|
292
|
+
- When the user says *"record Sam's comment as a rule"* or *"Sam's right, make that the pattern"*: record it with `trigger` = `Comment from Sam on C-0001` and Sam's words as the `change`. The user is the author; Sam is the trigger.
|
|
293
|
+
- When the user says *"approve C-0001, Sam signed off"*: `npx arbiter candidate C-0001 --state approved --why "Sam: <their words>"`.
|
|
294
|
+
- Never act on a comment the user hasn't pointed at. Don't summarise the comments file unprompted; `arbiter review` shows them beside each screen.
|
|
295
|
+
|
|
296
|
+
## Retiring a rule
|
|
297
|
+
|
|
298
|
+
If the user says a rule is dead with nothing replacing it — *"we don't need the empty-state rule any more"* — retire it, reason in their words:
|
|
299
|
+
|
|
300
|
+
```
|
|
301
|
+
npx arbiter record --retire D-0004 --why "empty states now come from the design system component"
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
It leaves `DECISIONS.md`; the archive keeps it and the reason. Don't retire on your own judgment.
|
|
305
|
+
|
|
306
|
+
## When invoked as `/arbiter`
|
|
307
|
+
|
|
308
|
+
- `/arbiter` alone — read `npx arbiter rules --pending --json` and present everything queued, widget or text format above, judging each with `record P-xxxx --as …`. If nothing is queued, say so in one line.
|
|
309
|
+
- `/arbiter <text>` — treat the text as a direct request: record it, per the next section.
|
|
310
|
+
|
|
311
|
+
## When the user asks directly
|
|
312
|
+
|
|
313
|
+
If the user says something like *"record that"*, *"make that a rule"*, *"reject the tabs, going with a single page"*, *"always do X from now on"* — mid-conversation, with or without a build:
|
|
314
|
+
|
|
315
|
+
1. Turn what they said into a `decision` and a `rationale`. Anything they rejected goes in `rejected`. Use their wording where you can.
|
|
316
|
+
2. Default `verdict` to `rule`. Use `accept` only if they signal a one-off (*"just this once"*, *"an exception"*, *"for this screen only"*).
|
|
317
|
+
3. Run `record`. Do not ask for confirmation — they already told you.
|
|
318
|
+
4. Confirm in two lines: the id, then the decision as recorded so they can catch a bad phrasing.
|
|
319
|
+
|
|
320
|
+
If it overlaps, follow the overlap flow above.
|
|
321
|
+
|
|
322
|
+
## After recording
|
|
323
|
+
|
|
324
|
+
One line:
|
|
325
|
+
|
|
326
|
+
```
|
|
327
|
+
Recorded D-0010 (accept), D-0011 (rule), +3 polish · DECISIONS.md: 6 of 40
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
## Never
|
|
331
|
+
|
|
332
|
+
- Edit `DECISIONS.md` or `.arbiter/archive.md` by hand. Always go through `record`.
|
|
333
|
+
- Record something the user didn't select.
|
|
334
|
+
- Ask the user to write a rationale. Draft it; they correct it.
|
|
335
|
+
- Re-try an alternative that `DECISIONS.md` lists as rejected.
|
|
336
|
+
- Ask about polish. It's logged with the group.
|
|
337
|
+
- Cram Change, Pattern and Rejected into one sentence. Three labelled lines, always.
|
|
338
|
+
- Mention Arbiter at the end of a reply more than once per session, or as a question. Once, after feature-level work, as a statement of what was queued. Then silence until asked.
|