SPEC-003: Agent Ergonomics

Documents findings from running zetl as an LLM agent would — systematically exercising every command and identifying friction points. See Agent Ergonomics for the decision record.

(given spec-003-documented)
(given agent-ergonomics-audited)

Findings

P0 — Bugs

FindingIssueFix
FINDING-001Empty search query panicReturn {"results": []}
FINDING-002Plain-text errors in JSON modeADR-003 JSON Errors

P1 — Quality

FindingIssueFix
FINDING-004Duplicate link resultsADR-004 Link Dedup
FINDING-005Duplicate backlink resultsADR-004 Link Dedup
FINDING-006UTF-8 context splittingCharacter-boundary-aware slicing

P2 — New capabilities

RequirementCommandPurpose
REQ-019zetl listPage enumeration for agent discovery
REQ-020search --pathRestrict search to subdirectory
REQ-021zetl exportFull graph adjacency list

Design principles established

  • Agents consume stdout as JSON — errors must be structured
  • Non-zero exit codes signal failure
  • Page enumeration (list) is essential for agent bootstrapping
  • Deduplication at the output layer keeps the internal graph faithful

Impact

These fixes made zetl significantly more reliable as an agent building block. The JSON by Default philosophy, structured errors, and non-zero exit codes all trace back to this spec.

See also: Spec Index, Agent Ergonomics, JSON by Default, CLI Reference

Backlinks