Skip to content

docs: add CLI reference and RunEvent field table#14

Merged
Gsbreddy merged 1 commit into
mainfrom
cursor/documentation-automation-system-f451
May 2, 2026
Merged

docs: add CLI reference and RunEvent field table#14
Gsbreddy merged 1 commit into
mainfrom
cursor/documentation-automation-system-f451

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 2, 2026

Docs added/updated

New: docs/cli.md — CLI reference

Adds a complete CLI command reference covering every flightdeck command as a stable public contract (v1.0.0+):

  • Global flags and exit code table (0 = success, 1 = error, 2 = checksum mismatch)
  • flightdeck init, doctor, serve with all options
  • release subgroup: register, list, show, verify, diff, promote, rollback, history
  • pricing subgroup: import (including --replace/--reason semantics) and show
  • policy subgroup: set and show
  • runs subgroup: ingest (JSONL and JSON array formats)
  • End-to-end typical workflow walkthrough

Updated: docs/http-api.md — RunEvent field reference

Adds a RunEvent field reference table to the POST /v1/events section covering:

  • All top-level fields with types, required/optional, defaults, and descriptions
  • metrics sub-object fields (success, latency_ms, error_type)
  • usage.model fields (all token count fields and provider/model)
  • usage.tools[] entry fields

Updated: README.md

Links the new docs/cli.md in the Documentation section and notes the RunEvent field reference in the HTTP API entry.

Which codepaths they cover

  • src/flightdeck/cli/main.py — all CLI commands, flags, exit codes
  • src/flightdeck/models.pyRunEvent, RunEventMetrics, RunEventModelUsage, RunEventToolUsage
  • src/flightdeck/server/routes/ingest.py — event validation and api_version handling
  • src/flightdeck/storage.pyinsert_run_events idempotency (duplicate run_id handling)

Key knowledge gaps addressed

  1. No CLI reference existed — developers had to run --help for each subcommand to discover flags and exit codes. The release verify exit-2 contract and the pricing import --replace audit requirement were especially non-obvious.
  2. RunEvent structure was undocumented — the HTTP API docs showed an example JSON body but gave no per-field semantics for type, metrics.*, usage.tools[], or which fields are required vs optional. This is the primary input format for runtime evidence ingestion.
Open in Web View Automation 

Add docs/cli.md covering every flightdeck command, its flags,
arguments, and exit codes — a stable public contract from v1.0.0:

- Global flags and exit code table (0 success, 1 error, 2 checksum mismatch)
- flightdeck init, doctor, serve with all options
- release subgroup: register, list, show, verify, diff, promote, rollback, history
- pricing subgroup: import (--replace/--reason semantics) and show
- policy subgroup: set and show
- runs subgroup: ingest (JSONL and JSON array formats)
- End-to-end typical workflow section

Extend docs/http-api.md with a RunEvent field reference table covering
all top-level fields, metrics sub-fields, usage.model fields, and
usage.tools[] entry fields with types, defaults, and descriptions.

Update README.md Documentation section to link docs/cli.md and add
the RunEvent reference note to the HTTP API entry.

Co-authored-by: Gottam Sai Bharath <Gsbreddy@users.noreply.github.com>
@Gsbreddy Gsbreddy marked this pull request as ready for review May 2, 2026 10:30
@Gsbreddy Gsbreddy merged commit bab8594 into main May 2, 2026
2 checks passed
@Gsbreddy Gsbreddy deleted the cursor/documentation-automation-system-f451 branch May 2, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants