Thanks for wanting to contribute. This project accepts issues, bug reports, and pull requests via GitHub at https://github.com/QuentinCody/interlinked-cli.
git clone https://github.com/QuentinCody/interlinked-cli.git
cd interlinked-cli
npm install
npm run build
npm testRequirements:
- Node.js 22 or newer (
engines.node: ">=22.0.0") npm(orpnpm/yarn— the project is npm-first but the source tree is package-manager-agnostic)
Two modes:
# Dev mode — runs source directly via `tsx` (no build needed)
npm run dev -- <command>
# Built mode — uses dist/
npm run build && node dist/index.js <command>A lot of this codebase is the local harness server (src/harness/) —
it evaluates agent hook events, runs 77 built-in guard rules, performs
quality + structural checks post-edit, and coordinates file reservations.
Understanding the harness is easiest by reading, in order:
docs/architecture.md— high-level overviewdocs/harness.md— harness architecture + lifecycledocs/generated/guard-rules.md— auto-generated catalog of all 77 rulesdocs/generated/quality-checks.md— post-edit check catalogdocs/generated/structural-checks.md— structural-analysis catalog
Regenerate the docs/generated/*.md files anytime with npm run docs.
npm test # full suite via vitest
npm run test:watch # watch mode
npx vitest run path/to/specific.test.ts # single fileAll new code should ship with tests. The harness itself enforces a
files_without_test rule — CI won't go green with unreferenced source.
Two scripts:
npm run typecheck # fast path via tsgo (Go-native preview)
npm run typecheck:stable # tsc --noEmit (always available)The prepublishOnly gate uses typecheck:stable so publishes don't depend
on the optional @typescript/native-preview being resolvable.
- Biome for formatting + linting:
npx biome check --write . - TypeScript strict mode throughout; no
anywithout a type guard - ESM-only —
"type": "module"in package.json, use.jsextensions in relative imports per the ESM spec - No default exports except at CLI entry points — default exports are grep-hostile
Conventional commits, matching the pattern in git log:
feat(scope): …— new featurefix(scope): …— bug fixrefactor(scope): …— code restructure, no behavior changetest(scope): …— tests onlydocs(scope): …— documentationchore: …— build/tooling/dependency updatesci: …— CI/CD changes
Before opening a PR:
- Run
npm run typecheck:stable— must be clean - Run
npm test— must pass - Run
npx biome check .— must be clean - If you touched hook-related code: run the CLI locally and exercise the
affected command with
npm run dev -- <cmd>
Describe in the PR body:
- What changed and why
- What you tested
- Any risk you're aware of (perf, compatibility, UX)
Small, focused PRs are much easier to review than large ones. If a change spans many areas, consider splitting it.
Releases publish straight from this repo. To cut a release:
- Bump
versioninpackage.json(semver). - Add an entry to
CHANGELOG.md. - Commit to
mainand push. - Create a matching
vX.Y.Ztag —publish.ymlruns on tag push and does the rest via npm OIDC trusted publishing (no long-livedNPM_TOKEN).
The tag-vs-package.json version check in publish.yml will fail the publish
if the two don't match, so keep them in sync before tagging.
- Non-security bugs: open a GitHub issue with a reproduction and your
environment (
node -v,npm -v, OS). - Security issues: see SECURITY.md — do NOT open a public issue.
By submitting a PR you agree that your contribution is licensed under the MIT license (see LICENSE).