[{"data":1,"prerenderedAt":370},["ShallowReactive",2],{"figure-telemetry":3,"menu-audits":6,"menu-decisions":7,"menu-projects":23,"menu-workflows":99,"decision-0002-docs-drift-detection":116},{"value":4,"alert":5},"18%",false,[],[8,11,14,17,20],{"label":9,"to":10},"0041 The visitor view becomes its own app, and the portal reads only as a developer platform","\u002Fdecisions\u002F0041-personal-site-splits-from-developer-portal",{"label":12,"to":13},"0040 Visitors land on the front page and toggle to the developer view","\u002Fdecisions\u002F0040-developer-portal-visitor-structure",{"label":15,"to":16},"0039 The developer portal is redesigned for visitors, from a twelve-site benchmark","\u002Fdecisions\u002F0039-developer-portal-benchmark",{"label":18,"to":19},"0038 Marina Roustan's discovery","\u002Fdecisions\u002F0038-marina-roustan-discovery",{"label":21,"to":22},"0013 New linters: the robustness gap is tsconfig and enforcement, not plugins","\u002Fdecisions\u002F0013-linter-coverage",[24,29,60,83],{"labelKey":25,"icon":26,"to":27,"badge":28},"app.menu.allProjects","i-lucide-layers","\u002Fprojects","11",{"labelKey":30,"icon":31,"to":32,"badge":33,"children":34},"app.menu.kinds.apps","i-lucide-app-window","\u002Fprojects?kind=apps","5",[35,40,45,50,55],{"label":36,"icon":31,"to":37,"badge":38,"coverage":39},"developer-portal","\u002Fprojects\u002Fdeveloper-portal","94%",94.37,{"label":41,"icon":31,"to":42,"badge":43,"coverage":44},"huella-legal","\u002Fprojects\u002Fhuella-legal","97%",97.48,{"label":46,"icon":31,"to":47,"badge":48,"coverage":49},"marina-roustan","\u002Fprojects\u002Fmarina-roustan","100%",100,{"label":51,"icon":31,"to":52,"badge":53,"coverage":54},"portfolio","\u002Fprojects\u002Fportfolio","91%",91.31,{"label":56,"icon":31,"to":57,"badge":58,"coverage":59},"wp-editor","\u002Fprojects\u002Fwp-editor","50%",49.89,{"labelKey":61,"icon":62,"to":63,"badge":64,"children":65},"app.menu.kinds.packages","i-lucide-package","\u002Fprojects?kind=packages","4",[66,71,75,80],{"label":67,"icon":62,"to":68,"badge":69,"coverage":70},"configs","\u002Fprojects\u002Fconfigs","76%",75.7,{"label":72,"icon":62,"to":73,"badge":48,"coverage":74},"content","\u002Fprojects\u002Fcontent",99.58,{"label":76,"icon":62,"to":77,"badge":78,"coverage":79},"i18n","\u002Fprojects\u002Fi18n","99%",99.08,{"label":81,"icon":62,"to":82,"badge":48,"coverage":49},"observability","\u002Fprojects\u002Fobservability",{"labelKey":84,"icon":85,"to":86,"badge":87,"children":88},"app.menu.kinds.infrastructure","i-lucide-server","\u002Fprojects?kind=infrastructure","2",[89,94],{"label":90,"icon":85,"to":91,"badge":92,"coverage":93},"scripts","\u002Fprojects\u002Fscripts","79%",78.6,{"label":95,"icon":85,"to":96,"badge":97,"coverage":98},"translations","\u002Fprojects\u002Ftranslations","93%",93.33,[100,103,106,109,112],{"label":101,"to":102},"Huella Legal","\u002Fworkflows\u002Fhuella-legal",{"label":104,"to":105},"Marina Roustan","\u002Fworkflows\u002Fmarina-roustan",{"label":107,"to":108},"Developer portal front door","\u002Fworkflows\u002Fdeveloper-portal-front-door",{"label":110,"to":111},"Huella Legal editorial","\u002Fworkflows\u002Fhuella-legal-editorial",{"labelKey":113,"icon":114,"to":115},"app.menu.newProject","i-lucide-plus","\u002Fworkflows\u002Fnew",{"id":117,"title":118,"body":119,"description":351,"extension":359,"kind":360,"meta":361,"navigation":365,"path":366,"seo":367,"stem":368,"url":360,"verdict":360,"__hash__":369},"docs\u002Fdocs\u002Fdecisions\u002F0002-docs-drift-detection.md","🧭 Layered detection for docs drift",{"type":120,"value":121,"toc":350},"minimark",[122,126,131,156,160,163,211,218,222,284,288,291,300,303,307],[123,124,118],"h1",{"id":125},"layered-detection-for-docs-drift",[127,128,130],"h2",{"id":129},"context","Context",[132,133,134,135,139,140,143,144,151,152,155],"p",{},"Duplicated content across the repo already drifts — the ",[136,137,138],"code",{},"boundaries.ts"," ↔ README architecture\ntable pair and the ",[136,141,142],{},"docs\u002Freviews"," history table are both known cases, and CLAUDE.md calls the\nfirst one out by name as \"the standing failure mode in this repo.\" The only mechanism catching it\ntoday is ",[145,146,148],"a",{"href":147},"repo:.claude\u002Fhooks\u002Fcheck-invariants.sh",[136,149,150],{},"check-invariants.sh",", a ",[136,153,154],{},"PostToolUse"," hook\nthat fires only when Claude Code itself edits one of a few hardcoded known-pairs, one file at a\ntime. Nothing runs in CI or the pre-push hook, nothing checks relative links between docs, and\nnothing catches a human PR, a multi-file edit, or a kind of drift the hook doesn't already know\nabout.",[127,157,159],{"id":158},"result","Result",[132,161,162],{},"No single mechanism covers every class of drift, so three layered checks are adopted, each scoped\nto the failure mode only it catches:",[164,165,166,188,205],"ol",{},[167,168,169,173,174,177,178,183,184,187],"li",{},[170,171,172],"strong",{},"Generate, don't duplicate, where the source is code."," The README's ",[136,175,176],{},"Who has it"," column\ncan't come from ",[145,179,181],{"href":180},"repo:packages\u002Fconfigs\u002Fsrc\u002Feslint\u002Flib\u002Fboundaries.ts",[136,182,138],{}," alone —\nit also depends on every package's ",[136,185,186],{},"nx.tags"," — but both together are enough to render the whole\narchitecture table. A script does that and CI fails if the checked-in README differs from the\nrender. This retires the exact case CLAUDE.md names, structurally rather than by reminder.",[167,189,190,197,198,200,201,204],{},[170,191,192,193,196],{},"A repo-wide ",[136,194,195],{},"docs:check"," step in CI and the pre-push hook."," ",[136,199,150],{},"'s\nremaining rules (a new ",[136,202,203],{},"docs\u002Freviews\u002F*.md"," has its history row, a new project has its tag\nentries in all three places) aren't renderable from a single source, so they stay\nassertion-based — but the assertion has to run over the whole tree, not the one file an agent\nhappens to be editing, so it also catches human PRs and GitHub-web edits.",[167,206,207,210],{},[170,208,209],{},"A markdown link checker in CI."," Orthogonal to both of the above: a renamed or deleted file\norphans a relative link without duplicating or contradicting anything, so neither generation nor\nan invariant assertion would ever see it.",[132,212,213,214,217],{},"Scheduled ",[136,215,216],{},"repo-review"," runs are deferred out of this decision (see Consequences) rather than\nadopted as a fourth layer now.",[127,219,221],{"id":220},"options-considered","Options considered",[223,224,225,243],"table",{},[226,227,228],"thead",{},[229,230,231,235],"tr",{},[232,233,234],"th",{},"Option",[232,236,237,238,242],{},"Why not (as the ",[239,240,241],"em",{},"only"," mechanism)",[244,245,246,258,266,274],"tbody",{},[229,247,248,255],{},[249,250,251,252,254],"td",{},"Keep ",[136,253,150],{}," as-is",[249,256,257],{},"Fires only inside a Claude Code session editing one file; a human PR, a GitHub-web edit, or a multi-file agent pass never trips it",[229,259,260,263],{},[249,261,262],{},"Generate everything from source",[249,264,265],{},"Only works where a single source of truth exists in code — prose (the reasoning in a README, this record's own Context) has no source to generate from",[229,267,268,271],{},[249,269,270],{},"Link checker only",[249,272,273],{},"Catches dead links, not two live sections that still resolve but now say different things",[229,275,276,281],{},[249,277,213,278,280],{},[136,279,216],{}," only",[249,282,283],{},"Catches prose-level semantic drift a diff can't see, but a monthly cadence is too coarse to stop structural duplication from landing in the first place — it's a complement to the other layers, not a replacement",[127,285,287],{"id":286},"consequences","Consequences",[132,289,290],{},"Unlocks a CI gate that catches drift regardless of edit path, plus a generation step that removes\nthe specific pair CLAUDE.md flags as the repo's standing failure mode. Forecloses nothing — all\nthree layers are additive to what exists.",[132,292,213,293,295,296,299],{},[136,294,216],{}," stays deferred: it needs a run environment outside GitHub Actions (there is\nno Claude\u002Fagent execution in ",[136,297,298],{},".github\u002Fworkflows\u002F"," today), and the three layers above already cover\nevery drift case found during this decision. Revisit it if a future review's Docs card catches a\ncontradiction none of the three layers would have — that's the signal that structural checks have\nhit their ceiling and a slower, prose-level pass earns its cost.",[132,301,302],{},"Each layer is small enough to be its own follow-up implementation issue rather than one large\nchange; none has been filed yet.",[127,304,306],{"id":305},"confirmation","Confirmation",[132,308,309,312,313,316,317,323,324,327,328,331,332,334,335,341,342,345,346,349],{},[170,310,311],{},"Two of the three layers now run in CI",", not one — this file previously read ",[136,314,315],{},"Status: Implemented","\nwith none of the three built, the exact case\n",[145,318,320],{"href":319},"\u002Fwiki\u002Fdocs\u002Fdecisions\u002F0011-docs-system-enforcement",[136,321,322],{},"0011-docs-system-enforcement.md"," names as a symptom of the\nstatus line tracking the wrong thing. ",[136,325,326],{},"pnpm exec nx check-docs @joinery\u002Fdeveloper-portal"," in ",[136,329,330],{},"ci.yml","\nruns the markdown link checker (layer 3) and the ",[136,333,150],{},"-mirrored assertions (the\nassertion half of layer 2) over the whole tree, not only the file a Claude Code session happens to\nbe editing. ",[170,336,337,338,340],{},"Layer 1 — generating the architecture table from ",[136,339,138],{}," instead of only\nasserting it matches — is still unbuilt",", and the pre-push hook still doesn't run this check, which\nis why ",[136,343,344],{},"status"," stays ",[136,347,348],{},"to-implement"," rather than flipping back.",{"title":351,"searchDepth":352,"depth":352,"links":353},"",2,[354,355,356,357,358],{"id":129,"depth":352,"text":130},{"id":158,"depth":352,"text":159},{"id":220,"depth":352,"text":221},{"id":286,"depth":352,"text":287},{"id":305,"depth":352,"text":306},"md",null,{"issue":362,"status":363,"decision":364},40,"implemented","accepted",true,"\u002Fdocs\u002Fdecisions\u002F0002-docs-drift-detection",{"title":118,"description":351},"docs\u002Fdecisions\u002F0002-docs-drift-detection","1onXToB-8wSYu6ZRdG_H1_Blbh-71AtU2uOnADOw10k",1795478398421]