@amsterdamdatalabs/adl-agent-control-linux-x64 0.1.12 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/bin/adl +2 -2
  2. package/bin/git +16 -17
  3. package/bin/git-ado +25 -24
  4. package/bin/git-defaults +173 -0
  5. package/bin/health-check +8 -1
  6. package/bin/kimi-hooks +1 -1
  7. package/bin/lib/adl-package.sh +257 -0
  8. package/bin/lib/fleet-host.sh +8 -5
  9. package/bin/reconcile +482 -232
  10. package/bin/reconcile-host +30 -20
  11. package/bin/setup +20 -17
  12. package/bin/shell-path-policy +15 -5
  13. package/bin/sync-and-reconcile +62 -64
  14. package/bin/validate-manifest +33 -9
  15. package/package.json +2 -10
  16. package/packages/agent-hooks/README.md +14 -9
  17. package/packages/agent-hooks/assets/hooks.json +0 -20
  18. package/packages/agent-hooks/src/cli/args.ts +1 -1
  19. package/packages/agent-hooks/src/cli/doctor.ts +6 -58
  20. package/packages/agent-hooks/src/deploy/deploy.ts +12 -41
  21. package/packages/agent-hooks/src/deploy/doctor.ts +8 -11
  22. package/packages/agent-hooks/src/deploy/index.ts +14 -14
  23. package/packages/agent-hooks/src/deploy/json-merge.ts +7 -8
  24. package/packages/agent-hooks/src/deploy/legacy-lock.ts +2 -2
  25. package/packages/agent-hooks/src/deploy/list.ts +1 -1
  26. package/packages/agent-hooks/src/deploy/lock.ts +31 -12
  27. package/packages/agent-hooks/src/deploy/profile.ts +3 -4
  28. package/packages/agent-hooks/src/deploy/source.ts +1 -1
  29. package/packages/agent-hooks/src/gating/config.ts +10 -24
  30. package/packages/agent-hooks/src/gating/root.ts +3 -3
  31. package/packages/agent-hooks/src/hooks/briefing/handler.ts +2 -2
  32. package/packages/agent-hooks/src/hooks/briefing/index.ts +27 -287
  33. package/packages/agent-hooks/src/hooks/contract.ts +17 -17
  34. package/packages/agent-hooks/src/hooks/crg/background.ts +27 -0
  35. package/packages/agent-hooks/src/hooks/crg/index.ts +7 -6
  36. package/packages/agent-hooks/src/hooks/log.ts +8 -10
  37. package/packages/agent-hooks/src/hooks/user-prompt-submit/match.ts +1 -1
  38. package/packages/agent-hooks/src/hooks/user-prompt-submit/tokenizer.ts +1 -1
  39. package/packages/agent-hooks/src/hooks/user-prompt-submit/vector.ts +6 -5
  40. package/packages/agent-hooks/src/hosts/registry.ts +1 -1
  41. package/packages/agent-hooks/src/log/adl-dir.ts +44 -0
  42. package/packages/agent-hooks/src/log/writer.ts +16 -2
  43. package/packages/agent-hooks/src/main.ts +7 -41
  44. package/packages/agent-hooks/src/pre-tool-use/handler.ts +71 -82
  45. package/packages/agent-hooks/src/rules/engine.ts +13 -17
  46. package/packages/agent-hooks/src/rules/impl/adl-build-run-denied.ts +3 -3
  47. package/packages/agent-hooks/src/rules/impl/adl-git-credential-bypass.ts +12 -14
  48. package/packages/agent-hooks/src/rules/impl/adl-git-identity.ts +28 -28
  49. package/packages/agent-hooks/src/rules/impl/adl-git-push-policy.ts +8 -9
  50. package/packages/agent-hooks/src/rules/impl/adl-human-azdo-bypass.ts +56 -59
  51. package/packages/agent-hooks/src/rules/impl/adl-identity.ts +16 -23
  52. package/packages/agent-hooks/src/rules/impl/adl-mcp-cli.ts +19 -16
  53. package/packages/agent-hooks/src/rules/impl/adl-pr-complete-pending.ts +2 -2
  54. package/packages/agent-hooks/src/rules/impl/adl-pr-review-role.ts +9 -12
  55. package/packages/agent-hooks/src/rules/impl/adl-pr-role.ts +5 -7
  56. package/packages/agent-hooks/src/rules/impl/adl-run-required.ts +411 -0
  57. package/packages/agent-hooks/src/rules/impl/adl-token-minting-role.ts +4 -5
  58. package/packages/agent-hooks/src/rules/impl/adl-workitem-role.ts +6 -7
  59. package/packages/agent-hooks/src/rules/impl/agent-tamper-protection.ts +77 -70
  60. package/packages/agent-hooks/src/rules/impl/deny-allowlist.ts +159 -0
  61. package/packages/agent-hooks/src/rules/impl/git-helpers.ts +21 -23
  62. package/packages/agent-hooks/src/rules/impl/git-worktree.ts +14 -28
  63. package/packages/agent-hooks/src/rules/impl/mcp-tool.ts +3 -3
  64. package/packages/agent-hooks/src/rules/impl/messages.ts +1 -1
  65. package/packages/agent-hooks/src/rules/impl/pr-completion.ts +1 -1
  66. package/packages/agent-hooks/src/rules/impl/tool-azure-devops.ts +35 -46
  67. package/packages/agent-hooks/src/rules/impl/tool-find.ts +34 -7
  68. package/packages/agent-hooks/src/rules/impl/tool-grep.ts +34 -12
  69. package/packages/agent-hooks/src/rules/impl/tool-native-search.ts +52 -9
  70. package/packages/agent-hooks/src/rules/ports.ts +5 -7
  71. package/packages/agent-hooks/src/rules/registry.ts +4 -6
  72. package/packages/agent-hooks/src/rules/shell/git-identity.ts +86 -101
  73. package/packages/agent-hooks/src/rules/shell/git-internals.ts +1 -1
  74. package/packages/agent-hooks/src/rules/shell/invocation.ts +24 -118
  75. package/packages/agent-hooks/src/rules/shell/piped-script.ts +1 -1
  76. package/packages/agent-hooks/src/rules/shell/prefixes.ts +1 -1
  77. package/packages/agent-hooks/src/rules/shell/protected-carrier-writes.ts +11 -10
  78. package/packages/agent-hooks/src/rules/shell/protected-carriers.ts +26 -26
  79. package/packages/agent-hooks/src/rules/shell/substitution.ts +1 -1
  80. package/packages/agent-hooks/src/rules/shell/xargs.ts +2 -2
  81. package/packages/agent-hooks/src/rules/spec.ts +2 -2
  82. package/packages/agent-settings/README.md +287 -0
  83. package/packages/agent-settings/assets/GLOBAL-AGENTS.md +14 -16
  84. package/packages/agent-settings/assets/agents/architect.toml +2 -0
  85. package/packages/agent-settings/assets/agents/code-reviewer.toml +2 -0
  86. package/packages/agent-settings/assets/agents/executor.toml +2 -0
  87. package/packages/agent-settings/assets/agents/explore.toml +2 -0
  88. package/packages/agent-settings/assets/agents/planner.toml +2 -0
  89. package/packages/agent-settings/assets/mcp.json +0 -4
  90. package/packages/agent-settings/deploy-profile.json +139 -0
  91. package/packages/agent-settings/deploy-profile.schema.json +147 -0
  92. package/packages/agent-settings/managed/README.md +29 -30
  93. package/packages/agent-settings/managed/codex-requirements.toml +9 -9
  94. package/packages/agent-settings/package.json +20 -0
  95. package/packages/agent-settings/src/deploy/agent-render.ts +2 -2
  96. package/packages/agent-settings/src/deploy/agent-toml.ts +1 -1
  97. package/packages/agent-settings/src/deploy/agents-deploy.ts +17 -3
  98. package/packages/agent-settings/src/deploy/doctor.ts +3 -83
  99. package/packages/agent-settings/src/deploy/index.ts +6 -33
  100. package/packages/agent-settings/src/deploy/legacy-lock.ts +6 -6
  101. package/packages/agent-settings/src/deploy/list.ts +5 -19
  102. package/packages/agent-settings/src/deploy/lock.ts +8 -18
  103. package/packages/agent-settings/src/deploy/mcp-deploy.ts +10 -5
  104. package/packages/agent-settings/src/deploy/mcp-merge.ts +22 -3
  105. package/packages/agent-settings/src/deploy/mcp-source.ts +1 -1
  106. package/packages/agent-settings/src/deploy/profile.ts +11 -35
  107. package/packages/agent-settings/src/deploy/retire-lean-ctx.ts +184 -0
  108. package/packages/agent-settings/src/deploy/settings.ts +17 -22
  109. package/packages/agent-settings/src/global-surface-sweep.ts +0 -2
  110. package/packages/agent-settings/src/kimi-hooks.ts +339 -192
  111. package/packages/agent-settings/src/opencode-hooks.ts +1 -1
  112. package/packages/agent-settings/tsconfig.json +23 -0
  113. package/packages/agent-skills/assets/agent-search-tool-audit/SKILL.md +120 -0
  114. package/packages/agent-skills/assets/agent-search-tool-audit/scripts/audit.sh +276 -0
  115. package/packages/agent-skills/assets/debug-issue/SKILL.md +8 -7
  116. package/packages/agent-skills/assets/explore-codebase/SKILL.md +13 -13
  117. package/packages/agent-skills/assets/refactor-safely/SKILL.md +12 -11
  118. package/packages/agent-skills/assets/review-changes/SKILL.md +7 -7
  119. package/packages/agent-skills/assets/testing/references/e2e.md +37 -0
  120. package/packages/agent-skills/assets/testing/references/integration.md +37 -0
  121. package/packages/agent-skills/assets/testing/references/unit.md +32 -0
  122. package/packages/agent-skills/dist/deploy.d.ts +2 -0
  123. package/packages/agent-skills/dist/deploy.d.ts.map +1 -1
  124. package/packages/agent-skills/dist/deploy.js +27 -1
  125. package/packages/agent-skills/dist/deploy.js.map +1 -1
  126. package/packages/agent-skills/dist/doctor.d.ts +0 -2
  127. package/packages/agent-skills/dist/doctor.d.ts.map +1 -1
  128. package/packages/agent-skills/dist/doctor.js +1 -1
  129. package/packages/agent-skills/dist/doctor.js.map +1 -1
  130. package/packages/agent-skills/dist/fs-utils.d.ts +0 -1
  131. package/packages/agent-skills/dist/fs-utils.d.ts.map +1 -1
  132. package/packages/agent-skills/dist/fs-utils.js +1 -1
  133. package/packages/agent-skills/dist/fs-utils.js.map +1 -1
  134. package/packages/agent-skills/src/deploy.ts +29 -1
  135. package/packages/agent-skills/src/doctor.ts +1 -1
  136. package/packages/agent-skills/src/fs-utils.ts +1 -1
  137. package/packages/azdo/README.md +10 -9
  138. package/packages/azdo/package.json +1 -3
  139. package/packages/azdo/src/azdo-pl.ts +2 -54
  140. package/packages/azdo/src/azdo-pr-review.ts +4 -4
  141. package/packages/azdo/src/azdo-repo-doctor.ts +101 -52
  142. package/packages/azdo/src/azdo-wit.ts +41 -2
  143. package/packages/azdo/src/lib/agent-identity.ts +12 -14
  144. package/packages/azdo/src/lib/agent-token.ts +2 -2
  145. package/packages/azdo/src/lib/client.ts +0 -5
  146. package/packages/azdo/src/lib/graph-identity.ts +4 -4
  147. package/packages/azdo/src/workflow-rules-matrix.csv +85 -0
  148. package/packages/azdo/src/workflow-rules.ts +128 -0
  149. package/packages/fleet/manifest.json +35 -11
  150. package/packages/fleet/manifest.schema.json +62 -10
  151. package/packages/fleet/src/default-agent-file.ts +3 -3
  152. package/packages/fleet/src/install-adl-package.ts +73 -15
  153. package/packages/fleet/src/install-embedding-model.ts +13 -13
  154. package/packages/fleet/src/managed-settings.ts +7 -7
  155. package/packages/fleet/src/repo-maintain.ts +91 -55
  156. package/packages/fleet/src/scratch-reap.ts +5 -5
  157. package/packages/fleet/src/vscode-settings.ts +5 -5
  158. package/packages/repo-controls/README.md +141 -43
  159. package/packages/repo-controls/assets/promote.ts +4 -4
  160. package/packages/repo-controls/assets/reconcile-guard.sh +10 -46
  161. package/packages/repo-controls/assets/version-bump.sh +31 -84
  162. package/packages/repo-controls/bunfig.toml +6 -7
  163. package/packages/repo-controls/package/adl-compliance/AGENTS.md +5 -6
  164. package/packages/repo-controls/package/adl-compliance/conftest.py +3 -1
  165. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/__init__.py +4 -16
  166. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/test_check.py +9 -2
  167. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/notes.md +1 -0
  168. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/test_check.py +11 -0
  169. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/__init__.py +7 -0
  170. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/check.py +266 -0
  171. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/.drafts/c.md +1 -0
  172. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/.drafts/d.md +1 -0
  173. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/.hidden.md +1 -0
  174. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/a.md +1 -0
  175. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/b.md +1 -0
  176. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/data.csv +1 -0
  177. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/diagram.png +1 -0
  178. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/mock.png +1 -0
  179. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/sub/nested.md +1 -0
  180. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs.md +1 -0
  181. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/grants.yaml +4 -0
  182. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p1.md +1 -0
  183. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p2.md +1 -0
  184. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p3.md +1 -0
  185. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p4.md +1 -0
  186. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p5.md +1 -0
  187. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/docs/architecture/build.md +1 -0
  188. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/docs/architecture/overview.md +1 -0
  189. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/docs/guide/install.md +1 -0
  190. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/docs/guide/start.md +1 -0
  191. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/grants.yaml +4 -0
  192. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/decisions/adr-001-tenancy.md +1 -0
  193. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/decisions/adr-002-carrier.md +1 -0
  194. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/decisions/adr-003-cli.md +1 -0
  195. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/decisions/archive/adr-000-old.md +1 -0
  196. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/decisions/archive/adr-000-older.md +1 -0
  197. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/guide/a.md +1 -0
  198. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/guide/b.md +1 -0
  199. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/guide/c.md +1 -0
  200. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/grants.yaml +4 -0
  201. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-01.md +1 -0
  202. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-02.md +1 -0
  203. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-03.md +1 -0
  204. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-04.md +1 -0
  205. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-05.md +1 -0
  206. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-06.md +1 -0
  207. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-07.md +1 -0
  208. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-08.md +1 -0
  209. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-09.md +1 -0
  210. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-10.md +1 -0
  211. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-11.md +1 -0
  212. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-12.md +1 -0
  213. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-13.md +1 -0
  214. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-14.md +1 -0
  215. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-15.md +1 -0
  216. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-16.md +1 -0
  217. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/grants.yaml +4 -0
  218. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-exempt/docs/guide/a.md +1 -0
  219. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-exempt/docs/guide/b.md +1 -0
  220. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-exempt/docs/guide/c.md +1 -0
  221. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-exempt/grants.yaml +4 -0
  222. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-grew/docs/guide/a.md +1 -0
  223. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-grew/docs/guide/b.md +1 -0
  224. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-grew/docs/guide/c.md +1 -0
  225. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-grew/grants.yaml +4 -0
  226. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/docs/guide/a.md +1 -0
  227. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/docs/guide/b.md +1 -0
  228. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/docs/guide/c.md +1 -0
  229. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/docs/guide/d.md +1 -0
  230. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/docs/guide/e.md +1 -0
  231. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/grants.yaml +4 -0
  232. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-over-cap/docs/guide/a.md +1 -0
  233. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-over-cap/docs/guide/b.md +1 -0
  234. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-over-cap/docs/guide/c.md +1 -0
  235. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-over-cap/docs/short/only.md +1 -0
  236. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-over-cap/grants.yaml +4 -0
  237. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/held/a.md +1 -0
  238. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/held/b.md +1 -0
  239. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/held/c.md +1 -0
  240. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/held/d.md +1 -0
  241. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/shrunk/a.md +1 -0
  242. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/shrunk/b.md +1 -0
  243. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/grants.yaml +6 -0
  244. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-unusable/docs/guide/a.md +1 -0
  245. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-unusable/docs/guide/b.md +1 -0
  246. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-unusable/docs/guide/c.md +1 -0
  247. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-unusable/grants.yaml +3 -0
  248. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/test_check.py +345 -0
  249. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/check.py +18 -5
  250. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/test_check.py +35 -0
  251. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/__init__.py +7 -0
  252. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/check.py +91 -0
  253. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/AGENTS.md +3 -0
  254. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/CLAUDE.md +3 -0
  255. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/-leading-hyphen.md +3 -0
  256. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/AGENTS.md +3 -0
  257. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/double--hyphen.md +3 -0
  258. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/getting started.md +3 -0
  259. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/nested/page-here.md +3 -0
  260. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/trailing-hyphen-.md +3 -0
  261. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/ui-contract.md +4 -0
  262. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/user_profile.md +3 -0
  263. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/assets/UI-CONTRACT.png +2 -0
  264. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/assets/diagram.png +1 -0
  265. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/index.md +4 -0
  266. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/notes.md +3 -0
  267. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/reference.html +1 -0
  268. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/research/2026-10-experiment.md +3 -0
  269. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/research/UI-CONTRACT.md +6 -0
  270. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs.md +5 -0
  271. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/test_check.py +194 -0
  272. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/check.py +14 -2
  273. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/docs-knowledge-indexes.yaml +5 -5
  274. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-shipped-register-legacy/docs/compliance/index.md +10 -0
  275. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-shipped-register-type/docs/compliance/index.md +10 -0
  276. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/test_check.py +58 -6
  277. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/ledger/test_check.py +0 -1
  278. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/check.py +64 -17
  279. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/docs-okf-profiles.yaml +60 -9
  280. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-ledger-clean/docs/notes.md +17 -0
  281. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-ledger-no-lines/docs/notes.md +13 -0
  282. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-clean/docs/architecture/demo.md +0 -1
  283. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-clean/docs-okf-profiles.yaml +0 -1
  284. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs/research/no-type.md +9 -0
  285. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs/research/typed-experiment.md +10 -0
  286. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs/research/typed-research.md +10 -0
  287. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs-okf-profiles.yaml +5 -0
  288. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-violation/docs/architecture/bad-status.md +0 -1
  289. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-violation/docs-okf-profiles.yaml +0 -1
  290. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/experiment-ok.md +15 -0
  291. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/extra-key.md +15 -0
  292. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/extra-keys.md +16 -0
  293. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-created.md +11 -0
  294. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-description.md +11 -0
  295. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-last-update.md +11 -0
  296. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-sources.md +10 -0
  297. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-status.md +11 -0
  298. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-title.md +11 -0
  299. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/optional-keys.md +16 -0
  300. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/research-ok.md +14 -0
  301. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research-neighbours/docs/architecture/created-date.md +21 -0
  302. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research-neighbours/docs/architecture/research-shaped.md +19 -0
  303. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research-neighbours/docs/operations/runbook.md +26 -0
  304. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/test_check.py +228 -2
  305. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/register.py +5 -0
  306. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/test_check.py +11 -2
  307. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/__init__.py +5 -3
  308. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/check.py +160 -44
  309. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-clean/grants.yaml +0 -2
  310. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-empty-register/frontend/packages/desktop/src/a.ts +1 -0
  311. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-empty-register/frontend/packages/desktop/src/b.ts +1 -0
  312. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-empty-register/grants.yaml +3 -0
  313. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/grants.yaml +0 -2
  314. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-missing-tree/frontend/packages/desktop/src/renderer/solo/item.ts +1 -0
  315. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-missing-tree/grants.yaml +5 -0
  316. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-no-ceilings/frontend/packages/desktop/src/a.ts +1 -0
  317. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-no-ceilings/frontend/packages/desktop/src/b.ts +1 -0
  318. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-no-ceilings/frontend/packages/desktop/src/c.ts +1 -0
  319. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-no-ceilings/grants.yaml +4 -0
  320. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-stale-entry/frontend/packages/desktop/src/renderer/solo/item.ts +1 -0
  321. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-stale-entry/grants.yaml +5 -0
  322. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/grants.yaml +0 -2
  323. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unusable-register/frontend/packages/desktop/src/renderer/solo/item.ts +1 -0
  324. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unusable-register/grants.yaml +3 -0
  325. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/register.py +127 -0
  326. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/test_check.py +265 -29
  327. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/check.py +75 -2
  328. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/test_check.py +194 -0
  329. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/check.py +56 -10
  330. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/test_check.py +256 -0
  331. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/check.py +40 -12
  332. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/test_check.py +108 -0
  333. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/test_check.py +1 -1
  334. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/check.py +2 -3
  335. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/check.py +23 -6
  336. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/test_check.py +76 -0
  337. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/check.py +58 -17
  338. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/test_check.py +161 -0
  339. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/check.py +35 -3
  340. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/test_check.py +108 -1
  341. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/check.py +281 -61
  342. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/absolute-path.yaml +3 -0
  343. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/backslash-path.yaml +3 -0
  344. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/baseline-is-a-list.yaml +2 -0
  345. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/boolean-size.yaml +3 -0
  346. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/dot-segment.yaml +3 -0
  347. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/duplicate-path.yaml +4 -0
  348. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/empty-file.yaml +0 -0
  349. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/empty-segment.yaml +3 -0
  350. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/float-size.yaml +3 -0
  351. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/negative-size.yaml +3 -0
  352. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/no-over-limit-baseline.yaml +1 -0
  353. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/no-schema-version.yaml +1 -0
  354. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/non-string-path.yaml +3 -0
  355. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/not-yaml.yaml +2 -0
  356. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/null-size.yaml +3 -0
  357. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/parent-segment.yaml +3 -0
  358. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/string-size.yaml +3 -0
  359. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/top-level-is-a-list.yaml +2 -0
  360. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/trailing-slash.yaml +3 -0
  361. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/unknown-key.yaml +3 -0
  362. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/wrong-schema-version.yaml +2 -0
  363. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/zero-size.yaml +3 -0
  364. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/valid.yaml +4 -0
  365. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/test_check.py +758 -45
  366. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/ignored_paths/check.py +4 -3
  367. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/ignored_paths/test_check.py +2 -2
  368. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/cargo_lock.py +490 -0
  369. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/check.py +368 -55
  370. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/test_check.py +4 -2
  371. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/test_declared_paths.py +523 -0
  372. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/test_stale_lock.py +1179 -0
  373. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/cli.py +122 -3
  374. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/check.py +33 -1
  375. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/constants.py +0 -11
  376. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/context.py +16 -1
  377. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/config.py +1 -2
  378. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/docs_shape.py +12 -1
  379. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/gate-registry.alt.yaml +133 -147
  380. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/gate-registry.yaml +133 -147
  381. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/registry.py +1 -1
  382. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/root_shape.py +52 -10
  383. package/packages/repo-controls/package/adl-compliance/src/adl_compliance/runner.py +23 -4
  384. package/packages/repo-controls/package.json +2 -9
  385. package/packages/repo-controls/scripts/hooks/post-merge +13 -0
  386. package/packages/repo-controls/scripts/hooks/pre-push +3 -3
  387. package/packages/repo-controls/src/azdo-push.ts +64 -36
  388. package/packages/repo-controls/src/azure-devops-governance.ts +7 -9
  389. package/packages/repo-controls/src/azure-devops-remote.ts +1 -1
  390. package/packages/repo-controls/src/cli.ts +29 -8
  391. package/packages/repo-controls/src/compliance-config.ts +410 -2
  392. package/packages/repo-controls/src/config.ts +133 -60
  393. package/packages/repo-controls/src/constants.ts +13 -27
  394. package/packages/repo-controls/src/coverage-ratchet.ts +4 -4
  395. package/packages/repo-controls/src/doctor.ts +46 -19
  396. package/packages/repo-controls/src/gitignore-block.ts +5 -29
  397. package/packages/repo-controls/src/hook-log.ts +1 -2
  398. package/packages/repo-controls/src/hook.ts +201 -45
  399. package/packages/repo-controls/src/install.ts +14 -8
  400. package/packages/repo-controls/src/integrity.ts +3 -3
  401. package/packages/repo-controls/src/lfs.ts +111 -0
  402. package/packages/repo-controls/src/promote.ts +8 -8
  403. package/packages/repo-controls/src/runtime.ts +9 -1
  404. package/packages/repo-controls/src/workflows-drift.ts +4 -5
  405. package/packages/repo-controls/src/worktree-guard.ts +3 -3
