claude-plugin-viban 1.3.15 → 1.3.17

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.17",
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/bin/viban CHANGED
@@ -149,18 +149,14 @@ export TERM=${TERM:-xterm-256color}
149
149
  # ============================================================
150
150
  # Priority:
151
151
  # 1. VIBAN_DATA_DIR env var (explicit override)
152
- # 2. Project root .viban/ directory
152
+ # 2. CWD .viban/ directory (always uses $PWD, not git root — monorepo safe)
153
153
 
154
154
  VIBAN_DATA_DIR="${VIBAN_DATA_DIR:-}"
155
155
  VIBAN_IS_GIT_REPO=false
156
156
  git rev-parse --git-dir &>/dev/null && VIBAN_IS_GIT_REPO=true
157
157
 
158
158
  if [[ -z "$VIBAN_DATA_DIR" ]]; then
159
- if $VIBAN_IS_GIT_REPO; then
160
- VIBAN_DATA_DIR="$(git rev-parse --show-toplevel)/.viban"
161
- else
162
- VIBAN_DATA_DIR="${PWD}/.viban"
163
- fi
159
+ VIBAN_DATA_DIR="${PWD}/.viban"
164
160
  fi
165
161
 
166
162
  VIBAN_JSON="${VIBAN_DATA_DIR}/viban.json"
package/docs/CLAUDE.md CHANGED
@@ -64,11 +64,10 @@ EOF
64
64
 
65
65
  ```bash
66
66
  # 1. 워크트리 생성
67
- REPO_ROOT=$(git rev-parse --show-toplevel)
68
- git worktree add -b issue-{ISSUE_ID} "$REPO_ROOT/.viban/worktrees/{ISSUE_ID}" origin/main
67
+ git worktree add -b issue-{ISSUE_ID} "$PWD/.viban/worktrees/{ISSUE_ID}" origin/main
69
68
 
70
69
  # 2. 워크트리 안에서 작업 후 push
71
- cd "$REPO_ROOT/.viban/worktrees/{ISSUE_ID}"
70
+ cd "$PWD/.viban/worktrees/{ISSUE_ID}"
72
71
  git push -u origin issue-{ISSUE_ID}
73
72
 
74
73
  # 3. PR 생성
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.17",
4
4
  "description": "Terminal Kanban TUI for AI-human collaborative issue tracking",
5
5
  "main": "bin/viban",
6
6
  "bin": {
@@ -90,6 +90,14 @@ Report the registered issue and **stop immediately**. Do not suggest next steps,
90
90
  - `Bash` for anything other than `viban` CLI and `cat`/`mkdir` above: FORBIDDEN.
91
91
  - No `git` commands. No source code reads. No codebase exploration.
92
92
 
93
+ ## CLI Reference
94
+
95
+ | Command | Description |
96
+ |---------|-------------|
97
+ | `viban list` | Print board (check for duplicates) |
98
+ | `viban add "<title>" --desc-file <f> --priority <p> --type <t>` | Register issue |
99
+ | `viban add "<title>" ... --ext-id "<id>"` | Register with external ID |
100
+
93
101
  ### Additional rules:
94
102
  - **NEVER read or write `viban.json` directly** — always use `viban` CLI commands
95
103
  - No solution proposals in the issue — symptoms only
@@ -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
 
@@ -29,19 +29,18 @@ viban get $ID
29
29
  Confirm the issue is in `review` status. If not, tell the user and exit.
30
30
 
31
31
  ```bash
32
- REPO_ROOT=$(git rev-parse --show-toplevel)
33
32
  BRANCH="issue-$ID"
34
- WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
33
+ WT_DIR="$PWD/.viban/worktrees/$ID"
35
34
  ```
36
35
 
37
36
  ---
38
37
 
39
- ## Step 2: Restore Branch Commits
38
+ ## Step 2: Return to Main
40
39
 
41
- If worktree exists and was soft-reset (from `/viban:review`):
40
+ Detached HEAD from `/viban:review` — branch is intact, just switch back:
42
41
 
43
42
  ```bash
44
- [ -d "$WT_DIR" ] && git -C "$WT_DIR" reset --soft ORIG_HEAD
43
+ git checkout main
45
44
  ```
46
45
 
47
46
  ---
@@ -90,4 +89,29 @@ Nothing to merge. Proceed to Step 4.
90
89
  viban done $ID
91
90
  ```
92
91
 
