skills/first-tree-write/SKILL.md
Write Context Tree updates from explicit source material — code PRs, design docs, meeting notes, raw text. Use when the user gives you a concrete source and wants the right durable tree change drafted, linked, and reviewed. This skill is source-driven and targeted; use `first-tree-sync` instead for broad drift audits with no specific source.
npx skillsauth add agent-team-foundation/first-tree first-tree-writeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read these first:
../first-tree/SKILL.md../first-tree/references/anti-patterns.md../first-tree/references/maintenance.mdTake one specific source — a PR, a doc, a note — and produce zero, one, or a small set of tree changes that capture what's durable and decision- relevant. The output is a tree-repo PR linked to the source.
| Use this skill | Use a different skill |
| ------------------------------------------------------------ | ----------------------------------------------------------------------------- |
| User pastes a PR link and says "reflect this in the tree" | User asks "is the tree up to date?" → first-tree-sync |
| User pastes a meeting note about a decision | Repo is unbound → first-tree-onboarding first |
| User pastes raw text and asks for the tree implication | A GitHub notification needs only a label / comment → first-tree-github-scan |
| GitHub Scan agent classifies a notification as route=write | Audit drift since a release → first-tree-sync |
Default to not writing. The tree compresses expensive context; a node nobody reads is worse than a missing node. If the source does not clearly establish a decision, constraint, ownership change, or cross-domain relationship, write nothing and tell the user why.
| Phase | Reference | | ----------------------------- | -------------------------------------------------------- | | Decide what is tree-worthy | references/what-belongs.md | | Draft the update | references/workflow.md | | Shape the tree node | references/node-shape.md | | Decide between write and sync | references/boundary.md |
The CLI surface this skill uses today:
first-tree tree inspect --json — confirm the bindingfirst-tree tree verify --tree-path <path> — gate the final commitgh pr create — open the tree-repo PRThere is no first-tree tree write-node or tree open-tree-pr command
yet — write builds the file edits + commit + PR with gh and standard
git.
first-tree-sync if they want broad audit.references/what-belongs.md).first-tree tree verify must exit 0 before
opening the tree PR.tools
Canonical whitepaper and routing skill for First Tree. Explains what belongs in a Context Tree, how source or workspace roots, tree repos, and bindings relate, and how the current `first-tree tree` and `first-tree github scan` surfaces fit together. Use when you need shared First Tree concepts, need to choose between onboarding, sync, write, or GitHub notification workflows, or need the high-level CLI map before acting.
tools
One-shot onboarding command for First Tree. Drives a repo or workspace from "no first-tree" all the way to "tree bound, real content drafted, daemon running, agent templates confirmed" — end to end, in one skill invocation. Trigger this skill when the user invokes `/first-tree-onboarding`, says "onboard this repo to first-tree", "set up first-tree here", "complete first-tree onboarding", or runs first-tree against an unbound repo or workspace. Also trigger when re-running on an already-bound repo to refresh skills, draft missing content, or reverify the daemon. Use this skill instead of running `first-tree tree init` from raw memory; it owns role-by-role branching, the initial-content drafting phase the CLI does NOT do, and the final doctor checks.
development
Audit and repair drift between merged code and the Context Tree in both directions — tree→code (does code still support tree facts?) and code→tree (does the tree register everything code now contains?). Use when the tree may be stale, wrong, outdated, or missing coverage for recent code changes; after a large merge; before release; on a freshly onboarded tree; or when a GitHub notification was routed `route=sync`. Sync owns broad drift discovery, structural skeleton repair, and substantive write hand-off across one tree. Use `first-tree-write` instead when the user already gave you a specific PR / doc / note to write into the tree.
tools
Operate the `first-tree github scan` CLI — the GitHub notification daemon and inbox runtime. Use whenever you need to run, start, stop, inspect, poll, or debug github-scan; view or respond to GitHub-triggered work from the terminal; or wire up the github-scan statusline hook.