@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
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</CHANGE_SUMMARY>
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { join, basename } from "node:path";
|
|
17
|
+
import { join, basename, relative } from "node:path";
|
|
18
18
|
import { ambientIo, resolveIo } from "../../../src/utils/io.ts";
|
|
19
19
|
import { createHash } from "node:crypto";
|
|
20
20
|
import type {
|
|
@@ -210,7 +210,10 @@ export async function runReleasePrepare(
|
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
for (const builtFile of builtFiles) {
|
|
213
|
-
|
|
213
|
+
// Manifest paths are repo-relative logical paths — forward slashes on
|
|
214
|
+
// every platform (a workspaceRoot+"/" prefix strip breaks on Windows,
|
|
215
|
+
// where builtFile arrives backslash-separated).
|
|
216
|
+
const relPath = relative(workspaceRoot, builtFile).replace(/\\/g, "/");
|
|
214
217
|
let hash = "";
|
|
215
218
|
let size = 0;
|
|
216
219
|
|
package/os/flow/digest.ts
CHANGED
|
@@ -502,7 +502,9 @@ async function workflowTagPatterns(
|
|
|
502
502
|
.map((e) => e.name)
|
|
503
503
|
.sort();
|
|
504
504
|
for (const name of names) {
|
|
505
|
-
|
|
505
|
+
// Reported paths are repo-relative logical paths — forward slashes on
|
|
506
|
+
// every platform (WORKFLOWS_DIR uses join() and is only for fs access).
|
|
507
|
+
const file = `.github/workflows/${name}`;
|
|
506
508
|
const text = await io.readFile(join(dir, name)).catch(() => null);
|
|
507
509
|
let parsed: unknown = null;
|
|
508
510
|
let ok = text !== null;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Closed dirty-path classifier for flow.integrate remediation
|
|
4
|
+
(RFC-1531): every uncommitted path maps to exactly one DirtyClass — the
|
|
5
|
+
single shared vocabulary (Q-4) consumed by the preflight's tolerated journal
|
|
6
|
+
surface (RFC-1537) and by the --auto-clean/--autocommit remediation flags.
|
|
7
|
+
Path-only classification is pure and closed-set: FORGE_STATE_FILES →
|
|
8
|
+
tolerated, DISPOSABLE_PATH_RULES → disposable, anything else → work. The
|
|
9
|
+
diff-aware shapes (importer-prune, importer-materialize, skill-twin-sync)
|
|
10
|
+
cannot be decided from a path — they are assigned by the preflight's
|
|
11
|
+
classifyDirt, which emits the same enum.</purpose>
|
|
12
|
+
<non-goals>
|
|
13
|
+
<item>No fuzzy debris detection — the disposable set is closed by RFC-1531; growing it requires an amendment, classify the path work instead.</item>
|
|
14
|
+
<item>No deletion, no commits — classification only; remediation lives in flow-integrate.ts.</item>
|
|
15
|
+
<item>No diff reading — importer and skill-twin classes stay in preflight's classifyDirt; this module never reclassifies them.</item>
|
|
16
|
+
</non-goals>
|
|
17
|
+
</MODULE_CONTRACT>
|
|
18
|
+
<CHANGE_SUMMARY>
|
|
19
|
+
<item>RFC-1531: closed dirty-path classifier + remediation flags on flow.integrate</item>
|
|
20
|
+
<item>RFC-1531: add flow.integrate remediation flags on the shared dirty classifier</item>
|
|
21
|
+
<item>RFC-1543: attribute shared-checkout dirt to live ops and expose peers (RFC-1543)</item>
|
|
22
|
+
<item>RFC-1544: attribute mission lockfile churn to owning checkout and auto-resolve foreign importer diffs (RFC-1544)</item>
|
|
23
|
+
</CHANGE_SUMMARY>
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { isForgeStatePath } from "./git.ts";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The closed vocabulary (Q-4): RFC-1537's tolerated-family classes
|
|
30
|
+
* (importer-prune, importer-materialize, skill-twin-sync) fold in beside the
|
|
31
|
+
* remediation classes — one enum over the same facts, never two maps.
|
|
32
|
+
* - `tolerated` — FORGE_STATE_FILES member; journaled, never blocks.
|
|
33
|
+
* - `disposable` — declared debris; `--auto-clean` may delete it.
|
|
34
|
+
* - `importer-prune` — RFC-1528 lockfile shape; assigned by classifyDirt.
|
|
35
|
+
* - `foreign-open-mission` / `importer-prune-stale` — RFC-1544 referent-aware
|
|
36
|
+
* prune classes; assigned by classifyDirt when the caller injects importer
|
|
37
|
+
* referents, tolerated by the pipeline.
|
|
38
|
+
* - `importer-materialize` / `skill-twin-sync` — RFC-1537 regenerable shapes;
|
|
39
|
+
* assigned by classifyDirt, tolerated by the pipeline.
|
|
40
|
+
* - `work` — everything else; always blocks and is never auto-deleted.
|
|
41
|
+
*/
|
|
42
|
+
export type DirtyClass =
|
|
43
|
+
| "tolerated"
|
|
44
|
+
| "disposable"
|
|
45
|
+
| "importer-prune"
|
|
46
|
+
| "importer-materialize"
|
|
47
|
+
| "foreign-open-mission"
|
|
48
|
+
| "importer-prune-stale"
|
|
49
|
+
| "skill-twin-sync"
|
|
50
|
+
| "in-flight-foreign"
|
|
51
|
+
| "work";
|
|
52
|
+
|
|
53
|
+
export interface ClassifiedDirtyEntry {
|
|
54
|
+
/** status-line path (porcelain field, index 3+). */
|
|
55
|
+
path: string;
|
|
56
|
+
class: DirtyClass;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Fixed autocommit sweep subject (FI-1) — AC-9 probes this literal. */
|
|
60
|
+
export const SWEEP_COMMIT_SUBJECT = "chore(flow): sweep session leftovers";
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Classes `--auto-clean` may pass without deleting anything: the RFC-1537
|
|
64
|
+
* regenerable family (journaled, never deleted, never committed — AC-3's
|
|
65
|
+
* "tolerated" arm extends to it post-Q-4). `importer-prune` deliberately
|
|
66
|
+
* stays OUT: AC-4 names it a refusal class — restoring or committing a
|
|
67
|
+
* lockfile is a content decision the operator makes, not a cleanup step.
|
|
68
|
+
*/
|
|
69
|
+
export const AUTO_CLEAN_PASS_CLASSES: readonly DirtyClass[] = [
|
|
70
|
+
"tolerated",
|
|
71
|
+
"importer-materialize",
|
|
72
|
+
"skill-twin-sync",
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The disposable set is CLOSED — a path is disposable iff it matches exactly
|
|
77
|
+
* one declared rule (RFC-1531): `*.stale` teardown-rename leftovers
|
|
78
|
+
* (F-0093 shape), coverage dirs, `tmp`/`tmp-*` dirs at any depth, and
|
|
79
|
+
* `*.log` files. FORGE_STATE_FILES members are conceptually disposable too
|
|
80
|
+
* (RFC-1515 deletes them before worktree removal) but classify `tolerated`
|
|
81
|
+
* here — they are reported through toleratedState, never swept.
|
|
82
|
+
*/
|
|
83
|
+
export const DISPOSABLE_PATH_RULES: readonly RegExp[] = [
|
|
84
|
+
/\.stale$/,
|
|
85
|
+
/(^|\/)\.?coverage(\/|$)/,
|
|
86
|
+
/(^|\/)tmp(-[^/]*)?(\/|$)/,
|
|
87
|
+
/\.log$/,
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Path-only classification — never reads a diff. A `pnpm-lock.yaml` or
|
|
92
|
+
* `.agents/skills/` path classifies `work` here; consumers holding the diff
|
|
93
|
+
* (preflight's classifyDirt) refine those paths into the importer/twin
|
|
94
|
+
* classes of the same enum.
|
|
95
|
+
*/
|
|
96
|
+
export function classifyDirtyPath(path: string): DirtyClass {
|
|
97
|
+
const clean = path.replace(/\/+$/, "");
|
|
98
|
+
if (isForgeStatePath(clean)) return "tolerated";
|
|
99
|
+
if (DISPOSABLE_PATH_RULES.some((r) => r.test(clean))) return "disposable";
|
|
100
|
+
return "work";
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** Classify porcelain status lines (path = field 3+) — pure, no I/O. */
|
|
104
|
+
export function classifyDirtyTree(entries: string[]): ClassifiedDirtyEntry[] {
|
|
105
|
+
return entries.map((line) => {
|
|
106
|
+
const path = line.slice(3).trim();
|
|
107
|
+
return { path, class: classifyDirtyPath(path) };
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** `data.classes` shape — counts per present class, for FLOW-INT-01 data. */
|
|
112
|
+
export function summarizeClasses(
|
|
113
|
+
entries: ClassifiedDirtyEntry[],
|
|
114
|
+
): Partial<Record<DirtyClass, number>> {
|
|
115
|
+
const counts: Partial<Record<DirtyClass, number>> = {};
|
|
116
|
+
for (const e of entries) {
|
|
117
|
+
counts[e.class] = (counts[e.class] ?? 0) + 1;
|
|
118
|
+
}
|
|
119
|
+
return counts;
|
|
120
|
+
}
|
package/os/flow/flow.module.ts
CHANGED
|
@@ -9,14 +9,12 @@ the idempotent two-phase repository adoption (FLOW-ADOPT-01..06, -08).</purpose>
|
|
|
9
9
|
</non-goals>
|
|
10
10
|
</MODULE_CONTRACT>
|
|
11
11
|
<CHANGE_SUMMARY>
|
|
12
|
-
<item>RFC-
|
|
13
|
-
<item>RFC-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<item>RFC-
|
|
17
|
-
<
|
|
18
|
-
<item>RFC-1502: steps 1-5 — release-prepare hook, pre-tag extract verification, ordered steps</item>
|
|
19
|
-
<history>RFC-1486, RFC-1487, RFC-1488, RFC-1490, RFC-1491</history>
|
|
12
|
+
<item>RFC-1533: surface pending flow branches in flow.open and the pre-user-prompt nudge</item>
|
|
13
|
+
<item>RFC-1537: classify regenerable worktree dirt and journal integrate refusals cheapest-first</item>
|
|
14
|
+
<item>RFC-1538: revalidate integration preconditions post-lock and reuse the session engine</item>
|
|
15
|
+
<item>RFC-1531: add flow.integrate remediation flags on the shared dirty classifier</item>
|
|
16
|
+
<item>RFC-1543: attribute shared-checkout dirt to live ops and expose peers (RFC-1543)</item>
|
|
17
|
+
<history>RFC-1486, RFC-1487, RFC-1488, RFC-1490, RFC-1491, RFC-1498, RFC-1502, RFC-1503, RFC-1517, RFC-1528</history>
|
|
20
18
|
</CHANGE_SUMMARY>
|
|
21
19
|
*/
|
|
22
20
|
|
|
@@ -36,6 +34,7 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
36
34
|
const { runFlowPush } = await import("./handlers/flow-push.ts");
|
|
37
35
|
const { runFlowPublicationRetire } = await import("./handlers/flow-publication-retire.ts");
|
|
38
36
|
const { runFlowStatus } = await import("./handlers/flow-status.ts");
|
|
37
|
+
const { runFlowPeers } = await import("./handlers/flow-peers.ts");
|
|
39
38
|
const { runFlowUnhold } = await import("./handlers/flow-unhold.ts");
|
|
40
39
|
const { runFlowVersion } = await import("./handlers/flow-version.ts");
|
|
41
40
|
return {
|
|
@@ -75,8 +74,7 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
75
74
|
execOnReadOnly: true,
|
|
76
75
|
writes: [],
|
|
77
76
|
coverage: "operator",
|
|
78
|
-
coverageNote:
|
|
79
|
-
"adoption/model check — wired into pipelines by the wave-4 switch-over RFC",
|
|
77
|
+
coverageNote: "adoption/model check — wired into pipelines by the wave-4 switch-over RFC",
|
|
80
78
|
reads: [
|
|
81
79
|
"forge.yaml",
|
|
82
80
|
"forge.generated.yaml",
|
|
@@ -138,8 +136,7 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
138
136
|
"dry-run": {
|
|
139
137
|
kind: "boolean",
|
|
140
138
|
required: false,
|
|
141
|
-
description:
|
|
142
|
-
"Plan phase only — report the computed steps[] without mutating anything.",
|
|
139
|
+
description: "Plan phase only — report the computed steps[] without mutating anything.",
|
|
143
140
|
},
|
|
144
141
|
},
|
|
145
142
|
execute: runFlowInstall,
|
|
@@ -170,7 +167,13 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
170
167
|
writes: [],
|
|
171
168
|
coverage: "operator",
|
|
172
169
|
coverageNote: "read-only version report — consumed by flow.cut in wave 2",
|
|
173
|
-
reads: [
|
|
170
|
+
reads: [
|
|
171
|
+
"pnpm-workspace.yaml",
|
|
172
|
+
"*/package.json",
|
|
173
|
+
"*/extract.config.yaml",
|
|
174
|
+
".git/**",
|
|
175
|
+
"docs/rfcs/**",
|
|
176
|
+
],
|
|
174
177
|
cacheable: false,
|
|
175
178
|
flags: {
|
|
176
179
|
line: {
|
|
@@ -197,12 +200,13 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
197
200
|
contract: "flow",
|
|
198
201
|
rules: [
|
|
199
202
|
{ id: "FLOW-OPEN-01", severity: "error" },
|
|
200
|
-
{ id: "FLOW-OPEN-02", severity: "
|
|
203
|
+
{ id: "FLOW-OPEN-02", severity: "warning" },
|
|
201
204
|
{ id: "FLOW-OPEN-03", severity: "error" },
|
|
202
205
|
{ id: "FLOW-OPEN-04", severity: "error" },
|
|
203
206
|
{ id: "FLOW-OPEN-05", severity: "error" },
|
|
204
207
|
{ id: "FLOW-OPEN-06", severity: "error" },
|
|
205
208
|
{ id: "FLOW-OPEN-07", severity: "error" },
|
|
209
|
+
{ id: "FLOW-OPEN-11", severity: "error" },
|
|
206
210
|
{ id: "FLOW-07", severity: "error" },
|
|
207
211
|
],
|
|
208
212
|
mutatesState: true,
|
|
@@ -233,7 +237,8 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
233
237
|
owner: {
|
|
234
238
|
kind: "string",
|
|
235
239
|
required: false,
|
|
236
|
-
description:
|
|
240
|
+
description:
|
|
241
|
+
"Owner id — required for --kind task (e.g. T-0007); sessions default to 'unspecified'.",
|
|
237
242
|
},
|
|
238
243
|
"dry-run": {
|
|
239
244
|
kind: "boolean",
|
|
@@ -253,8 +258,14 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
253
258
|
"on develop fast-forwards via git -C <primary> merge --ff-only " +
|
|
254
259
|
"(never a merge commit — the primary working tree is rewritten by " +
|
|
255
260
|
"the merge itself), then teardown, worktree removal, branch delete, " +
|
|
256
|
-
"registry drop and journal finish the lifecycle.
|
|
257
|
-
"
|
|
261
|
+
"registry drop and journal finish the lifecycle. On the non-port " +
|
|
262
|
+
"path a bounded preflight (classified dirty-tree checks, " +
|
|
263
|
+
"ecosystem.manifest.validate, scoped rfc.validate, " +
|
|
264
|
+
"friction.validate) refuses before the rebase and the gate " +
|
|
265
|
+
"(RFC-1528). Refusals: FLOW-INT-01..17. RFC-1531 remediation " +
|
|
266
|
+
"flags: --reattach recreates a vanished worktree, --auto-clean " +
|
|
267
|
+
"deletes closed-class disposable dirt, --autocommit sweeps the " +
|
|
268
|
+
"rest into a fixed-subject commit.",
|
|
258
269
|
scope: "workspace",
|
|
259
270
|
contract: "flow",
|
|
260
271
|
rules: [
|
|
@@ -269,7 +280,14 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
269
280
|
{ id: "FLOW-INT-09", severity: "error" },
|
|
270
281
|
{ id: "FLOW-INT-10", severity: "error" },
|
|
271
282
|
{ id: "FLOW-INT-11", severity: "error" },
|
|
283
|
+
{ id: "FLOW-INT-12", severity: "error" },
|
|
284
|
+
{ id: "FLOW-INT-13", severity: "error" },
|
|
285
|
+
{ id: "FLOW-INT-14", severity: "error" },
|
|
286
|
+
{ id: "FLOW-INT-15", severity: "error" },
|
|
287
|
+
{ id: "FLOW-INT-16", severity: "warning" },
|
|
288
|
+
{ id: "FLOW-INT-17", severity: "error" },
|
|
272
289
|
{ id: "FLOW-07", severity: "error" },
|
|
290
|
+
{ id: "WT-GATE-01", severity: "error" },
|
|
273
291
|
],
|
|
274
292
|
mutatesState: true,
|
|
275
293
|
idempotency: "rerun-safe",
|
|
@@ -288,6 +306,30 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
288
306
|
description:
|
|
289
307
|
"Registered auto branch to integrate; defaults to the branch checked out in the cwd worktree.",
|
|
290
308
|
},
|
|
309
|
+
reattach: {
|
|
310
|
+
kind: "boolean",
|
|
311
|
+
required: false,
|
|
312
|
+
description:
|
|
313
|
+
"RFC-1531: recreate a vanished registered worktree at its recorded (or canonical sibling) path instead of refusing.",
|
|
314
|
+
},
|
|
315
|
+
"auto-clean": {
|
|
316
|
+
kind: "boolean",
|
|
317
|
+
required: false,
|
|
318
|
+
description:
|
|
319
|
+
"RFC-1531: delete dirty paths in the closed disposable class (coverage/, tmp*/, *.log, *.stale), then re-evaluate.",
|
|
320
|
+
},
|
|
321
|
+
autocommit: {
|
|
322
|
+
kind: "boolean",
|
|
323
|
+
required: false,
|
|
324
|
+
description:
|
|
325
|
+
"RFC-1531: sweep all remaining dirty entries into the fixed-subject commit 'chore(flow): sweep session leftovers' before the rebase.",
|
|
326
|
+
},
|
|
327
|
+
"wait-foreign": {
|
|
328
|
+
kind: "string",
|
|
329
|
+
required: false,
|
|
330
|
+
description:
|
|
331
|
+
"RFC-1543: seconds to wait for live foreign op-claim holders on the primary before FLOW-INT-03 refuses (default 600; 0 restores fail-fast).",
|
|
332
|
+
},
|
|
291
333
|
"dry-run": {
|
|
292
334
|
kind: "boolean",
|
|
293
335
|
required: false,
|
|
@@ -332,10 +374,11 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
332
374
|
{ id: "FLOW-INT-06", severity: "error" },
|
|
333
375
|
{ id: "FLOW-INT-08", severity: "error" },
|
|
334
376
|
{ id: "FLOW-07", severity: "error" },
|
|
335
|
-
{ id: "FLOW-OPEN-02", severity: "
|
|
377
|
+
{ id: "FLOW-OPEN-02", severity: "warning" },
|
|
336
378
|
{ id: "FLOW-OPEN-04", severity: "error" },
|
|
337
379
|
{ id: "FLOW-OPEN-06", severity: "error" },
|
|
338
380
|
{ id: "FLOW-OPEN-07", severity: "error" },
|
|
381
|
+
{ id: "FLOW-OPEN-11", severity: "error" },
|
|
339
382
|
],
|
|
340
383
|
envInputs: [{ name: "ALLOW_MAJOR_BUMP", required: false }],
|
|
341
384
|
mutatesState: true,
|
|
@@ -346,7 +389,16 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
346
389
|
generates: [],
|
|
347
390
|
coverage: "operator",
|
|
348
391
|
coverageNote: "release workflow — activated by the wave-4 switch-over RFC",
|
|
349
|
-
reads: [
|
|
392
|
+
reads: [
|
|
393
|
+
"forge.yaml",
|
|
394
|
+
"forge.generated.yaml",
|
|
395
|
+
".git/**",
|
|
396
|
+
"hooks/**",
|
|
397
|
+
"pnpm-workspace.yaml",
|
|
398
|
+
"package.json",
|
|
399
|
+
"packages/*/package.json",
|
|
400
|
+
"packages/*/extract.config.yaml",
|
|
401
|
+
],
|
|
350
402
|
cacheable: false,
|
|
351
403
|
flags: {
|
|
352
404
|
lines: {
|
|
@@ -389,10 +441,11 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
389
441
|
{ id: "FLOW-INT-09", severity: "error" },
|
|
390
442
|
{ id: "FLOW-INT-10", severity: "error" },
|
|
391
443
|
{ id: "FLOW-07", severity: "error" },
|
|
392
|
-
{ id: "FLOW-OPEN-02", severity: "
|
|
444
|
+
{ id: "FLOW-OPEN-02", severity: "warning" },
|
|
393
445
|
{ id: "FLOW-OPEN-04", severity: "error" },
|
|
394
446
|
{ id: "FLOW-OPEN-06", severity: "error" },
|
|
395
447
|
{ id: "FLOW-OPEN-07", severity: "error" },
|
|
448
|
+
{ id: "FLOW-OPEN-11", severity: "error" },
|
|
396
449
|
],
|
|
397
450
|
mutatesState: true,
|
|
398
451
|
idempotency: "rerun-safe",
|
|
@@ -402,7 +455,14 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
402
455
|
generates: [],
|
|
403
456
|
coverage: "operator",
|
|
404
457
|
coverageNote: "release workflow — activated by the wave-4 switch-over RFC",
|
|
405
|
-
reads: [
|
|
458
|
+
reads: [
|
|
459
|
+
"forge.yaml",
|
|
460
|
+
"forge.generated.yaml",
|
|
461
|
+
".git/**",
|
|
462
|
+
"hooks/**",
|
|
463
|
+
"pnpm-workspace.yaml",
|
|
464
|
+
"package.json",
|
|
465
|
+
],
|
|
406
466
|
cacheable: false,
|
|
407
467
|
flags: {
|
|
408
468
|
redo: {
|
|
@@ -436,10 +496,11 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
436
496
|
{ id: "FLOW-FIX-03", severity: "error" },
|
|
437
497
|
{ id: "FLOW-FIX-04", severity: "error" },
|
|
438
498
|
{ id: "FLOW-OPEN-01", severity: "error" },
|
|
439
|
-
{ id: "FLOW-OPEN-02", severity: "
|
|
499
|
+
{ id: "FLOW-OPEN-02", severity: "warning" },
|
|
440
500
|
{ id: "FLOW-OPEN-04", severity: "error" },
|
|
441
501
|
{ id: "FLOW-OPEN-06", severity: "error" },
|
|
442
502
|
{ id: "FLOW-OPEN-07", severity: "error" },
|
|
503
|
+
{ id: "FLOW-OPEN-11", severity: "error" },
|
|
443
504
|
{ id: "FLOW-07", severity: "error" },
|
|
444
505
|
],
|
|
445
506
|
mutatesState: true,
|
|
@@ -450,7 +511,14 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
450
511
|
generates: [],
|
|
451
512
|
coverage: "operator",
|
|
452
513
|
coverageNote: "release workflow — activated by the wave-4 switch-over RFC",
|
|
453
|
-
reads: [
|
|
514
|
+
reads: [
|
|
515
|
+
"forge.yaml",
|
|
516
|
+
"forge.generated.yaml",
|
|
517
|
+
".git/**",
|
|
518
|
+
"hooks/**",
|
|
519
|
+
"pnpm-workspace.yaml",
|
|
520
|
+
"package.json",
|
|
521
|
+
],
|
|
454
522
|
cacheable: false,
|
|
455
523
|
flags: {
|
|
456
524
|
slug: {
|
|
@@ -675,7 +743,12 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
675
743
|
"and publishes each package-line tag through repo-extract " +
|
|
676
744
|
"(FLOW-PUSH-05 per failure, ours-merge reconcile on " +
|
|
677
745
|
"non-fast-forward only, never force). A rerun with an empty " +
|
|
678
|
-
"digest retries journal-scoped pending publications."
|
|
746
|
+
"digest retries journal-scoped pending publications. Per-tag " +
|
|
747
|
+
"preflight refuses before repo-extract spawns: FLOW-PUB-01 " +
|
|
748
|
+
"(missing [version] CHANGELOG section at ref) and PKG-HEALTH-10 " +
|
|
749
|
+
"(shipped ../ literal escaping the package root — same-line " +
|
|
750
|
+
'"// pkg-health-10:" suppression or pkgHealth10Suppressions in ' +
|
|
751
|
+
"extract.config.yaml for justified non-path literals).",
|
|
679
752
|
scope: "workspace",
|
|
680
753
|
contract: "flow",
|
|
681
754
|
rules: [
|
|
@@ -686,6 +759,8 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
686
759
|
{ id: "FLOW-PUSH-05", severity: "error" },
|
|
687
760
|
{ id: "FLOW-PUSH-06", severity: "error" },
|
|
688
761
|
{ id: "FLOW-PUSH-07", severity: "error" },
|
|
762
|
+
{ id: "FLOW-PUB-01", severity: "error" },
|
|
763
|
+
{ id: "PKG-HEALTH-10", severity: "error" },
|
|
689
764
|
{ id: "FLOW-07", severity: "error" },
|
|
690
765
|
],
|
|
691
766
|
mutatesState: true,
|
|
@@ -790,6 +865,26 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
790
865
|
flags: {},
|
|
791
866
|
execute: runFlowStatus,
|
|
792
867
|
},
|
|
868
|
+
{
|
|
869
|
+
name: "flow.peers",
|
|
870
|
+
description:
|
|
871
|
+
"Read-only live resource map (RFC-1543): integrate.lock holder, " +
|
|
872
|
+
"live op-claims grouped by checkout, open missions per worktree " +
|
|
873
|
+
"and registered in-flight branches — the forge/peers@1 report a " +
|
|
874
|
+
"second session reads before waiting on a held primary.",
|
|
875
|
+
scope: "workspace",
|
|
876
|
+
contract: "flow",
|
|
877
|
+
rules: [],
|
|
878
|
+
mutatesState: false,
|
|
879
|
+
execOnReadOnly: true,
|
|
880
|
+
writes: [],
|
|
881
|
+
coverage: "operator",
|
|
882
|
+
coverageNote: "shared-checkout visibility — RFC-1543",
|
|
883
|
+
reads: [".git/**"],
|
|
884
|
+
cacheable: false,
|
|
885
|
+
flags: {},
|
|
886
|
+
execute: runFlowPeers,
|
|
887
|
+
},
|
|
793
888
|
],
|
|
794
889
|
pipelines: [],
|
|
795
890
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Gate-engine resolution for flow.integrate (RFC-1538): pick the
|
|
4
|
+
checkout whose build executes the primary-owned integration-gate.sh. A
|
|
5
|
+
session worktree carrying its own engine build (node_modules present) runs
|
|
6
|
+
"session" — the gate script stays primary-owned, only the engine binary
|
|
7
|
+
context moves so the code under review judges itself. Without a session
|
|
8
|
+
build (plain-git workshops, non-session branches) the primary engine stays
|
|
9
|
+
the fallback and the run reports FLOW-INT-16 (warning).</purpose>
|
|
10
|
+
<non-goals>
|
|
11
|
+
<item>No PATH/env injection — cwd binding alone yields the session build through pnpm/node resolution.</item>
|
|
12
|
+
<item>No check weakening — hook bytes always come from the primary checkout (runFlowScript contract).</item>
|
|
13
|
+
</non-goals>
|
|
14
|
+
</MODULE_CONTRACT>
|
|
15
|
+
<CHANGE_SUMMARY>
|
|
16
|
+
<item>RFC-1538: session-engine gate selection — GateEngine resolution + FLOW-INT-16 fallback reporting</item>
|
|
17
|
+
<item>RFC-1538: revalidate integration preconditions post-lock and reuse the session engine</item>
|
|
18
|
+
</CHANGE_SUMMARY>
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { join } from "node:path";
|
|
22
|
+
|
|
23
|
+
import type { WorkspaceIO } from "../../src/types.ts";
|
|
24
|
+
|
|
25
|
+
export interface GateEngine {
|
|
26
|
+
source: "primary" | "session";
|
|
27
|
+
/** cwd the gate script executes under. */
|
|
28
|
+
root: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* "session" when the integrating worktree carries its own engine build —
|
|
33
|
+
* `node_modules` presence is the install marker. Everything else resolves
|
|
34
|
+
* primary (plain-git workshops, branches without an install).
|
|
35
|
+
*/
|
|
36
|
+
export async function resolveGateEngine(
|
|
37
|
+
branchWorktree: string,
|
|
38
|
+
primary: string,
|
|
39
|
+
io: WorkspaceIO,
|
|
40
|
+
): Promise<GateEngine> {
|
|
41
|
+
if (await io.exists(join(branchWorktree, "node_modules"))) {
|
|
42
|
+
return { source: "session", root: branchWorktree };
|
|
43
|
+
}
|
|
44
|
+
return { source: "primary", root: primary };
|
|
45
|
+
}
|