claude-plugin-viban 1.3.14 → 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.14",
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
@@ -135,6 +135,35 @@ Assigns N issues (default 3, max 5) and spawns one agent per issue in isolated g
135
135
  → Each commits on its own branch, coordinator creates PRs
136
136
  ```
137
137
 
138
+ ### `/viban:review` — Checkout for IDE review
139
+
140
+ Checks out the issue branch and soft-resets so all changes appear as staged diffs in your IDE.
141
+
142
+ ```
143
+ /viban:review
144
+ → Finds first review card, checks out branch, staged diffs ready in IDE
145
+ /viban:review 12
146
+ → Checks out branch for issue #12
147
+ ```
148
+
149
+ ### `/viban:approve` — Approve and merge
150
+
151
+ Merges the issue branch, cleans up the worktree, and marks the card as done.
152
+
153
+ ```
154
+ /viban:approve 12
155
+ → Squash-merges PR, removes worktree/branch, marks #12 done
156
+ ```
157
+
158
+ ### `/viban:reject` — Reject with feedback
159
+
160
+ Returns the issue to in_progress with optional feedback for the agent to address.
161
+
162
+ ```
163
+ /viban:reject 12 "Missing error handling in auth flow"
164
+ → Moves #12 back to in_progress, records feedback as comment
165
+ ```
166
+
138
167
  ### `/viban:setup` — Install and configure
139
168
 
140
169
  Installs dependencies, detects your project conventions, and generates a workflow file.
@@ -175,8 +204,8 @@ viban attach <id> <file1> [file2...]
175
204
  # Workflow
176
205
  viban assign # Assign top backlog
177
206
  viban review [id] # → review
178
- viban move <id> <status> # → any status
179
- viban done <id> [--purge] [--dry-run] # → done
207
+ viban move <id> <status> [--force] # → any status
208
+ viban done <id> [--purge] [--force] # → done
180
209
 
181
210
  # Dependencies
182
211
  viban link <id> blocks <id>
@@ -317,7 +346,7 @@ Issues are stored in `.viban/viban.json`:
317
346
 
318
347
  ```bash
319
348
  brew install gum jq
320
- zsh tests/run_all.zsh # 19 suites, 212 tests
349
+ zsh tests/run_all.zsh # 20 suites, 237 tests
321
350
  ```
322
351
 
323
352
  See [docs/release.md](docs/release.md) for publishing.
package/bin/viban CHANGED
@@ -221,7 +221,7 @@ main() {
221
221
  [[ "${1:-}" != "archive" ]] && auto_archive
222
222
  case "${1:-}" in
223
223
  list) shift; cmd_list "$@";;
224
- history) cmd_history;;
224
+ history) shift; cmd_history "$@";;
225
225
  add) shift; _with_lock cmd_add "$@";;
226
226
  attach) shift; _with_lock cmd_attach "$@";;
227
227
  assign) shift; _with_lock cmd_assign "$@";;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-plugin-viban",
3
- "version": "1.3.14",
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. Merges the branch, cleans up 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
 
@@ -31,22 +31,17 @@ Confirm the issue is in `review` status. If not, tell the user and exit.
31
31
  ```bash
32
32
  REPO_ROOT=$(git rev-parse --show-toplevel)
33
33
  BRANCH="issue-$ID"
34
- PREV_BRANCH=$(git branch --show-current)
35
- ```
36
-
37
- If `$PREV_BRANCH` is empty (detached HEAD from `/viban:review`), determine the main branch:
38
-
39
- ```bash
40
- PREV_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
41
- [ -z "$PREV_BRANCH" ] && PREV_BRANCH="main"
34
+ WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
42
35
  ```
43
36
 
44
37
  ---
45
38
 
46
- ## Step 2: Return to main branch
39
+ ## Step 2: Return to Main
40
+
41
+ Detached HEAD from `/viban:review` — branch is intact, just switch back:
47
42
 
48
43
  ```bash
49
- git checkout "$PREV_BRANCH"
44
+ git checkout main
50
45
  ```
51
46
 
52
47
  ---
@@ -63,26 +58,11 @@ If PR found:
63
58
 
64
59
  ```bash
65
60
  gh pr merge "$PR_NUM" --squash --delete-branch
66
- ```
67
-
68
- Clean up worktree if it still exists:
69
-
70
- ```bash
71
- WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
72
- [ -d "$WT_DIR" ] && git worktree remove "$WT_DIR" --force 2>/dev/null
61
+ git pull origin main
73
62
  ```
74
63
 
75
64
  ### If no PR (branch only)
76
65
 
77
- Remove worktree to free the branch:
78
-
79
- ```bash
80
- WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
81
- [ -d "$WT_DIR" ] && git worktree remove "$WT_DIR" --force 2>/dev/null
82
- ```
83
-
84
- Merge locally:
85
-
86
66
  ```bash
