@staff0rd/assist 0.960.0 → 0.962.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
@@ -240,6 +240,7 @@ A run entry's relative `cwd` (and a `link` path) resolves against the **repo roo
240
240
  - `assist config set <key> <value>` - Set a config value. `--global` writes to `~/.assist.yml`; `-g --repo [name]` writes a per-repo override to the shared assist database, so every node on that database sees it; `--user` writes user (db), a layer in the shared database that applies to every repo on every node, below `~/.assist.yml` (array keys such as `advice.rules` and `deny` concatenate with its entries first; `database.*` and `sync.autoConfirm` stay in `~/.assist.yml`)
241
241
  - `assist config unset <key>` - Remove a config value so the key falls back to the global value or schema default (`-g` targets `~/.assist.yml`; `-g --repo [name]` removes it from the shared per-repo override; `--user` removes it from user (db))
242
242
  - `assist config import-repos` - Move this machine's `~/.assist.yml` `repos:` overrides into the shared database: prints a per-key diff against each repo's shared override, then on confirmation writes the keys and removes `repos:` from `~/.assist.yml`
243
+ - `assist config import-user [keys...]` - Move keys (default `advice.rules`) from this node's `~/.assist.yml` into user (db): prints a diff against user (db) (array keys gain only the entries it lacks), then on confirmation writes them and removes the keys from `~/.assist.yml`. `loadConfig` warns while `~/.assist.yml` holds `advice.rules` entries user (db) lacks
243
244
 
244
245
  The web config page's "This repo" scope reads and writes the same shared override. Each node mirrors the shared per-repo overrides into `~/.assist/repo-config-cache.json` when its daemon starts, every minute while it runs, and after its own repo-scope writes, and resolves config from that snapshot, so an unreachable database leaves the last snapshot in effect. A `repos:` entry in `~/.assist.yml` still applies, with a warning naming `assist config import-repos`, until the shared database holds an override for that repo, after which it is ignored.
245
246
 
@@ -275,7 +276,8 @@ Rules are `- **<code>** — **<title>** — <text>` bullets, the title optional,
275
276
 
276
277
  - `assist rules list [path] [--full]` - List the rules in scope for a path (default: cwd); `--full` adds each rule's description
277
278
  - `assist rules add <text> [--title <title>] [--scope <path>]` - Add a rule to the `## Rules` section of the `CLAUDE.md` nearest `--scope` (default cwd)
278
- - `assist rules add <text> --title <title> --global` - Append a `{ title, text }` entry to `advice.rules` in `~/.assist.yml` instead, for rules about agent conduct that hold in every repo; it takes no R-code and can't be combined with `--scope`. Global rules are per machine (WSL and Windows each have their own `~/.assist.yml`)
279
+ - `assist rules add <text> --title <title> --user` - Append a `{ title, text }` entry to `advice.rules` in user (db) instead, for rules about agent conduct that hold in every repo on every node; it takes no R-code and can't be combined with `--scope`
280
+ - `assist rules add <text> --title <title> --node` - As `--user`, but append to `advice.rules` in user (node), this node's `~/.assist.yml`
279
281
  - `assist rules index` - Record the directories that carry their own `## Rules` in the repo root's `CLAUDE.md`; run it after hand-editing a `## Rules` section
280
282
 
281
283
  ### Devlog
@@ -25,9 +25,9 @@ Ask the user a clarifying question only when the note is genuinely too vague to
25
25
 
26
26
  ## Step 3: Work out the scope
27
27
 
28
- The scope is the directory whose `CLAUDE.md` gets the rule, or global. Infer it — do not ask by default:
28
+ The scope is the directory whose `CLAUDE.md` gets the rule, or `user (db)`. Infer it — do not ask by default:
29
29
 
30
- - If the rule is about agent conduct that holds in every repo rather than about this repo's code or docs (e.g. "give the URL, not a nav path", "don't ask for sign-off in chat"), the scope is **global**: it goes to `advice.rules` in `~/.assist.yml` and reaches every session on this machine. A rule that only makes sense for this repo's files, conventions or tooling is never global.
30
+ - If the rule is about agent conduct that holds in every repo rather than about this repo's code or docs (e.g. "give the URL, not a nav path", "don't ask for sign-off in chat"), the scope is **`user (db)`**: it goes to `advice.rules` in the shared db and reaches every session in every repo on every node. A rule that only makes sense for this repo's files, conventions or tooling never goes there. Use `user (node)` (this node's `~/.assist.yml`) only when the user asks for the rule to stay on this node.
31
31
  - With a file path, the default is the nearest `CLAUDE.md` walking up from that file's directory to the repo root. `assist rules list <path>` shows what is already in scope there, which tells you where sibling rules live.
32
32
  - If the note is clearly about a kind of document that lives in one directory (and the file sits in it), that directory's `CLAUDE.md` is the scope — pass `--scope <dir>/CLAUDE.md` to create it there when it does not exist yet.
33
33
  - If the rule plainly applies repo-wide, use the root `CLAUDE.md`.
@@ -43,20 +43,20 @@ assist rules add '<rule text>' --title '<title>' --scope <path> 2>&1
43
43
 
44
44
  `--scope` takes a file, a directory, or a `CLAUDE.md` path directly. A file or directory resolves to the nearest existing `CLAUDE.md` at or above it; a `CLAUDE.md` path is written to as given, created if absent. The command allocates the next repo-wide code, creates the `## Rules` section when the file has none, and records the directories that carry their own `## Rules` in the root `CLAUDE.md`.
45
45
 
46
- For a global rule, pass `--global` instead of `--scope` (the two can't be combined); `--title` is required:
46
+ For a `user (db)` rule, pass `--user` instead of `--scope` (the two can't be combined); `--title` is required:
47
47
 
48
48
  ```
49
- assist rules add '<rule text>' --title '<title>' --global 2>&1
49
+ assist rules add '<rule text>' --title '<title>' --user 2>&1
50
50
  ```
51
51
 
52
- It appends the rule to `advice.rules` in `~/.assist.yml` with no R-code. Global rules are per machine, so on a setup with both WSL and Windows nodes tell the user it only reaches this one.
52
+ It appends the rule to `advice.rules` in `user (db)` with no R-code. For `user (node)`, pass `--node` instead of `--user`.
53
53
 
54
54
  Use single quotes around the rule text to avoid shell escaping issues.
55
55
 
56
- Show the command output — it names the allocated code (or, for a global rule, the title) and the file — then tell the user in one line which rule was added and where.
56
+ Show the command output — it names the allocated code (or, for a `user (db)` or `user (node)` rule, the title) and where it went — then tell the user in one line which rule was added and where.
57
57
 
58
58
  ## Step 5: Fix what broke it
59
59
 
60
- The rule exists because something broke it, so the quoted text is now a live violation. Rectify it in the same pass, without being asked: edit the quoted text in the file the `File:` line named, so it follows the rule you just wrote. Where there was no `File:` line, fix the draft or the text the quote came from. A global rule is no exception: the quoted violation still gets fixed, even though the rule went to `~/.assist.yml` rather than a file in this repo.
60
+ The rule exists because something broke it, so the quoted text is now a live violation. Rectify it in the same pass, without being asked: edit the quoted text in the file the `File:` line named, so it follows the rule you just wrote. Where there was no `File:` line, fix the draft or the text the quote came from. A `user (db)` or `user (node)` rule is no exception: the quoted violation still gets fixed, even though the rule went to `advice.rules` rather than a file in this repo.
61
61
 
62
62
  Fix the instance you were given. Do not sweep the rest of the repo for other violations of the new rule unless the user asks for that.