Shared infrastructure for the GitHub-native text formats:
--format github-annotations (workflow commands on stdout) and
--format github-summary (step-summary markdown).
The three line-groups of a human fallow review --walkthrough render: the
orientation header and final status (stderr), and the staged tour body
(stdout). The entry point in audit_brief.rs owns the stream split; this
keeps the pure line builder behind the private human module while exposing
exactly what the entry point needs.
Build the human walkthrough tour from the in-memory guide. Pure: no IO, no
mutation. viewed decorates each file row; show_cleared expands the
Cleared panel.
Elide the common directory prefix between a base path and a target path.
Only strips complete directory segments (never partial filenames).
Returns the remaining suffix of target.
Format a path for human-facing display: project-relative when the path is
under root, falling back to the full path otherwise. Always
forward-slash-normalized so Windows backslashes do not leak into
terminal output.
The root-relative files (in direction.order) the local ledger marked viewed
against the guide’s current hash. Exposed so the markdown surface can collapse
the same viewed files into Cleared that the human surface does, keeping the two
formats consistent on the same on-disk --mark-viewed state.