claude-plugin-viban 1.3.14 → 1.3.15
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/.claude-plugin/plugin.json +1 -1
- package/README.md +29 -0
- package/bin/viban +1 -1
- package/package.json +1 -1
- package/skills/approve/SKILL.md +13 -32
- package/skills/reject/SKILL.md +17 -15
- package/skills/review/SKILL.md +15 -78
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 a review-status issue's branch for inspection in your IDE.
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
/viban:review
|
|
144
|
+
→ Detects first review card, checks out branch, shows diff summary
|
|
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.
|
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
package/skills/approve/SKILL.md
CHANGED
|
@@ -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.
|
|
8
|
+
Approve a review-status issue after IDE review. Restores commits, 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
|
-
|
|
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:
|
|
39
|
+
## Step 2: Restore Branch Commits
|
|
40
|
+
|
|
41
|
+
If worktree exists and was soft-reset (from `/viban:review`):
|
|
47
42
|
|
|
48
43
|
```bash
|
|
49
|
-
git
|
|
44
|
+
[ -d "$WT_DIR" ] && git -C "$WT_DIR" reset --soft ORIG_HEAD
|
|
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,18 @@ Nothing to merge. Proceed to Step 4.
|
|
|
96
76
|
|
|
97
77
|
---
|
|
98
78
|
|
|
99
|
-
## Step 4:
|
|
79
|
+
## Step 4: Cleanup Worktree
|
|
100
80
|
|
|
101
81
|
```bash
|
|
102
|
-
|
|
82
|
+
[ -d "$WT_DIR" ] && git worktree remove "$WT_DIR" --force 2>/dev/null
|
|
103
83
|
```
|
|
104
84
|
|
|
105
|
-
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Step 5: Complete
|
|
106
88
|
|
|
107
89
|
```bash
|
|
108
|
-
|
|
109
|
-
[ -n "$STASH" ] && git stash pop "$STASH"
|
|
90
|
+
viban done $ID
|
|
110
91
|
```
|
|
111
92
|
|
|
112
93
|
Report: "Issue #$ID approved and merged."
|
package/skills/reject/SKILL.md
CHANGED
|
@@ -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.
|
|
8
|
+
Reject a review-status issue and move it back to in_progress. Restores the worktree so the agent can address feedback.
|
|
9
9
|
|
|
10
10
|
> **CLI only** (no direct viban.json access)
|
|
11
11
|
|
|
@@ -30,19 +30,27 @@ 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
|
+
|
|
33
39
|
---
|
|
34
40
|
|
|
35
|
-
## Step 2:
|
|
41
|
+
## Step 2: Restore Branch Commits
|
|
42
|
+
|
|
43
|
+
If worktree was soft-reset (from `/viban:review`):
|
|
36
44
|
|
|
37
45
|
```bash
|
|
38
|
-
|
|
39
|
-
[ -z "$PREV_BRANCH" ] && PREV_BRANCH="main"
|
|
40
|
-
git checkout "$PREV_BRANCH"
|
|
46
|
+
[ -d "$WT_DIR" ] && git -C "$WT_DIR" reset --soft ORIG_HEAD
|
|
41
47
|
```
|
|
42
48
|
|
|
49
|
+
Worktree stays intact for the agent to continue working.
|
|
50
|
+
|
|
43
51
|
---
|
|
44
52
|
|
|
45
|
-
## Step 3: Move
|
|
53
|
+
## Step 3: Move Back to in_progress
|
|
46
54
|
|
|
47
55
|
```bash
|
|
48
56
|
viban move $ID in_progress
|
|
@@ -50,7 +58,7 @@ viban move $ID in_progress
|
|
|
50
58
|
|
|
51
59
|
---
|
|
52
60
|
|
|
53
|
-
## Step 4: Record
|
|
61
|
+
## Step 4: Record Feedback
|
|
54
62
|
|
|
55
63
|
If `$FEEDBACK` is provided:
|
|
56
64
|
|
|
@@ -61,7 +69,6 @@ viban comment $ID "$FEEDBACK"
|
|
|
61
69
|
Also comment on PR if one exists:
|
|
62
70
|
|
|
63
71
|
```bash
|
|
64
|
-
BRANCH="issue-$ID"
|
|
65
72
|
PR_NUM=$(gh pr list --head "$BRANCH" --json number --jq '.[0].number' 2>/dev/null)
|
|
66
73
|
[ -n "$PR_NUM" ] && gh pr comment "$PR_NUM" --body "$FEEDBACK"
|
|
67
74
|
```
|
|
@@ -72,11 +79,6 @@ If no feedback provided, ask the user: "Any feedback for the developer?"
|
|
|
72
79
|
|
|
73
80
|
---
|
|
74
81
|
|
|
75
|
-
## Step 5:
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
STASH=$(git stash list | grep "viban-review: before reviewing #$ID" | head -1 | cut -d: -f1)
|
|
79
|
-
[ -n "$STASH" ] && git stash pop "$STASH"
|
|
80
|
-
```
|
|
82
|
+
## Step 5: Report
|
|
81
83
|
|
|
82
|
-
Report: "Issue #$ID rejected
|
|
84
|
+
Report: "Issue #$ID rejected → in_progress. Worktree intact at `$WT_DIR`."
|
package/skills/review/SKILL.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review
|
|
3
|
-
description: "
|
|
3
|
+
description: "Prepare a review issue for IDE review via staged diffs"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /review
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Prepare a review-status issue for IDE review. Soft-resets the worktree so all changes appear as staged diffs.
|
|
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:
|
|
43
|
+
## Step 2: Locate Worktree
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
REPO_ROOT=$(git rev-parse --show-toplevel)
|
|
@@ -48,101 +48,38 @@ BRANCH="issue-$ID"
|
|
|
48
48
|
WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
### Mode W: Worktree exists
|
|
51
|
+
If worktree does not exist:
|
|
54
52
|
|
|
55
53
|
```bash
|
|
56
|
-
[ -d "$WT_DIR" ]
|
|
54
|
+
[ ! -d "$WT_DIR" ]
|
|
57
55
|
```
|
|
58
56
|
|
|
59
|
-
|
|
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
|
-
```
|
|
57
|
+
Tell the user "No worktree found for #$ID. Cannot review." and exit.
|
|
66
58
|
|
|
67
|
-
|
|
59
|
+
---
|
|
68
60
|
|
|
69
|
-
|
|
61
|
+
## Step 3: Soft-Reset for IDE Review
|
|
70
62
|
|
|
71
63
|
```bash
|
|
72
|
-
git
|
|
64
|
+
git -C "$WT_DIR" reset --soft main
|
|
73
65
|
```
|
|
74
66
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
### Mode C: No branch
|
|
78
|
-
|
|
79
|
-
No branch → **Commit mode**.
|
|
67
|
+
Now all changes from the issue branch appear as **staged diffs** when the worktree directory is opened in the IDE.
|
|
80
68
|
|
|
81
69
|
---
|
|
82
70
|
|
|
83
|
-
## Step
|
|
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:
|
|
71
|
+
## Step 4: Report and Exit
|
|
95
72
|
|
|
96
73
|
```bash
|
|
97
74
|
PR_INFO=$(gh pr list --head "$BRANCH" --json number,url --jq '.[0]' 2>/dev/null)
|
|
98
75
|
```
|
|
99
76
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
Stash if dirty:
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
git status --porcelain
|
|
106
|
-
```
|
|
107
|
-
|
|
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
|
|
111
|
-
|
|
112
|
-
Detached HEAD checkout:
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
PREV_BRANCH=$(git branch --show-current)
|
|
116
|
-
git checkout --detach "$BRANCH"
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Show changes:
|
|
77
|
+
Tell the user:
|
|
120
78
|
|
|
121
|
-
```bash
|
|
122
|
-
git log "$PREV_BRANCH".."$BRANCH" --oneline
|
|
123
|
-
git diff "$PREV_BRANCH"..."$BRANCH" --stat
|
|
124
79
|
```
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
Show recent commits:
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
git log --oneline -10
|
|
80
|
+
Reviewing #$ID — open $WT_DIR in your IDE to see staged diffs.
|
|
81
|
+
{PR #N: <url> if PR exists}
|
|
82
|
+
Run /viban:approve $ID or /viban:reject $ID when ready.
|
|
132
83
|
```
|
|
133
84
|
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Step 4: Report and Exit
|
|
137
|
-
|
|
138
|
-
Tell the user:
|
|
139
|
-
|
|
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."
|
|
147
|
-
|
|
148
85
|
**Done.** Do not wait for user input. The skill exits here.
|