Skip to content

cli: add agentmetry disposition for detection triage #100

Description

@blitzcrieg1

Problem

The four-week dogfood gate turns red when any critical or high detection in a week is still untriaged at week close. Dispositioning is the one operator action that closes that gap.

Every other gate operation has a CLI command:

  • agentmetry dogfood
  • agentmetry stats --days 7
  • agentmetry verify --trail
  • agentmetry doctor

Disposition does not. The only paths today are:

  1. Dashboard UI
  2. POST /api/v1/audit/detections/disposition with an API key

That gap bit us on 2026-08-23: week 3 had one high (session-tool-burst, correlation 94b81615-42b1-408e-ae07-2f50ccab12b6) that could only be closed via a raw API call. A pilot operator on Win11 with hooks installed but no dashboard habit would hit the same wall.

Proposal

Add a thin CLI client over the existing endpoint:

agentmetry disposition <correlation_id> <rule_id> \
  --status resolved|false_positive|risk_accepted \
  --note ... \
  [--decided-by home-lab]

Valid closing statuses match the API: resolved, false_positive, risk_accepted. Require --note for false_positive and risk_accepted (same rule as disposition.py).

Implementation sketch:

  • New subcommand in agentmetry/cli/__init__.py
  • POST to /api/v1/audit/detections/disposition using AGENTMETRY_URL and optional AGENTMETRY_API_KEY
  • Print the returned disposition JSON (or a one-line summary)
  • Exit non-zero on HTTP 400/500 with the server detail

No new server logic. The trail write and index update stay in apply_disposition().

Docs to fix when this lands

  • trail-debug skill currently says disposition is available via CLI; it is not yet.
  • README gate checklist should list agentmetry disposition beside dashboard triage.

Acceptance

  • Operator can close a finding from a shell on a machine where the orchestrator is running, without opening the dashboard.
  • agentmetry dogfood week with a dispositioned high stays green.

Activity

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions