Agent Context (wh prime)
wh prime outputs a complete CLI context dump optimized for AI agents. It’s designed to be the first command an agent runs at session start or after context compaction.
# Markdown output (human-readable, ~2,000 tokens)wh prime
# Structured JSON outputwh prime --jsonWhen to Use
Section titled “When to Use”- Session start — give the agent full CLI context before it begins work
- After compaction — restore context that was dropped during conversation compression
- New agent — bootstrap a fresh agent with everything it needs to operate
Markdown Output
Section titled “Markdown Output”The default output includes:
- Environment — default repo (from
WARMHUB_REPO) - Core concepts — repo, thing, assertion, shape, commit, wref definitions
- Wref quick reference — local/canonical forms, version modifiers, batch tokens
- Command reference — all domains and verbs with args and aliases
- Common workflows — explore, create, modify, query patterns
- Agent tips —
--json,--live, prefix expansion, fuzzy matching
Example excerpt:
## Core Concepts- **Repo**: org/repo namespace containing things, assertions, shapes, commits- **Thing**: A named entity (e.g., `player`, `room`) versioned through commits- **Assertion**: A claim about a thing with shape-validated data- **Shape**: A schema defining the data structure for things/assertions- **Commit**: An atomic batch of add/revise operations- **wref**: A human-readable reference to a thing (its name)JSON Output
Section titled “JSON Output”The --json output includes:
{ "version": "0.1.0", "defaultRepo": "myorg/myrepo", "defaultOrg": "myorg", "wrefSyntax": { "localExamples": ["GameState", "GameState@v3", "Game/player"], "canonicalFormat": "wh:org/repo/Shape/name", "versionModifiers": ["@HEAD", "@vN", "@ALL"], "batchTokens": { "allocate": "$N", "reference": "#N" } }, "domains": [ { "domain": "org", "summary": "Organization management", "verbs": [ { "name": "create", "summary": "Create a new organization", "args": "<name>", "status": "live" } ] } ]}The JSON format is structured for programmatic consumption — each domain lists its verbs with args, aliases, flags, and status.
Token Budget
Section titled “Token Budget”Prime output is kept compact (~2,000 tokens) to leave room in the agent’s context window for reasoning and conversation.
MCP Equivalent
Section titled “MCP Equivalent”For MCP-connected agents, the equivalent bootstrapping tool is warmhub_repo_describe. See MCP Quickstart for usage and MCP Tools Reference for the full schema.
Best Practice
Section titled “Best Practice”Agents should call wh prime (CLI) or warmhub_repo_describe (MCP) as their first action, then use targeted tools for specific operations. This avoids guessing at schema details and gives the agent accurate write contracts from the start.