87
67
  git merge "$BRANCH" --no-ff -m "Merge issue-$ID: <title>"
88
68
  git branch -d "$BRANCH"
@@ -96,17 +76,36 @@ Nothing to merge. Proceed to Step 4.
96
76
 
97
77
  ---
98
78
 
99
- ## Step 4: Complete
79
+ ## Step 4: Cleanup Worktree
80
+
81
+ ```bash
82
+ [ -d "$WT_DIR" ] && git worktree remove "$WT_DIR" --force 2>/dev/null
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Step 5: Complete
100
88
 
101
89
  ```bash
102
90
  viban done $ID
103
91
  ```
104
92
 
105
- Restore stash if one was created during `/viban:review`:
93
+ ---
94
+
95
+ ## Step 6: Restore User State
96
+
97
+ Check for stash:
106
98
 
107
99
  ```bash
108
- STASH=$(git stash list | grep "viban-review: before reviewing #$ID" | head -1 | cut -d: -f1)
100
+ STASH=$(git stash list | grep "viban-review: before #$ID" | head -1 | cut -d: -f1)
109
101
  [ -n "$STASH" ] && git stash pop "$STASH"
110
102
  ```
111
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
+
112
111
  Report: "Issue #$ID approved and merged."
@@ -30,19 +30,41 @@ Confirm the issue is in `review` status. If not, tell the user and exit.
30
30
 
31
31
  Parse `$ARGUMENTS`: first token is `$ID`, rest is `$FEEDBACK`.
32
32
 
33
+ ```bash
34
+ REPO_ROOT=$(git rev-parse --show-toplevel)
35
+ BRANCH="issue-$ID"
36
+ WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Step 2: Return to Main
42
+
43
+ Detached HEAD from `/viban:review` — branch is intact, just switch back:
44
+
45
+ ```bash
46
+ git checkout main
47
+ ```
48
+
33
49
  ---
34
50
 
35
- ## Step 2: Return to main branch
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:
36
60
 
37
61
  ```bash
38
- PREV_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
39
- [ -z "$PREV_BRANCH" ] && PREV_BRANCH="main"
40
- git checkout "$PREV_BRANCH"
62
+ [ ! -d "$WT_DIR" ] && git worktree add "$WT_DIR" "$BRANCH"
41
63
  ```
42
64
 
43
65
  ---
44
66
 
45
- ## Step 3: Move back to in_progress
67
+ ## Step 4: Move Back to in_progress
46
68
 
47
69
  ```bash
48
70
  viban move $ID in_progress
@@ -50,7 +72,7 @@ viban move $ID in_progress
50
72
 
51
73
  ---
52
74
 
53
- ## Step 4: Record feedback
75
+ ## Step 5: Record Feedback
54
76
 
55
77
  If `$FEEDBACK` is provided:
56
78
 
@@ -61,7 +83,6 @@ viban comment $ID "$FEEDBACK"
61
83
  Also comment on PR if one exists:
62
84
 
63
85
  ```bash
64
- BRANCH="issue-$ID"
65
86
  PR_NUM=$(gh pr list --head "$BRANCH" --json number --jq '.[0].number' 2>/dev/null)
66
87
  [ -n "$PR_NUM" ] && gh pr comment "$PR_NUM" --body "$FEEDBACK"
67
88
  ```
@@ -72,11 +93,20 @@ If no feedback provided, ask the user: "Any feedback for the developer?"
72
93
 
73
94
  ---
74
95
 
75
- ## Step 5: Restore stash
96
+ ## Step 6: Restore User State
97
+
98
+ Check for stash:
76
99
 
77
100
  ```bash
78
- STASH=$(git stash list | grep "viban-review: before reviewing #$ID" | head -1 | cut -d: -f1)
101
+ STASH=$(git stash list | grep "viban-review: before #$ID" | head -1 | cut -d: -f1)
79
102
  [ -n "$STASH" ] && git stash pop "$STASH"
80
103
  ```
81
104
 
82
- Report: "Issue #$ID rejected and moved to in_progress. Worktree is intact for the agent to continue."
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
+ ```
111
+
112
+ Report: "Issue #$ID rejected → in_progress. Worktree intact at `$WT_DIR`."
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: review
3
- description: "Checkout a review issue's branch for IDE review"
3
+ description: "Checkout a review issue's branch for IDE diff review"
4
4
  ---
5
5
 
6
6
  # /review
7
7
 
