Reference · Sheet 03

CONFIG

hyperfixer.config.json

{
  "failFast": true,
  "outDir": ".hyperfixer",
  "gates": [
    { "name": "lint",      "cost": 5,  "command": ["bunx", "biome", "check", "."],
      "inputs": ["src/**", "test/**", "biome.json"] },
    { "name": "typecheck", "cost": 10, "command": ["bunx", "tsc", "--noEmit", "--pretty", "false"],
      "parser": "tsc", "inputs": ["src/**", "test/**", "tsconfig.json"] },
    { "name": "unit",      "cost": 30, "command": ["bun", "test"], "parser": "bun-test",
      "inputs": ["src/**", "test/**"] },
    { "name": "mutation",  "cost": 100, "command": ["bunx", "stryker", "run", "--incremental"],
      "enabled": false, "optional": true }
  ]
}

Gate fields

FieldMeaning
costRelative cost; gates run in ascending order, equal costs run concurrently as a group, --max-cost filters on it
commandArgv array, no shell; omit to skip the gate
parsertsc, bun-test, fast-check, eslint-json, findings-json, or raw, extracts structured findings from output. findings-json is the generic protocol: any tool printing a JSON array of findings integrates without a dedicated parser
optionalSkip (instead of error) when the command cannot start
enabledfalse removes the gate from the pipeline
timeoutMsKill the gate after this many ms, default 600000
inputsGlob patterns the gate depends on, declaring them enables caching and content staleness
fixCommandAutofix argv run by hyperfixer fix before re-verifying

Caching

A gate that declares inputs stores its passing result keyed by a hash of command + file contents. Touching a file never invalidates, a real content change always does; unchanged inputs mean an instant cache hit. Failures are never cached, and gates without inputs always run. --no-cache bypasses everything.

Changed-only mode

Put {changed} in a gate command and run with --changed: the token expands to the files git reports as modified (staged, unstaged and untracked, NUL-safe for spaces and unicode), and the gate is disabled when the tree is clean.

{ "name": "lint-changed", "cost": 5, "command": ["bunx", "eslint", "{changed}"] }

The verdict

{
  "ok": false,
  "generatedAt": "2026-07-24T10:30:00.000Z",
  "inputsFingerprint": "sha256…",
  "failedGate": "typecheck",
  "hint": "[typecheck] src/service.ts:42, Type 'string' is not assignable…",
  "durationMs": 533,
  "gates": [
    {
      "gate": "typecheck",
      "status": "fail",
      "durationMs": 458,
      "exitCode": 2,
      "findings": [
        { "file": "src/service.ts", "line": 42, "column": 5,
          "code": "TS2322", "message": "…" }
      ],
      "outputTail": "…"
    }
  ]
}

Written to .hyperfixer/verdict.json on every run. status is one of pass, fail, skip, error; cached results carry "cached": true. generatedAt guards against stale reads, hint is the one line an agent should act on first.