claude-plugin-viban 1.3.15 → 1.3.16

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viban",
3
- "version": "1.3.15",
3
+ "version": "1.3.16",
4
4
  "description": "Terminal Kanban TUI for AI-human collaborative issue tracking",
5
5
  "author": {
6
6
  "name": "happy-nut"
package/README.md CHANGED
@@ -137,11 +137,11 @@ Assigns N issues (default 3, max 5) and spawns one agent per issue in isolated g
137
137
 
138
138
  ### `/viban:review` — Checkout for IDE review
139
139
 
140
- Checks out a review-status issue's branch for inspection in your IDE.
140
+ Checks out the issue branch and soft-resets so all changes appear as staged diffs in your IDE.
141
141
 
142
142
  ```
143
143
  /viban:review
144
- Detects first review card, checks out branch, shows diff summary
144
+ Finds first review card, checks out branch, staged diffs ready in IDE
145
145
  /viban:review 12
146
146
  → Checks out branch for issue #12
147
147
  ```
@@ -204,8 +204,8 @@ viban attach <id> <file1> [file2...]
204
204
  # Workflow
205
205
  viban assign # Assign top backlog
206
206
  viban review [id] # → review
207
- viban move <id> <status> # → any status
208
- viban done <id> [--purge] [--dry-run] # → done
207
+ viban move <id> <status> [--force] # → any status
208
+ viban done <id> [--purge] [--force] # → done
209
209
 
210
210
  # Dependencies
211
211
  viban link <id> blocks <id>
@@ -346,7 +346,7 @@ Issues are stored in `.viban/viban.json`:
346
346
 
347
347
  ```bash
348
348
  brew install gum jq
349
- zsh tests/run_all.zsh # 19 suites, 212 tests
349
+ zsh tests/run_all.zsh # 20 suites, 237 tests
350
350
  ```
351
351
 
352
352
  See [docs/release.md](docs/release.md) for publishing.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-plugin-viban",
3
- "version": "1.3.15",
3
+ "version": "1.3.16",
4
4
  "description": "Terminal Kanban TUI for AI-human collaborative issue tracking",
5
5
  "main": "bin/viban",
6
6
  "bin": {
@@ -5,7 +5,7 @@ description: "Approve a reviewed issue — merge branch, cleanup worktree, mark
5
5
 
6
6
  # /approve
7
7
 
8
- Approve a review-status issue after IDE review. Restores commits, merges the branch, removes the worktree, and marks the card done.
8
+ Approve a review-status issue after IDE review. Merges the branch, removes the worktree, and marks the card done.
9
9
 
10
10
  > **CLI only** (no direct viban.json access)
11
11
 
@@ -36,12 +36,12 @@ WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
36
36
 
37
37
  ---
38
38
 
39
- ## Step 2: Restore Branch Commits
39
+ ## Step 2: Return to Main
40
40
 
41
- If worktree exists and was soft-reset (from `/viban:review`):
41
+ Detached HEAD from `/viban:review` — branch is intact, just switch back:
42
42
 
43
43
  ```bash
44
- [ -d "$WT_DIR" ] && git -C "$WT_DIR" reset --soft ORIG_HEAD
44
+ git checkout main
45
45
  ```
46
46
 
47
47
  ---
@@ -90,4 +90,22 @@ Nothing to merge. Proceed to Step 4.
90
90
  viban done $ID
91
91
  ```
92
92
 
93
+ ---
94
+
95
+ ## Step 6: Restore User State
96
+
97
+ Check for stash:
98
+
99
+ ```bash
100
+ STASH=$(git stash list | grep "viban-review: before #$ID" | head -1 | cut -d: -f1)
101
+ [ -n "$STASH" ] && git stash pop "$STASH"
102
+ ```
103
+
104
+ Check for temp commit:
105
+
106
+ ```bash
107
+ TEMP=$(git log --oneline -1 | grep "viban-review: temp commit before #$ID")
108
+ [ -n "$TEMP" ] && git reset HEAD~1
109
+ ```
110
+
93
111
  Report: "Issue #$ID approved and merged."
@@ -5,7 +5,7 @@ description: "Reject a reviewed issue — return to in_progress with feedback"
5
5
 
6
6
  # /reject
7
7
 
8
- Reject a review-status issue and move it back to in_progress. Restores the worktree so the agent can address feedback.
8
+ Reject a review-status issue and move it back to in_progress. The worktree stays intact so the agent can address feedback.
9
9
 
10
10
  > **CLI only** (no direct viban.json access)
11
11
 
@@ -38,19 +38,33 @@ WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
38
38
 
39
39
  ---
40
40
 
41
- ## Step 2: Restore Branch Commits
41
+ ## Step 2: Return to Main
42
42
 
43
- If worktree was soft-reset (from `/viban:review`):
43
+ Detached HEAD from `/viban:review` — branch is intact, just switch back:
44
44
 
45
45
  ```bash
46
- [ -d "$WT_DIR" ] && git -C "$WT_DIR" reset --soft ORIG_HEAD
46
+ git checkout main
47
47
  ```
48
48
 
49
- Worktree stays intact for the agent to continue working.
49
+ ---
50
+
51
+ ## Step 3: Re-attach Worktree
52
+
53
+ If worktree exists (detached during review), re-attach it to the branch:
54
+
55
+ ```bash
56
+ [ -d "$WT_DIR" ] && git -C "$WT_DIR" checkout "$BRANCH"
57
+ ```
58
+
59
+ If worktree does not exist, recreate it:
60
+
61
+ ```bash
62
+ [ ! -d "$WT_DIR" ] && git worktree add "$WT_DIR" "$BRANCH"
63
+ ```
50
64
 
51
65
  ---
52
66
 
53
- ## Step 3: Move Back to in_progress
67
+ ## Step 4: Move Back to in_progress
54
68
 
55
69
  ```bash
56
70
  viban move $ID in_progress
@@ -58,7 +72,7 @@ viban move $ID in_progress
58
72
 
59
73
  ---
60
74
 
61
- ## Step 4: Record Feedback
75
+ ## Step 5: Record Feedback
62
76
 
63
77
  If `$FEEDBACK` is provided:
64
78
 
@@ -79,6 +93,20 @@ If no feedback provided, ask the user: "Any feedback for the developer?"
79
93
 
80
94
  ---
81
95
 
82
- ## Step 5: Report
96
+ ## Step 6: Restore User State
97
+
98
+ Check for stash:
99
+
100
+ ```bash
101
+ STASH=$(git stash list | grep "viban-review: before #$ID" | head -1 | cut -d: -f1)
102
+ [ -n "$STASH" ] && git stash pop "$STASH"
103
+ ```
104
+
105
+ Check for temp commit:
106
+
107
+ ```bash
108
+ TEMP=$(git log --oneline -1 | grep "viban-review: temp commit before #$ID")
109
+ [ -n "$TEMP" ] && git reset HEAD~1
110
+ ```
83
111
 
84
112
  Report: "Issue #$ID rejected → in_progress. Worktree intact at `$WT_DIR`."
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: review
3
- description: "Prepare a review issue for IDE review via staged diffs"
3
+ description: "Checkout a review issue's branch for IDE diff review"
4
4
  ---
5
5
 
6
6
  # /review
7
7
 
8
- Prepare a review-status issue for IDE review. Soft-resets the worktree so all changes appear as staged diffs.
8
+ Checkout a review-status issue's branch into the main worktree so the user can review all changes as staged diffs in their IDE.
9
9
 
10
10
  > **CLI only** (no direct viban.json access)
11
11
 
@@ -40,7 +40,7 @@ Show the user a one-line summary: `#ID [PRIORITY] Title`.
40
40
 
41
41
  ---
42
42
 
43
- ## Step 2: Locate Worktree
43
+ ## Step 2: Prepare Branch
44
44
 
45
45
  ```bash
46
46
  REPO_ROOT=$(git rev-parse --show-toplevel)
@@ -48,27 +48,42 @@ BRANCH="issue-$ID"
48
48
  WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
49
49
  ```
50
50
 
51
- If worktree does not exist:
51
+ If worktree exists, detach it to free the branch:
52
52
 
53
53
  ```bash
54
- [ ! -d "$WT_DIR" ]
54
+ [ -d "$WT_DIR" ] && git -C "$WT_DIR" checkout --detach 2>/dev/null
55
55
  ```
56
56
 
57
- Tell the user "No worktree found for #$ID. Cannot review." and exit.
57
+ ---
58
+
59
+ ## Step 3: Handle Dirty Working Tree
60
+
61
+ ```bash
62
+ git status --porcelain
63
+ ```
64
+
65
+ If dirty, ask user with AskUserQuestion:
66
+ - "You have uncommitted changes. How should we save them?"
67
+ - Options:
68
+ - "Stash" → `git stash push -m "viban-review: before #$ID"`
69
+ - "Temp commit" → `git add -A && git commit -m "viban-review: temp commit before #$ID"`
70
+
71
+ If clean, proceed directly.
58
72
 
59
73
  ---
60
74
 
61
- ## Step 3: Soft-Reset for IDE Review
75
+ ## Step 4: Detached Checkout and Reset
62
76
 
63
77
  ```bash
64
- git -C "$WT_DIR" reset --soft main
78
+ git checkout --detach "$BRANCH"
79
+ git reset --soft main
65
80
  ```
66
81
 
67
- Now all changes from the issue branch appear as **staged diffs** when the worktree directory is opened in the IDE.
82
+ This checks out the branch's commit without moving the branch pointer. Now all changes appear as **staged diffs** in the IDE, and the `$BRANCH` ref stays intact.
68
83
 
69
84
  ---
70
85
 
71
- ## Step 4: Report and Exit
86
+ ## Step 5: Report and Exit
72
87
 
73
88
  ```bash
74
89
  PR_INFO=$(gh pr list --head "$BRANCH" --json number,url --jq '.[0]' 2>/dev/null)
@@ -77,7 +92,7 @@ PR_INFO=$(gh pr list --head "$BRANCH" --json number,url --jq '.[0]' 2>/dev/null)
77
92
  Tell the user:
78
93
 
79
94
  ```
80
- Reviewing #$ID — open $WT_DIR in your IDE to see staged diffs.
95
+ Reviewing #$ID — all changes are staged in your IDE.
81
96
  {PR #N: <url> if PR exists}
82
97
  Run /viban:approve $ID or /viban:reject $ID when ready.
83
98
  ```