claude-plugin-viban 1.1.2 → 1.2.0

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.
@@ -5,71 +5,64 @@ description: "Assign and resolve first backlog issue from viban board through to
5
5
 
6
6
  # /assign
7
7
 
8
- Workflow: First backlog issue -> Resolve -> PR completion
8
+ First backlog issue Resolve PR completion
9
9
 
10
- > **No direct `viban.json` access** - CLI only
11
- > **No Worktree** - Work directly on branch in main repo
12
- > **Workflow**: Read `.viban/workflow.md` first, then CLAUDE.md fallback
10
+ > **CLI only** (no direct viban.json access) | **No worktree** (branch in main repo)
13
11
 
14
12
  ---
15
13
 
16
- ## Phase 0: CONTEXT & SETUP
14
+ ## Phase 0: SETUP
17
15
 
18
- ### 0.1 Read Project Workflow (CRITICAL)
16
+ ### 0.1 Read Workflow (CRITICAL)
19
17
 
20
- Before any work, read the project's workflow configuration. Check in priority order:
21
-
22
- **Priority 1: `.viban/workflow.md`** (dedicated workflow file)
23
-
24
- ```bash
25
- [ -f ".viban/workflow.md" ] && cat ".viban/workflow.md"
26
- ```
27
-
28
- **Priority 2: CLAUDE.md** (legacy fallback)
29
-
30
- Only if `.viban/workflow.md` does NOT exist:
18
+ Check in priority order first match wins, follow it exactly:
31
19
 
20
+ 1. `.viban/workflow.md` → `[ -f ".viban/workflow.md" ] && cat ".viban/workflow.md"`
21
+ 2. CLAUDE.md (legacy, only if no workflow.md):
32
22
  ```bash
33
23
  for path in "./CLAUDE.md" "./.claude/CLAUDE.md" "../CLAUDE.md"; do
34
24
  [ -f "$path" ] && cat "$path"
35
25
  done
36
26
  ```
27
+ Look for `Issue Resolution Workflow` or `Workflow` section.
28
+ 3. Default workflow (Phase 1 below)
37
29
 
38
- Look for: `Issue Resolution Workflow` or `Workflow` section.
30
+ ### 0.2 Git Setup & Assign
39
31
 
40
- **Priority 3: Default workflow** (Phase 1 below)
32
+ ```bash
33
+ # Check uncommitted changes → AskUserQuestion if dirty
34
+ [ -n "$(git status --porcelain)" ] && echo "Warning: Uncommitted changes"
41
35
 
42
- IMPORTANT:
43
- - If `.viban/workflow.md` exists -> MUST follow it exactly (all phases)
44
- - Else if CLAUDE.md has a workflow section -> MUST follow it exactly
45
- - If no workflow found -> Use default workflow (Phase 1 below)
36
+ git checkout main && git fetch origin main && git reset --hard origin/main
46
37
 
47
- ### 0.2 Git Setup
38
+ ISSUE_ID=$(viban assign 2>&1 | tail -1)
39
+ [[ -z "$ISSUE_ID" || "$ISSUE_ID" == "No backlog" ]] && echo "No issues in backlog" && exit 0
40
+ ```
41
+
42
+ ### 0.3 Detect Sync & Create Branch
48
43
 
49
44
  ```bash
50
- # 1. Check for uncommitted changes
51
- if [ -n "$(git status --porcelain)" ]; then
52
- echo "Warning: Uncommitted changes detected"
53
- # Ask user whether to commit (use AskUserQuestion)
45
+ ISSUE_JSON=$(viban get $ISSUE_ID)
46
+ EXT_ID=$(echo "$ISSUE_JSON" | jq -r '.external_id // ""')
47
+ SYNC_ACTIVE=false; EXTERNAL_NUM=""
48
+
49
+ if [ -n "$EXT_ID" ] && [ "$EXT_ID" != "null" ]; then
50
+ SYNC_ACTIVE=true
51
+ EXTERNAL_NUM="${EXT_ID##*:}" # "github:42" -> "42"
52
+ TITLE=$(echo "$ISSUE_JSON" | jq -r '.title' | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | head -c 40)
53
+ git checkout -b "issue-${EXTERNAL_NUM}-${TITLE}"
54
+ else
55
+ git checkout -b issue-$ISSUE_ID
54
56
  fi
57
+ ```
55
58
 
