Thanks for contributing. This repo is a pnpm + Vite+ monorepo. Agents and humans should start with AGENTS.md; architecture detail lives in docs/architecture.md.
Requires Node 22+, pnpm, Git, and the vp CLI from Vite+ (or use pnpm exec vp).
pnpm install # sets core.hooksPath to .vite-hooks/_
pnpm exec vp check
pnpm exec vp run -r test
pnpm exec vp run @learn-by-diff/protocol#pack
pnpm exec vp run learn-by-diff#pack
pnpm --filter website devPress F5 (Run Extension). The prelaunch task runs vp pack --watch, then the Extension Development Host opens sandbox/ in a temporary empty profile. After code changes, reload the Extension Development Host to pick up the rebuilt bundle. LearnByDiff: Open Course prefills packages/courses-config/demo-course/.course-config/course.jsonc.
| Path | Role |
|---|---|
packages/protocol |
LCP types, JSONC parse, validation (@learn-by-diff/protocol) |
apps/vscode-extension |
VS Code extension (learn-by-diff) |
apps/website |
Project site (VitePress, GitHub Pages) |
sandbox/ |
F5 debug workspace (generated files are gitignored) |
skills/, examples/ |
Author skills; committed local demo course/source |
- Prefer Conventional Commits, one logical change per commit.
- After protocol
srcedits, runpnpm exec vp run @learn-by-diff/protocol#packbefore extension tests or F5. - Do not commit secrets. Do not treat
sandbox/**generated state as source of truth—useexamples/. - Match existing naming, imports, and formatting; run
pnpm exec vp check. - Every function / method / named closure needs an idiomatic doc comment stating what it does.
Bump version in apps/vscode-extension/package.json and push that commit. After pnpm install, core.hooksPath is .vite-hooks/_, so .vite-hooks/pre-push creates and pushes annotated tag vX.Y.Z matching that field. You can still push the tag yourself. GitHub Actions then copies root README.md into the extension folder, packages one VSIX, and publishes it to:
- Visual Studio Marketplace (
VSCE_PAT) - Open VSX (
OVSX_PAT)
publisher is RuanJiazhen. Both secrets are required; the job fails if either is missing.
Do not use local vsce publish as the release path. vsce package is fine for a local preview (vscode:prepublish copies the English README then packs).
AGENTS.md— agent/developer entrydocs/architecture.md— runtime model and package boundariesskills/README.md— author skill install/use