Parent: #34
Priority: P4 (CLI polish — Hermes-parity quality of life)
Branch base: release/0.1.53
Why
graff-agent's gateway/cron sidecars need to dump conversations as JSONL transcripts (Hermes uses ~/.hermes/sessions/). And hermes doctor is a beloved feature — checks provider auth, MCP servers, FS perms.
Scope
graff conversation export <cid>
- Output JSONL — one line per turn (system / user / assistant / tool_call / tool_result).
--format json keeps existing single-doc dump; --format jsonl is new (default for export).
- Default output path:
~/.graff/sessions/<cid>.jsonl; --out <path> to override.
graff doctor
- Provider auth check (one round-trip per configured provider).
- MCP server probe (list tools).
- DB integrity check (
PRAGMA integrity_check).
- Skills directory readable + parses.
- Optional
--fix that writes a sample config when none exists.
- Exit code 0 on all-pass, 1 on any failure; concise human-readable output.
Acceptance
Parent: #34
Priority: P4 (CLI polish — Hermes-parity quality of life)
Branch base:
release/0.1.53Why
graff-agent's gateway/cron sidecars need to dump conversations as JSONL transcripts (Hermes uses~/.hermes/sessions/). Andhermes doctoris a beloved feature — checks provider auth, MCP servers, FS perms.Scope
graff conversation export <cid>--format jsonkeeps existing single-doc dump;--format jsonlis new (default forexport).~/.graff/sessions/<cid>.jsonl;--out <path>to override.graff doctorPRAGMA integrity_check).--fixthat writes a sample config when none exists.Acceptance
graff conversation export <cid>round-trips: export → import via--conversation <path>reproduces the conversationgraff doctorexits non-zero when an API key is missing--porcelainoutput for scripting (matches existinggraffconvention)