Skip to main content

Prerequisites

  • Bun — worker runtime and build tool
  • Node.js 18+ — for npm tooling
  • Git

Build from Source

build-and-sync runs scripts/build-hooks.js (via Bun) which:
  1. Compiles TypeScript hooks → ESM scripts → bundles with esbuild
  2. Bundles worker-service.cjs (~1.7MB)
  3. Bundles vl-cli.cjs (~10KB)
  4. Syncs built artifacts to ~/.claude/plugins/marketplaces/vibelearn/
  5. Restarts the worker

Build Artifacts

Development Workflow

Adding a New Analysis Step

  1. Create src/services/analysis/MyAnalyzer.ts
  2. Add a new route in src/services/worker/http/routes/VibeLearnRoutes.ts
  3. Call it from src/hooks/summarize.ts (the Stop hook dispatcher)
  4. Add any new columns to src/services/sqlite/migrations.ts (increment migration ID)

Adding a New vl CLI Command

Edit src/cli/vl/index.ts. The CLI uses bun:sqlite directly — no HTTP to worker.

Database Migrations

Add migrations to the array in src/services/sqlite/migrations.ts:
Migrations run automatically on worker startup. Never modify existing migration IDs.

Code Style

  • TypeScript strict mode
  • ESM modules throughout (import/export, no require)
  • Hooks: always exit 0 (never block the IDE)
  • Worker errors: log at ERROR level, continue execution
  • Analysis steps: independent — step failure must not block subsequent steps

Testing

VibeLearn uses real-world testing: install the plugin, run coding sessions, check vl quiz. The analysis pipeline is LLM-dependent and not meaningfully unit-testable. For worker endpoint testing:

Publishing

Plugin identity: vibelearn@anergcorp