Thanks for your interest in contributing. This document covers the essentials.
- Node.js >= 20.0.0
- Git
- A local clone of
@git-stunts/git-warp(git-mind depends on it via local path)
git clone https://github.com/neuroglyph/git-mind.git
cd git-mind
npm install
npm test- Create a branch from
main(or the current development branch) - Make your changes
- Run the tests:
npm test - Commit using Conventional Commits:
feat:— new featurefix:— bug fixdocs:— documentation onlychore:— maintenance, toolingrefactor:— code change that neither fixes a bug nor adds a featuretest:— adding or updating tests
- Open a pull request
Follow the conventional commit format:
type(scope): short description
Longer explanation if needed.
Refs #issue-number
Every commit should reference a GitHub issue. If one doesn't exist, create it.
- Plain JavaScript with JSDoc type annotations (no TypeScript)
- ES modules (
import/export) - Format with Prettier:
npm run format - Lint with ESLint:
npm run lint
Tests use vitest. Run them with:
npm test # single run
npm run test:watch # watch modeEach test creates a temporary Git repo in the OS temp directory and cleans up after itself.
bin/git-mind.js — CLI entry point
src/
graph.js — WarpGraph wrapper (init, load, save)
edges.js — Edge CRUD with types + confidence
views.js — Observer view definitions and rendering
hooks.js — Post-commit directive parser
cli/
commands.js — CLI command implementations
format.js — Terminal output formatting
index.js — Public API exports
test/
graph.test.js — Graph lifecycle tests
edges.test.js — Edge CRUD tests
views.test.js — View filtering tests
hooks.test.js — Directive parsing tests
By contributing, you agree that your contributions will be licensed under Apache-2.0.