docs: publish the build graph as a gate-checked Mermaid page - #350
Merged
Conversation
Add docs/graph.md — Zuke's own dependency graph rendered as a Mermaid diagram GitHub draws natively, plus a target reference table — generated from the discovered build with the same generate-then-verify pattern as the workflows and plugin skills: a graphDoc target regenerates the page and a graphDocCheck target in the ci gate fails when it drifts. Link the page from the README intro and Documentation list, and record the new gate dependency in AGENTS.md. The generator (build/graph_doc.ts) is pure apart from the two file operations, mirrors the data zuke graph prints (hard dependsOn edges between discovered targets, declaration order), and uses synthetic Mermaid node ids so a target name can never collide with a Mermaid keyword. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0187myXRLofTjVoCkzN51tG8
Contributor
|
🤖 Zuke AI review 🔎 security review —
|
Contributor
|
🤖 Zuke AI review 🔎 generic review —
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Adds
docs/graph.md— Zuke's own dependency graph (38 targets, 24 edges) rendered as a Mermaid diagram GitHub draws natively, plus a target reference table with descriptions and dependencies — so anyone can click through from the README and see the live build graph ofzuke.tsitself.The page is kept current with the same generate-then-verify pattern as the workflows and the plugin skills:
./zuke graphDocregenerates the page fromdiscoverTargets(this)— the same nodes and harddependsOnedges./zuke graphprints, in declaration order.graphDocCheckis a new dependency of thecigate and fails with "Run./zuke graphDocand commit the result." when the page drifts from the build.The generator (
build/graph_doc.ts) is pure apart from the two file operations, so the drift check is a string comparison. Mermaid nodes use synthetic ids (t0,t1, …) so a target name can never collide with a Mermaid keyword, and labels/table cells are escaped. Mermaid was chosen over a committed image: GitHub renders it natively in markdown, and there is no binary asset to regenerate or drift.The README links the page from the intro paragraph and the Documentation list; AGENTS.md's gate-dependency snapshot records the new check. No generated workflow YAML changes — the CI job invokes the
cihub target as a single step.Tests: unit coverage of row extraction, Mermaid rendering, escaping, determinism, the empty build, and the write/check drift states, plus two integration tests driving a fixture build through the real CLI
main()(generate → check passes; build gains a target → check fails). An adversarial pass added a guard against rendering a broken edge for a dependency naming no row, with its own regression test.Related issues
None.
Checklist
type(scope): summary).deno task cipasses locally (lint, fmt, type-check, tests, spell). (security's zizmor audit could not reach the GitHub advisories API from the sandbox; every other gate target is green, gitleaks included.)README.md, JSDoc,docs/) when behaviour changed../zuke apiDocs(llms.txt,llms-full.txt, package README## API). — N/A: nopackages/change;apiDocsCheckis green.any, noascasts or!non-null assertions insrc/(narrow with type guards instead).🤖 Generated with Claude Code
https://claude.ai/code/session_0187myXRLofTjVoCkzN51tG8
Generated by Claude Code