Documentation

Docs / Reference

ADR 0004 — Project skeleton and golden harness

Status: Accepted (developer review, 2026-10-05) Date: 2026-10-05

Context

T003 establishes the application module, CLI interface and reusable fixture helper. It must build with Go alone and compare identical snapshots on Windows, macOS and Linux. ADR 0001 fixes Go as the core language and ADR 0002 confines the native parser experiment to the separate spike module.

Options considered

Decision

Use the standard library for help and version, with build variables injected through Go linker flags. Unknown commands and extra arguments exit with code 2. No arguments show help. Pin Go 1.27.1, the installed and tested version, in the root module; CI reads it rather than duplicating the version.

Use github.com/graphvein/graphvein as the placeholder module path requested by T003. Do not import the separate spike/parsing module.

Provide internal/golden.Check(testing.TB, path, value) and golden.Path for portable filesystem paths. Canonical JSON sorts all object keys, retains array order and numeric precision, and uses two-space indentation and a final LF. Comparison is byte-exact; mismatches identify the first differing JSON path. Only the explicit test flag -update writes expectations, and only for files reached by selected tests. Self-tests use subprocesses to verify actual test failures and update-flag behavior without failing the parent suite.

Consequences

Known gaps

Report a problem with this pageSource: docs/adr/0004-project-skeleton-and-golden-harness.md