92
+ ---
93
+
94
+ ## Step 6: Restore User State
95
+
96
+ Check for stash:
97
+
98
+ ```bash
99
+ STASH=$(git stash list | grep "viban-review: before #$ID" | head -1 | cut -d: -f1)
100
+ [ -n "$STASH" ] && git stash pop "$STASH"
101
+ ```
102
+
103
+ Check for temp commit:
104
+
105
+ ```bash
106
+ TEMP=$(git log --oneline -1 | grep "viban-review: temp commit before #$ID")
107
+ [ -n "$TEMP" ] && git reset HEAD~1
108
+ ```
109
+
93
110
  Report: "Issue #$ID approved and merged."
111
+
112
+ ## CLI Reference
113
+
114
+ | Command | Description |
115
+ |---------|-------------|
116
+ | `viban get <id>` | View issue details |
117
+ | `viban done <id>` | Mark issue as done |
@@ -14,6 +14,7 @@ Assign the first backlog issue and execute the full resolution workflow. If the
14
14
  ## Output Rules
15
15
 
16
16
  - **Do NOT output any preamble.** No "Your Task:", "I'll now...", "Let me...", or task summaries before starting work.
17
+ - **NEVER delegate work back to the user.** You must complete the entire issue yourself — writing code, tests, and verifying. Phrases like "Your Task:", "TODO(human)", "Waiting for your implementation", "Take your time", or any message that asks the user to write code are strictly FORBIDDEN. If you encounter a TODO comment, implement it yourself.
17
18
  - Start executing Step 0 immediately and silently.
18
19
 
19
20
  ---
@@ -64,8 +65,7 @@ Assess whether the issue description provides enough context to start working.
64
65
  `viban assign` automatically creates a worktree. Locate it:
65
66
 
66
67
  ```bash
67
- REPO_ROOT=$(git rev-parse --show-toplevel)
68
- WT_DIR="$REPO_ROOT/.viban/worktrees/$ISSUE_ID"
68
+ WT_DIR="$PWD/.viban/worktrees/$ISSUE_ID"
69
69
  BRANCH="issue-$ISSUE_ID"
70
70
  ```
71
71
 
@@ -8,6 +8,8 @@ description: "Assign and resolve multiple independent backlog issues in parallel
8
8
  Parallel resolution of independent backlog issues via git worktrees.
9
9
 
10
10
  > **CLI only** (no direct viban.json access) | **Opus sub-agents** in isolated worktrees
11
+ >
12
+ > **`viban` is a zsh CLI tool.** Always invoke as `viban <command>`, NEVER as `python -m viban` or `python viban`.
11
13
 
12
14
  **Input**: `$ARGUMENTS` (optional: number of issues, default 3)
13
15
 
@@ -16,6 +18,7 @@ Parallel resolution of independent backlog issues via git worktrees.
16
18
  ## Output Rules
17
19
 
18
20
  - **Do NOT output any preamble.** No "Your Task:", "I'll now...", "Let me...", or task summaries before starting work.
21
+ - **NEVER delegate work back to the user.** Each agent must complete its assigned issue fully — writing code, tests, and verifying. Phrases like "Your Task:", "TODO(human)", "Waiting for your implementation", "Take your time", or any message that asks the user to write code are strictly FORBIDDEN. If you encounter a TODO comment, implement it yourself.
19
22
  - Start executing Phase 0 immediately and silently.
20
23
 
21
24
  ---
@@ -75,14 +78,13 @@ If no issues were assigned: notify user and exit.
75
78
  For each assigned issue, create an isolated git worktree:
76
79
 
77
80
  ```bash
78
- REPO_ROOT=$(git rev-parse --show-toplevel)
79
- mkdir -p "$REPO_ROOT/.viban/worktrees"
81
+ mkdir -p "$PWD/.viban/worktrees"
80
82
 
81
83
  for entry in "${ISSUES[@]}"; do
82
84
  ID="${entry%%|*}"
83
85
  BRANCH="${entry##*|}"
84
86
  # Use issue ID as worktree dir name (matches cmd_done cleanup at .viban/worktrees/{ID})
85
- WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
87
+ WT_DIR="$PWD/.viban/worktrees/$ID"
86
88
 
87
89
  git worktree add -b "$BRANCH" "$WT_DIR" origin/main
88
90
  done
@@ -106,9 +108,9 @@ Spawn one **opus** agent per issue using `Task` tool. All agents launch in a sin
106
108
  You are resolving viban issue #{ID} in an isolated git worktree.
107
109
 
108
110
  ## Environment
109
- - Worktree path: {REPO_ROOT}/.viban/worktrees/{ID}
111
+ - Worktree path: {PROJECT_ROOT}/.viban/worktrees/{ID}
110
112
  - Branch: {BRANCH}
111
- - Main repo: {REPO_ROOT}
113
+ - Main repo: {PROJECT_ROOT}
112
114
  - ALL file operations must happen inside the worktree path
113
115
 
114
116
  ## Workflow (Analyze + Implement + Verify only)
@@ -125,7 +127,7 @@ You are resolving viban issue #{ID} in an isolated git worktree.
125
127
 
126
128
  You are one of {N} parallel agents working in isolated git worktrees.
127
129
 
128
- 1. Work ONLY inside your worktree: {REPO_ROOT}/.viban/worktrees/{ID}
130
+ 1. Work ONLY inside your worktree: {PROJECT_ROOT}/.viban/worktrees/{ID}
129
131
  - cd to the worktree before any work
130
132
  - All reads, edits, and writes must target files under this path
131
133
 
@@ -136,7 +138,7 @@ You are one of {N} parallel agents working in isolated git worktrees.
136
138
 
137
139
  3. After implementation, commit on your branch:
138
140
  ```bash
