Skip to content

TASK-302: CLI Implementation #72

@copyleftdev

Description

@copyleftdev

Description

Implement command-line interface per CLI_INTERFACE.md

Phase

Set up development infrastructure with Tiger Style discipline

Test-First Requirements

⚠️ Write tests BEFORE implementation

  • Test argument parsing
  • Test all commands with valid/invalid inputs
  • Test exit codes

Acceptance Criteria

  • Commands: run, replay, analyze, diff, validate, version, help
  • Command run: execute scenario, output results
  • Command replay: verify deterministic replay
  • Command analyze: recompute metrics from event log
  • Command diff: compare two runs
  • Command validate: check scenario file
  • Argument parsing using clap library
  • Output formats: summary (default), JSON, CSV
  • Progress indicators (live mode)
  • Signal handling: SIGINT (graceful shutdown)
  • Exit codes: 0 (success), 1 (assertion failure), 2 (config error), 3 (runtime error)
  • Minimum 2 assertions per function
  • >85% test coverage
  • All tests pass

Dependencies

  • TASK-300
  • TASK-301

Files to Create/Modify

src/main.zig
src/cli.zig
tests/unit/cli_test.zig
tests/integration/cli_test.sh

Estimated Effort

32 hours


Tiger Style Requirements:

  • Minimum 2 assertions per function
  • All loops are bounded
  • Explicit error handling (no silent failures)
  • Code formatted with zig fmt
  • Pre-commit hook passes
  • All tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCommand-line interfaceinterfaceUser/API interfacesphase-3Scenario Execution phasetiger-styleTiger Style philosophy compliance

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions