v0.11.6 — Fix cross-doc link integrity (H1 + H3 from MD audit)#102
Merged
Conversation
Two findings from /sc:analyze on the generated MDs, shipped together because the test extension covers both regressions. H1 — Model.md §3.3 emitted [Sources.md](#) — link href was the empty fragment '#', scrolling to top instead of jumping to Sources.md. Now correctly emits [Sources.md](Sources.md). H3 — Index.md was a dead-end glossary; entries rendered as bare `code` text with no link to where the entity is fully documented. Now wires through xref(): Tables / Calc groups → DataDictionary.md#<table> Measures → Measures.md#<measure> (existing <a id>) Columns → DataDictionary.md#<parent-table> UDFs → Functions.md (doc-level) Calc items → CalcGroups.md#<parent-cg> Defence in depth — xref() now handles empty anchor as "[text](Doc.md)" without "#"; previously it silently emitted "[text](Doc.md#)" — same regression class as H1. Tests: +9 (267 → 276) - 8 "no [text](#) or [text](Doc.md#)" guards, one per generated doc - 1 Index.md cross-link assertion (≥1 Measures.md, ≥1 DataDictionary.md) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Closes the two High-severity findings from the markdown-docs quality audit run via `/sc:analyze markdown docs`:
H1 — Broken `Sources.md` link in Model.md §3.3
The link href was the empty fragment `#`, scrolling to top-of-page on every render target (ADO Wiki, GitHub, dashboard) instead of jumping to the Sources companion doc.
Fix: `Sources.md` → `Sources.md` (`md-generator.ts:864`).
H3 — Index.md was a dead-end glossary
Every glossary entry rendered as bare `\
code\\` text with no link to where the entity is fully documented. The Index doc is meant as a navigation hub.Fix: every kind now wires through `xref()`:
Defence in depth
`xref(text, doc, "")` (empty anchor) used to silently emit `text` — same regression class as H1. Now emits `text` with no fragment.
Tests (267 → 276)
Test plan
Out of scope
The audit's Medium / Low findings (Improvements `items` for Auto-Date and Field Parameters; anchor uniqueness for duplicate measure / page names; 300 lines of dead Mermaid helper code) are tracked but not in this PR.
🤖 Generated with Claude Code