@warpgogol/forge 9.3.0 → 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 +33 -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 +13 -3
- 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 +23 -7
- 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 +18 -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/profiles/forge-shell.yaml +1 -2
- package/profiles/knowledge.yaml +1 -1
- package/profiles/system.yaml +2 -2
- package/profiles/typescript.yaml +0 -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/profile-flow-hooks.test.ts +15 -0
- 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
package/src/conformance/index.ts
CHANGED
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
</non-goals>
|
|
9
9
|
</MODULE_CONTRACT>
|
|
10
10
|
<CHANGE_SUMMARY>
|
|
11
|
-
<item>RFC-1365: initial conformance execution path — emit/mirror/consumer legs, tail-bounded output, skip/require verdicts.</item>
|
|
12
11
|
<item>RFC-1365: step 1 — contractProducers schema + conformance execution path</item>
|
|
13
12
|
<item>RFC-1365: step 2 — forge.conformance.run/validate commands + dual-surface registration</item>
|
|
14
13
|
<item>RFC-1365: compass header fix — drop forbidden keywords/responsibilities tags, expand purpose</item>
|
|
15
14
|
<item>RFC-1365: review round 1 — CONF-03 rescoped producer-side (Q-9), producers[] json shape, crash guard + leg output, transport attribution, env semantics, writes declared, regen sweep</item>
|
|
15
|
+
<item>RFC-1539: package-sourced specs and published consumer validators in Forge</item>
|
|
16
|
+
<history>RFC-1365</history>
|
|
16
17
|
</CHANGE_SUMMARY>
|
|
17
18
|
*/
|
|
18
19
|
|
|
@@ -158,6 +159,18 @@ async function executeLeg(
|
|
|
158
159
|
* invoke the authoritative consumer validator inside the consumer checkout.
|
|
159
160
|
* The tmpdir is removed in `finally`; nothing is written into the repo.
|
|
160
161
|
*/
|
|
162
|
+
/**
|
|
163
|
+
* RFC-1539: absolute path of a published validator's bin inside the producer
|
|
164
|
+
* repository (`<repoRoot>/node_modules/.bin/<name>`, `.cmd` shim on win32), or
|
|
165
|
+
* null when it is not installed.
|
|
166
|
+
*/
|
|
167
|
+
export function resolvePackageConsumerBin(repoRoot: string, name: string): string | null {
|
|
168
|
+
const base = join(repoRoot, "node_modules", ".bin", name);
|
|
169
|
+
const candidates = process.platform === "win32" ? [`${base}.cmd`, base] : [base];
|
|
170
|
+
for (const candidate of candidates) if (existsSync(candidate)) return candidate;
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
|
|
161
174
|
export async function runProducerConformance(
|
|
162
175
|
decl: ContractProducerDecl,
|
|
163
176
|
opts: { repoRoot: string; requireConsumer?: boolean },
|
|
@@ -238,6 +251,38 @@ export async function runProducerConformance(
|
|
|
238
251
|
}
|
|
239
252
|
}
|
|
240
253
|
|
|
254
|
+
// --- consumer leg, package form (RFC-1539): the published validator's bin, never skipped ---
|
|
255
|
+
if (decl.consumer.package !== undefined) {
|
|
256
|
+
const [bin, ...rest] = decl.consumer.validator.argv;
|
|
257
|
+
const binPath = resolvePackageConsumerBin(opts.repoRoot, bin);
|
|
258
|
+
if (binPath === null) {
|
|
259
|
+
legs.push({ leg: "consumer", status: "fail", durationMs: 0 });
|
|
260
|
+
diagnostics.push(
|
|
261
|
+
`consumer-missing: consumer.package ${decl.consumer.package} is not installed or has no bin "${bin}" in node_modules/.bin — a package consumer never self-skips (RFC-1539)`,
|
|
262
|
+
);
|
|
263
|
+
return verdict("fail", "consumer");
|
|
264
|
+
}
|
|
265
|
+
leg = await executeLeg(
|
|
266
|
+
"consumer",
|
|
267
|
+
[binPath, ...rest],
|
|
268
|
+
opts.repoRoot,
|
|
269
|
+
bundleDir,
|
|
270
|
+
decl.consumer.validator.timeoutMs ?? CONFORMANCE_DEFAULT_TIMEOUT_MS,
|
|
271
|
+
);
|
|
272
|
+
legs.push(leg);
|
|
273
|
+
if (leg.status === "fail") {
|
|
274
|
+
diagnostics.push(
|
|
275
|
+
leg.transport === "spawn-error"
|
|
276
|
+
? `consumer validator spawn failed: ${leg.errorDetail ?? "unknown spawn error"} — transport failure, not a bundle verdict`
|
|
277
|
+
: leg.transport === "timeout"
|
|
278
|
+
? `consumer validator timed out after ${decl.consumer.validator.timeoutMs ?? CONFORMANCE_DEFAULT_TIMEOUT_MS}ms — transport failure, not a bundle verdict`
|
|
279
|
+
: `consumer validator ${decl.consumer.package} exited ${leg.exitCode} — see captured output`,
|
|
280
|
+
);
|
|
281
|
+
return verdict("fail", "consumer");
|
|
282
|
+
}
|
|
283
|
+
return verdict("pass", undefined);
|
|
284
|
+
}
|
|
285
|
+
|
|
241
286
|
// --- consumer leg: the authoritative validator in the sibling checkout ---
|
|
242
287
|
const consumerRoot = resolveConsumerRoot(decl.consumer.root, opts.repoRoot);
|
|
243
288
|
if (!existsSync(consumerRoot)) {
|
|
@@ -71,6 +71,7 @@ import {
|
|
|
71
71
|
type ExhaustiveResult,
|
|
72
72
|
} from "./exhaustive.ts";
|
|
73
73
|
import { proofSpecSchema, type ProofCheckResult, type ProofSpec } from "./proof-spec.ts";
|
|
74
|
+
import { resolveSpawnPlan } from "../utils/spawn.ts";
|
|
74
75
|
|
|
75
76
|
/** Default per-run bound when the caller passes no timeoutMs (RFC-1391: 30 min). */
|
|
76
77
|
export const PROOF_CHECK_DEFAULT_TIMEOUT_MS = 30 * 60_000;
|
|
@@ -124,10 +125,15 @@ function spawnArgv(
|
|
|
124
125
|
opts: { cwd: string; timeoutMs: number; env?: NodeJS.ProcessEnv },
|
|
125
126
|
): Promise<SpawnOutcome> {
|
|
126
127
|
return new Promise((res) => {
|
|
127
|
-
|
|
128
|
+
// Bare package-manager names (pnpm/npm/yarn/bun) are .cmd shims on
|
|
129
|
+
// Windows — resolved via PATHEXT; unresolved names keep ENOENT so a
|
|
130
|
+
// missing checker still reports `unavailable`, never a refuted exit.
|
|
131
|
+
const plan = resolveSpawnPlan(argv[0]!, argv.slice(1));
|
|
132
|
+
const child = spawn(plan.command, plan.args, {
|
|
128
133
|
cwd: opts.cwd,
|
|
129
134
|
env: opts.env ?? process.env,
|
|
130
135
|
stdio: ["ignore", "pipe", "pipe"],
|
|
136
|
+
windowsVerbatimArguments: plan.verbatim,
|
|
131
137
|
});
|
|
132
138
|
let out = "";
|
|
133
139
|
let err = "";
|
|
@@ -188,7 +194,9 @@ function persistLog(
|
|
|
188
194
|
if (!content.trim()) return undefined;
|
|
189
195
|
const dir = proofsDir(workspaceRoot);
|
|
190
196
|
mkdirSync(dir, { recursive: true });
|
|
191
|
-
|
|
197
|
+
// The returned path is a repo-relative report path — forward slashes so
|
|
198
|
+
// callers can print and re-resolve it identically on every platform.
|
|
199
|
+
const rel = join(".cache", "proofs", `${specId}.${name}`).replace(/\\/g, "/");
|
|
192
200
|
writeFileSync(join(dir, `${specId}.${name}`), tail(content));
|
|
193
201
|
return rel;
|
|
194
202
|
}
|
|
@@ -152,7 +152,9 @@ function copyDirectory(
|
|
|
152
152
|
for (const entry of entries) {
|
|
153
153
|
const srcPath = path.join(src, entry.name);
|
|
154
154
|
const destPath = path.join(dest, entry.name);
|
|
155
|
-
|
|
155
|
+
// Logical repo-relative path — forward slashes so exclusion patterns and
|
|
156
|
+
// the reported filesCopied/filesSkipped lists are platform-stable.
|
|
157
|
+
const relPath = path.relative(rootSrc, srcPath).replace(/\\/g, "/");
|
|
156
158
|
|
|
157
159
|
if (entry.isDirectory()) {
|
|
158
160
|
if (isExcluded(relPath, excludePatterns)) continue;
|
|
@@ -152,7 +152,9 @@ function copyDirectory(
|
|
|
152
152
|
for (const entry of entries) {
|
|
153
153
|
const srcPath = path.join(src, entry.name);
|
|
154
154
|
const destPath = path.join(dest, entry.name);
|
|
155
|
-
|
|
155
|
+
// Logical repo-relative path — forward slashes so exclusion patterns and
|
|
156
|
+
// the reported filesCopied/filesSkipped lists are platform-stable.
|
|
157
|
+
const relPath = path.relative(rootSrc, srcPath).replace(/\\/g, "/");
|
|
156
158
|
|
|
157
159
|
if (entry.isDirectory()) {
|
|
158
160
|
if (isExcluded(relPath, excludePatterns)) continue;
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
</non-goals>
|
|
8
8
|
</MODULE_CONTRACT>
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
|
-
<item>RFC-1097: sweep — packages/forge + services clean
|
|
11
|
-
|
|
12
|
-
Sweep batch 2: real KEY_DECISIONS on 10 files, expanded purposes (CONTRACT-02/PURPOSE-02), headers on mission/index + gen-upstreams, sanitizeItemText in summary.record (literal Compass tags corrupted history), excludedPaths for wrangler types, test-fixtures testPattern. forge+services now 0 diagnostics under --mode error.</item>
|
|
13
10
|
<item>RFC-1255: Single blank line after the generated header — header ends in a newline so "\n\n" produced two blank lines that prettier collapsed, ping-ponging doctor's stale check. wsTypes resolution moved to shared resolveWorkspaceTypes.</item>
|
|
14
11
|
<item>RFC-1365: step 4 — DNA-115, CONF-* remediation entries, agents-generate convention section</item>
|
|
15
12
|
<item>RFC-1485: sweep compass headers — forge-src + forge root eslint</item>
|
|
16
13
|
<item>RFC-1500: step 4 — branch-model AGENTS section and consumer docs</item>
|
|
14
|
+
<item>RFC-1539: amend dna-55 and dna-115 for published spec packages
|
|
15
|
+
|
|
16
|
+
Guides, fo-spec-ingest routing, command descriptions and regenerated command docs, remediation entries for SPEC-15..18 and CONF-07..09; resyncs the stale .agents fo-system-dispatch mirror (ADR-0126 source line).</item>
|
|
17
17
|
<history>RFC-0391, RFC-0393, RFC-0548, RFC-0549, RFC-0551, RFC-0611, RFC-0640, RFC-0643, RFC-0664, RFC-1097, RFC-1253</history>
|
|
18
18
|
</CHANGE_SUMMARY>
|
|
19
19
|
*/
|
|
@@ -448,7 +448,7 @@ export async function runAgentsGenerate(
|
|
|
448
448
|
if ((config.contractProducers ?? []).length > 0) {
|
|
449
449
|
dynamicLines.push("## Golden conformance for declared contract producers");
|
|
450
450
|
dynamicLines.push("");
|
|
451
|
-
dynamicLines.push("This repository declares `contractProducers[]` in `forge.yaml` — every declared producer MUST keep a working golden-conformance path: `emit` writes the bundle into the forge-provided dir (`{bundle}` argv placeholder / `FORGE_CONFORMANCE_BUNDLE_DIR`), the optional `mirror` leg re-checks the same bundle, and the `consumer` leg invokes the authoritative consumer validator inside `consumer.root` (DNA-115).");
|
|
451
|
+
dynamicLines.push("This repository declares `contractProducers[]` in `forge.yaml` — every declared producer MUST keep a working golden-conformance path: `emit` writes the bundle into the forge-provided dir (`{bundle}` argv placeholder / `FORGE_CONFORMANCE_BUNDLE_DIR`), the optional `mirror` leg re-checks the same bundle, and the `consumer` leg invokes the authoritative consumer validator — the installed bin of a published validator package (`consumer.package`, exact-pinned devDependency, never self-skips — RFC-1539) or, for consumers without a published validator, inside the sibling checkout `consumer.root` (DNA-115).");
|
|
452
452
|
dynamicLines.push("");
|
|
453
453
|
dynamicLines.push("- One execution path serves both surfaces: `forge.conformance.run --producer <id>` (or `--all`) for operator/CI runs, and the `@warpgogol/forge/conformance` helper (`consumerAvailable` + `runProducerConformance`) for vitest wrappers — never hand-roll spawn/mkdtemp/skip plumbing in producer tests.");
|
|
454
454
|
dynamicLines.push("- An absent `consumer.root` self-skips with an explicit verdict; use `--require-consumer` or `FORGE_CONFORMANCE_REQUIRE=1` in environments where the checkout is guaranteed so the guard fails closed instead of silently degrading.");
|
|
@@ -108,7 +108,9 @@ export async function generateNestedAgentsMd(
|
|
|
108
108
|
semanticLayerBlock,
|
|
109
109
|
NESTED_AGENTS_FOOTER,
|
|
110
110
|
);
|
|
111
|
-
|
|
111
|
+
// relPath is a logical repo-relative report path — forward slashes on
|
|
112
|
+
// every platform (ws.path is already slash-normalized by discovery).
|
|
113
|
+
const relPath = path.posix.join(ws.path, "AGENTS.md");
|
|
112
114
|
|
|
113
115
|
if (dryRun) {
|
|
114
116
|
renderedFiles[relPath] = content;
|
|
@@ -197,7 +197,7 @@ export async function runScaffoldProject(
|
|
|
197
197
|
if (outputFormat === "pretty") {
|
|
198
198
|
logger.info(`Running: ${cmd}`);
|
|
199
199
|
}
|
|
200
|
-
const res = await execCommand(cmd, workspaceRoot,
|
|
200
|
+
const res = await execCommand(cmd, workspaceRoot, 300000);
|
|
201
201
|
if (res.ok) {
|
|
202
202
|
installLog.push(`${cmd} — ok`);
|
|
203
203
|
if (outputFormat === "pretty") {
|
|
@@ -236,7 +236,7 @@ export async function runScaffoldProject(
|
|
|
236
236
|
if (outputFormat === "pretty") {
|
|
237
237
|
logger.info(`Running: ${cmd}`);
|
|
238
238
|
}
|
|
239
|
-
const res2 = await execCommand(cmd, wsDir,
|
|
239
|
+
const res2 = await execCommand(cmd, wsDir, 300000);
|
|
240
240
|
if (res2.ok) {
|
|
241
241
|
installLog.push(`${cmd} — ok`);
|
|
242
242
|
if (outputFormat === "pretty") {
|
|
@@ -11,12 +11,12 @@ With --update-npm, also updates @warpgogol/forge from npm before syncing (skippe
|
|
|
11
11
|
</non-goals>
|
|
12
12
|
</MODULE_CONTRACT>
|
|
13
13
|
<CHANGE_SUMMARY>
|
|
14
|
-
<item>RFC-1154: sync skills/_shared/ convention docs to .agents/skills/_shared/ — fo-* SKILL.md references dangled for npm consumers</item>
|
|
15
14
|
<item>RFC-1255: Knowledge conflicts land in .forge/knowledge-conflicts.txt (summary + path in console instead of a 60+ entry dump); exposed as knowledgeConflicts/knowledgeConflictsReport on UpgradeResult. Prettierignore plan now enumerates generated AGENTS.md paths.</item>
|
|
16
15
|
<item>RFC-1481: add knowledge.conflicts.resolve next steps on same-version and regular upgrade results.</item>
|
|
17
16
|
<item>RFC-1481: collapse compass summaries and add missing contract blocks</item>
|
|
18
17
|
<item>RFC-1500: step 3 — forge.upgrade reports flow state</item>
|
|
19
|
-
<
|
|
18
|
+
<item>RFC-1515: harden forge flow worktree lifecycle against vanished paths, forge-local state, dead-holder locks and generated drift</item>
|
|
19
|
+
<history>RFC-0543, RFC-0611, RFC-0663, RFC-0664, RFC-1097, RFC-1154, RFC-1224</history>
|
|
20
20
|
</CHANGE_SUMMARY>
|
|
21
21
|
*/
|
|
22
22
|
|
|
@@ -555,6 +555,17 @@ async function writeKnowledgeConflictsReport(
|
|
|
555
555
|
): Promise<string | null> {
|
|
556
556
|
const rel = ".forge/knowledge-conflicts.txt";
|
|
557
557
|
try {
|
|
558
|
+
// RFC-1515 AC-5: the writer self-ensures .gitignore coverage — the report
|
|
559
|
+
// must never count as worktree dirt (the pinned-audit.log pattern).
|
|
560
|
+
const gitignorePath = path.join(workspaceRoot, ".gitignore");
|
|
561
|
+
try {
|
|
562
|
+
const existing = await io.readFile(gitignorePath);
|
|
563
|
+
if (!existing.split("\n").some((line) => line.trim() === rel)) {
|
|
564
|
+
await io.writeFile(gitignorePath, `${existing.trimEnd()}\n${rel}\n`);
|
|
565
|
+
}
|
|
566
|
+
} catch {
|
|
567
|
+
await io.writeFile(gitignorePath, `${rel}\n`);
|
|
568
|
+
}
|
|
558
569
|
await io.writeFile(
|
|
559
570
|
path.join(workspaceRoot, rel),
|
|
560
571
|
[
|
|
@@ -191,7 +191,9 @@ export function discoverWorkspaces(
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
results.push({
|
|
194
|
-
|
|
194
|
+
// Repo-relative logical path — always forward slashes so generated/
|
|
195
|
+
// skipped/renderedFiles report keys are platform-stable.
|
|
196
|
+
path: path.relative(workspaceRoot, childPath).replace(/\\/g, "/"),
|
|
195
197
|
type,
|
|
196
198
|
hasAgentsMd,
|
|
197
199
|
isGenerated,
|
|
@@ -68,7 +68,7 @@ describe("resolveDocument", () => {
|
|
|
68
68
|
"---\nid: RFC-1002\nstatus: implemented\n---\n# RFC-1002\n",
|
|
69
69
|
);
|
|
70
70
|
const doc = await resolveDocument(tmpDir, "RFC-1002");
|
|
71
|
-
expect(doc?.file).toContain("archive
|
|
71
|
+
expect(doc?.file).toContain(path.join("archive", "implemented"));
|
|
72
72
|
expect(doc?.frontmatter["status"]).toBe("implemented");
|
|
73
73
|
});
|
|
74
74
|
|
package/src/skill-schema.ts
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-0393: added optional bindings field (requires/optional arrays of binding keys).</item>
|
|
10
9
|
<item>RFC-0523: expanded concerns enum from binary to four-level taxonomy (read-only | document-only | content-mutation | code-mutation).</item>
|
|
11
10
|
<item>RFC-0524: added optional knowledge field (array of file names relative to SKILL.md directory).</item>
|
|
12
11
|
<item>RFC-0548: added optional triggers field (array of natural-language trigger phrases, max 5 entries, each 5-100 chars) for intent-to-skill routing.</item>
|
|
13
12
|
<item>RFC-1271: added optional notApplicableWhen and costNotes fields — skill applicability metadata for mode-aware routing.</item>
|
|
14
|
-
<
|
|
13
|
+
<item>ADR-0122: vendor OpenDesign craft knowledge axis + craft.requires loader/lint</item>
|
|
14
|
+
<history>RFC-0374, RFC-0393</history>
|
|
15
15
|
</CHANGE_SUMMARY>
|
|
16
16
|
*/
|
|
17
17
|
|
|
@@ -32,6 +32,13 @@ export const skillFrontmatterSchema = z.object({
|
|
|
32
32
|
})
|
|
33
33
|
.optional(),
|
|
34
34
|
knowledge: z.array(z.string()).optional(),
|
|
35
|
+
// ADR-0122: vendored craft-knowledge slugs the skill wants loaded — resolved
|
|
36
|
+
// tolerantly by the craft axis loader; craft.validate fails on unknown slugs.
|
|
37
|
+
craft: z
|
|
38
|
+
.object({
|
|
39
|
+
requires: z.array(z.string()).default([]),
|
|
40
|
+
})
|
|
41
|
+
.optional(),
|
|
35
42
|
// Named triggerPhrases, not triggers — agent-IDE skill loaders (Devin CLI,
|
|
36
43
|
// Windsurf) reserve `triggers` for invocation modes (user/model); a list of
|
|
37
44
|
// phrases parses to zero valid modes and the skill is dropped entirely.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>RFC-1539 spec source resolver — one answer to "where is spec X": vendored docs/specs/ directories (DNA-55) and published spec packages declared in forge.yaml specPackages[] and installed from the workspace root. spec.validate, spec.status and consumer code generators read through it.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>Never writes into node_modules or docs/specs/.</item>
|
|
6
|
+
<item>Never searches nested workspace packages — a spec package is a root dependency (SPEC-17).</item>
|
|
7
|
+
</non-goals>
|
|
8
|
+
</MODULE_CONTRACT>
|
|
9
|
+
<CHANGE_SUMMARY>
|
|
10
|
+
<item>RFC-1539: resolveSpecSource/listSpecSources + SPEC-15..18 declaration diagnostics</item>
|
|
11
|
+
<item>RFC-1539: package-sourced specs and published consumer validators in Forge</item>
|
|
12
|
+
</CHANGE_SUMMARY>
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
16
|
+
import { createRequire } from "node:module";
|
|
17
|
+
import path from "node:path";
|
|
18
|
+
import { loadForgeConfig, type SpecPackageEntry } from "../config/forge-config.ts";
|
|
19
|
+
|
|
20
|
+
export type SpecSource =
|
|
21
|
+
| { kind: "vendored"; specId: string; dir: string }
|
|
22
|
+
| { kind: "package"; specId: string; dir: string; package: string; version: string };
|
|
23
|
+
|
|
24
|
+
export interface SpecSourceDiagnostic {
|
|
25
|
+
rule: "SPEC-15" | "SPEC-16" | "SPEC-17" | "SPEC-18";
|
|
26
|
+
severity: "error" | "warning";
|
|
27
|
+
specId?: string;
|
|
28
|
+
message: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface SpecSourceListing {
|
|
32
|
+
sources: SpecSource[];
|
|
33
|
+
diagnostics: SpecSourceDiagnostic[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** An exact semver pin: no range operators, wildcards, tags or protocols. */
|
|
37
|
+
const EXACT_PIN = /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/;
|
|
38
|
+
|
|
39
|
+
function readJson(file: string): Record<string, unknown> | null {
|
|
40
|
+
try {
|
|
41
|
+
return JSON.parse(readFileSync(file, "utf-8")) as Record<string, unknown>;
|
|
42
|
+
} catch {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function rootPin(workspaceRoot: string, pkg: string): string | undefined {
|
|
48
|
+
const manifest = readJson(path.join(workspaceRoot, "package.json"));
|
|
49
|
+
if (!manifest) return undefined;
|
|
50
|
+
for (const field of ["dependencies", "devDependencies"] as const) {
|
|
51
|
+
const deps = manifest[field] as Record<string, string> | undefined;
|
|
52
|
+
if (deps && typeof deps[pkg] === "string") return deps[pkg];
|
|
53
|
+
}
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** The installed package root and version, resolved from the workspace root only. */
|
|
58
|
+
function installedPackage(
|
|
59
|
+
workspaceRoot: string,
|
|
60
|
+
pkg: string,
|
|
61
|
+
): { dir: string; version: string } | null {
|
|
62
|
+
try {
|
|
63
|
+
const req = createRequire(path.join(workspaceRoot, "package.json"));
|
|
64
|
+
const manifestPath = req.resolve(`${pkg}/package.json`);
|
|
65
|
+
const manifest = readJson(manifestPath);
|
|
66
|
+
if (!manifest || typeof manifest.version !== "string") return null;
|
|
67
|
+
return { dir: path.dirname(manifestPath), version: manifest.version };
|
|
68
|
+
} catch {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function specsDirOf(workspaceRoot: string): string {
|
|
74
|
+
try {
|
|
75
|
+
return loadForgeConfig(workspaceRoot).paths.specsDir;
|
|
76
|
+
} catch {
|
|
77
|
+
return "docs/specs";
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function declaredSpecPackages(workspaceRoot: string): SpecPackageEntry[] {
|
|
82
|
+
try {
|
|
83
|
+
return loadForgeConfig(workspaceRoot).specPackages ?? [];
|
|
84
|
+
} catch {
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Vendored spec dirs (those with forge-spec.yaml) plus every resolvable declared package. */
|
|
90
|
+
export function listSpecSources(
|
|
91
|
+
workspaceRoot: string,
|
|
92
|
+
declared: SpecPackageEntry[] = declaredSpecPackages(workspaceRoot),
|
|
93
|
+
): SpecSourceListing {
|
|
94
|
+
const diagnostics: SpecSourceDiagnostic[] = [];
|
|
95
|
+
const sources: SpecSource[] = [];
|
|
96
|
+
|
|
97
|
+
const specsRoot = path.join(workspaceRoot, specsDirOf(workspaceRoot));
|
|
98
|
+
const vendored = existsSync(specsRoot)
|
|
99
|
+
? readdirSync(specsRoot)
|
|
100
|
+
.filter((name) => existsSync(path.join(specsRoot, name, "forge-spec.yaml")))
|
|
101
|
+
.sort()
|
|
102
|
+
: [];
|
|
103
|
+
for (const name of vendored) {
|
|
104
|
+
sources.push({ kind: "vendored", specId: name, dir: path.join(specsRoot, name) });
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const seen = new Set<string>();
|
|
108
|
+
for (const entry of declared) {
|
|
109
|
+
if (seen.has(entry.id)) {
|
|
110
|
+
diagnostics.push({
|
|
111
|
+
rule: "SPEC-18",
|
|
112
|
+
severity: "error",
|
|
113
|
+
message: `specPackages[] declares id "${entry.id}" more than once`,
|
|
114
|
+
});
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
seen.add(entry.id);
|
|
118
|
+
|
|
119
|
+
const pin = rootPin(workspaceRoot, entry.package);
|
|
120
|
+
if (pin === undefined || !EXACT_PIN.test(pin)) {
|
|
121
|
+
diagnostics.push({
|
|
122
|
+
rule: "SPEC-17",
|
|
123
|
+
severity: "error",
|
|
124
|
+
message: `spec package ${entry.package} must be an exact-pinned dependency of the workspace root package.json (found ${pin === undefined ? "no entry" : `"${pin}"`})`,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const installed = installedPackage(workspaceRoot, entry.package);
|
|
129
|
+
if (!installed) {
|
|
130
|
+
diagnostics.push({
|
|
131
|
+
rule: "SPEC-16",
|
|
132
|
+
severity: "error",
|
|
133
|
+
message: `spec package ${entry.package} is declared in specPackages[] but not installed — run the package manager install`,
|
|
134
|
+
});
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const specId = `${entry.id}-v${installed.version}`;
|
|
138
|
+
sources.push({
|
|
139
|
+
kind: "package",
|
|
140
|
+
specId,
|
|
141
|
+
dir: installed.dir,
|
|
142
|
+
package: entry.package,
|
|
143
|
+
version: installed.version,
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
for (const name of vendored) {
|
|
147
|
+
if (name.startsWith(`${entry.id}-v`)) {
|
|
148
|
+
diagnostics.push({
|
|
149
|
+
rule: "SPEC-15",
|
|
150
|
+
severity: "warning",
|
|
151
|
+
specId: name,
|
|
152
|
+
message: `vendored copy of a published spec — delete ${path.relative(workspaceRoot, path.join(specsRoot, name))} and rely on specPackages[] (${entry.package})`,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return { sources, diagnostics };
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Resolve one spec by full spec id (`<id>-v<version>`) or by package-declared
|
|
163
|
+
* id. A package source wins over a vendored dir of the same spec id; a spec id
|
|
164
|
+
* whose version differs from the installed package throws with the installed
|
|
165
|
+
* version — it never falls back to a vendored copy.
|
|
166
|
+
*/
|
|
167
|
+
export function resolveSpecSource(workspaceRoot: string, idOrSpecId: string): SpecSource {
|
|
168
|
+
const { sources } = listSpecSources(workspaceRoot);
|
|
169
|
+
const packages = sources.filter(
|
|
170
|
+
(s): s is Extract<SpecSource, { kind: "package" }> => s.kind === "package",
|
|
171
|
+
);
|
|
172
|
+
for (const p of packages) {
|
|
173
|
+
const baseId = p.specId.slice(0, -`-v${p.version}`.length);
|
|
174
|
+
if (idOrSpecId === p.specId || idOrSpecId === baseId) return p;
|
|
175
|
+
if (idOrSpecId.startsWith(`${baseId}-v`)) {
|
|
176
|
+
throw new Error(
|
|
177
|
+
`spec ${idOrSpecId} is package-sourced (${p.package}) but the installed version is ${p.specId} — bump the pin instead of reading a vendored copy`,
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
const vendored = sources.find((s) => s.kind === "vendored" && s.specId === idOrSpecId);
|
|
182
|
+
if (vendored) return vendored;
|
|
183
|
+
throw new Error(`spec ${idOrSpecId} not found (vendored or package)`);
|
|
184
|
+
}
|
|
@@ -204,7 +204,9 @@ describe("runProbe — json-schema probe", () => {
|
|
|
204
204
|
await writeFile(artifactPath, JSON.stringify({ name: "test", version: 1 }));
|
|
205
205
|
const probe: AcceptanceProbe = {
|
|
206
206
|
probe: "json-schema",
|
|
207
|
-
artifact
|
|
207
|
+
// runProbe resolves `artifact` under the passed workspace (tempDir) —
|
|
208
|
+
// the same bare relative name the sibling AC-4 case uses.
|
|
209
|
+
artifact: "valid.json",
|
|
208
210
|
schemaInline: {
|
|
209
211
|
type: "object",
|
|
210
212
|
properties: {
|
|
@@ -9,6 +9,7 @@ path traversal rejection, details field, and regression.</purpose>
|
|
|
9
9
|
</MODULE_CONTRACT>
|
|
10
10
|
<CHANGE_SUMMARY>
|
|
11
11
|
<item>RFC-0643: initial domain template tests — terminology substitution, register selection, nested templates, fallback, path traversal, details field, regression.</item>
|
|
12
|
+
<item>RFC-1517: make pkg-health-10 shipped-set faithful and scan the publish ref</item>
|
|
12
13
|
</CHANGE_SUMMARY>
|
|
13
14
|
*/
|
|
14
15
|
|
|
@@ -171,7 +172,7 @@ test("selectRootTemplate with missing rootAgentsMdTemplate falls back to registe
|
|
|
171
172
|
test("selectRootTemplate rejects path traversal in rootAgentsMdTemplate", () => {
|
|
172
173
|
const profile = {
|
|
173
174
|
id: "evil-profile",
|
|
174
|
-
rootAgentsMdTemplate: "../../../etc/passwd",
|
|
175
|
+
rootAgentsMdTemplate: "../../../etc/passwd", // pkg-health-10: adversarial fixture input — traversal rejection is the behavior under test
|
|
175
176
|
} as StackProfile;
|
|
176
177
|
const content = selectRootTemplate("business", profile);
|
|
177
178
|
expect(content).toContain("{{projectName}}");
|
|
@@ -214,7 +215,7 @@ test("selectNestedTemplate rejects path traversal (..) with fallback", () => {
|
|
|
214
215
|
const wsType: ProfileWorkspaceType = {
|
|
215
216
|
id: "evil",
|
|
216
217
|
detect: { glob: "*" },
|
|
217
|
-
agentsMdTemplate: "../../../etc/passwd",
|
|
218
|
+
agentsMdTemplate: "../../../etc/passwd", // pkg-health-10: adversarial fixture input — traversal rejection is the behavior under test
|
|
218
219
|
};
|
|
219
220
|
const profile = { id: "evil-profile" } as StackProfile;
|
|
220
221
|
const result = selectNestedTemplate(wsType, profile, {}, "FALLBACK");
|
|
@@ -637,7 +637,8 @@ test("agents-generate expands the sentinel in a hand-written nested guide", asyn
|
|
|
637
637
|
);
|
|
638
638
|
|
|
639
639
|
const result = await runAgentsGenerate({ argv: [], flags: {} }, makeContext(tempDir));
|
|
640
|
-
|
|
640
|
+
// Reported paths are repo-relative logical paths — forward slashes on every platform.
|
|
641
|
+
expect(result.data?.injected).toContain("packages/my-pkg/AGENTS.md");
|
|
641
642
|
|
|
642
643
|
const nested = await readFile(join(tempDir, "packages", "my-pkg", "AGENTS.md"), "utf8");
|
|
643
644
|
expect(nested).toContain("## Semantic layer — read first");
|
|
@@ -60,9 +60,11 @@ beforeEach(async () => {
|
|
|
60
60
|
git(tempDir, ["config", "user.email", "flow-test@example.invalid"]);
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
+
// rm of a scaffolded node_modules is minutes-slow on Windows — the 10s
|
|
64
|
+
// default hook budget cannot hold it.
|
|
63
65
|
afterEach(async () => {
|
|
64
66
|
await rm(tempDir, { recursive: true, force: true });
|
|
65
|
-
});
|
|
67
|
+
}, 180000);
|
|
66
68
|
|
|
67
69
|
describe("RFC-1500: forge.create adopts the fixed branch model", () => {
|
|
68
70
|
test("AC-1: create leaves develop + main with the primary on develop", async () => {
|
package/src/tests/create.test.ts
CHANGED
|
@@ -49,9 +49,11 @@ beforeEach(async () => {
|
|
|
49
49
|
tempDir = await mkdtemp(join(tmpdir(), "create-test-"));
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
+
// rm of a scaffolded node_modules is minutes-slow on Windows — the 10s
|
|
53
|
+
// default hook budget cannot hold it.
|
|
52
54
|
afterEach(async () => {
|
|
53
55
|
await rm(tempDir, { recursive: true, force: true });
|
|
54
|
-
});
|
|
56
|
+
}, 180000);
|
|
55
57
|
|
|
56
58
|
test("forge create --in-place scaffolds in cwd with forge.yaml and docs dirs", async () => {
|
|
57
59
|
const result = await runCreate(
|
|
@@ -355,10 +357,18 @@ test("forge create --profile phaser-game writes compass.fileExtensions into forg
|
|
|
355
357
|
{ argv: [], flags: { "in-place": true, "no-flow": true, profile: "phaser-game", name: "my-phaser-game" } },
|
|
356
358
|
makeContext(tempDir),
|
|
357
359
|
);
|
|
360
|
+
// Printed live so a cancelled CI log still carries the failing payload.
|
|
361
|
+
if (result.exitCode !== 0) {
|
|
362
|
+
console.log(
|
|
363
|
+
`[phaser-create] exitCode=${String(result.exitCode)} errors=${JSON.stringify(result.data?.errors ?? null)} summary=${JSON.stringify(result.summary ?? null)}`,
|
|
364
|
+
);
|
|
365
|
+
}
|
|
358
366
|
expect(result.exitCode).toBe(0);
|
|
359
367
|
|
|
360
368
|
const { readFile: readFileAsync } = await import("node:fs/promises");
|
|
361
369
|
const forgeYaml = await readFileAsync(join(tempDir, "forge.yaml"), "utf8");
|
|
362
370
|
expect(forgeYaml).toContain("compass:");
|
|
363
371
|
expect(forgeYaml).toContain("fileExtensions:");
|
|
364
|
-
|
|
372
|
+
// phaser pulls real packages over the network — cold-store installs on
|
|
373
|
+
// Windows runners legitimately exceed the default scaffold timeouts.
|
|
374
|
+
}, 600000);
|
|
@@ -191,7 +191,7 @@ test("generateNestedAgentsMd regenerates the head and preserves the custom tail"
|
|
|
191
191
|
|
|
192
192
|
// First run — fresh file gains the marker + hint
|
|
193
193
|
const first = await generateNestedAgentsMd(tempDir, config, false);
|
|
194
|
-
expect(first.generated).toContain(
|
|
194
|
+
expect(first.generated).toContain("packages/pkg/AGENTS.md");
|
|
195
195
|
const agentsPath = join(tempDir, "packages", "pkg", "AGENTS.md");
|
|
196
196
|
const initial = await readFile(agentsPath, "utf8");
|
|
197
197
|
expect(initial).toContain(MD_MARKER);
|
|
@@ -202,7 +202,7 @@ test("generateNestedAgentsMd regenerates the head and preserves the custom tail"
|
|
|
202
202
|
|
|
203
203
|
// Second run — head regenerated, tail preserved verbatim
|
|
204
204
|
const second = await generateNestedAgentsMd(tempDir, config, false);
|
|
205
|
-
expect(second.preserved).toContain(
|
|
205
|
+
expect(second.preserved).toContain("packages/pkg/AGENTS.md");
|
|
206
206
|
const merged = await readFile(agentsPath, "utf8");
|
|
207
207
|
expect(merged).toContain("## Workspace rules");
|
|
208
208
|
expect(merged).toContain("- never touch dist/");
|
|
@@ -54,6 +54,7 @@ Treat these XML documents as the primary semantic layer for AI work and keep the
|
|
|
54
54
|
| fo-compass-annotate | fo | user | content-mutation |
|
|
55
55
|
| fo-design-summit | fo | user | document-only |
|
|
56
56
|
| fo-doc-audit | fo | user | document-only |
|
|
57
|
+
| fo-doctor | fo | user | document-only |
|
|
57
58
|
| fo-explore | fo | user | document-only |
|
|
58
59
|
| fo-extract-dna | fo | user | document-only |
|
|
59
60
|
| fo-fix | fo | user | code-mutation |
|
|
@@ -126,6 +127,7 @@ When the operator expresses an intent in natural language, the agent routes to t
|
|
|
126
127
|
| "manage Compass headers", "annotate source files with Compass", "audit Compass module contracts" | `fo-compass-annotate` |
|
|
127
128
|
| "design summit", "multi-persona review", "party mode" | `fo-design-summit` |
|
|
128
129
|
| "audit documentation sync", "update docs after code changes", "check AGENTS.md and README are in sync" | `fo-doc-audit` |
|
|
130
|
+
| "check my session environment", "agent turns keep stalling", "session doctor", "environment audit" | `fo-doctor` |
|
|
129
131
|
| "нам надо закрыть открытые вопросы", "explore this idea", "let me think about this", "what are the options for", "what if we" | `fo-explore` |
|
|
130
132
|
| "extract DNA invariant", "discover architectural invariants", "formalize implicit architectural rules" | `fo-extract-dna` |
|
|
131
133
|
| "исправим", "примени findings", "fix all", "fix issues from review", "apply review findings and fix" | `fo-fix` |
|
|
@@ -8,13 +8,13 @@ Unit tests for implement stamp covering rfc.implement.stamp. It also guards the
|
|
|
8
8
|
</non-goals>
|
|
9
9
|
</MODULE_CONTRACT>
|
|
10
10
|
<CHANGE_SUMMARY>
|
|
11
|
-
<item>RFC-1322: fo-review fix pass — stale-envelope refresh, probes-less fail-closed, empty/dir/escape paths, line-ranges, --sync composition, fully-checked no-op</item>
|
|
12
11
|
<item>RFC-1322: evidence annotation extraction takes the last occurrence — prose mentions no longer shadow the annotation</item>
|
|
13
12
|
<item>RFC-1383: pins for the --check-criteria remedy hint, residual no-no-op, and N-of-M success output</item>
|
|
14
13
|
<item>RFC-1483: self-sufficient implement stamp — default repair pass, ordered remediation checklist, --no-repair</item>
|
|
15
14
|
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
16
15
|
|
|
17
16
|
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>
|
|
17
|
+
<item>RFC-1516: add an evidence-freshness window to the stamp-sync chain for rfc-1516</item>
|
|
18
18
|
<history>RFC-1310, RFC-1311, RFC-1322</history>
|
|
19
19
|
</CHANGE_SUMMARY>
|
|
20
20
|
*/
|
|
@@ -27,7 +27,10 @@ import { execFileSync } from "node:child_process";
|
|
|
27
27
|
import { parse as yamlParse, stringify as yamlStringify } from "yaml";
|
|
28
28
|
|
|
29
29
|
const { mockRunProbe } = vi.hoisted(() => ({ mockRunProbe: vi.fn() }));
|
|
30
|
-
vi.mock("../../os/rfc/acceptance.ts", () => ({
|
|
30
|
+
vi.mock("../../os/rfc/acceptance.ts", async (importOriginal) => ({
|
|
31
|
+
// RFC-1516: keep classifyProbeReuse (and every non-execution export) real —
|
|
32
|
+
// emit's reuse path calls it when a committed envelope is present.
|
|
33
|
+
...(await importOriginal<typeof import("../../os/rfc/acceptance.ts")>()),
|
|
31
34
|
runProbe: mockRunProbe,
|
|
32
35
|
// RFC-1489: emit (which stamp composes) drives runProbeSet — the shim
|
|
33
36
|
// preserves the per-probe mock contract.
|