56
- # 2. Switch to main branch and sync
57
- git checkout main
58
- git fetch origin main
59
- git reset --hard origin/main
60
-
61
- # 3. Assign issue
62
- ISSUE_ID=$(viban assign 2>&1 | tail -1)
63
- if [ -z "$ISSUE_ID" ] || [ "$ISSUE_ID" = "No backlog" ]; then
64
- echo "No issues in backlog"
65
- exit 0
66
- fi
59
+ ### 0.4 Load Plan (if available)
67
60
 
68
- # 4. Create new branch
69
- git checkout -b viban-$ISSUE_ID
61
+ ```bash
62
+ [ -f ".viban/plans/${ISSUE_ID}.md" ] && cat ".viban/plans/${ISSUE_ID}.md"
70
63
  ```
71
64
 
72
- If backlog is empty: Notify user and exit
65
+ If plan exists: use as primary guide for Phase 1, skip redundant analysis, but verify plan is still current.
73
66
 
74
67
  ---
75
68
 
@@ -79,102 +72,105 @@ If backlog is empty: Notify user and exit
79
72
  viban get $ISSUE_ID
80
73
  ```
81
74
 
82
- ### If Project Workflow Exists (from `.viban/workflow.md` or CLAUDE.md):
83
-
84
- Follow the project's exact steps.
85
-
86
- ### Default Workflow (if no project workflow):
87
-
88
- 1. **Understand**: Read the issue, understand the problem
89
- 2. **Locate**: Find relevant code files
90
- 3. **Analyze**: Determine root cause
91
- 4. **Implement**: Make minimal, focused changes
75
+ **With project workflow**: follow its exact steps.
76
+ **Default** (no workflow): Understand → Locate → Analyze root cause → Implement minimal changes.
92
77
 
93
78
  ---
94
79
 
95
80
  ## Phase 2: VERIFY
96
81
 
97
- Manual verification using available tools. Do NOT run build/test here - save that for Phase 3.
98
-
99
- ### Verification Methods (use what's appropriate):
82
+ Manual verification do NOT run build/test here (Phase 3).
100
83
 
101
- | Type | Tool | Usage |
102
- |------|------|-------|
103
- | Web UI | Playwright MCP | `browser_navigate`, `browser_snapshot`, `browser_click` |
104
- | API | WebFetch | Fetch endpoints, check responses |
105
- | CLI | Bash | Run the CLI command, check output |
106
- | Visual | Read | Read screenshot files if provided |
107
- | Browser | Chrome DevTools MCP | `take_snapshot`, `navigate_page`, `click` |
84
+ | Type | Tool |
85
+ |------|------|
86
+ | Web UI | Playwright MCP (`browser_navigate`, `browser_snapshot`, `browser_click`) |
87
+ | API | WebFetch |
88
+ | CLI | Bash |
89
+ | Visual | Read (screenshot files) |
90
+ | Browser | Chrome DevTools MCP |
108
91
 
109
- ### Verification Steps:
92
+ Steps: identify what proves the fix → execute → confirm behavior → document evidence.
110
93
 
111
- 1. **Identify verification target**: What proves this fix works?
112
- 2. **Execute verification**: Use appropriate tool from above
113
- 3. **Confirm result**: Does the actual behavior match expected?
114
- 4. **Document evidence**: Note what was verified and how
94
+ Examples:
95
+ - Web feature: navigate to page, take snapshot, verify element exists
96
+ - API fix: fetch endpoint, check response status and body
97
+ - CLI change: run command, verify output format
98
+ - UI bug: navigate, interact, confirm no error
115
99
 
116
- Example verifications:
117
- - Web feature: Navigate to page, take snapshot, verify element exists
118
- - API fix: Fetch endpoint, check response status and body
119
- - CLI change: Run command, verify output format
120
- - UI bug: Navigate, interact, confirm no error
121
-
122
- If verification fails: Return to Phase 1, fix the issue, re-verify.
100
+ If verification fails: return to Phase 1.
123
101
 
124
102
  ---
125
103
 
126
104
  ## Phase 3: SHIP
127
105
 
128
- ### 3.1 Run Build & Tests
106
+ ### 3.1 Build & Test
129
107
 
130
- ```bash
131
- # Run project's build/test commands
132
- # Example: npm run build && npm test
133
- # Example: pytest
134
- # Example: cargo build && cargo test
135
- ```
136
-
137
- If build/test fails: Fix errors, return to Phase 2 for re-verification.
108
+ Run project's build/test commands. If fail: fix → return to Phase 2.
138
109
 
139
110
  ### 3.2 Rebase
140
111
 
141
112
  ```bash
