@warpgogol/forge 9.3.1 → 9.4.1
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 +40 -0
- package/README.md +6 -4
- package/README.uk.md +10 -8
- 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 +51 -0
- package/dist/os/flow/dirty-classify.d.ts.map +1 -0
- package/dist/os/flow/dirty-classify.js +83 -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 +110 -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 +75 -38
- 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 +54 -2
- package/dist/os/flow/handlers/flow-integrate.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-integrate.js +614 -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-peers.d.ts +24 -0
- package/dist/os/flow/handlers/flow-peers.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-peers.js +99 -0
- package/dist/os/flow/handlers/flow-peers.js.map +1 -0
- 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 +3 -0
- package/dist/os/flow/index.d.ts.map +1 -1
- package/dist/os/flow/index.js +7 -2
- 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/ops-registry.d.ts +33 -0
- package/dist/os/flow/ops-registry.d.ts.map +1 -0
- package/dist/os/flow/ops-registry.js +177 -0
- package/dist/os/flow/ops-registry.js.map +1 -0
- package/dist/os/flow/preflight.d.ts +157 -0
- package/dist/os/flow/preflight.d.ts.map +1 -0
- package/dist/os/flow/preflight.js +772 -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/standalone-invoke.d.ts +11 -0
- package/dist/os/flow/standalone-invoke.d.ts.map +1 -0
- package/dist/os/flow/standalone-invoke.js +75 -0
- package/dist/os/flow/standalone-invoke.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/handlers/archive.d.ts.map +1 -1
- package/dist/os/mission/handlers/archive.js +12 -8
- package/dist/os/mission/handlers/archive.js.map +1 -1
- package/dist/os/mission/importer-block.d.ts +19 -0
- package/dist/os/mission/importer-block.d.ts.map +1 -0
- package/dist/os/mission/importer-block.js +124 -0
- package/dist/os/mission/importer-block.js.map +1 -0
- package/dist/os/mission/lockfile.d.ts +17 -0
- package/dist/os/mission/lockfile.d.ts.map +1 -1
- package/dist/os/mission/lockfile.js +38 -0
- package/dist/os/mission/lockfile.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 +107 -10
- 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 +42 -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-collect.d.ts.map +1 -1
- package/dist/os/system/handlers/system-task-collect.js +11 -5
- package/dist/os/system/handlers/system-task-collect.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/prettierignore.d.ts.map +1 -1
- package/dist/src/onboarding/prettierignore.js +2 -0
- package/dist/src/onboarding/prettierignore.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 +120 -0
- package/os/flow/flow.module.ts +119 -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 +124 -56
- 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 +933 -180
- package/os/flow/handlers/flow-open.ts +135 -11
- package/os/flow/handlers/flow-peers.ts +142 -0
- package/os/flow/handlers/flow-status.ts +45 -13
- package/os/flow/index.ts +8 -2
- package/os/flow/line-version.ts +2 -1
- package/os/flow/locks.ts +56 -14
- package/os/flow/ops-registry.ts +194 -0
- package/os/flow/preflight.ts +974 -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/standalone-invoke.ts +85 -0
- package/os/flow/tests/dirty-classify.test.ts +251 -0
- package/os/flow/tests/fixtures/branch-names.yaml +40 -40
- package/os/flow/tests/flow-cut.test.ts +21 -0
- 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 +565 -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 +698 -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/ops-registry.test.ts +136 -0
- 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/handlers/archive.ts +22 -14
- package/os/mission/importer-block.ts +119 -0
- package/os/mission/lockfile.ts +41 -0
- 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 +126 -0
- package/os/rfc/handlers/list-create.ts +130 -10
- 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 +31 -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-collect.ts +11 -5
- 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-collect.test.ts +16 -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 +45 -13
- 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/prettierignore.ts +2 -0
- 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/prettierignore-manage.test.ts +11 -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
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>RFC-1536 (Q-2): shared governance-id allocation. A session
|
|
4
|
+
worktree's rfc.create/adr.create snapshot lags develop — a parallel session
|
|
5
|
+
can land the same id first. The shared reservation surface at
|
|
6
|
+
<common-git-dir>/forge/rfc-reservations.yaml is visible to every
|
|
7
|
+
checkout of the clone, so the next id is max(primary scan, worktree scan,
|
|
8
|
+
develop tip, reservations) + 1 and the claim is appended before the draft
|
|
9
|
+
file is written.</purpose>
|
|
10
|
+
<non-goals>
|
|
11
|
+
<item>No cross-clone uniqueness — the reservation surface lives in the common git dir; sessions on different clones still collide (bounded consequence, RFC-1536 failure modes).</item>
|
|
12
|
+
</non-goals>
|
|
13
|
+
</MODULE_CONTRACT>
|
|
14
|
+
<KEY_DECISIONS>
|
|
15
|
+
<item>The reservation file is shared local state, never a tracked artifact — it lives under the common git dir next to forge/registry.yaml.</item>
|
|
16
|
+
<item>Entries carry `kind` so the RFC and ADR namespaces share one file without sharing a number space (Q-2).</item>
|
|
17
|
+
<item>An unwritable surface degrades to the pre-RFC level: allocation falls back to max(scans)+1 with a warning — draft creation never hard-fails on the reservation layer.</item>
|
|
18
|
+
<item>A reservation whose draft never lands stays a harmless gap; flow.integrate prunes only its own session's entries.</item>
|
|
19
|
+
</KEY_DECISIONS>
|
|
20
|
+
<CHANGE_SUMMARY>
|
|
21
|
+
<item>RFC-1536: shared governance-id allocation surface (Q-2: RFC + ADR kinds)</item>
|
|
22
|
+
<item>RFC-1536: owning-checkout routing, FLOW-OPEN-01 dirty-primary warning, shared governance-id allocation (RFC+ADR)</item>
|
|
23
|
+
<item>RFC-1536: type forge flow and rfc io against forge's own WorkspaceIO
|
|
24
|
+
|
|
25
|
+
The standalone forge extract has no @warpgogol/werkstatt-shared; the type-only import failed extract-verify (FLOW-CUT-13) for the 9.4.0 cut.</item>
|
|
26
|
+
</CHANGE_SUMMARY>
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
30
|
+
import { join } from "node:path";
|
|
31
|
+
|
|
32
|
+
import { parse as yamlParse, stringify as yamlStringify } from "yaml";
|
|
33
|
+
import type { WorkspaceIO } from "../../src/types.ts";
|
|
34
|
+
|
|
35
|
+
import { git, listLocalBranches, topLevel } from "../flow/git.ts";
|
|
36
|
+
import { withFlowLock } from "../flow/locks.ts";
|
|
37
|
+
import { commonGitDir } from "../flow/registry.ts";
|
|
38
|
+
import { primaryWorktree } from "../flow/worktree-path.ts";
|
|
39
|
+
|
|
40
|
+
export type GovernanceKind = "rfc" | "adr";
|
|
41
|
+
|
|
42
|
+
export interface GovernanceIdAllocation {
|
|
43
|
+
id: number;
|
|
44
|
+
/** Which surface yielded the winning maximum. */
|
|
45
|
+
source: "primary" | "develop" | "reservation" | "worktree";
|
|
46
|
+
/** Non-empty when the reservation append failed and the run degraded. */
|
|
47
|
+
warnings: string[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ReservationEntry {
|
|
51
|
+
kind: GovernanceKind;
|
|
52
|
+
id: number;
|
|
53
|
+
/** Branch name when reserved inside a session worktree, else cwd's branch. */
|
|
54
|
+
session: string | null;
|
|
55
|
+
at: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const RESERVATIONS_RELATIVE = "forge/rfc-reservations.yaml";
|
|
59
|
+
const RESERVATIONS_LOCK_RELATIVE = "forge/rfc-reservations.lock";
|
|
60
|
+
|
|
61
|
+
const KIND_DIR: Record<GovernanceKind, string> = {
|
|
62
|
+
rfc: "docs/rfcs",
|
|
63
|
+
adr: "docs/adrs",
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
function idPattern(kind: GovernanceKind): RegExp {
|
|
67
|
+
return kind === "rfc" ? /^rfc-(\d{4})/ : /^adr-(\d{4})/;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function scanDirMax(dir: string, pattern: RegExp, io: WorkspaceIO): Promise<number> {
|
|
71
|
+
if (!(await io.exists(dir))) return 0;
|
|
72
|
+
let max = 0;
|
|
73
|
+
for (const file of await io.readdir(dir)) {
|
|
74
|
+
const match = file.name.match(pattern);
|
|
75
|
+
if (match) max = Math.max(max, parseInt(match[1]!, 10));
|
|
76
|
+
}
|
|
77
|
+
return max;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Highest id of `kind` present on the develop tip — committed state even
|
|
81
|
+
* when the primary working copy is stale. 0 when develop is absent. */
|
|
82
|
+
async function scanDevelopMax(
|
|
83
|
+
cwd: string,
|
|
84
|
+
kind: GovernanceKind,
|
|
85
|
+
io: WorkspaceIO,
|
|
86
|
+
): Promise<number> {
|
|
87
|
+
if (!(await listLocalBranches(cwd, io)).includes("develop")) return 0;
|
|
88
|
+
const r = await git(cwd, io, ["ls-tree", "--name-only", "develop", "--", KIND_DIR[kind]]);
|
|
89
|
+
if (r.exitCode !== 0) return 0;
|
|
90
|
+
const pattern = idPattern(kind);
|
|
91
|
+
let max = 0;
|
|
92
|
+
for (const line of r.stdout.split("\n")) {
|
|
93
|
+
const match = line.trim().match(pattern);
|
|
94
|
+
if (match) max = Math.max(max, parseInt(match[1]!, 10));
|
|
95
|
+
}
|
|
96
|
+
return max;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export async function readReservations(
|
|
100
|
+
commonGitDir: string,
|
|
101
|
+
): Promise<ReservationEntry[]> {
|
|
102
|
+
const file = join(commonGitDir, RESERVATIONS_RELATIVE);
|
|
103
|
+
let raw: string;
|
|
104
|
+
try {
|
|
105
|
+
raw = await readFile(file, "utf8");
|
|
106
|
+
} catch {
|
|
107
|
+
return [];
|
|
108
|
+
}
|
|
109
|
+
const parsed = yamlParse(raw) as { reservations?: ReservationEntry[] } | null;
|
|
110
|
+
return Array.isArray(parsed?.reservations) ? parsed.reservations : [];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Append a reservation under a lock, pruning entries whose id already landed
|
|
115
|
+
* in `landedIds` (consumed — the draft is on disk/on develop). A lost-prune
|
|
116
|
+
* race is harmless: stale entries only raise the next id, never collide.
|
|
117
|
+
*/
|
|
118
|
+
export async function appendReservation(
|
|
119
|
+
io: WorkspaceIO,
|
|
120
|
+
cwd: string,
|
|
121
|
+
entry: Omit<ReservationEntry, "at">,
|
|
122
|
+
landedIds: ReadonlySet<number>,
|
|
123
|
+
): Promise<{ warnings: string[] }> {
|
|
124
|
+
const warnings: string[] = [];
|
|
125
|
+
try {
|
|
126
|
+
const common = await commonGitDir(io, cwd);
|
|
127
|
+
const file = join(common, RESERVATIONS_RELATIVE);
|
|
128
|
+
const lock = join(common, RESERVATIONS_LOCK_RELATIVE);
|
|
129
|
+
await withFlowLock(
|
|
130
|
+
lock,
|
|
131
|
+
{ waitMs: 5_000, staleMs: 30_000 },
|
|
132
|
+
async () => {
|
|
133
|
+
const existing = await readReservations(common);
|
|
134
|
+
const kept = existing.filter(
|
|
135
|
+
(e) => !(e.kind === entry.kind && landedIds.has(e.id)),
|
|
136
|
+
);
|
|
137
|
+
kept.push({ ...entry, at: new Date().toISOString() });
|
|
138
|
+
await mkdir(join(common, "forge"), { recursive: true });
|
|
139
|
+
await writeFile(file, yamlStringify({ reservations: kept }), "utf8");
|
|
140
|
+
},
|
|
141
|
+
io,
|
|
142
|
+
);
|
|
143
|
+
} catch (error) {
|
|
144
|
+
warnings.push(`reservation skipped — ${(error as Error).message}`);
|
|
145
|
+
}
|
|
146
|
+
return { warnings };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Allocate the next governance id against every surface a session can see:
|
|
151
|
+
* the primary checkout's docs dir, `develop`'s committed tree, the shared
|
|
152
|
+
* reservation file, and the caller's own worktree scan (`worktreeMax` — the
|
|
153
|
+
* caller already holds the claim-seeded local maximum).
|
|
154
|
+
*/
|
|
155
|
+
export async function allocateNextGovernanceId(
|
|
156
|
+
io: WorkspaceIO,
|
|
157
|
+
cwd: string,
|
|
158
|
+
kind: GovernanceKind,
|
|
159
|
+
worktreeMax: number,
|
|
160
|
+
): Promise<GovernanceIdAllocation> {
|
|
161
|
+
const warnings: string[] = [];
|
|
162
|
+
let primaryMax = 0;
|
|
163
|
+
let reservations: ReservationEntry[] = [];
|
|
164
|
+
let developMax = 0;
|
|
165
|
+
try {
|
|
166
|
+
const repoRoot = await topLevel(cwd, io);
|
|
167
|
+
const root = repoRoot ?? cwd;
|
|
168
|
+
const primary = await primaryWorktree(io, root);
|
|
169
|
+
primaryMax = await scanDirMax(join(primary, KIND_DIR[kind]), idPattern(kind), io);
|
|
170
|
+
developMax = await scanDevelopMax(root, kind, io);
|
|
171
|
+
const common = await commonGitDir(io, root);
|
|
172
|
+
reservations = await readReservations(common);
|
|
173
|
+
} catch (error) {
|
|
174
|
+
warnings.push(`shared surfaces unreadable — falling back to worktree scan: ${(error as Error).message}`);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const reservationMax = reservations
|
|
178
|
+
.filter((e) => e.kind === kind)
|
|
179
|
+
.reduce((max, e) => Math.max(max, e.id), 0);
|
|
180
|
+
|
|
181
|
+
const candidates: Array<[number, GovernanceIdAllocation["source"]]> = [
|
|
182
|
+
[primaryMax, "primary"],
|
|
183
|
+
[developMax, "develop"],
|
|
184
|
+
[reservationMax, "reservation"],
|
|
185
|
+
[worktreeMax, "worktree"],
|
|
186
|
+
];
|
|
187
|
+
const [maxId, source] = candidates.reduce((a, b) => (b[0] > a[0] ? b : a));
|
|
188
|
+
return { id: maxId + 1, source, warnings };
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export async function allocateNextRfcId(
|
|
192
|
+
io: WorkspaceIO,
|
|
193
|
+
workspaceRoot: string,
|
|
194
|
+
worktreeMax: number,
|
|
195
|
+
): Promise<GovernanceIdAllocation> {
|
|
196
|
+
return allocateNextGovernanceId(io, workspaceRoot, "rfc", worktreeMax);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export async function allocateNextAdrId(
|
|
200
|
+
io: WorkspaceIO,
|
|
201
|
+
workspaceRoot: string,
|
|
202
|
+
worktreeMax: number,
|
|
203
|
+
): Promise<GovernanceIdAllocation> {
|
|
204
|
+
return allocateNextGovernanceId(io, workspaceRoot, "adr", worktreeMax);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/** Prune a session's own reservations — flow.integrate calls this once its
|
|
208
|
+
* session branch landed; other sessions' entries are untouched. */
|
|
209
|
+
export async function pruneReservationsForSession(
|
|
210
|
+
io: WorkspaceIO,
|
|
211
|
+
cwd: string,
|
|
212
|
+
sessionBranch: string,
|
|
213
|
+
): Promise<void> {
|
|
214
|
+
try {
|
|
215
|
+
const common = await commonGitDir(io, cwd);
|
|
216
|
+
const file = join(common, RESERVATIONS_RELATIVE);
|
|
217
|
+
const lock = join(common, RESERVATIONS_LOCK_RELATIVE);
|
|
218
|
+
await withFlowLock(
|
|
219
|
+
lock,
|
|
220
|
+
{ waitMs: 5_000, staleMs: 30_000 },
|
|
221
|
+
async () => {
|
|
222
|
+
const kept = (await readReservations(common)).filter(
|
|
223
|
+
(e) => e.session !== sessionBranch,
|
|
224
|
+
);
|
|
225
|
+
await writeFile(file, yamlStringify({ reservations: kept }), "utf8");
|
|
226
|
+
},
|
|
227
|
+
io,
|
|
228
|
+
);
|
|
229
|
+
} catch {
|
|
230
|
+
// Prune failure leaves harmless stale entries — never block integrate.
|
|
231
|
+
}
|
|
232
|
+
}
|
package/os/rfc/probe-batch.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { spawn } from "../../src/utils/sync-fs.ts";
|
|
15
|
+
import { resolveSpawnPlan } from "../../src/utils/spawn.ts";
|
|
15
16
|
import { mkdtempSync, rmSync } from "node:fs";
|
|
16
17
|
import { tmpdir } from "node:os";
|
|
17
18
|
import path from "node:path";
|
|
@@ -129,9 +130,13 @@ export async function spawnBatchedVitest(
|
|
|
129
130
|
|
|
130
131
|
let stderrTail = "";
|
|
131
132
|
const exit = await new Promise<{ exitCode: number | null; timedOut: boolean }>((resolve) => {
|
|
132
|
-
|
|
133
|
+
// pnpm is a .cmd shim on Windows — PATHEXT resolution routes it through
|
|
134
|
+
// cmd.exe; a missing pnpm keeps spawn ENOENT for the caller to classify.
|
|
135
|
+
const plan = resolveSpawnPlan("pnpm", args);
|
|
136
|
+
const child = spawn(plan.command, plan.args, {
|
|
133
137
|
cwd: workspaceRoot,
|
|
134
138
|
stdio: ["ignore", "ignore", "pipe"],
|
|
139
|
+
windowsVerbatimArguments: plan.verbatim,
|
|
135
140
|
});
|
|
136
141
|
child.stderr?.on("data", (chunk: Buffer) => {
|
|
137
142
|
stderrTail = (stderrTail + chunk.toString()).slice(-2000);
|
package/os/rfc/rfc.module.ts
CHANGED
|
@@ -7,16 +7,14 @@
|
|
|
7
7
|
</non-goals>
|
|
8
8
|
</MODULE_CONTRACT>
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
|
-
<item>RFC-1474: per-rule check-execution counters
|
|
11
|
-
|
|
12
|
-
Append-only counters.jsonl journaled per evaluated rule ({runId, ruleId, contract, outcome, at}; runId = commandInvocationId; outcomes pass|diagnostic|skipped|ensured; dry-run suppressed; append failures warn never fail). checks.counters.validate audits the journal against the validator inventory (COUNT-01/02); checks.counters.export projects deterministic per-rule totals (COUNT-03, generatedAt = max journal at; producer-tail tolerated). checks.contribution.report joins counters as the canonical firing source (CONTRIB-03 on absent/empty journal; coverage none|partial|complete; live effectiveCoverage positive). Validator inventory now includes every rules[]-declaring command — fail-closed gate surfaced 9 contract-declaration defects, fixed with domain contracts.</item>
|
|
13
|
-
<item>RFC-1474: check-execution counters — apply re-review findings (structural skip flag, violations extraction, Date.parse ordering, DEV-5/6)</item>
|
|
14
|
-
<item>RFC-1482: emit validation-compliant RFC skeletons and surface contract breaches at authoring time</item>
|
|
15
10
|
<item>RFC-1483: self-sufficient implement stamp — default repair pass, ordered remediation checklist, --no-repair</item>
|
|
16
11
|
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
17
12
|
|
|
18
13
|
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>
|
|
19
|
-
<
|
|
14
|
+
<item>RFC-1516: add an evidence-freshness window to the stamp-sync chain for rfc-1516</item>
|
|
15
|
+
<item>RFC-1528: close review findings — manifest-union command inventory for regen/preflight</item>
|
|
16
|
+
<item>RFC-1534: lint probe patterns, sync amends counterparts, name next free ledger id</item>
|
|
17
|
+
<history>RFC-0260, RFC-0795, RFC-1097, RFC-1173, RFC-1231, RFC-1237, RFC-1249, RFC-1271, RFC-1306, RFC-1322, RFC-1333, RFC-1351, RFC-1354, RFC-1364, RFC-1453, RFC-1458, RFC-1461, RFC-1463, RFC-1467, RFC-1474, RFC-1482</history>
|
|
20
18
|
</CHANGE_SUMMARY>
|
|
21
19
|
*/
|
|
22
20
|
|
|
@@ -127,6 +125,11 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
|
|
|
127
125
|
description:
|
|
128
126
|
"RFC-1482: comma-separated command names seeded into commands.added; each name gets one `probe: reachable` acceptance stub.",
|
|
129
127
|
},
|
|
128
|
+
amends: {
|
|
129
|
+
kind: "string",
|
|
130
|
+
description:
|
|
131
|
+
"RFC-1534: RFC-NNNN this draft amends — seeds amends: and writes the amendedBy counterpart on the amended file in the same pass.",
|
|
132
|
+
},
|
|
130
133
|
},
|
|
131
134
|
execute: runRfcCreate,
|
|
132
135
|
},
|
|
@@ -154,6 +157,11 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
|
|
|
154
157
|
scope: "workspace",
|
|
155
158
|
flags: {
|
|
156
159
|
id: { kind: "string", description: "Target a single RFC by id (e.g. RFC-0609)." },
|
|
160
|
+
fix: {
|
|
161
|
+
kind: "boolean",
|
|
162
|
+
description:
|
|
163
|
+
"RFC-1534: repair V-19 amends/amendedBy asymmetries by merging the missing counterpart into the referenced file.",
|
|
164
|
+
},
|
|
157
165
|
},
|
|
158
166
|
reads: ["docs/rfcs/**/*.md"],
|
|
159
167
|
execute: runRfcValidate,
|
|
@@ -213,7 +221,14 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
|
|
|
213
221
|
},
|
|
214
222
|
reads: ["docs/rfcs/**/*.md"],
|
|
215
223
|
writes: ["docs/rfcs/index.yaml"],
|
|
216
|
-
generates: [
|
|
224
|
+
generates: [
|
|
225
|
+
{
|
|
226
|
+
path: "docs/rfcs/index.yaml",
|
|
227
|
+
phase: "on-demand",
|
|
228
|
+
markerPolicy: "registry-only",
|
|
229
|
+
volatile: true,
|
|
230
|
+
},
|
|
231
|
+
],
|
|
217
232
|
cacheable: false,
|
|
218
233
|
execute: runRfcIndexGenerate,
|
|
219
234
|
},
|
|
@@ -351,6 +366,11 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
|
|
|
351
366
|
description:
|
|
352
367
|
"RFC-1489: disable test-probe batching — run each probe in its own Vitest process (diagnostic escape).",
|
|
353
368
|
},
|
|
369
|
+
"no-evidence-reuse": {
|
|
370
|
+
kind: "boolean",
|
|
371
|
+
description:
|
|
372
|
+
"RFC-1516: disable the evidence-freshness window — every probe (run/test/page/proof and cheap kinds) re-executes even when the committed green envelope is in-window.",
|
|
373
|
+
},
|
|
354
374
|
},
|
|
355
375
|
execute: runRfcVerificationEmit,
|
|
356
376
|
},
|
|
@@ -610,6 +630,11 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
|
|
|
610
630
|
"RFC-1483: restore the pre-self-repair blocking behavior — no criteria flips, " +
|
|
611
631
|
"no in-process envelope emit; the first prerequisite defect fails the run.",
|
|
612
632
|
},
|
|
633
|
+
"no-evidence-reuse": {
|
|
634
|
+
kind: "boolean",
|
|
635
|
+
description:
|
|
636
|
+
"RFC-1516: forwarded to rfc.evidence.sync and the in-process emit calls — every acceptance probe re-executes even inside the evidence-freshness window.",
|
|
637
|
+
},
|
|
613
638
|
},
|
|
614
639
|
execute: runRfcImplementStamp,
|
|
615
640
|
},
|
|
@@ -630,7 +655,10 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
|
|
|
630
655
|
scope: "workspace",
|
|
631
656
|
mutatesState: true,
|
|
632
657
|
contract: "rfc",
|
|
633
|
-
rules: [
|
|
658
|
+
rules: [
|
|
659
|
+
{ id: "EVIDENCE-SYNC-01", severity: "error" },
|
|
660
|
+
{ id: "EVIDENCE-SYNC-02", severity: "error" },
|
|
661
|
+
],
|
|
634
662
|
flags: {
|
|
635
663
|
id: {
|
|
636
664
|
kind: "string",
|
|
@@ -640,6 +668,11 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
|
|
|
640
668
|
kind: "boolean",
|
|
641
669
|
description: "List the steps without executing (honors context.dryRun, DNA-110).",
|
|
642
670
|
},
|
|
671
|
+
"no-evidence-reuse": {
|
|
672
|
+
kind: "boolean",
|
|
673
|
+
description:
|
|
674
|
+
"RFC-1516: forward to the emit step — every acceptance probe re-executes even when the committed green envelope is inside the evidence-freshness window.",
|
|
675
|
+
},
|
|
643
676
|
},
|
|
644
677
|
reads: ["docs/rfcs/**/*.md"],
|
|
645
678
|
// The artifacts below stay owned by the delegated generators — sync
|
package/os/rfc/types.ts
CHANGED
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
* </non-goals>
|
|
13
13
|
* </MODULE_CONTRACT>
|
|
14
14
|
* * <CHANGE_SUMMARY>
|
|
15
|
-
<item>RFC-
|
|
16
|
-
<item>RFC-
|
|
17
|
-
<item>RFC-
|
|
18
|
-
<item>RFC-
|
|
19
|
-
<item>RFC-
|
|
20
|
-
<history>RFC-0465, RFC-0478, RFC-0480, RFC-0795, RFC-0998, RFC-0999, RFC-1097, RFC-1249, RFC-1271, RFC-1306, RFC-1310, RFC-1320, RFC-1322, RFC-1330, RFC-1333, RFC-1334, RFC-1336, RFC-1364, RFC-1383, RFC-1391, RFC-1401, RFC-1445, RFC-1453, RFC-1454, RFC-1455</history>
|
|
15
|
+
<item>RFC-1516: bind evidence reuse to the oldest replayed result and harden committed-envelope reads for rfc-1516</item>
|
|
16
|
+
<item>RFC-1514: attach corrected invocations to blocking diagnostics so retry is one-shot</item>
|
|
17
|
+
<item>RFC-1536: owning-checkout routing, FLOW-OPEN-01 dirty-primary warning, shared governance-id allocation (RFC+ADR)</item>
|
|
18
|
+
<item>RFC-1534: lint probe patterns, sync amends counterparts, name next free ledger id</item>
|
|
19
|
+
<item>RFC-1546: derive-and-repair recoverable state across flow surfaces (AC-1..AC-5)</item>
|
|
20
|
+
<history>RFC-0465, RFC-0478, RFC-0480, RFC-0795, RFC-0998, RFC-0999, RFC-1097, RFC-1249, RFC-1271, RFC-1306, RFC-1310, RFC-1320, RFC-1322, RFC-1330, RFC-1333, RFC-1334, RFC-1336, RFC-1364, RFC-1383, RFC-1391, RFC-1401, RFC-1445, RFC-1453, RFC-1454, RFC-1455, RFC-1458, RFC-1467, RFC-1483, RFC-1516</history>
|
|
21
21
|
</CHANGE_SUMMARY>
|
|
22
22
|
***************************************************************/
|
|
23
23
|
|
|
@@ -489,6 +489,13 @@ export interface VerificationEvidence {
|
|
|
489
489
|
filesModified?: string[];
|
|
490
490
|
/** RFC-1453: operator waiver recorded when RFC-IMP-14 was bypassed via --waive-outcome. */
|
|
491
491
|
outcomeWaiver?: { reason: string; by: string };
|
|
492
|
+
/** RFC-1516: freshness anchor — the timestamp the heaviest replayed
|
|
493
|
+
* results were actually measured at (the reused envelope's `resultsFrom`,
|
|
494
|
+
* falling back to its `emittedAt`). Present only on envelopes that
|
|
495
|
+
* replayed committed probe records; `evaluateEvidenceReuse` binds the
|
|
496
|
+
* window to `resultsFrom ?? emittedAt` so chained replays cannot extend
|
|
497
|
+
* result age beyond the window. */
|
|
498
|
+
resultsFrom?: string;
|
|
492
499
|
}
|
|
493
500
|
|
|
494
501
|
export interface VerificationDelta {
|
|
@@ -506,6 +513,12 @@ export interface RfcVerificationEmitResult {
|
|
|
506
513
|
file: string;
|
|
507
514
|
overall: "pass" | "fail";
|
|
508
515
|
previousOverall?: "pass" | "fail";
|
|
516
|
+
/** RFC-1516: freshness-window verdict — `{reusable, reason, reusedFrom}`
|
|
517
|
+
* (shape declared in rfc-evidence-sync.ts; kept structural here to avoid
|
|
518
|
+
* a types↔handler import cycle). */
|
|
519
|
+
reuse?: { reusable: boolean; reason: string; reusedFrom?: string };
|
|
520
|
+
heavyProbesReused?: string[];
|
|
521
|
+
cheapProbesReRun?: string[];
|
|
509
522
|
}>;
|
|
510
523
|
// RFC-1320: "stale-generated-artifact" — EVIDENCE-FRESH-01 blocked the
|
|
511
524
|
// pre-probe freshness gate; "unknown-probe-kind" — EVIDENCE-FRESH-03, a
|
|
@@ -612,6 +625,8 @@ export interface RfcCreateResult {
|
|
|
612
625
|
status: "ok" | "blocked";
|
|
613
626
|
file?: string;
|
|
614
627
|
id?: string;
|
|
628
|
+
/** RFC-1536: which allocation surface yielded the winning maximum. */
|
|
629
|
+
idSource?: "primary" | "develop" | "reservation" | "worktree";
|
|
615
630
|
satisfies?: string[];
|
|
616
631
|
/** RFC-0329: prior decisions consulted at creation time. */
|
|
617
632
|
consultedDecisions?: ConsultedDecision[];
|
|
@@ -623,6 +638,12 @@ export interface RfcCreateResult {
|
|
|
623
638
|
blocked?: boolean;
|
|
624
639
|
/** RFC-1467: the operator-visible remedy for a blocked create. */
|
|
625
640
|
remedy?: string;
|
|
641
|
+
/** RFC-1534: --amends counterpart outcome — wroteCounterpart false means
|
|
642
|
+
* the amended file was missing/unreadable and V-19 still applies. */
|
|
643
|
+
amendsSync?: { amended: string; wroteCounterpart: boolean };
|
|
644
|
+
/** RFC-1546: ecosystem.manifest.generate outcome when commands.* seeds were
|
|
645
|
+
* written — invoked false means the kernel invoke port was unavailable. */
|
|
646
|
+
manifestRegen?: { invoked: boolean; ok: boolean; summary?: string };
|
|
626
647
|
}
|
|
627
648
|
|
|
628
649
|
export interface RfcNextIdResult {
|
|
@@ -662,6 +683,10 @@ export interface ConsultedDecision {
|
|
|
662
683
|
title: string;
|
|
663
684
|
score: number;
|
|
664
685
|
file: string;
|
|
686
|
+
/** RFC-1514: proposed-title tokens matched inside this entry's title (+3 each). */
|
|
687
|
+
matchedTitleTokens: string[];
|
|
688
|
+
/** RFC-1514: proposed-title tokens matched inside the decision/alternatives text (+1 each; title hits count too — they also scored the +1). */
|
|
689
|
+
matchedTextTokens: string[];
|
|
665
690
|
} // ─── RFC-0334: supersede propose ─────────────────────────────────────────────
|
|
666
691
|
export interface RfcSupersedeProposeResult {
|
|
667
692
|
command: "rfc.supersede.propose";
|
|
@@ -13,6 +13,7 @@ RFC-1320 unit tests for the pre-probe generated-artifact freshness gate inside r
|
|
|
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
|
+
<item>RFC-1516: add an evidence-freshness window to the stamp-sync chain for rfc-1516</item>
|
|
16
17
|
</CHANGE_SUMMARY>
|
|
17
18
|
*/
|
|
18
19
|
|
|
@@ -29,7 +30,10 @@ const { mockRunProbe } = vi.hoisted(() => ({
|
|
|
29
30
|
mockRunProbe: vi.fn(),
|
|
30
31
|
}));
|
|
31
32
|
|
|
32
|
-
vi.mock("./acceptance.ts", () => ({
|
|
33
|
+
vi.mock("./acceptance.ts", async (importOriginal) => ({
|
|
34
|
+
// RFC-1516: keep classifyProbeReuse (and every non-execution export) real —
|
|
35
|
+
// emit's reuse path calls it when a committed envelope is present.
|
|
36
|
+
...(await importOriginal<typeof import("./acceptance.ts")>()),
|
|
33
37
|
runProbe: mockRunProbe,
|
|
34
38
|
// RFC-1489: emit drives runProbeSet — the shim preserves the per-probe
|
|
35
39
|
// mock contract so these tests observe the same probe calls as before.
|
|
@@ -12,6 +12,7 @@ Unit tests for verification emit covering rfc.verification.emit — baseline emi
|
|
|
12
12
|
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
13
13
|
|
|
14
14
|
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>
|
|
15
|
+
<item>RFC-1516: add an evidence-freshness window to the stamp-sync chain for rfc-1516</item>
|
|
15
16
|
</CHANGE_SUMMARY>
|
|
16
17
|
*/
|
|
17
18
|
|
|
@@ -33,7 +34,10 @@ const { mockRunProbe } = vi.hoisted(() => ({
|
|
|
33
34
|
mockRunProbe: vi.fn(),
|
|
34
35
|
}));
|
|
35
36
|
|
|
36
|
-
vi.mock("./acceptance.ts", () => ({
|
|
37
|
+
vi.mock("./acceptance.ts", async (importOriginal) => ({
|
|
38
|
+
// RFC-1516: keep classifyProbeReuse (and every non-execution export) real —
|
|
39
|
+
// emit's reuse path calls it when a committed envelope is present.
|
|
40
|
+
...(await importOriginal<typeof import("./acceptance.ts")>()),
|
|
37
41
|
runProbe: mockRunProbe,
|
|
38
42
|
// RFC-1489: emit drives runProbeSet — the shim preserves the per-probe
|
|
39
43
|
// mock contract so these tests observe the same probe calls as before.
|