claude-plugin-viban 1.2.2 → 1.3.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viban",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "Terminal Kanban TUI for AI-human collaborative issue tracking",
5
5
  "author": {
6
6
  "name": "happy-nut"
package/bin/viban CHANGED
@@ -906,7 +906,7 @@ draw_board() {
906
906
 
907
907
  draw_footer() {
908
908
  printf '\033[K\n'
909
- print_center "←→ Column │ ↑↓ Card │ Shift+↑↓ Reorder │ Shift+←→ Move │ Enter Edit │ ⌫ Del │ A Add │ Q Quit" "${A_DIM}"
909
+ print_center "←→ Column │ ↑↓ Card │ Shift+↑↓ Reorder │ Shift+←→ Move │ Enter Edit/PR │ ⌫ Del │ A Add │ Q Quit" "${A_DIM}"
910
910
  }
911
911
 
912
912
  read_key() {
@@ -1173,11 +1173,24 @@ level1_columns() {
1173
1173
  if (( cnt > 0 )); then
1174
1174
  local id=$(get_issue_id_at_index "$st" "$card" "$json_data")
1175
1175
  [[ -n "$id" ]] && {
1176
- printf '\033[?25h'
1177
- stty echo 2>/dev/null
1178
- edit_issue "$id"
1179
- stty -echo 2>/dev/null
1180
- printf '\033[?25l\033[2J\033[H'
1176
+ if [[ "$st" == "review" ]]; then
1177
+ # Open associated PR in browser
1178
+ local _branch="issue-${id}"
1179
+ local _ext_id=$(get_ext_id "$id")
1180
+ if [[ -n "$_ext_id" && "$_ext_id" != "null" ]]; then
1181
+ local _num="${_ext_id##*:}"
1182
+ gh pr view "$_num" --web 2>/dev/null || \
1183
+ gh pr list --head "$_branch" --web 2>/dev/null
1184
+ else
1185
+ gh pr list --head "$_branch" --web 2>/dev/null
1186
+ fi
1187
+ else
1188
+ printf '\033[?25h'
1189
+ stty echo 2>/dev/null
1190
+ edit_issue "$id"
1191
+ stty -echo 2>/dev/null
1192
+ printf '\033[?25l\033[2J\033[H'
1193
+ fi
1181
1194
  }
1182
1195
  fi
1183
1196
  ;;
@@ -1,217 +1,14 @@
1
1
  ---
2
- description: "Assign and resolve first backlog issue from viban board through to PR completion"
2
+ description: "Assign first backlog issue clarify if unclear, then finish"
3
3
  ---
4
4
 
5
- # /assign
5
+ Run `/viban:assign` to pick up the next backlog issue.
6
6
 
7
- First backlog issue → Resolve → PR completion
7
+ Usage: `/viban:assign`
8
8
 
9
- > **CLI only** (no direct viban.json access) | **No worktree** (branch in main repo)
9
+ What it does:
10
+ 1. Assigns the first backlog issue (by priority) to the current session
11
+ 2. If the issue description is unclear or lacks context, interviews you to gather missing information and updates the issue
12
+ 3. That's it — no implementation, no branch creation
10
13
 
11
- ---
12
-
13
- ## Phase 0: SETUP
14
-
15
- ### 0.1 Read Workflow (CRITICAL)
16
-
17
- Check in priority order — first match wins, follow it exactly:
18
-
19
- 1. `.viban/workflow.md` → `[ -f ".viban/workflow.md" ] && cat ".viban/workflow.md"`
20
- 2. CLAUDE.md (legacy, only if no workflow.md):
21
- ```bash
22
- for path in "./CLAUDE.md" "./.claude/CLAUDE.md" "../CLAUDE.md"; do
23
- [ -f "$path" ] && cat "$path"
24
- done
25
- ```
26
- Look for `Issue Resolution Workflow` or `Workflow` section.
27
- 3. Default workflow (Phase 1 below)
28
-
29
- ### 0.2 Git Setup & Assign
30
-
31
- ```bash
32
- # Check uncommitted changes → AskUserQuestion if dirty
33
- [ -n "$(git status --porcelain)" ] && echo "Warning: Uncommitted changes"
34
-
35
- git checkout main && git fetch origin main && git reset --hard origin/main
36
-
37
- ISSUE_ID=$(viban assign 2>&1 | tail -1)
38
- [[ -z "$ISSUE_ID" || "$ISSUE_ID" == "No backlog" ]] && echo "No issues in backlog" && exit 0
39
- ```
40
-
41
- ### 0.3 Detect Sync & Create Branch
42
-
43
- ```bash
44
- ISSUE_JSON=$(viban get $ISSUE_ID)
45
- EXT_ID=$(echo "$ISSUE_JSON" | jq -r '.external_id // ""')
46
- SYNC_ACTIVE=false; EXTERNAL_NUM=""
47
-
48
- if [ -n "$EXT_ID" ] && [ "$EXT_ID" != "null" ]; then
49
- SYNC_ACTIVE=true
50
- EXTERNAL_NUM="${EXT_ID##*:}" # "github:42" -> "42"
51
- TITLE=$(echo "$ISSUE_JSON" | jq -r '.title' | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | head -c 40)
52
- git checkout -b "issue-${EXTERNAL_NUM}-${TITLE}"
53
- else
54
- git checkout -b issue-$ISSUE_ID
55
- fi
56
- ```
57
-
58
- ### 0.4 Load Plan (if available)
59
-
60
- ```bash
61
- [ -f ".viban/plans/${ISSUE_ID}.md" ] && cat ".viban/plans/${ISSUE_ID}.md"
62
- ```
63
-
64
- If plan exists: use as primary guide for Phase 1, skip redundant analysis, but verify plan is still current.
65
-
66
- ---
67
-
68
- ## Phase 1: ANALYZE & IMPLEMENT
69
-
70
- ```bash
71
- viban get $ISSUE_ID
72
- ```
73
-
74
- **With project workflow**: follow its exact steps.
75
- **Default** (no workflow): Understand → Locate → Analyze root cause → Implement minimal changes.
76
-
77
- ---
78
-
79
- ## Phase 2: VERIFY
80
-
81
- Manual verification — do NOT run build/test here (Phase 3).
82
-
83
- | Type | Tool |
84
- |------|------|
85
- | Web UI | Playwright MCP (`browser_navigate`, `browser_snapshot`, `browser_click`) |
86
- | API | WebFetch |
87
- | CLI | Bash |
88
- | Visual | Read (screenshot files) |
89
- | Browser | Chrome DevTools MCP |
90
-
91
- Steps: identify what proves the fix → execute → confirm behavior → document evidence.
92
-
93
- Examples:
94
- - Web feature: navigate to page, take snapshot, verify element exists
95
- - API fix: fetch endpoint, check response status and body
96
- - CLI change: run command, verify output format
97
- - UI bug: navigate, interact, confirm no error
98
-
99
- If verification fails: return to Phase 1.
100
-
101
- ---
102
-
103
- ## Phase 3: SHIP
104
-
105
- ### 3.1 Build & Test
106
-
107
- Run project's build/test commands. If fail: fix → return to Phase 2.
108
-
109
- ### 3.2 Rebase
110
-
111
- ```bash
112
- git fetch origin main && git rebase origin/main
113
- # On conflict: resolve -> git add -> git rebase --continue
114
- ```
115
-
116
- ### 3.3 Commit & Push
117
-
118
- ```bash
119
- BRANCH=$(git branch --show-current)
120
- git add -A
121
-
122
- # Sync mode: "Closes #NUM" | Default: "Resolves: viban-ID"
123
- if [ "$SYNC_ACTIVE" = true ]; then
124
- git commit -m "fix: issue title summary
125
-
126
- - Root cause: ...
127
- - Solution: ...
128
-
129
- Closes #$EXTERNAL_NUM"
130
- else
131
- git commit -m "fix: issue title summary
132
-
133
- - Root cause: ...
134
- - Solution: ...
135
-
136
- Resolves: #$ISSUE_ID"
137
- fi
138
-
139
- git push -u origin "$BRANCH"
140
- ```
141
-
142
- ### 3.4 Create PR
143
-
144
- ```bash
145
- EXISTING_PR=$(gh pr list --head "$BRANCH" --json number -q '.[0].number')
146
-
147
- if [ -z "$EXISTING_PR" ]; then
148
- if [ "$SYNC_ACTIVE" = true ]; then
149
- gh pr create --title "fix: title" \
150
- --body "## Changes
151
- - ...
152
-
153
- Closes #$EXTERNAL_NUM
154
-
155
- ## Verification
156
- - [ ] Manual verification completed
157
- - [ ] Build passing
158
- - [ ] Tests passing (if applicable)" --base main
159
- else
160
- gh pr create --title "fix: title" \
161
- --body "## Changes
162
- - ...
163
-
164
- ## Verification
165
- - [ ] Manual verification completed
166
- - [ ] Build passing
167
- - [ ] Tests passing (if applicable)" --base main
168
- fi
169
- fi
170
- ```
171
-
172
- ### 3.5 Move to Review
173
-
174
- ```bash
175
- viban review $ISSUE_ID
176
- ```
177
-
178
- ---
179
-
180
- ## Phase 4: HANDOFF
181
-
182
- ```
183
- Issue #$ISSUE_ID → review | PR: gh pr view --web
184
- Verification: manual + build + workflow followed
185
- After approval: delete issue from viban TUI
186
- ```
187
-
188
- ---
189
-
190
- ## Checklist
191
-
192
- ```
193
- [ ] Read .viban/workflow.md (or CLAUDE.md fallback) for project workflow
194
- [ ] Working on issue-$ISSUE_ID branch
195
- [ ] Implementation complete
196
- [ ] Manual verification passed (using appropriate tools)
197
- [ ] Build & tests passing
198
- [ ] Rebase complete
199
- [ ] PR created
200
- [ ] viban review executed
201
- ```
202
-
203
- ---
204
-
205
- ## CRITICAL: Status Transition Rule
206
-
207
- > **NEVER exit with issue still in `in_progress`.** Always run `viban review $ISSUE_ID` before exiting — whether completed or stopped early.
208
-
209
- ## CLI Reference
210
-
211
- | Command | Description |
212
- |---------|-------------|
213
- | `viban` | Open TUI |
214
- | `viban list` | Print board |
215
- | `viban assign [session]` | Assign issue |
216
- | `viban get <id>` | View issue |
217
- | `viban review <id>` | Move to review |
14
+ This command is for **assignment and clarification only**. Use other tools to start working on the assigned issue.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-plugin-viban",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "Terminal Kanban TUI for AI-human collaborative issue tracking",
5
5
  "main": "bin/viban",
6
6
  "bin": {
@@ -1,21 +1,19 @@
1
1
  ---
2
2
  name: assign
3
- description: "Assign and resolve first backlog issue from viban board through to PR completion"
3
+ description: "Assign first backlog issue clarify if unclear, then finish"
4
4
  ---
5
5
 
6
6
  # /assign
7
7
 
8
- First backlog issue Resolve PR completion
8
+ Assign the first backlog issue. If the description is unclear or lacks context, interview the user and enrich the issue. **Do NOT start implementation.**
9
9
 
10
- > **CLI only** (no direct viban.json access) | **No worktree** (branch in main repo)
10
+ > **CLI only** (no direct viban.json access)
11
11
 
12
12
  ---
13
13
 
14
- ## Phase 0: SETUP
14
+ ## Step 0: Read Workflow (CRITICAL)
15
15
 
16
- ### 0.1 Read Workflow (CRITICAL)
17
-
18
- Check in priority order — first match wins, follow it exactly:
16
+ Check in priority order — first match wins:
19
17
 
20
18
  1. `.viban/workflow.md` → `[ -f ".viban/workflow.md" ] && cat ".viban/workflow.md"`
21
19
  2. CLAUDE.md (legacy, only if no workflow.md):
@@ -25,193 +23,91 @@ for path in "./CLAUDE.md" "./.claude/CLAUDE.md" "../CLAUDE.md"; do
25
23
  done
26
24
  ```
27
25
  Look for `Issue Resolution Workflow` or `Workflow` section.
28
- 3. Default workflow (Phase 1 below)
29
26
 
30
- ### 0.2 Git Setup & Assign
27
+ If a workflow exists, follow its conventions for issue handling.
31
28
 
32
- ```bash
33
- # Check uncommitted changes → AskUserQuestion if dirty
34
- [ -n "$(git status --porcelain)" ] && echo "Warning: Uncommitted changes"
29
+ ---
35
30
 
36
- git checkout main && git fetch origin main && git reset --hard origin/main
31
+ ## Step 1: Assign
37
32
 
33
+ ```bash
38
34
  ISSUE_ID=$(viban assign 2>&1 | tail -1)
39
35
  [[ -z "$ISSUE_ID" || "$ISSUE_ID" == "No backlog" ]] && echo "No issues in backlog" && exit 0
40
36
  ```
41
37
 
42
- ### 0.3 Detect Sync & Create Branch
38
+ If backlog is empty: notify user and exit.
43
39
 
44
- ```bash
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
- git checkout -b "issue-${EXTERNAL_NUM}"
53
- else
54
- git checkout -b issue-$ISSUE_ID
55
- fi
56
- ```
57
-
58
- ### 0.4 Load Plan (if available)
59
-
60
- ```bash
61
- [ -f ".viban/plans/${ISSUE_ID}.md" ] && cat ".viban/plans/${ISSUE_ID}.md"
62
- ```
63
-
64
- If plan exists: use as primary guide for Phase 1, skip redundant analysis, but verify plan is still current.
65
-
66
- ---
67
-
68
- ## Phase 1: ANALYZE & IMPLEMENT
40
+ ## Step 2: Read Issue
69
41
 
70
42
  ```bash
71
43
  viban get $ISSUE_ID
72
44
  ```
73
45
 
74
- **With project workflow**: follow its exact steps.
75
- **Default** (no workflow): Understand → Locate → Analyze root cause → Implement minimal changes.
76
-
77
- ---
78
-
79
- ## Phase 2: VERIFY
80
-
81
- Manual verification — do NOT run build/test here (Phase 3).
82
-
83
- | Type | Tool |
84
- |------|------|
85
- | Web UI | Playwright MCP (`browser_navigate`, `browser_snapshot`, `browser_click`) |
86
- | API | WebFetch |
87
- | CLI | Bash |
88
- | Visual | Read (screenshot files) |
89
- | Browser | Chrome DevTools MCP |
46
+ Display the issue title, description, priority, and type to the user.
90
47
 
91
- Steps: identify what proves the fix → execute → confirm behavior → document evidence.
48
+ ## Step 3: Evaluate Clarity
92
49
 
93
- Examples:
94
- - Web feature: navigate to page, take snapshot, verify element exists
95
- - API fix: fetch endpoint, check response status and body
96
- - CLI change: run command, verify output format
97
- - UI bug: navigate, interact, confirm no error
50
+ Assess whether the issue description provides enough context for someone to start working on it:
98
51
 
99
- If verification fails: return to Phase 1.
100
-
101
- ---
52
+ - **Clear**: the symptom, affected area, and expected behavior are all understandable
53
+ - **Unclear**: vague description, missing context, ambiguous scope, or multiple possible interpretations
102
54
 
103
- ## Phase 3: SHIP
55
+ ### If Clear
104
56
 
105
- ### 3.1 Build & Test
57
+ Report the assignment and finish:
106
58
 
107
- Run project's build/test commands. If fail: fix → return to Phase 2.
108
-
109
- ### 3.2 Rebase
110
-
111
- ```bash
112
- git fetch origin main && git rebase origin/main
113
- # On conflict: resolve -> git add -> git rebase --continue
114
59
  ```
60
+ Issue #{id} assigned
61
+ Title: {title}
62
+ Priority: {priority} | Type: {type}
63
+ Status: in_progress
115
64
 
116
- ### 3.3 Commit & Push
117
-
118
- ```bash
119
- BRANCH=$(git branch --show-current)
120
- git add -A
121
-
122
- # Sync mode: "Closes #NUM" | Default: "Resolves: viban-ID"
123
- if [ "$SYNC_ACTIVE" = true ]; then
124
- git commit -m "fix: issue title summary
125
-
126
- - Root cause: ...
127
- - Solution: ...
128
-
129
- Closes #$EXTERNAL_NUM"
130
- else
131
- git commit -m "fix: issue title summary
132
-
133
- - Root cause: ...
134
- - Solution: ...
135
-
136
- Resolves: #$ISSUE_ID"
137
- fi
138
-
139
- git push -u origin "$BRANCH"
65
+ Ready for work.
140
66
  ```
141
67
 
142
- ### 3.4 Create PR
68
+ ### If Unclear
143
69
 
144
- ```bash
145
- EXISTING_PR=$(gh pr list --head "$BRANCH" --json number -q '.[0].number')
146
-
147
- if [ -z "$EXISTING_PR" ]; then
148
- if [ "$SYNC_ACTIVE" = true ]; then
149
- gh pr create --title "fix: title" \
150
- --body "## Changes
151
- - ...
152
-
153
- Closes #$EXTERNAL_NUM
154
-
155
- ## Verification
156
- - [ ] Manual verification completed
157
- - [ ] Build passing
158
- - [ ] Tests passing (if applicable)" --base main
159
- else
160
- gh pr create --title "fix: title" \
161
- --body "## Changes
162
- - ...
163
-
164
- ## Verification
165
- - [ ] Manual verification completed
166
- - [ ] Build passing
167
- - [ ] Tests passing (if applicable)" --base main
168
- fi
169
- fi
170
- ```
70
+ Interview the user with AskUserQuestion to gather missing context. Ask about:
71
+ - What specifically is the problem? (symptom)
72
+ - Where does it happen? (location/trigger)
73
+ - What is the expected behavior?
74
+ - Any additional constraints or context?
171
75
 
172
- ### 3.5 Move to Review
76
+ After gathering answers, update the issue description:
173
77
 
174
78
  ```bash
175
- viban review $ISSUE_ID
176
- ```
177
-
178
- ---
79
+ cat > /tmp/viban-desc-update.md <<'VIBAN_EOF'
80
+ {original description}
179
81
 
180
- ## Phase 4: HANDOFF
82
+ ## Clarification
83
+ {gathered context from interview}
84
+ VIBAN_EOF
181
85
 
182
- ```
183
- Issue #$ISSUE_ID → review | PR: gh pr view --web
184
- Verification: manual + build + workflow followed
185
- After approval: delete issue from viban TUI
86
+ # Re-add the issue with enriched description (edit via TUI or recreate)
186
87
  ```
187
88
 
188
- ---
189
-
190
- ## Checklist
89
+ Then report:
191
90
 
192
91
  ```
193
- [ ] Read .viban/workflow.md (or CLAUDE.md fallback) for project workflow
194
- [ ] Working on issue-$ISSUE_ID branch
195
- [ ] Implementation complete
196
- [ ] Manual verification passed (using appropriate tools)
197
- [ ] Build & tests passing
198
- [ ] Rebase complete
199
- [ ] PR created
200
- [ ] viban review executed
92
+ Issue #{id} assigned and clarified
93
+ Title: {title}
94
+ Priority: {priority} | Type: {type}
95
+ Status: in_progress
96
+
97
+ Clarification added to issue description.
201
98
  ```
202
99
 
203
100
  ---
204
101
 
205
- ## CRITICAL: Status Transition Rule
102
+ ## CRITICAL
206
103
 
207
- > **NEVER exit with issue still in `in_progress`.** Always run `viban review $ISSUE_ID` before exiting — whether completed or stopped early.
104
+ > - This command **assigns only**. Do NOT create branches, write code, or start implementation.
105
+ > - Do NOT run `viban review` — the issue stays in `in_progress` for the next work session.
106
+ > - If the issue is clear, just report and finish immediately.
208
107
 
209
108
  ## CLI Reference
210
109
 
211
110
  | Command | Description |
212
111
  |---------|-------------|
213
- | `viban` | Open TUI |
214
- | `viban list` | Print board |
215
112
  | `viban assign [session]` | Assign issue |
216
113
  | `viban get <id>` | View issue |
217
- | `viban review <id>` | Move to review |
@@ -104,8 +104,9 @@ You are resolving viban issue #{ID} in an isolated git worktree.
104
104
  - Main repo: {REPO_ROOT}
105
105
  - ALL file operations must happen inside the worktree path
106
106
 
107
- ## Workflow
108
- {paste workflow.md content}
107
+ ## Workflow (Analyze + Implement + Verify only)
108
+ {paste workflow.md Phase 1 (Analyze), Phase 2 (Implement), and Phase 3 (Verify) sections ONLY}
109
+ {DO NOT include: Pipeline summary, GitHub Sync, Phase 4 (Build and Test), Phase 5 (Ship), Issue Management, Post-merge, or Additional Rules}
109
110
 
110
111
  ## Issue Details
111
112
  {paste viban get output}
@@ -152,6 +153,7 @@ You are one of {N} parallel agents working in isolated git worktrees.
152
153
 
153
154
  CRITICAL:
154
155
  - Always run `viban review {ID}` before finishing, even on errors.
156
+ - Do NOT run `viban done` — the coordinator handles post-merge cleanup.
155
157
  - Do NOT run the full test suite — the coordinator handles that.
156
158
  - Do NOT remove the worktree — the coordinator handles cleanup.
157
159
  ```
package/commands/sync.md DELETED
@@ -1,99 +0,0 @@
1
- ---
2
- description: "Sync viban board with external issue tracker (GitHub, Jira, etc.)"
3
- ---
4
-
5
- # /sync - External Issue Tracker Sync
6
-
7
- Sync the viban board with an external issue tracker. Currently supports GitHub Issues via `gh` CLI.
8
-
9
- > **Principle**: Show what will happen before doing it. Never sync without user confirmation.
10
-
11
- ## Input
12
-
13
- **User Input**: `$ARGUMENTS`
14
-
15
- ## Step 1: Check Sync Configuration
16
-
17
- ```bash
18
- # Check if sync is already configured
19
- if [ -f ".viban/sync.json" ]; then
20
- echo "Sync configured"
21
- viban sync --status
22
- else
23
- echo "Sync not configured"
24
- fi
25
- ```
26
-
27
- - If **not configured**, proceed to Step 2
28
- - If **configured**, skip to Step 3
29
-
30
- ## Step 2: Initialize Sync
31
-
32
- ```bash
33
- viban sync --init
34
- ```
35
-
36
- This will:
37
- - Auto-detect the provider from git remote (defaults to GitHub)
38
- - Check that `gh` CLI is installed and authenticated
39
- - Create required labels on the remote repo
40
- - Initialize `sync.json` metadata
41
-
42
- If initialization fails, report the error and suggest fixes (install `gh`, run `gh auth login`, etc.).
43
-
44
- ## Step 3: Preview Changes (Dry Run)
45
-
46
- ```bash
47
- viban sync --dry-run
48
- ```
49
-
50
- Show the user what will happen:
51
- - `<-` Issues to pull from remote
52
- - `->` Cards to push to remote
53
- - `==` Unchanged items
54
- - `!!` Conflicts (and resolution strategy)
55
-
56
- ## Step 4: Confirm and Sync
57
-
58
- Ask the user for confirmation using AskUserQuestion:
59
-
60
- - header: "Sync"
61
- - question: "Apply these sync changes?"
62
- - options:
63
- - "Yes, sync now"
64
- - "Sync and push new local cards too (--push-new)"
65
- - "Pull only (remote -> local)"
66
- - "Cancel"
67
- - multiSelect: false
68
-
69
- Based on the answer:
70
-
71
- ```bash
72
- # Yes, sync now
73
- viban sync
74
-
75
- # With push-new
76
- viban sync --push-new
77
-
78
- # Pull only
79
- viban sync --pull-only
80
- ```
81
-
82
- ## Step 5: Report Results
83
-
84
- Show the sync summary:
85
- ```
86
- Sync complete:
87
- Pulled: N new/updated cards from remote
88
- Pushed: N cards to remote
89
- Conflicts: N (resolved by: remote wins)
90
- Unchanged: N
91
- ```
92
-
93
- ## Notes
94
-
95
- - **First sync imports all open issues** as backlog cards with `github:N` external IDs
96
- - **Conflicts**: when both sides changed, remote wins by default (with warning)
97
- - **Closed issues**: remote closed issues move viban card to `review` status
98
- - **Done cards**: `viban done` then sync closes the remote issue
99
- - **New local cards** are NOT pushed unless `--push-new` is specified (local-first default)
@@ -1,100 +0,0 @@
1
- ---
2
- name: sync
3
- description: "Sync viban board with external issue tracker (GitHub, Jira, etc.)"
4
- ---
5
-
6
- # /sync - External Issue Tracker Sync
7
-
8
- Sync the viban board with an external issue tracker. Currently supports GitHub Issues via `gh` CLI.
9
-
10
- > **Principle**: Show what will happen before doing it. Never sync without user confirmation.
11
-
12
- ## Input
13
-
14
- **User Input**: `$ARGUMENTS`
15
-
16
- ## Step 1: Check Sync Configuration
17
-
18
- ```bash
19
- # Check if sync is already configured
20
- if [ -f ".viban/sync.json" ]; then
21
- echo "Sync configured"
22
- viban sync --status
23
- else
24
- echo "Sync not configured"
25
- fi
26
- ```
27
-
28
- - If **not configured**, proceed to Step 2
29
- - If **configured**, skip to Step 3
30
-
31
- ## Step 2: Initialize Sync
32
-
33
- ```bash
34
- viban sync --init
35
- ```
36
-
37
- This will:
38
- - Auto-detect the provider from git remote (defaults to GitHub)
39
- - Check that `gh` CLI is installed and authenticated
40
- - Create required labels on the remote repo
41
- - Initialize `sync.json` metadata
42
-
43
- If initialization fails, report the error and suggest fixes (install `gh`, run `gh auth login`, etc.).
44
-
45
- ## Step 3: Preview Changes (Dry Run)
46
-
47
- ```bash
48
- viban sync --dry-run
49
- ```
50
-
51
- Show the user what will happen:
52
- - `<-` Issues to pull from remote
53
- - `->` Cards to push to remote
54
- - `==` Unchanged items
55
- - `!!` Conflicts (and resolution strategy)
56
-
57
- ## Step 4: Confirm and Sync
58
-
59
- Ask the user for confirmation using AskUserQuestion:
60
-
61
- - header: "Sync"
62
- - question: "Apply these sync changes?"
63
- - options:
64
- - "Yes, sync now"
65
- - "Sync and push new local cards too (--push-new)"
66
- - "Pull only (remote -> local)"
67
- - "Cancel"
68
- - multiSelect: false
69
-
70
- Based on the answer:
71
-
72
- ```bash
73
- # Yes, sync now
74
- viban sync
75
-
76
- # With push-new
77
- viban sync --push-new
78
-
79
- # Pull only
80
- viban sync --pull-only
81
- ```
82
-
83
- ## Step 5: Report Results
84
-
85
- Show the sync summary:
86
- ```
87
- Sync complete:
88
- Pulled: N new/updated cards from remote
89
- Pushed: N cards to remote
90
- Conflicts: N (resolved by: remote wins)
91
- Unchanged: N
92
- ```
93
-
94
- ## Notes
95
-
96
- - **First sync imports all open issues** as backlog cards with `github:N` external IDs
97
- - **Conflicts**: when both sides changed, remote wins by default (with warning)
98
- - **Closed issues**: remote closed issues move viban card to `review` status
99
- - **Done cards**: `viban done` then sync closes the remote issue
100
- - **New local cards** are NOT pushed unless `--push-new` is specified (local-first default)