@amsterdamdatalabs/adl-agent-control-linux-x64 0.1.12 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/adl +2 -2
- package/bin/git +16 -17
- package/bin/git-ado +25 -24
- package/bin/git-defaults +173 -0
- package/bin/health-check +8 -1
- package/bin/kimi-hooks +1 -1
- package/bin/lib/adl-package.sh +257 -0
- package/bin/lib/fleet-host.sh +8 -5
- package/bin/reconcile +482 -232
- package/bin/reconcile-host +30 -20
- package/bin/setup +20 -17
- package/bin/shell-path-policy +15 -5
- package/bin/sync-and-reconcile +62 -64
- package/bin/validate-manifest +33 -9
- package/package.json +2 -10
- package/packages/agent-hooks/README.md +14 -9
- package/packages/agent-hooks/assets/hooks.json +0 -20
- package/packages/agent-hooks/src/cli/args.ts +1 -1
- package/packages/agent-hooks/src/cli/doctor.ts +6 -58
- package/packages/agent-hooks/src/deploy/deploy.ts +12 -41
- package/packages/agent-hooks/src/deploy/doctor.ts +8 -11
- package/packages/agent-hooks/src/deploy/index.ts +14 -14
- package/packages/agent-hooks/src/deploy/json-merge.ts +7 -8
- package/packages/agent-hooks/src/deploy/legacy-lock.ts +2 -2
- package/packages/agent-hooks/src/deploy/list.ts +1 -1
- package/packages/agent-hooks/src/deploy/lock.ts +31 -12
- package/packages/agent-hooks/src/deploy/profile.ts +3 -4
- package/packages/agent-hooks/src/deploy/source.ts +1 -1
- package/packages/agent-hooks/src/gating/config.ts +12 -24
- package/packages/agent-hooks/src/gating/root.ts +3 -3
- package/packages/agent-hooks/src/hooks/briefing/handler.ts +2 -2
- package/packages/agent-hooks/src/hooks/briefing/index.ts +27 -287
- package/packages/agent-hooks/src/hooks/contract.ts +17 -17
- package/packages/agent-hooks/src/hooks/crg/background.ts +27 -0
- package/packages/agent-hooks/src/hooks/crg/index.ts +7 -6
- package/packages/agent-hooks/src/hooks/log.ts +8 -10
- package/packages/agent-hooks/src/hooks/user-prompt-submit/match.ts +1 -1
- package/packages/agent-hooks/src/hooks/user-prompt-submit/tokenizer.ts +1 -1
- package/packages/agent-hooks/src/hooks/user-prompt-submit/vector.ts +6 -5
- package/packages/agent-hooks/src/hosts/registry.ts +1 -1
- package/packages/agent-hooks/src/log/adl-dir.ts +44 -0
- package/packages/agent-hooks/src/log/writer.ts +16 -2
- package/packages/agent-hooks/src/main.ts +7 -41
- package/packages/agent-hooks/src/pre-tool-use/handler.ts +71 -82
- package/packages/agent-hooks/src/rules/engine.ts +13 -17
- package/packages/agent-hooks/src/rules/impl/adl-build-run-denied.ts +3 -3
- package/packages/agent-hooks/src/rules/impl/adl-git-credential-bypass.ts +12 -14
- package/packages/agent-hooks/src/rules/impl/adl-git-identity.ts +28 -28
- package/packages/agent-hooks/src/rules/impl/adl-git-push-policy.ts +8 -9
- package/packages/agent-hooks/src/rules/impl/adl-human-azdo-bypass.ts +56 -59
- package/packages/agent-hooks/src/rules/impl/adl-identity.ts +16 -23
- package/packages/agent-hooks/src/rules/impl/adl-mcp-cli.ts +19 -16
- package/packages/agent-hooks/src/rules/impl/adl-pr-complete-pending.ts +2 -2
- package/packages/agent-hooks/src/rules/impl/adl-pr-review-role.ts +9 -12
- package/packages/agent-hooks/src/rules/impl/adl-pr-role.ts +5 -7
- package/packages/agent-hooks/src/rules/impl/adl-run-required.ts +411 -0
- package/packages/agent-hooks/src/rules/impl/adl-token-minting-role.ts +4 -5
- package/packages/agent-hooks/src/rules/impl/adl-workitem-role.ts +6 -7
- package/packages/agent-hooks/src/rules/impl/agent-tamper-protection.ts +77 -70
- package/packages/agent-hooks/src/rules/impl/deny-allowlist.ts +131 -0
- package/packages/agent-hooks/src/rules/impl/git-helpers.ts +21 -23
- package/packages/agent-hooks/src/rules/impl/git-worktree.ts +14 -28
- package/packages/agent-hooks/src/rules/impl/mcp-tool.ts +3 -3
- package/packages/agent-hooks/src/rules/impl/messages.ts +1 -1
- package/packages/agent-hooks/src/rules/impl/pr-completion.ts +1 -1
- package/packages/agent-hooks/src/rules/impl/tool-azure-devops.ts +35 -46
- package/packages/agent-hooks/src/rules/impl/tool-find.ts +34 -7
- package/packages/agent-hooks/src/rules/impl/tool-grep.ts +33 -12
- package/packages/agent-hooks/src/rules/impl/tool-native-search.ts +52 -9
- package/packages/agent-hooks/src/rules/ports.ts +5 -7
- package/packages/agent-hooks/src/rules/registry.ts +4 -6
- package/packages/agent-hooks/src/rules/shell/git-identity.ts +86 -101
- package/packages/agent-hooks/src/rules/shell/git-internals.ts +1 -1
- package/packages/agent-hooks/src/rules/shell/invocation.ts +24 -118
- package/packages/agent-hooks/src/rules/shell/piped-script.ts +1 -1
- package/packages/agent-hooks/src/rules/shell/prefixes.ts +1 -1
- package/packages/agent-hooks/src/rules/shell/protected-carrier-writes.ts +11 -10
- package/packages/agent-hooks/src/rules/shell/protected-carriers.ts +26 -26
- package/packages/agent-hooks/src/rules/shell/substitution.ts +1 -1
- package/packages/agent-hooks/src/rules/shell/xargs.ts +2 -2
- package/packages/agent-hooks/src/rules/spec.ts +2 -2
- package/packages/agent-settings/README.md +287 -0
- package/packages/agent-settings/assets/GLOBAL-AGENTS.md +14 -16
- package/packages/agent-settings/assets/agents/architect.toml +2 -0
- package/packages/agent-settings/assets/agents/code-reviewer.toml +2 -0
- package/packages/agent-settings/assets/agents/executor.toml +2 -0
- package/packages/agent-settings/assets/agents/explore.toml +2 -0
- package/packages/agent-settings/assets/agents/planner.toml +2 -0
- package/packages/agent-settings/assets/mcp.json +0 -4
- package/packages/agent-settings/deploy-profile.json +139 -0
- package/packages/agent-settings/deploy-profile.schema.json +147 -0
- package/packages/agent-settings/managed/README.md +29 -30
- package/packages/agent-settings/managed/codex-requirements.toml +9 -9
- package/packages/agent-settings/package.json +20 -0
- package/packages/agent-settings/src/deploy/agent-render.ts +2 -2
- package/packages/agent-settings/src/deploy/agent-toml.ts +1 -1
- package/packages/agent-settings/src/deploy/agents-deploy.ts +17 -3
- package/packages/agent-settings/src/deploy/doctor.ts +3 -83
- package/packages/agent-settings/src/deploy/index.ts +6 -33
- package/packages/agent-settings/src/deploy/legacy-lock.ts +6 -6
- package/packages/agent-settings/src/deploy/list.ts +5 -19
- package/packages/agent-settings/src/deploy/lock.ts +8 -18
- package/packages/agent-settings/src/deploy/mcp-deploy.ts +10 -5
- package/packages/agent-settings/src/deploy/mcp-merge.ts +22 -3
- package/packages/agent-settings/src/deploy/mcp-source.ts +1 -1
- package/packages/agent-settings/src/deploy/profile.ts +11 -35
- package/packages/agent-settings/src/deploy/retire-lean-ctx.ts +184 -0
- package/packages/agent-settings/src/deploy/settings.ts +17 -22
- package/packages/agent-settings/src/global-surface-sweep.ts +0 -2
- package/packages/agent-settings/src/kimi-hooks.ts +339 -192
- package/packages/agent-settings/src/opencode-hooks.ts +1 -1
- package/packages/agent-settings/tsconfig.json +23 -0
- package/packages/agent-skills/assets/agent-search-tool-audit/SKILL.md +120 -0
- package/packages/agent-skills/assets/agent-search-tool-audit/scripts/audit.sh +276 -0
- package/packages/agent-skills/assets/debug-issue/SKILL.md +8 -7
- package/packages/agent-skills/assets/explore-codebase/SKILL.md +13 -13
- package/packages/agent-skills/assets/refactor-safely/SKILL.md +12 -11
- package/packages/agent-skills/assets/review-changes/SKILL.md +7 -7
- package/packages/agent-skills/assets/testing/references/e2e.md +37 -0
- package/packages/agent-skills/assets/testing/references/integration.md +37 -0
- package/packages/agent-skills/assets/testing/references/unit.md +32 -0
- package/packages/agent-skills/dist/deploy.d.ts +2 -0
- package/packages/agent-skills/dist/deploy.d.ts.map +1 -1
- package/packages/agent-skills/dist/deploy.js +27 -1
- package/packages/agent-skills/dist/deploy.js.map +1 -1
- package/packages/agent-skills/dist/doctor.d.ts +0 -2
- package/packages/agent-skills/dist/doctor.d.ts.map +1 -1
- package/packages/agent-skills/dist/doctor.js +1 -1
- package/packages/agent-skills/dist/doctor.js.map +1 -1
- package/packages/agent-skills/dist/fs-utils.d.ts +0 -1
- package/packages/agent-skills/dist/fs-utils.d.ts.map +1 -1
- package/packages/agent-skills/dist/fs-utils.js +1 -1
- package/packages/agent-skills/dist/fs-utils.js.map +1 -1
- package/packages/agent-skills/src/deploy.ts +29 -1
- package/packages/agent-skills/src/doctor.ts +1 -1
- package/packages/agent-skills/src/fs-utils.ts +1 -1
- package/packages/azdo/README.md +10 -9
- package/packages/azdo/package.json +1 -3
- package/packages/azdo/scripts/probe-ado-rules.ts +311 -0
- package/packages/azdo/src/azdo-pl.ts +2 -54
- package/packages/azdo/src/azdo-pr-review.ts +4 -4
- package/packages/azdo/src/azdo-repo-doctor.ts +101 -52
- package/packages/azdo/src/azdo-wit.ts +44 -2
- package/packages/azdo/src/lib/agent-identity.ts +12 -14
- package/packages/azdo/src/lib/agent-token.ts +2 -2
- package/packages/azdo/src/lib/client.ts +0 -5
- package/packages/azdo/src/lib/graph-identity.ts +4 -4
- package/packages/azdo/src/workflow-ladder.csv +241 -0
- package/packages/azdo/src/workflow-rules-matrix.csv +85 -0
- package/packages/azdo/src/workflow-rules.ts +194 -0
- package/packages/fleet/manifest.json +35 -11
- package/packages/fleet/manifest.schema.json +62 -10
- package/packages/fleet/src/default-agent-file.ts +3 -3
- package/packages/fleet/src/install-adl-package.ts +73 -15
- package/packages/fleet/src/install-embedding-model.ts +13 -13
- package/packages/fleet/src/managed-settings.ts +7 -7
- package/packages/fleet/src/repo-maintain.ts +91 -55
- package/packages/fleet/src/scratch-reap.ts +5 -5
- package/packages/fleet/src/vscode-settings.ts +5 -5
- package/packages/repo-controls/README.md +141 -43
- package/packages/repo-controls/assets/promote.ts +4 -4
- package/packages/repo-controls/assets/reconcile-guard.sh +10 -46
- package/packages/repo-controls/assets/version-bump.sh +31 -84
- package/packages/repo-controls/bunfig.toml +6 -7
- package/packages/repo-controls/package/adl-compliance/AGENTS.md +5 -6
- package/packages/repo-controls/package/adl-compliance/conftest.py +3 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/__init__.py +4 -16
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/adr_lifecycle/test_check.py +9 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/notes.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/test_check.py +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/__init__.py +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/check.py +266 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/.drafts/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/.drafts/d.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/.hidden.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/data.csv +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/diagram.png +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/mock.png +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs/guide/sub/nested.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/docs.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p1.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p2.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p3.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p4.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-assets/plans/deep/p5.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/docs/architecture/build.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/docs/architecture/overview.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/docs/guide/install.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/docs/guide/start.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-clean/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/decisions/adr-001-tenancy.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/decisions/adr-002-carrier.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/decisions/adr-003-cli.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/decisions/archive/adr-000-old.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/decisions/archive/adr-000-older.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/guide/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/guide/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/docs/guide/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-decisions/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-01.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-02.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-03.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-04.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-05.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-06.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-07.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-08.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-09.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-10.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-11.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-12.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-13.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-14.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-15.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/docs/guide/page-16.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-default-cap/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-exempt/docs/guide/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-exempt/docs/guide/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-exempt/docs/guide/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-exempt/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-grew/docs/guide/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-grew/docs/guide/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-grew/docs/guide/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-grew/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/docs/guide/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/docs/guide/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/docs/guide/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/docs/guide/d.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/docs/guide/e.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-no-section/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-over-cap/docs/guide/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-over-cap/docs/guide/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-over-cap/docs/guide/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-over-cap/docs/short/only.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-over-cap/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/held/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/held/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/held/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/held/d.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/shrunk/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/docs/shrunk/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-stale/grants.yaml +6 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-unusable/docs/guide/a.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-unusable/docs/guide/b.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-unusable/docs/guide/c.md +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/fixtures/docs-size-unusable/grants.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/directory_size/test_check.py +345 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/check.py +18 -5
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/test_check.py +35 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/__init__.py +7 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/check.py +91 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/AGENTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/CLAUDE.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/-leading-hyphen.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/AGENTS.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/double--hyphen.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/getting started.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/nested/page-here.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/trailing-hyphen-.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/ui-contract.md +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/architecture/user_profile.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/assets/UI-CONTRACT.png +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/assets/diagram.png +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/index.md +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/notes.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/reference.html +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/research/2026-10-experiment.md +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs/research/UI-CONTRACT.md +6 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/fixtures/docs.md +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/test_check.py +194 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/check.py +14 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/docs-knowledge-indexes.yaml +5 -5
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-shipped-register-legacy/docs/compliance/index.md +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/fixtures/knowledge-indexes-shipped-register-type/docs/compliance/index.md +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/indexes/test_check.py +58 -6
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/ledger/test_check.py +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/check.py +64 -17
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/docs-okf-profiles.yaml +60 -9
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-ledger-clean/docs/notes.md +17 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-ledger-no-lines/docs/notes.md +13 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-clean/docs/architecture/demo.md +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-clean/docs-okf-profiles.yaml +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs/research/no-type.md +9 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs/research/typed-experiment.md +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs/research/typed-research.md +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs-okf-profiles.yaml +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-violation/docs/architecture/bad-status.md +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-violation/docs-okf-profiles.yaml +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/experiment-ok.md +15 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/extra-key.md +15 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/extra-keys.md +16 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-created.md +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-description.md +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-last-update.md +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-sources.md +10 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-status.md +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-title.md +11 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/optional-keys.md +16 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/research-ok.md +14 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research-neighbours/docs/architecture/created-date.md +21 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research-neighbours/docs/architecture/research-shaped.md +19 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research-neighbours/docs/operations/runbook.md +26 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/test_check.py +228 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/register.py +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/test_check.py +11 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/__init__.py +5 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/check.py +160 -44
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-clean/grants.yaml +0 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-empty-register/frontend/packages/desktop/src/a.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-empty-register/frontend/packages/desktop/src/b.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-empty-register/grants.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/grants.yaml +0 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-missing-tree/frontend/packages/desktop/src/renderer/solo/item.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-missing-tree/grants.yaml +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-no-ceilings/frontend/packages/desktop/src/a.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-no-ceilings/frontend/packages/desktop/src/b.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-no-ceilings/frontend/packages/desktop/src/c.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-no-ceilings/grants.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-stale-entry/frontend/packages/desktop/src/renderer/solo/item.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-stale-entry/grants.yaml +5 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/grants.yaml +0 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unusable-register/frontend/packages/desktop/src/renderer/solo/item.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unusable-register/grants.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/register.py +127 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/test_check.py +265 -29
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/check.py +75 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/markdown_trees/test_check.py +194 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/check.py +56 -10
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/test_check.py +258 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/check.py +40 -12
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/test_check.py +108 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plan_metadata.py +9 -4
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/check.py +1 -1
- 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 +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/test_check.py +3 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/check.py +2 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/check.py +23 -6
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/test_check.py +76 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/check.py +58 -17
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/test_check.py +161 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/check.py +35 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/scripts_size_depth/test_check.py +108 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/check.py +281 -61
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/absolute-path.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/backslash-path.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/baseline-is-a-list.yaml +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/boolean-size.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/dot-segment.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/duplicate-path.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/empty-file.yaml +0 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/empty-segment.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/float-size.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/negative-size.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/no-over-limit-baseline.yaml +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/no-schema-version.yaml +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/non-string-path.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/not-yaml.yaml +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/null-size.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/parent-segment.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/string-size.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/top-level-is-a-list.yaml +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/trailing-slash.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/unknown-key.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/wrong-schema-version.yaml +2 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/malformed/zero-size.yaml +3 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/valid.yaml +4 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/test_check.py +758 -45
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/ignored_paths/check.py +4 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/ignored_paths/test_check.py +2 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/cargo_lock.py +490 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/check.py +368 -55
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/test_check.py +4 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/test_declared_paths.py +523 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/test_stale_lock.py +1179 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/cli.py +122 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/check.py +33 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/constants.py +0 -11
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/core/context.py +16 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/config.py +1 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/docs_shape.py +12 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/gate-registry.alt.yaml +133 -147
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/gate-registry.yaml +133 -147
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/registry.py +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/root_shape.py +52 -10
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/runner.py +23 -4
- package/packages/repo-controls/package.json +2 -9
- package/packages/repo-controls/scripts/hooks/post-merge +13 -0
- package/packages/repo-controls/scripts/hooks/pre-push +3 -3
- package/packages/repo-controls/src/azdo-push.ts +64 -36
- package/packages/repo-controls/src/azure-devops-governance.ts +7 -9
- package/packages/repo-controls/src/azure-devops-remote.ts +1 -1
- package/packages/repo-controls/src/cli.ts +29 -8
- package/packages/repo-controls/src/compliance-config.ts +410 -2
- package/packages/repo-controls/src/config.ts +133 -60
- package/packages/repo-controls/src/constants.ts +13 -27
- package/packages/repo-controls/src/coverage-ratchet.ts +4 -4
- package/packages/repo-controls/src/doctor.ts +46 -19
- package/packages/repo-controls/src/gitignore-block.ts +5 -29
- package/packages/repo-controls/src/hook-log.ts +1 -2
- package/packages/repo-controls/src/hook.ts +201 -45
- package/packages/repo-controls/src/install.ts +14 -8
- package/packages/repo-controls/src/integrity.ts +3 -3
- package/packages/repo-controls/src/lfs.ts +111 -0
- package/packages/repo-controls/src/promote.ts +8 -8
- package/packages/repo-controls/src/runtime.ts +9 -1
- package/packages/repo-controls/src/workflows-drift.ts +4 -5
- package/packages/repo-controls/src/worktree-guard.ts +3 -3
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
# Global surface sweep
|
|
2
|
+
|
|
3
|
+
This operator tool finds third-party machine-global Claude, Codex, and Cursor
|
|
4
|
+
extensions that should normally be repository-local. Manual use keeps review
|
|
5
|
+
and approval separate; fleet enforcement is an explicit manifest policy run by
|
|
6
|
+
the existing global-tool reconciler.
|
|
7
|
+
|
|
8
|
+
## Safety contract
|
|
9
|
+
|
|
10
|
+
The workflow has five modes:
|
|
11
|
+
|
|
12
|
+
- `audit` prints every candidate and changes nothing.
|
|
13
|
+
- `plan` emits a reviewable JSON approval document. It contains exact JSON
|
|
14
|
+
selectors, TOML table headers, filesystem paths, and pre-change SHA-256
|
|
15
|
+
fingerprints, but not the removed configuration values.
|
|
16
|
+
- `copy-review` makes a private, surface-organized copy of every path candidate,
|
|
17
|
+
full original and proposed configuration files, and exact removed JSON/TOML
|
|
18
|
+
fragments. It does not change the source surfaces.
|
|
19
|
+
- `apply` requires that approval document. It recomputes the candidates,
|
|
20
|
+
verifies every removal description and fingerprint before making any change,
|
|
21
|
+
and fails before the first mutation if an approved target drifted.
|
|
22
|
+
- `enforce` is the manifest-authorized scheduled mode. It applies all current
|
|
23
|
+
unprotected candidates without a one-time approval file.
|
|
24
|
+
|
|
25
|
+
Before discovery produces candidates, it consults
|
|
26
|
+
[`protected.json`](./protected.json). Protection there is limited to verified
|
|
27
|
+
entries supplied or managed by the agent application itself. It is never
|
|
28
|
+
granted to a directory prefix or namespace. Protection matches only the listed
|
|
29
|
+
filesystem path, JSON selector, or TOML table header; its content may change
|
|
30
|
+
during normal vendor updates. A newly appearing sibling or child is not
|
|
31
|
+
protected unless its own exact identity is listed.
|
|
32
|
+
|
|
33
|
+
The checked-in list protects the currently verified Codex application caches,
|
|
34
|
+
OpenAI-bundled plugin/runtime artifacts, Codex system skill catalog,
|
|
35
|
+
Cursor-bundled `skills-cursor` entries, Codex's own Node REPL configuration,
|
|
36
|
+
and Anthropic's automatically available official marketplace metadata. The
|
|
37
|
+
marketplace itself is native; a plugin selected from it is not. This distinction
|
|
38
|
+
matches [Anthropic's marketplace documentation](https://code.claude.com/docs/en/discover-plugins),
|
|
39
|
+
which describes the official marketplace as automatic and each plugin as an
|
|
40
|
+
explicit user/project/local installation.
|
|
41
|
+
|
|
42
|
+
The list does not protect third-party/global additions such as Paseo, Enact
|
|
43
|
+
Context, Code Review Graph, OfficeCLI, custom skills, custom commands,
|
|
44
|
+
installed Claude plugins, or OpenAI curated-remote plugins. Those remain sweep
|
|
45
|
+
candidates even when they are useful; their intended home is the owning
|
|
46
|
+
repository.
|
|
47
|
+
|
|
48
|
+
**Orca hooks are the one exception, and they are protected by content, not by
|
|
49
|
+
`protected.json`.** Tarun, 2026-09-27 ("Orca allowed for
|
|
50
|
+
adl"): "keep the orca hooks, let orca manage it, orca is allowed for adl" —
|
|
51
|
+
the managed layer now calls Orca itself (see
|
|
52
|
+
[`managed/README.md`](./managed/README.md#orca-orca-allowed-for-adl)),
|
|
53
|
+
and Orca's own user-level hooks on every surface (Claude `hooks` +
|
|
54
|
+
`statusLine`, Codex `hooks.json`, Cursor `hooks.json`, Kimi `[[hooks]]`) are
|
|
55
|
+
never removal candidates either. Unlike every other protected entry above,
|
|
56
|
+
this is not a static `protected.json` identity: `global-surface-sweep.ts`
|
|
57
|
+
recognizes an Orca hook at plan time by an EXACT reference to the path
|
|
58
|
+
segment `.orca/agent-hooks/` in its content (never a loose match on the word
|
|
59
|
+
"orca" alone — `/opt/orca/kimi-hook.sh`, which merely mentions "orca", is
|
|
60
|
+
still a genuine candidate). This also required `.claude/settings.json`'s
|
|
61
|
+
`hooks` key (and its Codex/Cursor equivalents) to move from one sweep
|
|
62
|
+
candidate per event to one candidate per hook GROUP, so a real machine's
|
|
63
|
+
single event can mix a still-sweepable adl/lean-ctx hook with an Orca hook
|
|
64
|
+
that must not be swept. See `tests/orca-hooks-protected.test.ts`.
|
|
65
|
+
|
|
66
|
+
Operations omitted from the reviewed plan remain untouched. Approval is atomic
|
|
67
|
+
per target file or filesystem path: for example, all listed removals from
|
|
68
|
+
`.claude/settings.json` form one operation. Delete the entire operation from
|
|
69
|
+
the plan if any listed removal should remain.
|
|
70
|
+
|
|
71
|
+
Apply mode also checks each fingerprint again immediately before mutation.
|
|
72
|
+
Modified files are copied and removed paths are moved to a unique backup under
|
|
73
|
+
`STATE_DIR/global-surface-sweep/backups/`. An `applied-plan.json` beside each
|
|
74
|
+
backup records exactly what changed. A failed multi-operation apply rolls back
|
|
75
|
+
the already completed prefix. File rewrites preserve the original mode, owner,
|
|
76
|
+
and group even when scheduled reconciliation runs as root.
|
|
77
|
+
|
|
78
|
+
Those backups apply only to foreign entries in mixed host/application files and
|
|
79
|
+
directories; `STATE_DIR` is runtime recovery state, not an Adl-owned surface
|
|
80
|
+
root. Fully owned Adl artifacts use their own direct reconciliation paths and
|
|
81
|
+
are never routed through this remover.
|
|
82
|
+
|
|
83
|
+
The built-in scope intentionally excludes host-owned user data such as
|
|
84
|
+
`.codex/memories`, `.codex/automations`, `.codex/sessions`,
|
|
85
|
+
`.claude/projects`, and global instruction files. A forged plan cannot expand
|
|
86
|
+
the built-in target allowlist.
|
|
87
|
+
|
|
88
|
+
## Scanned surfaces and entry kinds
|
|
89
|
+
|
|
90
|
+
Ownership rule: machine-global agent configuration belongs to enact-vps;
|
|
91
|
+
everything else belongs in the owning repository. The sweep therefore treats
|
|
92
|
+
anything not declared by enact-vps (`protected.json`, the Kimi managed block,
|
|
93
|
+
GLOBAL-AGENTS deployment targets) as foreign:
|
|
94
|
+
|
|
95
|
+
- JSON entries: Claude `settings.json` `hooks`, `mcpServers`, `enabledPlugins`,
|
|
96
|
+
`extraKnownMarketplaces`, `permissions.allow|deny|ask` items; `.claude.json`
|
|
97
|
+
MCP; Codex/Cursor hooks and MCP; OpenCode `mcp`, `permission`, `plugin`;
|
|
98
|
+
Kimi `mcp.json`.
|
|
99
|
+
- TOML tables: Codex `mcp_servers.*` and `hooks.*`; Kimi `[[hooks]]` outside
|
|
100
|
+
`# BEGIN/END ADL KIMI HOOKS` (that region is never inspected or changed).
|
|
101
|
+
- Root-key baselines (`root_keys` in `protected.json`): when a settings file has a
|
|
102
|
+
declared baseline, every undeclared top-level JSON key, TOML root key, or TOML
|
|
103
|
+
table whose first segment is undeclared is removed. Files without a baseline
|
|
104
|
+
never lose root keys.
|
|
105
|
+
- Text blocks: tool-injected marker regions (`# >>> name >>>`…`# <<< name <<<`,
|
|
106
|
+
`# name — begin`…`# name — end`, `<!-- name -->`…`<!-- /name -->`) in shell rc
|
|
107
|
+
files (`.zshenv`, `.zprofile`, `.zshrc`, `.zlogin`, `.bashenv`, `.bashrc`,
|
|
108
|
+
`.bash_profile`, `.profile`) and global instruction files (`CLAUDE.md`,
|
|
109
|
+
Codex/Cursor/Kimi/OpenCode `AGENTS.md`). Text
|
|
110
|
+
outside markers is never touched; exact `text_blocks` identities are retained.
|
|
111
|
+
- Paths: skills/plugins/commands/rules directories for every host above and
|
|
112
|
+
`~/Library/LaunchAgents` entries.
|
|
113
|
+
|
|
114
|
+
VS Code is deliberately outside this broad removal scope. The focused
|
|
115
|
+
`packages/fleet/src/vscode-settings.ts` deployer owns only
|
|
116
|
+
`git.detectWorktrees` and `scm.alwaysShowRepositories` in existing stable VS
|
|
117
|
+
Code profiles, plus those two IDs in the default profile's apply-to-all list;
|
|
118
|
+
that narrow ownership does not authorize sweeping other VS Code configuration.
|
|
119
|
+
|
|
120
|
+
`~/Library/LaunchAgents` scope is agent tooling only. An entry is scanned
|
|
121
|
+
only when its file name or raw plist content (the label, program and
|
|
122
|
+
arguments, and environment) contains one of these case-insensitive tokens:
|
|
123
|
+
`lean-ctx`, `leanctx`, `adl`, `jcode`, `claude`, `codex`, `cursor`, `kimi`,
|
|
124
|
+
`opencode`, `copilot`, or `orca` (`AGENT_TOOL_TOKENS` in the source). XML and
|
|
125
|
+
binary plists both store those strings verbatim. Other application
|
|
126
|
+
LaunchAgents, such as `com.google.GoogleUpdater.wake` or Keystone, are not
|
|
127
|
+
agent surfaces, so they are neither candidates nor reported. The fleet
|
|
128
|
+
manifest declares no LaunchAgent any more (git-maintain was retired on
|
|
129
|
+
2026-09-30), so no plist is protected by manifest identity; `protected.json` is
|
|
130
|
+
the only protection list.
|
|
131
|
+
|
|
132
|
+
In-scope `~/Library/LaunchAgents` entries require explicit approval: `enforce` never
|
|
133
|
+
removes them and instead prints `pending approval:` lines plus a stderr
|
|
134
|
+
warning on every run until a reviewed plan is applied. Because removing a
|
|
135
|
+
plist does not by itself unload an already-loaded job, `apply` (macOS only)
|
|
136
|
+
runs `launchctl bootout gui/<uid>/<label>` for a LaunchAgents removal
|
|
137
|
+
immediately before moving its plist to backup, and refuses the removal
|
|
138
|
+
(fails loud, rolls back) if the job is verifiably still loaded afterward —
|
|
139
|
+
`launchctl bootout` failing because the job simply was not loaded is the
|
|
140
|
+
expected, harmless common case and is not itself an error.
|
|
141
|
+
|
|
142
|
+
## Review exactly what would be removed
|
|
143
|
+
|
|
144
|
+
Start with the human-readable audit:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
bin/global-surface-sweep --home "$HOME" --mode audit
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Create a review bundle in a new or empty private directory:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
bin/global-surface-sweep \
|
|
154
|
+
--home "$HOME" \
|
|
155
|
+
--mode copy-review \
|
|
156
|
+
--destination /absolute/path/to/review-copy
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The destination is mode `0700`. It is divided into `agents/`, `claude/`,
|
|
160
|
+
`codex/`, and `cursor/`. Each surface can contain exact path copies, original
|
|
161
|
+
configuration files, proposed-after files, and removed fragments. The bundle's
|
|
162
|
+
`manifest.json` records every candidate, fingerprint, and copy mapping without
|
|
163
|
+
placing removed values in the manifest. Removed-fragment files can contain
|
|
164
|
+
credentials and are mode `0600`; do not commit or share the bundle.
|
|
165
|
+
|
|
166
|
+
The audit first prints every exact protected identity retained by
|
|
167
|
+
`protected.json`, including its reason. Each candidate is then followed by
|
|
168
|
+
exact lines such as:
|
|
169
|
+
|
|
170
|
+
```text
|
|
171
|
+
protected: PATH .codex/skills/.system (sha256:...) — Codex system skills supplied by the application
|
|
172
|
+
remove: JSON .claude/settings.json#/hooks/PostToolUse (sha256:...)
|
|
173
|
+
remove: TOML .codex/config.toml [mcp_servers.example] (sha256:...)
|
|
174
|
+
remove: PATH .codex/skills/example (sha256:...)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Generate the approval document in a root-restricted working directory:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
umask 077
|
|
181
|
+
bin/global-surface-sweep \
|
|
182
|
+
--home "$HOME" --mode plan >./global-surface-sweep-plan.json
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Review every object in `operations`. Remove whole operation objects that are
|
|
186
|
+
not approved. Do not edit their paths, hashes, or `removals` arrays; apply mode
|
|
187
|
+
compares those fields with a fresh plan and rejects mismatches.
|
|
188
|
+
|
|
189
|
+
Apply only after review:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
sudo bin/global-surface-sweep \
|
|
193
|
+
--home "$HOME" \
|
|
194
|
+
--mode apply \
|
|
195
|
+
--approval ./global-surface-sweep-plan.json \
|
|
196
|
+
--state-dir /var/lib/adl
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Because plans contain machine-specific home paths and fingerprints, generate a
|
|
200
|
+
separate plan on each machine. Plans are one-time approval artifacts, not files
|
|
201
|
+
to commit to this repository.
|
|
202
|
+
|
|
203
|
+
## Scheduled fleet enforcement
|
|
204
|
+
|
|
205
|
+
`bin/reconcile --mode apply` invokes `enforce` after package and
|
|
206
|
+
health checks and before recording the manifest as successfully applied. The
|
|
207
|
+
administrator home is declared per device in `packages/fleet/manifest.json`.
|
|
208
|
+
Audit and plan runs invoke the read-only surface audit instead.
|
|
209
|
+
|
|
210
|
+
`global_surface_sweep.remove_unprotected` in the manifest gates whether an
|
|
211
|
+
apply run actually removes anything: `true` (the current fleet default)
|
|
212
|
+
enforces — removes every unprotected candidate; `false` keeps `reconcile
|
|
213
|
+
--mode apply` on `audit` for the surface sweep step even though the rest of
|
|
214
|
+
the run still applies normally, so the sweep only plans/reports without
|
|
215
|
+
deleting until the flag is flipped back. Protection itself is based on the
|
|
216
|
+
exact known identity, not its content fingerprint, so normal vendor updates
|
|
217
|
+
at a listed path or selector remain protected across fleet versions.
|
|
218
|
+
|
|
219
|
+
## Maintaining the protected list
|
|
220
|
+
|
|
221
|
+
Add an entry only after verifying that the agent vendor ships or owns that
|
|
222
|
+
specific artifact. Record its exact filesystem path, JSON selector, or TOML
|
|
223
|
+
table header and the provenance reason. Do not add parent directories, path
|
|
224
|
+
prefixes, wildcard selectors, or TOML namespace prefixes. A protected path
|
|
225
|
+
continues to match if its content or file type changes, so keep the identity
|
|
226
|
+
list narrow and explicit.
|
|
227
|
+
|
|
228
|
+
`root_keys` baselines are derived from each host's own documented top-level
|
|
229
|
+
settings schema (currently `.claude/settings.json` from
|
|
230
|
+
<https://code.claude.com/docs/en/settings-reference> and `.codex/config.toml`
|
|
231
|
+
from <https://developers.openai.com/codex/config-reference>), not merely from
|
|
232
|
+
whatever keys this machine's own settings files currently happen to use —
|
|
233
|
+
that guards against a legitimate key one fleet device has set (and another
|
|
234
|
+
has not yet) being misclassified as foreign. Re-sync a baseline against its
|
|
235
|
+
source page whenever the vendor ships new top-level settings keys. A key
|
|
236
|
+
whose *content* is inherently third-party wiring (e.g. Claude's
|
|
237
|
+
`extraKnownMarketplaces`) is deliberately left out of the baseline on
|
|
238
|
+
purpose even though it is a real, documented key, so the whole container
|
|
239
|
+
stays a sweep candidate whenever non-empty — see the `reason` field on that
|
|
240
|
+
baseline entry for the specific rationale.
|
|
241
|
+
|
|
242
|
+
## Global agent instructions (`GLOBAL-AGENTS.md`)
|
|
243
|
+
|
|
244
|
+
[`GLOBAL-AGENTS.md`](./assets/GLOBAL-AGENTS.md) is the single source of truth for
|
|
245
|
+
every host's global instruction file: `~/.claude/CLAUDE.md`,
|
|
246
|
+
`~/.codex/AGENTS.md`, `~/.cursor/AGENTS.md`, `~/.kimi-code/AGENTS.md`, and
|
|
247
|
+
`~/.config/opencode/AGENTS.md`. Any change to those files must be made in
|
|
248
|
+
`GLOBAL-AGENTS.md`; a direct edit to a target is drift and is overwritten on
|
|
249
|
+
the next deploy.
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
bin/global-agents --home "$HOME" --mode status # read-only
|
|
253
|
+
bin/global-agents --home "$HOME" --mode deploy # forced
|
|
254
|
+
bin/global-agents --home "$HOME" --mode uninstall
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Deploy is always forced; there is no `--force` flag and no leave-in-place
|
|
258
|
+
mode. A missing target is created, a target already equal to the source is
|
|
259
|
+
left untouched, and a drifted target (hand-edited, or stale from an older
|
|
260
|
+
source) is replaced from source. These exact files are Adl-owned artifacts:
|
|
261
|
+
there is no displaced-original backup or leave-in-place path. A second deploy
|
|
262
|
+
with no source change writes nothing. Uninstall removes the same owned files
|
|
263
|
+
regardless of their current bytes.
|
|
264
|
+
|
|
265
|
+
`bin/reconcile --mode apply` runs the forced deploy
|
|
266
|
+
privilege-dropped as the device's `brew_user` against `brew_user_home` when
|
|
267
|
+
`config.global_agents.enabled` is true; plan and audit runs call `status`
|
|
268
|
+
only.
|
|
269
|
+
|
|
270
|
+
## Tests
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
(cd packages/agent-settings && bun test tests/global-surface-sweep.test.ts)
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
The tests use temporary home and state directories only. They verify exact
|
|
277
|
+
removal reporting, exact (non-blanket) identity protection, sibling discovery,
|
|
278
|
+
no-op discovery, unapproved-entry retention, deletion fingerprint drift
|
|
279
|
+
rejection, path allowlisting, recoverable backups, and idempotence.
|
|
280
|
+
`third-party-wiring.test.ts` reproduces the lean-ctx / enact-context global
|
|
281
|
+
footprint (shell hooks, Claude permissions, instruction blocks, OpenCode,
|
|
282
|
+
Kimi, LaunchAgents) and checks plan, enforce, approved
|
|
283
|
+
apply, idempotence, and drift detection.
|
|
284
|
+
`global-agents.test.ts` and `global-agents-forced-deploy.test.ts` cover the
|
|
285
|
+
global instruction deploy with temporary homes: drifted targets replaced from
|
|
286
|
+
source without a displaced copy, matching targets untouched, missing targets
|
|
287
|
+
created, and idempotence.
|
|
@@ -50,9 +50,9 @@ repo's own `AGENTS.md`.
|
|
|
50
50
|
## Agent identity
|
|
51
51
|
- Every Azure DevOps access (git, PRs, work items, builds, reads included) runs as an agent identity — never as you,
|
|
52
52
|
the human. Default is the machine's default agent, set silently by fleet reconcile; it is always overridable.
|
|
53
|
-
- **Override:** prefix a command with `ADL_AGENT_ID_AGENT=<agent-tarun|agent-vivek|agent-reviewer
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
- **Override:** prefix a command with `ADL_AGENT_ID_AGENT=<agent-tarun|agent-vivek|agent-reviewer>`. An MCP tool
|
|
54
|
+
call can't carry an inline prefix, so it uses the session env or the machine default agent; the fallback CLI
|
|
55
|
+
(`adl mcp cli <command>`) takes the inline prefix like any command.
|
|
56
56
|
- Never read vault files. Never pass a token.
|
|
57
57
|
- **Never set `ADL_HUMAN_AZDO`.** It is Tarun's own human-terminal marker for `bin/git-ado`'s and `adl id whoami`'s
|
|
58
58
|
fail-closed human pass-through (stdin TTY AND `ADL_HUMAN_AZDO=1`, exactly) — an agent carrying it would let a child
|
|
@@ -60,8 +60,8 @@ repo's own `AGENTS.md`.
|
|
|
60
60
|
|
|
61
61
|
## Commits and the PR lifecycle
|
|
62
62
|
- **Use ordinary `git` for every Git operation.** The managed `/usr/local/bin/git` front controller delegates local and non-Azure DevOps work to the system Git executable, and routes HTTPS Azure DevOps network commands through `adl-agent-id exec --agent "$ADL_AGENT_ID_AGENT"` automatically. `git-ado` handles the credential boundary internally. Linux keeps its single administrator/root credential model; the controller does not introduce a second account or secret location.
|
|
63
|
-
- **Start a sub-agent session on a surface (intra-surface sub-agents) with `adl run <surface> --headless "<prompt>"` ONLY when the operator explicitly asks for it** — an agent must never start one autonomously. Azure DevOps operations (PRs, work items, builds) go through the `adl` MCP server (`adl mcp serve`) with tools like `pr_list_or_get`, `pr_create_or_update`, `pr_review`, `build_list_or_get`, `build_run`, `workitem_list_or_get`, `workitem_create_or_update
|
|
64
|
-
- **Repository controls run via `adl repo controls`.** Git hooks in controlled repositories run pre-commit (local checks) and pre-push (Azure DevOps governance). Each repository is reconciled on its own with its `.agents/`, `.claude/`, `.codex/`, `.cursor/`, `.kimi-code/`, `.opencode/` projections
|
|
63
|
+
- **Start a sub-agent session on a surface (intra-surface sub-agents) with `adl run <surface> --headless "<prompt>"` ONLY when the operator explicitly asks for it** — an agent must never start one autonomously. Azure DevOps operations (PRs, work items, builds) go through the `adl` MCP server (`adl mcp serve`) with tools like `pr_list_or_get`, `pr_create_or_update`, `pr_review`, `build_list_or_get`, `build_run`, `workitem_list_or_get`, `workitem_create_or_update`. If the MCP server is not working, fall back to the CLI: `adl mcp cli <command>`. Never read vault files; never pass a token.
|
|
64
|
+
- **Repository controls run via `adl repo controls`.** Git hooks in controlled repositories run pre-commit (local checks) and pre-push (Azure DevOps governance). Each repository is reconciled on its own with its `.agents/`, `.claude/`, `.codex/`, `.cursor/`, `.kimi-code/`, `.opencode/` projections.
|
|
65
65
|
- **The release flow (`integration` auto-complete; the `branch → PR → integration → main` promotion; the integration PR merging itself once green) applies to repositories whose root contains an `adl-config.toml`.** Other repositories follow the release flow declared in their own `AGENTS.md`. The human approval gate, where it exists, is the promotion from `integration` to `main`; everything before that is auto-complete once CI is green.
|
|
66
66
|
- Keep each commit **independently green** and on one cohesive topic. Never use `git stash`. When "one topic" and "independently green" conflict, green wins — and say so.
|
|
67
67
|
- Subjects are `<type>(<scope>): <lowercase subject>`. Types: `feat|fix|docs|refactor|perf|chore`. No `!` marker. `release:` is reserved for the promotion PR the pipeline raises — never write one by hand. **In repositories whose root contains an `adl-config.toml`, the pipeline opens `integration → main` once CI is green on `integration` — no agent opens it; the subject follows the commit grammar above.**
|
|
@@ -86,24 +86,22 @@ repo's own `AGENTS.md`.
|
|
|
86
86
|
- Consult official docs **before** coding against an unfamiliar SDK, framework or API.
|
|
87
87
|
|
|
88
88
|
## Context tooling
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
89
|
+
- **Match the tool to the question. `rg` is not the answer to all of them.**
|
|
90
|
+
- Orient in unfamiliar code → **`crg`** (the code graph): `crg architecture`, `crg communities`.
|
|
91
|
+
- Symbols and semantic code queries → `crg search "<text>"`. `rg` finds the text; `crg` finds the edges.
|
|
92
|
+
- Callers, callees, blast radius → `crg query callers_of|callees_of|tests_for|importers_of <target>`, `crg impact`.
|
|
93
|
+
- Unreferenced code → `crg dead-code`.
|
|
94
94
|
- A code *shape* rather than a string → **`ast-grep`**.
|
|
95
|
-
- Files by name or tree → `ctx_glob` / `ctx_tree`.
|
|
96
|
-
- Callers, callees, blast radius → `ctx_callgraph`, or **`crg`** (the code graph): `crg impact`, `crg query callers_of|callees_of|tests_for|importers_of <target>`, `crg dead-code`, `crg architecture`. `rg` finds the text; `crg` finds the edges.
|
|
97
95
|
- Prose in `docs/`, `plans/` → **`search <text>`** — hybrid semantic + keyword, so it surfaces the document whose filename never mentions the subject.
|
|
98
|
-
-
|
|
96
|
+
- Literal text or regex → **`rg`**. Never `grep`; never `find | grep`, which filters file NAMES and silently misses the file whose contents match.
|
|
97
|
+
- Files by name or tree → the host's native Glob / file-listing tools.
|
|
99
98
|
|
|
100
99
|
## Agent surface commands
|
|
101
|
-
Only on explicit operator request:
|
|
100
|
+
Only on explicit operator request: `adl run` is for running a sub-agent headless, nothing else. It is not an identity
|
|
101
|
+
route and not a fallback for anything.
|
|
102
102
|
- **Headless:** `adl run claude --headless "<prompt>"`, `adl run codex --headless "<prompt>"`, `adl run opencode --headless "<prompt>"`, `adl run kimi --headless "<prompt>"`, `adl run cursor --headless "<prompt>"`
|
|
103
103
|
- **Identity override:** add `--as <agent>` to any surface command above
|
|
104
104
|
- **Model:** add `--model <model>` to any headless command above, e.g. `adl run codex --model <model> --headless "<prompt>"` — adl passes each surface's own flag (claude/cursor `--model`, codex/opencode/kimi `-m`); a surface without a model flag refuses it (exit 2). `--model` cannot be combined with `adl run -- <cmd>` (usage error).
|
|
105
105
|
- **Tasks ledger:** when you start and when you finish a task, append one line to `docs/notes.md` in the repository you work in (create the file if it is missing, with YAML frontmatter and a `## Lines` section) — format `YYYY-MM-DD HH:MM <surface> <note>`, the whole line ≤100 characters. Append-only, newest at the bottom, never rewrite earlier lines. One ledger per repository, for every agent.
|
|
106
|
-
- **General form:** `adl run -- <cmd>` for arbitrary commands
|
|
107
|
-
|
|
108
106
|
## Temporary files
|
|
109
107
|
- All scratch and throwaway work goes in **`.scratchpad/`** at the repo root — never `/tmp` or `/private/tmp`. Create it if missing. Real deliverables go to their proper home.
|
|
@@ -17,6 +17,8 @@ Role:
|
|
|
17
17
|
Rules:
|
|
18
18
|
- Never edit files.
|
|
19
19
|
- Never speculate when you can read the source.
|
|
20
|
+
- Ground assessments in `crg architecture` and `crg communities` evidence rather than directory guesses.
|
|
21
|
+
- Follow the `explore-codebase` skill for graph-powered navigation.
|
|
20
22
|
- Cite exact file paths and line references for material claims.
|
|
21
23
|
- Call out tradeoffs, not just the favored direction.
|
|
22
24
|
- Never act as StageVerifier or LoopGrader, claim external independence, or call loop judgment and closure tools.
|
|
@@ -16,6 +16,8 @@ Role:
|
|
|
16
16
|
Rules:
|
|
17
17
|
- Never edit files.
|
|
18
18
|
- Review only from the actual diff and surrounding code.
|
|
19
|
+
- Run `crg detect-changes --brief` for the risk picture, then `crg impact` and `crg query tests_for <fn>` on high-risk functions.
|
|
20
|
+
- Follow the `review-changes` skill for change detection and impact analysis.
|
|
19
21
|
- Every finding must cite a file reference and explain impact.
|
|
20
22
|
- If no actionable issues remain, report that no local findings were found; do not emit a binding approval token.
|
|
21
23
|
- Never act as StageVerifier or LoopGrader, claim external independence, or call loop judgment and closure tools.
|
|
@@ -15,6 +15,8 @@ Role:
|
|
|
15
15
|
Rules:
|
|
16
16
|
- Stay inside the stated scope.
|
|
17
17
|
- Match existing code patterns.
|
|
18
|
+
- Before changing a symbol, check `crg query callers_of <symbol>` and `crg query tests_for <symbol>`.
|
|
19
|
+
- Follow the `tdd` skill for verification.
|
|
18
20
|
- Do not add abstractions unless the code clearly needs them.
|
|
19
21
|
- Do not stop at code changes; include the verification result.
|
|
20
22
|
- Before dispatching or relaying work, require Factory's exact { planPath, sha256, approvedBy, approvedAt } approval record and rehash planPath; missing approval or byte drift is blocking.
|
|
@@ -16,6 +16,8 @@ Rules:
|
|
|
16
16
|
- Never edit files.
|
|
17
17
|
- Use absolute paths in results.
|
|
18
18
|
- Prefer breadth first: search multiple relevant areas before narrowing.
|
|
19
|
+
- Lead orientation with `crg architecture`, `crg communities`, `crg query`, and `crg search` before falling back to raw text search.
|
|
20
|
+
- Follow the `explore-codebase` skill for graph-powered navigation.
|
|
19
21
|
- Explain how the files connect instead of returning a raw list.
|
|
20
22
|
|
|
21
23
|
Output contract:
|
|
@@ -15,6 +15,8 @@ Role:
|
|
|
15
15
|
Rules:
|
|
16
16
|
- Never write production code.
|
|
17
17
|
- Prefer 3 to 6 concrete steps.
|
|
18
|
+
- Scope plans with `crg impact` and `crg query` so step lists name real symbols.
|
|
19
|
+
- Follow the `explore-codebase` skill for graph-powered navigation.
|
|
18
20
|
- Include dependencies, risks, and verification expectations.
|
|
19
21
|
- After authorized review, emit the Factory-owned approval record exactly as { planPath, sha256, approvedBy, approvedAt }; sha256 is the exact plan-byte digest and changes invalidate approval.
|
|
20
22
|
- For board effects, preserve remote System.State verbatim, model execution, review, and PR as separate axes, and mark unknown remote states blocking.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./deploy-profile.schema.json",
|
|
3
|
+
"mcp": {
|
|
4
|
+
"source": "assets/mcp.json",
|
|
5
|
+
"marker": "adl",
|
|
6
|
+
"surfaces": [
|
|
7
|
+
{
|
|
8
|
+
"name": "claude",
|
|
9
|
+
"format": "json",
|
|
10
|
+
"file": ".mcp.json",
|
|
11
|
+
"containerKey": "mcpServers",
|
|
12
|
+
"jsonStyle": "width-aware",
|
|
13
|
+
"entry": [
|
|
14
|
+
{ "key": "command", "from": "command" },
|
|
15
|
+
{ "key": "args", "from": "args" }
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "codex",
|
|
20
|
+
"format": "toml-block",
|
|
21
|
+
"file": ".codex/config.toml",
|
|
22
|
+
"tableKey": "mcp_servers",
|
|
23
|
+
"entry": [
|
|
24
|
+
{ "key": "command", "from": "command" },
|
|
25
|
+
{ "key": "args", "from": "args" }
|
|
26
|
+
],
|
|
27
|
+
"topLevel": [
|
|
28
|
+
{
|
|
29
|
+
"table": "features",
|
|
30
|
+
"fields": [{ "key": "hooks", "const": true }]
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "cursor",
|
|
36
|
+
"format": "json",
|
|
37
|
+
"file": ".cursor/mcp.json",
|
|
38
|
+
"containerKey": "mcpServers",
|
|
39
|
+
"jsonStyle": "expanded",
|
|
40
|
+
"entry": [
|
|
41
|
+
{ "key": "type", "const": "stdio" },
|
|
42
|
+
{ "key": "command", "from": "command" },
|
|
43
|
+
{ "key": "args", "from": "args" }
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "kimi",
|
|
48
|
+
"format": "json",
|
|
49
|
+
"file": ".kimi-code/mcp.json",
|
|
50
|
+
"containerKey": "mcpServers",
|
|
51
|
+
"jsonStyle": "expanded",
|
|
52
|
+
"entry": [
|
|
53
|
+
{ "key": "command", "from": "command" },
|
|
54
|
+
{ "key": "args", "from": "args" }
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "opencode",
|
|
59
|
+
"format": "json",
|
|
60
|
+
"file": "opencode.json",
|
|
61
|
+
"containerKey": "mcp",
|
|
62
|
+
"jsonStyle": "width-aware",
|
|
63
|
+
"entry": [
|
|
64
|
+
{ "key": "type", "const": "local" },
|
|
65
|
+
{ "key": "command", "from": "commandArgs" },
|
|
66
|
+
{ "key": "enabled", "const": true }
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"agents": {
|
|
72
|
+
"source": "assets/agents",
|
|
73
|
+
"surfaces": [
|
|
74
|
+
{
|
|
75
|
+
"name": "claude",
|
|
76
|
+
"format": "md",
|
|
77
|
+
"folder": ".claude/agents",
|
|
78
|
+
"frontMatter": [
|
|
79
|
+
{ "key": "name", "from": "name" },
|
|
80
|
+
{ "key": "description", "from": "description" },
|
|
81
|
+
{ "key": "tools", "from": "tools", "presentIf": "tools" },
|
|
82
|
+
{ "key": "model", "from": "claude_model" }
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "codex",
|
|
87
|
+
"format": "toml",
|
|
88
|
+
"folder": ".codex/agents",
|
|
89
|
+
"fields": [
|
|
90
|
+
{ "key": "name", "from": "name" },
|
|
91
|
+
{ "key": "description", "from": "description" },
|
|
92
|
+
{ "key": "model", "from": "model" },
|
|
93
|
+
{ "key": "model_reasoning_effort", "from": "model_reasoning_effort" },
|
|
94
|
+
{ "key": "sandbox_mode", "from": "sandbox_mode" }
|
|
95
|
+
],
|
|
96
|
+
"bodyField": "developer_instructions"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "cursor",
|
|
100
|
+
"format": "md",
|
|
101
|
+
"folder": ".cursor/agents",
|
|
102
|
+
"frontMatter": [
|
|
103
|
+
{ "key": "name", "from": "name" },
|
|
104
|
+
{ "key": "description", "from": "description" },
|
|
105
|
+
{ "key": "tools", "from": "tools", "presentIf": "tools" },
|
|
106
|
+
{ "key": "model", "from": "cursor_model" },
|
|
107
|
+
{ "key": "readonly", "const": false }
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "kimi",
|
|
112
|
+
"format": "md",
|
|
113
|
+
"folder": ".kimi-code/agents",
|
|
114
|
+
"frontMatter": [
|
|
115
|
+
{ "key": "name", "from": "name" },
|
|
116
|
+
{ "key": "description", "from": "description" },
|
|
117
|
+
{ "key": "whenToUse", "from": "description" },
|
|
118
|
+
{ "key": "override", "const": false },
|
|
119
|
+
{ "key": "tools", "from": "tools", "presentIf": "tools", "style": "csv-list" }
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "opencode",
|
|
124
|
+
"format": "md",
|
|
125
|
+
"folder": ".opencode/agents",
|
|
126
|
+
"frontMatter": [
|
|
127
|
+
{ "key": "description", "from": "description" },
|
|
128
|
+
{ "key": "mode", "const": "subagent" },
|
|
129
|
+
{
|
|
130
|
+
"key": "permission",
|
|
131
|
+
"presentIf": "tools",
|
|
132
|
+
"fields": [{ "key": "edit", "const": "deny" }]
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"legacyLock": ".agents/adl-repo.lock.json"
|
|
139
|
+
}
|