revspec 0.7.2 → 0.7.3

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
@@ -21,6 +21,22 @@ git clone https://github.com/icyrainz/revspec.git
21
21
  cd revspec && bun install && bun link
22
22
  ```
23
23
 
24
+ ### Claude Code plugin
25
+
26
+ Install the `/revspec` skill for Claude Code:
27
+
28
+ ```bash
29
+ /plugin marketplace add icyrainz/revspec
30
+ /plugin install revspec
31
+ ```
32
+
33
+ Or manually (symlink, stays updated with repo):
34
+
35
+ ```bash
36
+ mkdir -p ~/.claude/skills
37
+ ln -sfn /path/to/revspec/skills/revspec ~/.claude/skills/revspec
38
+ ```
39
+
24
40
  ## Usage
25
41
 
26
42
  ```bash
@@ -137,16 +153,6 @@ Sends an AI reply that appears instantly in the reviewer's TUI.
137
153
  8. Repeat 3-7 until A (approve)
138
154
  ```
139
155
 
140
- ### Claude Code skill
141
-
142
- Install the `/revspec` skill for Claude Code:
143
-
144
- ```bash
145
- ./scripts/install-skill.sh
146
- ```
147
-
148
- Then use `/revspec` in Claude Code after generating a spec.
149
-
150
156
  ## Testing
151
157
 
152
158
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revspec",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Terminal-based spec review tool with real-time AI conversation",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,17 +1,18 @@
1
1
  ---
2
2
  name: revspec
3
- description: Launch revspec to review a spec document with real-time AI feedback. Use when the user says /revspec, "review the spec", "let me review this", or after generating a spec/design document that needs human review. Also use when a brainstorming or writing-plans skill produces a markdown spec file.
3
+ description: Launch revspec to review a spec document with real-time AI feedback. Use when the user says /revspec, "review the spec", "let me review this", or after generating a spec/design document that needs human review. Also use when a brainstorming or writing-plans skill produces a markdown spec file. Works on any markdown file (ADRs, READMEs, etc.) but primarily designed for spec review. Works even when no .md file exists yet (inline or plan mode content gets saved to a file first). Supports `/revspec <path>` to review a specific file and resuming previous review sessions.
4
4
  ---
5
5
 
6
6
  # Revspec — Live Spec Review
7
7
 
8
- Launch revspec to let the human review a spec document with real-time AI conversation. The reviewer comments on specific lines, you reply instantly, and the discussion continues until the spec is approved.
8
+ Launch revspec to let the human review a spec document with real-time AI conversation. The reviewer comments on specific lines, you reply instantly, and the discussion continues until the spec is approved. Also works on any markdown file.
9
9
 
10
10
  ## When to Use
11
11
 
12
12
  - After writing or updating a spec/design document
13
13
  - When the user explicitly asks to review a spec
14
14
  - After the brainstorming or writing-plans skill produces a `.md` file
15
+ - When the user provides a file path: `/revspec <path>`
15
16
 
16
17
  ## How It Works
17
18
 
@@ -21,12 +22,22 @@ You and the human communicate through revspec's CLI:
21
22
 
22
23
  The reviewer stays in the revspec TUI for the entire session. You run the watch/reply loop.
23
24
 
24
- ## Step 1: Find the Spec File
25
+ ## Step 1: Find or Create the File
25
26
 
26
- Detect which spec was recently created or modified in this conversation. Look for:
27
+ **If a file path was provided** (e.g., `/revspec docs/my-spec.md`):
28
+ Use it directly — skip the search below.
29
+
30
+ **Otherwise**, detect which file was recently created or modified in this conversation:
27
31
  - Files written to `docs/superpowers/specs/*.md`
28
32
  - The last `.md` file you created or edited
29
- - If ambiguous, ask the user which file to review
33
+
34
+ **If the content was written inline** (proposed in conversation output or plan mode, never saved to a file):
35
+ 1. Save the content to a `.md` file — use `docs/superpowers/specs/<topic>.md` or a reasonable path in the project
36
+ 2. Confirm the file path with the user before proceeding
37
+
38
+ If ambiguous, ask the user which file to review.
39
+
40
+ **Resuming a previous review:** Check if a `.review.jsonl` file already exists for the target file (e.g., `spec.review.jsonl`). If it does, the TUI will restore previous threads automatically — let the user know they're resuming where they left off.
30
41
 
31
42
  ## Step 2: Launch Revspec
32
43
 
@@ -42,7 +53,21 @@ echo $TMUX
42
53
  tmux split-window -t "$TMUX_PANE" -v "revspec <spec-file>"
43
54
  ```
44
55
 
45
- **If no tmux:**
56
+ **If no tmux, but on macOS:** detect the terminal and open a new window:
57
+
58
+ ```bash
59
+ echo $TERM_PROGRAM
60
+ ```
61
+
62
+ | `$TERM_PROGRAM` | Launch command |
63
+ |---|---|
64
+ | `Apple_Terminal` | `osascript -e 'tell application "Terminal" to do script "revspec <spec-file>"'` |
65
+ | `iTerm.app` | `osascript -e 'tell application "iTerm2" to create window with default profile command "revspec <spec-file>"'` |
66
+ | `WezTerm` | `wezterm start -- revspec <spec-file>` |
67
+ | `ghostty` | `ghostty -e revspec <spec-file>` |
68
+ | Other/unknown | Fall back to `osascript` with Terminal.app |
69
+
70
+ **Otherwise (not macOS):**
46
71
  Tell the user: "Please run in another terminal: `revspec <spec-file>`"
47
72
 
48
73
  ## Step 3: Run the Watch/Reply Loop
package/src/tui/app.ts CHANGED
@@ -626,6 +626,11 @@ export async function runTui(
626
626
  break;
627
627
  }
628
628
  case "submit":
629
+ if (state.threads.length === 0) {
630
+ setBottomBarMessage(bottomBar, " No threads to submit.");
631
+ renderer.requestRender();
632
+ break;
633
+ }
629
634
  unresolvedGate(() => {
630
635
  appendEvent(jsonlPath, { type: "submit", author: "reviewer", ts: Date.now() });
631
636
 
@@ -1,8 +1,8 @@
1
1
  export const theme = {
2
2
  // Surfaces
3
- base: "#1e1e2e",
3
+ base: undefined,
4
4
  backgroundPanel: "#313244",
5
- backgroundElement: "#45475a",
5
+ backgroundElement: undefined,
6
6
 
7
7
  // Text hierarchy
8
8
  text: "#cdd6f4",