@@ -10,17 +10,21 @@ is the CONSUMER's, and the consumer is this file. `git ls-files --cached
10
10
  --others --exclude-standard` is called here so that gitignored paths never enter
11
11
  a set, which is why no row needs to exclude `node_modules/` or `.scratch/`, and
12
12
  why no check needs to know git exists (K-41).
13
+
14
+ Git is also asked, here, for the one fact a check cannot read off the worktree:
15
+ the size of the blob Git STORES for a path (`committed_blob_sizes`). It is
16
+ measured only when a selected row declares `reads_committed_sizes` (LFS-001) and
17
+ handed down in `Context.committed_sizes`; every other run spawns no extra process.
13
18
  """
14
19
 
15
20
  from __future__ import annotations
16
21
 
17
22
  import argparse
18
- import json
19
23
  import os
20
24
  import subprocess
21
25
  import sys
22
26
  import tomllib
23
- from collections.abc import Mapping, Sequence
27
+ from collections.abc import Iterable, Mapping, Sequence
24
28
  from concurrent.futures import ThreadPoolExecutor
25
29
  from pathlib import Path
26
30
  from typing import TextIO
@@ -30,6 +34,7 @@ from pydantic import ValidationError
30
34
 
31
35
  from . import runner
32
36
  from .core.constants import Constants
37
+ from .core.errors import CouldNotRun
33
38
  from .core.receipt import from_verdict
34
39
  from .core.verdict import Outcome, Verdict
35
40
  from .policy.registry import (
@@ -85,6 +90,85 @@ def visible_files(root: Path) -> tuple[str, ...]:
85
90
  return tuple(line for line in completed.stdout.splitlines() if line)
86
91
 
87
92
 
93
+ def committed_blob_sizes(root: Path, paths: Iterable[str]) -> dict[str, int]:
94
+ """Path -> size in bytes of the blob Git STORES for it, among `paths`.
95
+
96
+ The worktree is not what Git stores: a correctly tracked LFS file is a
97
+ ~132-byte pointer in the repository and the full file on disk, because the
98
+ filter smudges it on checkout. A check that grades size must be told the
99
+ stored size, and a check cannot ask git (K-41) -- so this is where it is
100
+ measured, for the rows that declare `reads_committed_sizes`.
101
+
102
+ "Stores" is the INDEX entry: for a clean checkout that is `HEAD`'s blob, and
103
+ while staging it is the blob about to be committed, the same reading
104
+ `check.sh` made with `:path`. Two git processes however many paths there
105
+ are -- `ls-files --stage` for every entry's object id, then ONE
106
+ `cat-file --batch-check` over the distinct ids -- never one per file.
107
+
108
+ A path gets no entry, and is therefore graded by its worktree file by the
109
+ check, when it has no stage-0 blob: untracked, not given, a gitlink
110
+ (submodule), or an unmerged path. Absence is never a size.
111
+
112
+ Git failing here is `CouldNotRun`, never an empty result: an empty map reads
113
+ as "nothing is known", which is a silent return to grading the smudged
114
+ worktree. `-z` means no path quoting, so `core.quotePath` cannot matter.
115
+ """
116
+ wanted = set(paths)
117
+ staged = subprocess.run(
118
+ ["git", "ls-files", "--stage", "-z"], cwd=root, capture_output=True, check=False
119
+ )
120
+ if staged.returncode != 0:
121
+ raise CouldNotRun(
122
+ "git ls-files --stage failed: " + staged.stderr.decode("utf-8", "replace").strip()
123
+ )
124
+
125
+ by_object: dict[str, list[str]] = {}
126
+ for record in staged.stdout.split(b"\0"):
127
+ if not record:
128
+ continue
129
+ meta, _, raw_path = record.partition(b"\t")
130
+ mode, object_id, stage = meta.decode("ascii").split(" ")
131
+ path = os.fsdecode(raw_path)
132
+ if mode == "160000" or stage != "0" or path not in wanted:
133
+ continue
134
+ by_object.setdefault(object_id, []).append(path)
135
+ if not by_object:
136
+ return {}
137
+
138
+ measured = subprocess.run(
139
+ ["git", "cat-file", "--batch-check"],
140
+ cwd=root, input="\n".join(by_object) + "\n", capture_output=True, text=True, check=False,
141
+ )
142
+ if measured.returncode != 0:
143
+ raise CouldNotRun(f"git cat-file --batch-check failed: {measured.stderr.strip()}")
144
+
145
+ sizes: dict[str, int] = {}
146
+ for line in measured.stdout.splitlines():
147
+ object_id, _, rest = line.partition(" ")
148
+ kind, _, size = rest.partition(" ")
149
+ if object_id not in by_object or kind != "blob" or not size.isdigit():
150
+ raise CouldNotRun(
151
+ f"git cat-file --batch-check could not size {line!r} "
152
+ f"(the index entry for {', '.join(by_object.get(object_id, ['?']))})"
153
+ )
154
+ for path in by_object[object_id]:
155
+ sizes[path] = int(size)
156
+ return sizes
157
+
158
+
159
+ def reads_committed_sizes(row: Row) -> bool:
160
+ """Whether the check implementing `row` grades `Context.committed_sizes`.
161
+
162
+ A row no check implements answers False: the runner reports it could-not-run
163
+ on its own, and git has nothing to measure for it."""
164
+ from .checks import lookup
165
+
166
+ try:
167
+ return lookup(row.id).reads_committed_sizes
168
+ except KeyError:
169
+ return False
170
+
171
+
88
172
  def selected_rows(
89
173
  registry: Registry, target: str | None, only: Sequence[str] | None = None
90
174
  ) -> list[Row]:
@@ -288,7 +372,27 @@ def main(argv: Sequence[str] | None = None) -> int:
288
372
  help="a fact the repository states about itself, as `license=Proprietary` "
289
373
  "(repeatable). Read from [controls.compliance] and passed through: the "
290
374
  "package grades a repository against what it declares, it does not hold "
291
- "the answer. `license` is the only name consumed today (REP-001).",
375
+ "the answer. Names consumed today: `license` (REP-001), and "
376
+ "`root-files` / `root-dirs` (LAY-006/008/012/013), each a comma-separated "
377
+ "list of repository-root names beyond the standard set, as "
378
+ "`root-files=STATUS.md,DRIFT.md` or `root-dirs=apps,packaging`; and "
379
+ "`scripts-direct-files` (LAY-014), a positive integer replacing the "
380
+ "default limit of 15 direct files per scripts directory, as "
381
+ "`scripts-direct-files=20`; `open-gaps` and `open-plans` (LAY-016), "
382
+ "each a positive integer replacing the default cap of 10 open gaps "
383
+ "or open plans, as `open-gaps=37` and `open-plans=11`; and "
384
+ "`markdown-roots` (LAY-006), a "
385
+ "comma-separated list of repository-relative directories whose "
386
+ "Markdown is allowed in addition to the declared docs trees "
387
+ "([controls.compliance.markdown].roots), as "
388
+ "`markdown-roots=apps/marketing,apps/platform/src/content`; and "
389
+ "`bun-manifests` / `bun-lockfiles` and `cargo-manifests` / "
390
+ "`cargo-lockfiles` (REP-002), comma-separated repository-relative "
391
+ "`package.json` / `Cargo.toml` paths or globs and literal lockfile "
392
+ "paths ([controls.compliance.lockfiles]), declared as a pair per "
393
+ "ecosystem and replacing that ecosystem's tree-derived scope, as "
394
+ "`bun-manifests=package.json,apps/*/package.json` with "
395
+ "`bun-lockfiles=bun.lock`.",
292
396
  )
293
397
  parser.add_argument(
294
398
  "--tree", metavar="NAME=PATH", action="append", default=[],
@@ -409,6 +513,20 @@ def main(argv: Sequence[str] | None = None) -> int:
409
513
  for gate, names in inputs_by_gate.items()
410
514
  }
411
515
 
516
+ # What Git stores, measured here because a check cannot call git (K-41), and
517
+ # only when a selected row declares it reads them -- every other run pays for
518
+ # no git process. Not for `--exhaustive`: that is a snapshot the caller vouches
519
+ # IS the candidate commit, with no `.git` of its own, so the bytes on disk are
520
+ # what is stored and asking whichever repository encloses it would mix an
521
+ # unrelated store back into the verdict.
522
+ committed_sizes: dict[str, int] = {}
523
+ if not args.exhaustive and any(reads_committed_sizes(row) for row in rows):
524
+ try:
525
+ committed_sizes = committed_blob_sizes(root, given)
526
+ except CouldNotRun as exc:
527
+ print(f"adl-compliance: {exc}", file=sys.stderr)
528
+ return int(Outcome.COULD_NOT_RUN)
529
+
412
530
  batch_results = runner.prepare_batches(
413
531
  rows,
414
532
  root,
@@ -435,6 +553,7 @@ def main(argv: Sequence[str] | None = None) -> int:
435
553
  # gate runs, `adl-config.toml` decides.
436
554
  declared_trees=declared_trees,
437
555
  batch_results=batch_results,
556
+ committed_sizes=committed_sizes,
438
557
  )
439
558
 
440
559
  # Threads, not processes. Nearly every check is I/O or a subprocess
@@ -89,7 +89,7 @@ class Check(Constants, ABC):
89
89
  The other half of `inputs`, and the distinction is who owns the document:
90
90
 
91
91
  inputs the CONSUMER's, named by a `<tree>` path. Measured evidence
92
- that changes per repository — a coverage summary, a lockfile.
92
+ that changes per repository — a lockfile, a package manifest.
93
93
  resources the PACKAGE's, sitting beside this check. Policy that ships
94
94
  with the gate and means nothing without it — a profile
95
95
  register, a rule table.
@@ -134,10 +134,42 @@ class Check(Constants, ABC):
134
134
  counting only the changed plans would turn eleven open plans into one.
135
135
  """
136
136
 
137
+ @classmethod
138
+ def declared_scope(
139
+ cls, scope: tuple[str, ...], declarations: Mapping[str, str]
140
+ ) -> tuple[str, ...] | None:
141
+ """The row's `engine.scope`, restated from what the repository declares.
142
+
143
+ `scope` is the row's RAW scope (`<tree>` placeholders intact) and the
144
+ return value is a replacement for it, expanded through the same tree map
145
+ as any scope. `None`, the default and what every row but REP-002 answers,
146
+ means the repository declared nothing for this row and the registry's
147
+ scope stands, byte for byte.
148
+
149
+ A restated scope is graded WHOLE, exactly like `whole_scope`: the caller's
150
+ narrowed set only decides whether the gate applies, then the check is
151
+ handed every file the declared scope matches in the complete universe.
152
+ That is the only set from which a check can say that something the
153
+ repository declared matches nothing, which it must say loudly.
154
+
155
+ Raise `CouldNotRun` naming the declaration when it is malformed: it
156
+ becomes the row's could-not-run verdict, never a quietly wider or
157
+ narrower scope.
158
+ """
159
+ return None
160
+
137
161
  requires: ClassVar[tuple[str, ...]] = ()
138
162
  """External executables this check drives. Verified by the runner, which
139
163
  removes the `command -v x || exit 2` prologue every shell check re-typed."""
140
164
 
165
+ reads_committed_sizes: ClassVar[bool] = False
166
+ """The check grades `ctx.committed_sizes`: the size of the blob Git stores.
167
+
168
+ Declared, not discovered, so a run that selects no such row pays for no git
169
+ process: the CLI measures the sizes (a check cannot reach an object store,
170
+ K-41) only when a selected row sets this, and hands them down in the Context.
171
+ """
172
+
141
173
  # ---------------------------------------------------------------- template
142
174
 
143
175
  def run(self, ctx: Context, files: FileSet) -> Iterator[Report]:
@@ -89,17 +89,6 @@ class Constants:
89
89
  SLUG_PATTERN: ClassVar[str] = r"^[a-z0-9]+(-[a-z0-9]+)*$"
90
90
  TITLE_LIMIT: ClassVar[int] = 80
91
91
 
92
- # ----------------------------------------------------- coverage vocabulary
93
- # The four names every coverage gate reports against, and the contract the
94
- # two summary readers in `checks/coverage/baseline.py` both have to meet:
95
- # the Istanbul reader iterates this tuple, and the coverage.py reader maps
96
- # its own differently-named fields onto these same four keys. Three more
97
- # coverage rows in the registry are still shell and will read it too.
98
-
99
- COVERAGE_METRICS: ClassVar[tuple[str, ...]] = (
100
- "lines", "statements", "functions", "branches",
101
- )
102
-
103
92
 
104
93
  CONSTANTS: Final = Constants
105
94
  """Alias for the callers that reach these without inheriting: `cli` and
@@ -69,12 +69,27 @@ class Context(StrictModel):
69
69
  which is a gate deciding a company's licensing rather than enforcing it.
70
70
  """
71
71
 
72
+ committed_sizes: dict[str, int] = Field(default_factory=dict)
73
+ """Repository-relative path -> size in bytes of the blob Git STORES for it.
74
+
75
+ A fact the CLI measures with git (a check cannot reach an object store, K-41)
76
+ and only for a check that declares `reads_committed_sizes`. It exists because
77
+ the worktree is not what Git stores: a correctly tracked LFS file is a
78
+ ~132-byte pointer in the repository and the full file on disk, so grading
79
+ the worktree reports the very files that are doing the right thing.
80
+
81
+ A path ABSENT from this map has no committed fact -- untracked, new, a
82
+ gitlink, or a root with no git repository -- and a check must grade it by
83
+ the worktree as it always did. Absence is never "small": a missing fact must
84
+ not turn into a silent pass.
85
+ """
86
+
72
87
  inputs: dict[str, Path] = Field(default_factory=dict)
73
88
  """Named inputs, already resolved to absolute paths by the runner.
74
89
 
75
90
  A check declares the logical names it needs and reads `ctx.inputs["x"]`. It
76
91
  never joins a path, and a test overrides an input by building a Context —
77
- not by exporting `COVERAGE_BASELINE_CONFIG` into the process.
92
+ not by exporting an environment variable into the process.
78
93
  """
79
94
 
80
95
  batch_reports: tuple[Report, ...] | None = None
@@ -21,9 +21,8 @@ import tomllib
21
21
  from collections.abc import Mapping
22
22
  from functools import cache
23
23
  from importlib import resources
24
- from typing import Annotated
25
24
 
26
- from pydantic import Field, ValidationError, field_validator
25
+ from pydantic import ValidationError, field_validator
27
26
 
28
27
  from ..core.constants import Constants
29
28
  from ..core.models import StrictModel
@@ -6,7 +6,8 @@ this", and the answer is declared once, here, so a second docs gate does not
6
6
  grow its own, independently drifting copy the way LAY-008/LAY-012 once did for
7
7
  the repository root (see `root_shape.py`'s module docstring).
8
8
 
9
- Nothing below is invented — every entry is read off an EXISTING docs gate:
9
+ Every entry below is read off an EXISTING docs gate, except `notes.md`, which
10
+ is declared by an explicit decision (see its entry):
10
11
 
11
12
  ALLOWED_DOCS_DIRS
12
13
  architecture, research, compliance, operations
@@ -42,6 +43,15 @@ ALLOWED_DOCS_FILES
42
43
  no repository in this estate ships a top-level `docs/index.md` today,
43
44
  and declaring it costs nothing.
44
45
 
46
+ notes.md
47
+ the task ledger. Not read off a docs gate: Tarun's global agent rule
48
+ (decision of 2026-10-01) requires every agent to append one line to
49
+ `docs/notes.md` when it starts a task and one when it finishes
50
+ (append-only, at most 100 characters per line), so the file exists in
51
+ every repository an agent works in and this gate would otherwise flag
52
+ it as undeclared. `docs-okf-profiles.yaml` carries a matching
53
+ `docs/notes.md` profile so `docs.okf-profile` (DOC-006) grades it too.
54
+
45
55
  These are PERMITTED, not required — the same distinction `root_shape.py`
46
56
  draws for the repository root. A repository using only two of the five
47
57
  directories is not missing three findings; it has simply not written those
@@ -62,4 +72,5 @@ ALLOWED_DOCS_FILES: frozenset[str] = frozenset({
62
72
  "AGENTS.md",
63
73
  "CLAUDE.md",
64
74
  "index.md",
75
+ "notes.md",
65
76
  })
@@ -32,69 +32,6 @@
32
32
  schema: adl.gate-profile/v1
33
33
  rows:
34
34
 
35
- # ---- coverage ----
36
- - id: COV-001
37
- name: backend-crate
38
- domain: coverage
39
- title: Run retained backend crate coverage gate
40
- severity: M
41
- controls:
42
- - EC-A.8.29
43
- engine:
44
- scope:
45
- - <rust>/**
46
- grants: 0
47
- timeout_ms: 60000
48
- - id: COV-002
49
- name: backend-ratchet
50
- domain: coverage
51
- title: Reject backend coverage decline below its ratchet
52
- severity: H
53
- controls:
54
- - EC-A.8.28
55
- engine:
56
- scope:
57
- - <rust>/**
58
- grants: 0
59
- timeout_ms: 60000
60
- - id: COV-003
61
- name: baseline
62
- domain: coverage
63
- title: Run retained coverage baseline gate
64
- severity: M
65
- controls:
66
- - EC-A.8.29
67
- engine:
68
- scope:
69
- - <rust>/**
70
- grants: 0
71
- timeout_ms: 60000
72
- - id: COV-004
73
- name: config-committed
74
- domain: coverage
75
- title: Require coverage ratchet data to be committed
76
- severity: M
77
- controls:
78
- - EC-A.8.29
79
- engine:
80
- scope:
81
- - <compliance>/policy/inputs/coverage-baseline.json
82
- grants: 0
83
- timeout_ms: 60000
84
- - id: COV-005
85
- name: full
86
- domain: coverage
87
- title: Run retained coverage gate
88
- severity: M
89
- controls:
90
- - EC-A.8.29
91
- engine:
92
- scope:
93
- - <rust>/**
94
- - <compliance>/checks/coverage/full/coverage-modules.list
95
- grants: 0
96
- timeout_ms: 60000
97
-
98
35
  # ---- docs ----
99
36
  - id: DOC-001
100
37
  name: adr-lifecycle
@@ -238,7 +175,7 @@ rows:
238
175
  grants: 0
239
176
  timeout_ms: 60000
240
177
 
241
- # ---- frontend ----
178
+ # ---- docs (continued: indexes, ledger, closed-set) ----
242
179
  - id: DOC-008
243
180
  name: indexes
244
181
  domain: docs
@@ -301,6 +238,104 @@ rows:
301
238
  - '<docs>/**'
302
239
  grants: 0
303
240
  timeout_ms: 60000
241
+ - id: DOC-011
242
+ name: filename
243
+ domain: docs
244
+ title: Require docs/ Markdown stems to be lower-kebab
245
+ severity: M
246
+ controls:
247
+ - EC-A.5.37
248
+ engine:
249
+ # docs/ only. The plans tree is deliberately NOT here: its pages answer
250
+ # to the board (LAY-009 owns plans/ frontmatter) and a filename rule is
251
+ # no more able to grade them than a profile is.
252
+ #
253
+ # The scope below mirrors DOC-006 (docs.okf-profile) EXACTLY -- one
254
+ # tree, both docs/ content gates walking it -- with the rationale
255
+ # comments carried over, adjusted only where they were
256
+ # profile-specific:
257
+ scope:
258
+ - <docs>/**
259
+ # A holding area for work that is not yet a Feature on the board.
260
+ # DOC-006 excludes it from profiling by design; mirrored here so a
261
+ # page DOC-006 does not grade is not graded for its filename either.
262
+ - '!<docs>/proposals/**'
263
+ # DOC-006 has excluded compliance/ since 2026-09-15, pending a real
264
+ # compliance audit (its pages answer to audit metadata, not to a
265
+ # gate a writer can satisfy from the document). The exclusion is
266
+ # mirrored here unchanged.
267
+ - '!<docs>/compliance/**'
268
+ # Tree guides are not pages: AGENTS.md and CLAUDE.md say what
269
+ # belongs in a directory and are governed by layout.agents-layout.
270
+ # The check also exempts the two names by rule -- a name may not be
271
+ # lower-kebab and still be correct -- so these excludes are
272
+ # belt-and-braces over that exemption, mirroring DOC-006.
273
+ - '!<docs>/**/AGENTS.md'
274
+ - '!<docs>/AGENTS.md'
275
+ - '!<docs>/**/CLAUDE.md'
276
+ - '!<docs>/CLAUDE.md'
277
+ # A knowledge index is a catalog of a tree, not a page about the
278
+ # system (DOC-006's reasoning); its stem ("index") is
279
+ # kebab-conforming anyway, and the exclusion is mirrored so both
280
+ # gates walk the same tree.
281
+ - '!<docs>/**/index.md'
282
+ grants: 0
283
+ timeout_ms: 60000
284
+ - id: DOC-012
285
+ name: directory-size
286
+ domain: docs
287
+ title: Cap each docs/ directory's page count via the directory ratchet
288
+ severity: M
289
+ controls:
290
+ - EC-A.5.38
291
+ engine:
292
+ # docs/ only. The plans tree is deliberately NOT here: its pages answer
293
+ # to the board (LAY-009 owns plans/ frontmatter) and a page-count cap
294
+ # is no more able to grade them than a filename rule is.
295
+ #
296
+ # The cap is CONFIG, not register content (owner ruling 2026-10-02):
297
+ # it is the repository's declared
298
+ # [controls.compliance.limits].docs_pages_per_directory, arriving as
299
+ # the docs-pages-per-directory declaration; absent, the engine default
300
+ # of 15 stands. The LAY-004 directory-ratchet register holds ONLY
301
+ # per-directory exemption baselines (docs_pages.baseline): an entry
302
+ # exempts its directory up to the recorded count; an absent register or
303
+ # section means NO exemptions, so the cap is enforced bare. At zero
304
+ # exemptions the register file is deleted. docs/decisions/ is exempt by
305
+ # rule at any depth below it — the flat ADR log is flat-by-design, not
306
+ # an over-cap directory.
307
+ #
308
+ # The scope below mirrors DOC-006 (docs.okf-profile) EXACTLY -- one
309
+ # tree, all three docs/ content gates walking it -- with the rationale
310
+ # comments carried over, adjusted only where they were
311
+ # filename-specific:
312
+ scope:
313
+ - <docs>/**
314
+ # A holding area for work that is not yet a Feature on the board.
315
+ # DOC-006 excludes it from profiling by design; mirrored here so a
316
+ # page DOC-006 does not grade is not counted against the cap either.
317
+ - '!<docs>/proposals/**'
318
+ # DOC-006 has excluded compliance/ since 2026-09-15, pending a real
319
+ # compliance audit (its pages answer to audit metadata, not to a
320
+ # gate a writer can satisfy from the document). The exclusion is
321
+ # mirrored here unchanged.
322
+ - '!<docs>/compliance/**'
323
+ # Tree guides are not pages: AGENTS.md and CLAUDE.md say what
324
+ # belongs in a directory and are governed by layout.agents-layout.
325
+ # The check's rule-level exemption is decisions/ (the flat ADR log,
326
+ # flat-by-design) rather than these names, so these excludes are
327
+ # the whole of the guide story here, mirroring DOC-006.
328
+ - '!<docs>/**/AGENTS.md'
329
+ - '!<docs>/AGENTS.md'
330
+ - '!<docs>/**/CLAUDE.md'
331
+ - '!<docs>/CLAUDE.md'
332
+ # A knowledge index is a catalog of a tree, not a page about the
333
+ # system (DOC-006's reasoning); it does not count against the page
334
+ # cap either, and the exclusion is mirrored so the docs gates walk
335
+ # the same tree.
336
+ - '!<docs>/**/index.md'
337
+ grants: 0
338
+ timeout_ms: 60000
304
339
 
