git clone https://github.com/Reality-Ventures/lockwire.git
cd lockwire
npm install --ignore-scripts --legacy-peer-deps
npm run build
npm test--ignore-scripts skips the native node-gyp-build install step the tree-sitter grammar packages carry for their (unused) native bindings — lockwire only uses their bundled .wasm files via web-tree-sitter, copied into grammars/ by npm run grammars (part of npm run build). --legacy-peer-deps works around an npm dependency-resolution issue with web-tree-sitter's peer declarations; it does not indicate a real conflict.
npm run typecheck
npm run lint
npm run build
npm test
node dist/cli.js check # lockwire checking its own docs — the repo dogfoods itselfCI (.github/workflows/ci.yml) runs all of this on Ubuntu and Windows.
Every push to main publishes to npm. .github/workflows/release.yml builds, tests, and publishes via trusted publishing (OIDC) — no stored token. The version is computed in CI and never committed back: package.json's version is published as-is if npm doesn't have it yet, otherwise the next patch above the highest published X.Y.* (scripts/next-version.mjs). Bump version by hand to start a new minor or major line. Put [skip ci] in a commit message to push without publishing. One-time npmjs.com setup: package Settings → Trusted Publisher → GitHub Actions → org Reality-Ventures, repo lockwire, workflow release.yml.
Changing what lockwire writes. An older lockwire misreads anything it didn't know to expect. A new fingerprint version is already safe: bump FINGERPRINT_VERSION and anchors record it. For any other change an older build would misread (a new tier or target kind), raise READER_LEVEL in src/compat.ts and make requiredLevel return it for the anchors that use it; older builds then leave those anchors alone and tell people to update.
| Path | What |
|---|---|
src/extract.ts |
tree-sitter → tiered symbol extraction (the core mechanism) |
src/actions.ts |
link/check/ack/waive/refs/status/history — the verbs, shared by the CLI, hooks, and MCP server |
src/hook-claude.ts, src/hook-codex.ts |
per-agent hook adapters — thin, fail-open wrappers over src/hook-common.ts |
src/mcp-server.ts |
the MCP tool surface |
src/ledger.ts |
append-only event log, hashing, verification |
test/*.test.ts |
vitest — test/e2e.test.ts is the P0 falsification demo; run it first when touching extract.ts |
- Add its tree-sitter grammar package to
devDependenciesand copy step inscripts/grammars.mjs. - Add it to
LangIdandGRAMMAR_FILEinsrc/grammar.ts, andlangForPath. - Add its declaration node types to
DECLARATION_TYPESinsrc/extract.ts, and its parameter-extraction shape if it differs from the TS/Python ones already there. - Add fixtures to
test/extract.test.tsmirroring the existing TS/Python/TSX cases — at minimum: a body-only edit that shouldn't movesig, and a real signature change that should.
Say what you expected check/link/a hook to do, what it actually did, and — if it's a false positive or false negative — the smallest code+doc pair that reproduces it. A reproducible false positive is the single most valuable kind of issue this project can receive; tiering exists specifically to minimize them, and any that get through are bugs, not expected behavior.
documentation docs-as-code claude-code claude-code-plugin codex mcp mcp-server tree-sitter developer-tools ai-agents context-engineering agents-md documentation-drift