Skip to content

v2.1.0

Choose a tag to compare

@Lockyc Lockyc released this 17 Jul 02:40
· 50 commits to main since this release

⚠️ The install command has changed

go install github.com/lockyc/docgraph/v2@latest

The /v2 suffix is required. go install github.com/lockyc/docgraph@latest — the
command in every previous doc — has been hard-failing for all consumers since the
docaudit → docgraph rename, producing no binary at all:

module declares its path as: github.com/lockyc/docaudit
        but was required as: github.com/lockyc/docgraph

The module path lacked the /vN suffix Go's semantic import versioning requires at major
≥2, so the proxy rejected every v2 tag and @latest fell back to the newest v1 — which
still carried the pre-rename module path. v2.0.0 was never installable. v2.1.0 is the
first working v2 release. If you have a pre-push hook generated by an older docgraph,
regenerate it with docgraph install-hook --force to pick up the corrected install hint.

Added since v2.0.0

A frontmatter model for the doc graph. Docs can carry a leading YAML block with a
type, freshness metadata (verified / review), and typed edges (links:) — covers,
part-of, supersedes, depends-on and friends. Two new whole-state checks enforce it:
frontmatter (well-formedness + a required type) and edges (internal edge targets must
exist; part-of/supersedes must not cycle). Typed doc edges also feed orphan
reachability, so a doc reached only via an edge is no longer a false orphan. docgraph schema emits the vocabulary as JSON Schema so other tools conform instead of re-encoding it.

covers-drift — a second advisory pre-push rider. Flags a doc whose covers edge
points at code your push changed while the doc itself went untouched. It's the graph join
doc-drift can't do: a rewritten function whose doc describes the old behaviour in prose
leaves no removed symbol and no changed literal to grep. It judges nothing, so it never
blocks — editing the doc is the escape hatch, and a repo with no covers edges never sees
it. Opt out with --no-covers-drift or DOCGRAPH_COVERS_OFF=1.

Read-only doc-graph views — covers <path> (which doc governs this file), index (a
generated markdown index, redirect it into a tracked file), and stale (docs past their
freshness threshold). None gate; all exit 0.

A docgraph skill + /docgraph:install. The gates push themselves at an agent; the
views are pull-only, so the skill advertises them for the cost of one description line.
/docgraph:install wires the doc-drift Stop hook, offers the per-repo gate, and seeds the
leaks config.

Fixed

  • A .md edge with a colon in its anchor classified as cross-repo instead of a doc.
  • index labels fall back to the body H1 rather than the path.
  • Five load-bearing behaviours had no test and were mutation-verified into one: CoversOf's
    directory-prefix guard, the generated hook's advisory || true on the covers-drift line,
    ClosestBase's fewest-commits arbitration, nonCodePathspec's full extension set, and
    StaleDocs' fallback on an unparseable review.

Docs

Reconciled five claims the code had already falsified — the dependency list (yaml.v3 is
direct), verified/review being read by the stale view, the usage-log example record's
check count, the broken-link scope, and /docgraph:install never naming the covers-drift
rider it installed.

Full Changelog: v2.0.0...v2.1.0