Plan: Refactor Python Scripts to TypeScript CLI (vibx)
Context
The vibereq plugin currently uses 4 Python scripts for checkpoint/intent management and PR reviews. These scripts are referenced by skills in .claude/skills/. Converting to a compiled TypeScript CLI (vibx) will:
Eliminate Python dependency
Enable single-binary distribution via bun build --compile
Establish bun monorepo structure for future apps
Scope
Python Scripts to Convert
plugins/vibereq/scripts/get-checkpoint-folders.py - Base git operations
plugins/vibereq/scripts/intent.py - Claude CLI transcript analysis
transcript.test.ts - Test JSONL parsing, conversation filtering
Command tests with mocked dependencies
Integration Test
Run locally:
bash
cd apps/cli
bun run build
./dist/vibx get-checkpoint-folders
./dist/vibx get-intents
./dist/vibx run-review vibereq:code-review --dry-run
Verification
Run bun install at root
Run bun run build in apps/cli
Execute ./dist/vibx get-checkpoint-folders - should match Python output
Execute ./dist/vibx get-intents - should produce same intent output
Run bun test - all tests pass
Verify skills work: /code-review should use vibx
If you need specific details from before exiting plan mode (like exact code snippets, error messages, or content you generated), read the full transcript at: /Users/wdp/.claude/projects/-Users-wdp-git-dipasqualew-vibereq-vibx-app/e49c1ee2-f8fe-43d2-b65c-ccc1e399d61f.jsonl
Assistant
I'll implement this plan to refactor the Python scripts to a TypeScript CLI. Let me start by reading the existing Python scripts to understand their current functionality.
Assistant
Let me also read the skill files that need to be updated and check if there's an existing package.json at the root.
Assistant
Now I understand the full scope. Let me create the task list and start implementing.
Assistant
Let me update the tsconfig to properly reference bun types.
Execute ./dist/vibx get-checkpoint-folders - should match Python output
Execute ./dist/vibx get-intents - should produce same intent output
Run bun test - all tests pass
Verify skills work: /code-review should use vibx
If you need specific details from before exiting plan mode (like exact code snippets, error messages, or content you generated), read the full transcript at: /Users/wdp/.claude/projects/-Users-wdp-git-dipasqualew-vibereq-vibx-app/e49c1ee2-f8fe-43d2-b65c-ccc1e399d61f.jsonl
User
Testing Strategy
Unit Tests (vitest)
git.test.ts - Mock subprocess, test parsing logic
transcript.test.ts - Test JSONL parsing, conversation filtering
Command tests with mocked dependencies
Integration Test
Run locally:
bash
cd apps/cli
bun run build
./dist/vibx get-checkpoint-folders
./dist/vibx get-intents
./dist/vibx run-review vibereq:code-review --dry-run
Commands:
bun get-checkpoint-folders Get checkpoint folders from commits not in main
bun get-intents Get or generate intent files for checkpoints
bun intent Extract intent from checkpoint transcripts
bun run-review Run a reviewer skill and post findings to GitHub P
R
I think compile messes up the $0? Hardcode "vibx" or use "filename"?
Add a symlink script - builds, and then if the branch is main, symlinks to ~/.local/bin/vibx; if it is not main, symlinks to ~/.local/bin/vibx-dev
Assistant
Good catches. Let me fix both issues.
Assistant
Fixed both issues:
Added .scriptName("vibx") to yargs - help now shows vibx instead of bun
Added symlink script at apps/cli/scripts/symlink.sh:
Builds the CLI
On main branch → symlinks to ~/.local/bin/vibx
On other branches → symlinks to ~/.local/bin/vibx-dev
bash
# From workspace root or apps/cli
bun run symlink
User
$ vibx-dev run-review "code-review"
Running reviewer 'code-review' for PR #2...
Running command: claude -p /code-review ci --output-format json
Return code: 0
Stdout length: 625
Stderr: (empty)
Could not extract JSON from reviewer output
Output:
❯ /code-review ci
⎿ Error: Bash command permission check failed for pattern "!vibx get-intents": This
command requires approval
Assistant
The skill needs permission to run vibx. Let me add it to the allowed-tools.
Assistant
Let me also update the create-reviewer template so new reviewers include the vibx permission.
Assistant
Added Bash(vibx *) to:
.claude/skills/code-review/SKILL.md - direct fix
.claude/skills/create-reviewer/SKILL.md - updated the inference table for Code Review focus