Skip to content

JSON outputs lack version metadata and status command missing ranked/inbox views #29

Closed

Description

@Sinity

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 --json or polylogue config show --json should be able to check payload.schemaVersion before 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 roots map in config.json would let each label expand into the standard directory tree.
  • Status gaps: --top N for ranked runs and --inbox for pending counts are natural extensions of the monitoring surface. Without them, users run browse runs + manual sorting or browse inbox separately.

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 --json output from the CLI includes schemaVersion and polylogueVersion at the top level
  • persist_config(roots={"work": Path(...)}) produces a config.json with per-label directory trees
  • polylogue browse status --top 5 renders a ranked table of the 5 highest-attachment runs
  • polylogue browse status --inbox shows pending counts per provider
  • Existing JSON consumers that ignore unknown keys continue working (stamps are additive)

Activity

  1. added
    type:feat
    faux-pull-request
    on Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliarea:schemaarea:storagefaux-pull-requesttype:feat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions