[{"data":1,"prerenderedAt":1264},["ShallowReactive",2],{"figure-telemetry":3,"menu-audits":6,"menu-decisions":7,"menu-projects":23,"menu-workflows":99,"wiki":116,"doc-\u002Fdocs\u002Fdecisions\u002F0004-scripts-architecture":429},{"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",[117,134,210,255,291,352],{"id":118,"label":119,"icon":120,"blurb":121,"groups":122},"workspace","Workspace","i-lucide-home","The two files at the root, and the generated index of everything the repo can do.",[123],{"key":124,"label":125,"entries":126},"root","The root",[127,131],{"path":128,"label":129,"kind":130},"\u002Freadme","Joinery","readme",{"path":132,"label":133,"kind":130},"\u002Fsecurity","Security policy",{"id":135,"label":136,"icon":137,"blurb":138,"groups":139},"docs","Docs","i-lucide-library","Subjects no single project owns — the models, the procedures, the answered decisions.",[140,150,168,186,192,198,204],{"key":135,"label":141,"entries":142},"Start here",[143,147],{"path":144,"label":145,"kind":146},"\u002Fdocs\u002Freadme","Overview","doc",{"path":148,"label":149,"kind":146},"\u002Fdocs\u002Ffeatures","Features",{"key":151,"label":152,"entries":153},"concepts","Concepts",[154,156,159,162,165],{"path":155,"label":145,"kind":146},"\u002Fdocs\u002Fconcepts\u002Freadme",{"path":157,"label":158,"kind":146},"\u002Fdocs\u002Fconcepts\u002Fversioning","How a version gets derived from a commit",{"path":160,"label":161,"kind":146},"\u002Fdocs\u002Fconcepts\u002Fconventions","Naming and folder conventions",{"path":163,"label":164,"kind":146},"\u002Fdocs\u002Fconcepts\u002Fagent-setup","The agent setup as one inspectable system",{"path":166,"label":167,"kind":146},"\u002Fdocs\u002Fconcepts\u002Fboundaries","Why the boundary system exists",{"key":169,"label":170,"entries":171},"guides","Guides",[172,174,177,180,183],{"path":173,"label":145,"kind":146},"\u002Fdocs\u002Fguides\u002Freadme",{"path":175,"label":176,"kind":146},"\u002Fdocs\u002Fguides\u002Fchange-lifecycle","A change, end to end",{"path":178,"label":179,"kind":146},"\u002Fdocs\u002Fguides\u002Fadding-a-locale","Adding a locale",{"path":181,"label":182,"kind":146},"\u002Fdocs\u002Fguides\u002Ffirst-hour","First hour in this repo",{"path":184,"label":185,"kind":146},"\u002Fdocs\u002Fguides\u002Frepo-secrets","Provisioning the repo secrets",{"key":187,"label":188,"entries":189},"decisions","Decisions",[190],{"path":191,"label":145,"kind":146},"\u002Fdocs\u002Fdecisions\u002Freadme",{"key":193,"label":194,"entries":195},"audits","Audits",[196],{"path":197,"label":145,"kind":146},"\u002Fdocs\u002Faudits\u002Freadme",{"key":199,"label":200,"entries":201},"workflows","Workflows",[202],{"path":203,"label":145,"kind":146},"\u002Fdocs\u002Fworkflows\u002Freadme",{"key":205,"label":206,"entries":207},"benchmarks","Benchmarks",[208],{"path":209,"label":145,"kind":146},"\u002Fdocs\u002Fbenchmarks\u002Freadme",{"id":211,"label":212,"icon":31,"blurb":213,"groups":214},"apps","Apps","Each app's own reference, colocated with its code so it changes in the same diff.",[215,220,233,240,245,250],{"key":36,"label":216,"entries":217},"Developer Portal",[218],{"path":219,"label":145,"kind":130},"\u002Fapps\u002Fdeveloper-portal\u002Freadme",{"key":41,"label":101,"entries":221},[222,224,227,230],{"path":223,"label":145,"kind":130},"\u002Fapps\u002Fhuella-legal\u002Freadme",{"path":225,"label":226,"kind":130},"\u002Fapps\u002Fhuella-legal\u002Fdesign","Huella Legal design",{"path":228,"label":229,"kind":130},"\u002Fapps\u002Fhuella-legal\u002Flayers\u002Finterest\u002Freadme","layers\u002Finterest",{"path":231,"label":232,"kind":130},"\u002Fapps\u002Fhuella-legal\u002Flayers\u002Flegacy\u002Freadme","layers\u002Flegacy",{"key":46,"label":104,"entries":234},[235,237],{"path":236,"label":145,"kind":130},"\u002Fapps\u002Fmarina-roustan\u002Freadme",{"path":238,"label":239,"kind":130},"\u002Fapps\u002Fmarina-roustan\u002Fdesign","Marina Roustan design",{"key":51,"label":241,"entries":242},"Portfolio",[243],{"path":244,"label":145,"kind":130},"\u002Fapps\u002Fportfolio\u002Freadme",{"key":130,"label":246,"entries":247},"Readme",[248],{"path":249,"label":212,"kind":130},"\u002Fapps\u002Freadme",{"key":56,"label":251,"entries":252},"Wp Editor",[253],{"path":254,"label":145,"kind":130},"\u002Fapps\u002Fwp-editor\u002Freadme",{"id":256,"label":257,"icon":62,"blurb":258,"groups":259},"packages","Packages","Each package's own reference, colocated with its code so it changes in the same diff.",[260,268,276,282,287],{"key":67,"label":261,"entries":262},"Configs",[263,265],{"path":264,"label":145,"kind":130},"\u002Fpackages\u002Fconfigs\u002Freadme",{"path":266,"label":267,"kind":130},"\u002Fpackages\u002Fconfigs\u002Fsrc\u002Feslint\u002Flib\u002Freadme","eslint\u002Flib",{"key":72,"label":269,"entries":270},"Content",[271,273],{"path":272,"label":145,"kind":130},"\u002Fpackages\u002Fcontent\u002Freadme",{"path":274,"label":275,"kind":130},"\u002Fpackages\u002Fcontent\u002Fsrc\u002Fnuxt\u002Freadme","nuxt",{"key":76,"label":76,"entries":277},[278,280],{"path":279,"label":145,"kind":130},"\u002Fpackages\u002Fi18n\u002Freadme",{"path":281,"label":275,"kind":130},"\u002Fpackages\u002Fi18n\u002Fsrc\u002Fnuxt\u002Freadme",{"key":81,"label":283,"entries":284},"Observability",[285],{"path":286,"label":145,"kind":130},"\u002Fpackages\u002Fobservability\u002Freadme",{"key":130,"label":246,"entries":288},[289],{"path":290,"label":257,"kind":130},"\u002Fpackages\u002Freadme",{"id":292,"label":293,"icon":85,"blurb":294,"groups":295},"infrastructure","Infrastructure","Each service's own reference, colocated with its code so it changes in the same diff.",[296,300,347],{"key":130,"label":246,"entries":297},[298],{"path":299,"label":293,"kind":130},"\u002Finfrastructure\u002Freadme",{"key":90,"label":301,"entries":302},"Scripts",[303,305,308,311,314,317,320,323,326,329,332,335,338,341,344],{"path":304,"label":145,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Freadme",{"path":306,"label":307,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fbrand\u002Freadme","brand",{"path":309,"label":310,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fci-failures\u002Freadme","ci-failures",{"path":312,"label":313,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fcoverage-report\u002Freadme","coverage-report",{"path":315,"label":316,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fdev\u002Freadme","dev",{"path":318,"label":319,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fdrift\u002Freadme","drift",{"path":321,"label":322,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fenv-sync\u002Freadme","env-sync",{"path":324,"label":325,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Finvariants\u002Freadme","invariants",{"path":327,"label":328,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fissue\u002Freadme","issue",{"path":330,"label":331,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fmap\u002Freadme","map",{"path":333,"label":334,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fshared\u002Freadme","shared",{"path":336,"label":337,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fship\u002Freadme","ship",{"path":339,"label":340,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fusage\u002Freadme","usage",{"path":342,"label":343,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fworkflow\u002Freadme","workflow",{"path":345,"label":346,"kind":130},"\u002Finfrastructure\u002Fscripts\u002Fsrc\u002Fworktree\u002Freadme","worktree",{"key":95,"label":348,"entries":349},"Translations",[350],{"path":351,"label":145,"kind":130},"\u002Finfrastructure\u002Ftranslations\u002Freadme",{"id":353,"label":354,"icon":355,"blurb":356,"groups":357},"agents","Agent setup","i-lucide-bot","The skills and subagents an agent working in this repo loads.",[358,373],{"key":353,"label":359,"entries":360},"Subagents",[361,364,367,370],{"path":362,"label":363,"kind":130},"\u002F.claude\u002Fagents\u002Freview-architecture","Review Architecture",{"path":365,"label":366,"kind":130},"\u002F.claude\u002Fagents\u002Freview-correctness","Review Correctness",{"path":368,"label":369,"kind":130},"\u002F.claude\u002Fagents\u002Freview-tests","Review Tests",{"path":371,"label":372,"kind":130},"\u002F.claude\u002Fagents\u002Fticket-planner","Ticket Planner",{"key":374,"label":375,"entries":376},"skills","Skills",[377,381,384,387,390,393,396,399,402,405,408,411,414,417,420,423,426],{"path":378,"label":379,"kind":380},"\u002F.claude\u002Fskills\u002Fcontent-new-vendor\u002Fskill","Adding a content vendor","skill",{"path":382,"label":383,"kind":380},"\u002F.claude\u002Fskills\u002Fconfigs-new-rule\u002Fskill","Adding a lint rule",{"path":385,"label":386,"kind":380},"\u002F.claude\u002Fskills\u002Fscripts-new-script\u002Fskill","Adding a script",{"path":388,"label":389,"kind":380},"\u002F.claude\u002Fskills\u002Fi18n-new-vendor\u002Fskill","Adding a translations vendor",{"path":391,"label":392,"kind":380},"\u002F.claude\u002Fskills\u002Fnuxt-module-route\u002Fskill","Adding to a package's Nuxt module",{"path":394,"label":395,"kind":380},"\u002F.claude\u002Fskills\u002Fbenchmark\u002Fskill","Benchmarking a design",{"path":397,"label":398,"kind":380},"\u002F.claude\u002Fskills\u002Fwp-bulk-edit\u002Fskill","Bulk-editing WordPress through the editor",{"path":400,"label":401,"kind":380},"\u002F.claude\u002Fskills\u002Fdoc-drift-check\u002Fskill","Checking docs against code",{"path":403,"label":404,"kind":380},"\u002F.claude\u002Fskills\u002Fcomment-cleanup\u002Fskill","Comment cleanup",{"path":406,"label":407,"kind":380},"\u002F.claude\u002Fskills\u002Fgithub-issue\u002Fskill","Creating a GitHub issue",{"path":409,"label":410,"kind":380},"\u002F.claude\u002Fskills\u002Fproject-workflow\u002Fskill","Running a project through a workflow",{"path":412,"label":413,"kind":380},"\u002F.claude\u002Fskills\u002Fnew-package\u002Fskill","Scaffolding a workspace project",{"path":415,"label":416,"kind":380},"\u002F.claude\u002Fskills\u002Fstart-issue\u002Fskill","Starting work on a GitHub issue",{"path":418,"label":419,"kind":380},"\u002F.claude\u002Fskills\u002Fdecision-report\u002Fskill","Writing a decision report",{"path":421,"label":422,"kind":380},"\u002F.claude\u002Fskills\u002Faudit-report\u002Fskill","Writing an audit",{"path":424,"label":425,"kind":380},"\u002F.claude\u002Fskills\u002Fhouse-docs\u002Fskill","Writing docs here",{"path":427,"label":428,"kind":380},"\u002F.claude\u002Fskills\u002Fwriting-tests\u002Fskill","Writing specs here",{"id":430,"title":431,"body":432,"description":578,"extension":1253,"kind":1254,"meta":1255,"navigation":1259,"path":1260,"seo":1261,"stem":1262,"url":1254,"verdict":1254,"__hash__":1263},"docs\u002Fdocs\u002Fdecisions\u002F0004-scripts-architecture.md","🧭 One architecture for the scripts package",{"type":433,"value":434,"toc":1245},"minimark",[435,439,444,497,532,536,569,579,720,740,755,809,858,896,929,933,1146,1150,1167,1211,1214,1218],[436,437,431],"h1",{"id":438},"one-architecture-for-the-scripts-package",[440,441,443],"h2",{"id":442},"context","Context",[445,446,447,451,452,455,456,455,459,455,462,465,466,469,470,473,474,477,478,481,482,455,485,488,489,492,493,496],"p",{},[448,449,450],"code",{},"infrastructure\u002Fscripts"," grew one folder per script — ",[448,453,454],{},"issue\u002F",", ",[448,457,458],{},"drift\u002F",[448,460,461],{},"map\u002F",[448,463,464],{},"coverage\u002F",", plus\n",[448,467,468],{},"shared\u002F"," — with no stated hierarchy inside a folder. ",[448,471,472],{},"issue\u002Findex.ts"," consumes only ",[448,475,476],{},"add"," and\n",[448,479,480],{},"pick",", so ",[448,483,484],{},"gh.ts",[448,486,487],{},"git.ts"," and ",[448,490,491],{},"branch.ts"," are reached from somewhere else in the folder and\nnothing says from where or in which direction. The symptoms are concrete: four ",[448,494,495],{},"index.ts"," files with\nfour different shapes, six exit conventions, two output idioms picked per-file rather than per\naudience, and the repo root resolved three separate times three different ways.",[445,498,499,500,503,504,507,508,455,511,488,514,455,517,520,521,488,523,525,526,528,529,531],{},"The proposal on the table was to give every script the same set of subfolders — ",[448,501,502],{},"commands\u002F"," with a\nbarrel index, ",[448,505,506],{},"types\u002F"," or ",[448,509,510],{},"types.ts",[448,512,513],{},"constants.ts",[448,515,516],{},"configs\u002Fenvironment.ts",[448,518,519],{},"helpers\u002F"," — and\nto move ",[448,522,487],{},[448,524,484],{}," into ",[448,527,468],{},", since two ",[448,530,487],{}," files exist today.",[440,533,535],{"id":534},"result","Result",[445,537,538,539,541,542,546,547,550,551,554,555,558,559,561,562,488,565,568],{},"The package is four files short of already being layered, and three of those four are ",[448,540,495],{},".\nClassifying all 21 non-spec files leaves no residue: each is an ",[543,544,545],"strong",{},"entry",", a ",[543,548,549],{},"command",", an\n",[543,552,553],{},"adapter"," or a pure ",[543,556,557],{},"domain"," module. Those four roles become the layout — ",[448,560,495],{}," and the\ncommand at a script folder's root, then ",[448,563,564],{},"adapters\u002F",[448,566,567],{},"domain\u002F"," beneath it:",[570,571,576],"pre",{"className":572,"code":574,"language":575},[573],"language-text","issue\u002F                    drift\u002F                   map\u002F\n  index.ts                  index.ts                 index.ts\n  add.ts                    main.ts                  main.ts\n  pick.ts                   adapters\u002Fgit.ts          adapters\u002Ffiles.ts\n  adapters\u002Fgh.ts            domain\u002Fdetect.ts         domain\u002Fcapabilities.ts\n  adapters\u002Fgit.ts                                    domain\u002Frender.ts\n  adapters\u002Fprompts.ts\n  domain\u002Fbranch.ts\n","text",[448,577,574],{"__ignoreMap":578},"",[580,581,582,601],"table",{},[583,584,585],"thead",{},[586,587,588,592,595,598],"tr",{},[589,590,591],"th",{},"Layer",[589,593,594],{},"What it is",[589,596,597],{},"Where",[589,599,600],{},"May import",[602,603,604,627,647,686],"tbody",{},[586,605,606,609,616,621],{},[607,608,545],"td",{},[607,610,611,612,615],{},"Hands its commands to ",[448,613,614],{},"run"," and nothing else",[607,617,618,619],{},"always ",[448,620,495],{},[607,622,623,626],{},[448,624,625],{},"shared\u002Fcli.ts"," + its own commands",[586,628,629,631,634,641],{},[607,630,549],{},[607,632,633],{},"One user-facing invocation: orchestration, prompts, output, exit meaning",[607,635,636,637,640],{},"the folder root — ",[448,638,639],{},"main.ts",", or one file per subcommand",[607,642,643,644],{},"anything in its own folder, ",[448,645,646],{},"shared\u002F*",[586,648,649,651,654,681],{},[607,650,553],{},[607,652,653],{},"Exactly one door out: subprocess, filesystem, network, terminal",[607,655,656,455,658,661,662,455,664,455,666,455,669,455,672,455,675,455,678],{},[448,657,564],{},[543,659,660],{},"named after the boundary it wraps"," — ",[448,663,487],{},[448,665,484],{},[448,667,668],{},"nx.ts",[448,670,671],{},"cache.ts",[448,673,674],{},"files.ts",[448,676,677],{},"prompts.ts",[448,679,680],{},"io.ts",[607,682,683,684],{},"domain, ",[448,685,646],{},[586,687,688,690,693,713],{},[607,689,557],{},[607,691,692],{},"Pure functions and the types they operate on",[607,694,695,697,698,455,701,455,704,455,707,455,710],{},[448,696,567],{},", named after the noun it computes — ",[448,699,700],{},"branch",[448,702,703],{},"detect",[448,705,706],{},"capabilities",[448,708,709],{},"render",[448,711,712],{},"merge",[607,714,715,716,719],{},"other domain, ",[448,717,718],{},"shared\u002Ferrors.ts",", pure stdlib",[445,721,722,723,726,727,731,732,735,736,739],{},"Direction: ",[543,724,725],{},"entry → command → adapter → domain, never back up and never sideways between script\nfolders."," One scoped exception — a command may import another command in the ",[728,729,730],"em",{},"same"," folder, which\nis what keeps ",[448,733,734],{},"add.ts"," → ",[448,737,738],{},"pick.ts"," legal rather than pushing that prompt into the dispatcher.",[445,741,742,743,746,747,750,751,754],{},"The four roles were first adopted as a ",[543,744,745],{},"naming convention on a flat tree",", documented in the\npackage README, on the grounds that nine directories for 21 files was poor economics and three of\nthem would hold a single file. That was reversed on review, and the reason is worth keeping: the\ncomplaint being answered was ",[728,748,749],{},"\"I open the folder and it's a mess\"",", and a flat ",[448,752,753],{},"add.ts branch.ts gh.ts git.ts index.ts pick.ts prompts.ts"," answers none of \"what can I run\", \"what talks to the\noutside\", \"what's pure\" until you open all seven. A README table that carries structure the\nfilesystem could carry is a table nobody reads. Directory economics is the wrong axis when\nlegibility-without-docs is the requirement — and once the folders exist, the README's layer table\nbecomes redundant, which is the test of whether the layout works.",[445,756,757,758,764,765,767,768,770,771,774,775,778,779,782,783,488,786,789,790,793,794,797,798,801,802,805,806,808],{},"The load-bearing half is the adapter naming rule, because it resolves the question that prompted the\nissue: ",[543,759,760,761,763],{},"two ",[448,762,487],{}," files are correct."," They share one line and have zero export overlap — five of\nthe eight functions have a single caller in ",[448,766,319],{},", three have a single caller in ",[448,769,328],{},". What is\ngenuinely shared is ",[448,772,773],{},"git"," itself, so ",[448,776,777],{},"shared\u002Fadapters\u002Fgit.ts"," takes ",[448,780,781],{},"git()",", a memoised lazy\n",[448,784,785],{},"repoRoot()",[448,787,788],{},"at()",", retiring three ",[448,791,792],{},"git rev-parse --show-toplevel"," subprocesses. ",[448,795,796],{},"PROJECT_ROOTS","\n— the only constant in the package that had two homes — goes to ",[448,799,800],{},"shared\u002Fdomain\u002Flayout.ts"," rather\nthan alongside it, because ",[448,803,804],{},"drift\u002Fdomain\u002Fdetect.ts"," is pure and needs it, and a pure file importing\nthe module that shells out to ",[448,807,773],{}," would defeat the point of the layer.",[445,810,811,812,814,815,818,819,455,821,455,824,827,828,830,831,834,835,838,839,455,842,845,846,849,850,853,854,857],{},"Three modules land in ",[448,813,468],{},": ",[448,816,817],{},"cli.ts"," (",[448,820,614],{},[448,822,823],{},"fail",[448,825,826],{},"flag","), which makes every ",[448,829,495],{}," the\nsame three lines and retires the ",[448,832,833],{},"COMMANDS"," dispatch constant without a barrel; ",[448,836,837],{},"errors.ts","\n(",[448,840,841],{},"ExpectedError",[448,843,844],{},"CancelledError","); and ",[448,847,848],{},"adapters\u002Fio.ts",", where ",[448,851,852],{},"isTTY && !CI"," picks clack or plain\nlines behind one ",[448,855,856],{},"out.*"," surface with failures on stderr in both modes.",[445,859,860,861,864,865,868,869,871,872,875,876,879,880,883,884,887,888,891,892,895],{},"The runner turns out to fix four defects that read as style until you look: ",[448,862,863],{},"coverage","'s\nactionable \"run ",[448,866,867],{},"nx run-many -t test:coverage"," first\" reaches the user as an unhandled-rejection\nstack trace, ",[448,870,328],{},"'s usage error goes to ",[728,873,874],{},"stdout"," while exiting 1, ",[448,877,878],{},"map\u002Findex.ts"," calls\n",[448,881,882],{},"process.exit(0)"," immediately after a stdout write that a pipe can truncate, and ",[448,885,886],{},"shared\u002Fadapters\u002Fcache.ts","\nreads ",[448,889,890],{},"--refresh"," from ",[448,893,894],{},"argv"," at module load, so its behaviour depends on module-registry state.",[445,897,898,899,902,903,906,909,910,917,918,921,922,925,926,928],{},"One finding is independent of the layout question: ",[448,900,901],{},"src\u002Fcoverage\u002F"," ",[543,904,905],{},"has never been linted.",[448,907,908],{},"**\u002Fcoverage"," is in ",[911,912,914],"a",{"href":913},"repo:packages\u002Fconfigs\u002Fsrc\u002Feslint\u002Flib\u002Fignores.ts",[448,915,916],{},"baseIgnores",", which is why\nthat folder is the only one using ",[448,919,920],{},"interface"," and semicolon delimiters. The folder is renamed to\n",[448,923,924],{},"coverage-report\u002F","; the ",[448,927,863],{}," script name stays, so nothing outside this package moves.",[440,930,932],{"id":931},"options-considered","Options considered",[580,934,935,945],{},[583,936,937],{},[586,938,939,942],{},[589,940,941],{},"Option",[589,943,944],{},"Why not",[602,946,947,955,965,991,1021,1050,1082,1101,1110,1122],{},[586,948,949,952],{},[607,950,951],{},"The same four layers as a naming convention on a flat tree",[607,953,954],{},"Adopted first, then reversed — see the last paragraph of the Result. It leaves the directory listing saying nothing, which was the original complaint",[586,956,957,962],{},[607,958,959,961],{},[448,960,502],{}," per script",[607,963,964],{},"Three of the four scripts have exactly one command, so it would be a directory holding one file three times. The command sits at the folder root instead, which reads the same and costs nothing: root = what you can run, subdirectories = support",[586,966,967,974],{},[607,968,969,970,973],{},"A ",[448,971,972],{},"commands\u002Findex.ts"," barrel",[607,975,976,977,980,981,983,984,987,988],{},"Buys nothing ",[448,978,979],{},"run({ add, pick })"," doesn't: it renames the dispatch constant rather than removing it, and ",[448,982,734],{}," importing the barrel instead of ",[448,985,986],{},".\u002Fpick.ts"," is a cycle in a graph whose entry uses top-level ",[448,989,990],{},"await",[586,992,993,998],{},[607,994,995,997],{},[448,996,506],{}," folder",[607,999,1000,909,1003,1005,1006,1008,1009,1011,1012,1014,1015,1017,1018,1020],{},[448,1001,1002],{},"**\u002Ftypes",[448,1004,916],{}," too, so it would be silently unlinted repo-wide — the exact failure ",[448,1007,901],{}," demonstrates, re-created deliberately. It's why the pure layer is ",[448,1010,567],{},". ",[448,1013,1002],{}," was dropped from ",[448,1016,916],{}," in #234, so a ",[448,1019,506],{}," folder is linted now",[586,1022,1023,1027],{},[607,1024,1025,961],{},[448,1026,510],{},[607,1028,1029,1030,1033,1034,1037,1038,1041,1042,1045,1046,1049],{},"All 14 exported types sit with the function that produces them. ",[448,1031,1032],{},"BranchType"," is ",[448,1035,1036],{},"typeof BRANCH_TYPES[number]"," from two lines above it; ",[448,1039,1040],{},"import type { Doc } from \".\u002Fcapabilities.ts\""," says ",[448,1043,1044],{},"Doc"," is what the capabilities layer speaks, where ",[448,1047,1048],{},"from \".\u002Ftypes.ts\""," says nothing",[586,1051,1052,1056],{},[607,1053,1054],{},[448,1055,513],{},[607,1057,1058,1059,1011,1061,1064,1065,488,1067,1069,1070,1073,1074,1077,1078,1081],{},"Exactly one constant had two homes, and it moves to ",[448,1060,800],{},[448,1062,1063],{},"CANCELLED"," exists in ",[448,1066,734],{},[448,1068,738],{}," with ",[728,1071,1072],{},"different"," values, so centralising invites merging them and making one message a lie; ",[448,1075,1076],{},"drift\u002FREADME.md"," cites three thresholds by file; ",[448,1079,1080],{},"SECTIONS"," is 30 lines of hard-wrapped prose",[586,1083,1084,1088],{},[607,1085,1086],{},[448,1087,516],{},[607,1089,1090,1091,1094,1095,1097,1098,1100],{},"Two env vars, read on adjacent lines of one file. Also confusing next to ",[448,1092,1093],{},"@joinery\u002Fconfigs",". The real defect was ",[448,1096,671],{},"'s module-load ",[448,1099,894],{}," read",[586,1102,1103,1107],{},[607,1104,1105],{},[448,1106,519],{},[607,1108,1109],{},"Every candidate is private to its file with one to three call sites. \"Helper\" isn't a role — it names the author's uncertainty, and the four layers classify every file without it",[586,1111,1112,1119],{},[607,1113,1114,1115,525,1117],{},"Merging both ",[448,1116,487],{},[448,1118,468],{},[607,1120,1121],{},"Produces an eight-export module where each caller uses half — the junk drawer this package's CLAUDE.md warns about",[586,1123,1124,1133],{},[607,1125,1126,1127,1129,1130,1132],{},"Unifying ",[448,1128,476],{},"\u002F",[448,1131,480],{},"'s project prompt",[607,1134,1135,1136,1138,1139,1142,1143,1145],{},"Different return types and different jobs: ",[448,1137,476],{}," offers a ",[728,1140,1141],{},"none"," option, ",[448,1144,480],{}," has the offline fallback. They share one string, which is what gets extracted",[440,1147,1149],{"id":1148},"consequences","Consequences",[445,1151,1152,1153,1155,1156,1158,1159,488,1161,1163,1164,1166],{},"Unlocks a shape a new script is written into rather than around, and one a stranger can read off a\ndirectory listing: the root says what you can run, ",[448,1154,564],{}," is every side effect in the package,\n",[448,1157,567],{}," is what a spec can call without a mock. ",[448,1160,461],{},[448,1162,924],{}," also become\nimportable without a git checkout once ",[448,1165,785],{}," is lazy, which is what makes their entry points\ntestable at all.",[445,1168,1169,1170,1173,1174,1177,1178,1180,1181,1183,1184,488,1186,1188,1189,1192,1193,455,1196,1199,1200,1203,1204,1210],{},"The direction is still ",[543,1171,1172],{},"convention, not lint"," — but the folders change what enforcing it costs.\nThe rule was originally deferred because, on a flat tree, it needed a hand-maintained list of which\nfilenames are adapters, which meant a 40-line block in this package's own ",[448,1175,1176],{},"eslint.config.ts"," and no\npath into ",[448,1179,1093],{}," without ",[448,1182,67],{}," learning the names ",[448,1185,734],{},[448,1187,738],{},". Against\ndirectories it is a generic glob — ",[448,1190,1191],{},"**\u002Fdomain\u002F**"," may not import ",[448,1194,1195],{},"node:fs",[448,1197,1198],{},"node:child_process"," or\n",[448,1201,1202],{},"@clack\u002Fprompts"," — which is the same shape as the existing\n",[911,1205,1207],{"href":1206},"repo:packages\u002Fconfigs\u002Fsrc\u002Feslint\u002Flib\u002FcoreIsolation.ts",[448,1208,1209],{},"coreIsolation.ts"," rule and can live\nbeside it. That's the follow-up.",[445,1212,1213],{},"Forecloses the flat layout, and costs nine directories, three of which hold a single file. That is\nthe price of the listing being the documentation, and it is the right way round: the README's layer\ntable was deleted when the folders landed.",[440,1215,1217],{"id":1216},"confirmation","Confirmation",[445,1219,1220,1221,1223,1224,1227,1228,455,1230,1232,1233,455,1235,1237,1238,1244],{},"No automated check — this is the \"convention, not lint\" half of the Consequences above, and stays\nthat way until the ",[448,1222,1176],{}," rule it names as a follow-up lands. Verified by the folder\nlisting under ",[448,1225,1226],{},"infrastructure\u002Fscripts\u002Fsrc\u002F"," matching the four-role shape (",[448,1229,495],{},[448,1231,639],{}," or\none file per subcommand, ",[448,1234,564],{},[448,1236,567],{},") for every script, and by\n",[911,1239,1241],{"href":1240},"\u002Fwiki\u002F.claude\u002Fskills\u002Fscripts-new-script\u002Fskill",[448,1242,1243],{},"new-script","'s own verify steps\nrunning clean.",{"title":578,"searchDepth":1246,"depth":1246,"links":1247},2,[1248,1249,1250,1251,1252],{"id":442,"depth":1246,"text":443},{"id":534,"depth":1246,"text":535},{"id":931,"depth":1246,"text":932},{"id":1148,"depth":1246,"text":1149},{"id":1216,"depth":1246,"text":1217},"md",null,{"issue":1256,"status":1257,"decision":1258},48,"implemented","accepted",true,"\u002Fdocs\u002Fdecisions\u002F0004-scripts-architecture",{"title":431,"description":578},"docs\u002Fdecisions\u002F0004-scripts-architecture","arm5MWbbwYj6r9_ere27gVqdF4Pji4z746jfaK2fhA4",1795478403728]