claude-plugin-viban 1.0.30 → 1.0.32
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/bin/viban +55 -6
- package/commands/{task.md → add.md} +1 -1
- package/commands/release.md +99 -0
- package/docs/CLAUDE.md +8 -0
- package/package.json +1 -1
- package/skills/{task → add}/SKILL.md +3 -3
- package/skills/release/SKILL.md +100 -0
package/bin/viban
CHANGED
|
@@ -77,11 +77,15 @@ auto_update_check() {
|
|
|
77
77
|
# Compare and auto-update if newer version available
|
|
78
78
|
if [[ -n "$cached_latest" && "$cached_latest" != "$current" ]]; then
|
|
79
79
|
# Simple semver comparison: split on dots and compare numerically
|
|
80
|
-
local
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
local -a cv lv
|
|
81
|
+
cv=("${(@s/./)current}")
|
|
82
|
+
lv=("${(@s/./)cached_latest}")
|
|
83
|
+
local is_newer=false c l
|
|
83
84
|
for i in 1 2 3; do
|
|
84
|
-
|
|
85
|
+
c=${cv[$i]:-0}; l=${lv[$i]:-0}
|
|
86
|
+
# Strip non-numeric suffixes (e.g. 1-beta -> 1)
|
|
87
|
+
c=${c%%[^0-9]*}; l=${l%%[^0-9]*}
|
|
88
|
+
[[ -z "$c" ]] && c=0; [[ -z "$l" ]] && l=0
|
|
85
89
|
if (( l > c )); then
|
|
86
90
|
is_newer=true
|
|
87
91
|
break
|
|
@@ -156,6 +160,16 @@ VIBAN_JSON="${VIBAN_DATA_DIR}/viban.json"
|
|
|
156
160
|
# Ensure data directory exists
|
|
157
161
|
mkdir -p "$VIBAN_DATA_DIR"
|
|
158
162
|
|
|
163
|
+
# Auto-migrate: .viban/viban.json -> .git/ when git repo is initialized
|
|
164
|
+
if $VIBAN_IS_GIT_REPO; then
|
|
165
|
+
_legacy_json="${PWD}/.viban/viban.json"
|
|
166
|
+
if [[ -f "$_legacy_json" && ! -f "$VIBAN_JSON" ]]; then
|
|
167
|
+
mv "$_legacy_json" "$VIBAN_JSON"
|
|
168
|
+
rmdir "${PWD}/.viban" 2>/dev/null
|
|
169
|
+
echo "✓ Migrated viban data from .viban/ to git directory"
|
|
170
|
+
fi
|
|
171
|
+
fi
|
|
172
|
+
|
|
159
173
|
# ============================================================
|
|
160
174
|
# Initialize viban.json if not exists
|
|
161
175
|
# ============================================================
|
|
@@ -247,7 +261,9 @@ update_term_cache() {
|
|
|
247
261
|
CACHED_TERM_H=$(tput lines 2>/dev/null || echo 30)
|
|
248
262
|
fi
|
|
249
263
|
CACHED_COL_W=$(( (CACHED_TERM_W - 2) / 3 ))
|
|
250
|
-
|
|
264
|
+
local _header_extra=0
|
|
265
|
+
$VIBAN_IS_GIT_REPO || _header_extra=1
|
|
266
|
+
CACHED_MAX_H=$((CACHED_TERM_H - 8 - _header_extra))
|
|
251
267
|
CACHED_MAX_TASKS=$((CACHED_MAX_H / 5))
|
|
252
268
|
(( CACHED_MAX_TASKS < 2 )) && CACHED_MAX_TASKS=2
|
|
253
269
|
(( CACHED_MAX_TASKS > 8 )) && CACHED_MAX_TASKS=8
|
|
@@ -500,7 +516,40 @@ print_center() {
|
|
|
500
516
|
draw_header() {
|
|
501
517
|
printf '\033[K\n'
|
|
502
518
|
print_center "VIBAN" "${A_BOLD}${A_ACCENT}"
|
|
503
|
-
|
|
519
|
+
local _ver repo_name subtitle="Vibe Kanban"
|
|
520
|
+
_ver=$(grep '"version"' "$VIBAN_SCRIPT_DIR/package.json" 2>/dev/null | sed 's/.*: *"\([^"]*\)".*/\1/')
|
|
521
|
+
repo_name=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null)
|
|
522
|
+
[[ -n "$repo_name" ]] && subtitle="Vibe Kanban · $repo_name"
|
|
523
|
+
if [[ -n "$_ver" ]]; then
|
|
524
|
+
subtitle="$subtitle · v$_ver"
|
|
525
|
+
# Check for update availability from cache
|
|
526
|
+
if [[ -f "$_VIBAN_UPDATE_CACHE" ]]; then
|
|
527
|
+
local cached_latest
|
|
528
|
+
cached_latest=$(sed -n '2p' "$_VIBAN_UPDATE_CACHE" 2>/dev/null)
|
|
529
|
+
if [[ -n "$cached_latest" && "$cached_latest" != "$_ver" ]]; then
|
|
530
|
+
local -a cv lv
|
|
531
|
+
cv=("${(@s/./)_ver}")
|
|
532
|
+
lv=("${(@s/./)cached_latest}")
|
|
533
|
+
local _is_newer=false _c _l
|
|
534
|
+
for i in 1 2 3; do
|
|
535
|
+
_c=${cv[$i]:-0}; _l=${lv[$i]:-0}
|
|
536
|
+
_c=${_c%%[^0-9]*}; _l=${_l%%[^0-9]*}
|
|
537
|
+
[[ -z "$_c" ]] && _c=0; [[ -z "$_l" ]] && _l=0
|
|
538
|
+
if (( _l > _c )); then
|
|
539
|
+
_is_newer=true
|
|
540
|
+
break
|
|
541
|
+
elif (( _l < _c )); then
|
|
542
|
+
break
|
|
543
|
+
fi
|
|
544
|
+
done
|
|
545
|
+
$_is_newer && subtitle="$subtitle → v$cached_latest"
|
|
546
|
+
fi
|
|
547
|
+
fi
|
|
548
|
+
fi
|
|
549
|
+
print_center "$subtitle" "${A_DIM}"
|
|
550
|
+
if ! $VIBAN_IS_GIT_REPO; then
|
|
551
|
+
print_center "⚠ Not a git repo · assign/PR unavailable" "${A_DIM}"
|
|
552
|
+
fi
|
|
504
553
|
printf '\033[K\n'
|
|
505
554
|
}
|
|
506
555
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: "Analyze problem and register as viban issue with evidence"
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# /
|
|
5
|
+
# /add - Problem Analysis and Issue Registration
|
|
6
6
|
|
|
7
7
|
Analyze problem situation and register as viban issue with file locations and evidence.
|
|
8
8
|
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Bump version, commit, tag, and push to trigger npm publish"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /release - Release a new version
|
|
6
|
+
|
|
7
|
+
Bump the package version, commit, tag, and push to trigger the automated npm publish workflow.
|
|
8
|
+
|
|
9
|
+
## Execution Steps
|
|
10
|
+
|
|
11
|
+
### Step 1: Pre-flight checks
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Ensure on main branch
|
|
15
|
+
git branch --show-current # must be "main"
|
|
16
|
+
|
|
17
|
+
# Ensure working tree is clean (no uncommitted changes)
|
|
18
|
+
git status --porcelain
|
|
19
|
+
|
|
20
|
+
# Ensure up to date with remote
|
|
21
|
+
git fetch origin main
|
|
22
|
+
git diff origin/main --stat
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If not on main, working tree is dirty, or behind remote: **stop and inform user**.
|
|
26
|
+
|
|
27
|
+
### Step 2: Determine version bump
|
|
28
|
+
|
|
29
|
+
Read current version from `package.json`:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
grep '"version"' package.json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Ask user with AskUserQuestion:
|
|
36
|
+
- header: "Version"
|
|
37
|
+
- question: "Current version is {current}. What kind of bump?"
|
|
38
|
+
- options:
|
|
39
|
+
- "patch" (x.y.Z) - bug fixes, small changes
|
|
40
|
+
- "minor" (x.Y.0) - new features, backward compatible
|
|
41
|
+
- "major" (X.0.0) - breaking changes
|
|
42
|
+
- multiSelect: false
|
|
43
|
+
|
|
44
|
+
Calculate the new version based on selection.
|
|
45
|
+
|
|
46
|
+
### Step 3: Show changelog preview
|
|
47
|
+
|
|
48
|
+
Show commits since last tag:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
git log $(git describe --tags --abbrev=0)..HEAD --oneline
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Display to user for confirmation before proceeding.
|
|
55
|
+
|
|
56
|
+
### Step 4: Run tests
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
zsh tests/run_all.zsh
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If tests fail: **stop and inform user**. Do not release with failing tests.
|
|
63
|
+
|
|
64
|
+
### Step 5: Bump version and release
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Update package.json version
|
|
68
|
+
# (use jq or sed to update the version field)
|
|
69
|
+
|
|
70
|
+
# Commit
|
|
71
|
+
git add package.json
|
|
72
|
+
git commit -m "{new_version}"
|
|
73
|
+
|
|
74
|
+
# Tag
|
|
75
|
+
git tag v{new_version}
|
|
76
|
+
|
|
77
|
+
# Push with tags
|
|
78
|
+
git push origin main --tags
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Step 6: Confirm
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
╭──────────────────────────────────────╮
|
|
85
|
+
│ Released v{new_version}! │
|
|
86
|
+
╰──────────────────────────────────────╯
|
|
87
|
+
|
|
88
|
+
- npm publish: triggered via GitHub Actions
|
|
89
|
+
- GitHub Release: auto-generated with release notes
|
|
90
|
+
|
|
91
|
+
Check: https://github.com/happy-nut/claude-plugin-viban/actions
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Error Handling
|
|
95
|
+
|
|
96
|
+
- **Not on main**: "Switch to main branch first"
|
|
97
|
+
- **Dirty working tree**: "Commit or stash changes first"
|
|
98
|
+
- **Tests failing**: "Fix failing tests before release"
|
|
99
|
+
- **Push failed**: "Check remote access and try again"
|
package/docs/CLAUDE.md
CHANGED
|
@@ -29,6 +29,14 @@ EOF
|
|
|
29
29
|
- 스피너 있을 때/없을 때 둘 다 확인
|
|
30
30
|
- 한글 포함 제목 truncation
|
|
31
31
|
|
|
32
|
+
## Release Rules
|
|
33
|
+
|
|
34
|
+
**릴리즈는 사용자가 명시적으로 요청할 때만 수행한다.**
|
|
35
|
+
|
|
36
|
+
- 버전 범프, git tag, git push --tags 를 자동으로 하지 않는다
|
|
37
|
+
- 사용자가 `/viban:release` 또는 "릴리즈 해줘" 라고 할 때만 수행
|
|
38
|
+
- 커밋은 자유롭게 하되, 릴리즈(버전 범프 + 태그 + 푸시)는 반드시 사용자 승인 후
|
|
39
|
+
|
|
32
40
|
## Workflow Rules
|
|
33
41
|
|
|
34
42
|
### 🔴 Worktree 사용 금지
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: add
|
|
3
3
|
description: "Analyze problem and register as viban issue with evidence"
|
|
4
4
|
enter_plan_mode: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# /
|
|
7
|
+
# /add - Problem Analysis and Issue Registration
|
|
8
8
|
|
|
9
9
|
Analyze problem situation and register as viban issue with file locations and evidence.
|
|
10
10
|
|
|
@@ -183,7 +183,7 @@ Next steps:
|
|
|
183
183
|
|
|
184
184
|
## Example Interview Flow
|
|
185
185
|
|
|
186
|
-
**User runs**: `/viban:
|
|
186
|
+
**User runs**: `/viban:add`
|
|
187
187
|
|
|
188
188
|
**Agent**: (AskUserQuestion)
|
|
189
189
|
```
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release
|
|
3
|
+
description: "Bump version, commit, tag, and push to trigger npm publish"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /release - Release a new version
|
|
7
|
+
|
|
8
|
+
Bump the package version, commit, tag, and push to trigger the automated npm publish workflow.
|
|
9
|
+
|
|
10
|
+
## Execution Steps
|
|
11
|
+
|
|
12
|
+
### Step 1: Pre-flight checks
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Ensure on main branch
|
|
16
|
+
git branch --show-current # must be "main"
|
|
17
|
+
|
|
18
|
+
# Ensure working tree is clean (no uncommitted changes)
|
|
19
|
+
git status --porcelain
|
|
20
|
+
|
|
21
|
+
# Ensure up to date with remote
|
|
22
|
+
git fetch origin main
|
|
23
|
+
git diff origin/main --stat
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If not on main, working tree is dirty, or behind remote: **stop and inform user**.
|
|
27
|
+
|
|
28
|
+
### Step 2: Determine version bump
|
|
29
|
+
|
|
30
|
+
Read current version from `package.json`:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
grep '"version"' package.json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Ask user with AskUserQuestion:
|
|
37
|
+
- header: "Version"
|
|
38
|
+
- question: "Current version is {current}. What kind of bump?"
|
|
39
|
+
- options:
|
|
40
|
+
- "patch" (x.y.Z) - bug fixes, small changes
|
|
41
|
+
- "minor" (x.Y.0) - new features, backward compatible
|
|
42
|
+
- "major" (X.0.0) - breaking changes
|
|
43
|
+
- multiSelect: false
|
|
44
|
+
|
|
45
|
+
Calculate the new version based on selection.
|
|
46
|
+
|
|
47
|
+
### Step 3: Show changelog preview
|
|
48
|
+
|
|
49
|
+
Show commits since last tag:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
git log $(git describe --tags --abbrev=0)..HEAD --oneline
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Display to user for confirmation before proceeding.
|
|
56
|
+
|
|
57
|
+
### Step 4: Run tests
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
zsh tests/run_all.zsh
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
If tests fail: **stop and inform user**. Do not release with failing tests.
|
|
64
|
+
|
|
65
|
+
### Step 5: Bump version and release
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Update package.json version
|
|
69
|
+
# (use jq or sed to update the version field)
|
|
70
|
+
|
|
71
|
+
# Commit
|
|
72
|
+
git add package.json
|
|
73
|
+
git commit -m "{new_version}"
|
|
74
|
+
|
|
75
|
+
# Tag
|
|
76
|
+
git tag v{new_version}
|
|
77
|
+
|
|
78
|
+
# Push with tags
|
|
79
|
+
git push origin main --tags
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Step 6: Confirm
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
╭──────────────────────────────────────╮
|
|
86
|
+
│ Released v{new_version}! │
|
|
87
|
+
╰──────────────────────────────────────╯
|
|
88
|
+
|
|
89
|
+
- npm publish: triggered via GitHub Actions
|
|
90
|
+
- GitHub Release: auto-generated with release notes
|
|
91
|
+
|
|
92
|
+
Check: https://github.com/happy-nut/claude-plugin-viban/actions
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Error Handling
|
|
96
|
+
|
|
97
|
+
- **Not on main**: "Switch to main branch first"
|
|
98
|
+
- **Dirty working tree**: "Commit or stash changes first"
|
|
99
|
+
- **Tests failing**: "Fix failing tests before release"
|
|
100
|
+
- **Push failed**: "Check remote access and try again"
|