@amsterdamdatalabs/adl-agent-control-darwin-arm64 0.1.4
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 +4 -0
- package/bin/cursor-settings +14 -0
- package/bin/default-agent-file +14 -0
- package/bin/git +670 -0
- package/bin/git-ado +425 -0
- package/bin/global-agents +14 -0
- package/bin/global-surface-sweep +14 -0
- package/bin/health-check +38 -0
- package/bin/kimi-hooks +14 -0
- package/bin/lean-ctx-observe-strip +361 -0
- package/bin/lib/bun-compile-build.sh +34 -0
- package/bin/lib/lean-ctx-observe-hooks.sh +634 -0
- package/bin/managed-settings +14 -0
- package/bin/opencode-hooks +14 -0
- package/bin/reconcile +2648 -0
- package/bin/scratch-reap +14 -0
- package/bin/shell-path-policy +64 -0
- package/bin/surface-policy +14 -0
- package/bin/sync-and-reconcile +215 -0
- package/bin/update-azure-agent-pool +29 -0
- package/bin/validate-manifest +171 -0
- package/bin/vscode-settings +14 -0
- package/package.json +44 -0
- package/packages/agent-hooks/README.md +411 -0
- package/packages/agent-hooks/assets/hooks.json +97 -0
- package/packages/agent-hooks/assets/opencode-plugin.template.ts +224 -0
- package/packages/agent-hooks/bunfig.toml +27 -0
- package/packages/agent-hooks/deploy-profile.json +53 -0
- package/packages/agent-hooks/deploy-profile.schema.json +120 -0
- package/packages/agent-hooks/package.json +23 -0
- package/packages/agent-hooks/src/cli/args.ts +99 -0
- package/packages/agent-hooks/src/cli/doctor.ts +241 -0
- package/packages/agent-hooks/src/cli/rules.ts +133 -0
- package/packages/agent-hooks/src/deploy/deploy.ts +181 -0
- package/packages/agent-hooks/src/deploy/doctor.ts +158 -0
- package/packages/agent-hooks/src/deploy/index.ts +17 -0
- package/packages/agent-hooks/src/deploy/json-merge.ts +115 -0
- package/packages/agent-hooks/src/deploy/legacy-lock.ts +213 -0
- package/packages/agent-hooks/src/deploy/list.ts +117 -0
- package/packages/agent-hooks/src/deploy/lock.ts +65 -0
- package/packages/agent-hooks/src/deploy/opencode-template.ts +74 -0
- package/packages/agent-hooks/src/deploy/profile.ts +117 -0
- package/packages/agent-hooks/src/deploy/render.ts +162 -0
- package/packages/agent-hooks/src/deploy/source.ts +84 -0
- package/packages/agent-hooks/src/gating/config.ts +514 -0
- package/packages/agent-hooks/src/gating/root.ts +117 -0
- package/packages/agent-hooks/src/hooks/briefing/handler.ts +22 -0
- package/packages/agent-hooks/src/hooks/briefing/index.ts +320 -0
- package/packages/agent-hooks/src/hooks/contract.ts +112 -0
- package/packages/agent-hooks/src/hooks/crg/handler.ts +22 -0
- package/packages/agent-hooks/src/hooks/crg/index.ts +209 -0
- package/packages/agent-hooks/src/hooks/lean-ctx/handler.ts +22 -0
- package/packages/agent-hooks/src/hooks/lean-ctx/index.ts +173 -0
- package/packages/agent-hooks/src/hooks/lean-ctx/mapping.ts +121 -0
- package/packages/agent-hooks/src/hooks/lean-ctx/scope-rewrite.ts +207 -0
- package/packages/agent-hooks/src/hooks/log.ts +233 -0
- package/packages/agent-hooks/src/hooks/user-prompt-submit/config.ts +58 -0
- package/packages/agent-hooks/src/hooks/user-prompt-submit/constants.ts +149 -0
- package/packages/agent-hooks/src/hooks/user-prompt-submit/handler.ts +72 -0
- package/packages/agent-hooks/src/hooks/user-prompt-submit/index.ts +203 -0
- package/packages/agent-hooks/src/hooks/user-prompt-submit/match.ts +212 -0
- package/packages/agent-hooks/src/hooks/user-prompt-submit/skill-roots.ts +73 -0
- package/packages/agent-hooks/src/hooks/user-prompt-submit/skills.ts +98 -0
- package/packages/agent-hooks/src/hooks/user-prompt-submit/tokenizer.ts +115 -0
- package/packages/agent-hooks/src/hooks/user-prompt-submit/vector.ts +174 -0
- package/packages/agent-hooks/src/hosts/impl/claude.ts +47 -0
- package/packages/agent-hooks/src/hosts/impl/codex.ts +47 -0
- package/packages/agent-hooks/src/hosts/impl/cursor.ts +40 -0
- package/packages/agent-hooks/src/hosts/impl/kimi.ts +47 -0
- package/packages/agent-hooks/src/hosts/impl/opencode.ts +54 -0
- package/packages/agent-hooks/src/hosts/registry.ts +29 -0
- package/packages/agent-hooks/src/hosts/spec.ts +113 -0
- package/packages/agent-hooks/src/lean-ctx/env.ts +106 -0
- package/packages/agent-hooks/src/lean-ctx/mcp.ts +140 -0
- package/packages/agent-hooks/src/lib/spawn-with-timeout.ts +120 -0
- package/packages/agent-hooks/src/log/writer.ts +230 -0
- package/packages/agent-hooks/src/main.ts +269 -0
- package/packages/agent-hooks/src/pre-tool-use/handler.ts +549 -0
- package/packages/agent-hooks/src/rules/engine.ts +293 -0
- package/packages/agent-hooks/src/rules/impl/adl-build-run-denied.ts +51 -0
- package/packages/agent-hooks/src/rules/impl/adl-git-credential-bypass.ts +320 -0
- package/packages/agent-hooks/src/rules/impl/adl-git-identity.ts +249 -0
- package/packages/agent-hooks/src/rules/impl/adl-git-push-policy.ts +258 -0
- package/packages/agent-hooks/src/rules/impl/adl-human-azdo-bypass.ts +731 -0
- package/packages/agent-hooks/src/rules/impl/adl-identity.ts +128 -0
- package/packages/agent-hooks/src/rules/impl/adl-mcp-cli.ts +179 -0
- package/packages/agent-hooks/src/rules/impl/adl-pr-complete-pending.ts +65 -0
- package/packages/agent-hooks/src/rules/impl/adl-pr-review-role.ts +156 -0
- package/packages/agent-hooks/src/rules/impl/adl-pr-role.ts +121 -0
- package/packages/agent-hooks/src/rules/impl/adl-session-required.ts +403 -0
- package/packages/agent-hooks/src/rules/impl/adl-token-minting-role.ts +92 -0
- package/packages/agent-hooks/src/rules/impl/adl-workitem-role.ts +74 -0
- package/packages/agent-hooks/src/rules/impl/advisory-coverage.ts +43 -0
- package/packages/agent-hooks/src/rules/impl/advisory-finder.ts +62 -0
- package/packages/agent-hooks/src/rules/impl/agent-secrets-stay-unread.ts +173 -0
- package/packages/agent-hooks/src/rules/impl/agent-tamper-protection.ts +508 -0
- package/packages/agent-hooks/src/rules/impl/fs-canonical-checkout.ts +86 -0
- package/packages/agent-hooks/src/rules/impl/fs-git-internals.ts +75 -0
- package/packages/agent-hooks/src/rules/impl/fs-mv.ts +66 -0
- package/packages/agent-hooks/src/rules/impl/fs-rm.ts +83 -0
- package/packages/agent-hooks/src/rules/impl/fs-trash.ts +140 -0
- package/packages/agent-hooks/src/rules/impl/git-core.ts +101 -0
- package/packages/agent-hooks/src/rules/impl/git-helpers.ts +408 -0
- package/packages/agent-hooks/src/rules/impl/git-history.ts +77 -0
- package/packages/agent-hooks/src/rules/impl/git-paths.ts +139 -0
- package/packages/agent-hooks/src/rules/impl/git-plumbing.ts +167 -0
- package/packages/agent-hooks/src/rules/impl/git-protected-tree.ts +132 -0
- package/packages/agent-hooks/src/rules/impl/git-transitions.ts +292 -0
- package/packages/agent-hooks/src/rules/impl/git-verify.ts +95 -0
- package/packages/agent-hooks/src/rules/impl/git-worktree.ts +265 -0
- package/packages/agent-hooks/src/rules/impl/mcp-tool.ts +76 -0
- package/packages/agent-hooks/src/rules/impl/messages.ts +128 -0
- package/packages/agent-hooks/src/rules/impl/parse-uncertain.ts +143 -0
- package/packages/agent-hooks/src/rules/impl/pr-completion.ts +35 -0
- package/packages/agent-hooks/src/rules/impl/shell-remote-script-exec.ts +63 -0
- package/packages/agent-hooks/src/rules/impl/tool-azure-devops.ts +283 -0
- package/packages/agent-hooks/src/rules/impl/tool-bun-test.ts +81 -0
- package/packages/agent-hooks/src/rules/impl/tool-cargo.ts +66 -0
- package/packages/agent-hooks/src/rules/impl/tool-chmod-hook.ts +42 -0
- package/packages/agent-hooks/src/rules/impl/tool-find.ts +82 -0
- package/packages/agent-hooks/src/rules/impl/tool-frontend.ts +83 -0
- package/packages/agent-hooks/src/rules/impl/tool-grep.ts +93 -0
- package/packages/agent-hooks/src/rules/impl/tool-lean-ctx-global.ts +594 -0
- package/packages/agent-hooks/src/rules/impl/tool-native-search.ts +77 -0
- package/packages/agent-hooks/src/rules/ports.ts +178 -0
- package/packages/agent-hooks/src/rules/registry.ts +233 -0
- package/packages/agent-hooks/src/rules/shell/git-identity.ts +1415 -0
- package/packages/agent-hooks/src/rules/shell/git-internals.ts +186 -0
- package/packages/agent-hooks/src/rules/shell/invocation.ts +1083 -0
- package/packages/agent-hooks/src/rules/shell/piped-script.ts +201 -0
- package/packages/agent-hooks/src/rules/shell/prefixes.ts +214 -0
- package/packages/agent-hooks/src/rules/shell/protected-carrier-writes.ts +108 -0
- package/packages/agent-hooks/src/rules/shell/protected-carriers.ts +149 -0
- package/packages/agent-hooks/src/rules/shell/split.ts +179 -0
- package/packages/agent-hooks/src/rules/shell/substitution.ts +394 -0
- package/packages/agent-hooks/src/rules/shell/token.ts +180 -0
- package/packages/agent-hooks/src/rules/shell/xargs.ts +81 -0
- package/packages/agent-hooks/src/rules/spec.ts +152 -0
- package/packages/agent-hooks/src/surface-policy.ts +37 -0
- package/packages/agent-hooks/tsconfig.json +23 -0
- package/packages/agent-settings/assets/GLOBAL-AGENTS.md +107 -0
- package/packages/agent-settings/assets/agents/architect.toml +30 -0
- package/packages/agent-settings/assets/agents/code-reviewer.toml +27 -0
- package/packages/agent-settings/assets/agents/critic.toml +35 -0
- package/packages/agent-settings/assets/agents/executor.toml +28 -0
- package/packages/agent-settings/assets/agents/explore.toml +25 -0
- package/packages/agent-settings/assets/agents/planner.toml +29 -0
- package/packages/agent-settings/assets/lean-ctx/config.toml +39 -0
- package/packages/agent-settings/assets/lean-ctx/gitignore +6 -0
- package/packages/agent-settings/assets/lean-ctx/layout.toml +5 -0
- package/packages/agent-settings/assets/mcp.json +20 -0
- package/packages/agent-settings/managed/README.md +331 -0
- package/packages/agent-settings/managed/claude-managed-settings.json +150 -0
- package/packages/agent-settings/managed/codex-requirements.toml +105 -0
- package/packages/agent-settings/protected.json +470 -0
- package/packages/agent-settings/src/deploy/agent-render.ts +94 -0
- package/packages/agent-settings/src/deploy/agent-toml.ts +76 -0
- package/packages/agent-settings/src/deploy/agents-deploy.ts +129 -0
- package/packages/agent-settings/src/deploy/doctor.ts +201 -0
- package/packages/agent-settings/src/deploy/index.ts +33 -0
- package/packages/agent-settings/src/deploy/json-pretty.ts +66 -0
- package/packages/agent-settings/src/deploy/lean-ctx-deploy.ts +138 -0
- package/packages/agent-settings/src/deploy/legacy-lock.ts +286 -0
- package/packages/agent-settings/src/deploy/list.ts +135 -0
- package/packages/agent-settings/src/deploy/lock.ts +112 -0
- package/packages/agent-settings/src/deploy/mcp-deploy.ts +175 -0
- package/packages/agent-settings/src/deploy/mcp-inspect.ts +56 -0
- package/packages/agent-settings/src/deploy/mcp-merge.ts +164 -0
- package/packages/agent-settings/src/deploy/mcp-render.ts +80 -0
- package/packages/agent-settings/src/deploy/mcp-source.ts +43 -0
- package/packages/agent-settings/src/deploy/profile.ts +296 -0
- package/packages/agent-settings/src/deploy/settings.ts +65 -0
- package/packages/agent-settings/src/global-agents.ts +230 -0
- package/packages/agent-settings/src/global-surface-sweep.ts +2179 -0
- package/packages/agent-settings/src/kimi-hooks.ts +455 -0
- package/packages/agent-settings/src/opencode-hooks.ts +76 -0
- package/packages/agent-settings/src/surface-policy.ts +441 -0
- package/packages/agent-settings/surface-policy.json +20 -0
- package/packages/agent-skills/assets/code-review/SKILL.md +100 -0
- package/packages/agent-skills/assets/codebase-design/SKILL.md +98 -0
- package/packages/agent-skills/assets/codebase-design/references/DEEPENING.md +37 -0
- package/packages/agent-skills/assets/codebase-design/references/DESIGN-IT-TWICE.md +44 -0
- package/packages/agent-skills/assets/codebase-design/references/TESTABILITY.md +29 -0
- package/packages/agent-skills/assets/debug-issue/SKILL.md +40 -0
- package/packages/agent-skills/assets/diagnosing-bugs/SKILL.md +100 -0
- package/packages/agent-skills/assets/diagnosing-bugs/references/FEEDBACK-LOOP-TACTICS.md +34 -0
- package/packages/agent-skills/assets/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
- package/packages/agent-skills/assets/domain-modeling/SKILL.md +86 -0
- package/packages/agent-skills/assets/domain-modeling/references/ADR-FORMAT.md +47 -0
- package/packages/agent-skills/assets/domain-modeling/references/CONTEXT-FORMAT.md +60 -0
- package/packages/agent-skills/assets/explore-codebase/SKILL.md +41 -0
- package/packages/agent-skills/assets/handoff/SKILL.md +28 -0
- package/packages/agent-skills/assets/implement/SKILL.md +28 -0
- package/packages/agent-skills/assets/refactor-safely/SKILL.md +44 -0
- package/packages/agent-skills/assets/review-changes/SKILL.md +45 -0
- package/packages/agent-skills/assets/tdd/SKILL.md +49 -0
- package/packages/agent-skills/assets/tdd/references/mocking.md +59 -0
- package/packages/agent-skills/assets/tdd/references/tests.md +77 -0
- package/packages/agent-skills/assets/testing/SKILL.md +54 -0
- package/packages/agent-skills/assets/to-feature/SKILL.md +91 -0
- package/packages/agent-skills/assets/to-feature/references/FEATURE-SPEC-TEMPLATE.md +88 -0
- package/packages/agent-skills/assets/to-workitems/SKILL.md +90 -0
- package/packages/agent-skills/assets/to-workitems/references/AZURE-DEVOPS-HIERARCHY.md +118 -0
- package/packages/agent-skills/assets/to-workitems/references/TICKET-TEMPLATES.md +70 -0
- package/packages/agent-skills/assets/wayfinder/SKILL.md +100 -0
- package/packages/agent-skills/assets/wayfinder/references/TEMPLATES.md +35 -0
- package/packages/agent-skills/assets/wayfinder/references/TICKET-TYPES.md +8 -0
- package/packages/agent-skills/deploy-profile.json +9 -0
- package/packages/agent-skills/deploy-profile.schema.json +45 -0
- package/packages/agent-skills/dist/deploy.d.ts +27 -0
- package/packages/agent-skills/dist/deploy.d.ts.map +1 -0
- package/packages/agent-skills/dist/deploy.js +186 -0
- package/packages/agent-skills/dist/deploy.js.map +1 -0
- package/packages/agent-skills/dist/doctor.d.ts +24 -0
- package/packages/agent-skills/dist/doctor.d.ts.map +1 -0
- package/packages/agent-skills/dist/doctor.js +141 -0
- package/packages/agent-skills/dist/doctor.js.map +1 -0
- package/packages/agent-skills/dist/fs-utils.d.ts +8 -0
- package/packages/agent-skills/dist/fs-utils.d.ts.map +1 -0
- package/packages/agent-skills/dist/fs-utils.js +40 -0
- package/packages/agent-skills/dist/fs-utils.js.map +1 -0
- package/packages/agent-skills/dist/index.d.ts +8 -0
- package/packages/agent-skills/dist/index.d.ts.map +1 -0
- package/packages/agent-skills/dist/index.js +8 -0
- package/packages/agent-skills/dist/index.js.map +1 -0
- package/packages/agent-skills/dist/legacy-lock.d.ts +44 -0
- package/packages/agent-skills/dist/legacy-lock.d.ts.map +1 -0
- package/packages/agent-skills/dist/legacy-lock.js +121 -0
- package/packages/agent-skills/dist/legacy-lock.js.map +1 -0
- package/packages/agent-skills/dist/list.d.ts +23 -0
- package/packages/agent-skills/dist/list.d.ts.map +1 -0
- package/packages/agent-skills/dist/list.js +75 -0
- package/packages/agent-skills/dist/list.js.map +1 -0
- package/packages/agent-skills/dist/manifest.d.ts +15 -0
- package/packages/agent-skills/dist/manifest.d.ts.map +1 -0
- package/packages/agent-skills/dist/manifest.js +57 -0
- package/packages/agent-skills/dist/manifest.js.map +1 -0
- package/packages/agent-skills/dist/profile.d.ts +41 -0
- package/packages/agent-skills/dist/profile.d.ts.map +1 -0
- package/packages/agent-skills/dist/profile.js +86 -0
- package/packages/agent-skills/dist/profile.js.map +1 -0
- package/packages/agent-skills/dist/skill-config.d.ts +24 -0
- package/packages/agent-skills/dist/skill-config.d.ts.map +1 -0
- package/packages/agent-skills/dist/skill-config.js +68 -0
- package/packages/agent-skills/dist/skill-config.js.map +1 -0
- package/packages/agent-skills/dist/skill-meta.d.ts +17 -0
- package/packages/agent-skills/dist/skill-meta.d.ts.map +1 -0
- package/packages/agent-skills/dist/skill-meta.js +67 -0
- package/packages/agent-skills/dist/skill-meta.js.map +1 -0
- package/packages/agent-skills/package.json +31 -0
- package/packages/agent-skills/src/deploy.ts +222 -0
- package/packages/agent-skills/src/doctor.ts +178 -0
- package/packages/agent-skills/src/fs-utils.ts +40 -0
- package/packages/agent-skills/src/index.ts +29 -0
- package/packages/agent-skills/src/legacy-lock.ts +152 -0
- package/packages/agent-skills/src/list.ts +94 -0
- package/packages/agent-skills/src/manifest.ts +66 -0
- package/packages/agent-skills/src/profile.ts +128 -0
- package/packages/agent-skills/src/skill-config.ts +75 -0
- package/packages/agent-skills/src/skill-meta.ts +78 -0
- package/packages/agent-skills/tsconfig.build.json +13 -0
- package/packages/agent-skills/tsconfig.json +23 -0
- package/packages/azdo/README.md +111 -0
- package/packages/azdo/package.json +21 -0
- package/packages/azdo/src/azdo-pl.ts +275 -0
- package/packages/azdo/src/azdo-pr-review.ts +160 -0
- package/packages/azdo/src/azdo-pr.ts +289 -0
- package/packages/azdo/src/azdo-repo-doctor.ts +839 -0
- package/packages/azdo/src/azdo-wit.ts +145 -0
- package/packages/azdo/src/cli.ts +251 -0
- package/packages/azdo/src/lib/agent-identity.ts +198 -0
- package/packages/azdo/src/lib/agent-token.ts +167 -0
- package/packages/azdo/src/lib/client.ts +259 -0
- package/packages/azdo/src/lib/graph-identity.ts +153 -0
- package/packages/azdo/src/lib/validate-pr-metadata.ts +57 -0
- package/packages/azdo/src/mcp-server.ts +209 -0
- package/packages/azdo/src/tool-dispatch.ts +204 -0
- package/packages/azdo/tsconfig.json +13 -0
- package/packages/fleet/jobs/git-maintain/src/main.ts +588 -0
- package/packages/fleet/manifest.json +207 -0
- package/packages/fleet/manifest.schema.json +283 -0
- package/packages/fleet/src/default-agent-file.ts +144 -0
- package/packages/fleet/src/install-adl-package.ts +178 -0
- package/packages/fleet/src/install-embedding-model.ts +412 -0
- package/packages/fleet/src/launch-agents.ts +649 -0
- package/packages/fleet/src/managed-settings.ts +278 -0
- package/packages/fleet/src/scratch-reap.ts +601 -0
- package/packages/fleet/src/vscode-settings.ts +705 -0
- package/packages/fleet/systemd/adl-azure-agent-update.service +13 -0
- package/packages/fleet/systemd/adl-azure-agent-update.timer +10 -0
- package/packages/repo-controls/AGENTS.md +96 -0
- package/packages/repo-controls/CLAUDE.md +1 -0
- package/packages/repo-controls/LICENSE +20 -0
- package/packages/repo-controls/README.md +493 -0
- package/packages/repo-controls/assets/enable-integration-auto-complete.mjs +79 -0
- package/packages/repo-controls/assets/promote.ts +371 -0
- package/packages/repo-controls/assets/version-bump.sh +189 -0
- package/packages/repo-controls/azure-pipelines.yml +274 -0
- package/packages/repo-controls/bin/adl-repo-controls.ts +10 -0
- package/packages/repo-controls/bunfig.toml +58 -0
- package/packages/repo-controls/package/adl-compliance/AGENTS.md +163 -0
- package/packages/repo-controls/package/adl-compliance/CLAUDE.md +1 -0
- package/packages/repo-controls/package/adl-compliance/conftest.py +78 -0
- package/packages/repo-controls/package/adl-compliance/pyproject.toml +31 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/__init__.py +50 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/__init__.py +98 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/__init__.py +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/check.py +210 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/fixtures/adr-lifecycle-bad-status/docs/architecture/overview.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/fixtures/adr-lifecycle-bad-status/docs/decisions/adr-901-proposed.md +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/fixtures/adr-lifecycle-broken-backlink/docs/decisions/adr-902-dangling.md +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/fixtures/adr-lifecycle-clean/docs/architecture/overview.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/fixtures/adr-lifecycle-clean/docs/decisions/adr-900-example.md +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/fixtures/adr-lifecycle-frontmatter-mismatch/.plans/b_committed/26-08-08-lifecycle-fixture.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/fixtures/adr-lifecycle-frontmatter-mismatch/.specs/demo/lifecycle.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/fixtures/adr-lifecycle-frontmatter-mismatch/docs/decisions/adr-903-frontmatter-mismatch.md +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/fixtures/adr-lifecycle-inactive-plan/.plans/c_done/26-08-08-completed-fixture.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/fixtures/adr-lifecycle-inactive-plan/.specs/demo/lifecycle.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/fixtures/adr-lifecycle-inactive-plan/docs/decisions/adr-904-completed-plan.md +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/test_check.py +127 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/__init__.py +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/check.py +91 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/AGENTS.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/CLAUDE.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/architecture/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/compliance/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/decisions/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/index.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/operations/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/research/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/stray-root-file.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/totally-made-up/nonsense.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/test_check.py +106 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/__init__.py +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/check.py +291 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/fixtures/clean/backend/clean.rs +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/fixtures/excluded/frontend/mobile/src/i18n/locales/zh-CN/strings.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/fixtures/violation/backend/escaped.rs +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/fixtures/violation/backend/raw.rs +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/fixtures/violation/backend//346/226/207/344/273/266.rs +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/test_check.py +193 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/index_updated/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/index_updated/check.py +140 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/index_updated/fixtures/index-updated-clean/docs/architecture/foo.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/index_updated/fixtures/index-updated-clean/docs/architecture/index.md +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/index_updated/fixtures/index-updated-violation/docs/architecture/foo.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/index_updated/fixtures/index-updated-violation/docs/architecture/index.md +9 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/index_updated/test_check.py +98 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/check.py +378 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/docs-knowledge-indexes.yaml +192 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-clean/docs/index.md +14 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-clean/docs/one.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-clean/docs/two.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-clean/docs-knowledge-indexes.yaml +20 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-duplicate/docs/index.md +15 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-duplicate/docs/one.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-duplicate/docs/two.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-duplicate/docs-knowledge-indexes.yaml +16 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-missing-entry/docs/index.md +13 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-missing-entry/docs/one.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-missing-entry/docs/two.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-missing-entry/docs-knowledge-indexes.yaml +16 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/test_check.py +102 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/ledger/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/ledger/check.py +387 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/ledger/fixtures/ledger-bad-date/plans/LEDGER.md +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/ledger/fixtures/ledger-clean/plans/LEDGER.md +6 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/ledger/fixtures/ledger-empty-table/plans/LEDGER.md +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/ledger/fixtures/ledger-long-event/plans/LEDGER.md +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/ledger/fixtures/ledger-violation/plans/LEDGER.md +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/ledger/test_check.py +427 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/markdown_ast/__init__.py +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/markdown_ast/check.py +84 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/markdown_ast/fixtures/markdown-structure-bad-fence/docs/bad-fence.md +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/markdown_ast/fixtures/markdown-structure-bad-fence/docs/valid.md +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/markdown_ast/fixtures/markdown-structure-bad-frontmatter/docs/bad-front-matter.md +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/markdown_ast/fixtures/markdown-structure-bad-frontmatter/docs/valid.md +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/markdown_ast/fixtures/markdown-structure-clean/docs/valid.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/markdown_ast/test_check.py +126 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/check.py +210 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/docs-okf-profiles.yaml +119 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-clean/docs/architecture/demo.md +17 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-clean/docs-okf-profiles.yaml +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-violation/docs/architecture/bad-status.md +17 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-violation/docs-okf-profiles.yaml +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/test_check.py +49 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/register.py +159 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/check.py +578 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-clean/docs/architecture/backend/crate-overview.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-clean/docs/architecture/team/team-overview.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-clean/docs/compliance/controls/control-matrix.md +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-clean/docs/compliance/controls/control-matrix.yaml +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-clean/docs/research/benchmarks/note.md +24 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-violations/docs/architecture/backend/crate-overview.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-violations/docs/architecture/product/stable-delivery.md +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-violations/docs/architecture/product/stable-recommendation.md +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-violations/docs/architecture/product/target-narration.md +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-violations/docs/architecture/team/team-overview.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-violations/docs/compliance/controls/control-matrix.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-violations/docs/compliance/controls/control-matrix.yaml +17 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-violations/docs/research/benchmarks/bad-research.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/test_check.py +461 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/__init__.py +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/check.py +124 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/fixtures/.workflows/AGENTS.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/fixtures/.workflows/CLAUDE.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/fixtures/AGENTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/fixtures/CLAUDE.md +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/fixtures/INVARIANTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/fixtures/bad-pointer/AGENTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/fixtures/bad-pointer/CLAUDE.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/fixtures/docs/AGENTS.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/fixtures/docs/CLAUDE.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/fixtures/missing-pair/AGENTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/fixtures/owned/AGENTS.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/fixtures/owned/CLAUDE.md +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/agents_layout/test_check.py +116 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/ci_paths/__init__.py +13 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/ci_paths/check.py +380 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/ci_paths/fixtures/redeclared-workflows-tree/automation/pipelines/pr-validation.yaml +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/ci_paths/test_check.py +274 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/check.py +227 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-clean/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-clean/grants.yaml +6 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/fresh/fresh.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub1/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub10/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub11/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub2/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub3/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub4/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub5/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub6/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub7/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub8/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub9/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/services/i18n/locales/de/common.json +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/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-excluded/frontend/packages/desktop/src/vendored-crate/Cargo.toml +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/grants.yaml +6 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/fresh/fresh.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub1/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub10/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub11/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub2/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub3/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub4/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub5/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub6/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub7/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub8/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub9/only.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/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-unbaselined/grants.yaml +6 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/test_check.py +138 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/check.py +240 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/fixtures/markdown-trees-clean/.plans/a_new/plan.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/fixtures/markdown-trees-clean/backend/AGENTS.md +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/fixtures/markdown-trees-clean/docs/page.md +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/fixtures/markdown-trees-stray/backend/notes.md +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/fixtures/markdown-trees-stray/docs/page.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/test_check.py +220 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/__init__.py +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/check.py +225 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/fixtures/open-work-cap-clean/plans/GAPS-AND-FINDINGS.md +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/fixtures/open-work-cap-clean/plans/features/az601-clean/spec.md +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/test_check.py +330 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/check.py +240 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/agent/crates/enact-providers/src/snapshots/README.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/backend/crates/enact-app/assets/builtin-assistants/avatars/assistant.jpg +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/backend/crates/enact-assets/assets/logos/tools/coding/tool.png +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/backend/crates/enact-session/src/backend/codex_init_prompt.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/frontend/mobile/assets/images/icon.png +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/frontend/packages/desktop/src/renderer/assets/logos/brand/app.png +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/frontend/packages/desktop/src/renderer/assets/themes/default-theme.png +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/frontend/public/pwa/icon-192.png +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/frontend/resources/product.png +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-stray/apps/legacy/file.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-stray/backend/crates/enact-session/src/backend/README.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-stray/frontend/unapproved/screenshot.png +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/test_check.py +230 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plan_metadata.py +53 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/__init__.py +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/check.py +438 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-clean/plans/AGENTS.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-clean/plans/features/az347-test-coverage/items/az351-restore-entrypoint.md +9 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-clean/plans/features/az347-test-coverage/spec.md +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-clean/plans/templates/feature.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-violation/plans/features/az347-test-coverage/items/az351-restore-entrypoint.md +9 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-violation/plans/features/az347-test-coverage/spec.md +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/test_check.py +461 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/__init__.py +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/check.py +62 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/NotAMigration.sql +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/0001_long_prefix.sql +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/001_init.sql +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/002_add_index.sql +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/003-dashed-slug.sql +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/004_MixedCase.sql +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/005_trailing space.sql +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/01_short_prefix.sql +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/not-a-migration.sql +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/test_check.py +116 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/__init__.py +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/check.py +188 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/fixtures/link-targets-broken/.plans/c_done/26-07-27-history.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/fixtures/link-targets-broken/docs/README.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/fixtures/link-targets-broken/docs/architecture/product/links.md +20 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/fixtures/link-targets-broken/docs/architecture/product/route-target.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/fixtures/link-targets-clean/.plans/c_done/26-07-27-history.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/fixtures/link-targets-clean/docs/README.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/fixtures/link-targets-clean/docs/architecture/product/links.md +20 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/fixtures/link-targets-clean/docs/architecture/product/route-target.md +8 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/test_check.py +166 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/__init__.py +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/check.py +135 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.agents/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.changeset/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.claude/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.code-review-graph/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.code-review-graph_old/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.codex/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.cursor/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.cursorrules +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.dockerignore +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.docs/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.donors/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.gitattributes +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.kimi-code/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.lfsconfig +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.mcp.json +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.opencode/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.workflows/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/AGENTS.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/CHANGELOG.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/CLAUDE-INVARIANTS.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/CLAUDE.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/INDEPENDENT-VERIFICATION.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/INVARIANTS.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/LICENSE +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/NOTICE +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/README.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/RELEASE.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/VERSION +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/backend/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/compliance/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/dev/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/docker/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/docs/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/frontend/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/infra/declared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/justfile +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/opencode.jsonc +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/rule-tests/undeclared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/rules/undeclared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/unapproved-root/undeclared.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/undeclared-root-file.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/test_check.py +122 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/check.py +290 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/.changeset/some-change.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/.plans/AGENTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/.specs/AGENTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/.workflows/AGENTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/AGENTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/CHANGELOG.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/CLAUDE.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/INDEPENDENT-VERIFICATION.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/INVARIANTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/README.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/RELEASE.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/STRAY.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/docs/AGENTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/docs/architecture/note.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/frontend/README.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-missing-guide/.workflows/AGENTS.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-missing-guide/AGENTS.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-missing-guide/README.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-missing-guide/docs/overview.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-missing-guide/plans/AGENTS.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/test_check.py +329 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/check.py +127 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/a/b/c/d/at-limit.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/a/b/c/d/e/too-deep.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-01.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-02.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-03.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-04.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-05.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-06.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-07.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-08.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-09.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-10.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-11.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-12.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-13.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-14.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-15.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/fixtures/scripts-layout/.workflows/scripts/direct-16.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/test_check.py +163 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/__init__.py +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/__init__.py +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/check.py +169 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/attribute-without-conversion/.gitattributes +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/attribute-without-conversion/large file.bin +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/clean/.gitattributes +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/clean/large file.bin +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/clean/small.txt +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/missing-filter/large file.bin +0 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/unmatched-extension/.gitattributes +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/unmatched-extension/payload.dat +0 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/test_check.py +133 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/__init__.py +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/phase_disjoint/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/phase_disjoint/check.py +129 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/phase_disjoint/fixtures/disjoint/gate-registry.yaml +13 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/phase_disjoint/fixtures/empty/gate-registry.yaml +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/phase_disjoint/fixtures/overlapping/gate-registry.yaml +13 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/phase_disjoint/test_check.py +109 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/__init__.py +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/changeset_plan/__init__.py +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/changeset_plan/check.py +149 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/changeset_plan/fixtures/clean/docs/readme.md +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/changeset_plan/fixtures/relevant/VERSION +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/changeset_plan/test_check.py +151 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/__init__.py +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/check.py +202 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/aligned/.workflows/changesets/package.json +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/aligned/.workflows/package.json +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/aligned/CHANGELOG.md +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/aligned/VERSION +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/mismatched/.workflows/changesets/package.json +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/mismatched/.workflows/package.json +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/mismatched/CHANGELOG.md +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/mismatched/VERSION +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/test_check.py +162 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/__init__.py +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/check.py +103 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/fixtures/no-banned-commands/compliance_py/checks/git-bad.sh +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/fixtures/no-banned-commands/compliance_py/checks/git-note.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/fixtures/no-banned-commands/compliance_py/checks/good.sh +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/fixtures/no-banned-commands/compliance_py/checks/grep-bad.sh +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/fixtures/no-banned-commands/compliance_py/checks/grep-note.sh +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/fixtures/no-banned-commands/compliance_py/checks/grep-trailing.sh +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/fixtures/no-banned-commands/compliance_py/checks/notes.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/fixtures/no-banned-commands/elsewhere/loose-git.sh +6 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/fixtures/no-banned-commands/elsewhere/loose-grep.sh +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/test_check.py +117 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/ignored_paths/__init__.py +13 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/ignored_paths/check.py +265 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/ignored_paths/fixtures/ignored-paths/keep.log +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/ignored_paths/fixtures/ignored-paths/src/main.rs +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/ignored_paths/test_check.py +180 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/license_declared/__init__.py +12 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/license_declared/check.py +84 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/license_declared/fixtures/license-declared-clean/LICENSE +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/license_declared/fixtures/license-declared-mismatch/LICENSE +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/license_declared/fixtures/license-declared-missing/README.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/license_declared/test_check.py +66 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/__init__.py +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/check.py +167 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/clean/backend/Cargo.lock +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/clean/backend/Cargo.toml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/clean/backend/rust-toolchain.toml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/clean/backend/src/main.rs +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/clean/frontend/bun.lock +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/empty-bun-lock/backend/Cargo.lock +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/empty-bun-lock/backend/Cargo.toml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/empty-bun-lock/backend/rust-toolchain.toml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/empty-bun-lock/backend/src/main.rs +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/empty-bun-lock/frontend/bun.lock +0 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/test_check.py +109 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/cli.py +483 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/__init__.py +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/ast_grep.py +199 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/batch.py +52 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/check.py +303 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/constants.py +106 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/context.py +99 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/errors.py +32 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/finding.py +65 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/models.py +40 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/receipt.py +63 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/scope.py +82 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/verdict.py +161 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/__init__.py +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/config.py +131 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/config.toml +30 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/docs_shape.py +65 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/gate-registry.alt.yaml +791 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/gate-registry.schema.yaml +176 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/gate-registry.yaml +791 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/grants-registry.yaml +112 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/grants.py +129 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/registry.py +281 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/root_shape.py +250 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/severity-policy.yaml +114 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/providers/__init__.py +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/runner.py +371 -0
- package/packages/repo-controls/package/adl-compliance/uv.lock +199 -0
- package/packages/repo-controls/package.json +33 -0
- package/packages/repo-controls/scripts/hooks/commit-msg +63 -0
- package/packages/repo-controls/scripts/hooks/lib/hook-log.sh +62 -0
- package/packages/repo-controls/scripts/hooks/post-checkout +15 -0
- package/packages/repo-controls/scripts/hooks/post-commit +18 -0
- package/packages/repo-controls/scripts/hooks/pre-commit +82 -0
- package/packages/repo-controls/scripts/hooks/pre-push +144 -0
- package/packages/repo-controls/src/azdo-push.ts +463 -0
- package/packages/repo-controls/src/azure-devops-governance.ts +248 -0
- package/packages/repo-controls/src/azure-devops-remote.ts +61 -0
- package/packages/repo-controls/src/cli.ts +188 -0
- package/packages/repo-controls/src/compliance-config.ts +200 -0
- package/packages/repo-controls/src/config.ts +690 -0
- package/packages/repo-controls/src/constants.ts +97 -0
- package/packages/repo-controls/src/coverage-ratchet.ts +153 -0
- package/packages/repo-controls/src/doc-freshness.ts +172 -0
- package/packages/repo-controls/src/doctor.ts +304 -0
- package/packages/repo-controls/src/findings-ratchet.ts +163 -0
- package/packages/repo-controls/src/gitignore-block.ts +253 -0
- package/packages/repo-controls/src/hook-log.ts +72 -0
- package/packages/repo-controls/src/hook.ts +694 -0
- package/packages/repo-controls/src/install.ts +506 -0
- package/packages/repo-controls/src/integrity.ts +104 -0
- package/packages/repo-controls/src/promote.ts +25 -0
- package/packages/repo-controls/src/runtime.ts +110 -0
- package/packages/repo-controls/src/workflows-drift.ts +106 -0
- package/packages/repo-controls/src/worktree-guard.ts +272 -0
- package/packages/repo-controls/src/worktree-limit.ts +11 -0
- package/packages/repo-controls/tsconfig.json +14 -0
- package/packages/repo-controls/workflows/scripts/release/verify-npm-artifact.ts +119 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"""LAY-004 — ported from `compliance_new/checks/layout/directory-ratchet/test.sh`.
|
|
2
|
+
|
|
3
|
+
Three committed corpora, same names and shapes as the shell fixtures:
|
|
4
|
+
`directory-ratchet-clean` (one baselined single-file directory, nothing else),
|
|
5
|
+
`directory-ratchet-unbaselined` (an unbaselined single-file directory, plus a
|
|
6
|
+
control: eleven single-file subdirectories of a parent that itself holds zero
|
|
7
|
+
direct files), and `directory-ratchet-excluded` (the row's own `!` exclusions
|
|
8
|
+
under test, run twice against the same files through two Row variants that
|
|
9
|
+
differ by exactly those two patterns).
|
|
10
|
+
|
|
11
|
+
Each fixture carries its own `grants.yaml` at its own root, passed as the
|
|
12
|
+
`register` input override — the same mechanism `DOC-006`'s test uses for its
|
|
13
|
+
packaged profile register, not a path nested to match `policy/config.toml`'s
|
|
14
|
+
tree mapping, which is exactly the coupling that broke this port once already
|
|
15
|
+
(P-14).
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import pathlib
|
|
21
|
+
|
|
22
|
+
from adl_compliance import runner
|
|
23
|
+
from adl_compliance.core.verdict import Outcome
|
|
24
|
+
from adl_compliance.checks.layout.directory_ratchet.check import DirectoryRatchet
|
|
25
|
+
from adl_compliance.policy.registry import load
|
|
26
|
+
|
|
27
|
+
FIXTURES = pathlib.Path(__file__).parent / "fixtures"
|
|
28
|
+
ROW = load().by_id("LAY-004")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def corpus_files(root: pathlib.Path) -> tuple[str, ...]:
|
|
32
|
+
return tuple(
|
|
33
|
+
sorted(
|
|
34
|
+
str(path.relative_to(root))
|
|
35
|
+
for path in root.rglob("*")
|
|
36
|
+
if path.is_file() and path.name != "grants.yaml"
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def run(case: str, *, scope: tuple[str, ...] | None = None) -> object:
|
|
42
|
+
directory = FIXTURES / case
|
|
43
|
+
row = ROW
|
|
44
|
+
if scope is not None:
|
|
45
|
+
row = row.model_copy(update={"engine": row.engine.model_copy(update={"scope": scope})})
|
|
46
|
+
return runner.run(
|
|
47
|
+
row, directory, corpus_files(directory),
|
|
48
|
+
inputs={row.id: {"register": directory / "grants.yaml"}},
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def test_a_fully_baselined_tree_passes() -> None:
|
|
53
|
+
verdict = run("directory-ratchet-clean")
|
|
54
|
+
assert verdict.outcome is Outcome.CLEAN, verdict.render()
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def test_an_unbaselined_single_file_directory_is_reported() -> None:
|
|
58
|
+
verdict = run("directory-ratchet-unbaselined")
|
|
59
|
+
assert verdict.outcome is Outcome.FINDINGS
|
|
60
|
+
paths = {f.path for f in verdict.findings if f.rule == "DIR-001"}
|
|
61
|
+
assert "frontend/packages/desktop/src/renderer/fresh" in paths
|
|
62
|
+
assert "frontend/packages/desktop/src/renderer/solo" not in paths
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def test_a_subdirectory_alone_never_trips_the_rule() -> None:
|
|
66
|
+
"""`many` holds eleven subdirectories and zero direct files of its own, so it
|
|
67
|
+
needs no baseline entry; each subdirectory holds exactly one file and IS
|
|
68
|
+
reported. Both halves matter, or this corpus is silent by accident."""
|
|
69
|
+
verdict = run("directory-ratchet-unbaselined")
|
|
70
|
+
paths = {f.path for f in verdict.findings if f.rule == "DIR-001"}
|
|
71
|
+
assert "frontend/packages/desktop/src/renderer/many" not in paths
|
|
72
|
+
assert "frontend/packages/desktop/src/renderer/many/sub1" in paths
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def test_the_row_exclusions_silence_locales_and_vendored_cargo() -> None:
|
|
76
|
+
verdict = run("directory-ratchet-excluded")
|
|
77
|
+
assert verdict.outcome is Outcome.FINDINGS
|
|
78
|
+
paths = {f.path for f in verdict.findings}
|
|
79
|
+
assert not any("locales" in p for p in paths)
|
|
80
|
+
assert not any("vendored-crate" in p for p in paths)
|
|
81
|
+
assert "frontend/packages/desktop/src/renderer/fresh" in {
|
|
82
|
+
f.path for f in verdict.findings if f.rule == "DIR-001"
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def test_falsifiability_without_the_row_exclusions() -> None:
|
|
87
|
+
"""The same corpus, read through a Row differing by exactly the two `!`
|
|
88
|
+
patterns. Without this, the rejections above would pass just as well
|
|
89
|
+
against a row whose exclusions never matched anything."""
|
|
90
|
+
unscoped = tuple(
|
|
91
|
+
pattern for pattern in ROW.engine.scope
|
|
92
|
+
if not (pattern.startswith("!") and ("locales" in pattern or "Cargo.toml" in pattern))
|
|
93
|
+
)
|
|
94
|
+
assert len(unscoped) == len(ROW.engine.scope) - 2
|
|
95
|
+
|
|
96
|
+
verdict = run("directory-ratchet-excluded", scope=unscoped)
|
|
97
|
+
assert verdict.outcome is Outcome.FINDINGS
|
|
98
|
+
paths = {f.path for f in verdict.findings if f.rule == "DIR-001"}
|
|
99
|
+
assert any("locales" in p for p in paths)
|
|
100
|
+
assert any("vendored-crate" in p for p in paths)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def test_the_ratchet_register_is_not_a_grant_catalogue() -> None:
|
|
104
|
+
"""`structural_grant = True` forces the allowance to 0 regardless of the
|
|
105
|
+
row's own `grants:` field. Passing the register's size as the allowance is
|
|
106
|
+
the trap: a failing gate would report green."""
|
|
107
|
+
verdict = run("directory-ratchet-unbaselined")
|
|
108
|
+
assert verdict.granted == 0
|
|
109
|
+
assert verdict.outcome is Outcome.FINDINGS
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def test_an_absent_register_is_could_not_run_not_a_clean_pass() -> None:
|
|
113
|
+
"""The baseline is the REPOSITORY's, so a repository without one has nothing
|
|
114
|
+
graded — and nothing graded is could-not-run.
|
|
115
|
+
|
|
116
|
+
This gate shipped its register as package data: one donor repository's whole
|
|
117
|
+
directory shape, 88 of 104 lines naming `backend/crates/enact-*`,
|
|
118
|
+
`frontend/packages/desktop/*` and `infra/stacks/*`. No repository in this
|
|
119
|
+
estate has any of those trees, so every one of them hit
|
|
120
|
+
`registered tree directory is missing: backend/crates` on the first entry —
|
|
121
|
+
a gate reporting another repo's layout as this repo's defect.
|
|
122
|
+
"""
|
|
123
|
+
directory = FIXTURES / "directory-ratchet-clean"
|
|
124
|
+
verdict = runner.run(
|
|
125
|
+
ROW, directory, corpus_files(directory),
|
|
126
|
+
inputs={ROW.id: {"register": directory / "does-not-exist.yaml"}},
|
|
127
|
+
)
|
|
128
|
+
assert verdict.outcome is Outcome.COULD_NOT_RUN, verdict.render()
|
|
129
|
+
assert "no directory-ratchet register" in verdict.message
|
|
130
|
+
assert "never a clean pass" in verdict.message
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def test_the_register_is_not_packaged_data() -> None:
|
|
134
|
+
"""The regression guard. Re-adding a `resources` entry here would ship one
|
|
135
|
+
repository's baseline to every other repository again."""
|
|
136
|
+
assert "register" in DirectoryRatchet.inputs
|
|
137
|
+
assert "register" not in DirectoryRatchet.resources
|
|
138
|
+
assert DirectoryRatchet.inputs["register"].startswith("<")
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""The `layout.markdown-trees` gate.
|
|
2
|
+
|
|
3
|
+
A folder even though this gate grades no document of its own: uniform depth
|
|
4
|
+
means every `check.py` sits at exactly `checks/*/*/check.py`, so a relative
|
|
5
|
+
import out of a check is right for all of them or wrong for all of them.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from .check import MarkdownTrees
|
|
11
|
+
|
|
12
|
+
__all__ = ["MarkdownTrees"]
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
"""LAY-006 — Markdown documentation must live under a tree the repository declares.
|
|
2
|
+
|
|
3
|
+
LAY-006 a Markdown file outside the declared docs trees and not on the
|
|
4
|
+
exclusion list.
|
|
5
|
+
|
|
6
|
+
The allowed roots are RESOLVED, not listed: `<docs>`, `<plans>`, `<compliance>`,
|
|
7
|
+
`<rust>`, `<frontend>` and `<workflows>` come from
|
|
8
|
+
`[controls.compliance.trees]`, so a repository that spells a tree differently is
|
|
9
|
+
graded against its own spelling. The only literals left are `*/LEDGER.md` (a
|
|
10
|
+
register beside the tree it records) and the exclusion list below.
|
|
11
|
+
|
|
12
|
+
This docstring used to read "docs/, .plans/, .specs/, or .changeset/" and three
|
|
13
|
+
of those four were wrong. `.specs` was deleted 2026-09-16 as a path that matched
|
|
14
|
+
nothing in this estate and never could; `.plans` became the resolvable `<plans>`
|
|
15
|
+
when 7b8c057 renamed the tree; `.changeset/*.md` went the same way as `.specs`,
|
|
16
|
+
for the same reason -- zero files across all four repositories. A rule's own
|
|
17
|
+
description is the first thing anyone reads, and this one described the
|
|
18
|
+
pre-migration world.
|
|
19
|
+
|
|
20
|
+
LAY-006 a Markdown file outside the allowed docs trees and not on the
|
|
21
|
+
exclusion list.
|
|
22
|
+
|
|
23
|
+
Ported from `compliance_new/checks/layout/markdown-trees/check.sh`, which was
|
|
24
|
+
two ` ls-files --cached --others` passes `comm`-ed against each other; the
|
|
25
|
+
pathspecs are now `case` patterns over the given set. The translation is exact
|
|
26
|
+
in one respect worth restating here: bash's `*` in a `case` pattern crosses
|
|
27
|
+
`/` (it is a string match, not filesystem globbing), so a pathspec such as
|
|
28
|
+
`**/x/**` becomes ONE pattern, `*/x/*` — `x/...` at the root is already reached
|
|
29
|
+
by `x/*` on its own line, exactly as the shell version's comment records.
|
|
30
|
+
Python's `fnmatch` translates `*` to `.*` the same way, so it is the faithful
|
|
31
|
+
port rather than `PurePath.match`, `pathlib`'s globbing, or the row's own
|
|
32
|
+
`**`-aware `core.scope` matcher — none of which cross `/` on a single `*`.
|
|
33
|
+
|
|
34
|
+
Vendor / build output / local-only working state is excluded first, then code
|
|
35
|
+
assets and control artifacts (AGENTS.md, CLAUDE.md, and their siblings), then a
|
|
36
|
+
handful of named one-off paths. What remains is graded against the allowed
|
|
37
|
+
trees; anything in neither list is reported.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
from __future__ import annotations
|
|
41
|
+
|
|
42
|
+
import fnmatch
|
|
43
|
+
from collections.abc import Iterable
|
|
44
|
+
from typing import ClassVar
|
|
45
|
+
|
|
46
|
+
from ....policy.root_shape import GOVERNANCE, GUIDES, REGISTERS
|
|
47
|
+
from ....core.check import Check
|
|
48
|
+
from ....core.context import Context, FileSet
|
|
49
|
+
from ....core.finding import Report
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class MarkdownTrees(Check):
|
|
53
|
+
id: ClassVar[str] = "LAY-006"
|
|
54
|
+
rule: ClassVar[str] = "LAY-006"
|
|
55
|
+
|
|
56
|
+
MARKDOWN_SUFFIXES: ClassVar[tuple[str, ...]] = (".md", ".mdx")
|
|
57
|
+
|
|
58
|
+
# Vendor / build output / local-only working state — never documentation.
|
|
59
|
+
# Code assets (assistant rules, skill definitions) are runtime content, not
|
|
60
|
+
# documentation; they live wherever the runtime loads them from. Control
|
|
61
|
+
# artifacts (per AGENTS.md) are part of the repo control surface, and this
|
|
62
|
+
# gate never requires them to sit in a doc tree.
|
|
63
|
+
EXCLUDED: ClassVar[tuple[str, ...]] = (
|
|
64
|
+
"node_modules/*", "*/node_modules/*",
|
|
65
|
+
"target/*", "*/target/*",
|
|
66
|
+
".cache/*", "./*", ".donors/*", ".venv/*", ".docs/*",
|
|
67
|
+
"assets/*", "*/assets/*",
|
|
68
|
+
"skills/*", "*/skills/*",
|
|
69
|
+
# Agent DEFINITIONS, same reasoning and same shape as the skill
|
|
70
|
+
# definitions two lines up: `name`/`description`/`model`/`tools`
|
|
71
|
+
# frontmatter, loaded by the runtime, not read as prose. Caught live
|
|
72
|
+
# against enact-extensions: `extensions/plugin-dev/agents/{agent-
|
|
73
|
+
# creator,plugin-validator,skill-reviewer}.md` were reported as
|
|
74
|
+
# documentation outside the allowed docs trees. COVERAGE COST, stated
|
|
75
|
+
# not buried: 5 `agents/*.md` files across the four managed repos stop
|
|
76
|
+
# being graded by this check (enact-extensions 3, enact-m5 2 — the
|
|
77
|
+
# enact-m5 pair, `docs/architecture/agents/{mcp-servers,
|
|
78
|
+
# orchestration}.md`, are prose docs already reachable via `docs/*.md`
|
|
79
|
+
# in ALLOWED below, so this exclusion changes nothing about whether
|
|
80
|
+
# they are reported, only widens what would also excuse them if they
|
|
81
|
+
# ever moved outside `docs/`).
|
|
82
|
+
"agents/*", "*/agents/*",
|
|
83
|
+
# Root governance and guides come from policy/root_shape.py, the single list
|
|
84
|
+
# 63cd856 created when three gates were found carrying three drifting copies
|
|
85
|
+
# of "what may sit at a repository's root". This gate asked the same question
|
|
86
|
+
# and was not brought in, so it flagged CONTRIBUTING.md and MAINTAINERS.md --
|
|
87
|
+
# exactly the files d841de1 ruled belong at the root, where a newcomer looks.
|
|
88
|
+
*sorted(GOVERNANCE | GUIDES | REGISTERS),
|
|
89
|
+
"AGENTS.md", "CLAUDE.md", "CHANGELOG.md", "RELEASE.md",
|
|
90
|
+
"INVARIANTS.md", "README.md", "CLAUDE-INVARIANTS.md",
|
|
91
|
+
"INDEPENDENT-VERIFICATION.md",
|
|
92
|
+
"*/AGENTS.md", "*/CLAUDE.md", "*/SKILLS.md", "*/CHANGELOG.md",
|
|
93
|
+
"*/README.md",
|
|
94
|
+
# A tree's CLAUDE-INVARIANTS.md is the same class of control artifact
|
|
95
|
+
# as its AGENTS.md and CLAUDE.md above; the root one is allowed two
|
|
96
|
+
# patterns up and nowhere else.
|
|
97
|
+
"*/CLAUDE-INVARIANTS.md",
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
# FIXED 2026-09-16 (K-42 sweep, LOUD form, approved): these five patterns
|
|
101
|
+
# were hardcoded `backend/...`/`frontend/...`/`.workflows/...` literals in
|
|
102
|
+
# EXCLUDED, matched with `fnmatch`. A repository whose rust/frontend/
|
|
103
|
+
# workflows root is not the packaged default had a real excluded asset --
|
|
104
|
+
# a test fixture, a code example, a coverage note -- fail the match and
|
|
105
|
+
# get reported "outside the allowed docs trees", a visible, wrong finding
|
|
106
|
+
# about a file this gate was never meant to grade. Every suffix stays
|
|
107
|
+
# literal below its resolved root: named subject matter, not a resolvable
|
|
108
|
+
# path.
|
|
109
|
+
EXCLUDED_TEMPLATES: ClassVar[tuple[tuple[str, str], ...]] = (
|
|
110
|
+
("frontend_root", ".claude/*"),
|
|
111
|
+
("workflows_root", "changesets/*"),
|
|
112
|
+
# Two patterns, not three — see check.sh's comment: the nested form
|
|
113
|
+
# needs its own line because the literal `tests/` anchors it, and
|
|
114
|
+
# `tests/fixture*/*` already covers the zero-directory case.
|
|
115
|
+
("rust_root", "crates/*/tests/fixture*/*"),
|
|
116
|
+
("rust_root", "crates/*/tests/*/fixture*/*"),
|
|
117
|
+
("rust_root", "crates/enact-session/src/backend/codex_init_prompt.md"),
|
|
118
|
+
("frontend_root", "examples/*"),
|
|
119
|
+
("workflows_root", "COVERAGE.md"),
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
# Allowlisted Markdown roots.
|
|
123
|
+
# `plans/`, not `.plans/`: 7b8c057 renamed the tree and `config.toml` now reads
|
|
124
|
+
# `plans = "plans"`. This list did not follow, so every file in the tree the
|
|
125
|
+
# registry points at was reported as being outside it -- 18 findings against
|
|
126
|
+
# enact-m5 alone. The dotted spelling stays alongside it because a repository
|
|
127
|
+
# that has not migrated yet is not thereby wrong.
|
|
128
|
+
# FIXED 2026-09-16 (K-42 sweep, LOUD form, approved): `docs/*.md`/
|
|
129
|
+
# `docs/*.mdx`, `plans/*.md`, and `.specs/*.md` were also hardcoded
|
|
130
|
+
# literals -- the current packaged default for each tree, spelled out
|
|
131
|
+
# directly rather than resolved. `.plans/*.md` (legacy dotted spelling)
|
|
132
|
+
# and bare `specs/*.md` (no documented migration away from `.specs`)
|
|
133
|
+
# stay literal alternate-spelling allowances, exactly as before -- this
|
|
134
|
+
# fix only moves the entry that stood for "the packaged default",
|
|
135
|
+
# leaving the other spelling in each pair untouched.
|
|
136
|
+
ALLOWED: ClassVar[tuple[str, ...]] = (
|
|
137
|
+
# `specs/*.md` deleted 2026-09-16. It was copy-paste from the
|
|
138
|
+
# `plans/`/`.plans/` pair, which stood for a REAL rename. No repository
|
|
139
|
+
# in this estate has `specs/` or `.specs/`, and nothing records an
|
|
140
|
+
# undotted spelling as a rename target -- it matched nothing and never
|
|
141
|
+
# could. The resolvable `<specs>` spelling is handled with the other
|
|
142
|
+
# declared trees above.
|
|
143
|
+
# A LEDGER beside the tree it records. `root_shape.REGISTERS` already
|
|
144
|
+
# permits a register at the repository root "because that is where
|
|
145
|
+
# someone arriving at the repository looks" -- a per-tree ledger is the
|
|
146
|
+
# same object scoped to one tree, and this estate already keeps
|
|
147
|
+
# `plans/LEDGER.yaml` that way.
|
|
148
|
+
#
|
|
149
|
+
# Scope of the exception, stated exactly rather than optimistically:
|
|
150
|
+
# `fnmatch`'s `*` CROSSES `/` (this module's own docstring says so), so
|
|
151
|
+
# this admits a file named exactly `LEDGER.md` at any depth below the
|
|
152
|
+
# root -- not just one directory down. It is still bounded by NAME: a
|
|
153
|
+
# `NOTES.md` or a lowercase `ledger.md` beside it is still reported.
|
|
154
|
+
"*/LEDGER.md",
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
# The compliance tree is the repository's OWN -- it holds the ratchets and
|
|
158
|
+
# registers a gate grades this repo against, and where it sits is the
|
|
159
|
+
# repository's declaration, not this package's choice. A register written in
|
|
160
|
+
# markdown belongs beside the data it registers, so the declared tree is an
|
|
161
|
+
# allowed home for `.md` alongside the fixed list above.
|
|
162
|
+
#
|
|
163
|
+
# Resolved as an INPUT rather than hardcoded, so `compliance = "compliance"`
|
|
164
|
+
# (or any other spelling a repo declares) reaches this check the same way it
|
|
165
|
+
# reaches every other. Hardcoding "compliance/*.md" here would be the
|
|
166
|
+
# eleventh consumer path frozen into the shared package.
|
|
167
|
+
inputs: ClassVar[dict[str, str]] = {
|
|
168
|
+
"registers": "<compliance>",
|
|
169
|
+
"docs_root": "<docs>",
|
|
170
|
+
"plans_root": "<plans>",
|
|
171
|
+
"rust_root": "<rust>",
|
|
172
|
+
"frontend_root": "<frontend>",
|
|
173
|
+
"workflows_root": "<workflows>",
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
# `<specs>` only ever ADDS allowlist entries here. enact-m5 has no specs
|
|
177
|
+
# tree; requiring one would push the owner to declare a directory that does
|
|
178
|
+
# not exist, and a false declaration is undetectable. Absent -> stricter.
|
|
179
|
+
widening_inputs: ClassVar[frozenset[str]] = frozenset({"specs_root"})
|
|
180
|
+
|
|
181
|
+
def _allowed(self, ctx: Context) -> tuple[str, ...]:
|
|
182
|
+
allowed = self.ALLOWED
|
|
183
|
+
# Absent is the fixed list, never a crash. The runner always resolves a
|
|
184
|
+
# declared input, so this only matters to a caller building a Context by
|
|
185
|
+
# hand -- which the tests do, and which is a legitimate way to exercise
|
|
186
|
+
# the fixed list on its own.
|
|
187
|
+
registers = ctx.inputs.get("registers")
|
|
188
|
+
if registers is not None:
|
|
189
|
+
root = ctx.relative(registers)
|
|
190
|
+
allowed = (*allowed, f"{root}/*.md", f"{root}/*.mdx")
|
|
191
|
+
docs_root = ctx.inputs.get("docs_root")
|
|
192
|
+
if docs_root is not None:
|
|
193
|
+
root = ctx.relative(docs_root)
|
|
194
|
+
allowed = (*allowed, f"{root}/*.md", f"{root}/*.mdx")
|
|
195
|
+
plans_root = ctx.inputs.get("plans_root")
|
|
196
|
+
if plans_root is not None:
|
|
197
|
+
allowed = (*allowed, f"{ctx.relative(plans_root)}/*.md")
|
|
198
|
+
specs_root = ctx.inputs.get("specs_root")
|
|
199
|
+
if specs_root is not None:
|
|
200
|
+
allowed = (*allowed, f"{ctx.relative(specs_root)}/*.md")
|
|
201
|
+
return allowed
|
|
202
|
+
|
|
203
|
+
def _excluded(self, ctx: Context) -> tuple[str, ...]:
|
|
204
|
+
excluded = self.EXCLUDED
|
|
205
|
+
for input_name, suffix in self.EXCLUDED_TEMPLATES:
|
|
206
|
+
root = ctx.inputs.get(input_name)
|
|
207
|
+
if root is not None:
|
|
208
|
+
excluded = (*excluded, f"{ctx.relative(root)}/{suffix}")
|
|
209
|
+
return excluded
|
|
210
|
+
|
|
211
|
+
def graded(self, ctx: Context, files: FileSet) -> Iterable[Report]:
|
|
212
|
+
allowed = self._allowed(ctx)
|
|
213
|
+
# The remedy quotes the SAME set the rule graded against, so a reader
|
|
214
|
+
# cannot be sent somewhere the gate does not accept.
|
|
215
|
+
declared = tuple(sorted(allowed))
|
|
216
|
+
excluded = self._excluded(ctx)
|
|
217
|
+
for relative in sorted(files.with_suffix(*self.MARKDOWN_SUFFIXES)):
|
|
218
|
+
if self._matches_any(relative, excluded):
|
|
219
|
+
continue
|
|
220
|
+
if self._matches_any(relative, allowed):
|
|
221
|
+
continue
|
|
222
|
+
yield self.report(
|
|
223
|
+
relative,
|
|
224
|
+
"documentation file outside the allowed docs trees",
|
|
225
|
+
# The remedy names the trees THIS repository declared, resolved
|
|
226
|
+
# the same way the rule was graded. It used to read
|
|
227
|
+
# "docs/, plans/, .specs/, or .changeset/" -- two retired trees
|
|
228
|
+
# and a hardcoded literal -- so a reader following it moved the
|
|
229
|
+
# file somewhere no repository has, and the gate failed again.
|
|
230
|
+
# A fix line that cannot be followed is worse than none: it
|
|
231
|
+
# spends the reader's trust and returns nothing.
|
|
232
|
+
f"move {relative} under one of this repository's declared doc "
|
|
233
|
+
f"trees ({', '.join(declared) if declared else 'none declared'}), "
|
|
234
|
+
"or add it to the exclusion list in this gate if it is a "
|
|
235
|
+
"legitimate non-doc asset",
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
@staticmethod
|
|
239
|
+
def _matches_any(path: str, patterns: tuple[str, ...]) -> bool:
|
|
240
|
+
return any(fnmatch.fnmatchcase(path, pattern) for pattern in patterns)
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"""LAY-006 — ported from `compliance_new/checks/layout/markdown-trees/test.sh`.
|
|
2
|
+
|
|
3
|
+
Two corpora, committed byte-for-byte from the shell tree's fixtures:
|
|
4
|
+
`markdown-trees-stray/` puts one Markdown page outside every allowed tree
|
|
5
|
+
beside one that IS allowed, so the gate must report exactly the first;
|
|
6
|
+
`markdown-trees-clean/` holds four files, each excluded or allowed for a
|
|
7
|
+
DIFFERENT reason — an allowed tree, a second allowed tree, a control artifact
|
|
8
|
+
(`backend/AGENTS.md`), and a crate test fixture — so that a gate reporting
|
|
9
|
+
every `.md` it sees, or one exclusion family rotting silently, would fail it.
|
|
10
|
+
|
|
11
|
+
This check is not yet wired into `checks/__init__.py` (a later step wires this
|
|
12
|
+
port's whole wave into the registry in one shot, to avoid concurrent edits to
|
|
13
|
+
that shared file), so `runner.run` would report "no check implements LAY-006"
|
|
14
|
+
before ever reaching this check's own logic — `lookup()` runs before scope
|
|
15
|
+
narrowing. Every test below therefore calls `MarkdownTrees` directly, the same
|
|
16
|
+
`decide()`-around-`graded()` shape `test_the_whole_set_is_graded_with_no_
|
|
17
|
+
location_filtering` in `repository/banned_commands/test_check.py` already uses
|
|
18
|
+
to bypass row-scope narrowing; nothing here is a new pattern.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
import pathlib
|
|
24
|
+
|
|
25
|
+
from adl_compliance.checks.layout.markdown_trees import MarkdownTrees
|
|
26
|
+
from adl_compliance.core import scope
|
|
27
|
+
from adl_compliance.core.context import Context, FileSet
|
|
28
|
+
from adl_compliance.core.verdict import Outcome, decide
|
|
29
|
+
from adl_compliance.policy.registry import load
|
|
30
|
+
|
|
31
|
+
FIXTURES = pathlib.Path(__file__).parent / "fixtures"
|
|
32
|
+
ROW = load().by_id("LAY-006")
|
|
33
|
+
|
|
34
|
+
STRAY = FIXTURES / "markdown-trees-stray"
|
|
35
|
+
CLEAN = FIXTURES / "markdown-trees-clean"
|
|
36
|
+
|
|
37
|
+
STRAY_FILES = ("backend/notes.md", "docs/page.md")
|
|
38
|
+
CLEAN_FILES = (
|
|
39
|
+
"backend/crates/enact-example/tests/fixtures/sample.md",
|
|
40
|
+
"backend/AGENTS.md",
|
|
41
|
+
"docs/page.md",
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def graded(root: pathlib.Path, given: tuple[str, ...]):
|
|
46
|
+
# Every root below is a RESOLVED INPUT now, not a class constant -- the
|
|
47
|
+
# packaged defaults, which every fixture here already uses.
|
|
48
|
+
ctx = Context(
|
|
49
|
+
root=root, row=ROW,
|
|
50
|
+
inputs={
|
|
51
|
+
"docs_root": root / "docs",
|
|
52
|
+
"plans_root": root / "plans",
|
|
53
|
+
"specs_root": root / ".specs",
|
|
54
|
+
"rust_root": root / "backend",
|
|
55
|
+
"frontend_root": root / "frontend",
|
|
56
|
+
"workflows_root": root / ".workflows",
|
|
57
|
+
},
|
|
58
|
+
)
|
|
59
|
+
findings = tuple(MarkdownTrees().graded(ctx, FileSet(paths=given)))
|
|
60
|
+
return decide(ROW, findings, 0, ())
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# ---------------------------------------------------------------- violation
|
|
64
|
+
def test_a_markdown_page_outside_the_allowed_trees_is_reported() -> None:
|
|
65
|
+
verdict = graded(STRAY, STRAY_FILES)
|
|
66
|
+
assert verdict.outcome is Outcome.FINDINGS
|
|
67
|
+
assert len(verdict.findings) == 1
|
|
68
|
+
finding = verdict.findings[0]
|
|
69
|
+
assert finding.rule == "LAY-006"
|
|
70
|
+
assert finding.path == "backend/notes.md"
|
|
71
|
+
assert finding.message == "documentation file outside the allowed docs trees"
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def test_the_allowed_page_in_the_same_corpus_is_not_reported() -> None:
|
|
75
|
+
"""docs/page.md is in the same corpus and must not also be flagged —
|
|
76
|
+
exactly one finding, matching test.sh's `rg -c '^LAY-006 '` == 1 assertion."""
|
|
77
|
+
verdict = graded(STRAY, STRAY_FILES)
|
|
78
|
+
paths = {f.path for f in verdict.findings}
|
|
79
|
+
assert "docs/page.md" not in paths
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
# -------------------------------------------------------------------- clean
|
|
83
|
+
def test_a_clean_corpus_of_allowed_and_excluded_paths_reports_nothing() -> None:
|
|
84
|
+
verdict = graded(CLEAN, CLEAN_FILES)
|
|
85
|
+
assert verdict.outcome is Outcome.CLEAN
|
|
86
|
+
assert verdict.findings == ()
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def test_each_exclusion_family_is_independently_load_bearing() -> None:
|
|
90
|
+
"""Without this, a corpus of nothing but allowed-tree files also passes
|
|
91
|
+
against a gate that reports every .md it is handed, and either exclusion
|
|
92
|
+
family (control artifact, crate test fixture) could rot unnoticed."""
|
|
93
|
+
assert graded(CLEAN, ("backend/AGENTS.md",)).findings == ()
|
|
94
|
+
assert graded(
|
|
95
|
+
CLEAN, ("backend/crates/enact-example/tests/fixtures/sample.md",)
|
|
96
|
+
).findings == ()
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
# ------------------------------------------- intersection, half one: the set
|
|
100
|
+
def test_the_stray_page_outside_the_given_set_is_not_reported() -> None:
|
|
101
|
+
"""backend/notes.md is still on disk and still stray; it is simply not in
|
|
102
|
+
the set the gate was handed — test.sh's "intersection, half one" case."""
|
|
103
|
+
verdict = graded(STRAY, ("docs/page.md",))
|
|
104
|
+
assert verdict.outcome is Outcome.CLEAN
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# --------------------------------------------------- no set: could not run
|
|
108
|
+
def test_the_rows_scope_selects_nothing_from_an_empty_given_set() -> None:
|
|
109
|
+
"""test.sh's ADL_CHANGED_FILES-unset case turns into could-not-run
|
|
110
|
+
through `runner.run`'s generic empty-and-`exhaustive` guard (core/verdict,
|
|
111
|
+
see AGENTS.md's Applicable scope) — a property of the runner shared by
|
|
112
|
+
every check, not of this one. Verified at the scope layer directly,
|
|
113
|
+
because `runner.run` would hit the not-yet-wired `lookup()` first (see
|
|
114
|
+
module docstring) and never reach that guard."""
|
|
115
|
+
assert scope.intersect(ROW.resolved_scope(), ()) == ()
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
# ---------------------------------------------------------------- non-.md
|
|
119
|
+
def test_a_non_markdown_file_is_never_graded() -> None:
|
|
120
|
+
"""The gate filters to `.md`/`.mdx` before applying either pattern list —
|
|
121
|
+
check.sh's `case "$rel" in *.md | *.mdx) ;; *) continue ;; esac`."""
|
|
122
|
+
assert graded(STRAY, ("backend/notes.txt",)).findings == ()
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
# ------------------------------------------- the declared compliance tree
|
|
126
|
+
def test_a_register_in_the_declared_compliance_tree_is_allowed(tmp_path) -> None:
|
|
127
|
+
"""A markdown register belongs beside the data it registers.
|
|
128
|
+
|
|
129
|
+
`ALLOWED` is a fixed tuple, so before this the only homes for a `.md` file
|
|
130
|
+
were `docs/`, `plans/`, `specs/` and `.changeset/` — and a repository
|
|
131
|
+
declaring `compliance = "compliance"` (the tree holding its own ratchets)
|
|
132
|
+
could not put a register there without tripping this gate. The tree is the
|
|
133
|
+
REPOSITORY's declaration; hardcoding `compliance/*.md` here would have been
|
|
134
|
+
one more consumer path frozen into the shared package.
|
|
135
|
+
"""
|
|
136
|
+
ctx = Context(
|
|
137
|
+
root=tmp_path, row=ROW,
|
|
138
|
+
inputs={"registers": tmp_path / "compliance"},
|
|
139
|
+
)
|
|
140
|
+
findings = tuple(MarkdownTrees().run(ctx, FileSet(paths=("compliance/gaps.md",))))
|
|
141
|
+
assert findings == (), findings
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def test_without_a_declared_tree_the_fixed_list_still_governs(tmp_path) -> None:
|
|
145
|
+
"""The fallback must not quietly permit everything."""
|
|
146
|
+
ctx = Context(root=tmp_path, row=ROW)
|
|
147
|
+
findings = tuple(MarkdownTrees().run(ctx, FileSet(paths=("compliance/gaps.md",))))
|
|
148
|
+
assert len(findings) == 1, findings
|
|
149
|
+
assert "outside the allowed docs trees" in findings[0].message
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def test_a_ledger_beside_the_tree_it_records_is_allowed(tmp_path) -> None:
|
|
153
|
+
"""`live-probes/LEDGER.md` is an append-only record of probe runs, sitting
|
|
154
|
+
beside the probes. Moving it under `docs/` was measured and rejected: it is
|
|
155
|
+
a 59-line table with one heading, and `docs/operations/**` is graded by the
|
|
156
|
+
OKF operations profile (four heading groups, `sources`, `related`), so the
|
|
157
|
+
move traded 1 finding for about 5.
|
|
158
|
+
"""
|
|
159
|
+
ctx = Context(root=tmp_path, row=ROW)
|
|
160
|
+
assert tuple(MarkdownTrees().run(ctx, FileSet(paths=("live-probes/LEDGER.md",)))) == ()
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def test_the_ledger_exception_is_bounded_by_name_not_by_depth(tmp_path) -> None:
|
|
164
|
+
"""It must not become a hole any markdown can walk through.
|
|
165
|
+
|
|
166
|
+
Honest about what it actually does: `fnmatch`'s `*` crosses `/`, so
|
|
167
|
+
`*/LEDGER.md` admits that exact filename at ANY depth, not only one
|
|
168
|
+
directory down. The bound is the NAME, and that is what this pins — a
|
|
169
|
+
neighbouring `NOTES.md`, or a lowercase `ledger.md`, is still reported.
|
|
170
|
+
"""
|
|
171
|
+
ctx = Context(root=tmp_path, row=ROW)
|
|
172
|
+
for stray in ("live-probes/NOTES.md", "live-probes/ledger.md"):
|
|
173
|
+
findings = tuple(MarkdownTrees().run(ctx, FileSet(paths=(stray,))))
|
|
174
|
+
assert len(findings) == 1, (stray, findings)
|
|
175
|
+
|
|
176
|
+
# nested LEDGER.md is permitted, by the same fnmatch semantics
|
|
177
|
+
assert tuple(MarkdownTrees().run(ctx, FileSet(paths=("live-probes/sub/LEDGER.md",)))) == ()
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def test_a_redeclared_estate_still_allows_and_excludes_the_resolved_entries(
|
|
181
|
+
tmp_path,
|
|
182
|
+
) -> None:
|
|
183
|
+
"""The LOUD false-finding this check shipped with.
|
|
184
|
+
|
|
185
|
+
`docs/*.md`/`docs/*.mdx`, `plans/*.md`, `.specs/*.md` in ALLOWED, and the
|
|
186
|
+
`backend/...`/`frontend/...`/`.workflows/...` entries in EXCLUDED, were
|
|
187
|
+
all hardcoded literals. A repository whose corresponding root is not the
|
|
188
|
+
packaged default had a real, legitimately-admitted or -excluded file fail
|
|
189
|
+
every one of those patterns and get reported "outside the allowed docs
|
|
190
|
+
trees" -- a visible, wrong finding.
|
|
191
|
+
|
|
192
|
+
Every resolved root redeclared away from its packaged default, one real
|
|
193
|
+
file exercising each fixed template: wrongly flagged before the fix,
|
|
194
|
+
silent after."""
|
|
195
|
+
given = (
|
|
196
|
+
"documentation/page.md",
|
|
197
|
+
"roadmap/plan.md",
|
|
198
|
+
"specifications/note.md",
|
|
199
|
+
"webapp/.claude/notes.md",
|
|
200
|
+
"automation/changesets/note.md",
|
|
201
|
+
"rustcode/crates/enact-example/tests/fixture-a/sample.md",
|
|
202
|
+
"webapp/examples/demo.md",
|
|
203
|
+
"automation/COVERAGE.md",
|
|
204
|
+
)
|
|
205
|
+
ctx = Context(
|
|
206
|
+
root=tmp_path, row=ROW,
|
|
207
|
+
inputs={
|
|
208
|
+
"docs_root": tmp_path / "documentation",
|
|
209
|
+
"plans_root": tmp_path / "roadmap",
|
|
210
|
+
"specs_root": tmp_path / "specifications",
|
|
211
|
+
"rust_root": tmp_path / "rustcode",
|
|
212
|
+
"frontend_root": tmp_path / "webapp",
|
|
213
|
+
"workflows_root": tmp_path / "automation",
|
|
214
|
+
},
|
|
215
|
+
)
|
|
216
|
+
findings = tuple(MarkdownTrees().graded(ctx, FileSet(paths=given)))
|
|
217
|
+
assert findings == (), (
|
|
218
|
+
f"real files under redeclared roots were wrongly reported outside "
|
|
219
|
+
f"the allowed docs trees: {findings}"
|
|
220
|
+
)
|