142
- git fetch origin main
143
- git rebase origin/main
113
+ git fetch origin main && git rebase origin/main
144
114
  # On conflict: resolve -> git add -> git rebase --continue
145
115
  ```
146
116
 
147
117
  ### 3.3 Commit & Push
148
118
 
149
119
  ```bash
120
+ BRANCH=$(git branch --show-current)
150
121
  git add -A
151
- git commit -m "fix: issue title summary
122
+
123
+ # Sync mode: "Closes #NUM" | Default: "Resolves: viban-ID"
124
+ if [ "$SYNC_ACTIVE" = true ]; then
125
+ git commit -m "fix: issue title summary
126
+
127
+ - Root cause: ...
128
+ - Solution: ...
129
+
130
+ Closes #$EXTERNAL_NUM"
131
+ else
132
+ git commit -m "fix: issue title summary
152
133
 
153
134
  - Root cause: ...
154
135
  - Solution: ...
155
136
 
156
- Resolves: viban-$ISSUE_ID"
137
+ Resolves: #$ISSUE_ID"
138
+ fi
157
139
 
158
- git push -u origin viban-$ISSUE_ID
140
+ git push -u origin "$BRANCH"
159
141
  ```
160
142
 
161
143
  ### 3.4 Create PR
162
144
 
163
145
  ```bash
164
- EXISTING_PR=$(gh pr list --head viban-$ISSUE_ID --json number -q '.[0].number')
165
- [ -z "$EXISTING_PR" ] && gh pr create \
166
- --title "viban-$ISSUE_ID: title" \
167
- --body "## Changes
146
+ EXISTING_PR=$(gh pr list --head "$BRANCH" --json number -q '.[0].number')
147
+
148
+ if [ -z "$EXISTING_PR" ]; then
149
+ if [ "$SYNC_ACTIVE" = true ]; then
150
+ gh pr create --title "fix: title" \
151
+ --body "## Changes
152
+ - ...
153
+
154
+ Closes #$EXTERNAL_NUM
155
+
156
+ ## Verification
157
+ - [ ] Manual verification completed
158
+ - [ ] Build passing
159
+ - [ ] Tests passing (if applicable)" --base main
160
+ else
161
+ gh pr create --title "fix: title" \
162
+ --body "## Changes
168
163
  - ...
169
164
 
170
165
  ## Verification
171
166
  - [ ] Manual verification completed
172
167
  - [ ] Build passing
173
- - [ ] Tests passing (if applicable)" \
174
- --base main
168
+ - [ ] Tests passing (if applicable)" --base main
169
+ fi
170
+ fi
175
171
  ```
176
172
 
177
- ### 3.5 Issue -> review
173
+ ### 3.5 Move to Review
178
174
 
179
175
  ```bash
