@rness/cli 0.18.1 → 0.19.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 +96 -9
- package/dist/bin/rness.js +1 -1
- package/dist/{chunk-JHU2G7K7.js → chunk-U5SBNWVD.js} +653 -291
- package/dist/chunk-U5SBNWVD.js.map +1 -0
- package/dist/index.js +1 -1
- package/mod/.claude-plugin/plugin.json +21 -0
- package/mod/hooks/hooks.json +1 -0
- package/mod/hooks/register.tsx +188 -0
- package/mod/types/index.d.ts +36 -0
- package/package.json +5 -1
- package/dist/chunk-JHU2G7K7.js.map +0 -1
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Inside a workspace, every `rness` delegates to the copy pinned in
|
|
|
28
28
|
rness login [--setup-git|--no-setup-git]
|
|
29
29
|
rness logout
|
|
30
30
|
rness context [--scope <name>] [--json]
|
|
31
|
-
rness status [<tab>]
|
|
31
|
+
rness status [<tab>] [--json]
|
|
32
32
|
rness pulse create [<collection>] [-y]
|
|
33
33
|
rness pulse sync
|
|
34
34
|
rness validate
|
|
@@ -48,6 +48,7 @@ writes nothing and exits 1 when a block is out of date — use it in CI.
|
|
|
48
48
|
|
|
49
49
|
rness status # every decision, specification and plan, a tab per directory
|
|
50
50
|
rness status specs # open on one tab (off a terminal: print only that one)
|
|
51
|
+
rness status --json # one JSON object: what the Claude Code plugin draws
|
|
51
52
|
|
|
52
53
|
A tab for `ADR`, `Specs` and `Plans`, always, then one for each other
|
|
53
54
|
directory of `.rness/` whose Markdown files carry a `status` in their front
|
|
@@ -59,8 +60,15 @@ when dropped, red `?` when missing.
|
|
|
59
60
|
`PgUp`/`PgDn`, `Home`/`End` scroll, `q` or `Esc` closes and gives the
|
|
60
61
|
screen back. Read-only.
|
|
61
62
|
- Off a terminal — a pipe, CI, an agent's tool — Markdown: a table per tab.
|
|
62
|
-
-
|
|
63
|
-
|
|
63
|
+
- `--json`, terminal or not: the tabs and their rows, with what a Claude
|
|
64
|
+
Code session shows of the workspace, worded by the CLI — the session-start
|
|
65
|
+
banner, the status line entry, the scope's plans `In progress` and the
|
|
66
|
+
notes of the safety net (see "Hooks"). The plugin's mod reads it (see
|
|
67
|
+
"The mod").
|
|
68
|
+
- From Claude Code, `/rness:status [tab]` opens a pane beside the
|
|
69
|
+
conversation when the plugin's mod is loaded (see "The mod"), and shows
|
|
70
|
+
those tables otherwise (see "Agent targets"). Nothing started from inside
|
|
71
|
+
Claude Code gets the terminal, so
|
|
64
72
|
the view cannot open from there (verified with Claude Code 2.1.284 on
|
|
65
73
|
2026-09-29). Two ways to reach it, and the skill ends with both: in the
|
|
66
74
|
same terminal, `Ctrl+Z` suspends Claude Code, run `npx @rness/cli status`
|
|
@@ -93,11 +101,12 @@ the files a given agent needs, for the agents the team declares in
|
|
|
93
101
|
applies it once the repository has been trusted interactively. Verified
|
|
94
102
|
with Claude Code 2.1.284 on 2026-09-29. Each clone also gets `.mcp.json`,
|
|
95
103
|
which registers the MCP server; see "MCP server". The same settings file
|
|
96
|
-
carries
|
|
104
|
+
carries four hooks, and so does `.claude/settings.json` at the workspace
|
|
97
105
|
root, which `sync` writes on every machine; see "Hooks". Both places also
|
|
98
|
-
get a Claude Code plugin, `.claude/skills/rness/`, with
|
|
106
|
+
get a Claude Code plugin, `.claude/skills/rness/`, with four commands:
|
|
99
107
|
`/rness:status [tab]`, the tables of `rness status`, and the lifecycle
|
|
100
|
-
skills below
|
|
108
|
+
skills below; and a mod, its hooks module (see "The mod"). rness owns
|
|
109
|
+
those files whole — an edit by hand is reported
|
|
101
110
|
by `sync --check` and written back by `sync`. The plugin's manifest,
|
|
102
111
|
`.claude-plugin/plugin.json`, also carries the agent-plugins.org
|
|
103
112
|
`$schema`, the author, homepage, repository, licence and keywords, so a
|
|
@@ -152,10 +161,60 @@ the files a given agent needs, for the agents the team declares in
|
|
|
152
161
|
- Other agents (Codex, Cursor, GitHub Copilot) read the `AGENTS.md` block;
|
|
153
162
|
`sync` refuses an agent it has no target for.
|
|
154
163
|
|
|
164
|
+
### The mod
|
|
165
|
+
|
|
166
|
+
Since 0.19.0 the plugin carries a hooks module — what Claude Code calls a
|
|
167
|
+
mod — in `hooks/hooks.json`, `hooks/register.tsx` and `types/index.d.ts`.
|
|
168
|
+
It draws the workspace in the session, from `rness status --json` run by
|
|
169
|
+
the pinned copy, and computes nothing itself:
|
|
170
|
+
|
|
171
|
+
- **A band above the prompt**, whenever a note needs action (a pin the
|
|
172
|
+
installed copy does not match, problems `validate` would report): those
|
|
173
|
+
notes. The banner is not repeated there; the session-start line says it
|
|
174
|
+
once, in the transcript.
|
|
175
|
+
- **The status line**: `<scope> · <n> in progress`, with `⚠ <n>` when
|
|
176
|
+
there are notes. Claude Code draws it after the plugin's name:
|
|
177
|
+
`⚠ rness: web · 1 in progress` (2.1.289).
|
|
178
|
+
- **`/rness:status [tab]` as a pane** beside the conversation, a tab per
|
|
179
|
+
collection, a row per document; no model turn. The pane takes the
|
|
180
|
+
keyboard as it opens: a tab's digit (written before its name), or Tab
|
|
181
|
+
then Enter, shows that tab; ↑/↓, `PgUp`/`PgDn`, `Home`/`End` scroll, as
|
|
182
|
+
in the full-screen `rness status`; Esc and `q` close it, and so does Esc
|
|
183
|
+
at an empty prompt once the prompt has the keys back. A pane has no
|
|
184
|
+
←/→ in Claude Code 2.1.289. In `claude -p`, or where no pane can be
|
|
185
|
+
placed, the skill's tables answer instead.
|
|
186
|
+
|
|
187
|
+
It reads the snapshot again at session start, after an `Edit` or `Write`
|
|
188
|
+
of a file under `.rness/`, and at the end of each turn, off the turn's
|
|
189
|
+
path. The module runs the pinned copy at the one path `sync` writes into it
|
|
190
|
+
for its place (`.rness` at the root, `../../.rness` in a clone), as the
|
|
191
|
+
settings hooks do: never a copy a clone's own tree could hold. It loads
|
|
192
|
+
where the plugin loads — a trusted folder, `claude -p` included — on a
|
|
193
|
+
Claude Code that has mods: run by 2.1.280 and later, ignored without an
|
|
194
|
+
error by 2.1.240 and 2.1.199, where the skills work as before (verified on
|
|
195
|
+
2026-10-04). An older Claude Code is told so once per version and machine,
|
|
196
|
+
in the session-start line: `rness: Claude Code 2.1.240 shows no rness band,
|
|
197
|
+
status line or pane; 2.1.280 or later does — claude update`. The version
|
|
198
|
+
comes from `AI_AGENT`, which Claude Code sets (2.1.240 does); one that does
|
|
199
|
+
not set it, or not in that form, is told nothing. The versions told are kept
|
|
200
|
+
in `claude-code.json` beside the login (`~/.config/rness/` by default). Not in
|
|
201
|
+
`claude -p` or another SDK session, where nobody would read it; not after a
|
|
202
|
+
compaction. Versions between 2.1.240 and 2.1.280 were not tried: one of
|
|
203
|
+
them that loads mods is told to update for nothing. Mods are early access
|
|
204
|
+
in Claude Code: a release that changes their API may stop the band or the
|
|
205
|
+
pane until the next rness release; the skills and the settings hooks do not
|
|
206
|
+
depend on it.
|
|
207
|
+
|
|
208
|
+
To work on it, from `org/rness`: `pnpm check:mod` runs
|
|
209
|
+
`claude plugin validate` and `claude plugin test` on `packages/cli/mod`
|
|
210
|
+
(Claude Code needed, so not in CI); `tsc -p packages/cli/mod` type-checks it
|
|
211
|
+
once a `claude --plugin-dir packages/cli/mod` session has laid Claude
|
|
212
|
+
Code's types there.
|
|
213
|
+
|
|
155
214
|
### Hooks
|
|
156
215
|
|
|
157
216
|
With `claude` in `agents`, each clone's `.claude/settings.json` and the
|
|
158
|
-
workspace root's carry
|
|
217
|
+
workspace root's carry four Claude Code hooks, all run by the pinned copy:
|
|
159
218
|
|
|
160
219
|
- **At session start** (`SessionStart`, every source): a line for the
|
|
161
220
|
developer — `rness 0.10.0 · acme · scope web — 3 standards, 2 decisions`
|
|
@@ -163,7 +222,18 @@ workspace root's carry three Claude Code hooks, all run by the pinned copy:
|
|
|
163
222
|
them. When the context may be wrong, both say why: no `.rness` next to the
|
|
164
223
|
repository or nothing installed there, a `rness.json` rness refuses, a pin
|
|
165
224
|
the installed copy does not match, the problems `rness validate` reports.
|
|
166
|
-
|
|
225
|
+
A Claude Code too old for the plugin's mod gets one more line, once (see
|
|
226
|
+
"The mod"). After a compaction, the context only.
|
|
227
|
+
- **Before an edit** (`PreToolUse` on `Edit|Write`): refused, with the
|
|
228
|
+
reason for the model, when it would change what `sync` generates — a
|
|
229
|
+
line of the block of an `AGENTS.md` or `CLAUDE.md` (the reason names the
|
|
230
|
+
standard that line comes from, to edit instead), or a file of
|
|
231
|
+
`.claude/skills/rness/` — or add a problem to a document of `.rness/` or
|
|
232
|
+
to `rness.json`. Only the problems the edit adds: a document already
|
|
233
|
+
broken stays editable. The `old_string` is found as Claude Code's `Edit`
|
|
234
|
+
finds it, straight quotes matching curly ones. Writes through Bash are
|
|
235
|
+
not seen: the guard is best effort. About 0.07 s per edit, 0.11 s for a
|
|
236
|
+
document of `.rness/` (measured 2026-10-04).
|
|
167
237
|
- **After an edit** (`PostToolUse` on `Edit|Write`): when the file is under
|
|
168
238
|
`.rness/`, its front-matter problems — or those of `rness.json` — go back
|
|
169
239
|
to the model, which fixes them in the same turn. Any other edit costs one
|
|
@@ -181,7 +251,7 @@ hand counts as missing, and the next `sync` adds a second one. The team's
|
|
|
181
251
|
own hooks stay where they are.
|
|
182
252
|
|
|
183
253
|
Claude Code runs hooks from a committed settings file without asking each
|
|
184
|
-
developer, including in `claude -p`. These
|
|
254
|
+
developer, including in `claude -p`. These four read `.rness/`, write
|
|
185
255
|
nothing in the workspace and run no install. Only with a pulse declared do
|
|
186
256
|
they reach the network, through a detached `rness` process that uses your
|
|
187
257
|
login; when that process fails, it writes why to `pulse.json` in rness's
|
|
@@ -604,6 +674,23 @@ per repository, the files to commit there.
|
|
|
604
674
|
Exit codes: 0 success, 1 failure, 2 usage — or a refusal without a TTY.
|
|
605
675
|
`RNESS_DEBUG=1` adds stack traces; `RNESS_NO_DELEGATE=1` skips the delegation.
|
|
606
676
|
|
|
677
|
+
## 0.19.0 — the plugin's mod; edits of generated files refused before they land
|
|
678
|
+
|
|
679
|
+
- The Claude Code plugin gains a mod (see "The mod"): the notes to act on
|
|
680
|
+
above the prompt, a status line entry, and `/rness:status` as a pane
|
|
681
|
+
beside the conversation, with no model turn, driven by the keyboard. `sync` writes three more files into `.claude/skills/rness/`,
|
|
682
|
+
at the root and in each clone; an upgrade lists the clone's for commit.
|
|
683
|
+
Claude Code without mods ignores them; older than 2.1.280, it is told once
|
|
684
|
+
per version, in the session-start line, to run `claude update` (when it
|
|
685
|
+
sets `AI_AGENT`, as 2.1.240 does).
|
|
686
|
+
- A fourth hook, `PreToolUse` on `Edit|Write`: an edit of the block of an
|
|
687
|
+
`AGENTS.md` or `CLAUDE.md`, or of the plugin's files, is refused before
|
|
688
|
+
it is written, naming the file to edit instead; so is an edit that would
|
|
689
|
+
add a problem to a document of `.rness/` or to `rness.json`. Until the
|
|
690
|
+
upgrade has run on a machine, a session there runs the old pinned copy,
|
|
691
|
+
which says `unknown hook event "pre-tool-use"` and lets the edit through.
|
|
692
|
+
- `rness status --json` prints the tabs and what the mod draws.
|
|
693
|
+
|
|
607
694
|
## 0.18.1 — a document without a number is caught; small fixes
|
|
608
695
|
|
|
609
696
|
- `rness validate` and the edit hook name a document of `adr/`, `specs/` or
|