Shared context for agent teams. A tree-structured knowledge substrate that gives AI agent teams persistent, owned, versioned context. Works with Claude Code, Codex, OpenClaw, and any agent.
Paste this into your agent (Claude Code, Codex, or any coding agent):
The agent will:
first-tree init to scaffold the frameworkfirst-tree verify to confirm everything passesA Context Tree is a Git repository where every directory is a domain and every file is a node. Each node captures decisions, designs, and cross-domain relationships — the knowledge that would otherwise scatter across PRs, documents, and people's heads.
NODE.md that describes the domain. Leaf .md files capture specific decisions or designs.Information an agent needs to decide on an approach — not to execute it.
Yes: "Auth spans 4 repos: backend issues JWTs, frontend uses Better Auth, extension uses OAuth popup, desktop uses localhost callback."
No: The function signature of auth_service.verify() — that's in the code.
my-org-tree/
├── NODE.md # root — lists all domains
├── engineering/
│ └── NODE.md # decisions about architecture, infra, tooling
├── product/
│ └── NODE.md # strategy, roadmap, user research
├── marketing/
│ └── NODE.md # positioning, campaigns
└── members/
├── NODE.md # team members and agents
├── alice/
│ └── NODE.md # individual member node
└── agent-a/
└── NODE.md # AI agent member node
--- title: "Auth Architecture" owners: [alice, bob] soft_links: [/infrastructure/deployments] ---
| Field | Required | Description |
|---|---|---|
title | Yes | Display name for the node |
owners | Yes | Who can approve changes. [] inherits from parent. [*] means anyone. |
soft_links | No | Cross-references to related nodes in other domains |
type | Members only | human, personal_assistant, or autonomous_agent |
role | Members only | Role in the organization (e.g., "Engineer", "Growth") |
domains | Members only | Broad areas of responsibility |
A Git repo of .md nodes. Org memory that any agent reads before acting. Structure is the interface — no APIs, no schemas, no infra.
GitHub is the hub. PRs, issues, CODEOWNERS — all driven by tree ownership. Agents triage at scale, merge what's ready, reject what doesn't belong.
Inbox-based agent-to-agent communication. Messages are .md files in the tree. Owned, versioned, and auditable. No separate broker, no event queue, no extra infra.
The npm package is first-tree. Use npx first-tree for one-off runs, or npm install -g first-tree to add the first-tree command to your PATH.
| Command | Description |
|---|---|
first-tree init | Bootstrap a new tree. Creates NODE.md, AGENTS.md, CLAUDE.md, and members/NODE.md. Generates task list in .first-tree/progress.md. |
first-tree verify | Check progress for unchecked items + run deterministic validation (valid frontmatter, node structure, member nodes exist). |
first-tree upgrade | Compare local framework version to upstream, generate upgrade task list. |
first-tree publish | Push tree repo to GitHub. Creates the remote if needed. |
first-tree generate-codeowners | Generate .github/CODEOWNERS from tree ownership frontmatter. |
first-tree help onboarding | Print the full onboarding guide. |
mkdir my-tree && cd my-tree && git init && first-tree init.first-tree/progress.md — it contains a checklist tailored to your repo.members/ from git history and CODEOWNERS. Use --seed-members contributors to auto-draft from git history.first-tree verify — confirms all checks pass.Or just paste the quick start prompt into your agent — it does all of this automatically.