@staff0rd/assist 0.439.1 → 0.440.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
@@ -131,6 +131,7 @@ Backlog item ids are written and displayed in an `a`-prefixed form (e.g. item 55
131
131
  - `assist backlog list [--status <type>] [-a, --all] [--all-repos] [-v]` - List backlog items with status icons (alias: `ls`). Defaults to the current repository's todo/in-progress items; `--all` includes done/wontdo, `--all-repos` lists items across all repositories. Also available as the top-level shortcut `assist list` / `assist ls` with the same flags
132
132
  - `assist backlog add` - Add a new backlog item interactively (prompts for type: story/bug)
133
133
  - `assist backlog add --name <n> --type <t> --desc <d> --ac <criterion...>` - Add a backlog item from CLI options (used by `/draft`)
134
+ - `assist backlog propose --json <file|->` - Review a complete agent-authored backlog item before it is created, from a JSON payload read from a file or stdin (`name`, `type`, `description`, `acceptanceCriteria`). In a web session it slides the rendered item into the preview pane and blocks: approval writes the item (including a bug's default `Fix` phase and any configured sub-tasks) and prints its id, while rejection exits non-zero with the reviewer's reason and each inline comment so the caller can revise and re-propose. Outside a web session it prints the rendered item and creates it. Used by `/bug`; the payload is strict, so an unknown key is an error. See [docs/backlog-item-preview.md](docs/backlog-item-preview.md)
134
135
  - `assist backlog add-phase <id> <name> --task <t...> [--manual-check <c...>] [--position <pos>]` - Add a phase (appends by default; `--position` inserts at a 1-indexed position)
135
136
  - `assist backlog add-subtask <id> --title <t> [--desc <d>]` - Add a sub-task (status `todo`) to a backlog item. Sub-tasks listed under the `subtasks` key (each `title` and optional `description`) in `assist.yml` and `~/.assist.yml` are auto-applied to every newly created item (stories and bugs); the global and project lists are combined
136
137
  - `assist backlog edit-subtask <id> <idx> [--title <t>] [--desc <d>] [--status <s>]` - Edit a sub-task by its 1-based index from `backlog show`; updates any combination of title, description, and status (omitted fields are left unchanged). `--desc` supports Markdown and `\n` line breaks (pass `--desc ""` to clear it); `--status` must be one of `todo`, `in-progress`, `done`
@@ -7,6 +7,7 @@ assist backlog done
7
7
  assist backlog link
8
8
  assist backlog phase-done
9
9
  assist backlog plan
10
+ assist backlog propose
10
11
  assist backlog remove-phase
11
12
  assist backlog unlink
12
13
  assist backlog update
@@ -23,7 +23,16 @@ Skip questions the user has already answered. Stop asking as soon as you have en
23
23
 
24
24
  ## Step 3: Propose the item
25
25
 
26
- Show the user the bug report:
26
+ Where the review happens depends on whether this is a web session — check it once:
27
+
28
+ ```
29
+ echo "${ASSIST_SESSION:-0}"
30
+ ```
31
+
32
+ - **`1` (web session):** do NOT print the bug report in the terminal. Skip straight to Step 5 — `assist backlog propose` slides the item into the web UI preview pane, where the user approves it, rejects it, or leaves inline comments on specific lines. That pane is the review gate.
33
+ - **anything else:** show the user the bug report in chat as below, iterate (Step 4), then save.
34
+
35
+ Either way you compose the same content, so draft it before you call `propose`:
27
36
 
28
37
  **Name:** (concise title)
29
38
  **Type:** bug
@@ -55,17 +64,33 @@ The description renders as markdown in both the terminal (`assist backlog show`)
55
64
 
56
65
  ## Step 4: Iterate
57
66
 
58
- Ask the user if they want to change anything. Iterate until they confirm.
67
+ In a web session, skip this step — the preview pane handles it.
68
+
69
+ Otherwise, ask the user if they want to change anything and iterate until they confirm.
59
70
 
60
71
  ## Step 5: Save
61
72
 
62
- Once confirmed, add the item via CLI and capture the id it prints:
73
+ Propose the item and capture the id it prints. Use `propose`, not `assist backlog add` — `propose` is the reviewed path for an agent-authored item:
63
74
 
64
75
  ```
65
- assist backlog add --name "Bug title" --type bug --desc "$(printf '**Repro:**\n\n1. ...\n2. ...\n\n**Expected:** ...\n\n**Actual:** ...')" --ac "criterion 1" --ac "criterion 2" 2>&1
76
+ cat <<'JSON' | assist backlog propose --json - 2>&1
77
+ {
78
+ "name": "Bug title",
79
+ "type": "bug",
80
+ "description": "**Repro:**\n\n1. ...\n2. ...\n\n**Expected:** ...\n\n**Actual:** ...",
81
+ "acceptanceCriteria": ["criterion 1", "criterion 2"]
82
+ }
83
+ JSON
66
84
  ```
67
85
 
68
- Pass the description as real markdown with line breaks preserved (use `printf` or a quoted heredoc so the `\n` sequences become actual newlines, not literal `\n` characters).
86
+ The payload is strict JSON — an unknown key is an error. `\n` inside the `description` string is a JSON escape and becomes a real newline, which is what the markdown rendering needs.
87
+
88
+ In a web session this blocks until the user decides in the preview pane:
89
+
90
+ - **Approved** — the item is created and its id is printed.
91
+ - **Rejected** — the command exits non-zero and prints the reason plus every inline comment with the excerpt it was left on. Do not retry verbatim: address each comment, then call `propose` again with the revised payload. Repeat until it is approved.
92
+
93
+ Outside a web session the rendered item is printed and created straight away.
69
94
 
70
95
  Note the created item id from the output — you'll pass it to the done signal below.
71
96
 
@@ -7,6 +7,7 @@ assist backlog done
7
7
  assist backlog link
8
8
  assist backlog phase-done
9
9
  assist backlog plan
10
+ assist backlog propose
10
11
  assist backlog remove-phase
11
12
  assist backlog unlink
12
13
  assist backlog update