Log in
docs/command-semantics.md 52 lines · 2.1 KB

Command Semantics

Public benchmark claims must say which comparison track they use.

Tracks

agent-default measures what a coding agent would naturally call today using current documented/default commands. This is the right track for CLI UX, transcript pressure, and agent ergonomics.

core-equivalent measures the closest available equivalent semantic output level across VCSs. This is the right track for VCS-mechanics claims, but only when the command mapping has an equivalent semantic contract.

The machine-readable source of truth is config/command_semantics.json.

Critical Rule

Do not use agent-default output to claim a core VCS engine win. For example, git diff --stat versus oak diff primarily measures CLI output semantics. That is useful, but it is a UX/token benchmark, not a pure diff-engine benchmark.

Current Compact Mappings

Oak now has compact equivalents for the previously diagnostic agent rows:

  • status.short: Git uses status --porcelain=v1; Oak uses status --porcelain.
  • diff.stat: Git uses diff --stat; Oak uses diff --stat.
  • diff.name_only: Git uses diff --name-only; Oak uses diff --name-only.
  • commit.quiet: Git uses add . plus commit --quiet; Oak uses commit --json --quiet --no-verify.

These mappings are recorded in config/command_semantics.json; changing any of them requires a version bump and should be reflected in every row's command_semantics_version.

Correctness Expectations

Every operation needs a success oracle:

  • status operations: dirty/clean state and changed path set match the fixture manifest
  • diff summary operations: changed path set and line-count summaries match the fixture manifest
  • full diff operations: text hunks apply cleanly and binary files are summarized without payload dumps
  • commit operations: a new snapshot exists and the working tree is clean
  • branch operations: the task branch exists and points at the expected base

For binary scenarios, a command that emits raw binary content should fail the semantic correctness check even if its return code is zero.