---
name: first-tree-write
description: Load the current First Tree release's canonical source-backed Context writer for codex.
---

# First Tree Context loader

1. For every new First Tree Context task, run the current loader:

```sh
__FIRST_TREE_SKILL_INVOCATION__ --json context skill load --protocol 1 --provider codex --name first-tree-write
```

2. Require a valid protocol-v1 response for `consumerKind: byo`, provider `codex`, Skill `first-tree-write`, `firstTreeInvocation`, and both `skillDigest` and `policyDigest`. The loader is the only authority that validates the exact release, contained paths, actual file digests, and current CLI invocation; do not run an independent `sha256sum`.
3. Resolve the returned Skill and Policy independently:
   - Reuse Skill content only when the exact `(first-tree-write, skillDigest)` pair was previously read in full and that full text is still directly available in the current provider context.
   - Reuse Policy content only when the exact `policyDigest` was previously read in full and that full text is still directly available in the current provider context. Read and Write may share only this Policy reuse.
   - Otherwise read the corresponding current `skillPath` or `policyPath` completely. A matching path, Skill name, release version, or summary that content was loaded is not evidence that the full text remains available. Treat uncertainty, digest changes, and unavailable content after startup, resume, clear, or compact as a cache miss.
4. Follow the canonical workflow validated by this latest loader response. Preserve `firstTreeInvocation` as the opaque exact shell prefix for every First Tree CLI command in this task; never replace it with a channel binary or reconstruct it from PATH, release, channel, or memory. Do not create a persistent Core cache. Missing, invalid, or rejected loader output means First Tree Context is unavailable; do not fall back to a copied or legacy workflow.