305
340
  # ---- layout ----
306
341
  - id: LAY-001
@@ -366,6 +401,14 @@ rows:
366
401
  controls:
367
402
  - EC-A.5.36
368
403
  engine:
404
+ # The ceilings are CONFIG, not register content (generic ratchet
405
+ # principle, owner ruling 2026-10-02): they live in
406
+ # [controls.compliance.directory-ratchet].max_children and reach the
407
+ # engine as the directory-ceilings declaration. The LAY-004 register
408
+ # records exemption baselines only; an absent register means no
409
+ # exemptions allowed, so the ceilings are enforced bare. At zero
410
+ # recorded state the register file is deleted. No ceilings declared
411
+ # means nothing to enforce — the gate is inert.
369
412
  scope:
370
413
  - <typescript>/**
371
414
  - <rust>/**
@@ -390,11 +433,16 @@ rows:
390
433
  - '!**/Cargo.toml'
391
434
  - '!**/build.rs'
392
435
  - '!**/main.tf'
393
- # No named-input entry for the ratchet register: it is package data now
394
- # (src/adl_compliance/checks/layout/directory_ratchet/grants.yaml,
395
- # read via `resources`, not a consumer path), so editing it does not
396
- # select this gate -- the same known gap DOC-006's packaged profile
397
- # register has (see INVARIANTS.md, "What is not true yet").
436
+ # The ratchet register is a named INPUT of this gate, not a scope entry:
437
+ # it is the CONSUMER's own file (<compliance>/ratchets/
438
+ # LAY-004-over-limit-directory.yaml -- the estate's settled location for
439
+ # a consumer-owned ratchet number, see packages/repo-controls/src/
440
+ # config.ts), and <compliance> is not one of this row's scope trees, so
441
+ # editing the register does not select this gate -- the same known gap
442
+ # DOC-006's packaged profile register has. It shipped as package data
443
+ # once and graded one donor repository's shape against every other
444
+ # repository (K-42); the `inputs` entry and
445
+ # test_the_register_is_not_packaged_data guard that return.
398
446
  # Tree-scoped only. Every verdict is a directory's DIRECT FILE COUNT, which
