Skip to content

feat: vouch metrics — first-class observability #192

Description

@plind-junior

Labels: enhancement

What you're trying to do

vouch status shows artifact counts — useful for "is the KB alive?" but not "is the review gate working?". Operators want time-series-able signals: how many proposals get approved, how stale the corpus is, how long claims sit pending, who is proposing/approving.

ROADMAP 0.3 calls for observability hooks. All the data already lives in audit.log.jsonl + the artifact files — no new on-disk state needed.

Suggested shape

vouch metrics                # human table
vouch metrics --json         # machine-readable (Prometheus textfile compatible)
vouch metrics --since 30d    # window the audit log

Emits:

  • approval_rateapprove / (approve + reject) over the window
  • citation_coverage — fraction of approved claims whose evidence ids still resolve
  • stale_ratio — fraction of claims past lint's stale threshold
  • proposal_lag_p50 / p90 — time from proposal.*.create.approve
  • actors — top N by proposals/approvals

Acceptance

  • vouch metrics --json produces a stable schema documented in docs/metrics.md.
  • Counts derive purely from audit.log.jsonl + artifact files (no new disk state).
  • Test asserts metrics against a fixture KB with known stats.

Out of scope

  • Pushing metrics to Prometheus/Datadog (do that with a sidecar reading the JSON output).
  • Long-term retention / TSDB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions