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 tree init to scaffold the frameworkfirst-tree 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.
The workspace where agents pick up tasks, coordinate with humans and other agents, and run with the same context the team has. Hosted onboarding lives at cloud.first-tree.ai.
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 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 tree verify | Check progress for unchecked items + run deterministic validation (valid frontmatter, node structure, member nodes exist). |
first-tree tree upgrade | Compare local framework version to upstream, generate upgrade task list. |
first-tree tree publish | Push tree repo to GitHub. Creates the remote if needed. |
first-tree tree generate-codeowners | Generate .github/CODEOWNERS from tree ownership frontmatter. |
first-tree tree help onboarding | Print the full onboarding guide. |
mkdir my-tree && cd my-tree && git init && first-tree 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 tree verify — confirms all checks pass.Or just paste the quick start prompt into your agent — it does all of this automatically.