[{"data":1,"prerenderedAt":670},["ShallowReactive",2],{"figure-telemetry":3,"menu-audits":6,"menu-decisions":7,"menu-projects":23,"menu-workflows":99,"decision-0009-comment-discipline":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":651,"extension":659,"kind":660,"meta":661,"navigation":665,"path":666,"seo":667,"stem":668,"url":660,"verdict":660,"__hash__":669},"docs\u002Fdocs\u002Fdecisions\u002F0009-comment-discipline.md","🧭 Comment discipline: one fact per comment, enforced by a skill and not a hook",{"type":120,"value":121,"toc":650},"minimark",[122,126,131,152,164,168,179,185,295,310,323,405,428,446,494,498,600,604,617,628,632],[123,124,118],"h1",{"id":125},"comment-discipline-one-fact-per-comment-enforced-by-a-skill-and-not-a-hook",[127,128,130],"h2",{"id":129},"context","Context",[132,133,134,135,139,140,143,144,147,148,151],"p",{},"Issue #82 is titled \"Improve Claude comments\" with no body beyond \"As title says\" — the framing\ncame from a separately drafted proposal, not the issue thread. That proposal asks for three\nartifacts: a ",[136,137,138],"code",{},"## Comments"," section appended to CLAUDE.md, a new ",[136,141,142],{},".agents\u002Fskills\u002Fcomment-cleanup\u002F","\nskill, and a ",[136,145,146],{},"PostToolUse"," hook on every ",[136,149,150],{},"Edit|Write|MultiEdit"," that sends newly added comment lines\nto an LLM judge and blocks when it finds narration.",[132,153,154,155,159,160,163],{},"Two questions sit inside that, and the first pass of this report only answered one of them. The\n",[156,157,158],"em",{},"delivery"," question — is one more paragraph, one more skill and one more always-on hook how this\nrepo enforces things — is answered below and unchanged. The ",[156,161,162],{},"policy"," question — what the rule should\nactually say — went untested against the code it governs. Measuring the repo afterwards showed the\nrule as drafted does not describe a comment anyone would want, and that this repo's own comments are\nthe evidence.",[127,165,167],{"id":166},"result","Result",[132,169,170,174,175,178],{},[171,172,173],"strong",{},"The prior rule was \"a comment must justify its line.\" That produces justification, and\njustification is prose."," The rule is: ",[156,176,177],{},"a comment carries one fact that isn't in the code, in one\nsentence."," Everything below is why.",[132,180,181,184],{},[171,182,183],{},"1. The density is real, and it is localised."," 14,193 words of comment prose against 10,733 lines\nof code — roughly a novella of English inside a small monorepo. It is not spread evenly:",[186,187,188,204],"table",{},[189,190,191],"thead",{},[192,193,194,198,201],"tr",{},[195,196,197],"th",{},"Project",[195,199,200],{},"Comment lines \u002F code lines",[195,202,203],{},"Ratio",[205,206,207,228,241,254,267,280],"tbody",{},[192,208,209,222,225],{},[210,211,212,215,216,215,219],"td",{},[136,213,214],{},"packages\u002Fconfigs",", ",[136,217,218],{},"packages\u002Fobservability",[136,220,221],{},"infrastructure\u002Ftranslations",[210,223,224],{},"1–2 \u002F 150–300",[210,226,227],{},"0.6%",[192,229,230,235,238],{},[210,231,232],{},[136,233,234],{},"apps\u002Fhuella-legal",[210,236,237],{},"38 \u002F 875",[210,239,240],{},"4.3%",[192,242,243,248,251],{},[210,244,245],{},[136,246,247],{},"packages\u002Fi18n",[210,249,250],{},"41 \u002F 890",[210,252,253],{},"4.6%",[192,255,256,261,264],{},[210,257,258],{},[136,259,260],{},"packages\u002Fcontent",[210,262,263],{},"129 \u002F 2077",[210,265,266],{},"6.2%",[192,268,269,274,277],{},[210,270,271],{},[136,272,273],{},"apps\u002Fdeveloper-portal",[210,275,276],{},"369 \u002F 3790",[210,278,279],{},"9.7%",[192,281,282,287,290],{},[210,283,284],{},[136,285,286],{},"infrastructure\u002Fscripts",[210,288,289],{},"599 \u002F 2421",[210,291,292],{},[171,293,294],{},"24.7%",[132,296,297,298,300,301,303,304,306,307,309],{},"One comment line per four lines of code in ",[136,299,90],{},", forty times the ratio of ",[136,302,72],{},", under the\nsame rules in the same repo. Density tracks recency of agent authorship rather than complexity of\nthe code, which is what makes it a writing habit and not a property of the problem. ",[136,305,72],{}," and\n",[136,308,41],{}," at 4–6% are the house range; they were written under the same one-line policy and\ndid not drift.",[132,311,312,315,316,215,319,322],{},[171,313,314],{},"2. The failure is length, not count."," Of the block comments in the workspace, 82 are one line,\n111 are four to six, and 22 run seven to nineteen. The one-liners are almost all good —\n",[136,317,318],{},"\u002F** Most recent review first. *\u002F",[136,320,321],{},"\u002F** Words Title Case would ruin: nobody calls the component library \"Ui\". *\u002F"," — and the long ones fail in three named ways, none of which the drafted policy\ncatches:",[186,324,325,338],{},[189,326,327],{},[192,328,329,332,335],{},[195,330,331],{},"Mode",[195,333,334],{},"What it looks like",[195,336,337],{},"Example",[205,339,340,358,379],{},[192,341,342,345,348],{},[210,343,344],{},"Essay voice",[210,346,347],{},"Persuades an imagined critic instead of informing a reader: \"which is how a page stops meaning anything\"",[210,349,350,357],{},[351,352,354],"a",{"href":353},"repo:infrastructure\u002Fscripts\u002Fsrc\u002Fdev\u002Fdomain\u002Fprojects.ts",[136,355,356],{},"dev\u002Fdomain\u002Fprojects.ts"," — 33 comment lines over ~45 lines of code, majority prose",[192,359,360,363,369],{},[210,361,362],{},"Restating the code",[210,364,365,366],{},"A 3-line block over ",[136,367,368],{},"[name, name.replace(SCOPE, \"\"), label]",[210,370,371,374,375,378],{},[136,372,373],{},"spellings"," and ",[136,376,377],{},"matches",", same file",[192,380,381,384,387],{},[210,382,383],{},"Third copy",[210,385,386],{},"An architecture statement already in a README and a decision report",[210,388,389,397,398,404],{},[351,390,394],{"href":391,"rel":392},"https:\u002F\u002Fgithub.com\u002Fxfontr\u002Fjoinery\u002Fblob\u002Fd3f31e8\u002Fapps\u002Fdeveloper-portal\u002Flayers\u002Fsnapshot\u002Fshared\u002Ftypes.ts",[393],"nofollow",[136,395,396],{},"shared\u002Ftypes.ts"," header vs. ",[351,399,401],{"href":400},"\u002Fwiki\u002Fapps\u002Fdeveloper-portal\u002Freadme",[136,402,403],{},"developer-portal\u002FREADME.md"," lines 95–99, near-verbatim",[132,406,407,410,416,417,420,421,423,424,427],{},[171,408,409],{},"3. A comment that points at another comment rots fastest, and one already has.",[351,411,413],{"href":412},"repo:infrastructure\u002Fscripts\u002Fsrc\u002Fshared\u002Fadapters\u002Fexec.ts",[136,414,415],{},"shared\u002Fadapters\u002Fexec.ts"," reads \"every\ncaller here already reads a failure back off the caught error (",[136,418,419],{},"gh.ts","'s comments say so\nexplicitly)\". Three files are named ",[136,422,419],{},", and the ",[136,425,426],{},"shared\u002F"," one carries no such comment. Pointer\nrot is not a hypothetical this policy is guarding against; it happened inside the branch that exists\nto fix comments.",[132,429,430,433,434,437,438,441,442,445],{},[171,431,432],{},"4. The keep-test that survives both readers is \"can this be reconstructed from present state?\"","\nA comment explaining what the code does is worthless to a human who can read it and to a model that\nreads it faster. What neither can reconstruct is ",[156,435,436],{},"history and outside constraint",": what a scanner\nflagged, the bug behind a strange sort order, a trap in a type. That test keeps roughly 15–20\ncomments in this workspace. Everything else is either derivable from the code or already written\ndown in a README, a ",[136,439,440],{},"CLAUDE.md"," or a report under ",[136,443,444],{},"docs\u002Fdecisions\u002F"," — which the next reader, human or\nagent, reaches anyway.",[132,447,448,451,452,455,456,459,460,463,464,467,468,471,472,475,476,478,479,482,483,486,487,490,491,493],{},[171,449,450],{},"5. The three proposed artifacts, unchanged from the first pass."," The CLAUDE.md section holds,\nfolded under an emoji heading per ",[136,453,454],{},"house-docs"," and replacing the ",[136,457,458],{},"## ✍️ Style"," bullet rather than\nsitting beside it. The ",[136,461,462],{},"comment-cleanup"," skill holds: its comment-only, byte-identical-code\nguarantee is the thing neither ",[136,465,466],{},"simplify"," nor ",[136,469,470],{},"code-review --fix"," offers, and it gets a row in the\n",[136,473,474],{},"## 🛠️ Skills"," table. The ",[136,477,146],{}," hook does not: ",[136,480,481],{},"type: \"prompt\""," hooks return\n",[136,484,485],{},"{\"ok\", \"reason\"}",", so the drafted ",[136,488,489],{},"{\"decision\": \"block\"}"," is a field the handler never reads and\nthe hook would cost a model call and flag nothing. Past the schema bug, ",[136,492,146],{}," fires after\nthe edit lands and so cannot block it, and it would be the first LLM-judged link in a hook chain\nthat is otherwise deterministic shell.",[127,495,497],{"id":496},"options-considered","Options considered",[186,499,500,510],{},[189,501,502],{},[192,503,504,507],{},[195,505,506],{},"Option",[195,508,509],{},"Why not",[205,511,512,523,534,542,550,565,587],{},[192,513,514,517],{},[210,515,516],{},"Keep \"a comment must justify its line\"",[210,518,519,520,522],{},"It is satisfiable by writing a better argument, so it selects for paragraphs — ",[136,521,286],{}," at 24.7% is what the rule produces when followed carefully",[192,524,525,531],{},[210,526,527,528],{},"Enforce the 4–6% ratio in ",[136,529,530],{},"check-invariants.sh",[210,532,533],{},"The ratio is a symptom, and a legitimately dense file (a regex, a protocol adapter) would fail while a file of 40 tidy one-line narrations would pass. Measure it to calibrate a human judgment, don't gate on it",[192,535,536,539],{},[210,537,538],{},"An ESLint rule capping comment-block length",[210,540,541],{},"Closer to enforceable than ratio, but a five-line block split into five adjacent one-line comments passes it unchanged — it moves the noise rather than removing it",[192,543,544,547],{},[210,545,546],{},"A custom ESLint rule for comment quality",[210,548,549],{},"\"Why vs. what\" is a judgment no static rule makes; other unenforceable CLAUDE.md prose (the git rules, the dependency check-in) is left as prose too",[192,551,552,555],{},[210,553,554],{},"Hook exactly as drafted",[210,556,557,558,561,562,564],{},"Returns ",[136,559,560],{},"decision: block",", a field ",[136,563,481],{}," hooks don't read — it would never fire",[192,566,567,577],{},[210,568,569,570,573,574],{},"Hook with the field fixed to ",[136,571,572],{},"ok","\u002F",[136,575,576],{},"reason",[210,578,579,580,582,583,586],{},"Still can't block on ",[136,581,146],{}," (the edit already landed) and, without ",[136,584,585],{},"continueOnBlock: true",", ends the turn on a warning instead of routing the reason back",[192,588,589,597],{},[210,590,591,593,594,596],{},[136,592,466],{}," \u002F ",[136,595,470],{}," instead of a new skill",[210,598,599],{},"Both mix code and comment edits; the value here is the comment-only, byte-identical-diff guarantee",[127,601,603],{"id":602},"consequences","Consequences",[132,605,606,607,609,610,612,613,616],{},"Unlocks a comment pass with a calibration anchor rather than only a principle: 4–6% is what this\nrepo looks like when the rule is followed, and a file far outside it is worth opening. Calls for a\nsweep of the two projects that drifted — ",[136,608,286],{}," from ~600 comment lines to ~120\nand ",[136,611,273],{}," from ~370, almost all of it shortening rather than deleting, since most of\nthese comments have one good sentence inside a paragraph. That sweep is the work this report is\nwaiting on, which is why the status line reads ",[136,614,615],{},"To implement"," while the policy and the skill\nthemselves are already in the repo.",[132,618,619,620,573,622,624,625,627],{},"Forecloses, for now, a real-time gate on every edit: the hook doesn't ship until it is rewritten\nagainst the ",[136,621,572],{},[136,623,576],{}," contract, ",[136,626,585],{}," is set, and its false-positive rate is\nknown. Revisit once the sweep shows whether an on-demand skill catches drift early enough on its\nown — the 24.7% figure is the baseline any future gate gets judged against.",[127,629,631],{"id":630},"confirmation","Confirmation",[132,633,634,374,636,638,639,641,642,645,646,649],{},[136,635,286],{},[136,637,273],{}," landing in the 4–6% comment-line-to-code-line band —\nthe same count Result item 1 used — once the ",[136,640,462],{}," sweep runs. Not yet checked, which is\nwhy ",[136,643,644],{},"status"," stays ",[136,647,648],{},"to-implement",".",{"title":651,"searchDepth":652,"depth":652,"links":653},"",2,[654,655,656,657,658],{"id":129,"depth":652,"text":130},{"id":166,"depth":652,"text":167},{"id":496,"depth":652,"text":497},{"id":602,"depth":652,"text":603},{"id":630,"depth":652,"text":631},"md",null,{"issue":662,"status":663,"decision":664},82,"implemented","accepted",true,"\u002Fdocs\u002Fdecisions\u002F0009-comment-discipline",{"title":118,"description":651},"docs\u002Fdecisions\u002F0009-comment-discipline","0RBuHtE-Xz8uPNREugYqqd9n6yhrR9rKLuypKgTABdQ",1795478398111]