Contributing to pi-vault-mind¶
Thank you for considering a contribution! This guide covers setup, testing, and how to submit changes.
Development setup¶
Prerequisites¶
- Node.js 20.6+ (matches the
engines.nodefield inpackage.json) - pnpm 8+ (or npm 10+ — pnpm is used in CI)
- No external binaries —
pi-vault-mindis fully self-contained. Embeddings run via@xenova/transformers(downloaded on first use) or Ollama (if you choose theollamaprovider). No external binary on PATH.
Project structure¶
src/ ← TypeScript source for the extension
index.ts ← main extension entry point
commands.ts ← /wiki command tree
tools.ts ← LLM-callable tools (wiki_search, append_wiki, etc.)
watcher.ts ← passive file-watcher for @agent markers
events.ts ← before_agent_start + turn_end hooks
lance.ts ← LanceDB + embedding integration
graph.ts ← entity-relation graph
settings-ui.ts ← interactive TUI wizards
state.ts ← module state (active collection, etc.)
types.ts ← TypeScript types + DEFAULT_CONFIG
skills/ ← Agent Skills standard skills
vault-mind/SKILL.md ← root skill (the Manager)
vault-mind-miner/SKILL.md ← research/ingestion
vault-mind-broadcaster/SKILL.md ← NotebookLM artifacts
vault-mind-heavy-lifter/SKILL.md ← external delegation
vault-mind-manager/SKILL.md ← manager persona
vault-mind-setup/SKILL.md ← setup wizard triggers
docs/ ← MkDocs documentation site
mkdocs.yml ← site build config
.github/workflows/ ← CI (build, test, docs deploy)
Workflow¶
- Fork and branch — create a feature branch from
main - Write code — TypeScript, strict mode preferred
- Check —
pnpm check(runsbiome check --write . && tsc --noEmit) - Test —
pnpm test(runs the Node.js test suite) - Commit — follow Conventional Commits
(the pre-commit hook runs
biome check --write . && tsc --noEmitautomatically) - PR — describe what changed and why
Testing¶
Tests cover module exports, config loading, watcher file scanning, marker grouping, dispatch ID generation, and status reporting.
For manual end-to-end verification, see the End-to-End Manual Test procedure and the Automated Tests Checklist.
Code style¶
- Prefer
const/let, nevervar - Use
===and!== - Prefer async/await over callbacks
- Prefix internal functions with underscore or keep them module-private
- Comments in
/* ── Section ── */style for major blocks - Biome handles formatting (see
biome.json)
Commit message format¶
| Type | Use for |
|---|---|
feat |
New tool, command, config option |
fix |
Bug fix |
docs |
README, skill, reference changes |
test |
Adding or fixing tests |
chore |
Build, dependencies, tooling |
refactor |
Code change that is neither feat nor fix |
Feature requests and bugs¶
Open an issue first. For bugs, include:
- pi version (
pi --version) - Node version (
node -v) - Steps to reproduce
- Expected vs actual behavior
- Config file (redacted as needed)
License¶
By contributing, you agree that your contributions will be licensed under the same license as the project.