|
| 1 | +--- |
| 2 | +name: honcho-cli |
| 3 | +description: Inspect and debug Honcho workspaces via the `honcho` CLI. Use when investigating peer representations, memory state, session context, queue status, or dialectic quality — any task that requires introspection of a Honcho deployment. |
| 4 | +allowed-tools: Bash(honcho:*), Bash(jq:*), Read, Grep |
| 5 | +--- |
| 6 | + |
| 7 | +# Honcho CLI |
| 8 | + |
| 9 | +`honcho` wraps the Honcho Python SDK with agent-friendly defaults: JSON output, structured errors, input validation. Use it to inspect workspace state, debug peer memory, and diagnose the dialectic. |
| 10 | + |
| 11 | +## Output & config |
| 12 | + |
| 13 | +- **TTY**: human-readable tables (default when interactive) |
| 14 | +- **Piped / `--json`**: JSON — collection commands emit arrays, single-resource commands emit objects |
| 15 | +- **Exit codes**: `0` success · `1` client error (bad input, not found) · `2` server error · `3` auth error |
| 16 | +- **Config**: `~/.honcho/config.json` (shared with other Honcho tools). The CLI owns `apiKey` and `environmentUrl` at the top level; run `honcho init` to confirm or set them. Per-command scope (workspace / peer / session) is via `-w` / `-p` / `-s` flags or `HONCHO_*` env vars. |
| 17 | + |
| 18 | +## Command groups |
| 19 | + |
| 20 | +- `honcho config` — CLI configuration |
| 21 | +- `honcho workspace` — inspect, delete, search |
| 22 | +- `honcho peer` — inspect, card, chat, search |
| 23 | +- `honcho session` — inspect, messages, context, summaries |
| 24 | +- `honcho message` — list and get |
| 25 | +- `honcho conclusion` — list, search, create, delete |
| 26 | + |
| 27 | +## Rules |
| 28 | + |
| 29 | +- Always pass `--json` when processing output programmatically. |
| 30 | +- Run `honcho peer inspect` before `honcho peer chat` to understand context. |
| 31 | +- Use `honcho session context` to see exactly what an agent receives. |
| 32 | +- Never run `honcho workspace delete` without `honcho workspace inspect` first. |
| 33 | +- Check queue status when derivation seems stalled. |
| 34 | +- Compare peer card with conclusions to understand memory state. |
| 35 | + |
| 36 | +## Inspection tour |
| 37 | + |
| 38 | +When orienting to a Honcho deployment, walk outside-in: |
| 39 | + |
| 40 | +### 1. Understand the workspace |
| 41 | + |
| 42 | +```bash |
| 43 | +honcho workspace inspect --json |
| 44 | +``` |
| 45 | + |
| 46 | +### 2. Find the peer |
| 47 | + |
| 48 | +```bash |
| 49 | +honcho peer list --json |
| 50 | +honcho peer inspect <peer_id> --json |
| 51 | +``` |
| 52 | + |
| 53 | +### 3. Check peer's memory |
| 54 | + |
| 55 | +```bash |
| 56 | +honcho peer card <peer_id> --json |
| 57 | +honcho conclusion list --observer <peer_id> --json |
| 58 | +honcho conclusion search "topic" --observer <peer_id> --json |
| 59 | +``` |
| 60 | + |
| 61 | +### 4. Debug a session |
| 62 | + |
| 63 | +```bash |
| 64 | +honcho session inspect <session_id> --json |
| 65 | +honcho message list <session_id> --last 20 --json |
| 66 | +honcho session context <session_id> --json |
| 67 | +honcho session summaries <session_id> --json |
| 68 | +``` |
| 69 | + |
| 70 | +### 5. Search across workspace |
| 71 | + |
| 72 | +```bash |
| 73 | +honcho workspace search "query" --json |
| 74 | +honcho peer search <peer_id> "query" --json |
| 75 | +``` |
| 76 | + |
| 77 | +## Debugging playbook |
| 78 | + |
| 79 | +### Peer not learning? |
| 80 | + |
| 81 | +```bash |
| 82 | +# Is observation enabled? |
| 83 | +honcho peer inspect <peer_id> --json | jq '.configuration' |
| 84 | + |
| 85 | +# Is the deriver queue processing messages? |
| 86 | +honcho workspace queue-status --json |
| 87 | + |
| 88 | +# What conclusions exist? |
| 89 | +honcho conclusion list --observer <peer_id> --json |
| 90 | +honcho conclusion search "expected topic" --observer <peer_id> --json |
| 91 | +``` |
| 92 | + |
| 93 | +### Session context looks wrong? |
| 94 | + |
| 95 | +```bash |
| 96 | +# Raw context an agent would receive |
| 97 | +honcho session context <session_id> --json |
| 98 | + |
| 99 | +# Summaries feeding the context |
| 100 | +honcho session summaries <session_id> --json |
| 101 | + |
| 102 | +# Recent message history |
| 103 | +honcho message list <session_id> --last 50 --json |
| 104 | +``` |
| 105 | + |
| 106 | +### Dialectic giving bad answers? |
| 107 | + |
| 108 | +```bash |
| 109 | +# What the peer card says |
| 110 | +honcho peer card <peer_id> --json |
| 111 | + |
| 112 | +# Conclusions on the specific topic |
| 113 | +honcho conclusion search "topic" --observer <peer_id> --json |
| 114 | + |
| 115 | +# Exercise the dialectic directly |
| 116 | +honcho peer chat <peer_id> "what do you know about X?" --json |
| 117 | +``` |
0 commit comments