399
447
  # is only knowable by listing all of that directory's children: on a diff
400
448
  # scope DIR-002 can never fire and DIR-001's single-file rule misfires on
@@ -404,7 +452,8 @@ rows:
404
452
  # removes. `full` (`selects: all-rows`) picks this row up regardless.
405
453
  # Not an exception catalogue: `structural_grant = True` on the check
406
454
  # already forces the allowance to 0 regardless of this field. The ratchet
407
- # register itself is package data, read via `resources` (see check.py).
455
+ # register itself is the consumer's own file, reached through the check's
456
+ # named `inputs`, not package data (see check.py).
408
457
  grants: 0
409
458
  timeout_ms: 60000
410
459
  - id: LAY-006
@@ -466,25 +515,6 @@ rows:
466
515
  - <plans>/**
467
516
  grants: 0
468
517
  timeout_ms: 60000
469
- - id: LAY-010
470
- name: profile-data
471
- domain: layout
472
- title: Enforce data-backed layout profile predicates
473
- severity: M
474
- controls:
475
- - EC-A.5.36
476
- engine:
477
- # The two `*.md` globs are removed. They are residue from the multi-mode
478
- # profile-data.sh this engine was split out of: its `layout.markdown-trees`
479
- # branch read Markdown, and that branch now lives in its own gate
480
- # (check-markdown-tree-location.sh) with its own row. This engine reads
481
- # PostgreSQL migrations and nothing else, so the globs only made every
482
- # documentation change schedule a gate with nothing to say. A stale scope
483
- # is a silent pass in one direction and dead work in the other (K-17).
484
- scope:
485
- - <rust>/crates/**
486
- grants: 0
487
- timeout_ms: 60000
488
518
  - id: LAY-011
489
519
  name: references
490
520
  domain: layout
@@ -592,7 +622,7 @@ rows:
592
622
  - id: LAY-016
593
623
  name: open-work-cap
594
624
  domain: layout
595
- title: No open plans or open gaps
625
+ title: Cap open plans and open gaps at ten
596
626
  severity: M
597
627
  controls:
598
628
  - EC-A.5.36
@@ -613,14 +643,16 @@ rows:
613
643
  engine:
614
644
  scope:
615
645
  - '**'
616
- # The LFS fixtures are deliberately oversized binaries committed WITHOUT
617
- # LFS -- that is precisely what they prove the check detects. Grading
618
- # them means a package that fixture-tests "large blobs must use LFS"
619
- # can never pass its own gate.
646
+ # LFS-001's own test cases are generated at test time under tmp_path
647
+ # (the committed LFS fixtures were retired 2026-10-01), so this gate no
648
+ # longer commits oversized binaries. The `!**/fixtures/**` exclusion
649
+ # remains because OTHER gates still commit fixtures, and fixture data
650
+ # is test input, not repository content to grade.
620
651
  - '!**/fixtures/**'
621
652
  grants: 0
622
653
  timeout_ms: 60000
623
654
 
655
+ # ---- pipeline ----
624
656
  - id: PIP-004
625
657
  name: phase-disjoint
626
658
  domain: pipeline
@@ -675,6 +707,13 @@ rows:
675
707
  - EC-A.5.21
676
708
  engine:
677
709
  scope:
710
+ # The tree-derived DEFAULT: each half is exactly two entries under its own
711
+ # tree. A repository whose manifests do not sit one level under its tree
712
+ # (enact-combined: a brace-union `typescript` tree, manifests at the root and
713
+ # under apps/*/) states the paths itself with `[controls.compliance.lockfiles]`
714
+ # (`bun-manifests`/`bun-lockfiles`, `cargo-manifests`/`cargo-lockfiles`); a
715
+ # declared half REPLACES that half's two entries, in the scope and in what the
716
+ # check grades. See `LockfileIntegrity.declared_scope`.
678
717
  - <rust>/Cargo.toml
