claude-plugin-viban 1.0.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.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: assign
3
+ description: "Assign and resolve first backlog issue from viban board"
4
+ ---
5
+
6
+ # /assign
7
+
8
+ Invokes the `viban:assign` skill to handle the complete workflow:
9
+ - Assign first backlog issue
10
+ - Analyze and resolve
11
+ - Create PR
12
+ - Move to review status
13
+
14
+ Usage: `/assign`
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: todo
3
+ description: "Analyze problem and register as viban issue"
4
+ ---
5
+
6
+ # /todo
7
+
8
+ Invokes the `viban:todo` skill to:
9
+ - Analyze problem situation
10
+ - Search codebase for evidence
11
+ - Register issue with proper priority and type
12
+
13
+ Usage:
14
+ - `/todo` (will prompt for details)
15
+ - `/todo "Charts not showing on results page"`
package/docs/CLAUDE.md ADDED
@@ -0,0 +1,245 @@
1
+ # viban - Kanban TUI Tool
2
+
3
+ Kanban board TUI tool written in zsh.
4
+
5
+ ## 필수 검증
6
+
7
+ ### 레이아웃 검증 (수정 후 필수)
8
+ **커밋 전 반드시 스크립트로 검증** - 추측 금지
9
+
10
+ ```bash
11
+ # 카드 렌더링 검증 스크립트 실행
12
+ zsh << 'EOF'
13
+ source .claude/viban/viban 2>/dev/null || true
14
+ col_w=38; card_inner=$((col_w - 4))
15
+ # 테스트: 한글 포함 긴 제목으로 truncate 및 박스 정렬 확인
16
+ title="feat(shared): BacktestEngine 통합 및 추상화"
17
+ spinner_w=2; title_w=$((card_inner - 7 - spinner_w))
18
+ short=$(truncate_str "$title" $title_w)
19
+ content=" / #5 $short"
20
+ content_w=$(str_width "$content")
21
+ pad=$((card_inner - content_w))
22
+ border=$(gen_border $card_inner)
23
+ printf "╭%s╮\n│%s%${pad}s│\n╰%s╯\n" "$border" "$content" "" "$border"
24
+ EOF
25
+ ```
26
+
27
+ **검증 항목:**
28
+ - 박스 테두리(╭╮╰╯│) 정렬
29
+ - 스피너 있을 때/없을 때 둘 다 확인
30
+ - 한글 포함 제목 truncation
31
+
32
+ ## Workflow Rules
33
+
34
+ ### 🔴 Worktree 사용 금지
35
+ - **main repo에서 feature branch로 직접 작업**
36
+ - worktree 생성/사용 금지 (사용자 명시적 요청)
37
+ - 브랜치 네이밍: `viban-{ISSUE_ID}` (예: `viban-78`)
38
+
39
+ ### Branch-Based Workflow
40
+ ```bash
41
+ # 1. main에서 분기
42
+ git checkout main && git pull
43
+ git checkout -b viban-{ISSUE_ID}
44
+
45
+ # 2. 작업 후 push
46
+ git push -u origin viban-{ISSUE_ID}
47
+
48
+ # 3. PR 생성
49
+ gh pr create --title "..." --body "..."
50
+ ```
51
+
52
+ ### Base Branch Sync
53
+ - Before branch creation: `git fetch origin main`
54
+ - Before PR push: `git fetch origin main && git rebase origin/main`
55
+ - Resolve conflicts if any before pushing
56
+
57
+ ## Shell Script Rules
58
+
59
+ ### JSON Handling (Critical)
60
+
61
+ **Use `printf '%s'` when piping shell variables to jq**
62
+
63
+ ```bash
64
+ # BAD: echo interprets escape sequences (\n, \t) → JSON corruption
65
+ local title=$(echo "$issue" | jq -r '.title')
66
+
67
+ # GOOD: printf passes data as-is
68
+ local title=$(printf '%s' "$issue" | jq -r '.title')
69
+ ```
70
+
71
+ Violating this rule causes jq parse errors on issues with newlines/tabs in description.
72
+
73
+ ### Locale Handling (zsh-specific)
74
+
75
+ **`LC_ALL=C var=val` persists in zsh (unlike bash)**
76
+
77
+ ```bash
78
+ # BAD: LC_ALL=C persists after this line, breaks subsequent ${#str}
79
+ LC_ALL=C byte_count=${#str}
80
+
81
+ # GOOD: Restore locale after use
82
+ LC_ALL=C byte_count=${#str}
83
+ unset LC_ALL
84
+ ```
85
+
86
+ - 서브셸 `$(...)` 호출은 부모에 영향 없음
87
+ - 직접 호출 함수에서만 `unset LC_ALL` 필요
88
+
89
+ ### ANSI Color in printf
90
+
91
+ **ANSI 코드는 format string 안에 넣어야 함**
92
+
93
+ ```bash
94
+ # BAD: %s는 이스케이프 시퀀스를 해석하지 않음 → raw \033[2m 출력
95
+ printf "%s" "${A_DIM}text${A_RESET}"
96
+
97
+ # GOOD: format string에 직접 포함
98
+ printf "${A_DIM}%s${A_RESET}" "text"
99
+ ```
100
+
101
+ ### Terminal State for External Commands
102
+
103
+ **외부 명령(에디터, gum 등) 호출 전 터미널 상태 복원**
104
+
105
+ ```bash
106
+ # stty -echo 상태에서 에디터 열면 입력 불가
107
+ stty echo 2>/dev/null # 복원
108
+ $EDITOR "$file"
109
+ stty -echo 2>/dev/null # 다시 비활성화
110
+ ```
111
+
112
+ ## Claude Code Integration
113
+
114
+ ### Skills
115
+
116
+ The viban plugin provides two skills for automated issue management:
117
+
118
+ #### `/viban:assign`
119
+
120
+ Assigns the top backlog issue to the current session and executes the full resolution workflow:
121
+
122
+ 1. Fetches the highest priority backlog issue
123
+ 2. Assigns it to the current session
124
+ 3. Analyzes the issue and executes the fix
125
+ 4. Marks the issue as review/done upon completion
126
+
127
+ **Usage:**
128
+ ```
129
+ /viban:assign
130
+ ```
131
+
132
+ **When to use:**
133
+ - When you want Claude to autonomously pick and solve the next issue
134
+ - For continuous workflow in parallel sessions
135
+ - When issues are pre-prioritized in the backlog
136
+
137
+ #### `/viban:todo`
138
+
139
+ Analyzes a problem situation and creates a new viban issue with proper structure:
140
+
141
+ 1. Analyzes the user's description
142
+ 2. Creates a structured issue with:
143
+ - Clear, concise title (Korean)
144
+ - Detailed description with symptoms, root cause, and expected behavior
145
+ - Appropriate priority (P0-P3)
146
+ - Type tag (bug/feat/chore/etc)
147
+
148
+ **Usage:**
149
+ ```
150
+ /viban:todo
151
+ ```
152
+
153
+ Then describe the problem when prompted.
154
+
155
+ **When to use:**
156
+ - When you encounter a bug or want to track a new feature
157
+ - To convert free-form problem descriptions into structured issues
158
+ - Before starting work on a new problem
159
+
160
+ ### CLI Commands
161
+
162
+ All CLI commands are available via the `viban` binary:
163
+
164
+ ```bash
165
+ viban list # Display kanban board
166
+ viban add "Title" "Desc" P2 feat # Create issue
167
+ viban assign [session] # Assign top backlog issue
168
+ viban review [id] # Move issue to review
169
+ viban done <id> # Mark issue as done
170
+ viban get <id> # Get issue details (JSON)
171
+ viban help # Show help
172
+ ```
173
+
174
+ ### Data Location
175
+
176
+ Issues are stored in `viban.json` at the git common directory:
177
+
178
+ ```bash
179
+ # Find viban.json
180
+ git rev-parse --git-common-dir
181
+ # → .git/viban.json (or ../../.git/viban.json in worktrees)
182
+ ```
183
+
184
+ **Custom location:**
185
+ ```bash
186
+ export VIBAN_DATA_DIR="/path/to/data"
187
+ ```
188
+
189
+ ### Issue Status Flow
190
+
191
+ ```
192
+ backlog → in_progress → review → done
193
+ ↑ ↑
194
+ (assign) (complete)
195
+ ```
196
+
197
+ ### Parallel Sessions
198
+
199
+ Multiple Claude sessions can work in parallel:
200
+
201
+ 1. Each session calls `/viban:assign`
202
+ 2. Session ID is stored in `assigned_to`
203
+ 3. Other sessions skip assigned issues
204
+ 4. Completion moves issue to review/done
205
+
206
+ ### Issue Structure
207
+
208
+ ```json
209
+ {
210
+ "version": 1,
211
+ "issues": [
212
+ {
213
+ "id": 1,
214
+ "title": "Issue title",
215
+ "description": "Detailed description",
216
+ "status": "backlog|in_progress|review|done",
217
+ "priority": "P0|P1|P2|P3",
218
+ "type": "bug|feat|chore|refactor|docs",
219
+ "assigned_to": null | "session-id",
220
+ "created_at": "2025-01-23T10:00:00Z",
221
+ "updated_at": "2025-01-23T10:00:00Z"
222
+ }
223
+ ]
224
+ }
225
+ ```
226
+
227
+ ### Priority Levels
228
+
229
+ | Priority | Meaning |
230
+ |----------|---------|
231
+ | P0 | Critical - blocks all work |
232
+ | P1 | High - must do soon |
233
+ | P2 | Medium - normal priority |
234
+ | P3 | Low - nice to have |
235
+
236
+ ### Type Tags
237
+
238
+ | Type | Use Case |
239
+ |------|----------|
240
+ | bug | Fixing broken functionality |
241
+ | feat | New feature or enhancement |
242
+ | refactor | Code restructuring |
243
+ | chore | Maintenance tasks |
244
+ | docs | Documentation updates |
245
+ | test | Test additions/fixes |
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "claude-plugin-viban",
3
+ "version": "1.0.0",
4
+ "description": "Terminal Kanban TUI for AI-human collaborative issue tracking",
5
+ "main": "bin/viban",
6
+ "bin": {
7
+ "viban": "./bin/viban"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "scripts/",
12
+ "skills/",
13
+ "commands/",
14
+ "docs/",
15
+ ".claude-plugin/",
16
+ "LICENSE",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "postinstall": "bash scripts/check-deps.sh || true",
21
+ "test": "bash scripts/check-deps.sh && ./bin/viban help"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/happy-nut/claude-plugin-viban.git"
26
+ },
27
+ "author": {
28
+ "name": "happy-nut",
29
+ "url": "https://github.com/happy-nut"
30
+ },
31
+ "license": "MIT",
32
+ "bugs": {
33
+ "url": "https://github.com/happy-nut/claude-plugin-viban/issues"
34
+ },
35
+ "homepage": "https://github.com/happy-nut/claude-plugin-viban#readme",
36
+ "keywords": [
37
+ "claude-code",
38
+ "plugin",
39
+ "kanban",
40
+ "tui",
41
+ "issue-tracking",
42
+ "viban",
43
+ "terminal",
44
+ "cli",
45
+ "ai-tools"
46
+ ],
47
+ "engines": {
48
+ "node": ">=14.0.0"
49
+ },
50
+ "os": [
51
+ "darwin",
52
+ "linux"
53
+ ],
54
+ "preferGlobal": true
55
+ }
@@ -0,0 +1,45 @@
1
+ #!/bin/bash
2
+ # viban dependency checker
3
+
4
+ set -e
5
+
6
+ RED='\033[0;31m'
7
+ GREEN='\033[0;32m'
8
+ YELLOW='\033[0;33m'
9
+ NC='\033[0m'
10
+
11
+ echo "Checking viban dependencies..."
12
+ echo ""
13
+
14
+ missing=0
15
+
16
+ check_dep() {
17
+ local name="$1"
18
+ local install_macos="$2"
19
+ local install_linux="$3"
20
+
21
+ if command -v "$name" &> /dev/null; then
22
+ echo -e " ${GREEN}✓${NC} $name"
23
+ return 0
24
+ else
25
+ echo -e " ${RED}✗${NC} $name not found"
26
+ if [[ "$OSTYPE" == "darwin"* ]]; then
27
+ echo -e " Install: ${YELLOW}$install_macos${NC}"
28
+ else
29
+ echo -e " Install: ${YELLOW}$install_linux${NC}"
30
+ fi
31
+ missing=1
32
+ return 1
33
+ fi
34
+ }
35
+
36
+ check_dep "gum" "brew install gum" "See https://github.com/charmbracelet/gum#installation"
37
+ check_dep "jq" "brew install jq" "apt install jq"
38
+
39
+ echo ""
40
+ if [[ $missing -eq 1 ]]; then
41
+ echo -e "${YELLOW}Please install missing dependencies for full functionality.${NC}"
42
+ exit 0 # Don't fail npm install
43
+ fi
44
+
45
+ echo -e "${GREEN}All dependencies installed!${NC}"
@@ -0,0 +1,203 @@
1
+ ---
2
+ name: viban:assign
3
+ description: "Assign and resolve the first backlog issue from viban board through to PR completion. Reads project CLAUDE.md for workflow."
4
+ category: debugging
5
+ complexity: advanced
6
+ mcp-servers: [serena]
7
+ personas: []
8
+ ---
9
+
10
+ # /viban:assign
11
+
12
+ Workflow: First backlog issue → Resolve → PR completion
13
+
14
+ > **⛔ No direct `viban.json` access** — CLI only
15
+ > **🔴 No Worktree** — Work directly on branch in main repo
16
+ > **📋 Workflow**: Read CLAUDE.md first, follow project workflow if exists
17
+
18
+ ---
19
+
20
+ ## Phase 0: CONTEXT & SETUP
21
+
22
+ ### 0.1 Read Project Workflow (CRITICAL)
23
+
24
+ **Before any work, read the project's CLAUDE.md:**
25
+
26
+ ```bash
27
+ # Check for CLAUDE.md at common locations
28
+ for path in "./CLAUDE.md" "./.claude/CLAUDE.md" "../CLAUDE.md"; do
29
+ [ -f "$path" ] && cat "$path"
30
+ done
31
+ ```
32
+
33
+ **Look for:**
34
+ - `Issue Resolution Workflow` section
35
+ - `Workflow` or `Development Process` section
36
+ - Specific steps like `ultrawork`, `code-simplifier`, `code-review`
37
+ - Testing requirements (`pytest`, manual verification, etc.)
38
+
39
+ **IMPORTANT:**
40
+ - If project has a defined workflow → **MUST follow it exactly**
41
+ - If no workflow found → Use default workflow (Phase 1 below)
42
+
43
+ ### 0.2 Git Setup
44
+
45
+ ```bash
46
+ # 1. Check for uncommitted changes
47
+ if [ -n "$(git status --porcelain)" ]; then
48
+ echo "⚠️ Uncommitted changes detected"
49
+ # → Ask user whether to commit (use AskUserQuestion)
50
+ fi
51
+
52
+ # 2. Switch to main branch and sync
53
+ git checkout main
54
+ git fetch origin main
55
+ git reset --hard origin/main
56
+
57
+ # 3. Assign issue (state change only, no worktree)
58
+ ISSUE_ID=$(viban assign 2>&1 | tail -1)
59
+ if [ -z "$ISSUE_ID" ] || [ "$ISSUE_ID" = "No backlog" ]; then
60
+ echo "⚠️ No issues in backlog"
61
+ exit 0
62
+ fi
63
+
64
+ # 4. Create new branch
65
+ git checkout -b viban-$ISSUE_ID
66
+ ```
67
+
68
+ **If backlog is empty**: Notify user and exit
69
+
70
+ ---
71
+
72
+ ## Phase 1: ANALYZE → VERIFY
73
+
74
+ ```bash
75
+ viban get $ISSUE_ID
76
+ ```
77
+
78
+ ### If Project Workflow Exists (from CLAUDE.md):
79
+
80
+ **Follow the project's exact steps.** Common patterns include:
81
+
82
+ 1. Root cause analysis (5 Whys)
83
+ 2. Context verification (ask if unclear)
84
+ 3. Implementation & verification strategy
85
+ 4. Code implementation (`/ultrawork` for 2+ files)
86
+ 5. **Manual verification** (browser/API, NOT pytest)
87
+ 6. Code simplification (`/code-simplifier`)
88
+ 7. Code review (`/code-review`)
89
+
90
+ ### Default Workflow (if no project workflow):
91
+
92
+ 1. **Understand**: Read the issue, understand the problem
93
+ 2. **Locate**: Find relevant code files
94
+ 3. **Analyze**: Determine root cause
95
+ 4. **Implement**: Make minimal, focused changes
96
+ 5. **Verify**: Test the fix works (appropriate method for the project)
97
+ 6. **Review**: Self-review changes for quality
98
+
99
+ ---
100
+
101
+ ## Phase 2: SHIP
102
+
103
+ ### 2.1 Rebase
104
+
105
+ ```bash
106
+ git fetch origin main
107
+ git rebase origin/main
108
+ # On conflict: resolve → git add → git rebase --continue
109
+ ```
110
+
111
+ ### 2.2 Commit & Push
112
+
113
+ ```bash
114
+ git add -A
115
+ git commit -m "fix: issue title summary
116
+
117
+ - Root cause: ...
118
+ - Solution: ...
119
+
120
+ Resolves: viban-$ISSUE_ID"
121
+
122
+ git push -u origin viban-$ISSUE_ID
123
+ ```
124
+
125
+ ### 2.3 Create PR
126
+
127
+ ```bash
128
+ EXISTING_PR=$(gh pr list --head viban-$ISSUE_ID --json number -q '.[0].number')
129
+ [ -z "$EXISTING_PR" ] && gh pr create \
130
+ --title "viban-$ISSUE_ID: title" \
131
+ --body "## Changes
132
+ - ...
133
+
134
+ ## Testing
135
+ - [ ] Tests passing (if applicable)
136
+ - [ ] Manual verification (if applicable)" \
137
+ --base main
138
+ ```
139
+
140
+ ### 2.4 Issue → review
141
+
142
+ ```bash
143
+ viban review $ISSUE_ID
144
+ ```
145
+
146
+ ---
147
+
148
+ ## Phase 3: HANDOFF
149
+
150
+ ```
151
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
152
+ 📋 Human Review Required
153
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
154
+
155
+ Issue #$ISSUE_ID → review status
156
+
157
+ 🔗 PR: gh pr view viban-$ISSUE_ID --web
158
+
159
+ ✅ Verification complete:
160
+ - Project workflow followed
161
+ - Changes tested appropriately
162
+ - Code reviewed
163
+
164
+ 📌 After approval: Delete issue from viban TUI
165
+
166
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
167
+ ```
168
+
169
+ ---
170
+
171
+ ## Phase 4: REFLECT (if available)
172
+
173
+ > **Optional**: Run `/self-reflect` if project has this skill
174
+
175
+ ```
176
+ /self-reflect
177
+ ```
178
+
179
+ ---
180
+
181
+ ## Checklist
182
+
183
+ ```
184
+ [ ] Read CLAUDE.md for project workflow
185
+ [ ] Working on viban-$ISSUE_ID branch
186
+ [ ] Project workflow steps completed (or default if none)
187
+ [ ] Rebase complete
188
+ [ ] PR pushed
189
+ [ ] viban review executed
190
+ [ ] Self-reflection done (if available)
191
+ ```
192
+
193
+ ---
194
+
195
+ ## CLI Reference
196
+
197
+ | Command | Description |
198
+ |---------|-------------|
199
+ | `viban` | Open TUI |
200
+ | `viban list` | Print board |
201
+ | `viban assign [session]` | Assign issue |
202
+ | `viban get <id>` | View issue |
203
+ | `viban review <id>` | Move to review |