8
- Checkout a review-status issue's branch into the main working directory so the user can review changes in their IDE.
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: Detect Review Mode
43
+ ## Step 2: Prepare Branch
44
44
 
45
45
  ```bash
46
46
  REPO_ROOT=$(git rev-parse --show-toplevel)
@@ -48,101 +48,53 @@ BRANCH="issue-$ID"
48
48
  WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
49
49
  ```
50
50
 
51
- Check in priority order first match wins:
52
-
53
- ### Mode W: Worktree exists
54
-
55
- ```bash
56
- [ -d "$WT_DIR" ]
57
- ```
58
-
59
- If worktree exists → **Worktree mode**.
60
-
61
- ### Mode A: PR exists (no worktree)
62
-
63
- ```bash
64
- gh pr list --head "$BRANCH" --json number,url --jq '.[0]' 2>/dev/null
65
- ```
66
-
67
- If PR found → **PR mode**.
68
-
69
- ### Mode B: Branch exists (no PR, no worktree)
51
+ If worktree exists, detach it to free the branch:
70
52
 
71
53
  ```bash
72
- git rev-parse --verify "$BRANCH" 2>/dev/null
54
+ [ -d "$WT_DIR" ] && git -C "$WT_DIR" checkout --detach 2>/dev/null
73
55
  ```
74
56
 
75
- If branch exists → **Branch mode**.
76
-
77
- ### Mode C: No branch
78
-
79
- No branch → **Commit mode**.
80
-
81
57
  ---
82
58
 
83
- ## Step 3: Present for Review
84
-
85
- ### Mode W (worktree exists)
86
-
87
- Show changes against main:
88
-
89
- ```bash
90
- git -C "$WT_DIR" log main.."$BRANCH" --oneline
91
- git -C "$WT_DIR" diff main..."$BRANCH" --stat
92
- ```
93
-
94
- Check if PR exists:
59
+ ## Step 3: Handle Dirty Working Tree
95
60
 
96
61
  ```bash
97
- PR_INFO=$(gh pr list --head "$BRANCH" --json number,url --jq '.[0]' 2>/dev/null)
62
+ git status --porcelain
98
63
  ```
99
64
 
100
- ### Mode A / B (no worktree, branch exists)
101
-
102
- Stash if dirty:
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"`
103
70
 
104
- ```bash
105
- git status --porcelain
106
- ```
71
+ If clean, proceed directly.
107
72
 
108
- If dirty, ask user: "You have uncommitted changes. Stash them to proceed?"
109
- - Yes → `git stash push -m "viban-review: before reviewing #$ID"`
110
- - No → exit
73
+ ---
111
74
 
112
- Detached HEAD checkout:
75
+ ## Step 4: Detached Checkout and Reset
113
76
 
114
77
  ```bash
115
- PREV_BRANCH=$(git branch --show-current)
116
78
  git checkout --detach "$BRANCH"
79
+ git reset --soft main
117
80
  ```
118
81
 
119
- Show changes:
120
-
121
- ```bash
122
- git log "$PREV_BRANCH".."$BRANCH" --oneline
123
- git diff "$PREV_BRANCH"..."$BRANCH" --stat
124
- ```
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.
125
83
 
126
- ### Mode C (no branch)
84
+ ---
127
85
 
128
- Show recent commits:
86
+ ## Step 5: Report and Exit
129
87
 
130
88
  ```bash
131
- git log --oneline -10
89
+ PR_INFO=$(gh pr list --head "$BRANCH" --json number,url --jq '.[0]' 2>/dev/null)
132
90
  ```
133
91
 
134
- ---
135
-
136
- ## Step 4: Report and Exit
137
-
138
92
  Tell the user:
139
93
 
140
- **Mode W**: "Issue #$ID worktree is at `$WT_DIR`. Open it in your IDE to review. {PR #N link if PR exists.} Run `/viban:approve $ID` or `/viban:reject $ID` when ready."
141
-
142
- **Mode A**: "PR #N for issue #$ID is checked out. Review in your IDE. Run `/viban:approve $ID` or `/viban:reject $ID` when ready."
143
-
144
- **Mode B**: "Branch `issue-$ID` is checked out. Review in your IDE. Run `/viban:approve $ID` or `/viban:reject $ID` when ready."
145
-
146
- **Mode C**: "Issue #$ID was worked on main directly. Run `/viban:approve $ID` or `/viban:reject $ID` when ready."
94
+ ```
95
+ Reviewing #$ID — all changes are staged in your IDE.
96
+ {PR #N: <url> if PR exists}
97
+ Run /viban:approve $ID or /viban:reject $ID when ready.
98
+ ```
147
99
 
148
100
  **Done.** Do not wait for user input. The skill exits here.