Run artifact

workspace/targets/DrydockStats/blueprint/FEATURE-ReportCommands.md

FEATURE: Report Commands

FieldValue
Version20261026 V1
DescriptionThe commands report: one CSV row per Drydock command with a TOTAL row.
Depends OnFEATURE-CliExit.md, FEATURE-ValueFormat.md
Providesddkstat commands
Consumescli.Register, format.Minutes, logread.Record

Purpose

ddkstat commands [options] <log> shows how often each Drydock command called an LLM and what it consumed.

Behavior

Programmatic Acceptance

=== AC commands-ordering ===
Intent: Rows are ordered by calls descending then command ascending, including ties.

from drydock_go import run_test

result = run_test("./internal/report", "TestCommandsOrdering") print(result.stdout) print(result.stderr) assert result.passed, (result.status, result.stdout, result.stderr) === END AC commands-ordering ===

=== AC commands-total ===
Intent: The TOTAL row sums calls, failures, tokens and minutes over all filtered records.

from drydock_go import run_test

result = run_test("./internal/report", "TestCommandsTotal") print(result.stdout) print(result.stderr) assert result.passed, (result.status, result.stdout, result.stderr) === END AC commands-total ===

=== AC commands-empty ===
Intent: With no matching record the report is the header plus a zero TOTAL row.

from drydock_go import run_test

result = run_test("./internal/report", "TestCommandsEmpty") print(result.stdout) print(result.stderr) assert result.passed, (result.status, result.stdout, result.stderr) === END AC commands-empty ===

=== AC commands-write ===
Intent: The writer emits the declared header and columns.

from drydock_go import run_test

result = run_test("./internal/report", "TestCommandsWrite") print(result.stdout) print(result.stderr) assert result.passed, (result.status, result.stdout, result.stderr) === END AC commands-write ===

=== AC commands-run-via-cli ===
Intent: cli.Run dispatches the commands report over a test-written log, exits zero and writes parseable CSV.

from drydock_go import run_test

result = run_test("./internal/cli", "TestRunCommandsReport") print(result.stdout) print(result.stderr) assert result.passed, (result.status, result.stdout, result.stderr) === END AC commands-run-via-cli ===

User Acceptance

Guardrails