180
176
  viban review $ISSUE_ID
@@ -185,18 +181,9 @@ viban review $ISSUE_ID
185
181
  ## Phase 4: HANDOFF
186
182
 
187
183
  ```
188
- Human Review Required
189
-
190
- Issue #$ISSUE_ID -> review status
191
-
192
- PR: gh pr view viban-$ISSUE_ID --web
193
-
194
- Verification complete:
195
- - Manual verification done with available tools
196
- - Build passing
197
- - Project workflow followed
198
-
199
- After approval: Delete issue from viban TUI
184
+ Issue #$ISSUE_ID → review | PR: gh pr view --web
185
+ Verification: manual + build + workflow followed
186
+ After approval: delete issue from viban TUI
200
187
  ```
201
188
 
202
189
  ---
@@ -205,7 +192,7 @@ After approval: Delete issue from viban TUI
205
192
 
206
193
  ```
207
194
  [ ] Read .viban/workflow.md (or CLAUDE.md fallback) for project workflow
208
- [ ] Working on viban-$ISSUE_ID branch
195
+ [ ] Working on issue-$ISSUE_ID branch
209
196
  [ ] Implementation complete
210
197
  [ ] Manual verification passed (using appropriate tools)
211
198
  [ ] Build & tests passing
@@ -218,13 +205,7 @@ After approval: Delete issue from viban TUI
218
205
 
219
206
  ## CRITICAL: Status Transition Rule
220
207
 
221
- > **NEVER end this skill with the issue still in `in_progress`.**
222
- >
223
- > Before exiting — whether you completed all phases or stopped early due to errors:
224
- > ```bash
225
- > viban review $ISSUE_ID
226
- > ```
227
- > This is MANDATORY. If you skip this, the board becomes stale and misleading.
208
+ > **NEVER exit with issue still in `in_progress`.** Always run `viban review $ISSUE_ID` before exiting — whether completed or stopped early.
228
209
 
229
210
  ## CLI Reference
230
211
 
@@ -94,13 +94,21 @@ sudo dnf install -y gum
94
94
  sudo pacman -S --noconfirm zsh jq gum
95
95
  ```
96
96
 
97
- ### Step 4: Install or Update viban CLI
97
+ ### Step 4: Install or Update viban CLI + Auto-detect (Parallel)
98
+
99
+ Run dependency installation in the **background** while auto-detecting project configuration **in parallel**:
100
+
101
+ **Background task (install):**
98
102
 
99
103
  ```bash
100
104
  npm install -g claude-plugin-viban@latest
101
105
  ```
102
106
 
103
- This installs viban if not present, or updates to the latest version if already installed.
107
+ **Parallel task (auto-detect) run simultaneously:**
108
+
109
+ Jump to Step 7 (Auto-detect Project Configuration) and start gathering project context while installation proceeds.
110
+
111
+ Wait for both tasks to complete before continuing to Step 5.
104
112
 
105
113
  ### Step 5: Verify Installation
106
114
 
@@ -128,21 +136,25 @@ You can now use:
128
136
  viban list List all tasks
129
137
  /viban:assign Auto-resolve next issue
130
138
  /viban:add Create structured issue
139
+
140
+ Tip: Use /viban:sync to integrate with GitHub Issues.
141
+ Run it anytime to set up two-way sync.
131
142
  ```
132
143
 
133
144
  ### Step 6: Workflow Setup Introduction
134
145
 
135
- After dependencies are installed, explain to the user:
146
+ After dependencies are installed and auto-detection is complete, explain to the user:
136
147
 
137
148
  ```
138
149
  ╭──────────────────────────────────────────────────╮
139
- │ Workflow Setup (Optional)
150
+ │ Workflow Setup (Optional)
140
151
  ╰──────────────────────────────────────────────────╯
141
152
 
142
153
  /viban:assign uses your project's .viban/workflow.md
143
154
  as the TOP PRIORITY when resolving issues.
144
155
 
145
- Without a workflow, a default 4-step process is used.
156
+ Without a workflow, a default process is used:
157
+ analyze → implement → verify → ship.
146
158
  Let's set up a custom workflow for this project now.
147
159
  ```
148
160
 
@@ -194,10 +206,9 @@ Ask only what the agent **cannot infer on its own**. One AskUserQuestion call, 3
194
206
  - header: "Pipeline"
195
207
  - question: "After `/viban:assign`, how far should the agent go?"
196
208
  - options:
197
- - "Full auto — analyze → implement → commit → PR review"
198
- - "Stop before PR — I'll review the diff then create PR myself"
199
- - "Stop before commit — I'll review the code before anything ships"
200
- - "Plan only — analyze and propose a plan, I'll implement"
209
+ - "Full auto — analyze → implement → commit → PR (review in PR)"
210
+ - "Stop before PR — I'll review the diff first (review in terminal/IDE)"
211
+ - "Stop before commit — I'll review the code first (review in terminal/IDE)"
201
212
  - multiSelect: false
202
213
 
203
214
  **Q2. Issue Numbering**
@@ -205,17 +216,32 @@ Ask only what the agent **cannot infer on its own**. One AskUserQuestion call, 3
205
216
  - question: "How should issues be numbered when using `/viban:add`?"
206
217
  - options:
207
218
  - "Auto — viban auto-assigns #1, #2, #3..."
219
+ - "Sync with provider — use `/viban:sync` to import from GitHub, Jira, Linear, etc."
208
220
  - "Manual — ask for an external ID each time (e.g. PROJ-42, JIRA-123)"
209
221
  - multiSelect: false
222
+ - If user selects "Sync with provider", run `/viban:sync` to initialize sync after workflow setup completes.
210
223
 
211
224
  **Q3. Extra Rules**
225
+
226
+ Before asking, show the user what was auto-detected from Step 7:
227
+
228
+ ```
229
+ Detected conventions:
230
+ Commit style: {e.g. "feat: ...", "fix: ..." (Conventional Commits)}
231
+ Branch naming: {e.g. "feat/*", "fix/*"}
232
+ Build command: {e.g. "npm run build && npm test"}
233
+ Project type: {e.g. "CLI tool (zsh)"}
234
+ ```
235
+
236
+ Then ask:
237
+
212
238
  - header: "Rules"
213
- - question: "Any additional rules the agent should follow? (e.g. commit conventions, language, CHANGELOG)"
239
+ - question: "Anything to change or add to the detected conventions above?"
214
240
  - options:
215
- - "No, auto-detect everything"
216
- - "Let me describe"
241
+ - "Looks good, use as-is"
242
+ - "Let me adjust"
217
243
  - multiSelect: false
218
- - If user selects "Let me describe", collect free-text.
244
+ - If user selects "Let me adjust", collect free-text.
219
245
 
220
246
  **Defaults for everything else (do NOT ask):**
221
247
 
@@ -280,8 +306,8 @@ Combine **auto-detected values** (Step 7) with **interview answers** (Step 8) to
280
306
  | Extra rules | Q3 | User-typed rules or "None" |
281
307
 
282
308
  **Workflow generation principles:**
283
- - **Q1 (Pipeline) determines the entire automation structure** — which phases run automatically, where to stop, and whether to create PRs. "Full auto" = no stops + auto PR. "Stop before PR" = auto commit + user creates PR. "Stop before commit" = implement only + user reviews. "Plan only" = analyze only.
284
- - **Q2 (Issue numbering) determines how `/viban:add` handles IDs.** "Auto" = viban auto-assigns `#1`, `#2`. "Manual" = agent asks for an external ID each time and passes `--ext-id` to `viban add`. When manual, commits/PRs reference the external ID instead of `#N`.
309
+ - **Q1 (Pipeline) determines the entire automation structure** — which phases run automatically, where to stop, and whether to create PRs. "Full auto" = no stops + auto PR. "Stop before PR" = auto commit + user creates PR. "Stop before commit" = implement only + user reviews.
310
+ - **Q2 (Issue numbering) determines how `/viban:add` handles IDs.** "Auto" = viban auto-assigns `#1`, `#2`. "Sync with provider" = use `/viban:sync` to import/sync issues from GitHub, Jira, Linear, etc. "Manual" = agent asks for an external ID each time and passes `--ext-id` to `viban add`. When manual, commits/PRs reference the external ID instead of `#N`.
285
311
  - **Q3 (Extra rules) is appended verbatim to the Additional Rules section.** If user mentions conventions, evidence, CHANGELOG, language, etc., incorporate into the relevant phase.