139
- cd {REPO_ROOT}/.viban/worktrees/{ID}
141
+ cd {PROJECT_ROOT}/.viban/worktrees/{ID}
140
142
  git add <specific files>
141
143
  git commit -m "type: description
142
144
 
@@ -149,6 +151,7 @@ You are one of {N} parallel agents working in isolated git worktrees.
149
151
  4. That's it. Stop after committing.
150
152
 
151
153
  ABSOLUTE RULES:
154
+ - **NEVER delegate work back to the user.** You must complete the entire issue yourself. Phrases like "Your Task:", "TODO(human)", "Waiting for your implementation" are FORBIDDEN. If you encounter a TODO comment, implement it yourself.
152
155
  - **Your job ends after committing.** The coordinator handles push, PR creation, and issue status.
153
156
  - **FORBIDDEN: `git push`** — the coordinator pushes from the main repo after verifying.
154
157
  - **FORBIDDEN: `gh pr create`** — the coordinator creates PRs after transplanting branches.
@@ -161,7 +164,7 @@ ABSOLUTE RULES:
161
164
 
162
165
  ### Dispatch Pattern
163
166
 
164
- ```python
167
+ ```text
165
168
  # Pseudo-code for the dispatch
166
169
  for each (ID, BRANCH) in ISSUES:
