@warpgogol/forge 9.6.2 → 9.7.0
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/CHANGELOG.md +62 -0
- package/CONTRIBUTING.md +19 -25
- package/README.md +14 -2
- package/README.uk.md +2 -2
- package/bin/cli.ts +40 -2
- package/dist/bin/cli.js +39 -2
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.js +55 -19
- package/dist/os/adr/handlers/implement-stamp.js.map +1 -1
- package/dist/os/adr/handlers/validate.d.ts.map +1 -1
- package/dist/os/adr/handlers/validate.js +55 -21
- package/dist/os/adr/handlers/validate.js.map +1 -1
- package/dist/os/adversarial/adversarial.module.d.ts +3 -0
- package/dist/os/adversarial/adversarial.module.d.ts.map +1 -0
- package/dist/os/adversarial/adversarial.module.js +128 -0
- package/dist/os/adversarial/adversarial.module.js.map +1 -0
- package/dist/os/adversarial/catalog.d.ts +11 -0
- package/dist/os/adversarial/catalog.d.ts.map +1 -0
- package/dist/os/adversarial/catalog.js +72 -0
- package/dist/os/adversarial/catalog.js.map +1 -0
- package/dist/os/adversarial/runner.d.ts +17 -0
- package/dist/os/adversarial/runner.d.ts.map +1 -0
- package/dist/os/adversarial/runner.js +479 -0
- package/dist/os/adversarial/runner.js.map +1 -0
- package/dist/os/agent/handlers/agent-tiers-validate.d.ts.map +1 -1
- package/dist/os/agent/handlers/agent-tiers-validate.js +21 -7
- package/dist/os/agent/handlers/agent-tiers-validate.js.map +1 -1
- package/dist/os/agent/index.js +1 -1
- package/dist/os/agent-tools/agent-tools.module.d.ts +3 -0
- package/dist/os/agent-tools/agent-tools.module.d.ts.map +1 -0
- package/dist/os/agent-tools/agent-tools.module.js +80 -0
- package/dist/os/agent-tools/agent-tools.module.js.map +1 -0
- package/dist/os/agent-tools/generate.d.ts +18 -0
- package/dist/os/agent-tools/generate.d.ts.map +1 -0
- package/dist/os/agent-tools/generate.js +79 -0
- package/dist/os/agent-tools/generate.js.map +1 -0
- package/dist/os/agent-tools/handlers/tools-generate.d.ts +16 -0
- package/dist/os/agent-tools/handlers/tools-generate.d.ts.map +1 -0
- package/dist/os/agent-tools/handlers/tools-generate.js +108 -0
- package/dist/os/agent-tools/handlers/tools-generate.js.map +1 -0
- package/dist/os/agent-tools/index.d.ts +7 -0
- package/dist/os/agent-tools/index.d.ts.map +1 -0
- package/dist/os/agent-tools/index.js +16 -0
- package/dist/os/agent-tools/index.js.map +1 -0
- package/dist/os/agent-tools/manifest.d.ts +26 -0
- package/dist/os/agent-tools/manifest.d.ts.map +1 -0
- package/dist/os/agent-tools/manifest.js +70 -0
- package/dist/os/agent-tools/manifest.js.map +1 -0
- package/dist/os/agent-tools/serve.d.ts +21 -0
- package/dist/os/agent-tools/serve.d.ts.map +1 -0
- package/dist/os/agent-tools/serve.js +99 -0
- package/dist/os/agent-tools/serve.js.map +1 -0
- package/dist/os/agent-tools/server.d.ts +53 -0
- package/dist/os/agent-tools/server.d.ts.map +1 -0
- package/dist/os/agent-tools/server.js +381 -0
- package/dist/os/agent-tools/server.js.map +1 -0
- package/dist/os/agent-tools/types.d.ts +72 -0
- package/dist/os/agent-tools/types.d.ts.map +1 -0
- package/dist/os/agent-tools/types.js +74 -0
- package/dist/os/agent-tools/types.js.map +1 -0
- package/dist/os/authority/authority.module.d.ts.map +1 -1
- package/dist/os/authority/authority.module.js +17 -2
- package/dist/os/authority/authority.module.js.map +1 -1
- package/dist/os/checks/checks.module.d.ts.map +1 -1
- package/dist/os/checks/checks.module.js +44 -11
- package/dist/os/checks/checks.module.js.map +1 -1
- package/dist/os/checks/handlers/contribution-report.d.ts +3 -0
- package/dist/os/checks/handlers/contribution-report.d.ts.map +1 -1
- package/dist/os/checks/handlers/contribution-report.js +142 -23
- package/dist/os/checks/handlers/contribution-report.js.map +1 -1
- package/dist/os/checks/handlers/counters-export.d.ts.map +1 -1
- package/dist/os/checks/handlers/counters-export.js +75 -8
- package/dist/os/checks/handlers/counters-export.js.map +1 -1
- package/dist/os/checks/handlers/counters-validate.d.ts.map +1 -1
- package/dist/os/checks/handlers/counters-validate.js +1 -1
- package/dist/os/checks/handlers/counters-validate.js.map +1 -1
- package/dist/os/codebase/handlers/codebase-measure.d.ts.map +1 -1
- package/dist/os/codebase/handlers/codebase-measure.js +15 -18
- package/dist/os/codebase/handlers/codebase-measure.js.map +1 -1
- package/dist/os/codebase/index.d.ts.map +1 -1
- package/dist/os/codebase/index.js +4 -1
- package/dist/os/codebase/index.js.map +1 -1
- package/dist/os/compass/handlers/compass-audit-handler.d.ts +4 -2
- package/dist/os/compass/handlers/compass-audit-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-audit-handler.js +229 -37
- package/dist/os/compass/handlers/compass-audit-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-header-scaffold-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-header-scaffold-handler.js +45 -2
- package/dist/os/compass/handlers/compass-header-scaffold-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-migrate-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-migrate-handler.js +44 -4
- package/dist/os/compass/handlers/compass-migrate-handler.js.map +1 -1
- package/dist/os/compass/handlers/git-revision.d.ts +31 -5
- package/dist/os/compass/handlers/git-revision.d.ts.map +1 -1
- package/dist/os/compass/handlers/git-revision.js +153 -55
- package/dist/os/compass/handlers/git-revision.js.map +1 -1
- package/dist/os/compass/handlers/summary-record.d.ts.map +1 -1
- package/dist/os/compass/handlers/summary-record.js +44 -9
- package/dist/os/compass/handlers/summary-record.js.map +1 -1
- package/dist/os/context/context.module.d.ts.map +1 -1
- package/dist/os/context/context.module.js +23 -4
- package/dist/os/context/context.module.js.map +1 -1
- package/dist/os/context/handlers/context-assemble.d.ts.map +1 -1
- package/dist/os/context/handlers/context-assemble.js +109 -16
- package/dist/os/context/handlers/context-assemble.js.map +1 -1
- package/dist/os/context/handlers/context-slate-eval.d.ts.map +1 -1
- package/dist/os/context/handlers/context-slate-eval.js +34 -9
- package/dist/os/context/handlers/context-slate-eval.js.map +1 -1
- package/dist/os/context/handlers/index-build.d.ts.map +1 -1
- package/dist/os/context/handlers/index-build.js +119 -26
- package/dist/os/context/handlers/index-build.js.map +1 -1
- package/dist/os/core/archive-regen.d.ts +55 -4
- package/dist/os/core/archive-regen.d.ts.map +1 -1
- package/dist/os/core/archive-regen.js +144 -11
- package/dist/os/core/archive-regen.js.map +1 -1
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +182 -50
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/core/handlers/forge-autonomy-validate.d.ts +9 -2
- package/dist/os/core/handlers/forge-autonomy-validate.d.ts.map +1 -1
- package/dist/os/core/handlers/forge-autonomy-validate.js +81 -0
- package/dist/os/core/handlers/forge-autonomy-validate.js.map +1 -1
- package/dist/os/core/handlers/package-health.js +6 -6
- package/dist/os/core/handlers/policy-digest.d.ts +11 -0
- package/dist/os/core/handlers/policy-digest.d.ts.map +1 -0
- package/dist/os/core/handlers/policy-digest.js +421 -0
- package/dist/os/core/handlers/policy-digest.js.map +1 -0
- package/dist/os/correctness/audit/snapshot.d.ts.map +1 -1
- package/dist/os/correctness/audit/snapshot.js +46 -15
- package/dist/os/correctness/audit/snapshot.js.map +1 -1
- package/dist/os/correctness/correctness.module.d.ts.map +1 -1
- package/dist/os/correctness/correctness.module.js +5 -3
- package/dist/os/correctness/correctness.module.js.map +1 -1
- package/dist/os/correctness/gate/frozen.d.ts +84 -9
- package/dist/os/correctness/gate/frozen.d.ts.map +1 -1
- package/dist/os/correctness/gate/frozen.js +573 -53
- package/dist/os/correctness/gate/frozen.js.map +1 -1
- package/dist/os/correctness/gate/origin.d.ts +2 -0
- package/dist/os/correctness/gate/origin.d.ts.map +1 -1
- package/dist/os/correctness/gate/origin.js +68 -35
- package/dist/os/correctness/gate/origin.js.map +1 -1
- package/dist/os/correctness/gate/repo.d.ts +58 -2
- package/dist/os/correctness/gate/repo.d.ts.map +1 -1
- package/dist/os/correctness/gate/repo.js +177 -15
- package/dist/os/correctness/gate/repo.js.map +1 -1
- package/dist/os/correctness/gate/run.d.ts +6 -0
- package/dist/os/correctness/gate/run.d.ts.map +1 -1
- package/dist/os/correctness/gate/run.js +394 -62
- package/dist/os/correctness/gate/run.js.map +1 -1
- package/dist/os/correctness/gate/runner.d.ts.map +1 -1
- package/dist/os/correctness/gate/runner.js +42 -8
- package/dist/os/correctness/gate/runner.js.map +1 -1
- package/dist/os/correctness/gate/tests/gate-fixture.d.ts +5 -1
- package/dist/os/correctness/gate/tests/gate-fixture.d.ts.map +1 -1
- package/dist/os/correctness/gate/tests/gate-fixture.js +23 -1
- package/dist/os/correctness/gate/tests/gate-fixture.js.map +1 -1
- package/dist/os/correctness/gate/types.d.ts +3 -0
- package/dist/os/correctness/gate/types.d.ts.map +1 -1
- package/dist/os/correctness/gate/types.js +1 -0
- package/dist/os/correctness/gate/types.js.map +1 -1
- package/dist/os/correctness/handlers/gate.d.ts.map +1 -1
- package/dist/os/correctness/handlers/gate.js +2 -0
- package/dist/os/correctness/handlers/gate.js.map +1 -1
- package/dist/os/correctness/handlers/validate.d.ts +30 -0
- package/dist/os/correctness/handlers/validate.d.ts.map +1 -1
- package/dist/os/correctness/handlers/validate.js +20 -7
- package/dist/os/correctness/handlers/validate.js.map +1 -1
- package/dist/os/correctness/manifest-schema.d.ts +2 -2
- package/dist/os/correctness/references.d.ts +19 -0
- package/dist/os/correctness/references.d.ts.map +1 -1
- package/dist/os/correctness/references.js +57 -22
- package/dist/os/correctness/references.js.map +1 -1
- package/dist/os/correctness/workspace.d.ts +22 -2
- package/dist/os/correctness/workspace.d.ts.map +1 -1
- package/dist/os/correctness/workspace.js +194 -18
- package/dist/os/correctness/workspace.js.map +1 -1
- package/dist/os/flow/branch-name.d.ts.map +1 -1
- package/dist/os/flow/branch-name.js +2 -4
- package/dist/os/flow/branch-name.js.map +1 -1
- package/dist/os/flow/correctness-step.d.ts.map +1 -1
- package/dist/os/flow/correctness-step.js +83 -17
- package/dist/os/flow/correctness-step.js.map +1 -1
- package/dist/os/flow/digest.d.ts +27 -10
- package/dist/os/flow/digest.d.ts.map +1 -1
- package/dist/os/flow/digest.js +530 -165
- package/dist/os/flow/digest.js.map +1 -1
- package/dist/os/flow/dup-id-scan.d.ts +23 -0
- package/dist/os/flow/dup-id-scan.d.ts.map +1 -0
- package/dist/os/flow/dup-id-scan.js +171 -0
- package/dist/os/flow/dup-id-scan.js.map +1 -0
- package/dist/os/flow/flow.module.d.ts.map +1 -1
- package/dist/os/flow/flow.module.js +132 -18
- package/dist/os/flow/flow.module.js.map +1 -1
- package/dist/os/flow/git.d.ts +77 -11
- package/dist/os/flow/git.d.ts.map +1 -1
- package/dist/os/flow/git.js +661 -84
- package/dist/os/flow/git.js.map +1 -1
- package/dist/os/flow/guard-files.d.ts.map +1 -1
- package/dist/os/flow/guard-files.js +3 -5
- package/dist/os/flow/guard-files.js.map +1 -1
- package/dist/os/flow/handlers/flow-backmerge.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-backmerge.js +2 -2
- package/dist/os/flow/handlers/flow-backmerge.js.map +1 -1
- package/dist/os/flow/handlers/flow-check.js +2 -2
- package/dist/os/flow/handlers/flow-cut.d.ts +38 -0
- package/dist/os/flow/handlers/flow-cut.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-cut.js +325 -186
- package/dist/os/flow/handlers/flow-cut.js.map +1 -1
- package/dist/os/flow/handlers/flow-digest.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-digest.js +2 -1
- package/dist/os/flow/handlers/flow-digest.js.map +1 -1
- package/dist/os/flow/handlers/flow-discard.js +6 -6
- package/dist/os/flow/handlers/flow-discard.js.map +1 -1
- package/dist/os/flow/handlers/flow-fix.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-fix.js +34 -12
- package/dist/os/flow/handlers/flow-fix.js.map +1 -1
- package/dist/os/flow/handlers/flow-hold.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-hold.js +12 -21
- package/dist/os/flow/handlers/flow-hold.js.map +1 -1
- package/dist/os/flow/handlers/flow-install.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-install.js +19 -18
- package/dist/os/flow/handlers/flow-install.js.map +1 -1
- package/dist/os/flow/handlers/flow-integrate.d.ts +50 -2
- package/dist/os/flow/handlers/flow-integrate.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-integrate.js +624 -135
- package/dist/os/flow/handlers/flow-integrate.js.map +1 -1
- package/dist/os/flow/handlers/flow-open.d.ts +11 -0
- package/dist/os/flow/handlers/flow-open.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-open.js +82 -12
- package/dist/os/flow/handlers/flow-open.js.map +1 -1
- package/dist/os/flow/handlers/flow-publication-retire.d.ts +2 -2
- package/dist/os/flow/handlers/flow-publication-retire.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-publication-retire.js +36 -16
- package/dist/os/flow/handlers/flow-publication-retire.js.map +1 -1
- package/dist/os/flow/handlers/flow-push.d.ts +12 -4
- package/dist/os/flow/handlers/flow-push.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-push.js +297 -47
- package/dist/os/flow/handlers/flow-push.js.map +1 -1
- package/dist/os/flow/handlers/flow-status.d.ts +6 -0
- package/dist/os/flow/handlers/flow-status.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-status.js +13 -10
- package/dist/os/flow/handlers/flow-status.js.map +1 -1
- package/dist/os/flow/handlers/flow-swept.d.ts +30 -0
- package/dist/os/flow/handlers/flow-swept.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-swept.js +135 -0
- package/dist/os/flow/handlers/flow-swept.js.map +1 -0
- package/dist/os/flow/handlers/flow-version.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-version.js +3 -5
- package/dist/os/flow/handlers/flow-version.js.map +1 -1
- package/dist/os/flow/index.d.ts +2 -0
- package/dist/os/flow/index.d.ts.map +1 -1
- package/dist/os/flow/index.js +7 -4
- package/dist/os/flow/index.js.map +1 -1
- package/dist/os/flow/line-version.d.ts.map +1 -1
- package/dist/os/flow/line-version.js +20 -3
- package/dist/os/flow/line-version.js.map +1 -1
- package/dist/os/flow/locks.d.ts +7 -0
- package/dist/os/flow/locks.d.ts.map +1 -1
- package/dist/os/flow/locks.js +15 -5
- package/dist/os/flow/locks.js.map +1 -1
- package/dist/os/flow/markers.d.ts +1 -1
- package/dist/os/flow/markers.d.ts.map +1 -1
- package/dist/os/flow/markers.js +14 -5
- package/dist/os/flow/markers.js.map +1 -1
- package/dist/os/flow/ops-registry.d.ts.map +1 -1
- package/dist/os/flow/ops-registry.js +19 -6
- package/dist/os/flow/ops-registry.js.map +1 -1
- package/dist/os/flow/post-rebase-regen.d.ts +30 -8
- package/dist/os/flow/post-rebase-regen.d.ts.map +1 -1
- package/dist/os/flow/post-rebase-regen.js +172 -20
- package/dist/os/flow/post-rebase-regen.js.map +1 -1
- package/dist/os/flow/pre-lock.d.ts +61 -0
- package/dist/os/flow/pre-lock.d.ts.map +1 -0
- package/dist/os/flow/pre-lock.js +265 -0
- package/dist/os/flow/pre-lock.js.map +1 -0
- package/dist/os/flow/preflight.d.ts +6 -0
- package/dist/os/flow/preflight.d.ts.map +1 -1
- package/dist/os/flow/preflight.js +85 -13
- package/dist/os/flow/preflight.js.map +1 -1
- package/dist/os/flow/primary-dirt.d.ts +63 -0
- package/dist/os/flow/primary-dirt.d.ts.map +1 -0
- package/dist/os/flow/primary-dirt.js +259 -0
- package/dist/os/flow/primary-dirt.js.map +1 -0
- package/dist/os/flow/publish.d.ts.map +1 -1
- package/dist/os/flow/publish.js +32 -10
- package/dist/os/flow/publish.js.map +1 -1
- package/dist/os/flow/registry.d.ts +12 -4
- package/dist/os/flow/registry.d.ts.map +1 -1
- package/dist/os/flow/registry.js +15 -8
- package/dist/os/flow/registry.js.map +1 -1
- package/dist/os/flow/release-level.d.ts +2 -0
- package/dist/os/flow/release-level.d.ts.map +1 -1
- package/dist/os/flow/release-level.js +23 -5
- package/dist/os/flow/release-level.js.map +1 -1
- package/dist/os/flow/release-lines.js +1 -1
- package/dist/os/flow/release-tags.d.ts +1 -1
- package/dist/os/flow/release-tags.d.ts.map +1 -1
- package/dist/os/flow/release-tags.js +43 -19
- package/dist/os/flow/release-tags.js.map +1 -1
- package/dist/os/flow/repo-kind.d.ts.map +1 -1
- package/dist/os/flow/repo-kind.js +6 -3
- package/dist/os/flow/repo-kind.js.map +1 -1
- package/dist/os/flow/scripts.d.ts.map +1 -1
- package/dist/os/flow/scripts.js +40 -7
- package/dist/os/flow/scripts.js.map +1 -1
- package/dist/os/flow/semver.js +1 -1
- package/dist/os/flow/session-checkout.js +3 -3
- package/dist/os/flow/standalone-invoke.js +2 -2
- package/dist/os/flow/tests/helpers.d.ts +28 -1
- package/dist/os/flow/tests/helpers.d.ts.map +1 -1
- package/dist/os/flow/tests/helpers.js +159 -19
- package/dist/os/flow/tests/helpers.js.map +1 -1
- package/dist/os/flow/version-files.d.ts.map +1 -1
- package/dist/os/flow/version-files.js +3 -2
- package/dist/os/flow/version-files.js.map +1 -1
- package/dist/os/flow/worktree-path.d.ts.map +1 -1
- package/dist/os/flow/worktree-path.js +1 -1
- package/dist/os/flow/worktree-path.js.map +1 -1
- package/dist/os/friction/friction.module.d.ts.map +1 -1
- package/dist/os/friction/friction.module.js +134 -30
- package/dist/os/friction/friction.module.js.map +1 -1
- package/dist/os/friction/handlers/friction-add.d.ts +13 -0
- package/dist/os/friction/handlers/friction-add.d.ts.map +1 -0
- package/dist/os/friction/handlers/friction-add.js +196 -0
- package/dist/os/friction/handlers/friction-add.js.map +1 -0
- package/dist/os/friction/handlers/friction-migrate.d.ts +23 -0
- package/dist/os/friction/handlers/friction-migrate.d.ts.map +1 -0
- package/dist/os/friction/handlers/friction-migrate.js +168 -0
- package/dist/os/friction/handlers/friction-migrate.js.map +1 -0
- package/dist/os/friction/handlers/friction-validate.d.ts.map +1 -1
- package/dist/os/friction/handlers/friction-validate.js +144 -106
- package/dist/os/friction/handlers/friction-validate.js.map +1 -1
- package/dist/os/friction/index.d.ts +2 -0
- package/dist/os/friction/index.d.ts.map +1 -1
- package/dist/os/friction/index.js +3 -1
- package/dist/os/friction/index.js.map +1 -1
- package/dist/os/friction/store.d.ts +68 -0
- package/dist/os/friction/store.d.ts.map +1 -0
- package/dist/os/friction/store.js +231 -0
- package/dist/os/friction/store.js.map +1 -0
- package/dist/os/friction/types.d.ts +1 -1
- package/dist/os/friction/types.d.ts.map +1 -1
- package/dist/os/friction/types.js +11 -13
- package/dist/os/friction/types.js.map +1 -1
- package/dist/os/gate/gate.module.d.ts.map +1 -1
- package/dist/os/gate/gate.module.js +47 -6
- package/dist/os/gate/gate.module.js.map +1 -1
- package/dist/os/gate/handlers/gate-probe-catalog.d.ts +17 -2
- package/dist/os/gate/handlers/gate-probe-catalog.d.ts.map +1 -1
- package/dist/os/gate/handlers/gate-probe-catalog.js +343 -44
- package/dist/os/gate/handlers/gate-probe-catalog.js.map +1 -1
- package/dist/os/gate/handlers/gate-probe.d.ts.map +1 -1
- package/dist/os/gate/handlers/gate-probe.js +90 -10
- package/dist/os/gate/handlers/gate-probe.js.map +1 -1
- package/dist/os/gate/handlers/liveness.d.ts +30 -0
- package/dist/os/gate/handlers/liveness.d.ts.map +1 -0
- package/dist/os/gate/handlers/liveness.js +94 -0
- package/dist/os/gate/handlers/liveness.js.map +1 -0
- package/dist/os/gate/handlers/probe-runs-journal.d.ts +44 -0
- package/dist/os/gate/handlers/probe-runs-journal.d.ts.map +1 -0
- package/dist/os/gate/handlers/probe-runs-journal.js +157 -0
- package/dist/os/gate/handlers/probe-runs-journal.js.map +1 -0
- package/dist/os/gate-run/gate-run.module.d.ts.map +1 -1
- package/dist/os/gate-run/gate-run.module.js +3 -0
- package/dist/os/gate-run/gate-run.module.js.map +1 -1
- package/dist/os/gate-run/index.d.ts.map +1 -1
- package/dist/os/gate-run/index.js +10 -0
- package/dist/os/gate-run/index.js.map +1 -1
- package/dist/os/gate-run/record.d.ts +1 -0
- package/dist/os/gate-run/record.d.ts.map +1 -1
- package/dist/os/gate-run/record.js +2 -0
- package/dist/os/gate-run/record.js.map +1 -1
- package/dist/os/gate-run/status.d.ts.map +1 -1
- package/dist/os/gate-run/status.js +4 -1
- package/dist/os/gate-run/status.js.map +1 -1
- package/dist/os/gate-run/types.d.ts +7 -0
- package/dist/os/gate-run/types.d.ts.map +1 -1
- package/dist/os/gate-run/types.js +1 -0
- package/dist/os/gate-run/types.js.map +1 -1
- package/dist/os/instructions/handlers/scar-migrate.d.ts +3 -0
- package/dist/os/instructions/handlers/scar-migrate.d.ts.map +1 -1
- package/dist/os/instructions/handlers/scar-migrate.js +23 -66
- package/dist/os/instructions/handlers/scar-migrate.js.map +1 -1
- package/dist/os/instructions/instructions.module.d.ts.map +1 -1
- package/dist/os/instructions/instructions.module.js +32 -5
- package/dist/os/instructions/instructions.module.js.map +1 -1
- package/dist/os/knowledge/handlers/knowledge-authz-probe.d.ts.map +1 -1
- package/dist/os/knowledge/handlers/knowledge-authz-probe.js +31 -10
- package/dist/os/knowledge/handlers/knowledge-authz-probe.js.map +1 -1
- package/dist/os/knowledge/handlers/knowledge-rebuild.d.ts.map +1 -1
- package/dist/os/knowledge/handlers/knowledge-rebuild.js +24 -12
- package/dist/os/knowledge/handlers/knowledge-rebuild.js.map +1 -1
- package/dist/os/knowledge/knowledge.module.d.ts.map +1 -1
- package/dist/os/knowledge/knowledge.module.js +20 -4
- package/dist/os/knowledge/knowledge.module.js.map +1 -1
- package/dist/os/mission/lockfile.d.ts.map +1 -1
- package/dist/os/mission/lockfile.js +44 -20
- package/dist/os/mission/lockfile.js.map +1 -1
- package/dist/os/naming/naming-convention.js +2 -2
- package/dist/os/naming/naming-convention.js.map +1 -1
- package/dist/os/program/discovery.d.ts +14 -5
- package/dist/os/program/discovery.d.ts.map +1 -1
- package/dist/os/program/discovery.js +64 -46
- package/dist/os/program/discovery.js.map +1 -1
- package/dist/os/program/handlers/complete.d.ts.map +1 -1
- package/dist/os/program/handlers/complete.js +28 -10
- package/dist/os/program/handlers/complete.js.map +1 -1
- package/dist/os/program/handlers/lease.js +12 -2
- package/dist/os/program/handlers/lease.js.map +1 -1
- package/dist/os/program/handlers/seal.js +3 -3
- package/dist/os/program/handlers/seal.js.map +1 -1
- package/dist/os/program/handlers/validate.js +3 -3
- package/dist/os/program/handlers/validate.js.map +1 -1
- package/dist/os/queue/handlers/queue-decision.d.ts +10 -0
- package/dist/os/queue/handlers/queue-decision.d.ts.map +1 -0
- package/dist/os/queue/handlers/queue-decision.js +177 -0
- package/dist/os/queue/handlers/queue-decision.js.map +1 -0
- package/dist/os/queue/handlers/queue-validate.d.ts.map +1 -1
- package/dist/os/queue/handlers/queue-validate.js +18 -22
- package/dist/os/queue/handlers/queue-validate.js.map +1 -1
- package/dist/os/queue/manifest.d.ts.map +1 -1
- package/dist/os/queue/manifest.js +1 -2
- package/dist/os/queue/manifest.js.map +1 -1
- package/dist/os/queue/queue.module.d.ts.map +1 -1
- package/dist/os/queue/queue.module.js +89 -4
- package/dist/os/queue/queue.module.js.map +1 -1
- package/dist/os/rfc/frontmatter-io.d.ts.map +1 -1
- package/dist/os/rfc/frontmatter-io.js +4 -3
- package/dist/os/rfc/frontmatter-io.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-origin.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-origin.js +6 -3
- package/dist/os/rfc/handlers/implement-stamp-origin.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +65 -29
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/index-graph.d.ts.map +1 -1
- package/dist/os/rfc/handlers/index-graph.js +13 -0
- package/dist/os/rfc/handlers/index-graph.js.map +1 -1
- package/dist/os/rfc/handlers/rfc-evidence-sync.d.ts.map +1 -1
- package/dist/os/rfc/handlers/rfc-evidence-sync.js +52 -10
- package/dist/os/rfc/handlers/rfc-evidence-sync.js.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts +1 -0
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +172 -50
- package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
- package/dist/os/rfc/handlers/validate.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate.js +0 -3
- package/dist/os/rfc/handlers/validate.js.map +1 -1
- package/dist/os/rfc/next-id.d.ts +7 -1
- package/dist/os/rfc/next-id.d.ts.map +1 -1
- package/dist/os/rfc/next-id.js +122 -5
- package/dist/os/rfc/next-id.js.map +1 -1
- package/dist/os/rfc/outcome-probe.d.ts.map +1 -1
- package/dist/os/rfc/outcome-probe.js +5 -2
- package/dist/os/rfc/outcome-probe.js.map +1 -1
- package/dist/os/rfc/reachable-symbol.d.ts.map +1 -1
- package/dist/os/rfc/reachable-symbol.js +61 -19
- package/dist/os/rfc/reachable-symbol.js.map +1 -1
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +26 -4
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/types.d.ts +28 -3
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +13 -3
- package/dist/os/rfc/types.js.map +1 -1
- package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
- package/dist/os/rfc/verification-evidence.js +72 -24
- package/dist/os/rfc/verification-evidence.js.map +1 -1
- package/dist/os/rfc/verification-origin.d.ts +41 -3
- package/dist/os/rfc/verification-origin.d.ts.map +1 -1
- package/dist/os/rfc/verification-origin.js +314 -50
- package/dist/os/rfc/verification-origin.js.map +1 -1
- package/dist/os/rfc/verifier/rfc-1391/support.js +1 -1
- package/dist/os/rfc/verify-workspace.d.ts.map +1 -1
- package/dist/os/rfc/verify-workspace.js +148 -48
- package/dist/os/rfc/verify-workspace.js.map +1 -1
- package/dist/os/session/handlers/metrics-rfc.d.ts.map +1 -1
- package/dist/os/session/handlers/metrics-rfc.js +42 -11
- package/dist/os/session/handlers/metrics-rfc.js.map +1 -1
- package/dist/os/session/handlers/save.d.ts.map +1 -1
- package/dist/os/session/handlers/save.js +50 -24
- package/dist/os/session/handlers/save.js.map +1 -1
- package/dist/os/session/handlers/session-audit-report.d.ts.map +1 -1
- package/dist/os/session/handlers/session-audit-report.js +21 -6
- package/dist/os/session/handlers/session-audit-report.js.map +1 -1
- package/dist/os/session/handlers/session-audit.d.ts.map +1 -1
- package/dist/os/session/handlers/session-audit.js +22 -9
- package/dist/os/session/handlers/session-audit.js.map +1 -1
- package/dist/os/session/session.module.d.ts.map +1 -1
- package/dist/os/session/session.module.js +29 -9
- package/dist/os/session/session.module.js.map +1 -1
- package/dist/os/system/handlers/system-outbox-scan.d.ts.map +1 -1
- package/dist/os/system/handlers/system-outbox-scan.js +36 -18
- package/dist/os/system/handlers/system-outbox-scan.js.map +1 -1
- package/dist/os/system/handlers/system-task-dispatch.d.ts.map +1 -1
- package/dist/os/system/handlers/system-task-dispatch.js +14 -16
- package/dist/os/system/handlers/system-task-dispatch.js.map +1 -1
- package/dist/os/system/handlers/system-versionset-record.js +3 -3
- package/dist/os/system/scenario-schemas.js +1 -1
- package/dist/os/system/system.module.d.ts.map +1 -1
- package/dist/os/system/system.module.js +14 -9
- package/dist/os/system/system.module.js.map +1 -1
- package/dist/os/system/task-schemas.d.ts +3 -3
- package/dist/os/trajectory/handlers/journal-io.d.ts.map +1 -1
- package/dist/os/trajectory/handlers/journal-io.js +2 -2
- package/dist/os/trajectory/handlers/journal-io.js.map +1 -1
- package/dist/os/trajectory/handlers/outcome-record.d.ts.map +1 -1
- package/dist/os/trajectory/handlers/outcome-record.js +49 -9
- package/dist/os/trajectory/handlers/outcome-record.js.map +1 -1
- package/dist/os/trajectory/handlers/trajectory-index.d.ts.map +1 -1
- package/dist/os/trajectory/handlers/trajectory-index.js +75 -21
- package/dist/os/trajectory/handlers/trajectory-index.js.map +1 -1
- package/dist/os/trajectory/handlers/trajectory-recall.d.ts.map +1 -1
- package/dist/os/trajectory/handlers/trajectory-recall.js +38 -10
- package/dist/os/trajectory/handlers/trajectory-recall.js.map +1 -1
- package/dist/os/trajectory/trajectory.module.d.ts.map +1 -1
- package/dist/os/trajectory/trajectory.module.js +35 -7
- package/dist/os/trajectory/trajectory.module.js.map +1 -1
- package/dist/src/adversarial/types.d.ts +44 -0
- package/dist/src/adversarial/types.d.ts.map +1 -0
- package/dist/src/adversarial/types.js +82 -0
- package/dist/src/adversarial/types.js.map +1 -0
- package/dist/src/authority/delegations.d.ts +1 -1
- package/dist/src/authority/delegations.d.ts.map +1 -1
- package/dist/src/authority/delegations.js +9 -2
- package/dist/src/authority/delegations.js.map +1 -1
- package/dist/src/command-modules.d.ts.map +1 -1
- package/dist/src/command-modules.js +2 -0
- package/dist/src/command-modules.js.map +1 -1
- package/dist/src/config/forge-config.d.ts +65 -1
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +114 -12
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/correctness/policy-bundle.d.ts +72 -0
- package/dist/src/correctness/policy-bundle.d.ts.map +1 -0
- package/dist/src/correctness/policy-bundle.js +170 -0
- package/dist/src/correctness/policy-bundle.js.map +1 -0
- package/dist/src/knowledge/paths.d.ts +21 -0
- package/dist/src/knowledge/paths.d.ts.map +1 -0
- package/dist/src/knowledge/paths.js +57 -0
- package/dist/src/knowledge/paths.js.map +1 -0
- package/dist/src/knowledge/sync.d.ts +7 -0
- package/dist/src/knowledge/sync.d.ts.map +1 -1
- package/dist/src/knowledge/sync.js +41 -13
- package/dist/src/knowledge/sync.js.map +1 -1
- package/dist/src/migration-adapters/ignored-files.d.ts +14 -0
- package/dist/src/migration-adapters/ignored-files.d.ts.map +1 -1
- package/dist/src/migration-adapters/ignored-files.js +62 -0
- package/dist/src/migration-adapters/ignored-files.js.map +1 -1
- package/dist/src/migration-adapters/index.d.ts +3 -3
- package/dist/src/migration-adapters/index.d.ts.map +1 -1
- package/dist/src/migration-adapters/index.js +2 -2
- package/dist/src/migration-adapters/index.js.map +1 -1
- package/dist/src/migration-adapters/node-typescript-pnpm/index.d.ts.map +1 -1
- package/dist/src/migration-adapters/node-typescript-pnpm/index.js +9 -7
- package/dist/src/migration-adapters/node-typescript-pnpm/index.js.map +1 -1
- package/dist/src/migration-adapters/phaser-pnpm/index.d.ts.map +1 -1
- package/dist/src/migration-adapters/phaser-pnpm/index.js +9 -7
- package/dist/src/migration-adapters/phaser-pnpm/index.js.map +1 -1
- package/dist/src/migration-adapters/types.d.ts +19 -1
- package/dist/src/migration-adapters/types.d.ts.map +1 -1
- package/dist/src/migration-adapters/types.js +19 -0
- package/dist/src/migration-adapters/types.js.map +1 -1
- package/dist/src/onboarding/init.d.ts.map +1 -1
- package/dist/src/onboarding/init.js +19 -5
- package/dist/src/onboarding/init.js.map +1 -1
- package/dist/src/onboarding/npm-token-check.d.ts.map +1 -1
- package/dist/src/onboarding/npm-token-check.js +9 -1
- package/dist/src/onboarding/npm-token-check.js.map +1 -1
- package/dist/src/onboarding/scaffold-project.d.ts.map +1 -1
- package/dist/src/onboarding/scaffold-project.js +17 -5
- package/dist/src/onboarding/scaffold-project.js.map +1 -1
- package/dist/src/onboarding/trust-boundary.d.ts +16 -0
- package/dist/src/onboarding/trust-boundary.d.ts.map +1 -0
- package/dist/src/onboarding/trust-boundary.js +806 -0
- package/dist/src/onboarding/trust-boundary.js.map +1 -0
- package/dist/src/onboarding/upgrade.d.ts +4 -0
- package/dist/src/onboarding/upgrade.d.ts.map +1 -1
- package/dist/src/onboarding/upgrade.js +120 -9
- package/dist/src/onboarding/upgrade.js.map +1 -1
- package/dist/src/types.d.ts +6 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +3 -3
- package/dist/src/utils/verifier-git.d.ts +1303 -0
- package/dist/src/utils/verifier-git.d.ts.map +1 -0
- package/dist/src/utils/verifier-git.js +7797 -0
- package/dist/src/utils/verifier-git.js.map +1 -0
- package/dist/src/validators/skill-validate.d.ts.map +1 -1
- package/dist/src/validators/skill-validate.js +17 -5
- package/dist/src/validators/skill-validate.js.map +1 -1
- package/docs/adversarial/downgrade-forge/scenario.yaml +22 -0
- package/docs/adversarial/drop-manifest-entry/scenario.yaml +25 -0
- package/docs/adversarial/edit-frozen-file/scenario.yaml +24 -0
- package/docs/adversarial/edit-policy-key/scenario.yaml +41 -0
- package/docs/adversarial/forge-review-record/scenario.yaml +34 -0
- package/docs/adversarial/grow-allow/scenario.yaml +46 -0
- package/docs/adversarial/mixed-weakening/scenario.yaml +26 -0
- package/docs/adversarial/rebind-checkrun/scenario.yaml +41 -0
- package/docs/adversarial/self-exempt/scenario.yaml +41 -0
- package/docs/adversarial/shrink-policy-decl/scenario.yaml +41 -0
- package/docs/adversarial/spoof-verifier-trailer/scenario.yaml +26 -0
- package/docs/adversarial/weaken-oracle/scenario.yaml +22 -0
- package/docs/concepts/why-forge.md +1 -1
- package/docs/evidence/release-9.6.2.md +31 -0
- package/docs/grants/devin-startups.md +25 -0
- package/docs/guides/existing-project.md +5 -5
- package/docs/integrations/devin.md +14 -0
- package/docs/maintainers/publishing.md +1 -1
- package/docs/reference/cli.md +2 -2
- package/docs/reference/correctness-gate.md +35 -5
- package/docs/reference/forge-yaml.md +17 -1
- package/docs/reference/trust-boundary.md +36 -0
- package/os/adr/handlers/implement-stamp.ts +56 -26
- package/os/adr/handlers/validate.ts +66 -28
- package/os/adversarial/adversarial.module.ts +147 -0
- package/os/adversarial/catalog.test.ts +96 -0
- package/os/adversarial/catalog.ts +79 -0
- package/os/adversarial/runner.ts +533 -0
- package/os/agent/handlers/agent-tiers-validate.ts +39 -10
- package/os/agent/index.ts +1 -1
- package/os/agent-tools/agent-tools.module.ts +84 -0
- package/os/agent-tools/generate.ts +104 -0
- package/os/agent-tools/handlers/tools-generate.ts +137 -0
- package/os/agent-tools/index.ts +23 -0
- package/os/agent-tools/manifest.ts +95 -0
- package/os/agent-tools/serve.ts +127 -0
- package/os/agent-tools/server.ts +460 -0
- package/os/agent-tools/tool-server.test.ts +226 -0
- package/os/agent-tools/tools-generate.test.ts +204 -0
- package/os/agent-tools/types.ts +139 -0
- package/os/authority/authority.module.ts +17 -2
- package/os/checks/checks.module.ts +46 -11
- package/os/checks/handlers/contribution-liveness.test.ts +142 -0
- package/os/checks/handlers/contribution-report.test.ts +46 -11
- package/os/checks/handlers/contribution-report.ts +222 -44
- package/os/checks/handlers/counters-export.test.ts +179 -8
- package/os/checks/handlers/counters-export.ts +77 -9
- package/os/checks/handlers/counters-journal.test.ts +25 -5
- package/os/checks/handlers/counters-validate.test.ts +21 -6
- package/os/checks/handlers/counters-validate.ts +4 -2
- package/os/checks/handlers/variant-candidates.test.ts +6 -2
- package/os/codebase/handlers/codebase-measure.ts +17 -20
- package/os/codebase/index.ts +4 -1
- package/os/compass/handlers/compass-audit-handler.ts +236 -38
- package/os/compass/handlers/compass-header-scaffold-handler.ts +47 -2
- package/os/compass/handlers/compass-migrate-handler.ts +46 -4
- package/os/compass/handlers/git-revision.ts +183 -63
- package/os/compass/handlers/summary-record.ts +48 -10
- package/os/context/context.module.ts +23 -4
- package/os/context/handlers/context-assemble.test.ts +5 -2
- package/os/context/handlers/context-assemble.ts +144 -28
- package/os/context/handlers/context-slate-eval.test.ts +11 -5
- package/os/context/handlers/context-slate-eval.ts +36 -10
- package/os/context/handlers/index-build.ts +179 -40
- package/os/context/handlers/no-model-deps.test.ts +8 -3
- package/os/context/handlers/slate-fill.test.ts +7 -2
- package/os/core/archive-regen.ts +178 -13
- package/os/core/core.module.ts +208 -51
- package/os/core/docs-archive.test.ts +134 -37
- package/os/core/handlers/forge-autonomy-validate.ts +104 -2
- package/os/core/handlers/package-health.ts +6 -6
- package/os/core/handlers/policy-digest.test.ts +143 -0
- package/os/core/handlers/policy-digest.ts +470 -0
- package/os/correctness/audit/snapshot.ts +46 -22
- package/os/correctness/correctness-chain.test.ts +6 -2
- package/os/correctness/correctness.module.ts +6 -3
- package/os/correctness/gate/anchor-events.test.ts +5 -1
- package/os/correctness/gate/freeze-coverage.test.ts +1 -1
- package/os/correctness/gate/freeze-diff.test.ts +1 -1
- package/os/correctness/gate/frozen.ts +691 -58
- package/os/correctness/gate/gate-mode.test.ts +5 -1
- package/os/correctness/gate/hardening.test.ts +5 -2
- package/os/correctness/gate/origin.ts +77 -37
- package/os/correctness/gate/policy-freeze-cx.test.ts +174 -0
- package/os/correctness/gate/policy-freeze-cx10.test.ts +873 -0
- package/os/correctness/gate/policy-freeze-cx11.test.ts +534 -0
- package/os/correctness/gate/policy-freeze-cx12.test.ts +488 -0
- package/os/correctness/gate/policy-freeze-cx13.test.ts +734 -0
- package/os/correctness/gate/policy-freeze-cx14.test.ts +533 -0
- package/os/correctness/gate/policy-freeze-cx15.test.ts +830 -0
- package/os/correctness/gate/policy-freeze-cx16.test.ts +652 -0
- package/os/correctness/gate/policy-freeze-cx17.test.ts +717 -0
- package/os/correctness/gate/policy-freeze-cx18.test.ts +705 -0
- package/os/correctness/gate/policy-freeze-cx19.test.ts +376 -0
- package/os/correctness/gate/policy-freeze-cx2.test.ts +691 -0
- package/os/correctness/gate/policy-freeze-cx20.test.ts +572 -0
- package/os/correctness/gate/policy-freeze-cx21.test.ts +423 -0
- package/os/correctness/gate/policy-freeze-cx22.test.ts +978 -0
- package/os/correctness/gate/policy-freeze-cx23.test.ts +431 -0
- package/os/correctness/gate/policy-freeze-cx24.test.ts +509 -0
- package/os/correctness/gate/policy-freeze-cx25.test.ts +1064 -0
- package/os/correctness/gate/policy-freeze-cx3.test.ts +569 -0
- package/os/correctness/gate/policy-freeze-cx4.test.ts +731 -0
- package/os/correctness/gate/policy-freeze-cx5.test.ts +577 -0
- package/os/correctness/gate/policy-freeze-cx6.test.ts +944 -0
- package/os/correctness/gate/policy-freeze-cx7.test.ts +622 -0
- package/os/correctness/gate/policy-freeze-cx8.test.ts +638 -0
- package/os/correctness/gate/policy-freeze-cx9.test.ts +959 -0
- package/os/correctness/gate/policy-freeze.test.ts +249 -0
- package/os/correctness/gate/repo.ts +194 -15
- package/os/correctness/gate/run.ts +444 -65
- package/os/correctness/gate/runner.ts +41 -8
- package/os/correctness/gate/tests/gate-fixture.ts +27 -2
- package/os/correctness/gate/tier-high.test.ts +5 -1
- package/os/correctness/gate/trust-boundary-cx1.test.ts +1020 -0
- package/os/correctness/gate/trust-boundary-cx10.test.ts +755 -0
- package/os/correctness/gate/trust-boundary-cx11.test.ts +515 -0
- package/os/correctness/gate/trust-boundary-cx12.test.ts +552 -0
- package/os/correctness/gate/trust-boundary-cx13.test.ts +446 -0
- package/os/correctness/gate/trust-boundary-cx14.test.ts +375 -0
- package/os/correctness/gate/trust-boundary-cx15.test.ts +421 -0
- package/os/correctness/gate/trust-boundary-cx16.test.ts +487 -0
- package/os/correctness/gate/trust-boundary-cx17.test.ts +319 -0
- package/os/correctness/gate/trust-boundary-cx18.test.ts +516 -0
- package/os/correctness/gate/trust-boundary-cx19.test.ts +514 -0
- package/os/correctness/gate/trust-boundary-cx2.test.ts +979 -0
- package/os/correctness/gate/trust-boundary-cx20.test.ts +216 -0
- package/os/correctness/gate/trust-boundary-cx22.test.ts +193 -0
- package/os/correctness/gate/trust-boundary-cx23.test.ts +283 -0
- package/os/correctness/gate/trust-boundary-cx24.test.ts +180 -0
- package/os/correctness/gate/trust-boundary-cx25.test.ts +482 -0
- package/os/correctness/gate/trust-boundary-cx26.test.ts +408 -0
- package/os/correctness/gate/trust-boundary-cx27.test.ts +983 -0
- package/os/correctness/gate/trust-boundary-cx28.test.ts +587 -0
- package/os/correctness/gate/trust-boundary-cx29a.test.ts +226 -0
- package/os/correctness/gate/trust-boundary-cx29b.test.ts +271 -0
- package/os/correctness/gate/trust-boundary-cx29c.test.ts +217 -0
- package/os/correctness/gate/trust-boundary-cx29d.test.ts +544 -0
- package/os/correctness/gate/trust-boundary-cx29e.test.ts +207 -0
- package/os/correctness/gate/trust-boundary-cx29f.test.ts +226 -0
- package/os/correctness/gate/trust-boundary-cx29g.test.ts +74 -0
- package/os/correctness/gate/trust-boundary-cx3.test.ts +929 -0
- package/os/correctness/gate/trust-boundary-cx30a.test.ts +195 -0
- package/os/correctness/gate/trust-boundary-cx30b.test.ts +296 -0
- package/os/correctness/gate/trust-boundary-cx31a.test.ts +129 -0
- package/os/correctness/gate/trust-boundary-cx31b.test.ts +333 -0
- package/os/correctness/gate/trust-boundary-cx31c.test.ts +259 -0
- package/os/correctness/gate/trust-boundary-cx31d.test.ts +132 -0
- package/os/correctness/gate/trust-boundary-cx32a.test.ts +275 -0
- package/os/correctness/gate/trust-boundary-cx32b.test.ts +509 -0
- package/os/correctness/gate/trust-boundary-cx32c.test.ts +211 -0
- package/os/correctness/gate/trust-boundary-cx32d.test.ts +184 -0
- package/os/correctness/gate/trust-boundary-cx33a.test.ts +250 -0
- package/os/correctness/gate/trust-boundary-cx33b.test.ts +287 -0
- package/os/correctness/gate/trust-boundary-cx33c.test.ts +122 -0
- package/os/correctness/gate/trust-boundary-cx33d.test.ts +357 -0
- package/os/correctness/gate/trust-boundary-cx33e.test.ts +96 -0
- package/os/correctness/gate/trust-boundary-cx34a.test.ts +283 -0
- package/os/correctness/gate/trust-boundary-cx34b.test.ts +228 -0
- package/os/correctness/gate/trust-boundary-cx34d.test.ts +282 -0
- package/os/correctness/gate/trust-boundary-cx34e.test.ts +224 -0
- package/os/correctness/gate/trust-boundary-cx34f.test.ts +250 -0
- package/os/correctness/gate/trust-boundary-cx34g.test.ts +179 -0
- package/os/correctness/gate/trust-boundary-cx34h.test.ts +293 -0
- package/os/correctness/gate/trust-boundary-cx34i.test.ts +245 -0
- package/os/correctness/gate/trust-boundary-cx35a.test.ts +181 -0
- package/os/correctness/gate/trust-boundary-cx35b.test.ts +137 -0
- package/os/correctness/gate/trust-boundary-cx35c.test.ts +149 -0
- package/os/correctness/gate/trust-boundary-cx35d.test.ts +121 -0
- package/os/correctness/gate/trust-boundary-cx35e.test.ts +108 -0
- package/os/correctness/gate/trust-boundary-cx36.test.ts +120 -0
- package/os/correctness/gate/trust-boundary-cx37.test.ts +430 -0
- package/os/correctness/gate/trust-boundary-cx38.test.ts +436 -0
- package/os/correctness/gate/trust-boundary-cx39.test.ts +432 -0
- package/os/correctness/gate/trust-boundary-cx4.test.ts +764 -0
- package/os/correctness/gate/trust-boundary-cx40.test.ts +264 -0
- package/os/correctness/gate/trust-boundary-cx41.test.ts +460 -0
- package/os/correctness/gate/trust-boundary-cx42.test.ts +432 -0
- package/os/correctness/gate/trust-boundary-cx43.test.ts +257 -0
- package/os/correctness/gate/trust-boundary-cx5.test.ts +998 -0
- package/os/correctness/gate/trust-boundary-cx6.test.ts +701 -0
- package/os/correctness/gate/trust-boundary-cx7.test.ts +1007 -0
- package/os/correctness/gate/trust-boundary-cx8.test.ts +929 -0
- package/os/correctness/gate/trust-boundary-cx9.test.ts +993 -0
- package/os/correctness/gate/types.ts +4 -0
- package/os/correctness/handlers/gate.ts +2 -0
- package/os/correctness/handlers/validate.ts +63 -12
- package/os/correctness/references.ts +63 -20
- package/os/correctness/workspace.ts +203 -22
- package/os/flow/branch-name.ts +3 -6
- package/os/flow/correctness-step.ts +91 -17
- package/os/flow/digest.ts +598 -178
- package/os/flow/dup-id-scan.ts +187 -0
- package/os/flow/flow.module.ts +138 -18
- package/os/flow/git.ts +757 -86
- package/os/flow/guard-files.ts +5 -14
- package/os/flow/handlers/flow-backmerge.ts +11 -22
- package/os/flow/handlers/flow-check.ts +2 -2
- package/os/flow/handlers/flow-cut.ts +459 -252
- package/os/flow/handlers/flow-digest.ts +2 -1
- package/os/flow/handlers/flow-discard.ts +6 -6
- package/os/flow/handlers/flow-fix.ts +104 -29
- package/os/flow/handlers/flow-hold.ts +24 -37
- package/os/flow/handlers/flow-install.ts +61 -33
- package/os/flow/handlers/flow-integrate.ts +992 -209
- package/os/flow/handlers/flow-open.ts +104 -12
- package/os/flow/handlers/flow-publication-retire.ts +38 -17
- package/os/flow/handlers/flow-push.ts +337 -73
- package/os/flow/handlers/flow-status.ts +32 -13
- package/os/flow/handlers/flow-swept.ts +185 -0
- package/os/flow/handlers/flow-version.ts +5 -18
- package/os/flow/index.ts +8 -4
- package/os/flow/line-version.ts +21 -8
- package/os/flow/locks.ts +21 -10
- package/os/flow/markers.ts +16 -5
- package/os/flow/ops-registry.ts +25 -7
- package/os/flow/post-rebase-regen.ts +218 -25
- package/os/flow/pre-lock.ts +334 -0
- package/os/flow/preflight.ts +108 -17
- package/os/flow/primary-dirt.ts +319 -0
- package/os/flow/publish.ts +35 -17
- package/os/flow/registry.ts +23 -13
- package/os/flow/release-level.ts +25 -12
- package/os/flow/release-lines.ts +4 -5
- package/os/flow/release-tags.ts +47 -19
- package/os/flow/repo-kind.ts +6 -3
- package/os/flow/scripts.ts +40 -7
- package/os/flow/semver.ts +1 -1
- package/os/flow/session-checkout.ts +3 -3
- package/os/flow/standalone-invoke.ts +2 -2
- package/os/flow/tests/branch-name.test.ts +15 -7
- package/os/flow/tests/flow-backmerge.test.ts +8 -6
- package/os/flow/tests/flow-check.test.ts +6 -11
- package/os/flow/tests/flow-cut-prepare.test.ts +64 -15
- package/os/flow/tests/flow-cut.rerun.test.ts +1 -1
- package/os/flow/tests/flow-cut.test.ts +230 -11
- package/os/flow/tests/flow-detachable.test.ts +10 -2
- package/os/flow/tests/flow-digest.test.ts +109 -29
- package/os/flow/tests/flow-fix.test.ts +96 -20
- package/os/flow/tests/flow-guard-parity.test.ts +55 -53
- package/os/flow/tests/flow-guard-push.test.ts +39 -2
- package/os/flow/tests/flow-guard.test.ts +5 -10
- package/os/flow/tests/flow-hold.test.ts +43 -10
- package/os/flow/tests/flow-install-markers.test.ts +47 -20
- package/os/flow/tests/flow-install.rerun.test.ts +18 -9
- package/os/flow/tests/flow-install.test.ts +19 -19
- package/os/flow/tests/flow-integrate-correctness-gate.test.ts +3 -4
- package/os/flow/tests/flow-integrate-prelock.test.ts +392 -0
- package/os/flow/tests/flow-integrate.gate-report.test.ts +2 -4
- package/os/flow/tests/flow-integrate.post-rebase-regen.test.ts +33 -0
- package/os/flow/tests/flow-integrate.preflight.test.ts +36 -1
- package/os/flow/tests/flow-integrate.test.ts +375 -21
- package/os/flow/tests/flow-open.test.ts +123 -9
- package/os/flow/tests/flow-publication-retire.test.ts +13 -6
- package/os/flow/tests/flow-push-publish.test.ts +45 -19
- package/os/flow/tests/flow-push-supersede.test.ts +37 -34
- package/os/flow/tests/flow-push-verifier-review.test.ts +190 -0
- package/os/flow/tests/flow-push.test.ts +15 -7
- package/os/flow/tests/flow-status.test.ts +54 -1
- package/os/flow/tests/flow-swept.test.ts +105 -0
- package/os/flow/tests/flow-task-files.test.ts +18 -4
- package/os/flow/tests/helpers.test.ts +91 -0
- package/os/flow/tests/helpers.ts +188 -19
- package/os/flow/tests/locks.test.ts +5 -4
- package/os/flow/tests/post-rebase-regen.test.ts +315 -0
- package/os/flow/tests/scripts.test.ts +8 -4
- package/os/flow/tests/state-roots.test.ts +8 -11
- package/os/flow/version-files.ts +4 -2
- package/os/flow/worktree-path.ts +3 -9
- package/os/friction/friction-add.test.ts +141 -0
- package/os/friction/friction-migrate.test.ts +138 -0
- package/os/friction/friction-store.test.ts +184 -0
- package/os/friction/friction-validate.test.ts +133 -21
- package/os/friction/friction.module.ts +140 -30
- package/os/friction/handlers/friction-add.ts +268 -0
- package/os/friction/handlers/friction-migrate.ts +206 -0
- package/os/friction/handlers/friction-validate.ts +238 -176
- package/os/friction/index.ts +14 -1
- package/os/friction/qa-log-shards.test.ts +111 -0
- package/os/friction/store.ts +284 -0
- package/os/friction/types.ts +11 -13
- package/os/gate/gate.module.ts +47 -6
- package/os/gate/handlers/gate-probe-catalog.test.ts +1 -1
- package/os/gate/handlers/gate-probe-catalog.ts +413 -42
- package/os/gate/handlers/gate-probe-ratchet.test.ts +329 -0
- package/os/gate/handlers/gate-probe.test.ts +27 -5
- package/os/gate/handlers/gate-probe.ts +110 -12
- package/os/gate/handlers/liveness.ts +113 -0
- package/os/gate/handlers/probe-runs-journal.ts +167 -0
- package/os/gate-run/gate-run.module.ts +3 -0
- package/os/gate-run/index.ts +11 -0
- package/os/gate-run/record.ts +8 -1
- package/os/gate-run/status.ts +9 -1
- package/os/gate-run/tests/gate-run-record.test.ts +11 -1
- package/os/gate-run/tests/gate-run-status.test.ts +2 -0
- package/os/gate-run/types.ts +8 -0
- package/os/instructions/budget.test.ts +32 -7
- package/os/instructions/handlers/scar-migrate.ts +55 -66
- package/os/instructions/instructions.module.ts +32 -5
- package/os/knowledge/handlers/knowledge-authz-probe.ts +38 -12
- package/os/knowledge/handlers/knowledge-rebuild.test.ts +5 -2
- package/os/knowledge/handlers/knowledge-rebuild.ts +39 -16
- package/os/knowledge/knowledge.module.ts +21 -4
- package/os/mission/handlers/archive.test.ts +47 -30
- package/os/mission/lockfile.ts +47 -20
- package/os/naming/naming-convention.test.ts +1 -0
- package/os/naming/naming-convention.ts +2 -2
- package/os/program/discovery.ts +70 -44
- package/os/program/handlers/complete.ts +28 -10
- package/os/program/handlers/lease.ts +11 -2
- package/os/program/handlers/seal.ts +3 -3
- package/os/program/handlers/validate.ts +3 -3
- package/os/queue/handlers/queue-decision.ts +253 -0
- package/os/queue/handlers/queue-validate.ts +24 -23
- package/os/queue/manifest.ts +1 -2
- package/os/queue/queue-decision.test.ts +262 -0
- package/os/queue/queue.module.ts +93 -4
- package/os/rfc/frontmatter-io.ts +6 -3
- package/os/rfc/handlers/implement-stamp-origin.ts +6 -3
- package/os/rfc/handlers/implement-stamp.ts +65 -46
- package/os/rfc/handlers/index-graph.ts +14 -0
- package/os/rfc/handlers/rfc-evidence-sync.ts +62 -22
- package/os/rfc/handlers/validate-moves.test.ts +221 -0
- package/os/rfc/handlers/validate-probe-meta.test.ts +21 -1
- package/os/rfc/handlers/validate-rules.ts +216 -60
- package/os/rfc/handlers/validate.ts +1 -5
- package/os/rfc/next-id.ts +155 -21
- package/os/rfc/outcome-probe.ts +13 -4
- package/os/rfc/reachable-symbol.ts +65 -43
- package/os/rfc/rfc-0000-template.md +10 -0
- package/os/rfc/rfc.module.ts +26 -4
- package/os/rfc/types.ts +31 -3
- package/os/rfc/verification-evidence.ts +74 -25
- package/os/rfc/verification-origin.ts +358 -62
- package/os/rfc/verifier/rfc-1333/imp12-binding.acceptance.test.ts +1 -1
- package/os/rfc/verifier/rfc-1333/imp12-gate.acceptance.test.ts +1 -1
- package/os/rfc/verifier/rfc-1333/skills-and-types.acceptance.test.ts +1 -1
- package/os/rfc/verifier/rfc-1333/verify-workspace.acceptance.test.ts +1 -1
- package/os/rfc/verifier/rfc-1391/fixtures/no-report.proof.test.ts +1 -1
- package/os/rfc/verifier/rfc-1391/fixtures/small-domain.proof.test.ts +1 -1
- package/os/rfc/verifier/rfc-1391/support.ts +1 -1
- package/os/rfc/verify-workspace.ts +147 -53
- package/os/session/handlers/metrics-rfc.ts +42 -11
- package/os/session/handlers/save.ts +52 -28
- package/os/session/handlers/session-audit-detectors.test.ts +16 -6
- package/os/session/handlers/session-audit-report.test.ts +9 -3
- package/os/session/handlers/session-audit-report.ts +34 -8
- package/os/session/handlers/session-audit.test.ts +25 -7
- package/os/session/handlers/session-audit.ts +49 -23
- package/os/session/session.module.ts +31 -9
- package/os/system/handlers/system-outbox-scan.ts +45 -17
- package/os/system/handlers/system-task-dispatch.ts +17 -21
- package/os/system/handlers/system-versionset-record.ts +3 -3
- package/os/system/scenario-schemas.ts +1 -1
- package/os/system/system.module.ts +14 -9
- package/os/system/tests/scenario-pin-drift-check.test.ts +2 -0
- package/os/system/tests/scenario-validator-check.test.ts +2 -0
- package/os/system/tests/system-task-collect.test.ts +25 -15
- package/os/system/tests/system-task-dispatch.test.ts +18 -7
- package/os/system/tests/system-task-status.test.ts +7 -1
- package/os/system/tests/system-task.test.ts +15 -4
- package/os/system/tests/version-set-v2.test.ts +2 -0
- package/os/trajectory/handlers/extract-units.test.ts +11 -6
- package/os/trajectory/handlers/journal-io.ts +21 -7
- package/os/trajectory/handlers/outcome-record.test.ts +28 -8
- package/os/trajectory/handlers/outcome-record.ts +65 -18
- package/os/trajectory/handlers/producer-trust.test.ts +22 -8
- package/os/trajectory/handlers/trajectory-index.test.ts +75 -29
- package/os/trajectory/handlers/trajectory-index.ts +116 -38
- package/os/trajectory/handlers/trajectory-recall.test.ts +67 -19
- package/os/trajectory/handlers/trajectory-recall.ts +115 -41
- package/os/trajectory/handlers/trajectory.test.ts +19 -7
- package/os/trajectory/handlers/verdict-binding.test.ts +138 -33
- package/os/trajectory/trajectory.module.ts +35 -7
- package/os/yaml/scalars.test.ts +1 -1
- package/package.json +32 -2
- package/profiles/godot-game.yaml +4 -4
- package/skills/_shared/fo-pipeline-conventions.md +15 -13
- package/skills/fo/fo-handoff/SKILL.md +10 -2
- package/skills/fo/fo-idea-audit/SKILL.md +4 -0
- package/skills/fo/fo-idea-create-rfc/SKILL.md +21 -10
- package/skills/fo/fo-idea-implement/SKILL.md +2 -10
- package/skills/fo/fo-idea-plan/SKILL.md +7 -5
- package/skills/fo/fo-knowledge-distill/SKILL.md +15 -4
- package/skills/fo/fo-memory-sync/SKILL.md +7 -6
- package/skills/fo/fo-reproduce/SKILL.md +2 -1
- package/skills/fo/fo-session-retro/SKILL.md +87 -44
- package/skills/fo/fo-session-save/SKILL.md +4 -3
- package/skills/fo/fo-system-dispatch/SKILL.md +9 -0
- package/skills/meta/forge-bootstrap/SKILL.md +18 -12
- package/skills/shared/grilling/SKILL.md +17 -9
- package/skills/shared/knowledge/learned-principles.md +1 -1
- package/skills/shared/writing-great-skills/SKILL.md +4 -3
- package/src/adversarial/types.ts +100 -0
- package/src/authority/delegations.ts +9 -2
- package/src/command-modules.ts +6 -0
- package/src/config/forge-config.ts +146 -13
- package/src/correctness/policy-bundle.ts +187 -0
- package/src/knowledge/paths.ts +75 -0
- package/src/knowledge/sync.ts +42 -18
- package/src/migration-adapters/ignored-files.ts +64 -0
- package/src/migration-adapters/index.ts +19 -3
- package/src/migration-adapters/node-typescript-pnpm/index.ts +21 -5
- package/src/migration-adapters/phaser-pnpm/index.ts +21 -5
- package/src/migration-adapters/types.ts +36 -1
- package/src/onboarding/init.ts +20 -5
- package/src/onboarding/npm-token-check.ts +9 -1
- package/src/onboarding/scaffold-project.ts +16 -5
- package/src/onboarding/trust-boundary.test.ts +179 -0
- package/src/onboarding/trust-boundary.ts +825 -0
- package/src/onboarding/upgrade.ts +149 -9
- package/src/scaffold/github/CODEOWNERS.template +14 -0
- package/src/scaffold/github/forge-policy.template.yml +40 -0
- package/src/tests/bindings-schema.test.ts +5 -1
- package/src/tests/create.test.ts +74 -20
- package/src/tests/forge-config.test.ts +5 -2
- package/src/tests/knowledge-paths.test.ts +80 -0
- package/src/tests/migration-adapters.test.ts +73 -5
- package/src/tests/skill-validate.test.ts +76 -0
- package/src/types.ts +10 -5
- package/src/utils/verifier-git.ts +8684 -0
- package/src/validators/skill-validate.ts +17 -5
- /package/skills/fo/fo-memory-sync/{qa-log.md → qa-log/legacy.md} +0 -0
- /package/skills/fo/fo-session-save/{qa-log.md → qa-log/legacy.md} +0 -0
- /package/skills/shared/grilling/{qa-log.md → qa-log/legacy.md} +0 -0
package/docs/reference/cli.md
CHANGED
|
@@ -282,6 +282,6 @@ forge note.orphan.detect
|
|
|
282
282
|
|
|
283
283
|
## Registered command surface
|
|
284
284
|
|
|
285
|
-
Canonical registry names (
|
|
285
|
+
Canonical registry names not covered in the usage sections above (the live list is generated from the command registry — run `forge --help` for what your installed build exposes):
|
|
286
286
|
|
|
287
|
-
`audit.archive`, `file.size.lint`, `flow.publication.retire`, `flow.status`, `flow.version`, `forge.assets.check`, `forge.assets.list`, `forge.build`, `forge.conformance.run`, `forge.conformance.validate`, `forge.create`, `forge.determinism.check`, `forge.dev`, `forge.doctor`, `forge.port.scaffold`, `forge.port.validate`, `forge.profile.validate`, `forge.public-surface.validate`, `forge.release.prepare`, `forge.release.publish`, `forge.scaffold`, `forge.skill.doc-sync`, `forge.skill.knowledge.compact`, `forge.skill.list`, `forge.skill.validate`, `forge.validate`, `memory.compact`, `mission.archive`, `outbox.validate`, `plan.archive`, `spec.live.rebuild`, `system.map.validate`, `system.outbox.scan`, `system.task.collect`, `system.task.create`, `system.task.dispatch`, `system.task.move`, `system.task.status`, `system.versionset.record`.
|
|
287
|
+
`audit.archive`, `file.size.lint`, `flow.publication.retire`, `flow.status`, `flow.version`, `forge.assets.check`, `forge.assets.list`, `forge.build`, `forge.conformance.run`, `forge.conformance.validate`, `forge.create`, `forge.determinism.check`, `forge.dev`, `forge.doctor`, `forge.port.scaffold`, `forge.port.validate`, `forge.profile.validate`, `forge.public-surface.validate`, `forge.release.prepare`, `forge.release.publish`, `forge.scaffold`, `forge.skill.doc-sync`, `forge.skill.knowledge.compact`, `forge.skill.list`, `forge.skill.validate`, `forge.validate`, `gate.run.status`, `memory.compact`, `mission.archive`, `outbox.validate`, `plan.archive`, `spec.live.rebuild`, `system.map.validate`, `system.outbox.scan`, `system.task.collect`, `system.task.create`, `system.task.dispatch`, `system.task.move`, `system.task.status`, `system.versionset.record`.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
pnpm exec forge correctness.gate --base <sha> [--json]
|
|
7
|
+
pnpm exec forge correctness.gate --base <sha> --policy-only # CI: policy surface only
|
|
7
8
|
pnpm exec forge flow.integrate # spawns the primary install's correctness.gate
|
|
8
9
|
pnpm exec forge flow.integrate --accept-weakening "<reason>" # operator decision only
|
|
9
10
|
pnpm exec forge rfc.verify.workspace --manifest --candidate <sha>
|
|
@@ -16,16 +17,45 @@ pnpm exec forge rfc.verify.workspace --manifest --candidate <sha>
|
|
|
16
17
|
- the manifest at the base value of `bindings.paths.correctnessManifest` (repointing the binding is a weakening);
|
|
17
18
|
- `bindings.commands.checkRun`, `bindings.paths.correctnessManifest`, `bindings.paths.oracleReviewsDir`;
|
|
18
19
|
- `forge.yaml` `correctness.*` — `mode` (leaving `enforce`, or switching to `exempt`), `tier` (lowering), `audit.allow[]` (adding);
|
|
19
|
-
- every oracle check file of a base entry, every capture and its `.capture.yaml` sidecar, every file the base `support` globs match;
|
|
20
|
-
- the
|
|
20
|
+
- every oracle check file of a base entry, every capture and its `.capture.yaml` sidecar, every file the base `support` globs match — a `!`-prefixed `support` glob is a picomatch negation that would silently freeze the _complement_; the manifest refuses as `CORR-GATE-01` (same rule as `policy.freezeFiles` negations);
|
|
21
|
+
- the git mode of every frozen file — a blob-equal `100755`→`100644` flip (`git update-index --chmod`, `chmod` + commit) is a weakening, not invisible bookkeeping;
|
|
22
|
+
- the statements of the `@ai-invariant[…]` anchors base entries bind (RFC-1390 normalized-statement hash);
|
|
23
|
+
- **the declared policy surface (RFC-1615)** — when forge.yaml at `--base` carries a `policy:` section, the gate additionally freezes: every file matching `policy.freezeFiles` globs, every top-level forge.yaml key not listed in `policy.mutable`, and the `policy:` section itself.
|
|
24
|
+
|
|
25
|
+
## Declared policy surface (`policy:`, RFC-1615)
|
|
26
|
+
|
|
27
|
+
The `policy:` section declares which parts of forge.yaml and which repo files a session may change — everything else is judged against its state at `--base`:
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
policy:
|
|
31
|
+
mutable: [project, forge, moves] # top-level keys a session may change freely
|
|
32
|
+
additive: [bindings, paths, loopMetrics] # may gain new leaves; existing leaves are frozen
|
|
33
|
+
freezeFiles: # repo-root globs — byte-frozen at --base
|
|
34
|
+
- "hooks/**"
|
|
35
|
+
- ".github/workflows/**"
|
|
36
|
+
- ".forge/pinned.yaml"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- `mutable` — any change to the listed top-level keys is permitted.
|
|
40
|
+
- `additive` — new leaves under the listed keys are permitted; changing or removing an existing leaf is a `policy-key` weakening. The RFC-1580 frozen bindings (`checkRun`, `correctnessManifest`, `oracleReviewsDir`) keep their dedicated rules even when `bindings` is listed — frozen wins over `additive`, and the dedicated `binding`/`correctness-key` checks also win over a hand-tuned `mutable` declaration (they judge the contour's own substrate, not a permission policy). Under `--policy-only` a `mutable: [bindings]` declaration does release the binding check — the dedicated rules belong to the full gate contour.
|
|
41
|
+
- Everything not listed is frozen: `agentTools.deny`, `guardRules`, `correctness.*`, `instructions.budget`, and every key not yet invented. A new top-level key outside `mutable`/`additive` is a `policy-key` weakening.
|
|
42
|
+
- `policy:` is **self-frozen** — amending it in-session is a `policy-decl` weakening; a session cannot expand its own permissions.
|
|
43
|
+
- `freezeFiles` matches are byte-frozen like oracle files: change, delete, or a _new_ file matching the glob is a `policy-file` weakening unless the last commit touching it carries the verifier trailer pair. A `!`-prefixed glob is a picomatch negation — it would freeze the complement, so the declaration is malformed. A glob matching `forge.yaml` itself (`forge.yaml`, `*.yaml`, `x/../forge.yaml`) never byte-freezes it — its surface is judged by the policy key diff and the isolation strip, or `mutable` would be voided and the accept path bypassed.
|
|
44
|
+
- No `policy:` at `--base` → the policy checks are inert (adoption is opt-in). A malformed declaration parses to empty lists — deny-by-default, never fail-open; a `policy:` that is present but not a `{mutable?, additive?, freezeFiles?}` string-list map (including the bare `policy:` null form and non-string members) refuses as `CORR-GATE-01`.
|
|
45
|
+
- `forge init` scaffolds the block; `forge upgrade` adds it when absent **and heals a declared-but-malformed one** — a well-formed, operator-tuned `policy:` is never rewritten.
|
|
46
|
+
- The policy diff judges forge.yaml **at the HEAD commit**, never the worktree — an uncommitted edit neither masks a committed weakening nor fabricates one. A forge.yaml that exists but does not parse to a YAML map (scalar/array/unreadable, at `--base` or HEAD) is `CORR-GATE-01`, never a "no policy declared" pass — and "a YAML map" means a _plain_ map: `!!set`/`!!omap`/`!!timestamp`/`!!binary` roots parse to Set/Map/Date/Buffer objects that carry no readable keys, so they refuse too (the same plain-map rule applies to the `policy:` value itself).
|
|
47
|
+
|
|
48
|
+
`--policy-only` runs just the policy judgements (`policy-key`/`policy-decl`/`policy-file`) — the cheap mode CI runs on every forge.yaml or frozen-file diff without loading the manifest or running oracles. Weakening kinds land in the same `CORR-GATE-02` verdict and the same isolated `--accept-weakening` path (forge.yaml counts as a frozen-set path when its diff is confined to frozen correctness/policy keys).
|
|
21
49
|
|
|
22
50
|
## Pipeline
|
|
23
51
|
|
|
24
|
-
1. **Validate** the manifest at HEAD (`correctness.manifest.validate`); any error → `CORR-GATE-01`. `mode: exempt` ends the gate only when the base was exempt too.
|
|
25
|
-
2. **Weakening diff** (`CORR-GATE-02`, refuses in `warn` mode too): a base entry deleted or its `ref`/`seam`/`anchors` changed; an oracle removed, rebound, or its substrate lowered; an `unverifiable` exemption added, or a `deferred` one for a `ref` that existed at base; an allow entry added; a frozen binding or mode/tier weakened; **any byte change** of a frozen oracle, capture, sidecar, or support file unless the last commit touching it carries the verifier trailer pair; a frozen anchor removed or reworded.
|
|
52
|
+
1. **Validate** the manifest at HEAD (`correctness.manifest.validate`); any error → `CORR-GATE-01`. `mode: exempt` ends the gate only when the base was exempt too **and neither side declares `policy:`** — a declared policy is a separate opt-in, so an exempt×exempt contour still judges the policy surface (`policy-key`/`policy-decl`/`policy-file` weakenings, no oracle runs). Every verdict input — both contour legs, the `mode`/`tier` that shape severities and tier requirements, the manifest-validation violations, `oracleTimeoutMs` — is read **from commits** (`frozen.base` × the HEAD commit's `forge.yaml`), never the worktree: an uncommitted `mode:`/`tier:`/timeout flip can neither mask a committed weakening nor fabricate a failure, and a HEAD-adopted malformed `policy:` refuses `CORR-GATE-01` on every contour. The bundle's `mode`/`tier` fields record this committed flavor.
|
|
53
|
+
2. **Weakening diff** (`CORR-GATE-02`, refuses in `warn` mode too): a base entry deleted or its `ref`/`seam`/`anchors` changed; an oracle removed, rebound, or its substrate lowered; an `unverifiable` exemption added, or a `deferred` one for a `ref` that existed at base; an allow entry added; a frozen binding or mode/tier weakened; **any byte change** of a frozen oracle, capture, sidecar, or support file unless the last commit touching it carries the verifier trailer pair; a frozen anchor removed (every base carrier touched and no verbatim copy left anywhere — a partial drop from a multi-carrier id is not a removal) or reworded (a changed copy whose statement sha is none of the shas the id carried at base — divergent base copies are each frozen by their own sha) — every weakening input judges **commits**, including anchor statements and git modes (a committed reword masked by an uncommitted revert still reports; an uncommitted reword on a clean diff never fabricates). A HEAD `forge.yaml` that parses to a YAML map but fails the forge config schema reports `CORR-GATE-01` exactly as an unreadable one does, and adopting `policy:` in an accepted-weakening session never counts as a foreign path.
|
|
54
|
+
- **Git-read failures fail closed**: a failed `ls-tree`/`diff`/`grep`/`status` (corrupt object, spawn failure, timeout) is never an empty result — every failed listing read is recorded and refused as `CORR-GATE-01`, because mapping it to `[]` would silently empty the frozen set or launder foreign files through `--accept-weakening`. Content reads keep the same split: `git show rev:path` distinguishes **absent** (the tree entry does not resolve — a legitimate miss) from **unreadable** (the entry resolves but the blob cannot be shown — a corrupt object, flagged), so a corrupt committed `forge.yaml`/manifest/support blob fails closed instead of reading as "file gone" and inerting the surface it carries. Verdict exit codes are not failures: `git grep` exit 1 is a legitimate zero-match listing and `merge-base --is-ancestor` exit 1 is the not-an-ancestor verdict — only other codes flag. The changed-paths diff runs `--no-renames` so a `git mv`d anchor carrier keeps its old path visible to `anchor-removed`, and path listings validate UTF-8 **at byte level** — a genuinely invalid byte sequence can never round-trip through `:(literal)` argv pathspecs and flags, while a legal U+FFFD codepoint in a filename decodes fine and does not. History reads keep the split too: a failed `git log` is not "path never touched" — the flag carries the refusal, exemption callers treat it as verifier (no fabricated `frozen-file` claim) while the origin derivation promotes only on a proven `yes`, and `resolveImplementationRange` reports its own `git log`/`rev-parse` failures instead of degrading to `self` silently. `repo.blob()` is a blob-only read — a directory or gitlink at the path is not a file (a dir→file flip is an addition, never a fabricated byte edit), and an anchor-source file that cannot be shown suppresses `anchor-removed` rather than claiming a removal the unreadable copy might disprove. The same discipline covers the remaining read surfaces: an incomplete base `ls-tree` makes glob additions re-check membership per path instead of fabricating "new file" claims, and a failed `git ls-files` workspace listing (whose fs fallback would include ignored files) refuses like any other unreadable read. Frozen declarations are judged in both directions — adding `bindings.commands.checkRun`, `paths.oracleReviewsDir`, or `paths.rfcsDir` under a declared contour is a binding weakening, and any `bindings.paths.compassDocs` change redirects requirement resolution and is judged the same way. The RFC namespace is the top-level `paths.rfcsDir` key (the loader strips `bindings.paths.rfcsDir` — judging it would be a dead check), and CORR-03 resolves every governing reference — RFC acceptance criteria, requirements, DNA ids — at the integration base through git, so a session cannot mint its own provenance by planting or editing files at HEAD. A `requirement` oracle origin demands governed provenance on the acceptance-transition commit (`X-RFC: <id>` or the verifier trailer pair) — `status: accepted` text alone mints nothing. A malformed `policy:` resolves its glob surface to nothing, so a `!`-negated `freezeFiles` can neither fabricate policy-file claims nor whitelist foreign paths in the accept check. Failures recorded after the early emit — oracle origin derivation, review-record listings, `commonDir` — are re-judged at bundle write: the violation is surfaced, the status flips to fail (an exempt×exempt contour cannot end clean on a corrupt base), and the bundle carries `unreadableReads` as evidence. Judgement degrades, not disappears: the name-only diff skips identical subtrees, so glob-frozen edits, mode flips (path-scoped `ls-tree`), additions, and anchor changes on touched paths are still reported even when full-tree enumeration fails; `--accept-weakening` on an unproven diff refuses as `mixed-weakening`.
|
|
55
|
+
- **Governing references resolve at the base but are not frozen files** (RFC-1615 review O-5/O-6): `rfc-ac`/`fixed-input` refs, `compassDocs` documents, and the DNA invariants file judge their base-committed content, so a session cannot mint `requirement` provenance by planting or rewriting them at HEAD. Deleting a governing doc at HEAD passes the weakening diff by declared design — the base copy still resolves, and a corrupt base copy blinds that anchor grep but refuses through the read ledger. The judged binding keys — `paths.rfcsDir`, `bindings.paths.compassDocs`, `bindings.paths.invariantsFile`, alongside the RFC-1580 set — are also inside the accept-isolation strip, so an isolated binding rebind can be operator-accepted exactly like a `checkRun`/`correctnessManifest`/`oracleReviewsDir` rebind (O-7); containers left empty by the strip are pruned, so adding or removing a whole `paths:`/`bindings:` parent around only frozen subkeys still compares isolated (CX-112). The base-side RFC resolver mirrors `findRfcFile` scope exactly — files directly under `paths.rfcsDir` or inside its `archive/` subtree, `.` meaning the repo root, a root-level file preferred over an `archive/` duplicate (CX-113/CX-114), and a binding normalizing to the repo root (`""`/`"."`/`"./"`) substitutes `.` as the `ls-tree` pathspec so the empty pathspec cannot fatal-flag the ledger while blinding ref resolution (CX-115). Archive ordering mirrors `findRfcFile` traversal exactly — files before dirs at each level, files lexical, sibling dirs reverse-lexical (CX-116) — and path bindings compare resolution-equivalent spellings via `path.posix.normalize` — `./`-respells, `//`, `..`, and trailing slashes name the same target (CX-118) while backslashes and whitespace stay literal POSIX filename content that resolves a different file and must still report the rebind (CX-120/CX-122); `checkRun` is a whitespace-tokenized command template, not a path — it compares argv-collapsed only; POSIX normalization must never see it (`./x` vs `x` spawn different executables: PATH vs the session worktree). The oracle runner itself must resolve via PATH — an `argv[0]` carrying a path separator is refused as a spawn failure before launch (CX-126), so a repo-committed binary can never run as the oracle. The flow-side adoption check (`baseAdoptedGate` — whether a pre-gate primary may degrade an `Unknown command` answer to a warning) judges the base forge.yaml through the real YAML loader, not line regexes (quoted keys, flow mappings, and space-before-colon spellings all count — CX-130), and distinguishes absent from unreadable: a failed `git`/`ls-tree`/`show` of the base file is a refusal, never "not adopted" (CX-131). Adoption means _any judged contour element_: a non-plain-map root (tagged `!!set`/`!!omap`/`!!timestamp`/`!!binary` documents are unreadable to `sideFrom` → armed — CX-132), a declared `policy:` section even without a manifest (the RFC-1615 freeze is armed standalone — CX-133), or any bound frozen binding (`checkRun`, `oracleReviewsDir`, `invariantsFile`, `compassDocs`, `rfcsDir` — each arms a CORR-GATE-02 row — CX-134). Canonicalization and leaf maps mark reference cycles with a private sentinel no YAML value can equal — a literal `"<cycle>"`/`"cycle"` string can never collide with a true alias cycle (CX-128). `execFile`/`spawn` failures from attacker-controlled bytes (e.g. NUL in a binding) degrade to unreadable-read refusals, never an unhandled gate crash (CX-129). History queries carry `:(literal)` pathspecs so glob-metachar filenames cannot borrow a sibling's acceptance range (CX-117), and only plain objects prune in the isolation strip — tagged `!!set`/`!!omap`/`!!timestamp` containers stay foreign (CX-119).
|
|
26
56
|
3. **Origin** of each oracle, from git only: `verified` (verifier trailer pair on the last commit touching the check file, or a committed `forge/oracle-review@1` record naming the check with its current sha256 and `verdict: pass`), `requirement` (`rfc-ac`/`fixed-input` entry whose check file is byte-identical to its state at the governing RFC's `accepted` commit), `self` otherwise. A `self` oracle never covers (`CORR-GATE-03`).
|
|
27
57
|
4. **Tier** — `high`: only verifier-trailer oracles cover; `formal`: each entry also needs a `proof:` oracle whose `proof.check` verdict is `proved` (`CORR-GATE-06`).
|
|
28
|
-
5. **Run** each non-self oracle through the frozen `checkRun` (argv form, `{file}` is one argument), with `FORGE_CORRECTNESS_DIR=<fresh run dir>/<entry>/o<N>` and a per-oracle timeout (`correctness.oracleTimeoutMs`, default 300000). Non-zero exit, spawn failure, or timeout → `CORR-GATE-07`.
|
|
58
|
+
5. **Run** each non-self oracle through the frozen `checkRun` (argv form, `{file}` is one argument), with `FORGE_CORRECTNESS_DIR=<fresh run dir>/<entry>/o<N>` and a per-oracle timeout (`correctness.oracleTimeoutMs`, default 300000; a non-finite value such as `.inf`, one above `2^31 − 1`, or a sub-millisecond value falls back to the default — `Infinity` and int32 overflow fire the timer at ~1 ms). Non-zero exit, spawn failure, or timeout → `CORR-GATE-07`.
|
|
29
59
|
6. **Substrate attestation** — an L1/L2 oracle covers only when its run left an attestation whose level matches and whose normalized schema hash equals the hash of the repository's D1 migrations; otherwise `CORR-GATE-04` and it counts as L0. A declared L3 needs every declared capture loaded through `loadCapture` (provider seams) or a matching attestation (data/lifecycle seams, where it counts at the attested level).
|
|
30
60
|
7. **Anchor events** — a lifecycle entry's L2 run must leave, for each anchor, a `forge.anchor` event verified against the attested handle; a failed, missing, or foreign-handle event → `CORR-GATE-05`.
|
|
31
61
|
8. **Coverage** — each entry needs ≥ 1 oracle that is non-self, passing, attested at or above the seam minimum, and (lifecycle) anchor-verified; else `CORR-GATE-08`.
|
|
@@ -26,7 +26,7 @@ skillPacks:
|
|
|
26
26
|
- prefix: wg
|
|
27
27
|
dir: packages/my-skills/skills
|
|
28
28
|
plugins: []
|
|
29
|
-
syncedVersion:
|
|
29
|
+
syncedVersion: "9.6.2" # written by forge upgrade — tracks the synced Forge version
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## project
|
|
@@ -180,6 +180,22 @@ correctness:
|
|
|
180
180
|
|
|
181
181
|
`exempt` declares a repository without a product runtime (the verbund hub): the manifest rules do not apply, and a manifest binding beside it is a CORR-02 error. See [correctness-manifest.md](correctness-manifest.md).
|
|
182
182
|
|
|
183
|
+
## policy
|
|
184
|
+
|
|
185
|
+
Optional (RFC-1615). The declared policy surface: which forge.yaml keys and repo files a session may change — `correctness.gate` freezes everything else at the integration `--base`. The section freezes itself.
|
|
186
|
+
|
|
187
|
+
```yaml
|
|
188
|
+
policy:
|
|
189
|
+
mutable: [project, forge, moves] # top-level keys sessions may change freely
|
|
190
|
+
additive: [bindings, paths, loopMetrics] # new leaves allowed; existing leaves frozen
|
|
191
|
+
freezeFiles: # repo-root globs — byte-frozen
|
|
192
|
+
- "hooks/**"
|
|
193
|
+
- ".github/workflows/**"
|
|
194
|
+
- ".forge/pinned.yaml"
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Scaffolded by `forge init`; `forge upgrade` adds it only when absent. Judge semantics and `--policy-only`: [correctness-gate.md](correctness-gate.md#declared-policy-surface-policy-rfc-1615).
|
|
198
|
+
|
|
183
199
|
## Extension points
|
|
184
200
|
|
|
185
201
|
Packs can declare custom Compass contract blocks:
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# The verification trust boundary
|
|
2
|
+
|
|
3
|
+
`correctness.gate` judges a session's diff against a frozen contour — but who stops the session from editing the gate inputs themselves? RFC-1615 froze the declared policy surface inside the repository; RFC-1616 adds the layer that answers the question honestly: **the boundary a self-interested agent cannot cross lives outside the agent's write access.**
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm exec forge policy.digest --write # record the policy surface
|
|
7
|
+
pnpm exec forge policy.digest --verify # re-check it
|
|
8
|
+
pnpm exec forge adversarial.run --list # the seeded attack catalog
|
|
9
|
+
pnpm exec forge adversarial.run # replay all 12 scenarios
|
|
10
|
+
pnpm exec forge flow.push --digest <id> --accept-verifier-trailers "<reason>"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## The three layers
|
|
14
|
+
|
|
15
|
+
1. **In-repo freeze (RFC-1615).** `correctness.gate` judges `forge.yaml` policy keys, `freezeFiles` globs, oracle files, manifest entries, and the `policy:` declaration itself against `--base`. Necessary — and sufficient only against a lazy adversary. An agent with repo write access could, in principle, edit the gate's own inputs and the evidence in one commit; the gate narrows that window to "everything the freeze covers" but cannot leave the repository.
|
|
16
|
+
|
|
17
|
+
2. **Attestation & provenance (RFC-1616, in-repo half).** `policy.digest --write` records a canonical SHA-256 bundle (`forge/policy-bundle@1`) over the declared policy surface; `policy.digest --verify` re-checks it, and `--verify --base <sha>` refuses when the surface advanced without a commit carrying `X-Policy-Digest`. `flow.push` scans the unpushed range for the verifier/audit trailers (`X-Expectation-Origin`, `X-Verifier-Report`, `X-Correctness-Weakening`, `X-Policy-Digest`) and refuses `FLOW-PUSH-08` until the operator passes `--accept-verifier-trailers "<reason>"` — verifier evidence must be seen by a human before it leaves the machine. `push.requireVerifierReview` defaults to `true`; a repository may opt out with `false` — itself a frozen key. `adversarial.run` replays the packaged catalog of 12 seeded attacks in a scratch clone against the real spawned gate and reports expected-vs-observed refusal rules.
|
|
18
|
+
|
|
19
|
+
3. **External enforcement (RFC-1616, platform half).** The scaffolded `.github/workflows/forge-policy.yml` re-judges the policy surface in CI (`correctness.gate --policy-only`, `pinned.validate --mode ci`, `policy.digest --verify`) on every push and pull request — a job the session's credentials do not control. `.github/CODEOWNERS` assigns `forge.yaml`, `.forge/`, `hooks/`, `.github/workflows/`, and `.github/CODEOWNERS` itself to `project.owner`, so a pull request that edits the policy surface — including the workflow and the ownership file that watch it — needs the owner's review.
|
|
20
|
+
|
|
21
|
+
## The two switches (GitHub)
|
|
22
|
+
|
|
23
|
+
The in-repo files are inert until the platform enforces them. On the repository's protected branch (`develop`, and `main` if released):
|
|
24
|
+
|
|
25
|
+
1. **Require review from Code Owners.** Settings → Branches → branch protection → "Require review from Code Owners". This makes `.github/CODEOWNERS` binding: a PR touching `forge.yaml`, `.forge/`, `hooks/`, or the workflows cannot merge without the owner.
|
|
26
|
+
|
|
27
|
+
2. **Require status checks.** Same page → "Require status checks to pass" → select the `forge-policy` job. This makes the CI re-judgment binding: the policy surface must verify outside the session's environment.
|
|
28
|
+
|
|
29
|
+
`forge init`/`forge upgrade` write both files when absent (`project.owner` renders the CODEOWNERS handle; absent it keeps the documented `@OWNER` placeholder) and never overwrite them afterwards — operator-tuned content is the adoption.
|
|
30
|
+
|
|
31
|
+
## What this does NOT guarantee
|
|
32
|
+
|
|
33
|
+
- The `.forge/policy.digest` file is an attestation artifact, not a trust root — a session could regenerate it in the same commit as the weakening. It holds because CODEOWNERS owns `.forge/` and the CI re-verifies it — the digest without the external layer is bookkeeping.
|
|
34
|
+
- Commit trailers are provenance hints, not proof of authorship — a session can type `X-Verifier-Report:` into any message (disclosed as gate observation O-16). They hold because `flow.push` forces them under operator review and CODEOWNERS owns the report paths.
|
|
35
|
+
- VERIFIED means the frozen contour judged the diff and the evidence held — under the controls above. It does not mean the code is correct, only that the declared surface was not silently weakened on the way to "done".
|
|
36
|
+
- Cryptographic commit signing (GPG/sigstore) is deferred — it would harden authorship claims, not replace the review boundary.
|
|
@@ -15,10 +15,47 @@ and atomically mutates ADR frontmatter.
|
|
|
15
15
|
<item>RFC-0727: initial implementation — mirrors rfc.implement.stamp for ADRs.</item>
|
|
16
16
|
<item>RFC-1504: step 4 — shared stamp lock for rfc and adr stamp handlers</item>
|
|
17
17
|
<item>RFC-1504: review fixes — legacy acquiredAt fallback, atomic break claim, verified stamp release, onStale warnings</item>
|
|
18
|
+
<item>RFC-1616: close RFC-1616 r9 trust-boundary counterexamples
|
|
19
|
+
|
|
20
|
+
Independent clean-context verification (round 9, candidate 4436339db)
|
|
21
|
+
returned REFUTED with ten live counterexamples against the r8-hardened
|
|
22
|
+
evidence channel — this commit closes all root causes.
|
|
23
|
+
|
|
24
|
+
- Pack-carried objects get the loose-sweep integrity anchor: every
|
|
25
|
+
.idx/.pack pair under objects/pack is verify-pack -s'd at preflight
|
|
26
|
+
and the sweep memo key is the unforgeable (ino, ctimeMs, size) stat
|
|
27
|
+
triple (CX-113/114); pack.useBitmapIndex=false pins the bitmap
|
|
28
|
+
reachability cache off.
|
|
29
|
+
- Every trusted-path git call routes through the judged/preflighted
|
|
30
|
+
channel: execGit/readCommittedEnvelope/readAcceptanceReports/
|
|
31
|
+
listWorkspaceFiles and the snapshot gitGrep closure now run
|
|
32
|
+
verifierGit/createOriginGit with structured fail-closed dirty
|
|
33
|
+
verdicts (CX-115/118/120/122).
|
|
34
|
+
- Export materialization no longer trusts git archive, ambient tar, or
|
|
35
|
+
committed .gitattributes: exportTree enumerates ls-tree -r -z and
|
|
36
|
+
materializes committed bytes through the re-hashed cat-file --batch
|
|
37
|
+
channel, bounding symlink targets to the export root (CX-116/117).
|
|
38
|
+
- Index-consulting reads run on a verifier-owned claims rebuild:
|
|
39
|
+
prepareEvidenceIndex copies staged object claims into a fresh index
|
|
40
|
+
with zeroed stat metadata, so status/diff content-hash the worktree
|
|
41
|
+
instead of trusting a session-written stat tuple (CX-121).
|
|
42
|
+
- The heredoc lexer is quote-aware: a << inside quotes is string
|
|
43
|
+
content, never an operator (CX-119).
|
|
44
|
+
- Pins ride GIT_CONFIG_* env so the spawned argv stays the judged
|
|
45
|
+
query verbatim; diff.external moved from a broken pin to
|
|
46
|
+
refuse-on-presence; OriginGit.run/runExit now judge caller argv with
|
|
47
|
+
the same read table; batch stdin is EPIPE-safe.
|
|
48
|
+
- kernel-source-scan models the two channel files as judged bodies so
|
|
49
|
+
the channel migration does not read as new unguarded subprocess hits
|
|
50
|
+
in the werkstatt-site mutation ratchet.
|
|
51
|
+
|
|
52
|
+
The independent r9 probe file and acceptance report land in the
|
|
53
|
+
follow-up port commit.</item>
|
|
54
|
+
<item>RFC-1616: close r17 refusal-polarity consumers — ADR stamp/validate twins + attested dirty verdict</item>
|
|
18
55
|
</CHANGE_SUMMARY>
|
|
19
56
|
*/
|
|
20
57
|
|
|
21
|
-
import {
|
|
58
|
+
import { verifierGit } from "../../../src/utils/verifier-git.ts";
|
|
22
59
|
import { ambientIo, resolveIo } from "../../../src/utils/io.ts";
|
|
23
60
|
|
|
24
61
|
import { join } from "node:path";
|
|
@@ -44,34 +81,28 @@ import type {
|
|
|
44
81
|
|
|
45
82
|
// ─── Git helpers ─────────────────────────────────────────────────────────────
|
|
46
83
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
resolve(stdout.trim());
|
|
55
|
-
});
|
|
56
|
-
});
|
|
84
|
+
// ADR stamp reads go through verifierGit: the dirty verdict and the
|
|
85
|
+
// ancestry check are evidence, and ambient GIT_* selectors or a forged
|
|
86
|
+
// `.git/index` must not reshape them (CX-121/CX-122).
|
|
87
|
+
async function execGit(workspaceRoot: string, args: string[]): Promise<string> {
|
|
88
|
+
const r = await verifierGit(workspaceRoot, args);
|
|
89
|
+
return r.exitCode === 0 ? r.stdout.trim() : "";
|
|
57
90
|
}
|
|
58
91
|
|
|
59
92
|
async function isAdrFileClean(workspaceRoot: string, adrRelPath: string): Promise<boolean> {
|
|
60
|
-
|
|
61
|
-
|
|
93
|
+
// A refused or failed read is NOT a clean file — the dirty verdict is
|
|
94
|
+
// unverifiable, so `exitCode !== 0 → false` (CX-159: the `execGit`
|
|
95
|
+
// nonzero→"" mapping reads a refusal as clean and skips ADR-IMP-04 on
|
|
96
|
+
// exactly the dirty file it guards; the indexUnproven asymmetry keeps
|
|
97
|
+
// every other stamp gate answering honestly, making this the only
|
|
98
|
+
// blind gate — the ADR twin of CX-157).
|
|
99
|
+
const r = await verifierGit(workspaceRoot, ["status", "--porcelain", "--", adrRelPath]);
|
|
100
|
+
return r.exitCode === 0 && r.stdout.trim().length === 0;
|
|
62
101
|
}
|
|
63
102
|
|
|
64
103
|
async function commitReachableFromHead(workspaceRoot: string, commitSha: string): Promise<boolean> {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"git",
|
|
68
|
-
["merge-base", "--is-ancestor", commitSha, "HEAD"],
|
|
69
|
-
{ cwd: workspaceRoot, timeout: 10000 },
|
|
70
|
-
(err) => {
|
|
71
|
-
resolve(!err);
|
|
72
|
-
},
|
|
73
|
-
);
|
|
74
|
-
});
|
|
104
|
+
const r = await verifierGit(workspaceRoot, ["merge-base", "--is-ancestor", commitSha, "HEAD"]);
|
|
105
|
+
return r.exitCode === 0;
|
|
75
106
|
}
|
|
76
107
|
|
|
77
108
|
async function commitReferencesAdr(
|
|
@@ -245,7 +276,7 @@ export async function runAdrImplementStamp(
|
|
|
245
276
|
if (!adrFileClean) {
|
|
246
277
|
violations.push({
|
|
247
278
|
rule: "ADR-IMP-04",
|
|
248
|
-
message: `ADR file ${adrRelPath} has uncommitted changes. Commit the ADR file before stamping.`,
|
|
279
|
+
message: `ADR file ${adrRelPath} has uncommitted changes or its dirty state could not be verified. Commit the ADR file before stamping.`,
|
|
249
280
|
});
|
|
250
281
|
}
|
|
251
282
|
|
|
@@ -262,8 +293,7 @@ export async function runAdrImplementStamp(
|
|
|
262
293
|
violations.push({
|
|
263
294
|
rule: "ADR-IMP-03",
|
|
264
295
|
message: `Implementation commit ${implementationCommit} does not reference ${targetId} in its message or changed files.`,
|
|
265
|
-
fixHint:
|
|
266
|
-
`The message check is case-sensitive on the uppercase id (${targetId}, not a lowercase scope like "docs(adr-xxxx):"). For post-hoc ADRs whose historic implementation commit never mentions the id, pass the "adr: accept" or "trace:" commit instead — both qualify; a commit whose changed-file list contains the adr-xxxx-* slug also qualifies.`,
|
|
296
|
+
fixHint: `The message check is case-sensitive on the uppercase id (${targetId}, not a lowercase scope like "docs(adr-xxxx):"). For post-hoc ADRs whose historic implementation commit never mentions the id, pass the "adr: accept" or "trace:" commit instead — both qualify; a commit whose changed-file list contains the adr-xxxx-* slug also qualifies.`,
|
|
267
297
|
});
|
|
268
298
|
}
|
|
269
299
|
}
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-0366: implement fail-hard ADR validation for the new adrModule.</item>
|
|
10
|
-
<item>RFC-0521: migrated from packages/os/site-kernel/src/adr/ to packages/forge/os/adr/.</item>
|
|
11
9
|
<item>RFC-0722: add ADR-DIR-01 directory structure warning rule for unsanctioned subdirectories.</item>
|
|
12
10
|
<item>RFC-1097: step 6 — compass.migrate codemod run
|
|
13
11
|
|
|
@@ -15,11 +13,49 @@ Mechanical v1 to v2 header migration across the workspace: 942 files rewritten
|
|
|
15
13
|
<item>RFC-1097: sweep — werkstatt-engine clean
|
|
16
14
|
|
|
17
15
|
Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
|
|
16
|
+
<item>RFC-1616: close RFC-1616 r9 trust-boundary counterexamples
|
|
17
|
+
|
|
18
|
+
Independent clean-context verification (round 9, candidate 4436339db)
|
|
19
|
+
returned REFUTED with ten live counterexamples against the r8-hardened
|
|
20
|
+
evidence channel — this commit closes all root causes.
|
|
21
|
+
|
|
22
|
+
- Pack-carried objects get the loose-sweep integrity anchor: every
|
|
23
|
+
.idx/.pack pair under objects/pack is verify-pack -s'd at preflight
|
|
24
|
+
and the sweep memo key is the unforgeable (ino, ctimeMs, size) stat
|
|
25
|
+
triple (CX-113/114); pack.useBitmapIndex=false pins the bitmap
|
|
26
|
+
reachability cache off.
|
|
27
|
+
- Every trusted-path git call routes through the judged/preflighted
|
|
28
|
+
channel: execGit/readCommittedEnvelope/readAcceptanceReports/
|
|
29
|
+
listWorkspaceFiles and the snapshot gitGrep closure now run
|
|
30
|
+
verifierGit/createOriginGit with structured fail-closed dirty
|
|
31
|
+
verdicts (CX-115/118/120/122).
|
|
32
|
+
- Export materialization no longer trusts git archive, ambient tar, or
|
|
33
|
+
committed .gitattributes: exportTree enumerates ls-tree -r -z and
|
|
34
|
+
materializes committed bytes through the re-hashed cat-file --batch
|
|
35
|
+
channel, bounding symlink targets to the export root (CX-116/117).
|
|
36
|
+
- Index-consulting reads run on a verifier-owned claims rebuild:
|
|
37
|
+
prepareEvidenceIndex copies staged object claims into a fresh index
|
|
38
|
+
with zeroed stat metadata, so status/diff content-hash the worktree
|
|
39
|
+
instead of trusting a session-written stat tuple (CX-121).
|
|
40
|
+
- The heredoc lexer is quote-aware: a << inside quotes is string
|
|
41
|
+
content, never an operator (CX-119).
|
|
42
|
+
- Pins ride GIT_CONFIG_* env so the spawned argv stays the judged
|
|
43
|
+
query verbatim; diff.external moved from a broken pin to
|
|
44
|
+
refuse-on-presence; OriginGit.run/runExit now judge caller argv with
|
|
45
|
+
the same read table; batch stdin is EPIPE-safe.
|
|
46
|
+
- kernel-source-scan models the two channel files as judged bodies so
|
|
47
|
+
the channel migration does not read as new unguarded subprocess hits
|
|
48
|
+
in the werkstatt-site mutation ratchet.
|
|
49
|
+
|
|
50
|
+
The independent r9 probe file and acceptance report land in the
|
|
51
|
+
follow-up port commit.</item>
|
|
52
|
+
<item>RFC-1616: close r17 refusal-polarity consumers — ADR stamp/validate twins + attested dirty verdict</item>
|
|
53
|
+
<history>RFC-0366, RFC-0521</history>
|
|
18
54
|
</CHANGE_SUMMARY>
|
|
19
55
|
*/
|
|
20
56
|
|
|
21
57
|
import path from "node:path";
|
|
22
|
-
import {
|
|
58
|
+
import { repoShaped, verifierGit } from "../../../src/utils/verifier-git.ts";
|
|
23
59
|
import {
|
|
24
60
|
listAdrFiles,
|
|
25
61
|
readAndParseAdr,
|
|
@@ -413,22 +449,36 @@ async function validateSingleAdr(
|
|
|
413
449
|
|
|
414
450
|
// AV-16: implementation commit drift detection (RFC-0625)
|
|
415
451
|
// Warns when implement: ADR-XXXX commits exist in git history since createdAt
|
|
416
|
-
// but the ADR status is not yet "implemented".
|
|
452
|
+
// but the ADR status is not yet "implemented". A refused or failed read is
|
|
453
|
+
// NOT an empty history — on a repo-shaped surface the verdict is
|
|
454
|
+
// unverifiable, never "no drift" (CX-160); a genuinely absent repo skips
|
|
455
|
+
// honestly.
|
|
417
456
|
if (status !== "implemented") {
|
|
418
457
|
const datePattern = /^\d{4}-\d{2}-\d{2}$/;
|
|
419
458
|
if (datePattern.test(createdAt)) {
|
|
420
|
-
const
|
|
421
|
-
if (
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
459
|
+
const r = await verifierGit(workspaceRoot, ["log", `--since=${createdAt}`, "--oneline"]);
|
|
460
|
+
if (r.exitCode !== 0 && repoShaped(workspaceRoot)) {
|
|
461
|
+
addViolation(
|
|
462
|
+
adrId,
|
|
463
|
+
relFile,
|
|
464
|
+
"AV-16",
|
|
465
|
+
`${adrId} drift check is unverifiable — the evidence channel refused the history read (${r.stderr.trim() || `git log exited ${r.exitCode}`})`,
|
|
466
|
+
"warning",
|
|
467
|
+
);
|
|
468
|
+
} else if (r.exitCode === 0) {
|
|
469
|
+
const log = r.stdout.trim();
|
|
470
|
+
if (log) {
|
|
471
|
+
const pattern = new RegExp(`implement:\\s+${adrId}\\b`, "i");
|
|
472
|
+
const matchingLines = log.split("\n").filter((line) => pattern.test(line.trim()));
|
|
473
|
+
if (matchingLines.length > 0) {
|
|
474
|
+
addViolation(
|
|
475
|
+
adrId,
|
|
476
|
+
relFile,
|
|
477
|
+
"AV-16",
|
|
478
|
+
`${adrId} has ${matchingLines.length} implement: commit(s) in git history since ${createdAt} but status is still "${status}". Run: site-kernel run adr.implement.stamp --id ${adrId} --implementation-commit <sha> to transition to implemented.`,
|
|
479
|
+
"warning",
|
|
480
|
+
);
|
|
481
|
+
}
|
|
432
482
|
}
|
|
433
483
|
}
|
|
434
484
|
}
|
|
@@ -485,15 +535,3 @@ async function validateSingleAdr(
|
|
|
485
535
|
}
|
|
486
536
|
}
|
|
487
537
|
}
|
|
488
|
-
|
|
489
|
-
function execGitLog(workspaceRoot: string, args: string[]): Promise<string> {
|
|
490
|
-
return new Promise((resolve) => {
|
|
491
|
-
execFile("git", args, { cwd: workspaceRoot, timeout: 10000 }, (err, stdout) => {
|
|
492
|
-
if (err) {
|
|
493
|
-
resolve("");
|
|
494
|
-
return;
|
|
495
|
-
}
|
|
496
|
-
resolve(stdout.trim());
|
|
497
|
-
});
|
|
498
|
-
});
|
|
499
|
-
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>RFC-1616: adversarial.run — the demonstration harness. Replays the
|
|
4
|
+
packaged scenario catalog in a scratch clone of this repository and reports
|
|
5
|
+
scenario → expected → observed → rule, exiting non-zero on any mismatch.
|
|
6
|
+
--list enumerates the catalog; --scenario runs one.</purpose>
|
|
7
|
+
<non-goals>
|
|
8
|
+
<item>Not a per-PR gate — on-demand/CI-scheduled by design (runtime cost is per-scenario clone+spawn).</item>
|
|
9
|
+
</non-goals>
|
|
10
|
+
</MODULE_CONTRACT>
|
|
11
|
+
<CHANGE_SUMMARY>
|
|
12
|
+
<item>RFC-1616: initial module — adversarial.run.</item>
|
|
13
|
+
<item>RFC-1616: external verification trust boundary
|
|
14
|
+
|
|
15
|
+
policy.digest (canonical SHA-256 over the frozen surface), adversarial.run
|
|
16
|
+
with a 12-scenario catalog replayed through the real gate in a scratch
|
|
17
|
+
clone, flow.push verifier-trailer hard stop (fail-closed on unreadable
|
|
18
|
+
forge.yaml), project.owner + push.requireVerifierReview config, trust-boundary
|
|
19
|
+
scaffold (CODEOWNERS + forge-policy workflow) and reference docs.</item>
|
|
20
|
+
<item>RFC-1616: declare VITEST env input on adversarial.run</item>
|
|
21
|
+
<item>RFC-1616: declare subprocess env inputs and drop pull_request trigger</item>
|
|
22
|
+
</CHANGE_SUMMARY>
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import type { ForgeModule } from "../../src/forge-module.ts";
|
|
26
|
+
import type {
|
|
27
|
+
ForgeCommandInput,
|
|
28
|
+
ForgeCommandResult,
|
|
29
|
+
ForgeRuntimeContext,
|
|
30
|
+
} from "../../src/types.ts";
|
|
31
|
+
import type { AdversarialResult, AdversarialScenarioResult } from "../../src/adversarial/types.ts";
|
|
32
|
+
import { loadCatalog } from "./catalog.ts";
|
|
33
|
+
import { runScenario } from "./runner.ts";
|
|
34
|
+
|
|
35
|
+
async function runAdversarial(
|
|
36
|
+
input: ForgeCommandInput,
|
|
37
|
+
context: ForgeRuntimeContext,
|
|
38
|
+
): Promise<ForgeCommandResult<AdversarialResult>> {
|
|
39
|
+
const { workspaceRoot, logger, outputFormat } = context;
|
|
40
|
+
const json = input.flags["json"] === true || outputFormat === "json";
|
|
41
|
+
const listOnly = input.flags["list"] === true;
|
|
42
|
+
const only = typeof input.flags["scenario"] === "string" ? input.flags["scenario"] : null;
|
|
43
|
+
|
|
44
|
+
const catalog = loadCatalog();
|
|
45
|
+
if (listOnly) {
|
|
46
|
+
if (!json) {
|
|
47
|
+
for (const e of catalog) {
|
|
48
|
+
logger.info(
|
|
49
|
+
e.scenario
|
|
50
|
+
? `${e.name} → ${e.scenario.expect.rule}${e.scenario.requires?.length ? ` (${e.scenario.requires.join(", ")})` : ""}`
|
|
51
|
+
: `${e.name} → INVALID: ${e.error}`,
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const scenarios = catalog.map((e) => ({
|
|
56
|
+
name: e.name,
|
|
57
|
+
expected: e.scenario?.expect.rule ?? "invalid",
|
|
58
|
+
observed: "not-run",
|
|
59
|
+
ok: e.scenario !== undefined,
|
|
60
|
+
}));
|
|
61
|
+
return {
|
|
62
|
+
data: {
|
|
63
|
+
command: "adversarial.run",
|
|
64
|
+
scenarios,
|
|
65
|
+
status: catalog.every((e) => e.scenario) ? "pass" : "fail",
|
|
66
|
+
},
|
|
67
|
+
exitCode: catalog.every((e) => e.scenario) ? 0 : 1,
|
|
68
|
+
summary: `${catalog.length} scenario(s) in catalog`,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const selected = only ? catalog.filter((e) => e.name === only) : catalog;
|
|
73
|
+
if (only && selected.length === 0) {
|
|
74
|
+
return {
|
|
75
|
+
data: { command: "adversarial.run", scenarios: [], status: "fail" },
|
|
76
|
+
exitCode: 1,
|
|
77
|
+
summary: `no scenario named ${only}`,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
const invalid = selected.filter((e) => !e.scenario);
|
|
81
|
+
const results: AdversarialScenarioResult[] = invalid.map((e) => ({
|
|
82
|
+
name: e.name,
|
|
83
|
+
expected: "valid scenario.yaml",
|
|
84
|
+
observed: `error:${e.error ?? "invalid"}`,
|
|
85
|
+
ok: false,
|
|
86
|
+
}));
|
|
87
|
+
for (const e of selected) {
|
|
88
|
+
if (!e.scenario) continue;
|
|
89
|
+
const r = await runScenario(e.scenario, { repoRoot: workspaceRoot });
|
|
90
|
+
results.push(r);
|
|
91
|
+
if (!json) {
|
|
92
|
+
(r.ok ? logger.success : logger.error).call(
|
|
93
|
+
r.ok ? logger.success : logger.error,
|
|
94
|
+
`${r.name} → expected ${r.expected}, observed ${r.observed}${r.ok ? "" : " — MISMATCH"}`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const status = results.every((r) => r.ok) ? "pass" : "fail";
|
|
99
|
+
return {
|
|
100
|
+
data: { command: "adversarial.run", scenarios: results, status },
|
|
101
|
+
exitCode: status === "pass" ? 0 : 1,
|
|
102
|
+
summary: `${results.filter((r) => r.ok).length}/${results.length} scenario(s) refused as expected`,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function createForgeAdversarialModule(): ForgeModule {
|
|
107
|
+
return {
|
|
108
|
+
name: "forge-adversarial",
|
|
109
|
+
version: "0.0.0",
|
|
110
|
+
runtime: "autonomous",
|
|
111
|
+
declarations: [],
|
|
112
|
+
pipelines: [],
|
|
113
|
+
commands: [
|
|
114
|
+
{
|
|
115
|
+
name: "adversarial.run",
|
|
116
|
+
coverage: "operator" as const,
|
|
117
|
+
coverageNote: "trust-boundary demonstration (RFC-1616)",
|
|
118
|
+
mutatesState: false,
|
|
119
|
+
execOnReadOnly: true,
|
|
120
|
+
description:
|
|
121
|
+
"Replay the packaged adversarial scenario catalog in a scratch clone " +
|
|
122
|
+
"of this repository — each scenario seeds the repo, applies an attack " +
|
|
123
|
+
"edit, spawns the real gate, and verifies the expected refusal rule " +
|
|
124
|
+
"(CORR-GATE-02/03, FLOW-INT-18). --list enumerates, --scenario runs " +
|
|
125
|
+
"one. Exit non-zero on any expected-vs-observed mismatch.",
|
|
126
|
+
scope: "workspace",
|
|
127
|
+
reads: ["docs/adversarial/**"],
|
|
128
|
+
writes: [],
|
|
129
|
+
generates: [],
|
|
130
|
+
cacheable: false,
|
|
131
|
+
envInputs: [
|
|
132
|
+
{ name: "FORGE_ADVERSARIAL_BIN", required: false },
|
|
133
|
+
{ name: "VITEST", required: false },
|
|
134
|
+
{ name: "COMSPEC", required: false },
|
|
135
|
+
{ name: "PATHEXT", required: false },
|
|
136
|
+
{ name: "PATH", required: false },
|
|
137
|
+
],
|
|
138
|
+
flags: {
|
|
139
|
+
list: { kind: "boolean", description: "List catalog scenarios without running." },
|
|
140
|
+
scenario: { kind: "string", description: "Run only the named scenario." },
|
|
141
|
+
json: { kind: "boolean", description: "Output structured JSON result." },
|
|
142
|
+
},
|
|
143
|
+
execute: runAdversarial,
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
};
|
|
147
|
+
}
|