@staff0rd/assist 0.936.0 → 0.938.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 +2 -1
- package/claude/commands/add-rule.md +12 -3
- package/claude/skills/review-ci/scripts/review.mjs +117 -117
- package/dist/commands/sessions/web/bundle.js +1 -1
- package/dist/index.js +167 -96
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -272,6 +272,7 @@ Rules are `- **<code>** — **<title>** — <text>` bullets, the title optional,
|
|
|
272
272
|
|
|
273
273
|
- `assist rules list [path] [--full]` - List the rules in scope for a path (default: cwd); `--full` adds each rule's description
|
|
274
274
|
- `assist rules add <text> [--title <title>] [--scope <path>]` - Add a rule to the `## Rules` section of the `CLAUDE.md` nearest `--scope` (default cwd)
|
|
275
|
+
- `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`)
|
|
275
276
|
- `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
|
|
276
277
|
|
|
277
278
|
### Devlog
|
|
@@ -297,7 +298,7 @@ Rules are `- **<code>** — **<title>** — <text>` bullets, the title optional,
|
|
|
297
298
|
- `assist code-comment confirm <pin>` - Insert the pinned comment at its file/line
|
|
298
299
|
- `assist db-migration unlock` - Ask a human to approve creating the next migration module
|
|
299
300
|
- `assist db-migration confirm <pin>` - Confirm a pin from `db-migration unlock`, letting that migration's file be written once
|
|
300
|
-
- `assist advise [--hook] [--explain]` - Print the advice fragments that apply to the current repo; `--hook` runs it as a SessionStart hook and `--explain` shows why each fragment was or wasn't included. `advice.sections` forces a fragment in or out by name, `advice.verify` replaces the verify fragment's text
|
|
301
|
+
- `assist advise [--hook] [--explain]` - Print the advice fragments that apply to the current repo; `--hook` runs it as a SessionStart hook and `--explain` shows why each fragment was or wasn't included. `advice.sections` forces a fragment in or out by name, `advice.verify` replaces the verify fragment's text, `advice.extra` appends repo notes and `advice.rules` (`{ title, text }` entries, global and repo lists concatenated, global first) adds a "Your rules" section
|
|
301
302
|
- `assist notify` - Show desktop notification from JSON stdin (macOS, Windows, WSL)
|
|
302
303
|
- `assist status-line` - Format Claude Code status line from JSON stdin
|
|
303
304
|
|
|
@@ -25,8 +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. Infer it — do not ask by default:
|
|
28
|
+
The scope is the directory whose `CLAUDE.md` gets the rule, or global. 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
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.
|
|
31
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.
|
|
32
33
|
- If the rule plainly applies repo-wide, use the root `CLAUDE.md`.
|
|
@@ -42,12 +43,20 @@ assist rules add '<rule text>' --title '<title>' --scope <path> 2>&1
|
|
|
42
43
|
|
|
43
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`.
|
|
44
45
|
|
|
46
|
+
For a global rule, pass `--global` instead of `--scope` (the two can't be combined); `--title` is required:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
assist rules add '<rule text>' --title '<title>' --global 2>&1
|
|
50
|
+
```
|
|
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.
|
|
53
|
+
|
|
45
54
|
Use single quotes around the rule text to avoid shell escaping issues.
|
|
46
55
|
|
|
47
|
-
Show the command output — it names the allocated code 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 global rule, the title) and the file — then tell the user in one line which rule was added and where.
|
|
48
57
|
|
|
49
58
|
## Step 5: Fix what broke it
|
|
50
59
|
|
|
51
|
-
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.
|
|
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.
|
|
52
61
|
|
|
53
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.
|