Thanks for the interest. agent-tree is small and opinionated; the bar for accepting changes is "doesn't make the tool worse." Here's the loop.
git clone https://github.com/lifrary/agent-tree
cd agent-tree
npm install
npm test # 134 / 12 files at last green — must stay greenRequirements:
- Node.js ≥ 20 (native
fetch, top-level await in build script) - macOS or Linux for the full smoke loop. Windows works for the CLI; clipboard / git subprocess paths are platform-shimmed but less exercised.
Every PR must pass these four, in this order:
npm run lint # eslint
npm run typecheck # tsc --noEmit, strict
npm test # vitest
npm run build # esbuild → dist/cli.js + dist/mcp-server.jsnpm publish re-runs all four via the prepublishOnly hook — so a green local run is a strong signal you can ship.
If you touch any of these, add a test in tests/security-hardening.test.ts (or extend tests/integration.test.ts):
src/utils/redact.ts— adding/changing patternssrc/cli/modes.ts:dumpArtifacts— anything that writes to disksrc/utils/picks.ts— concurrency / atomicity changessrc/utils/safe_path.ts— path-trust hardeningsrc/mcp/server.ts— any new tool, or change topipelineFor/resolveMatchSafe
The reason: redaction and path-safety bugs are silent failures that bypass every test that doesn't specifically look for them. We learned this the hard way during the v0.1.0 audit (see CHANGELOG.md "Post-rebrand audit hardening").
If you add a new code path that consumes a session, route it through runPipeline (CLI) or pipelineFor (MCP). Do not call buildMindMap directly — it bypasses the redactor. v0.1.0 had this exact bug for three MCP tools.
Conventional-ish but pragmatic. The first line is what people see in git log --oneline:
<type>: <imperative summary, ≤72 chars>
<body explaining why, not what — wrap at 72>
<footer if needed>
Common <type> values: feat, fix, chore, docs, test, refactor, release. No strict rule — match the surrounding history (see git log --oneline).
- Branch from
dev(notmain—mainonly moves at release time). - Push your branch, open a PR against
dev. - Make sure CI is green (the four-step check chain runs in
.github/workflows/ci.yml). - Reviewer merges into
dev.mainonly fast-forwards fromdevduring a release (seeRELEASING.md).
Small PRs > big PRs. If a change touches more than ~5 files, write a one-paragraph summary in the PR description explaining the shape.
- Fancy abstraction. Three similar lines is fine; a "ContextSnapshotFactoryAdapter" is not.
- 100% test coverage. Aim for "the security-sensitive paths are locked in, and a future regression turns CI red."
- Backwards compatibility for pre-1.0 internal APIs. Once we hit 1.0 we'll care; until then, breaking changes between minor versions are explicit but not banned.
Open an issue on GitHub. The templates in .github/ISSUE_TEMPLATE/ cover the minimum info we need to triage.
For sensitive security findings (e.g. a redactor pattern that leaks a real-world key in the wild), email the author directly rather than filing a public issue. See package.json#author.
By submitting a contribution you agree it ships under the project's MIT license (see LICENSE).