286
312
  - **Commit/PR conventions are auto-detected from git history** (Step 7.2). If the user overrides via Q3, use the user's preference instead.
287
313
  - **Everything else uses smart defaults.** Analysis depth, implementation approach, quality gates, verification methods, issue numbering, post-merge — all auto-determined by the agent or set to sensible defaults.
@@ -301,7 +327,6 @@ Combine **auto-detected values** (Step 7) with **interview answers** (Step 8) to
301
327
  {- "Full auto": "Analyze → Implement → Verify → Build → Commit → PR → Review (fully autonomous)"}
302
328
  {- "Stop before PR": "Analyze → Implement → Verify → Build → Commit → STOP (user creates PR)"}
303
329
  {- "Stop before commit": "Analyze → Implement → STOP (user reviews code, then commits)"}
304
- {- "Plan only": "Analyze → STOP (user decides next steps)"}
305
330
 
306
331
  ---
307
332
 
@@ -319,9 +344,6 @@ The agent determines analysis depth based on issue priority and complexity.
319
344
  - [ ] Root cause identified (or hypothesis formed)
320
345
  - [ ] Scope of change estimated
321
346
 
322
- {IF Q1 is "Plan only":}
323
- ### >>> STOP: Present analysis and proposed plan to user. Wait for approval.
324
-
325
347
  ---
326
348
 
327
349
  ## Phase 2: Implement
@@ -377,7 +399,7 @@ If build/test fails: fix errors, return to Phase 3.
377
399
  {FROM Q1:}
378
400
  {- "Full auto": create PR with body template, move issue to review via `viban review {id}`}
379
401
  {- "Stop before PR": commit and push only, notify user that PR is pending. Run `viban review {id}`.}
380
- {- "Stop before commit" / "Plan only": N/A — agent already stopped earlier}
402
+ {- "Stop before commit": N/A — agent already stopped earlier}
381
403
 
382
404
  ### PR Body Template
383
405
  {AUTO_DETECTED from git history convention. If Q3 overrides, use that instead.}
@@ -391,7 +413,7 @@ If build/test fails: fix errors, return to Phase 3.
391
413
 
392
414
  ## Issue Management
393
415
 
394
- - Issue numbering: {FROM Q2: "Auto" = auto-increment (viban default), "Manual" = ask for external ID via `--ext-id` flag}
416
+ - Issue numbering: {FROM Q2: "Auto" = auto-increment (viban default), "Sync with provider" = use `/viban:sync` for external tracker integration, "Manual" = ask for external ID via `--ext-id` flag}
395
417
  - Test evidence: include test output in PR body
396
418
  - Post-merge: auto-close issue (`viban done {id}`), delete branch
397
419
 
@@ -17,7 +17,7 @@ Sync the viban board with an external issue tracker. Currently supports GitHub I
17
17
 
18
18
  ```bash
19
19
  # Check if sync is already configured
20
- if [ -f "$(git rev-parse --git-common-dir 2>/dev/null || echo .viban)/sync.json" ]; then
20
+ if [ -f ".viban/sync.json" ]; then
21
21
  echo "Sync configured"
22
22
  viban sync --status
23
23
  else