@rness/cli 0.6.1 → 0.7.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 CHANGED
@@ -20,10 +20,10 @@ Inside a workspace, every `rness` delegates to the copy pinned in
20
20
 
21
21
  ## Commands
22
22
 
23
- rness create [<org>] [--repos a,b] [--pm npm|pnpm|yarn|bun] [--ssh|--https] [--skip-install] -y
24
- rness create <name> --blank [--pm npm|pnpm|yarn|bun] [--skip-install] -y
23
+ rness create [<org>] [--repos a,b] [--agent claude] [--pm npm|pnpm|yarn|bun] [--ssh|--https] [--skip-install] -y
24
+ rness create <name> --blank [--agent claude] [--pm npm|pnpm|yarn|bun] [--skip-install] -y
25
25
  rness add <repo> [--scopes apps/web,packages/ui] [--ssh|--https] -y
26
- rness sync [--all] [--scope <name>] [--check] [--pull] -y
26
+ rness sync [--all] [--scope <name>] [--check] [--pull] [--agent <name>] -y
27
27
  rness upgrade [<version>] -y
28
28
  rness login [--setup-git|--no-setup-git]
29
29
  rness logout
@@ -40,6 +40,35 @@ writes nothing and exits 1 when a block is out of date — use it in CI.
40
40
  `.rness/` goes to the network. Bring repositories in with
41
41
  `rness add <owner>/<repo>` or a git URL — a bare name needs an `"org"`.
42
42
 
43
+ ### Agent targets
44
+
45
+ The `AGENTS.md` block is what every agent reads. On top of it, rness writes
46
+ the files a given agent needs, for the agents the team declares in
47
+ `rness.json`:
48
+
49
+ rness sync --agent claude # declare claude, then write its files
50
+ rness sync # in a terminal, with nothing declared, asks once
51
+
52
+ ```json
53
+ { "contract": 1, "org": "acme", "agents": ["claude"], "repos": { … }, "scopes": { … } }
54
+ ```
55
+
56
+ - `agents` is the team's: the files it produces are committed in each
57
+ repository. `[]` means none; without the key, `sync` asks in a terminal and
58
+ never in scripts (`-y`, `--check`). A new workspace asks with `create`'s
59
+ other questions, or takes `--agent`.
60
+ - **Claude Code** (`claude`): each clone gets `.claude/settings.json` with
61
+ `../../.rness` in `permissions.additionalDirectories`, so a session in the
62
+ repository reads the context repository without a prompt. Claude Code
63
+ applies it once the repository has been trusted interactively. Verified
64
+ with Claude Code 2.1.284 on 2026-09-29.
65
+ - rness owns values, not files: what is missing is added, nothing else is
66
+ touched, and a file it cannot parse is reported, never rewritten.
67
+ `sync --check` and `validate` report a missing value. Removing an agent
68
+ from `agents` leaves its values in place; `sync` says where.
69
+ - Other agents (Codex, Cursor, GitHub Copilot) read the `AGENTS.md` block;
70
+ `sync` refuses an agent it has no target for.
71
+
43
72
  ### Log in
44
73
 
45
74
  rness login # shows a code and https://github.com/login/device
@@ -147,6 +176,37 @@ its content does.
147
176
  Exit codes: 0 success, 1 failure, 2 usage — or a refusal without a TTY.
148
177
  `RNESS_DEBUG=1` adds stack traces; `RNESS_NO_DELEGATE=1` skips the delegation.
149
178
 
179
+ ## 0.7.0 — agent targets: Claude Code
180
+
181
+ - `rness.json` may declare the team's agents: `"agents": ["claude"]`. It is
182
+ an optional key of contract 1; no block changes. A CLI older than 0.7.0
183
+ refuses the key: move the pin before declaring an agent.
184
+ - `rness sync --agent claude` declares it and writes each clone's
185
+ `.claude/settings.json` (`../../.rness` in
186
+ `permissions.additionalDirectories`). In a terminal with nothing declared,
187
+ `sync` asks once which agents the team uses; `create` asks for a new
188
+ workspace, or takes `--agent`.
189
+ - `sync --check` and `validate` cover the agent files, and `sync --pull`
190
+ does not count them as local changes. See "Agent targets".
191
+
192
+ ## 0.6.2 — no dialog for the root CLAUDE.md
193
+
194
+ - Opening Claude Code in a repository of the workspace no longer asks "Allow
195
+ external CLAUDE.md file imports?". The workspace root `CLAUDE.md` carried
196
+ `@AGENTS.md`; Claude Code loads that file from every repository below it,
197
+ where the import points outside the working directory. `rness sync` now
198
+ writes the global block into the root `CLAUDE.md` itself; a line that is
199
+ exactly `@AGENTS.md` is dropped there, the rest of the file is kept. The
200
+ `CLAUDE.md` of each repository keeps its `@AGENTS.md`.
201
+ - The root files are not in any repository: run `rness sync` once after the
202
+ upgrade, on every machine. The blocks in the repositories are unchanged.
203
+ - `sync --check` and `validate` cover the root `CLAUDE.md`. At the root, a
204
+ symlink between `CLAUDE.md` and `AGENTS.md` is left as it is and the other
205
+ file is still written.
206
+ - The scaffold's `validate.yml` uses `actions/checkout@v7` and
207
+ `actions/setup-node@v7`, as the rness repositories do. A workspace created
208
+ before keeps its own file.
209
+
150
210
  ## 0.6.1 — hints you can type
151
211
 
152
212
  - Every hint that names a command to run (`not cloned: …`, `run … sync`,
package/dist/bin/rness.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  findDelegate,
7
7
  reportError,
8
8
  run
9
- } from "../chunk-YAIZOFYV.js";
9
+ } from "../chunk-VYP4L7BQ.js";
10
10
 
11
11
  // src/bin/rness.ts
12
12
  import { pathToFileURL } from "url";