first-tree-readlisted
Install: claude install-skill agent-team-foundation/first-tree
# First Tree Read
## Purpose
Read the Context Tree for the current repo before acting. This skill is
read-only: it uses `first-tree tree tree` to find relevant tree files, then
uses the agent's native file-reading capability to read their content and
summarize the constraints that matter for the user's task.
Use `first-tree-context` for tree writes from a source artifact. Use
`first-tree-sync` for broad drift audits.
## Workflow
### 1. Resolve the context repo
Find the workspace binding from the current working directory:
```bash
find_workspace_root() {
local d=$(pwd)
while [ "$d" != "/" ]; do
if [ -f "$d/.first-tree/workspace.json" ]; then echo "$d"; return; fi
d=$(dirname "$d")
done
return 1
}
WS=$(find_workspace_root) || { echo "No First Tree workspace at or above cwd"; exit 1; }
cat "$WS/.first-tree/workspace.json"
```
Resolve the context repo as `<workspaceRoot>/<manifest.tree>`. If the
manifest is missing, malformed, or the tree directory does not exist, stop and
report the binding gap. Do not guess a context repo.
Before reading content, make the context repo fresh enough for a read:
```bash
git -C "$CONTEXT_REPO" fetch origin
git -C "$CONTEXT_REPO" pull --ff-only
```
If the pull cannot complete cleanly, report the git state and continue only if
the user explicitly accepts reading stale or conflicted context.
### 2. Inspect the reader command every time
Run the help command from inside the context repo before using any
`tree tree` selector