167
170
  Task(
@@ -183,12 +186,7 @@ for each (ID, BRANCH) in ISSUES:
183
186
 
184
187
  ## Phase 3: TRANSPLANT & CLEANUP
185
188
 
186
- After all agents finish, the coordinator handles everything from the main repo root.
187
-
188
- ```bash
189
- REPO_ROOT=$(git rev-parse --show-toplevel)
190
- cd "$REPO_ROOT"
191
- ```
189
+ After all agents finish, the coordinator handles everything from the main project root (`$PWD`).
192
190
 
193
191
  ### 3.1 Verify Local Branches
194
192
 
@@ -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
 
@@ -31,26 +31,39 @@ Confirm the issue is in `review` status. If not, tell the user and exit.
31
31
  Parse `$ARGUMENTS`: first token is `$ID`, rest is `$FEEDBACK`.
32
32
 
33
33
  ```bash
34
- REPO_ROOT=$(git rev-parse --show-toplevel)
35
34
  BRANCH="issue-$ID"
36
- WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
35
+ WT_DIR="$PWD/.viban/worktrees/$ID"
37
36
  ```
38
37
 
39
38
  ---
40
39
 
41
- ## Step 2: Restore Branch Commits
40
+ ## Step 2: Return to Main
42
41
 
43
- If worktree was soft-reset (from `/viban:review`):
42
+ Detached HEAD from `/viban:review` — branch is intact, just switch back:
44
43
 
45
44
  ```bash
46
- [ -d "$WT_DIR" ] && git -C "$WT_DIR" reset --soft ORIG_HEAD
45
+ git checkout main
47
46
  ```
48
47
 
49
- Worktree stays intact for the agent to continue working.
48
+ ---
49
+
50
+ ## Step 3: Re-attach Worktree
51
+
52
+ If worktree exists (detached during review), re-attach it to the branch:
53
+
54
+ ```bash
55
+ [ -d "$WT_DIR" ] && git -C "$WT_DIR" checkout "$BRANCH"
56
+ ```
57
+
58
+ If worktree does not exist, recreate it:
59
+
60
+ ```bash
61
+ [ ! -d "$WT_DIR" ] && git worktree add "$WT_DIR" "$BRANCH"
62
+ ```
50
63
 
51
64
  ---
52
65
 
53
- ## Step 3: Move Back to in_progress
66
+ ## Step 4: Move Back to in_progress
54
67
 
55
68
  ```bash
56
69
  viban move $ID in_progress
@@ -58,7 +71,7 @@ viban move $ID in_progress
58
71
 
59
72
  ---
60
73
 
61
- ## Step 4: Record Feedback
74
+ ## Step 5: Record Feedback
62
75
 
63
76
  If `$FEEDBACK` is provided:
64
77
 
@@ -79,6 +92,28 @@ If no feedback provided, ask the user: "Any feedback for the developer?"
79
92
 
80
93
  ---
81
94
 
82
- ## Step 5: Report
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
+ ```
83
110
 
84
111
  Report: "Issue #$ID rejected → in_progress. Worktree intact at `$WT_DIR`."
112
+
113
+ ## CLI Reference
114
+
115
+ | Command | Description |
116
+ |---------|-------------|
117
+ | `viban get <id>` | View issue details |
118
+ | `viban move <id> <status>` | Move issue to status |
119
+ | `viban comment <id> "<text>"` | Add comment to issue |
@@ -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,35 +40,49 @@ 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
- REPO_ROOT=$(git rev-parse --show-toplevel)
47
46
  BRANCH="issue-$ID"
48
- WT_DIR="$REPO_ROOT/.viban/worktrees/$ID"
47
+ WT_DIR="$PWD/.viban/worktrees/$ID"
49
48
  ```
50
49
 
51
- If worktree does not exist:
50
+ If worktree exists, detach it to free the branch:
52
51
 
53
52
  ```bash
54
- [ ! -d "$WT_DIR" ]
53
+ [ -d "$WT_DIR" ] && git -C "$WT_DIR" checkout --detach 2>/dev/null
55
54
  ```
56
55
 
57
- Tell the user "No worktree found for #$ID. Cannot review." and exit.
56
+ ---
57
+
58
+ ## Step 3: Handle Dirty Working Tree
59
+
60
+ ```bash
61
+ git status --porcelain
62
+ ```
63
+
64
+ If dirty, ask user with AskUserQuestion:
65
+ - "You have uncommitted changes. How should we save them?"
66
+ - Options:
67
+ - "Stash" → `git stash push -m "viban-review: before #$ID"`
68
+ - "Temp commit" → `git add -A && git commit -m "viban-review: temp commit before #$ID"`
69
+
70
+ If clean, proceed directly.
58
71
 
59
72
  ---
60
73
 
61
- ## Step 3: Soft-Reset for IDE Review
74
+ ## Step 4: Detached Checkout and Reset
62
75
 
63
76
  ```bash
64
- git -C "$WT_DIR" reset --soft main
77
+ git checkout --detach "$BRANCH"
78
+ git reset --soft main
65
79
  ```
66
80
 
67
- Now all changes from the issue branch appear as **staged diffs** when the worktree directory is opened in the IDE.
81
+ 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
82
 
69
83
  ---
70
84
 
71
- ## Step 4: Report and Exit
85
+ ## Step 5: Report and Exit
72
86
 
73
87
  ```bash
74
88
  PR_INFO=$(gh pr list --head "$BRANCH" --json number,url --jq '.[0]' 2>/dev/null)
@@ -77,9 +91,16 @@ PR_INFO=$(gh pr list --head "$BRANCH" --json number,url --jq '.[0]' 2>/dev/null)
77
91
  Tell the user:
78
92
 
79
93
  ```
80
- Reviewing #$ID — open $WT_DIR in your IDE to see staged diffs.
94
+ Reviewing #$ID — all changes are staged in your IDE.
81
95
  {PR #N: <url> if PR exists}
82
96
  Run /viban:approve $ID or /viban:reject $ID when ready.
83
97
  ```
84
98
 
85
99
  **Done.** Do not wait for user input. The skill exits here.
100
+
101
+ ## CLI Reference
102
+
103
+ | Command | Description |
104
+ |---------|-------------|
105
+ | `viban list --status review` | List review-status issues |
106
+ | `viban get <id>` | View issue details |
@@ -445,6 +445,15 @@ You can edit .viban/workflow.md anytime to adjust it.
445
445
  - **Package manager not found**: Show manual installation instructions
446
446
  - **npm not found**: Install Node.js first
447
447
 
448
+ ## CLI Reference
449
+
450
+ | Command | Description |
451
+ |---------|-------------|
452
+ | `viban help` | Show help and verify installation |
453
+ | `viban add "<title>"` | Add a task |
454
+ | `viban list` | List all tasks |
455
+ | `viban sync` | Initialize external tracker sync |
456
+
448
457
  ## Notes
449
458
 
450
459
  - This command requires terminal access to run shell commands