679
718
  - <rust>/Cargo.lock
680
719
  - <typescript>/package.json
@@ -736,56 +775,3 @@ rows:
736
775
  - '**'
737
776
  grants: 0
738
777
  timeout_ms: 60000
739
- - id: REL-001
740
- name: changeset-plan
741
- domain: release
742
- title: Run retained changeset-plan gate
743
- severity: M
744
- controls:
745
- - EC-A.8.32
746
- engine:
747
- scope:
748
- # The gate's own "release-relevant" case list, which is six paths, not
749
- # one tree. `.changeset/**` alone understated it by five: while the gate
750
- # resolved its own diff those five were still tested, so the row and the
751
- # code disagreed and the code won. Now the row is the narrowing, so a
752
- # missing entry here is a file the gate can no longer see.
753
- - .changeset/**
754
- - VERSION
755
- - CHANGELOG.md
756
- - <workflows>/package.json
757
- - <workflows>/changesets/package.json
758
- - <workflows>/changesets/bun.lock
759
- grants: 0
760
- timeout_ms: 60000
761
- - id: REL-004
762
- name: version-release
763
- domain: release
764
- title: Run retained version-release gate
765
- severity: M
766
- controls:
767
- - EC-A.8.32
768
- engine:
769
- scope:
770
- # The FOUR files check.sh actually reads: VERSION and CHANGELOG.md
771
- # directly, plus the two entries in its `versioned_files` array. The
772
- # prior brace-glob form, `{VERSION,CHANGELOG.md,backend/Cargo.toml,
773
- # frontend/package.json,.changeset}/**`, appended `/**` after each
774
- # FILE name -- `_glob_bash_pattern` in lib/glob.sh requires a literal
775
- # "/" then more characters after the alternation, which a bare file
776
- # never has, so the pattern matched none of VERSION, CHANGELOG.md,
777
- # backend/Cargo.toml or frontend/package.json and only `.changeset/**`
778
- # ever selected this row (K-13: a positive glob matching nothing
779
- # excludes everything). backend/Cargo.toml (0.1.52) and
780
- # frontend/package.json (2.1.41) carry their own independent
781
- # versioning, not the release VERSION (0.0.11) -- check.sh does not
782
- # read either, so they are not restored here; adding them would
783
- # trigger this gate for two files it has no logic to grade.
784
- - VERSION
785
- - CHANGELOG.md
786
- - <workflows>/package.json
787
- - <workflows>/changesets/package.json
788
- grants: 0
789
- timeout_ms: 60000
790
-
791
- # ---- rust ----