@staff0rd/assist 0.613.1 → 0.614.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
@@ -239,8 +239,8 @@ The Config tab of the sessions web dashboard never receives secret values: `GET
239
239
 
240
240
  ### Rules
241
241
 
242
- - `assist rules list [path]` - List the rules in scope for a path (default: cwd), read from the `## Rules` section of every `CLAUDE.md` from that path's directory up to the repo root, nearest scope first, grouped by the file each rule came from. Rules are `- **<code>** — <text>` bullets
243
- - `assist rules add <text> [--scope <path>]` - Add a rule to the `## Rules` section of the scope's `CLAUDE.md`, creating the section when absent and allocating the next repo-wide code. `--scope` takes a file or directory (resolved to the nearest existing `CLAUDE.md` at or above it, defaulting to cwd) or a `CLAUDE.md` path written to directly and created if absent. After writing, the root `CLAUDE.md` records the directories that carry their own `## Rules` so scoped rules stay discoverable from the root
242
+ - `assist rules list [path] [--full]` - List the rules in scope for a path (default: cwd), read from the `## Rules` section of every `CLAUDE.md` from that path's directory up to the repo root, nearest scope first, grouped by the file each rule came from. Shows each rule's title, or its description where it has no title; `--full` adds the description under every title. Rules are `- **<code>** — **<title>** — <text>` bullets, the title optional
243
+ - `assist rules add <text> [--title <title>] [--scope <path>]` - Add a rule to the `## Rules` section of the scope's `CLAUDE.md`, creating the section when absent and allocating the next repo-wide code. `--title` is the few-word summary the rule picker shows in place of the description. `--scope` takes a file or directory (resolved to the nearest existing `CLAUDE.md` at or above it, defaulting to cwd) or a `CLAUDE.md` path written to directly and created if absent. After writing, the root `CLAUDE.md` records the directories that carry their own `## Rules` so scoped rules stay discoverable from the root
244
244
  - `assist rules index` - Record the directories that carry their own `## Rules` in the repo root's `CLAUDE.md`, rewriting the line in place rather than duplicating it. Always repo-wide, resolved from the cwd — it takes no path, since the index lives at the root by definition and cannot be narrowed. `rules add` does this on every add; run it directly after hand-editing a `## Rules` section (e.g. renaming an existing heading)
245
245
 
246
246
  ### Devlog
@@ -17,7 +17,9 @@ If `$ARGUMENTS` is empty, ask the user what rule they want to add and skip to St
17
17
 
18
18
  ## Step 2: Word the rule
19
19
 
20
- Write the rule as one short imperative sentence that generalises the note beyond this one instance — what to do (or not do), not what went wrong here. Keep it to a single line: it becomes a `- **<code>** — <text>` bullet.
20
+ Write the rule as one short imperative sentence that generalises the note beyond this one instance — what to do (or not do), not what went wrong here. Keep it to a single line: it becomes a `- **<code>** — **<title>** — <text>` bullet.
21
+
22
+ Then write its **title**: as few words as possible to tell this rule apart from the others, three or four at most. The rule picker shows the title alone, so it has to identify the rule on its own — "Keep it tight", "No implicit documentation". Not a restatement of the sentence, and not so generic it could name any rule in the file.
21
23
 
22
24
  Ask the user a clarifying question only when the note is genuinely too vague to word a rule from. One question, then write it.
23
25
 
@@ -35,7 +37,7 @@ Ask the user only when two scopes are genuinely defensible and the choice change
35
37
  ## Step 4: Write it
36
38
 
37
39
  ```
38
- assist rules add '<rule text>' --scope <path> 2>&1
40
+ assist rules add '<rule text>' --title '<title>' --scope <path> 2>&1
39
41
  ```
40
42
 
41
43
  `--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`.
@@ -39,16 +39,18 @@ Not rules, and left alone: where files live, what a directory is for, source loc
39
39
 
40
40
  ## Step 3: Classify each file
41
41
 
42
- **Rename** — the section's bullets are already `- **<code>** — <text>` and the whole section is rules. Rename that heading to `## Rules`. Nothing else changes, and the existing codes are preserved. This is the cheapest and safest fix; prefer it whenever it applies.
42
+ **Rename** — the section's bullets are already `- **<code>** — <text>` and the whole section is rules. Rename that heading to `## Rules`. The existing codes are preserved. This is the cheapest and safest fix; prefer it whenever it applies.
43
43
 
44
44
  **Reword** — the rules are prose or a numbered list. Word each as one short imperative line, then add them one at a time:
45
45
 
46
46
  ```
47
- assist rules add '<rule text>' --scope <path to that CLAUDE.md> 2>&1
47
+ assist rules add '<rule text>' --title '<title>' --scope <path to that CLAUDE.md> 2>&1
48
48
  ```
49
49
 
50
50
  `rules add` allocates the next repo-wide code, creates the `## Rules` section when the file has none, and keeps the root index current. Then delete the prose it replaced, so the rule is not stated twice in the same file. If a prose section carried context beyond the rule itself, keep the context where it is and take only the instruction.
51
51
 
52
+ **Title** — a rule already in bullet form but with no title gets one, edited into the bullet as a second bold span: `- **R1** — **Keep it tight** — around 30 lines…`. This applies to the bullets you just renamed, which `rules add` never touched. A title is as few words as possible to tell that rule apart from its neighbours, three or four at most — the rule picker shows it alone, with the description only on hover.
53
+
52
54
  **Leave** — the file has no standing rules. Say so and move on.
53
55
 
54
56
  ## Constraints