@amsterdamdatalabs/adl-agent-control-linux-x64 0.1.10 → 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.
- package/bin/adl +2 -2
- package/bin/git +17 -18
- package/bin/git-ado +27 -26
- package/bin/git-defaults +173 -0
- package/bin/health-check +8 -1
- package/bin/kimi-hooks +1 -1
- package/bin/lib/adl-package.sh +257 -0
- package/bin/lib/bun-compile-build.sh +1 -1
- package/bin/lib/fleet-host.sh +62 -0
- package/bin/lib/lean-ctx-observe-hooks.sh +9 -9
- package/bin/reconcile +693 -470
- package/bin/reconcile-host +121 -0
- package/bin/setup +219 -0
- package/bin/shell-path-policy +15 -5
- package/bin/sync-and-reconcile +79 -68
- package/bin/validate-manifest +46 -51
- package/package.json +2 -12
- package/packages/agent-hooks/README.md +14 -9
- package/packages/agent-hooks/assets/hooks.json +0 -20
- package/packages/agent-hooks/package.json +1 -2
- package/packages/agent-hooks/src/cli/args.ts +1 -1
- package/packages/agent-hooks/src/cli/doctor.ts +6 -58
- package/packages/agent-hooks/src/deploy/deploy.ts +12 -41
- package/packages/agent-hooks/src/deploy/doctor.ts +8 -11
- package/packages/agent-hooks/src/deploy/index.ts +14 -14
- package/packages/agent-hooks/src/deploy/json-merge.ts +7 -8
- package/packages/agent-hooks/src/deploy/legacy-lock.ts +2 -2
- package/packages/agent-hooks/src/deploy/list.ts +1 -1
- package/packages/agent-hooks/src/deploy/lock.ts +31 -12
- package/packages/agent-hooks/src/deploy/profile.ts +3 -4
- package/packages/agent-hooks/src/deploy/source.ts +1 -1
- package/packages/agent-hooks/src/gating/config.ts +10 -24
- package/packages/agent-hooks/src/gating/root.ts +3 -3
- package/packages/agent-hooks/src/hooks/briefing/handler.ts +2 -2
- package/packages/agent-hooks/src/hooks/briefing/index.ts +27 -287
- package/packages/agent-hooks/src/hooks/contract.ts +17 -17
- package/packages/agent-hooks/src/hooks/crg/background.ts +27 -0
- package/packages/agent-hooks/src/hooks/crg/index.ts +7 -6
- package/packages/agent-hooks/src/hooks/log.ts +8 -10
- package/packages/agent-hooks/src/hooks/user-prompt-submit/match.ts +1 -1
- package/packages/agent-hooks/src/hooks/user-prompt-submit/tokenizer.ts +1 -1
- package/packages/agent-hooks/src/hooks/user-prompt-submit/vector.ts +6 -5
- package/packages/agent-hooks/src/hosts/registry.ts +1 -1
- package/packages/agent-hooks/src/log/adl-dir.ts +44 -0
- package/packages/agent-hooks/src/log/writer.ts +16 -2
- package/packages/agent-hooks/src/main.ts +7 -41
- package/packages/agent-hooks/src/pre-tool-use/handler.ts +71 -82
- package/packages/agent-hooks/src/rules/engine.ts +13 -17
- package/packages/agent-hooks/src/rules/impl/adl-build-run-denied.ts +3 -3
- package/packages/agent-hooks/src/rules/impl/adl-git-credential-bypass.ts +12 -14
- package/packages/agent-hooks/src/rules/impl/adl-git-identity.ts +28 -28
- package/packages/agent-hooks/src/rules/impl/adl-git-push-policy.ts +8 -9
- package/packages/agent-hooks/src/rules/impl/adl-human-azdo-bypass.ts +56 -59
- package/packages/agent-hooks/src/rules/impl/adl-identity.ts +16 -23
- package/packages/agent-hooks/src/rules/impl/adl-mcp-cli.ts +19 -16
- package/packages/agent-hooks/src/rules/impl/adl-pr-complete-pending.ts +2 -2
- package/packages/agent-hooks/src/rules/impl/adl-pr-review-role.ts +9 -12
- package/packages/agent-hooks/src/rules/impl/adl-pr-role.ts +5 -7
- package/packages/agent-hooks/src/rules/impl/adl-run-required.ts +411 -0
- package/packages/agent-hooks/src/rules/impl/adl-token-minting-role.ts +4 -5
- package/packages/agent-hooks/src/rules/impl/adl-workitem-role.ts +6 -7
- package/packages/agent-hooks/src/rules/impl/agent-tamper-protection.ts +77 -70
- package/packages/agent-hooks/src/rules/impl/deny-allowlist.ts +159 -0
- package/packages/agent-hooks/src/rules/impl/fs-trash.ts +2 -2
- package/packages/agent-hooks/src/rules/impl/git-helpers.ts +21 -23
- package/packages/agent-hooks/src/rules/impl/git-worktree.ts +14 -28
- package/packages/agent-hooks/src/rules/impl/mcp-tool.ts +3 -3
- package/packages/agent-hooks/src/rules/impl/messages.ts +1 -1
- package/packages/agent-hooks/src/rules/impl/pr-completion.ts +1 -1
- package/packages/agent-hooks/src/rules/impl/tool-azure-devops.ts +35 -46
- package/packages/agent-hooks/src/rules/impl/tool-find.ts +34 -7
- package/packages/agent-hooks/src/rules/impl/tool-grep.ts +34 -12
- package/packages/agent-hooks/src/rules/impl/tool-native-search.ts +52 -9
- package/packages/agent-hooks/src/rules/ports.ts +5 -7
- package/packages/agent-hooks/src/rules/registry.ts +4 -6
- package/packages/agent-hooks/src/rules/shell/git-identity.ts +86 -101
- package/packages/agent-hooks/src/rules/shell/git-internals.ts +1 -1
- package/packages/agent-hooks/src/rules/shell/invocation.ts +24 -118
- package/packages/agent-hooks/src/rules/shell/piped-script.ts +1 -1
- package/packages/agent-hooks/src/rules/shell/prefixes.ts +1 -1
- package/packages/agent-hooks/src/rules/shell/protected-carrier-writes.ts +11 -10
- package/packages/agent-hooks/src/rules/shell/protected-carriers.ts +26 -26
- package/packages/agent-hooks/src/rules/shell/substitution.ts +1 -1
- package/packages/agent-hooks/src/rules/shell/xargs.ts +2 -2
- package/packages/agent-hooks/src/rules/spec.ts +2 -2
- package/packages/agent-settings/README.md +287 -0
- package/packages/agent-settings/assets/GLOBAL-AGENTS.md +18 -18
- package/packages/agent-settings/assets/agents/architect.toml +2 -0
- package/packages/agent-settings/assets/agents/code-reviewer.toml +2 -0
- package/packages/agent-settings/assets/agents/executor.toml +2 -0
- package/packages/agent-settings/assets/agents/explore.toml +2 -0
- package/packages/agent-settings/assets/agents/planner.toml +2 -0
- package/packages/agent-settings/assets/mcp.json +0 -4
- package/packages/agent-settings/deploy-profile.json +139 -0
- package/packages/agent-settings/deploy-profile.schema.json +147 -0
- package/packages/agent-settings/managed/README.md +29 -30
- package/packages/agent-settings/managed/codex-requirements.toml +9 -9
- package/packages/agent-settings/package.json +20 -0
- package/packages/agent-settings/src/deploy/agent-render.ts +2 -2
- package/packages/agent-settings/src/deploy/agent-toml.ts +1 -1
- package/packages/agent-settings/src/deploy/agents-deploy.ts +17 -3
- package/packages/agent-settings/src/deploy/doctor.ts +3 -83
- package/packages/agent-settings/src/deploy/index.ts +6 -33
- package/packages/agent-settings/src/deploy/legacy-lock.ts +6 -6
- package/packages/agent-settings/src/deploy/list.ts +5 -19
- package/packages/agent-settings/src/deploy/lock.ts +8 -18
- package/packages/agent-settings/src/deploy/mcp-deploy.ts +10 -5
- package/packages/agent-settings/src/deploy/mcp-merge.ts +22 -3
- package/packages/agent-settings/src/deploy/mcp-source.ts +1 -1
- package/packages/agent-settings/src/deploy/profile.ts +11 -35
- package/packages/agent-settings/src/deploy/retire-lean-ctx.ts +184 -0
- package/packages/agent-settings/src/deploy/settings.ts +17 -22
- package/packages/agent-settings/src/global-surface-sweep.ts +5 -17
- package/packages/agent-settings/src/kimi-hooks.ts +339 -192
- package/packages/agent-settings/src/opencode-hooks.ts +1 -1
- package/packages/agent-settings/tsconfig.json +23 -0
- package/packages/agent-skills/assets/agent-search-tool-audit/SKILL.md +120 -0
- package/packages/agent-skills/assets/agent-search-tool-audit/scripts/audit.sh +276 -0
- package/packages/agent-skills/assets/debug-issue/SKILL.md +8 -7
- package/packages/agent-skills/assets/explore-codebase/SKILL.md +13 -13
- package/packages/agent-skills/assets/refactor-safely/SKILL.md +12 -11
- package/packages/agent-skills/assets/review-changes/SKILL.md +7 -7
- package/packages/agent-skills/assets/testing/references/e2e.md +37 -0
- package/packages/agent-skills/assets/testing/references/integration.md +37 -0
- package/packages/agent-skills/assets/testing/references/unit.md +32 -0
- package/packages/agent-skills/dist/deploy.d.ts +2 -0
- package/packages/agent-skills/dist/deploy.d.ts.map +1 -1
- package/packages/agent-skills/dist/deploy.js +27 -1
- package/packages/agent-skills/dist/deploy.js.map +1 -1
- package/packages/agent-skills/dist/doctor.d.ts +0 -2
- package/packages/agent-skills/dist/doctor.d.ts.map +1 -1
- package/packages/agent-skills/dist/doctor.js +1 -1
- package/packages/agent-skills/dist/doctor.js.map +1 -1
- package/packages/agent-skills/dist/fs-utils.d.ts +0 -1
- package/packages/agent-skills/dist/fs-utils.d.ts.map +1 -1
- package/packages/agent-skills/dist/fs-utils.js +1 -1
- package/packages/agent-skills/dist/fs-utils.js.map +1 -1
- package/packages/agent-skills/package.json +1 -1
- package/packages/agent-skills/src/deploy.ts +29 -1
- package/packages/agent-skills/src/doctor.ts +1 -1
- package/packages/agent-skills/src/fs-utils.ts +1 -1
- package/packages/azdo/README.md +10 -9
- package/packages/azdo/package.json +2 -5
- package/packages/azdo/src/azdo-pl.ts +2 -54
- package/packages/azdo/src/azdo-pr-review.ts +4 -4
- package/packages/azdo/src/azdo-repo-doctor.ts +101 -52
- package/packages/azdo/src/azdo-wit.ts +41 -2
- package/packages/azdo/src/lib/agent-identity.ts +12 -14
- package/packages/azdo/src/lib/agent-token.ts +2 -2
- package/packages/azdo/src/lib/client.ts +0 -5
- package/packages/azdo/src/lib/graph-identity.ts +4 -4
- package/packages/azdo/src/workflow-rules-matrix.csv +85 -0
- package/packages/azdo/src/workflow-rules.ts +128 -0
- package/packages/fleet/manifest.json +38 -33
- package/packages/fleet/manifest.schema.json +67 -65
- package/packages/fleet/src/default-agent-file.ts +3 -3
- package/packages/fleet/src/install-adl-package.ts +73 -15
- package/packages/fleet/src/install-embedding-model.ts +14 -14
- package/packages/fleet/src/managed-settings.ts +7 -7
- package/packages/fleet/src/repo-maintain.ts +439 -0
- package/packages/fleet/src/scratch-reap.ts +6 -6
- package/packages/fleet/src/vscode-settings.ts +5 -5
- package/packages/repo-controls/README.md +141 -43
- package/packages/repo-controls/assets/promote.ts +4 -4
- package/packages/repo-controls/assets/reconcile-guard.sh +10 -46
- package/packages/repo-controls/assets/version-bump.sh +31 -84
- package/packages/repo-controls/bunfig.toml +6 -7
- package/packages/repo-controls/package/adl-compliance/AGENTS.md +5 -6
- package/packages/repo-controls/package/adl-compliance/conftest.py +3 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/__init__.py +4 -16
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/test_check.py +9 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/notes.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/test_check.py +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/__init__.py +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/check.py +266 -0
- 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
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/.hidden.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/data.csv +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/diagram.png +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/mock.png +1 -0
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p1.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p2.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p3.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p4.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p5.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/docs/architecture/build.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/docs/architecture/overview.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/docs/guide/install.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/docs/guide/start.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/grants.yaml +4 -0
- 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
- 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
- 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
- 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
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/guide/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/guide/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/guide/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/grants.yaml +4 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-exempt/docs/guide/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-exempt/docs/guide/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-exempt/docs/guide/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-exempt/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-grew/docs/guide/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-grew/docs/guide/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-grew/docs/guide/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-grew/grants.yaml +4 -0
- 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
- 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
- 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
- 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
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/grants.yaml +4 -0
- 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
- 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
- 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
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-over-cap/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/held/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/held/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/held/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/held/d.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/shrunk/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/shrunk/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/grants.yaml +6 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-unusable/docs/guide/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-unusable/docs/guide/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-unusable/docs/guide/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-unusable/grants.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/test_check.py +345 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/check.py +18 -5
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/test_check.py +35 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/__init__.py +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/check.py +91 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/AGENTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/CLAUDE.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/-leading-hyphen.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/AGENTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/double--hyphen.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/getting started.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/nested/page-here.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/trailing-hyphen-.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/ui-contract.md +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/user_profile.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/assets/UI-CONTRACT.png +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/assets/diagram.png +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/index.md +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/notes.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/reference.html +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/research/2026-10-experiment.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/research/UI-CONTRACT.md +6 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs.md +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/test_check.py +194 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/check.py +14 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/docs-knowledge-indexes.yaml +5 -5
- 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
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/test_check.py +58 -6
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/ledger/test_check.py +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/check.py +64 -17
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/docs-okf-profiles.yaml +60 -9
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-ledger-clean/docs/notes.md +17 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-ledger-no-lines/docs/notes.md +13 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-clean/docs/architecture/demo.md +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-clean/docs-okf-profiles.yaml +0 -1
- 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
- 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
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs-okf-profiles.yaml +5 -0
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-violation/docs-okf-profiles.yaml +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/experiment-ok.md +15 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/extra-key.md +15 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/extra-keys.md +16 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-created.md +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-description.md +11 -0
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-sources.md +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-status.md +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-title.md +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/optional-keys.md +16 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/research-ok.md +14 -0
- 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
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research-neighbours/docs/operations/runbook.md +26 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/test_check.py +228 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/register.py +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/test_check.py +11 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/__init__.py +5 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/check.py +160 -44
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-clean/grants.yaml +0 -2
- 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
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-empty-register/grants.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/grants.yaml +0 -2
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-missing-tree/grants.yaml +5 -0
- 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
- 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
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-no-ceilings/grants.yaml +4 -0
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-stale-entry/grants.yaml +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/grants.yaml +0 -2
- 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
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unusable-register/grants.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/register.py +127 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/test_check.py +265 -29
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/check.py +75 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/test_check.py +194 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/check.py +56 -10
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/test_check.py +256 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/check.py +40 -12
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/test_check.py +108 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/test_check.py +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/check.py +2 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/check.py +23 -6
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/test_check.py +76 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/check.py +58 -17
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/test_check.py +161 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/check.py +35 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/test_check.py +108 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/check.py +281 -61
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/absolute-path.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/backslash-path.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/baseline-is-a-list.yaml +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/boolean-size.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/dot-segment.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/duplicate-path.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/empty-file.yaml +0 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/empty-segment.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/float-size.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/negative-size.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/no-over-limit-baseline.yaml +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/no-schema-version.yaml +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/non-string-path.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/not-yaml.yaml +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/null-size.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/parent-segment.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/string-size.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/top-level-is-a-list.yaml +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/trailing-slash.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/unknown-key.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/wrong-schema-version.yaml +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/zero-size.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/valid.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/test_check.py +758 -45
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/ignored_paths/check.py +4 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/ignored_paths/test_check.py +2 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/cargo_lock.py +490 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/check.py +368 -55
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/test_check.py +4 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/test_declared_paths.py +523 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/test_stale_lock.py +1179 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/cli.py +122 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/check.py +33 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/constants.py +0 -11
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/context.py +16 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/config.py +1 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/docs_shape.py +12 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/gate-registry.alt.yaml +133 -147
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/gate-registry.yaml +133 -147
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/registry.py +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/root_shape.py +52 -10
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/runner.py +23 -4
- package/packages/repo-controls/package.json +2 -10
- package/packages/repo-controls/scripts/hooks/post-merge +13 -0
- package/packages/repo-controls/scripts/hooks/pre-push +3 -3
- package/packages/repo-controls/src/azdo-push.ts +64 -36
- package/packages/repo-controls/src/azure-devops-governance.ts +7 -9
- package/packages/repo-controls/src/azure-devops-remote.ts +1 -1
- package/packages/repo-controls/src/cli.ts +29 -8
- package/packages/repo-controls/src/compliance-config.ts +410 -2
- package/packages/repo-controls/src/config.ts +133 -60
- package/packages/repo-controls/src/constants.ts +13 -27
- package/packages/repo-controls/src/coverage-ratchet.ts +4 -4
- package/packages/repo-controls/src/doctor.ts +46 -19
- package/packages/repo-controls/src/gitignore-block.ts +5 -29
- package/packages/repo-controls/src/hook-log.ts +1 -2
- package/packages/repo-controls/src/hook.ts +201 -45
- package/packages/repo-controls/src/install.ts +14 -8
- package/packages/repo-controls/src/integrity.ts +3 -3
- package/packages/repo-controls/src/lfs.ts +111 -0
- package/packages/repo-controls/src/promote.ts +8 -8
- package/packages/repo-controls/src/runtime.ts +9 -1
- package/packages/repo-controls/src/workflows-drift.ts +4 -5
- package/packages/repo-controls/src/worktree-guard.ts +3 -3
- package/packages/fleet/jobs/git-maintain/src/main.ts +0 -848
- package/packages/fleet/systemd/adl-azure-agent-update.service +0 -13
- package/packages/fleet/systemd/adl-azure-agent-update.timer +0 -10
|
@@ -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.
|
|
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
|
|
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
|
|
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
|
|
25
|
+
from pydantic import ValidationError, field_validator
|
|
27
26
|
|
|
28
27
|
from ..core.constants import Constants
|
|
29
28
|
from ..core.models import StrictModel
|
package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/docs_shape.py
CHANGED
|
@@ -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
|
-
|
|
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
|
-
# ----
|
|
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
|
-
#
|
|
394
|
-
# (
|
|
395
|
-
#
|
|
396
|
-
#
|
|
397
|
-
#
|
|
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
|
|
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:
|
|
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
|
-
#
|
|
617
|
-
#
|
|
618
|
-
#
|
|
619
|
-
#
|
|
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 ----
|