Repository navigation
Description
Context
Every CLI command that emits --json output writes bare payloads — there's no indication of which schema version or polylogue release produced the data. Downstream consumers (cron scripts, systemd hooks, dashboards) parse these payloads assuming a fixed format, but when fields change between releases the failure is silent: values go missing or types shift without any signal.
The config system also assumes a single archive root. Users who maintain separate archives (work vs. personal, or per-machine) have to duplicate the entire config file, since there's no way to express multiple labeled output trees within one configuration.
Meanwhile, the status command — the primary monitoring surface — can show recent runs and provider summaries but can't answer two common questions without additional commands: "which runs consumed the most attachments/tokens?" and "how many inbox items are still pending?"
Motivation
- Schema stamps: Any consumer of
polylogue browse status --jsonorpolylogue config show --jsonshould be able to checkpayload.schemaVersionbefore parsing. This is table stakes for machine-readable output that survives version upgrades. - Labeled roots: The init wizard already asks for an output directory, but there's no path from a single root to a multi-environment setup without manual config editing. A
rootsmap in config.json would let each label expand into the standard directory tree. - Status gaps:
--top Nfor ranked runs and--inboxfor pending counts are natural extensions of the monitoring surface. Without them, users runbrowse runs+ manual sorting orbrowse inboxseparately.
Scope
- All CLI modules that emit JSON (
config show,compare,doctor,index check,attachment stats/extract,maintain backup,browse runs,browse status, failure logging) - Config persistence (
persist_config) and the init wizard - Status command parser and rendering
- HTML template (anchor navigation is a separate but related deployment-readiness concern)
Out of scope: changes to the schema module itself (stamp_payload already exists), NixOS module updates, provider-level config changes.
Acceptance criteria
- Every
--jsonoutput from the CLI includesschemaVersionandpolylogueVersionat the top level persist_config(roots={"work": Path(...)})produces a config.json with per-label directory treespolylogue browse status --top 5renders a ranked table of the 5 highest-attachment runspolylogue browse status --inboxshows pending counts per provider- Existing JSON consumers that ignore unknown keys continue working (stamps are additive)
Activity