@warpgogol/forge 9.3.1 → 9.4.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/AGENTS.md +32 -0
- package/CHANGELOG.md +25 -0
- package/README.md +2 -2
- package/bin/cli.ts +4 -4
- package/dist/bin/cli.js +4 -4
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/adr/handlers/list-create.d.ts.map +1 -1
- package/dist/os/adr/handlers/list-create.js +23 -2
- package/dist/os/adr/handlers/list-create.js.map +1 -1
- package/dist/os/adr/types.d.ts +2 -0
- package/dist/os/adr/types.d.ts.map +1 -1
- package/dist/os/adr/types.js +2 -2
- package/dist/os/adr/types.js.map +1 -1
- package/dist/os/compass/handlers/compass-audit-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-audit-handler.js +3 -1
- 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 +6 -12
- package/dist/os/compass/handlers/compass-header-scaffold-handler.js.map +1 -1
- package/dist/os/compass/handlers/git-revision.d.ts +2 -0
- package/dist/os/compass/handlers/git-revision.d.ts.map +1 -1
- package/dist/os/compass/handlers/git-revision.js +7 -2
- 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 +24 -14
- package/dist/os/compass/handlers/summary-record.js.map +1 -1
- package/dist/os/conformance/conformance.module.d.ts.map +1 -1
- package/dist/os/conformance/conformance.module.js +21 -4
- package/dist/os/conformance/conformance.module.js.map +1 -1
- package/dist/os/conformance/handlers/conformance-validate.d.ts.map +1 -1
- package/dist/os/conformance/handlers/conformance-validate.js +64 -8
- package/dist/os/conformance/handlers/conformance-validate.js.map +1 -1
- package/dist/os/core/archive-regen.d.ts +99 -0
- package/dist/os/core/archive-regen.d.ts.map +1 -0
- package/dist/os/core/archive-regen.js +220 -0
- package/dist/os/core/archive-regen.js.map +1 -0
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +159 -18
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/core/handlers/assets-helpers.d.ts.map +1 -1
- package/dist/os/core/handlers/assets-helpers.js +8 -3
- package/dist/os/core/handlers/assets-helpers.js.map +1 -1
- package/dist/os/core/handlers/forge-autonomy-validate.d.ts.map +1 -1
- package/dist/os/core/handlers/forge-autonomy-validate.js +3 -1
- package/dist/os/core/handlers/forge-autonomy-validate.js.map +1 -1
- package/dist/os/core/handlers/package-health.d.ts +130 -0
- package/dist/os/core/handlers/package-health.d.ts.map +1 -1
- package/dist/os/core/handlers/package-health.js +548 -7
- package/dist/os/core/handlers/package-health.js.map +1 -1
- package/dist/os/core/handlers/release-prepare.d.ts.map +1 -1
- package/dist/os/core/handlers/release-prepare.js +5 -2
- package/dist/os/core/handlers/release-prepare.js.map +1 -1
- package/dist/os/flow/digest.d.ts.map +1 -1
- package/dist/os/flow/digest.js +3 -1
- package/dist/os/flow/digest.js.map +1 -1
- package/dist/os/flow/dirty-classify.d.ts +48 -0
- package/dist/os/flow/dirty-classify.d.ts.map +1 -0
- package/dist/os/flow/dirty-classify.js +81 -0
- package/dist/os/flow/dirty-classify.js.map +1 -0
- package/dist/os/flow/flow.module.d.ts.map +1 -1
- package/dist/os/flow/flow.module.js +85 -19
- package/dist/os/flow/flow.module.js.map +1 -1
- package/dist/os/flow/gate-engine.d.ts +13 -0
- package/dist/os/flow/gate-engine.d.ts.map +1 -0
- package/dist/os/flow/gate-engine.js +32 -0
- package/dist/os/flow/gate-engine.js.map +1 -0
- package/dist/os/flow/git.d.ts +45 -4
- package/dist/os/flow/git.d.ts.map +1 -1
- package/dist/os/flow/git.js +95 -27
- package/dist/os/flow/git.js.map +1 -1
- package/dist/os/flow/handlers/flow-backmerge.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-backmerge.js +12 -5
- package/dist/os/flow/handlers/flow-backmerge.js.map +1 -1
- package/dist/os/flow/handlers/flow-check.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-check.js +25 -3
- package/dist/os/flow/handlers/flow-check.js.map +1 -1
- package/dist/os/flow/handlers/flow-cut.d.ts +4 -1
- package/dist/os/flow/handlers/flow-cut.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-cut.js +54 -31
- package/dist/os/flow/handlers/flow-cut.js.map +1 -1
- package/dist/os/flow/handlers/flow-discard.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-discard.js +33 -5
- 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 +13 -10
- 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 +13 -7
- package/dist/os/flow/handlers/flow-hold.js.map +1 -1
- package/dist/os/flow/handlers/flow-install.d.ts +2 -1
- package/dist/os/flow/handlers/flow-install.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-install.js +56 -13
- package/dist/os/flow/handlers/flow-install.js.map +1 -1
- package/dist/os/flow/handlers/flow-integrate.d.ts +48 -2
- package/dist/os/flow/handlers/flow-integrate.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-integrate.js +536 -65
- package/dist/os/flow/handlers/flow-integrate.js.map +1 -1
- package/dist/os/flow/handlers/flow-open.d.ts +14 -0
- package/dist/os/flow/handlers/flow-open.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-open.js +117 -12
- package/dist/os/flow/handlers/flow-open.js.map +1 -1
- package/dist/os/flow/handlers/flow-status.d.ts +13 -0
- package/dist/os/flow/handlers/flow-status.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-status.js +35 -14
- package/dist/os/flow/handlers/flow-status.js.map +1 -1
- package/dist/os/flow/index.d.ts +1 -0
- package/dist/os/flow/index.d.ts.map +1 -1
- package/dist/os/flow/index.js +3 -1
- 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 +2 -1
- package/dist/os/flow/line-version.js.map +1 -1
- package/dist/os/flow/locks.d.ts +37 -1
- package/dist/os/flow/locks.d.ts.map +1 -1
- package/dist/os/flow/locks.js +34 -14
- package/dist/os/flow/locks.js.map +1 -1
- package/dist/os/flow/preflight.d.ts +114 -0
- package/dist/os/flow/preflight.d.ts.map +1 -0
- package/dist/os/flow/preflight.js +620 -0
- package/dist/os/flow/preflight.js.map +1 -0
- package/dist/os/flow/publish.d.ts +7 -0
- package/dist/os/flow/publish.d.ts.map +1 -1
- package/dist/os/flow/publish.js +165 -3
- package/dist/os/flow/publish.js.map +1 -1
- package/dist/os/flow/registry.d.ts +26 -1
- package/dist/os/flow/registry.d.ts.map +1 -1
- package/dist/os/flow/registry.js +27 -6
- package/dist/os/flow/registry.js.map +1 -1
- package/dist/os/flow/scripts.d.ts +4 -0
- package/dist/os/flow/scripts.d.ts.map +1 -1
- package/dist/os/flow/scripts.js +8 -2
- package/dist/os/flow/scripts.js.map +1 -1
- package/dist/os/flow/session-checkout.d.ts +33 -0
- package/dist/os/flow/session-checkout.d.ts.map +1 -0
- package/dist/os/flow/session-checkout.js +151 -0
- package/dist/os/flow/session-checkout.js.map +1 -0
- package/dist/os/flow/worktree-path.d.ts.map +1 -1
- package/dist/os/flow/worktree-path.js +9 -3
- package/dist/os/flow/worktree-path.js.map +1 -1
- package/dist/os/instructions/handlers/budget-validate.d.ts +1 -0
- package/dist/os/instructions/handlers/budget-validate.d.ts.map +1 -1
- package/dist/os/instructions/handlers/budget-validate.js +12 -4
- package/dist/os/instructions/handlers/budget-validate.js.map +1 -1
- package/dist/os/instructions/instructions.module.d.ts.map +1 -1
- package/dist/os/instructions/instructions.module.js +4 -1
- package/dist/os/instructions/instructions.module.js.map +1 -1
- package/dist/os/mission/open-missions.d.ts +8 -0
- package/dist/os/mission/open-missions.d.ts.map +1 -0
- package/dist/os/mission/open-missions.js +42 -0
- package/dist/os/mission/open-missions.js.map +1 -0
- package/dist/os/queue/manifest.d.ts.map +1 -1
- package/dist/os/queue/manifest.js +11 -1
- package/dist/os/queue/manifest.js.map +1 -1
- package/dist/os/rfc/acceptance.d.ts +14 -0
- package/dist/os/rfc/acceptance.d.ts.map +1 -1
- package/dist/os/rfc/acceptance.js +18 -10
- package/dist/os/rfc/acceptance.js.map +1 -1
- package/dist/os/rfc/decision-log.d.ts.map +1 -1
- package/dist/os/rfc/decision-log.js +11 -2
- package/dist/os/rfc/decision-log.js.map +1 -1
- package/dist/os/rfc/frontmatter-io.d.ts +23 -0
- package/dist/os/rfc/frontmatter-io.d.ts.map +1 -1
- package/dist/os/rfc/frontmatter-io.js +82 -1
- package/dist/os/rfc/frontmatter-io.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-deviations.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-deviations.js +24 -2
- package/dist/os/rfc/handlers/implement-stamp-deviations.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +16 -3
- 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 +5 -4
- package/dist/os/rfc/handlers/index-graph.js.map +1 -1
- package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
- package/dist/os/rfc/handlers/list-create.js +83 -8
- package/dist/os/rfc/handlers/list-create.js.map +1 -1
- package/dist/os/rfc/handlers/rfc-evidence-sync.d.ts +48 -0
- package/dist/os/rfc/handlers/rfc-evidence-sync.d.ts.map +1 -1
- package/dist/os/rfc/handlers/rfc-evidence-sync.js +131 -2
- package/dist/os/rfc/handlers/rfc-evidence-sync.js.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts +21 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +77 -5
- 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 +64 -6
- package/dist/os/rfc/handlers/validate.js.map +1 -1
- package/dist/os/rfc/next-id.d.ts +38 -0
- package/dist/os/rfc/next-id.d.ts.map +1 -0
- package/dist/os/rfc/next-id.js +165 -0
- package/dist/os/rfc/next-id.js.map +1 -0
- package/dist/os/rfc/probe-batch.d.ts.map +1 -1
- package/dist/os/rfc/probe-batch.js +6 -1
- package/dist/os/rfc/probe-batch.js.map +1 -1
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +36 -8
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/types.d.ts +35 -6
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +6 -6
- package/dist/os/rfc/types.js.map +1 -1
- package/dist/os/rfc/verification-evidence.d.ts +1 -1
- package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
- package/dist/os/rfc/verification-evidence.js +81 -28
- package/dist/os/rfc/verification-evidence.js.map +1 -1
- package/dist/os/rfc/verification-origin.d.ts +8 -0
- package/dist/os/rfc/verification-origin.d.ts.map +1 -1
- package/dist/os/rfc/verification-origin.js +47 -0
- package/dist/os/rfc/verification-origin.js.map +1 -1
- package/dist/os/session/handlers/save.d.ts.map +1 -1
- package/dist/os/session/handlers/save.js +31 -7
- package/dist/os/session/handlers/save.js.map +1 -1
- package/dist/os/spec/spec-schema.d.ts +8 -0
- package/dist/os/spec/spec-schema.d.ts.map +1 -1
- package/dist/os/spec/spec-schema.js +1 -0
- package/dist/os/spec/spec-schema.js.map +1 -1
- package/dist/os/spec/spec-status.d.ts +8 -0
- package/dist/os/spec/spec-status.d.ts.map +1 -1
- package/dist/os/spec/spec-status.js +18 -6
- package/dist/os/spec/spec-status.js.map +1 -1
- package/dist/os/spec/spec-validate.d.ts.map +1 -1
- package/dist/os/spec/spec-validate.js +62 -15
- package/dist/os/spec/spec-validate.js.map +1 -1
- package/dist/os/spec/spec.module.d.ts.map +1 -1
- package/dist/os/spec/spec.module.js +13 -5
- package/dist/os/spec/spec.module.js.map +1 -1
- package/dist/os/system/handlers/system-map-validate.d.ts.map +1 -1
- package/dist/os/system/handlers/system-map-validate.js +2 -1
- package/dist/os/system/handlers/system-map-validate.js.map +1 -1
- package/dist/os/system/handlers/system-outbox-scan.d.ts +11 -0
- package/dist/os/system/handlers/system-outbox-scan.d.ts.map +1 -1
- package/dist/os/system/handlers/system-outbox-scan.js +54 -6
- package/dist/os/system/handlers/system-outbox-scan.js.map +1 -1
- package/dist/os/system/handlers/system-task-create.d.ts.map +1 -1
- package/dist/os/system/handlers/system-task-create.js +6 -1
- package/dist/os/system/handlers/system-task-create.js.map +1 -1
- package/dist/os/system/handlers/system-versionset-record.d.ts +14 -0
- package/dist/os/system/handlers/system-versionset-record.d.ts.map +1 -1
- package/dist/os/system/handlers/system-versionset-record.js +246 -6
- package/dist/os/system/handlers/system-versionset-record.js.map +1 -1
- package/dist/os/system/repo.d.ts +1 -1
- package/dist/os/system/repo.d.ts.map +1 -1
- package/dist/os/system/repo.js +53 -3
- package/dist/os/system/repo.js.map +1 -1
- package/dist/os/system/scenario-schemas.d.ts +109 -3
- package/dist/os/system/scenario-schemas.d.ts.map +1 -1
- package/dist/os/system/scenario-schemas.js +66 -10
- package/dist/os/system/scenario-schemas.js.map +1 -1
- package/dist/os/system/system.module.d.ts.map +1 -1
- package/dist/os/system/system.module.js +69 -17
- package/dist/os/system/system.module.js.map +1 -1
- package/dist/os/system/tests/contract-fixtures.d.ts +17 -0
- package/dist/os/system/tests/contract-fixtures.d.ts.map +1 -0
- package/dist/os/system/tests/contract-fixtures.js +109 -0
- package/dist/os/system/tests/contract-fixtures.js.map +1 -0
- package/dist/src/config/forge-config.d.ts +54 -18
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +41 -9
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/conformance/index.d.ts +6 -0
- package/dist/src/conformance/index.d.ts.map +1 -1
- package/dist/src/conformance/index.js +36 -1
- package/dist/src/conformance/index.js.map +1 -1
- package/dist/src/formal/proof-runner.d.ts.map +1 -1
- package/dist/src/formal/proof-runner.js +10 -2
- package/dist/src/formal/proof-runner.js.map +1 -1
- package/dist/src/migration-adapters/node-typescript-pnpm/index.js +3 -1
- package/dist/src/migration-adapters/node-typescript-pnpm/index.js.map +1 -1
- package/dist/src/migration-adapters/phaser-pnpm/index.js +3 -1
- package/dist/src/migration-adapters/phaser-pnpm/index.js.map +1 -1
- package/dist/src/onboarding/agents-generate.js +4 -4
- package/dist/src/onboarding/agents-generate.js.map +1 -1
- package/dist/src/onboarding/nested-agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/nested-agents-generate.js +3 -1
- package/dist/src/onboarding/nested-agents-generate.js.map +1 -1
- package/dist/src/onboarding/scaffold-project.js +2 -2
- package/dist/src/onboarding/scaffold-project.js.map +1 -1
- package/dist/src/onboarding/upgrade.d.ts.map +1 -1
- package/dist/src/onboarding/upgrade.js +14 -2
- package/dist/src/onboarding/upgrade.js.map +1 -1
- package/dist/src/onboarding/workspace-discovery.d.ts.map +1 -1
- package/dist/src/onboarding/workspace-discovery.js +3 -1
- package/dist/src/onboarding/workspace-discovery.js.map +1 -1
- package/dist/src/skill-schema.d.ts +3 -0
- package/dist/src/skill-schema.d.ts.map +1 -1
- package/dist/src/skill-schema.js +9 -2
- package/dist/src/skill-schema.js.map +1 -1
- package/dist/src/spec/resolve-spec-source.d.ts +45 -0
- package/dist/src/spec/resolve-spec-source.d.ts.map +1 -0
- package/dist/src/spec/resolve-spec-source.js +153 -0
- package/dist/src/spec/resolve-spec-source.js.map +1 -0
- package/dist/src/utils/command-inventory.d.ts +28 -0
- package/dist/src/utils/command-inventory.d.ts.map +1 -0
- package/dist/src/utils/command-inventory.js +84 -0
- package/dist/src/utils/command-inventory.js.map +1 -0
- package/dist/src/utils/io.d.ts.map +1 -1
- package/dist/src/utils/io.js +6 -1
- package/dist/src/utils/io.js.map +1 -1
- package/dist/src/utils/repo-path.d.ts +10 -0
- package/dist/src/utils/repo-path.d.ts.map +1 -0
- package/dist/src/utils/repo-path.js +52 -0
- package/dist/src/utils/repo-path.js.map +1 -0
- package/dist/src/utils/spawn.d.ts +23 -0
- package/dist/src/utils/spawn.d.ts.map +1 -0
- package/dist/src/utils/spawn.js +83 -0
- package/dist/src/utils/spawn.js.map +1 -0
- package/docs/branch-model.md +1 -1
- package/docs/guides/existing-project.md +1 -1
- package/docs/maintainers/publishing.md +1 -1
- package/docs/reference/cli.md +8 -2
- package/docs/reference/profiles.md +1 -1
- package/os/adr/handlers/list-create.ts +26 -2
- package/os/adr/types.ts +4 -2
- package/os/compass/handlers/compass-audit-handler.ts +6 -1
- package/os/compass/handlers/compass-header-scaffold-handler.ts +12 -11
- package/os/compass/handlers/git-revision.ts +8 -2
- package/os/compass/handlers/summary-record.ts +25 -14
- package/os/compass/handlers/tests/compass-invariant-binding.test.ts +3 -2
- package/os/conformance/conformance.module.ts +21 -4
- package/os/conformance/handlers/conformance-validate.ts +108 -16
- package/os/conformance/handlers/tests/conformance-package-consumer.test.ts +200 -0
- package/os/core/archive-regen.ts +279 -0
- package/os/core/core.module.ts +176 -29
- package/os/core/docs-archive.test.ts +413 -3
- package/os/core/handlers/assets-helpers.ts +8 -3
- package/os/core/handlers/forge-autonomy-validate.ts +3 -1
- package/os/core/handlers/package-health.test.ts +418 -4
- package/os/core/handlers/package-health.ts +629 -7
- package/os/core/handlers/release-prepare.ts +5 -2
- package/os/flow/digest.ts +3 -1
- package/os/flow/dirty-classify.ts +112 -0
- package/os/flow/flow.module.ts +92 -24
- package/os/flow/gate-engine.ts +45 -0
- package/os/flow/git.ts +117 -29
- package/os/flow/handlers/flow-backmerge.ts +14 -4
- package/os/flow/handlers/flow-check.ts +27 -2
- package/os/flow/handlers/flow-cut.ts +97 -46
- package/os/flow/handlers/flow-discard.ts +33 -5
- package/os/flow/handlers/flow-fix.ts +22 -10
- package/os/flow/handlers/flow-hold.ts +20 -7
- package/os/flow/handlers/flow-install.ts +59 -12
- package/os/flow/handlers/flow-integrate.ts +808 -182
- package/os/flow/handlers/flow-open.ts +135 -11
- package/os/flow/handlers/flow-status.ts +45 -13
- package/os/flow/index.ts +3 -1
- package/os/flow/line-version.ts +2 -1
- package/os/flow/locks.ts +56 -14
- package/os/flow/preflight.ts +763 -0
- package/os/flow/publish.ts +200 -5
- package/os/flow/registry.ts +43 -7
- package/os/flow/scripts.ts +13 -2
- package/os/flow/session-checkout.ts +186 -0
- package/os/flow/tests/dirty-classify.test.ts +116 -0
- package/os/flow/tests/fixtures/branch-names.yaml +40 -40
- package/os/flow/tests/flow-discard.test.ts +32 -0
- package/os/flow/tests/flow-guard-parity.test.ts +10 -2
- package/os/flow/tests/flow-install.test.ts +7 -3
- package/os/flow/tests/flow-integrate.gate-report.test.ts +144 -0
- package/os/flow/tests/flow-integrate.preflight.test.ts +561 -0
- package/os/flow/tests/flow-integrate.reattach.test.ts +197 -0
- package/os/flow/tests/flow-integrate.remediation.test.ts +254 -0
- package/os/flow/tests/flow-integrate.test.ts +348 -17
- package/os/flow/tests/flow-open.pending.test.ts +277 -0
- package/os/flow/tests/flow-open.test.ts +52 -9
- package/os/flow/tests/flow-push-publish.test.ts +124 -0
- package/os/flow/tests/flow-status.test.ts +31 -1
- package/os/flow/tests/locks.test.ts +39 -3
- package/os/flow/tests/scripts.test.ts +5 -2
- package/os/flow/tests/state-roots.test.ts +8 -5
- package/os/flow/worktree-path.ts +9 -3
- package/os/formal/handlers/proof-check.test.ts +6 -3
- package/os/instructions/budget.test.ts +31 -0
- package/os/instructions/handlers/budget-validate.ts +13 -4
- package/os/instructions/instructions.module.ts +4 -1
- package/os/mission/open-missions.ts +50 -0
- package/os/queue/decision-ledger.test.ts +18 -0
- package/os/queue/manifest.ts +17 -1
- package/os/rfc/acceptance.ts +30 -10
- package/os/rfc/decision-log.ts +13 -2
- package/os/rfc/frontmatter-io.ts +89 -1
- package/os/rfc/handlers/implement-stamp-deviations.test.ts +83 -0
- package/os/rfc/handlers/implement-stamp-deviations.ts +22 -2
- package/os/rfc/handlers/implement-stamp-stale.test.ts +5 -1
- package/os/rfc/handlers/implement-stamp.ts +16 -3
- package/os/rfc/handlers/index-graph.ts +5 -4
- package/os/rfc/handlers/lifecycle.test.ts +136 -0
- package/os/rfc/handlers/list-create.test.ts +82 -0
- package/os/rfc/handlers/list-create.ts +101 -8
- package/os/rfc/handlers/rfc-evidence-sync.test.ts +504 -0
- package/os/rfc/handlers/rfc-evidence-sync.ts +192 -2
- package/os/rfc/handlers/tests/index-graph.test.ts +2 -1
- package/os/rfc/handlers/validate-rules-rfc1454.test.ts +73 -0
- package/os/rfc/handlers/validate-rules.ts +103 -7
- package/os/rfc/handlers/validate.ts +68 -4
- package/os/rfc/next-id.ts +232 -0
- package/os/rfc/probe-batch.ts +6 -1
- package/os/rfc/rfc.module.ts +41 -8
- package/os/rfc/types.ts +28 -6
- package/os/rfc/verification-emit-freshness.test.ts +5 -1
- package/os/rfc/verification-emit.test.ts +5 -1
- package/os/rfc/verification-evidence.ts +99 -33
- package/os/rfc/verification-origin.ts +59 -0
- package/os/rfc/verification-refresh.test.ts +5 -1
- package/os/rfc/verifier/rfc-1333/imp12-binding.acceptance.test.ts +5 -1
- package/os/session/handlers/save.ts +35 -7
- package/os/session/tests/session-save.test.ts +154 -0
- package/os/spec/spec-schema.ts +3 -0
- package/os/spec/spec-status.ts +22 -6
- package/os/spec/spec-validate.package-source.test.ts +187 -0
- package/os/spec/spec-validate.ts +65 -14
- package/os/spec/spec.module.ts +13 -5
- package/os/system/handlers/system-map-validate.ts +4 -2
- package/os/system/handlers/system-outbox-scan.ts +65 -21
- package/os/system/handlers/system-task-create.ts +6 -1
- package/os/system/handlers/system-versionset-record.ts +301 -16
- package/os/system/repo.ts +59 -18
- package/os/system/scenario-schemas.ts +91 -12
- package/os/system/system.module.ts +70 -17
- package/os/system/tests/contract-fixtures.ts +139 -0
- package/os/system/tests/scenario-pin-drift-check.test.ts +114 -0
- package/os/system/tests/scenario-validator-check.test.ts +96 -0
- package/os/system/tests/system-task-dispatch.test.ts +4 -1
- package/os/system/tests/system-versionset.test.ts +7 -3
- package/os/system/tests/version-set-v2.test.ts +78 -0
- package/package.json +9 -1
- package/skills/fo/fo-doctor/SKILL.md +151 -0
- package/skills/fo/fo-handoff/SKILL.md +22 -0
- package/skills/fo/fo-idea-create-rfc/acceptance-criteria-standard.md +2 -1
- package/skills/fo/fo-idea-implement/SKILL.md +5 -2
- package/skills/fo/fo-idea-plan/SKILL.md +5 -5
- package/skills/fo/fo-session-retro/SKILL.md +37 -11
- package/skills/fo/fo-spec-ingest/SKILL.md +8 -0
- package/skills/fo/fo-system-dispatch/SKILL.md +1 -0
- package/skills/meta/skill-create/SKILL.md +2 -1
- package/src/bin-entry.test.ts +3 -1
- package/src/config/forge-config.ts +57 -13
- package/src/conformance/index.ts +46 -1
- package/src/formal/proof-runner.ts +10 -2
- package/src/migration-adapters/node-typescript-pnpm/index.ts +3 -1
- package/src/migration-adapters/phaser-pnpm/index.ts +3 -1
- package/src/onboarding/agents-generate.ts +4 -4
- package/src/onboarding/nested-agents-generate.ts +3 -1
- package/src/onboarding/scaffold-project.ts +2 -2
- package/src/onboarding/upgrade.ts +13 -2
- package/src/onboarding/workspace-discovery.ts +3 -1
- package/src/pipeline-status.test.ts +1 -1
- package/src/skill-schema.ts +9 -2
- package/src/spec/resolve-spec-source.ts +184 -0
- package/src/tests/acceptance-probe-kinds.test.ts +3 -1
- package/src/tests/agents-generate-domain.test.ts +3 -2
- package/src/tests/agents-generate.test.ts +2 -1
- package/src/tests/create-flow.test.ts +3 -1
- package/src/tests/create.test.ts +12 -2
- package/src/tests/editable-generated-region.test.ts +2 -2
- package/src/tests/fixtures/agents-generate-business-before.txt +2 -0
- package/src/tests/implement-stamp.test.ts +5 -2
- package/src/tests/rfc-implement-stamp-governance.test.ts +6 -2
- package/src/tests/rfc-verification-verdict-ingest.test.ts +5 -1
- package/src/tests/scaffold-project.test.ts +3 -1
- package/src/tests/upgrade.test.ts +79 -3
- package/src/tests/workspace-discovery.test.ts +4 -3
- package/src/utils/command-inventory.ts +105 -0
- package/src/utils/io.ts +6 -1
- package/src/utils/repo-path.ts +49 -0
- package/src/utils/spawn.ts +88 -0
- package/src/tests/rfc-evidence-sync.test.ts +0 -369
- package/src/tests/skill-agents-sync.test.ts +0 -192
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ForgeCommandInput, ForgeCommandResult, ForgeRuntimeContext } from "../../../src/types.ts";
|
|
2
|
+
import type { VerificationEvidence } from "../types.ts";
|
|
2
3
|
/**
|
|
3
4
|
* The canonical RFC-evidence regen order (RFC-1306). The emit step is
|
|
4
5
|
* appended conditionally on --id — the chain ends at rfc.verification.emit,
|
|
@@ -6,6 +7,45 @@ import type { ForgeCommandInput, ForgeCommandResult, ForgeRuntimeContext } from
|
|
|
6
7
|
*/
|
|
7
8
|
export declare const EVIDENCE_SYNC_STEPS: readonly string[];
|
|
8
9
|
export declare const EVIDENCE_SYNC_EMIT_STEP = "rfc.verification.emit";
|
|
10
|
+
/** RFC-1516: the evidence-freshness window — a committed green envelope
|
|
11
|
+
* younger than this may replay its heavy-probe results instead of
|
|
12
|
+
* re-executing them. 4h covers every realistic stamp-retry session while
|
|
13
|
+
* bounding staleness. */
|
|
14
|
+
export declare const EVIDENCE_REUSE_WINDOW_MS = 14400000;
|
|
15
|
+
export type EvidenceReuseReason = "envelope-reused" | "absent" | "malformed" | "not-green" | "acceptance-changed" | "expired" | "disabled";
|
|
16
|
+
export interface EvidenceReuseVerdict {
|
|
17
|
+
reusable: boolean;
|
|
18
|
+
reason: EvidenceReuseReason;
|
|
19
|
+
/** The reused envelope's `emittedAt` when reusable — provenance, not a
|
|
20
|
+
* claim the probes just ran. */
|
|
21
|
+
reusedFrom?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Reuse is strictly gated — anything short of a well-formed, green,
|
|
24
|
+
* acceptance-matching, in-window envelope falls back to full re-execution.
|
|
25
|
+
* `malformed` covers every unreadable/underspecified shape: unparsable
|
|
26
|
+
* YAML, a non-object body, missing contract fields, bad record elements —
|
|
27
|
+
* and a probes-array length that contradicts a matching acceptanceHash
|
|
28
|
+
* (a crafted envelope; a legitimately different list reports
|
|
29
|
+
* `acceptance-changed` first). */
|
|
30
|
+
export declare function evaluateEvidenceReuse(opts: {
|
|
31
|
+
committed: VerificationEvidence | null;
|
|
32
|
+
/** true when bytes existed but did not parse to the envelope contract. */
|
|
33
|
+
malformed?: boolean;
|
|
34
|
+
/** committed probes[].length ≠ the live acceptance list length. */
|
|
35
|
+
probeCountMismatch?: boolean;
|
|
36
|
+
acceptanceHashHex: string;
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
now?: number;
|
|
39
|
+
}): EvidenceReuseVerdict;
|
|
40
|
+
/** The committed envelope — read from HEAD bytes (`git show`), never the
|
|
41
|
+
* worktree file, so an uncommitted hand-edit can never become reusable
|
|
42
|
+
* input. Returns {envelope} on a contract-shaped parse, {malformed} on
|
|
43
|
+
* bytes that exist but don't satisfy it, {} when nothing is committed. */
|
|
44
|
+
export declare function readCommittedEnvelope(workspaceRoot: string, relPath: string, expectedProbeCount?: number): Promise<{
|
|
45
|
+
envelope?: VerificationEvidence;
|
|
46
|
+
malformed?: boolean;
|
|
47
|
+
probeCountMismatch?: boolean;
|
|
48
|
+
}>;
|
|
9
49
|
export interface RfcEvidenceSyncStepResult {
|
|
10
50
|
step: string;
|
|
11
51
|
flags?: Record<string, unknown>;
|
|
@@ -30,6 +70,14 @@ export interface RfcEvidenceSyncResult {
|
|
|
30
70
|
step: string;
|
|
31
71
|
flags?: Record<string, string>;
|
|
32
72
|
}>;
|
|
73
|
+
/** RFC-1516: the emit step's freshness-window verdict — surfaced verbatim
|
|
74
|
+
* so a stamp-sync log shows whether heavy probes re-executed or the
|
|
75
|
+
* committed envelope replayed. */
|
|
76
|
+
reuse?: EvidenceReuseVerdict;
|
|
77
|
+
/** Criteria whose run/test/page/proof results carried over. */
|
|
78
|
+
heavyProbesReused?: string[];
|
|
79
|
+
/** Criteria re-resolved against the live tree. */
|
|
80
|
+
cheapProbesReRun?: string[];
|
|
33
81
|
}
|
|
34
82
|
interface SyncReport {
|
|
35
83
|
command: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rfc-evidence-sync.d.ts","sourceRoot":"","sources":["../../../../os/rfc/handlers/rfc-evidence-sync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rfc-evidence-sync.d.ts","sourceRoot":"","sources":["../../../../os/rfc/handlers/rfc-evidence-sync.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAMhD,CAAC;AAEF,eAAO,MAAM,uBAAuB,0BAA0B,CAAC;AAE/D;;;0BAG0B;AAC1B,eAAO,MAAM,wBAAwB,WAAW,CAAC;AAEjD,MAAM,MAAM,mBAAmB,GAC3B,iBAAiB,GACjB,QAAQ,GACR,WAAW,GACX,WAAW,GACX,oBAAoB,GACpB,SAAS,GACT,UAAU,CAAC;AAEf,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,mBAAmB,CAAC;IAC5B;qCACiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;mCAMmC;AACnC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,SAAS,EAAE,oBAAoB,GAAG,IA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AM,CAAC,CAAA;KAAE,CAAC,CAAC;IAClE;;uCAEmC;IACnC,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,UAAU,EAAE,wBAAwB,EAAE,CAAC;IACvC,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC9B;AAuBD,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CA6KzC"}
|
|
@@ -14,12 +14,19 @@ invocation attests "all generated artifacts + RFC evidence are current".
|
|
|
14
14
|
<KEY_DECISIONS>
|
|
15
15
|
<item>Step order is contract: the ecosystem manifest hashes the other artifacts, so ecosystem.manifest.generate runs last among the manifest steps.</item>
|
|
16
16
|
<item>EVIDENCE_SYNC_STEPS is the canonical regen list</item>
|
|
17
|
+
<item>RFC-1516: the committed envelope is read via `git show HEAD:<path>`, never the worktree file — an uncommitted hand-edit can never become reusable input; every gate below green+matching+in-window falls back to full re-execution with its reason journalized.</item>
|
|
18
|
+
<item>RFC-1516: reuse is evaluated in emit (not in the sync orchestrator) so the direct `rfc.verification.emit` path, the sync chain, and the stamp's in-process emits share one decision; sync only forwards the escape flag and surfaces the verdict.</item>
|
|
19
|
+
<item>RFC-1516 review-r1: freshness binds to `resultsFrom ?? emittedAt`, not `emittedAt` alone — an envelope that replays records stamps the original execution's anchor, so chained emit+commit cycles cannot extend result age past the window.</item>
|
|
20
|
+
<item>RFC-1516 review-r1: a probes-count mismatch is `malformed` only after the acceptanceHash gate — a legitimately changed list reports `acceptance-changed`; a matching-hash envelope with a short or misshapen probes array is crafted bytes and degrades to full re-execution, never a crash or partial reuse.</item>
|
|
17
21
|
</KEY_DECISIONS>
|
|
18
22
|
<CHANGE_SUMMARY>
|
|
19
23
|
<item>RFC-1306: initial — EVIDENCE_SYNC_STEPS chain + runRfcEvidenceSync via the ctx.invoke port; EVIDENCE-SYNC-01 fail-closed without a kernel host, EVIDENCE-SYNC-02 propagates a failed step's diagnostics verbatim; review-r1: try/catch maps thrown invokes into EVIDENCE-SYNC-02, dry-run exposes `planned` in data.</item>
|
|
20
24
|
<item>RFC-1306: review-r1 — io-native writes, cacheable off on chain generators, EVIDENCE-SYNC-02 on invoke throws</item>
|
|
21
25
|
</CHANGE_SUMMARY>
|
|
22
26
|
*/
|
|
27
|
+
import { execFile } from "../../../src/utils/sync-fs.js";
|
|
28
|
+
import { parse as yamlParse } from "yaml";
|
|
29
|
+
import { gitEnvForCwd } from "../verification-origin.js";
|
|
23
30
|
/**
|
|
24
31
|
* The canonical RFC-evidence regen order (RFC-1306). The emit step is
|
|
25
32
|
* appended conditionally on --id — the chain ends at rfc.verification.emit,
|
|
@@ -33,6 +40,86 @@ export const EVIDENCE_SYNC_STEPS = [
|
|
|
33
40
|
"ecosystem.manifest.generate",
|
|
34
41
|
];
|
|
35
42
|
export const EVIDENCE_SYNC_EMIT_STEP = "rfc.verification.emit";
|
|
43
|
+
/** RFC-1516: the evidence-freshness window — a committed green envelope
|
|
44
|
+
* younger than this may replay its heavy-probe results instead of
|
|
45
|
+
* re-executing them. 4h covers every realistic stamp-retry session while
|
|
46
|
+
* bounding staleness. */
|
|
47
|
+
export const EVIDENCE_REUSE_WINDOW_MS = 14400000;
|
|
48
|
+
/** Reuse is strictly gated — anything short of a well-formed, green,
|
|
49
|
+
* acceptance-matching, in-window envelope falls back to full re-execution.
|
|
50
|
+
* `malformed` covers every unreadable/underspecified shape: unparsable
|
|
51
|
+
* YAML, a non-object body, missing contract fields, bad record elements —
|
|
52
|
+
* and a probes-array length that contradicts a matching acceptanceHash
|
|
53
|
+
* (a crafted envelope; a legitimately different list reports
|
|
54
|
+
* `acceptance-changed` first). */
|
|
55
|
+
export function evaluateEvidenceReuse(opts) {
|
|
56
|
+
if (opts.disabled)
|
|
57
|
+
return { reusable: false, reason: "disabled" };
|
|
58
|
+
if (opts.malformed)
|
|
59
|
+
return { reusable: false, reason: "malformed" };
|
|
60
|
+
const env = opts.committed;
|
|
61
|
+
if (!env)
|
|
62
|
+
return { reusable: false, reason: "absent" };
|
|
63
|
+
if (env.overall !== "pass")
|
|
64
|
+
return { reusable: false, reason: "not-green" };
|
|
65
|
+
if (env.acceptanceHash !== opts.acceptanceHashHex) {
|
|
66
|
+
return { reusable: false, reason: "acceptance-changed" };
|
|
67
|
+
}
|
|
68
|
+
if (opts.probeCountMismatch)
|
|
69
|
+
return { reusable: false, reason: "malformed" };
|
|
70
|
+
// Freshness binds to the oldest replayed result, not the last emission:
|
|
71
|
+
// `resultsFrom` is stamped when an envelope replays committed records, so
|
|
72
|
+
// chained emit+commit cycles cannot extend result age past the window.
|
|
73
|
+
const anchor = typeof env.resultsFrom === "string" ? env.resultsFrom : env.emittedAt;
|
|
74
|
+
const anchorMs = Date.parse(anchor ?? "");
|
|
75
|
+
const now = opts.now ?? Date.now();
|
|
76
|
+
// Future timestamps are outside the window too (60s skew tolerance) —
|
|
77
|
+
// a negative age must never read as "fresh".
|
|
78
|
+
if (!Number.isFinite(anchorMs) ||
|
|
79
|
+
now - anchorMs > EVIDENCE_REUSE_WINDOW_MS ||
|
|
80
|
+
anchorMs - now > 60_000) {
|
|
81
|
+
return { reusable: false, reason: "expired" };
|
|
82
|
+
}
|
|
83
|
+
return { reusable: true, reason: "envelope-reused", reusedFrom: env.emittedAt };
|
|
84
|
+
}
|
|
85
|
+
/** The committed envelope — read from HEAD bytes (`git show`), never the
|
|
86
|
+
* worktree file, so an uncommitted hand-edit can never become reusable
|
|
87
|
+
* input. Returns {envelope} on a contract-shaped parse, {malformed} on
|
|
88
|
+
* bytes that exist but don't satisfy it, {} when nothing is committed. */
|
|
89
|
+
export async function readCommittedEnvelope(workspaceRoot, relPath, expectedProbeCount) {
|
|
90
|
+
const rel = relPath.replace(/\\/g, "/");
|
|
91
|
+
const stdout = await new Promise((resolve) => {
|
|
92
|
+
execFile("git", ["show", `HEAD:${rel}`], { cwd: workspaceRoot, timeout: 5000, env: gitEnvForCwd() }, (err, out) => {
|
|
93
|
+
resolve(err ? "" : out);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
if (stdout.trim().length === 0)
|
|
97
|
+
return {};
|
|
98
|
+
let parsed;
|
|
99
|
+
try {
|
|
100
|
+
parsed = yamlParse(stdout);
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
return { malformed: true };
|
|
104
|
+
}
|
|
105
|
+
if (typeof parsed !== "object" || parsed === null)
|
|
106
|
+
return { malformed: true };
|
|
107
|
+
const env = parsed;
|
|
108
|
+
if (typeof env.rfcId !== "string" ||
|
|
109
|
+
typeof env.emittedAt !== "string" ||
|
|
110
|
+
typeof env.acceptanceHash !== "string" ||
|
|
111
|
+
(env.overall !== "pass" && env.overall !== "fail") ||
|
|
112
|
+
!Array.isArray(env.probes) ||
|
|
113
|
+
env.probes.some((r) => r === null || typeof r !== "object" || typeof r.ok !== "boolean") ||
|
|
114
|
+
(env.resultsFrom !== undefined && typeof env.resultsFrom !== "string")) {
|
|
115
|
+
return { malformed: true };
|
|
116
|
+
}
|
|
117
|
+
// A length mismatch is NOT malformed on its own — an acceptance-changed
|
|
118
|
+
// envelope legitimately describes a different-sized list. The verdict
|
|
119
|
+
// classifies it as malformed only when the hash still matches (crafted).
|
|
120
|
+
const probeCountMismatch = expectedProbeCount !== undefined && env.probes.length !== expectedProbeCount;
|
|
121
|
+
return { envelope: env, probeCountMismatch };
|
|
122
|
+
}
|
|
36
123
|
function childDiagnostics(data) {
|
|
37
124
|
if (data !== null && typeof data === "object") {
|
|
38
125
|
const record = data;
|
|
@@ -52,9 +139,22 @@ export async function runRfcEvidenceSync(input, context) {
|
|
|
52
139
|
const rfcId = input.flags["id"];
|
|
53
140
|
const rfcIdStr = typeof rfcId === "string" && rfcId !== "" ? rfcId : undefined;
|
|
54
141
|
const isDryRun = context.dryRun || input.flags["dry-run"] === true;
|
|
142
|
+
// RFC-1516: the escape flag forwards verbatim to the emit step — every
|
|
143
|
+
// probe then re-executes regardless of envelope freshness.
|
|
144
|
+
const noEvidenceReuse = input.flags["no-evidence-reuse"] === true;
|
|
55
145
|
const plan = [
|
|
56
146
|
...EVIDENCE_SYNC_STEPS.map((step) => ({ step })),
|
|
57
|
-
...(rfcIdStr
|
|
147
|
+
...(rfcIdStr
|
|
148
|
+
? [
|
|
149
|
+
{
|
|
150
|
+
step: EVIDENCE_SYNC_EMIT_STEP,
|
|
151
|
+
flags: {
|
|
152
|
+
id: rfcIdStr,
|
|
153
|
+
...(noEvidenceReuse ? { "no-evidence-reuse": "true" } : {}),
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
]
|
|
157
|
+
: []),
|
|
58
158
|
];
|
|
59
159
|
if (isDryRun) {
|
|
60
160
|
const lines = plan.map((p) => p.flags
|
|
@@ -94,6 +194,7 @@ export async function runRfcEvidenceSync(input, context) {
|
|
|
94
194
|
return syncResult("fail", violations, undefined, "rfc.evidence.sync: no kernel host");
|
|
95
195
|
}
|
|
96
196
|
const steps = [];
|
|
197
|
+
let emitReport = null;
|
|
97
198
|
for (const planned of plan) {
|
|
98
199
|
// A throwing invoke (unresolvable child, host/module failure) still maps
|
|
99
200
|
// into the EVIDENCE-SYNC-02 contract — fail closed, never a raw exception.
|
|
@@ -121,9 +222,19 @@ export async function runRfcEvidenceSync(input, context) {
|
|
|
121
222
|
...(report.summary ? { summary: report.summary } : {}),
|
|
122
223
|
};
|
|
123
224
|
steps.push(stepResult);
|
|
225
|
+
if (planned.step === EVIDENCE_SYNC_EMIT_STEP)
|
|
226
|
+
emitReport = report;
|
|
124
227
|
if (outputFormat === "pretty") {
|
|
125
228
|
const changed = filesModified.length;
|
|
126
229
|
logger.info(` ${planned.step}: ${stepResult.status}${changed > 0 ? ` (${changed} file${changed === 1 ? "" : "s"} changed)` : ""}`);
|
|
230
|
+
// RFC-1516: a one-line note keeps replayed probes visible — an old
|
|
231
|
+
// pass must never look like a fresh execution in pretty output.
|
|
232
|
+
if (planned.step === EVIDENCE_SYNC_EMIT_STEP && report.exitCode === 0) {
|
|
233
|
+
const emitted = report.data?.emitted?.[0];
|
|
234
|
+
if (emitted?.reuse?.reusable === true) {
|
|
235
|
+
logger.info(` ${planned.step}: envelope-reused — ${emitted.heavyProbesReused?.length ?? 0} heavy probe(s) replayed from ${emitted.reuse.reusedFrom}`);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
127
238
|
}
|
|
128
239
|
// EVIDENCE-SYNC-02: stop on the first failing step — a partial sync is
|
|
129
240
|
// reported with the step's diagnostics verbatim, never silently tolerated.
|
|
@@ -142,6 +253,24 @@ export async function runRfcEvidenceSync(input, context) {
|
|
|
142
253
|
}
|
|
143
254
|
}
|
|
144
255
|
const changedFiles = [...new Set(steps.flatMap((s) => s.filesModified))];
|
|
145
|
-
|
|
256
|
+
// RFC-1516: surface the emit step's freshness-window verdict verbatim —
|
|
257
|
+
// a stamp-sync log shows whether heavy probes re-executed or the
|
|
258
|
+
// committed envelope replayed, never silently.
|
|
259
|
+
const emitStep = steps.find((s) => s.step === EVIDENCE_SYNC_EMIT_STEP);
|
|
260
|
+
const emitData = emitStep !== undefined && emitReport !== null
|
|
261
|
+
? emitReport.data
|
|
262
|
+
: null;
|
|
263
|
+
const emittedEntry = emitData?.emitted?.[0];
|
|
264
|
+
return syncResult("pass", [], {
|
|
265
|
+
steps,
|
|
266
|
+
...(rfcIdStr ? { rfcId: rfcIdStr } : {}),
|
|
267
|
+
...(emittedEntry?.reuse ? { reuse: emittedEntry.reuse } : {}),
|
|
268
|
+
...(emittedEntry?.heavyProbesReused?.length
|
|
269
|
+
? { heavyProbesReused: emittedEntry.heavyProbesReused }
|
|
270
|
+
: {}),
|
|
271
|
+
...(emittedEntry?.cheapProbesReRun?.length
|
|
272
|
+
? { cheapProbesReRun: emittedEntry.cheapProbesReRun }
|
|
273
|
+
: {}),
|
|
274
|
+
}, `rfc.evidence.sync: ${steps.length} steps clean, ${changedFiles.length} file${changedFiles.length === 1 ? "" : "s"} changed`);
|
|
146
275
|
}
|
|
147
276
|
//# sourceMappingURL=rfc-evidence-sync.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rfc-evidence-sync.js","sourceRoot":"","sources":["../../../../os/rfc/handlers/rfc-evidence-sync.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rfc-evidence-sync.js","sourceRoot":"","sources":["../../../../os/rfc/handlers/rfc-evidence-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;EAyBE;AAOF,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IACpD,0BAA0B;IAC1B,2BAA2B;IAC3B,8BAA8B;IAC9B,wBAAwB;IACxB,6BAA6B;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;AAE/D;;;0BAG0B;AAC1B,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAAC;AAmBjD;;;;;;mCAMmC;AACnC,MAAM,UAAU,qBAAqB,CAAC,IASrC;IACC,IAAI,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAClE,IAAI,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAA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AAG,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5C,OAAO,UAAU,CACf,MAAM,EACN,EAAE,EACF;QACE,KAAK;QACL,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxC,GAAG,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,YAAY,EAAE,iBAAiB,EAAE,MAAM;YACzC,CAAC,CAAC,EAAE,iBAAiB,EAAE,YAAY,CAAC,iBAAiB,EAAE;YACvD,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,YAAY,EAAE,gBAAgB,EAAE,MAAM;YACxC,CAAC,CAAC,EAAE,gBAAgB,EAAE,YAAY,CAAC,gBAAgB,EAAE;YACrD,CAAC,CAAC,EAAE,CAAC;KACR,EACD,sBAAsB,KAAK,CAAC,MAAM,iBAAiB,YAAY,CAAC,MAAM,QAAQ,YAAY,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,UAAU,CAC7H,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,7 @@ import type { ParsedRfc, RfcCorpusEntry } from "../frontmatter-io.ts";
|
|
|
3
3
|
import type { ReadAndParseRfcResult } from "../frontmatter-io.ts";
|
|
4
4
|
import type { Marker } from "../types.ts";
|
|
5
5
|
import type { ProbeCoverageReport, AcceptanceProbe } from "../types.ts";
|
|
6
|
+
import { type CommittedReview } from "./implement-stamp-deviations.ts";
|
|
6
7
|
export type AddViolationFn = (rfcId: string, file: string, rule: string, message: string, severity?: "error" | "warning") => void;
|
|
7
8
|
export interface AcceptanceCriteriaEvaluation {
|
|
8
9
|
totalChecked: number;
|
|
@@ -81,8 +82,27 @@ export declare function computeProbeCoverage(criterionIds: string[], acceptance:
|
|
|
81
82
|
* Skips lines inside fenced code blocks. Pure function — no I/O.
|
|
82
83
|
*/
|
|
83
84
|
export declare function collectMarkers(body: string, status: string, createdAt: string): Marker[];
|
|
85
|
+
export interface ProbeMetaHit {
|
|
86
|
+
criterion: string;
|
|
87
|
+
probe: "file-contains" | "test";
|
|
88
|
+
pattern: string;
|
|
89
|
+
chars: string[];
|
|
90
|
+
suggestion: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Scans file-contains/test probe patterns for regexp-trap characters —
|
|
94
|
+
* patterns execute via `new RegExp(...)`, so an unescaped `(` or `)` groups
|
|
95
|
+
* instead of matching literally and a `**` + slash glob shape is a
|
|
96
|
+
* nested-quantifier error. A `# <!-- probe-meta: intentional -->` comment on the `pattern:` line
|
|
97
|
+
* (or the line directly above it) in the frontmatter suppresses the warning
|
|
98
|
+
* for that pattern only; YAML drops comments at parse time, so the marker is
|
|
99
|
+
* located in the raw frontmatter source.
|
|
100
|
+
*/
|
|
101
|
+
export declare function collectProbeMetacharHits(acceptance: unknown, frontmatterSource: string): ProbeMetaHit[];
|
|
84
102
|
export declare function validateSingleRfc(fileName: string, parsed: ParsedRfc, allParsed: Map<string, RfcCorpusEntry>, seenIds: Map<string, string>, validDnaIds: Set<number>, validApIds: Set<number>, knownKeys: Set<string>, workspaceRoot: string, addViolation: AddViolationFn, seenFilenameNumbers?: Map<number, string>,
|
|
85
103
|
/** RFC-1467: memoized decision-log getter shared across drafts (V-52). */
|
|
86
|
-
decisionLog?: () => Promise<DecisionLogEntry[]
|
|
104
|
+
decisionLog?: () => Promise<DecisionLogEntry[]>,
|
|
105
|
+
/** RFC-1513: memoized committed-review index shared across RFCs (V-49). */
|
|
106
|
+
committedReviews?: () => Promise<CommittedReview[]>): Promise<Marker[]>;
|
|
87
107
|
export declare function checkFrontmatterYamlParse(fileName: string, result: ReadAndParseRfcResult | undefined, addViolation: AddViolationFn): void;
|
|
88
108
|
//# sourceMappingURL=validate-rules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-rules.d.ts","sourceRoot":"","sources":["../../../../os/rfc/handlers/validate-rules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate-rules.d.ts","sourceRoot":"","sources":["../../../../os/rfc/handlers/validate-rules.ts"],"names":[],"mappings":"AA4CA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAqD,MAAM,EAAE,MAAM,aAAa,CAAC;AAiB7F,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKxE,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,iCAAiC,CAAC;AAmBzC,MAAM,MAAM,cAAc,GAAG,CAC3B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,KAC3B,IAAI,CAAC;AAMV,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,mBAAmB,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACtD,2BAA2B,EAAE;QAAE,IAAI,EA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_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-1453: executed outcome probes, IMP-14 surface gate, outcome.serve + V-47/V-48</item>
|
|
10
9
|
<item>RFC-1455: fixed inputs bound to outcome probes — V-50/V-51 + skills</item>
|
|
10
|
+
<item>RFC-1534: V-PROBE-META-01 metachar lint — warning on unescaped parens and `**` + slash glob shapes in file-contains/test probe patterns at authoring statuses; `probe-meta: intentional` comment suppresses per-pattern via raw frontmatterSource scan.</item>
|
|
11
11
|
<item>RFC-1454: review deviations recorded in the RFC — IMP-15 gate, V-49 provenance, skill contract</item>
|
|
12
12
|
<item>RFC-1467: block rfc.create on terminal-kind near-duplicates until --revisit acknowledges + V-52 validate mirror</item>
|
|
13
13
|
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
14
14
|
|
|
15
15
|
runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
|
|
16
|
-
<
|
|
16
|
+
<item>RFC-1513: steps 2-4 — batched committed-review reads + run-scoped index
|
|
17
|
+
|
|
18
|
+
OriginGit gains optional showMany backed by one git cat-file --batch
|
|
19
|
+
process (per-spec null on missing objects, wholesale null on spawn or
|
|
20
|
+
framing failure). collectCommittedReviews prefers it and keeps the
|
|
21
|
+
sequential show loop for stubs. rfc.validate memoizes the index once
|
|
22
|
+
per run and V-49 consumes it — identical diagnostics, one batched read.</item>
|
|
23
|
+
<history>RFC-0303, RFC-0722, RFC-0755, RFC-0795, RFC-0997, RFC-1006, RFC-1097, RFC-1271, RFC-1322, RFC-1330, RFC-1334, RFC-1336, RFC-1391, RFC-1453</history>
|
|
17
24
|
</CHANGE_SUMMARY>
|
|
18
25
|
*/
|
|
19
26
|
import path from "node:path";
|
|
@@ -29,7 +36,7 @@ import { isPresenceProbe } from "../verification-origin.js";
|
|
|
29
36
|
import { loadForgeConfig } from "../../../src/config/forge-config.js";
|
|
30
37
|
import { runProbeMatchesOutcomeBuild } from "./implement-stamp-outcome.js";
|
|
31
38
|
import { evaluateFixedInputs } from "./fixed-inputs.js";
|
|
32
|
-
import { collectCommittedReviews, parseDeviationsSection } from "./implement-stamp-deviations.js";
|
|
39
|
+
import { collectCommittedReviews, parseDeviationsSection, } from "./implement-stamp-deviations.js";
|
|
33
40
|
import { DNA_DOCS, AP_DOCS } from "./shared.js";
|
|
34
41
|
// Ambient default for helper fns without a context param — handlers override
|
|
35
42
|
// with `const io = resolveIo(context.io)` inside their own scope.
|
|
@@ -398,9 +405,64 @@ export function collectMarkers(body, status, createdAt) {
|
|
|
398
405
|
}
|
|
399
406
|
return markers;
|
|
400
407
|
}
|
|
408
|
+
const PROBE_META_MARKER = "probe-meta: intentional";
|
|
409
|
+
/**
|
|
410
|
+
* Scans file-contains/test probe patterns for regexp-trap characters —
|
|
411
|
+
* patterns execute via `new RegExp(...)`, so an unescaped `(` or `)` groups
|
|
412
|
+
* instead of matching literally and a `**` + slash glob shape is a
|
|
413
|
+
* nested-quantifier error. A `# <!-- probe-meta: intentional -->` comment on the `pattern:` line
|
|
414
|
+
* (or the line directly above it) in the frontmatter suppresses the warning
|
|
415
|
+
* for that pattern only; YAML drops comments at parse time, so the marker is
|
|
416
|
+
* located in the raw frontmatter source.
|
|
417
|
+
*/
|
|
418
|
+
export function collectProbeMetacharHits(acceptance, frontmatterSource) {
|
|
419
|
+
const probes = Array.isArray(acceptance) ? acceptance : [];
|
|
420
|
+
const fmLines = frontmatterSource.split("\n");
|
|
421
|
+
const suppressed = (field, value) => {
|
|
422
|
+
for (let i = 0; i < fmLines.length; i++) {
|
|
423
|
+
const line = fmLines[i];
|
|
424
|
+
if (!line.includes(`${field}:`) || !line.includes(value))
|
|
425
|
+
continue;
|
|
426
|
+
return (line.includes(PROBE_META_MARKER) || (fmLines[i - 1] ?? "").includes(PROBE_META_MARKER));
|
|
427
|
+
}
|
|
428
|
+
return false;
|
|
429
|
+
};
|
|
430
|
+
const hits = [];
|
|
431
|
+
for (const probe of probes) {
|
|
432
|
+
const kind = probe.probe;
|
|
433
|
+
if (kind !== "file-contains" && kind !== "test")
|
|
434
|
+
continue;
|
|
435
|
+
// file-contains runs `new RegExp(pattern)`; test passes testName to
|
|
436
|
+
// `vitest -t` — a regexp filter on both paths.
|
|
437
|
+
const field = kind === "test" ? "testName" : "pattern";
|
|
438
|
+
const raw = probe[field];
|
|
439
|
+
const pattern = typeof raw === "string" ? raw : "";
|
|
440
|
+
if (!pattern)
|
|
441
|
+
continue;
|
|
442
|
+
const chars = [];
|
|
443
|
+
if (/(^|[^\\])\(/.test(pattern))
|
|
444
|
+
chars.push("unescaped `(`");
|
|
445
|
+
if (/(^|[^\\])\)/.test(pattern))
|
|
446
|
+
chars.push("unescaped `)`");
|
|
447
|
+
if (pattern.includes("**/"))
|
|
448
|
+
chars.push("`**/` glob shape");
|
|
449
|
+
if (chars.length === 0 || suppressed(field, pattern))
|
|
450
|
+
continue;
|
|
451
|
+
hits.push({
|
|
452
|
+
criterion: typeof probe.criterion === "string" ? probe.criterion : "?",
|
|
453
|
+
probe: kind,
|
|
454
|
+
pattern,
|
|
455
|
+
chars,
|
|
456
|
+
suggestion: pattern.replace(/\*\*\//g, "(?:.*/)?").replace(/([()])/g, "\\$1"),
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
return hits;
|
|
460
|
+
}
|
|
401
461
|
export async function validateSingleRfc(fileName, parsed, allParsed, seenIds, validDnaIds, validApIds, knownKeys, workspaceRoot, addViolation, seenFilenameNumbers,
|
|
402
462
|
/** RFC-1467: memoized decision-log getter shared across drafts (V-52). */
|
|
403
|
-
decisionLog
|
|
463
|
+
decisionLog,
|
|
464
|
+
/** RFC-1513: memoized committed-review index shared across RFCs (V-49). */
|
|
465
|
+
committedReviews) {
|
|
404
466
|
const fm = parsed.frontmatter;
|
|
405
467
|
const body = parsed.body;
|
|
406
468
|
const relFile = path.join(RFC_DIR, fileName);
|
|
@@ -624,6 +686,14 @@ decisionLog) {
|
|
|
624
686
|
}
|
|
625
687
|
}
|
|
626
688
|
}
|
|
689
|
+
// V-PROBE-META-01 (RFC-1534): regexp-trap metachar lint — warning at
|
|
690
|
+
// authoring statuses (draft/reviewing/accepted), never a blocking error;
|
|
691
|
+
// terminal statuses are archival and stay silent.
|
|
692
|
+
if (status === "draft" || status === "reviewing" || status === "accepted") {
|
|
693
|
+
for (const hit of collectProbeMetacharHits(fm["acceptance"], parsed.frontmatterSource ?? "")) {
|
|
694
|
+
addViolation(rfcId, relFile, "V-PROBE-META-01", `${hit.criterion} ${hit.probe} pattern "${hit.pattern}" carries ${hit.chars.join(", ")} — probe patterns execute via new RegExp, so these characters group/glob instead of matching literally. Escape or rewrite (e.g. "${hit.suggestion}"); an intentional regexp takes a # <!-- probe-meta: intentional --> comment on the pattern line or the line above.`, "warning");
|
|
695
|
+
}
|
|
696
|
+
}
|
|
627
697
|
// V-38..V-42: criteria content rules (RFC-1006, post-cutoff only)
|
|
628
698
|
const isCriteriaPostCutoff = createdAt >= RFC_CRITERIA_CONTENT_CUTOFF && !isArchived;
|
|
629
699
|
if (isCriteriaPostCutoff) {
|
|
@@ -794,7 +864,9 @@ decisionLog) {
|
|
|
794
864
|
catch {
|
|
795
865
|
// forge.yaml unreadable → no committed-report index → entries dangle.
|
|
796
866
|
}
|
|
797
|
-
const reviews =
|
|
867
|
+
const reviews = committedReviews
|
|
868
|
+
? await committedReviews()
|
|
869
|
+
: await collectCommittedReviews({ run: (args) => execGitLog(workspaceRoot, args) }, reviewsDir);
|
|
798
870
|
const known = new Set(reviews.map((r) => r.reviewId));
|
|
799
871
|
for (const entry of entries) {
|
|
800
872
|
if (!known.has(entry.reviewId)) {
|