@warpgogol/forge 5.2.3 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +34 -2
- package/README.md +1 -1
- package/README.uk.md +8 -8
- package/bin/cli.ts +1 -0
- package/dist/bin/cli.js +1 -0
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/adr/adr.module.d.ts.map +1 -1
- package/dist/os/adr/adr.module.js +8 -3
- package/dist/os/adr/adr.module.js.map +1 -1
- package/dist/os/adr/frontmatter-io.js +5 -5
- package/dist/os/adr/frontmatter-io.js.map +1 -1
- package/dist/os/adr/handlers/archive.d.ts.map +1 -1
- package/dist/os/adr/handlers/archive.js +10 -4
- package/dist/os/adr/handlers/archive.js.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.js +10 -9
- package/dist/os/adr/handlers/implement-stamp.js.map +1 -1
- package/dist/os/adr/handlers/list-create.js +5 -5
- package/dist/os/adr/handlers/list-create.js.map +1 -1
- package/dist/os/adr/handlers/validate.js +1 -1
- package/dist/os/adr/handlers/validate.js.map +1 -1
- package/dist/os/audit/audit.module.js +3 -3
- package/dist/os/audit/audit.module.js.map +1 -1
- package/dist/os/audit/frontmatter-io.js +5 -5
- package/dist/os/audit/frontmatter-io.js.map +1 -1
- package/dist/os/audit/handlers/archive.d.ts.map +1 -1
- package/dist/os/audit/handlers/archive.js +10 -4
- package/dist/os/audit/handlers/archive.js.map +1 -1
- package/dist/os/compass/compass.module.d.ts.map +1 -1
- package/dist/os/compass/compass.module.js +17 -1
- package/dist/os/compass/compass.module.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 +12 -5
- package/dist/os/compass/handlers/compass-audit-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.js +3 -2
- package/dist/os/compass/handlers/compass-change-summary-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-inventory-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory-handler.js +6 -4
- package/dist/os/compass/handlers/compass-inventory-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-inventory.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory.js +10 -8
- package/dist/os/compass/handlers/compass-inventory.js.map +1 -1
- package/dist/os/compass/handlers/compass-migrate-handler.js +1 -1
- package/dist/os/compass/handlers/compass-migrate-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-migrate.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-migrate.js +6 -3
- package/dist/os/compass/handlers/compass-migrate.js.map +1 -1
- package/dist/os/compass/handlers/git-revision.d.ts.map +1 -1
- package/dist/os/compass/handlers/git-revision.js +9 -6
- package/dist/os/compass/handlers/git-revision.js.map +1 -1
- package/dist/os/compass/handlers/resolve-scan-root.js +1 -1
- package/dist/os/compass/handlers/resolve-scan-root.js.map +1 -1
- package/dist/os/compass/handlers/summary-record.d.ts.map +1 -1
- package/dist/os/compass/handlers/summary-record.js +8 -4
- package/dist/os/compass/handlers/summary-record.js.map +1 -1
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +57 -4
- 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 +6 -3
- package/dist/os/core/handlers/assets-helpers.js.map +1 -1
- package/dist/os/core/handlers/build.js +1 -1
- package/dist/os/core/handlers/build.js.map +1 -1
- package/dist/os/core/handlers/determinism-check.d.ts.map +1 -1
- package/dist/os/core/handlers/determinism-check.js +10 -6
- package/dist/os/core/handlers/determinism-check.js.map +1 -1
- package/dist/os/core/handlers/dev.js +1 -1
- package/dist/os/core/handlers/dev.js.map +1 -1
- package/dist/os/core/handlers/file-size-lint.d.ts.map +1 -1
- package/dist/os/core/handlers/file-size-lint.js +11 -7
- package/dist/os/core/handlers/file-size-lint.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 +9 -5
- package/dist/os/core/handlers/forge-autonomy-validate.js.map +1 -1
- package/dist/os/core/handlers/knowledge-compact.js +1 -1
- package/dist/os/core/handlers/knowledge-compact.js.map +1 -1
- package/dist/os/core/handlers/package-health.js +1 -1
- package/dist/os/core/handlers/package-health.js.map +1 -1
- package/dist/os/core/handlers/pinned-check.js +2 -2
- package/dist/os/core/handlers/pinned-check.js.map +1 -1
- package/dist/os/core/handlers/pinned-init.d.ts.map +1 -1
- package/dist/os/core/handlers/pinned-init.js +9 -8
- package/dist/os/core/handlers/pinned-init.js.map +1 -1
- package/dist/os/core/handlers/pinned-validate.js +3 -3
- package/dist/os/core/handlers/pinned-validate.js.map +1 -1
- package/dist/os/core/handlers/profile-resolve.js +1 -1
- package/dist/os/core/handlers/profile-resolve.js.map +1 -1
- package/dist/os/core/handlers/public-surface.js +1 -1
- package/dist/os/core/handlers/public-surface.js.map +1 -1
- package/dist/os/core/handlers/release-prepare.d.ts.map +1 -1
- package/dist/os/core/handlers/release-prepare.js +10 -6
- package/dist/os/core/handlers/release-prepare.js.map +1 -1
- package/dist/os/core/handlers/release-publish.js +6 -6
- package/dist/os/core/handlers/release-publish.js.map +1 -1
- package/dist/os/core/handlers/validate.js +1 -1
- package/dist/os/core/handlers/validate.js.map +1 -1
- package/dist/os/exploration/exploration.module.d.ts.map +1 -1
- package/dist/os/exploration/exploration.module.js +1 -0
- package/dist/os/exploration/exploration.module.js.map +1 -1
- package/dist/os/exploration/frontmatter-io.js +4 -4
- package/dist/os/exploration/frontmatter-io.js.map +1 -1
- package/dist/os/exploration/handlers/archive.js +3 -3
- package/dist/os/exploration/handlers/archive.js.map +1 -1
- package/dist/os/mission/handlers/archive.d.ts.map +1 -1
- package/dist/os/mission/handlers/archive.js +22 -19
- package/dist/os/mission/handlers/archive.js.map +1 -1
- package/dist/os/mission/mission.module.js +3 -3
- package/dist/os/mission/mission.module.js.map +1 -1
- package/dist/os/naming/naming-convention.d.ts.map +1 -1
- package/dist/os/naming/naming-convention.js +7 -3
- package/dist/os/naming/naming-convention.js.map +1 -1
- package/dist/os/naming/naming.module.d.ts.map +1 -1
- package/dist/os/naming/naming.module.js +4 -3
- package/dist/os/naming/naming.module.js.map +1 -1
- package/dist/os/notes/notes.module.d.ts.map +1 -1
- package/dist/os/notes/notes.module.js +6 -3
- package/dist/os/notes/notes.module.js.map +1 -1
- package/dist/os/plan/frontmatter-io.js +5 -5
- package/dist/os/plan/frontmatter-io.js.map +1 -1
- package/dist/os/plan/handlers/archive.d.ts.map +1 -1
- package/dist/os/plan/handlers/archive.js +10 -4
- package/dist/os/plan/handlers/archive.js.map +1 -1
- package/dist/os/plan/plan.module.js +3 -3
- package/dist/os/plan/plan.module.js.map +1 -1
- package/dist/os/plugin/plugin.module.d.ts.map +1 -1
- package/dist/os/plugin/plugin.module.js +6 -3
- package/dist/os/plugin/plugin.module.js.map +1 -1
- package/dist/os/program/discovery.js +2 -2
- package/dist/os/program/discovery.js.map +1 -1
- package/dist/os/program/handlers/complete.js +1 -1
- package/dist/os/program/handlers/complete.js.map +1 -1
- package/dist/os/program/handlers/lease.js +1 -1
- package/dist/os/program/handlers/lease.js.map +1 -1
- package/dist/os/program/handlers/seal.js +1 -1
- package/dist/os/program/handlers/seal.js.map +1 -1
- package/dist/os/program/lease.js +1 -1
- package/dist/os/program/lease.js.map +1 -1
- package/dist/os/program/program.module.d.ts.map +1 -1
- package/dist/os/program/program.module.js +9 -3
- package/dist/os/program/program.module.js.map +1 -1
- package/dist/os/queue/index.js +1 -1
- package/dist/os/queue/manifest.d.ts.map +1 -1
- package/dist/os/queue/manifest.js +4 -8
- package/dist/os/queue/manifest.js.map +1 -1
- package/dist/os/rfc/acceptance.d.ts.map +1 -1
- package/dist/os/rfc/acceptance.js +10 -6
- 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 +4 -3
- package/dist/os/rfc/decision-log.js.map +1 -1
- package/dist/os/rfc/dna-trace.d.ts.map +1 -1
- package/dist/os/rfc/dna-trace.js +7 -2
- package/dist/os/rfc/dna-trace.js.map +1 -1
- package/dist/os/rfc/frontmatter-io.js +5 -5
- package/dist/os/rfc/frontmatter-io.js.map +1 -1
- package/dist/os/rfc/handlers/archive.d.ts.map +1 -1
- package/dist/os/rfc/handlers/archive.js +11 -5
- package/dist/os/rfc/handlers/archive.js.map +1 -1
- package/dist/os/rfc/handlers/check.d.ts.map +1 -1
- package/dist/os/rfc/handlers/check.js +6 -3
- package/dist/os/rfc/handlers/check.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +11 -10
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/index-graph.js +3 -3
- package/dist/os/rfc/handlers/index-graph.js.map +1 -1
- package/dist/os/rfc/handlers/lifecycle.d.ts.map +1 -1
- package/dist/os/rfc/handlers/lifecycle.js +6 -2
- package/dist/os/rfc/handlers/lifecycle.js.map +1 -1
- package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
- package/dist/os/rfc/handlers/list-create.js +7 -6
- package/dist/os/rfc/handlers/list-create.js.map +1 -1
- package/dist/os/rfc/handlers/shared.js +3 -3
- package/dist/os/rfc/handlers/shared.js.map +1 -1
- package/dist/os/rfc/handlers/supersede-propose.d.ts.map +1 -1
- package/dist/os/rfc/handlers/supersede-propose.js +7 -3
- package/dist/os/rfc/handlers/supersede-propose.js.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +8 -5
- package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +44 -4
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
- package/dist/os/rfc/verification-evidence.js +9 -5
- package/dist/os/rfc/verification-evidence.js.map +1 -1
- package/dist/os/rfc/verification-refresh.d.ts.map +1 -1
- package/dist/os/rfc/verification-refresh.js +4 -3
- package/dist/os/rfc/verification-refresh.js.map +1 -1
- package/dist/os/session/frontmatter-io.js +12 -12
- package/dist/os/session/frontmatter-io.js.map +1 -1
- package/dist/os/session/handlers/archive.d.ts.map +1 -1
- package/dist/os/session/handlers/archive.js +10 -4
- package/dist/os/session/handlers/archive.js.map +1 -1
- package/dist/os/session/handlers/metrics-aggregate.d.ts.map +1 -1
- package/dist/os/session/handlers/metrics-aggregate.js +9 -5
- package/dist/os/session/handlers/metrics-aggregate.js.map +1 -1
- package/dist/os/session/handlers/metrics-rfc.d.ts.map +1 -1
- package/dist/os/session/handlers/metrics-rfc.js +11 -8
- package/dist/os/session/handlers/metrics-rfc.js.map +1 -1
- package/dist/os/session/handlers/metrics-session.d.ts.map +1 -1
- package/dist/os/session/handlers/metrics-session.js +6 -3
- package/dist/os/session/handlers/metrics-session.js.map +1 -1
- package/dist/os/session/handlers/save.d.ts.map +1 -1
- package/dist/os/session/handlers/save.js +14 -8
- package/dist/os/session/handlers/save.js.map +1 -1
- package/dist/os/session/session.module.d.ts.map +1 -1
- package/dist/os/session/session.module.js +6 -0
- package/dist/os/session/session.module.js.map +1 -1
- package/dist/os/spec/live-spec-list.js +4 -4
- package/dist/os/spec/live-spec-list.js.map +1 -1
- package/dist/os/spec/live-spec-merge.js +5 -5
- package/dist/os/spec/live-spec-merge.js.map +1 -1
- package/dist/os/spec/live-spec-show.js +3 -3
- package/dist/os/spec/live-spec-show.js.map +1 -1
- package/dist/os/spec/live-spec-validate.js +4 -4
- package/dist/os/spec/live-spec-validate.js.map +1 -1
- package/dist/os/spec/spec-materialize.js +9 -9
- package/dist/os/spec/spec-materialize.js.map +1 -1
- package/dist/os/spec/spec-status.js +9 -9
- package/dist/os/spec/spec-status.js.map +1 -1
- package/dist/os/spec/spec-validate.js +7 -7
- 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 +8 -0
- package/dist/os/spec/spec.module.js.map +1 -1
- package/dist/os/werkstatt/handlers/lock.js +16 -16
- package/dist/os/werkstatt/handlers/lock.js.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +3 -3
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js +3 -2
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js.map +1 -1
- package/dist/os/werkstatt/werkstatt.module.d.ts.map +1 -1
- package/dist/os/werkstatt/werkstatt.module.js +6 -2
- package/dist/os/werkstatt/werkstatt.module.js.map +1 -1
- package/dist/os/workflow/handlers.d.ts.map +1 -1
- package/dist/os/workflow/handlers.js +8 -5
- package/dist/os/workflow/handlers.js.map +1 -1
- package/dist/os/workflow/workflow.module.d.ts.map +1 -1
- package/dist/os/workflow/workflow.module.js +6 -3
- package/dist/os/workflow/workflow.module.js.map +1 -1
- package/dist/src/compass/contract-registry.js +1 -1
- package/dist/src/compass/contract-registry.js.map +1 -1
- package/dist/src/config/forge-config.d.ts +10 -1
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +8 -1
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/knowledge/budgets.js +1 -1
- package/dist/src/knowledge/budgets.js.map +1 -1
- package/dist/src/knowledge/compact.js +1 -1
- package/dist/src/knowledge/compact.js.map +1 -1
- package/dist/src/knowledge/parse.js +1 -1
- package/dist/src/knowledge/parse.js.map +1 -1
- package/dist/src/knowledge/sync.d.ts.map +1 -1
- package/dist/src/knowledge/sync.js +3 -5
- package/dist/src/knowledge/sync.js.map +1 -1
- package/dist/src/migration-adapters/git-utils.js +2 -2
- package/dist/src/migration-adapters/git-utils.js.map +1 -1
- package/dist/src/migration-adapters/ignored-files.js +2 -2
- package/dist/src/migration-adapters/ignored-files.js.map +1 -1
- package/dist/src/migration-adapters/node-typescript-pnpm/index.js +1 -1
- package/dist/src/migration-adapters/node-typescript-pnpm/index.js.map +1 -1
- package/dist/src/migration-adapters/phaser-pnpm/index.js +1 -1
- package/dist/src/migration-adapters/phaser-pnpm/index.js.map +1 -1
- package/dist/src/onboarding/agents-generate.d.ts +2 -0
- package/dist/src/onboarding/agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/agents-generate.js +73 -48
- package/dist/src/onboarding/agents-generate.js.map +1 -1
- package/dist/src/onboarding/create.d.ts.map +1 -1
- package/dist/src/onboarding/create.js +10 -10
- package/dist/src/onboarding/create.js.map +1 -1
- package/dist/src/onboarding/doctor.d.ts +6 -0
- package/dist/src/onboarding/doctor.d.ts.map +1 -1
- package/dist/src/onboarding/doctor.js +179 -61
- package/dist/src/onboarding/doctor.js.map +1 -1
- package/dist/src/onboarding/init.d.ts.map +1 -1
- package/dist/src/onboarding/init.js +30 -1
- package/dist/src/onboarding/init.js.map +1 -1
- package/dist/src/onboarding/invariant-engine.js +1 -1
- package/dist/src/onboarding/invariant-engine.js.map +1 -1
- package/dist/src/onboarding/memory-compact.d.ts +22 -0
- package/dist/src/onboarding/memory-compact.d.ts.map +1 -0
- package/dist/src/onboarding/memory-compact.js +148 -0
- package/dist/src/onboarding/memory-compact.js.map +1 -0
- package/dist/src/onboarding/memory-scaffold.d.ts +1 -0
- package/dist/src/onboarding/memory-scaffold.d.ts.map +1 -1
- package/dist/src/onboarding/memory-scaffold.js +2 -2
- package/dist/src/onboarding/memory-scaffold.js.map +1 -1
- package/dist/src/onboarding/nested-agents-generate.d.ts +4 -1
- package/dist/src/onboarding/nested-agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/nested-agents-generate.js +35 -6
- package/dist/src/onboarding/nested-agents-generate.js.map +1 -1
- package/dist/src/onboarding/nested-agents-templates.d.ts.map +1 -1
- package/dist/src/onboarding/nested-agents-templates.js +8 -12
- package/dist/src/onboarding/nested-agents-templates.js.map +1 -1
- package/dist/src/onboarding/npm-token-check.js +2 -2
- package/dist/src/onboarding/npm-token-check.js.map +1 -1
- package/dist/src/onboarding/prettierignore.d.ts +29 -0
- package/dist/src/onboarding/prettierignore.d.ts.map +1 -0
- package/dist/src/onboarding/prettierignore.js +231 -0
- package/dist/src/onboarding/prettierignore.js.map +1 -0
- package/dist/src/onboarding/profile-validate.d.ts.map +1 -1
- package/dist/src/onboarding/profile-validate.js +5 -4
- package/dist/src/onboarding/profile-validate.js.map +1 -1
- package/dist/src/onboarding/scaffold-project.d.ts.map +1 -1
- package/dist/src/onboarding/scaffold-project.js +35 -27
- package/dist/src/onboarding/scaffold-project.js.map +1 -1
- package/dist/src/onboarding/scaffold.js +1 -1
- package/dist/src/onboarding/scaffold.js.map +1 -1
- package/dist/src/onboarding/skill-markers.d.ts +27 -0
- package/dist/src/onboarding/skill-markers.d.ts.map +1 -0
- package/dist/src/onboarding/skill-markers.js +131 -0
- package/dist/src/onboarding/skill-markers.js.map +1 -0
- package/dist/src/onboarding/upgrade.d.ts +10 -0
- package/dist/src/onboarding/upgrade.d.ts.map +1 -1
- package/dist/src/onboarding/upgrade.js +215 -74
- package/dist/src/onboarding/upgrade.js.map +1 -1
- package/dist/src/onboarding/workspace-discovery.d.ts +1 -1
- package/dist/src/onboarding/workspace-discovery.d.ts.map +1 -1
- package/dist/src/onboarding/workspace-discovery.js +15 -3
- package/dist/src/onboarding/workspace-discovery.js.map +1 -1
- package/dist/src/pipeline-status.d.ts +6 -5
- package/dist/src/pipeline-status.d.ts.map +1 -1
- package/dist/src/pipeline-status.js +24 -19
- package/dist/src/pipeline-status.js.map +1 -1
- package/dist/src/profiles/stack-profile.js +1 -1
- package/dist/src/profiles/stack-profile.js.map +1 -1
- package/dist/src/registry.d.ts +1 -1
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +3 -3
- package/dist/src/registry.js.map +1 -1
- package/dist/src/skill-schema.d.ts +1 -1
- package/dist/src/skill-schema.d.ts.map +1 -1
- package/dist/src/skill-schema.js +4 -1
- package/dist/src/skill-schema.js.map +1 -1
- package/dist/src/types.d.ts +116 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/editable-region.d.ts +46 -0
- package/dist/src/utils/editable-region.d.ts.map +1 -0
- package/dist/src/utils/editable-region.js +125 -0
- package/dist/src/utils/editable-region.js.map +1 -0
- package/dist/src/utils/fs-idempotent.d.ts +2 -1
- package/dist/src/utils/fs-idempotent.d.ts.map +1 -1
- package/dist/src/utils/fs-idempotent.js +11 -7
- package/dist/src/utils/fs-idempotent.js.map +1 -1
- package/dist/src/utils/generated-marker.d.ts +17 -0
- package/dist/src/utils/generated-marker.d.ts.map +1 -1
- package/dist/src/utils/generated-marker.js +29 -1
- package/dist/src/utils/generated-marker.js.map +1 -1
- package/dist/src/utils/index.d.ts +3 -1
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/index.js +3 -1
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/utils/io.d.ts +9 -0
- package/dist/src/utils/io.d.ts.map +1 -0
- package/dist/src/utils/io.js +130 -0
- package/dist/src/utils/io.js.map +1 -0
- package/dist/src/utils/markdown-table.d.ts +21 -0
- package/dist/src/utils/markdown-table.d.ts.map +1 -0
- package/dist/src/utils/markdown-table.js +116 -0
- package/dist/src/utils/markdown-table.js.map +1 -0
- package/dist/src/utils/sync-fs.d.ts +5 -0
- package/dist/src/utils/sync-fs.d.ts.map +1 -0
- package/dist/src/utils/sync-fs.js +26 -0
- package/dist/src/utils/sync-fs.js.map +1 -0
- package/dist/src/validators/note-frontmatter-validate.js +1 -1
- package/dist/src/validators/note-frontmatter-validate.js.map +1 -1
- package/dist/src/validators/note-link-validate.js +1 -1
- package/dist/src/validators/note-link-validate.js.map +1 -1
- package/dist/src/validators/note-orphan-detect.js +1 -1
- package/dist/src/validators/note-orphan-detect.js.map +1 -1
- package/dist/src/validators/port-validate.js +1 -1
- package/dist/src/validators/port-validate.js.map +1 -1
- package/dist/src/validators/skill-validate.d.ts.map +1 -1
- package/dist/src/validators/skill-validate.js +34 -13
- package/dist/src/validators/skill-validate.js.map +1 -1
- package/docs/reference/forge-yaml.md +12 -0
- package/os/adr/adr.module.ts +136 -132
- package/os/adr/frontmatter-io.ts +5 -5
- package/os/adr/handlers/archive.ts +8 -4
- package/os/adr/handlers/implement-stamp.ts +14 -9
- package/os/adr/handlers/list-create.ts +5 -5
- package/os/adr/handlers/validate.ts +1 -1
- package/os/audit/audit.module.ts +33 -34
- package/os/audit/frontmatter-io.ts +5 -5
- package/os/audit/handlers/archive.ts +8 -4
- package/os/compass/compass.module.ts +17 -1
- package/os/compass/handlers/compass-audit-handler.ts +13 -5
- package/os/compass/handlers/compass-change-summary-handler.ts +4 -2
- package/os/compass/handlers/compass-inventory-handler.ts +7 -4
- package/os/compass/handlers/compass-inventory.ts +11 -8
- package/os/compass/handlers/compass-migrate-handler.ts +1 -1
- package/os/compass/handlers/compass-migrate.ts +7 -3
- package/os/compass/handlers/git-revision.ts +11 -6
- package/os/compass/handlers/resolve-scan-root.ts +1 -1
- package/os/compass/handlers/summary-record.ts +10 -4
- package/os/compass/handlers/tests/compass-audit-plan.test.ts +2 -1
- package/os/core/core.module.ts +58 -4
- package/os/core/handlers/assets-helpers.ts +7 -3
- package/os/core/handlers/build.ts +1 -1
- package/os/core/handlers/determinism-check.ts +12 -6
- package/os/core/handlers/dev.ts +1 -1
- package/os/core/handlers/file-size-lint.ts +16 -9
- package/os/core/handlers/forge-autonomy-validate.ts +10 -5
- package/os/core/handlers/knowledge-compact.ts +1 -1
- package/os/core/handlers/package-health.ts +1 -1
- package/os/core/handlers/pinned-check.ts +2 -2
- package/os/core/handlers/pinned-init.ts +9 -8
- package/os/core/handlers/pinned-validate.ts +3 -3
- package/os/core/handlers/profile-resolve.ts +1 -1
- package/os/core/handlers/public-surface.ts +1 -1
- package/os/core/handlers/release-prepare.ts +11 -6
- package/os/core/handlers/release-publish.ts +6 -6
- package/os/core/handlers/validate.ts +1 -1
- package/os/exploration/exploration.module.ts +1 -0
- package/os/exploration/frontmatter-io.ts +4 -4
- package/os/exploration/handlers/archive.ts +3 -3
- package/os/mission/handlers/archive.ts +27 -19
- package/os/mission/mission.module.ts +38 -39
- package/os/naming/naming-convention.ts +9 -3
- package/os/naming/naming.module.ts +25 -25
- package/os/notes/notes.module.ts +87 -85
- package/os/plan/frontmatter-io.ts +5 -5
- package/os/plan/handlers/archive.ts +8 -4
- package/os/plan/plan.module.ts +33 -34
- package/os/plugin/plugin.module.ts +8 -6
- package/os/program/discovery.ts +2 -2
- package/os/program/handlers/complete.ts +1 -1
- package/os/program/handlers/lease.ts +1 -1
- package/os/program/handlers/seal.ts +1 -1
- package/os/program/lease.ts +1 -1
- package/os/program/program.module.ts +198 -193
- package/os/queue/index.ts +1 -1
- package/os/queue/manifest.ts +10 -9
- package/os/queue/queue-validate.test.ts +6 -15
- package/os/rfc/acceptance.ts +12 -6
- package/os/rfc/decision-log.ts +4 -3
- package/os/rfc/dna-trace.ts +8 -2
- package/os/rfc/frontmatter-io.ts +5 -5
- package/os/rfc/handlers/archive.ts +9 -5
- package/os/rfc/handlers/check.ts +5 -3
- package/os/rfc/handlers/implement-stamp.ts +15 -10
- package/os/rfc/handlers/index-graph.ts +3 -3
- package/os/rfc/handlers/lifecycle.ts +7 -2
- package/os/rfc/handlers/list-create.ts +7 -6
- package/os/rfc/handlers/shared.ts +3 -3
- package/os/rfc/handlers/supersede-propose.ts +8 -3
- package/os/rfc/handlers/validate-rules-rfc1006.test.ts +18 -6
- package/os/rfc/handlers/validate-rules.ts +10 -5
- package/os/rfc/rfc-create-concurrent.test.ts +11 -3
- package/os/rfc/rfc.module.ts +413 -374
- package/os/rfc/verification-evidence.ts +11 -5
- package/os/rfc/verification-refresh.ts +4 -3
- package/os/session/frontmatter-io.ts +14 -14
- package/os/session/handlers/archive.ts +8 -4
- package/os/session/handlers/metrics-aggregate.ts +34 -13
- package/os/session/handlers/metrics-rfc.ts +13 -8
- package/os/session/handlers/metrics-session.ts +7 -3
- package/os/session/handlers/save.ts +12 -8
- package/os/session/session.module.ts +6 -0
- package/os/spec/live-spec-list.ts +4 -4
- package/os/spec/live-spec-merge.ts +5 -5
- package/os/spec/live-spec-show.ts +3 -3
- package/os/spec/live-spec-validate.ts +4 -4
- package/os/spec/spec-materialize.ts +9 -9
- package/os/spec/spec-status.ts +9 -9
- package/os/spec/spec-validate.ts +7 -7
- package/os/spec/spec.module.ts +8 -0
- package/os/werkstatt/handlers/lock.ts +16 -16
- package/os/werkstatt/handlers/werkstatt-lock-recover.ts +3 -3
- package/os/werkstatt/handlers/werkstatt-operation-validate.ts +4 -2
- package/os/werkstatt/werkstatt.module.ts +8 -5
- package/os/workflow/handlers.ts +7 -5
- package/os/workflow/workflow.module.ts +45 -44
- package/package.json +1 -1
- package/profiles/forge-shell.yaml +3 -0
- package/profiles/godot-game.yaml +3 -0
- package/profiles/phaser-game.yaml +3 -0
- package/profiles/site-workshop.yaml +567 -564
- package/skills/fo/fo-add-tests/SKILL.md +2 -2
- package/skills/fo/fo-architecture/SKILL.md +2 -2
- package/skills/fo/fo-compass-annotate/SKILL.md +2 -2
- package/skills/fo/fo-design-summit/SKILL.md +2 -2
- package/skills/fo/fo-doc-audit/SKILL.md +2 -2
- package/skills/fo/fo-explore/SKILL.md +2 -2
- package/skills/fo/fo-extract-dna/SKILL.md +2 -2
- package/skills/fo/fo-fix/SKILL.md +2 -2
- package/skills/fo/fo-handoff/SKILL.md +2 -2
- package/skills/fo/fo-harvest/SKILL.md +2 -2
- package/skills/fo/fo-idea/SKILL.md +2 -2
- package/skills/fo/fo-idea-audit/SKILL.md +2 -2
- package/skills/fo/fo-idea-create-adr/SKILL.md +3 -3
- package/skills/fo/fo-idea-create-rfc/SKILL.md +3 -3
- package/skills/fo/fo-idea-enhance/SKILL.md +2 -2
- package/skills/fo/fo-idea-i-just-want-to-see-the-plan/SKILL.md +2 -2
- package/skills/fo/fo-idea-i-just-want-to-see-the-result/SKILL.md +1 -1
- package/skills/fo/fo-idea-implement/SKILL.md +2 -2
- package/skills/fo/fo-idea-plan/SKILL.md +2 -2
- package/skills/fo/fo-idea-status/SKILL.md +2 -2
- package/skills/fo/fo-knowledge-distill/SKILL.md +2 -2
- package/skills/fo/fo-memory-sync/SKILL.md +2 -2
- package/skills/fo/fo-qa/SKILL.md +2 -2
- package/skills/fo/fo-review/SKILL.md +2 -2
- package/skills/fo/fo-session-retro/SKILL.md +2 -2
- package/skills/fo/fo-session-save/SKILL.md +2 -2
- package/skills/fo/fo-spec-ingest/SKILL.md +2 -2
- package/skills/fo/fo-step-commit/SKILL.md +1 -1
- package/skills/fo/fo-triage/SKILL.md +2 -2
- package/skills/meta/forge-bootstrap/SKILL.md +1 -1
- package/skills/meta/port-to-forge/SKILL.md +1 -1
- package/skills/meta/skill-create/SKILL.md +1 -1
- package/skills/shared/grilling/SKILL.md +1 -1
- package/skills/shared/grilling/learned-principles.archive.md +17 -0
- package/skills/shared/grilling/learned-principles.md +0 -1
- package/skills/shared/knowledge/learned-principles.md +6 -0
- package/skills/shared/my-preferences/SKILL.md +1 -1
- package/skills/shared/windows-ai-tooling/SKILL.md +1 -1
- package/skills/shared/writing-great-skills/SKILL.md +1 -1
- package/src/compass/contract-registry.ts +1 -1
- package/src/config/forge-config.ts +12 -1
- package/src/knowledge/__tests__/sync.test.ts +2 -7
- package/src/knowledge/budgets.ts +1 -1
- package/src/knowledge/compact.ts +1 -1
- package/src/knowledge/parse.ts +1 -1
- package/src/knowledge/sync.ts +3 -5
- package/src/migration-adapters/git-utils.ts +2 -2
- package/src/migration-adapters/ignored-files.ts +2 -2
- package/src/migration-adapters/node-typescript-pnpm/index.ts +1 -1
- package/src/migration-adapters/phaser-pnpm/index.ts +1 -1
- package/src/onboarding/agents-generate.ts +91 -50
- package/src/onboarding/create.ts +10 -10
- package/src/onboarding/doctor.ts +199 -59
- package/src/onboarding/init.ts +38 -1
- package/src/onboarding/invariant-engine.ts +1 -1
- package/src/onboarding/memory-compact.ts +189 -0
- package/src/onboarding/memory-scaffold.ts +2 -2
- package/src/onboarding/nested-agents-generate.ts +50 -5
- package/src/onboarding/nested-agents-templates.ts +19 -13
- package/src/onboarding/npm-token-check.ts +2 -2
- package/src/onboarding/prettierignore.ts +263 -0
- package/src/onboarding/profile-validate.ts +5 -4
- package/src/onboarding/scaffold-project.ts +38 -27
- package/src/onboarding/scaffold.ts +1 -1
- package/src/onboarding/skill-markers.ts +162 -0
- package/src/onboarding/templates/behavioral-layer-core.md +2 -4
- package/src/onboarding/upgrade.ts +285 -89
- package/src/onboarding/workspace-discovery.ts +16 -2
- package/src/pipeline-status.test.ts +1 -4
- package/src/pipeline-status.ts +30 -13
- package/src/profiles/stack-profile.ts +1 -1
- package/src/registry.ts +4 -4
- package/src/skill-schema.ts +4 -1
- package/src/tests/acceptance-probe-kinds.test.ts +5 -15
- package/src/tests/agents-generate.test.ts +32 -7
- package/src/tests/contract-registry.test.ts +12 -6
- package/src/tests/doctor-dist-freshness.test.ts +110 -0
- package/src/tests/doctor-fix.test.ts +142 -0
- package/src/tests/doctor-nested-agents.test.ts +160 -0
- package/src/tests/editable-generated-region.test.ts +231 -0
- package/src/tests/file-size-lint.test.ts +8 -12
- package/src/tests/fixtures/agents-generate-business-before.txt +54 -54
- package/src/tests/markdown-table.test.ts +107 -0
- package/src/tests/memory-compact.test.ts +143 -0
- package/src/tests/prettierignore-manage.test.ts +134 -0
- package/src/tests/skill-agents-sync.test.ts +168 -0
- package/src/tests/skill-sync-marker.test.ts +134 -0
- package/src/tests/skill-validate.test.ts +12 -5
- package/src/tests/upgrade.test.ts +87 -41
- package/src/tests/workspace-discovery.test.ts +28 -0
- package/src/types.ts +123 -0
- package/src/utils/editable-region.ts +156 -0
- package/src/utils/fs-idempotent.ts +12 -6
- package/src/utils/generated-marker.ts +36 -2
- package/src/utils/index.ts +17 -0
- package/src/utils/io.ts +143 -0
- package/src/utils/markdown-table.ts +121 -0
- package/src/utils/sync-fs.ts +43 -0
- package/src/validators/note-frontmatter-validate.ts +1 -1
- package/src/validators/note-link-validate.ts +1 -1
- package/src/validators/note-orphan-detect.ts +1 -1
- package/src/validators/port-validate.ts +1 -1
- package/src/validators/skill-validate.ts +38 -13
|
@@ -8,210 +8,215 @@ kernel registry (RFC-0856).</purpose>
|
|
|
8
8
|
</MODULE_CONTRACT>
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
10
|
<item>RFC-0856: initial program module registration.</item>
|
|
11
|
+
<item>RFC-1173: declare mutatesState on all kernel commands — collectDeclarationDiagnostics emits error-severity MUTATES-STATE-DECLARED, command.manifest.validate is the blocking consumer in packages.check, sweep declares the flag on every command definition (factories hardcode false for read-only check specs)</item>
|
|
11
12
|
</CHANGE_SUMMARY>
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
import type { ForgeModule } from "../../src/forge-module.ts";
|
|
15
16
|
|
|
16
17
|
export async function createForgeProgramModule(): Promise<ForgeModule> {
|
|
17
|
-
const { runValidate } = await import("./handlers/validate.ts");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const { runValidate } = await import("./handlers/validate.ts");
|
|
19
|
+
const { runSeal } = await import("./handlers/seal.ts");
|
|
20
|
+
const { runLease } = await import("./handlers/lease.ts");
|
|
21
|
+
const { runComplete } = await import("./handlers/complete.ts");
|
|
21
22
|
return {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
name: "forge-program",
|
|
24
|
+
version: "0.1.0",
|
|
25
|
+
runtime: "autonomous",
|
|
25
26
|
|
|
26
27
|
declarations: [],
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
28
|
+
commands: [
|
|
29
|
+
{
|
|
30
|
+
name: "program.packet.validate",
|
|
31
|
+
mutatesState: false,
|
|
32
|
+
execOnReadOnly: true,
|
|
33
|
+
contract: "program",
|
|
34
|
+
rules: [],
|
|
35
|
+
description:
|
|
36
|
+
"Validate a program packet against schema, source hashes, branch/head, " +
|
|
37
|
+
"and state machine rules. Read-only. " +
|
|
38
|
+
"Usage: program.packet.validate --program=RFC-XXXX --packet=NNN-foo --phase=draft --json",
|
|
39
|
+
scope: "workspace",
|
|
40
|
+
supportsAllSites: false,
|
|
41
|
+
flags: {
|
|
42
|
+
program: {
|
|
43
|
+
kind: "string",
|
|
44
|
+
required: true,
|
|
45
|
+
description: "Program RFC id (e.g. RFC-0855).",
|
|
46
|
+
},
|
|
47
|
+
packet: {
|
|
48
|
+
kind: "string",
|
|
49
|
+
required: true,
|
|
50
|
+
description: "Packet id (e.g. 010-node-24).",
|
|
51
|
+
},
|
|
52
|
+
phase: {
|
|
53
|
+
kind: "string",
|
|
54
|
+
description: "Validation phase: draft, sealed, active, or completion.",
|
|
55
|
+
},
|
|
56
|
+
json: {
|
|
57
|
+
kind: "boolean",
|
|
58
|
+
description: "Machine-readable JSON output.",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
reads: ["docs/plans/**/program.yaml", "docs/plans/**/*.md"],
|
|
62
|
+
cacheable: false,
|
|
63
|
+
execute: runValidate,
|
|
57
64
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
65
|
+
{
|
|
66
|
+
name: "program.packet.seal",
|
|
67
|
+
description:
|
|
68
|
+
"Steward finalizes a packet against the predecessor's completion commit, " +
|
|
69
|
+
"updates packet state from draft to sealed, and records the seal in the " +
|
|
70
|
+
"program manifest. Does not commit — use ecosystem.commit after. " +
|
|
71
|
+
"Usage: program.packet.seal --program=RFC-XXXX --packet=NNN-foo " +
|
|
72
|
+
"--steward=human:id --idempotency-key=<key> --json",
|
|
73
|
+
scope: "workspace",
|
|
74
|
+
supportsAllSites: false,
|
|
75
|
+
mutatesState: true,
|
|
76
|
+
flags: {
|
|
77
|
+
program: {
|
|
78
|
+
kind: "string",
|
|
79
|
+
required: true,
|
|
80
|
+
description: "Program RFC id.",
|
|
81
|
+
},
|
|
82
|
+
packet: {
|
|
83
|
+
kind: "string",
|
|
84
|
+
required: true,
|
|
85
|
+
description: "Packet id to seal.",
|
|
86
|
+
},
|
|
87
|
+
steward: {
|
|
88
|
+
kind: "string",
|
|
89
|
+
required: true,
|
|
90
|
+
description: "Steward actor id (human:<id> or agent:<id>).",
|
|
91
|
+
},
|
|
92
|
+
"idempotency-key": {
|
|
93
|
+
kind: "string",
|
|
94
|
+
description: "Idempotency key for retry-safe sealing.",
|
|
95
|
+
},
|
|
96
|
+
json: {
|
|
97
|
+
kind: "boolean",
|
|
98
|
+
description: "Machine-readable JSON output.",
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
writes: ["docs/plans/**/program.yaml", "docs/plans/**/*.md"],
|
|
102
|
+
generates: [],
|
|
103
|
+
reads: ["docs/plans/**/program.yaml", "docs/plans/**/*.md"],
|
|
104
|
+
cacheable: false,
|
|
105
|
+
execute: runSeal,
|
|
97
106
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
107
|
+
{
|
|
108
|
+
name: "program.packet.lease",
|
|
109
|
+
mutatesState: true,
|
|
110
|
+
description:
|
|
111
|
+
"Manage the exclusive local executor lease for a sealed packet. " +
|
|
112
|
+
"Actions: start, heartbeat, release, recover. " +
|
|
113
|
+
"Raw lease tokens are never persisted — only the SHA-256 hash. " +
|
|
114
|
+
"Usage: program.packet.lease --program=RFC-XXXX --packet=NNN-foo " +
|
|
115
|
+
"--action=start --executor=agent:id --json",
|
|
116
|
+
scope: "workspace",
|
|
117
|
+
supportsAllSites: false,
|
|
118
|
+
flags: {
|
|
119
|
+
program: {
|
|
120
|
+
kind: "string",
|
|
121
|
+
required: true,
|
|
122
|
+
description: "Program RFC id.",
|
|
123
|
+
},
|
|
124
|
+
packet: {
|
|
125
|
+
kind: "string",
|
|
126
|
+
required: true,
|
|
127
|
+
description: "Packet id.",
|
|
128
|
+
},
|
|
129
|
+
action: {
|
|
130
|
+
kind: "string",
|
|
131
|
+
required: true,
|
|
132
|
+
description: "Lease action: start, heartbeat, release, or recover.",
|
|
133
|
+
},
|
|
134
|
+
executor: {
|
|
135
|
+
kind: "string",
|
|
136
|
+
description: "Executor actor id (required for --action=start).",
|
|
137
|
+
},
|
|
138
|
+
steward: {
|
|
139
|
+
kind: "string",
|
|
140
|
+
description: "Steward actor id (required for --action=recover).",
|
|
141
|
+
},
|
|
142
|
+
"lease-token": {
|
|
143
|
+
kind: "string",
|
|
144
|
+
description: "Opaque lease token (required for heartbeat and release).",
|
|
145
|
+
},
|
|
146
|
+
reason: {
|
|
147
|
+
kind: "string",
|
|
148
|
+
description: "Recovery reason (required for --action=recover).",
|
|
149
|
+
},
|
|
150
|
+
json: {
|
|
151
|
+
kind: "boolean",
|
|
152
|
+
description: "Machine-readable JSON output.",
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
writes: [".forge/program-leases/**"],
|
|
156
|
+
generates: [],
|
|
157
|
+
reads: ["docs/plans/**/program.yaml", "docs/plans/**/*.md"],
|
|
158
|
+
cacheable: false,
|
|
159
|
+
execute: runLease,
|
|
149
160
|
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
161
|
+
{
|
|
162
|
+
name: "program.packet.complete",
|
|
163
|
+
description:
|
|
164
|
+
"Steward validates the implementation range, writes the completion report, " +
|
|
165
|
+
"and updates the program manifest. Supports --bootstrap for packet 000. " +
|
|
166
|
+
"Does not commit — use ecosystem.commit after. " +
|
|
167
|
+
"Usage: program.packet.complete --program=RFC-XXXX --packet=NNN-foo " +
|
|
168
|
+
"--steward=human:id --lease-token=<token> --implementation-head=<sha> --json",
|
|
169
|
+
scope: "workspace",
|
|
170
|
+
supportsAllSites: false,
|
|
171
|
+
mutatesState: true,
|
|
172
|
+
flags: {
|
|
173
|
+
program: {
|
|
174
|
+
kind: "string",
|
|
175
|
+
required: true,
|
|
176
|
+
description: "Program RFC id.",
|
|
177
|
+
},
|
|
178
|
+
packet: {
|
|
179
|
+
kind: "string",
|
|
180
|
+
required: true,
|
|
181
|
+
description: "Packet id to complete.",
|
|
182
|
+
},
|
|
183
|
+
steward: {
|
|
184
|
+
kind: "string",
|
|
185
|
+
required: true,
|
|
186
|
+
description: "Steward actor id (must differ from executor).",
|
|
187
|
+
},
|
|
188
|
+
"lease-token": {
|
|
189
|
+
kind: "string",
|
|
190
|
+
description: "Lease token (required for non-bootstrap).",
|
|
191
|
+
},
|
|
192
|
+
"implementation-head": {
|
|
193
|
+
kind: "string",
|
|
194
|
+
description: "SHA of the implementation head commit (required for non-bootstrap).",
|
|
195
|
+
},
|
|
196
|
+
"idempotency-key": {
|
|
197
|
+
kind: "string",
|
|
198
|
+
description: "Idempotency key for retry-safe completion.",
|
|
199
|
+
},
|
|
200
|
+
bootstrap: {
|
|
201
|
+
kind: "boolean",
|
|
202
|
+
description: "Bootstrap completion (packet 000 only).",
|
|
203
|
+
},
|
|
204
|
+
"seal-commit": {
|
|
205
|
+
kind: "string",
|
|
206
|
+
description: "Seal commit SHA (required for --bootstrap).",
|
|
207
|
+
},
|
|
208
|
+
json: {
|
|
209
|
+
kind: "boolean",
|
|
210
|
+
description: "Machine-readable JSON output.",
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
writes: ["docs/plans/**/completions/**", "docs/plans/**/program.yaml"],
|
|
214
|
+
generates: [],
|
|
215
|
+
reads: ["docs/plans/**/program.yaml", "docs/plans/**/*.md"],
|
|
216
|
+
cacheable: false,
|
|
217
|
+
execute: runComplete,
|
|
206
218
|
},
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
execute: runComplete,
|
|
211
|
-
}
|
|
212
|
-
],
|
|
213
|
-
pipelines: [
|
|
214
|
-
|
|
215
|
-
]};
|
|
219
|
+
],
|
|
220
|
+
pipelines: [],
|
|
221
|
+
};
|
|
216
222
|
}
|
|
217
|
-
;
|
package/os/queue/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
|
-
<purpose>Barrel export for the forge queue module (RFC-1140).</purpose>
|
|
3
|
+
<purpose>Barrel export for the forge queue module — re-exports queue.validate and its helpers (RFC-1140).</purpose>
|
|
4
4
|
<non-goals>
|
|
5
5
|
<item>Do not add logic here — re-exports only.</item>
|
|
6
6
|
</non-goals>
|
package/os/queue/manifest.ts
CHANGED
|
@@ -16,7 +16,7 @@ Extract pipeline-status derivation into packages/forge/src/pipeline-status.ts, r
|
|
|
16
16
|
</CHANGE_SUMMARY>
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import fs from "
|
|
19
|
+
import { ambientIo as fs } from "../../src/utils/io.ts";
|
|
20
20
|
import path from "node:path";
|
|
21
21
|
import YAML from "yaml";
|
|
22
22
|
|
|
@@ -51,16 +51,12 @@ export async function loadQueueManifest(
|
|
|
51
51
|
): Promise<LoadedQueueManifest> {
|
|
52
52
|
const errors: Diagnostic[] = [];
|
|
53
53
|
const warnings: Diagnostic[] = [];
|
|
54
|
-
const absolutePath = path.isAbsolute(filePath)
|
|
55
|
-
|
|
56
|
-
: path.join(workspaceRoot, filePath);
|
|
57
|
-
const displayPath = path.isAbsolute(filePath)
|
|
58
|
-
? path.relative(workspaceRoot, filePath)
|
|
59
|
-
: filePath;
|
|
54
|
+
const absolutePath = path.isAbsolute(filePath) ? filePath : path.join(workspaceRoot, filePath);
|
|
55
|
+
const displayPath = path.isAbsolute(filePath) ? path.relative(workspaceRoot, filePath) : filePath;
|
|
60
56
|
|
|
61
57
|
let source: string;
|
|
62
58
|
try {
|
|
63
|
-
source = await fs.readFile(absolutePath
|
|
59
|
+
source = await fs.readFile(absolutePath);
|
|
64
60
|
} catch (e) {
|
|
65
61
|
errors.push(
|
|
66
62
|
diag(
|
|
@@ -125,7 +121,12 @@ export async function loadQueueManifest(
|
|
|
125
121
|
const id = item.id.trim();
|
|
126
122
|
if (!QUEUE_ITEM_ID_PATTERN.test(id)) {
|
|
127
123
|
errors.push(
|
|
128
|
-
diag(
|
|
124
|
+
diag(
|
|
125
|
+
"QUEUE-03",
|
|
126
|
+
"error",
|
|
127
|
+
`Item id "${item.id}" does not match ^(RFC|ADR)-\\d{4}$`,
|
|
128
|
+
displayPath,
|
|
129
|
+
),
|
|
129
130
|
);
|
|
130
131
|
continue;
|
|
131
132
|
}
|
|
@@ -119,9 +119,9 @@ describe("loadQueueManifest — validation rules (RFC-1140)", () => {
|
|
|
119
119
|
|
|
120
120
|
describe("runQueueValidate — command contract (RFC-1140)", () => {
|
|
121
121
|
test("throws without --file", async () => {
|
|
122
|
-
await expect(
|
|
123
|
-
|
|
124
|
-
)
|
|
122
|
+
await expect(runQueueValidate({ argv: [], flags: {} }, testContext())).rejects.toThrow(
|
|
123
|
+
"--file",
|
|
124
|
+
);
|
|
125
125
|
});
|
|
126
126
|
|
|
127
127
|
test("valid manifest → pass, items + next in JSON output", async () => {
|
|
@@ -132,10 +132,7 @@ describe("runQueueValidate — command contract (RFC-1140)", () => {
|
|
|
132
132
|
"id: block-h\ncreatedAt: 2026-09-23\nitems:\n - id: RFC-1400\n - id: RFC-1401\n",
|
|
133
133
|
);
|
|
134
134
|
|
|
135
|
-
const result = await runQueueValidate(
|
|
136
|
-
{ argv: [], flags: { file } },
|
|
137
|
-
testContext(),
|
|
138
|
-
);
|
|
135
|
+
const result = await runQueueValidate({ argv: [], flags: { file } }, testContext());
|
|
139
136
|
|
|
140
137
|
expect(result?.data?.status).toBe("pass");
|
|
141
138
|
expect(result?.data?.queue).toBe("block-h");
|
|
@@ -152,10 +149,7 @@ describe("runQueueValidate — command contract (RFC-1140)", () => {
|
|
|
152
149
|
"id: block-i\ncreatedAt: 2026-09-23\nitems:\n - id: RFC-9999\n",
|
|
153
150
|
);
|
|
154
151
|
|
|
155
|
-
const result = await runQueueValidate(
|
|
156
|
-
{ argv: [], flags: { file } },
|
|
157
|
-
testContext(),
|
|
158
|
-
);
|
|
152
|
+
const result = await runQueueValidate({ argv: [], flags: { file } }, testContext());
|
|
159
153
|
|
|
160
154
|
expect(result?.data?.status).toBe("fail");
|
|
161
155
|
expect(result?.exitCode).toBe(1);
|
|
@@ -165,10 +159,7 @@ describe("runQueueValidate — command contract (RFC-1140)", () => {
|
|
|
165
159
|
test("empty items → pass with next null", async () => {
|
|
166
160
|
const file = await writeManifest("block-j", "id: block-j\ncreatedAt: 2026-09-23\nitems: []\n");
|
|
167
161
|
|
|
168
|
-
const result = await runQueueValidate(
|
|
169
|
-
{ argv: [], flags: { file } },
|
|
170
|
-
testContext(),
|
|
171
|
-
);
|
|
162
|
+
const result = await runQueueValidate({ argv: [], flags: { file } }, testContext());
|
|
172
163
|
|
|
173
164
|
expect(result?.data?.status).toBe("pass");
|
|
174
165
|
expect(result?.data?.items).toEqual([]);
|
package/os/rfc/acceptance.ts
CHANGED
|
@@ -18,8 +18,9 @@ prose checklist.
|
|
|
18
18
|
</CHANGE_SUMMARY>
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import { spawn } from "
|
|
22
|
-
import {
|
|
21
|
+
import { spawn } from "../../src/utils/sync-fs.ts";
|
|
22
|
+
import { ambientIo, resolveIo } from "../../src/utils/io.ts";
|
|
23
|
+
|
|
23
24
|
import path from "node:path";
|
|
24
25
|
import { parse as yamlParse } from "yaml";
|
|
25
26
|
import { Ajv } from "ajv";
|
|
@@ -40,12 +41,16 @@ import { RFC_DIR, RFC_PROBE_BINDING_CUTOFF } from "./types.ts";
|
|
|
40
41
|
import { listRfcFiles, readAndParseRfc } from "./frontmatter-io.ts";
|
|
41
42
|
import { evaluateAcceptanceCriteria, computeProbeCoverage } from "./handlers/validate-rules.ts";
|
|
42
43
|
|
|
44
|
+
// Ambient default for helper fns without a context param — handlers override
|
|
45
|
+
// with `const io = resolveIo(context.io)` inside their own scope.
|
|
46
|
+
const io = ambientIo;
|
|
47
|
+
|
|
43
48
|
const RUN_PROBE_ALLOWED_PREFIX = "werkstatt ";
|
|
44
49
|
|
|
45
50
|
async function loadManifestCommandNames(workspaceRoot: string): Promise<Set<string>> {
|
|
46
51
|
const manifestPath = path.join(workspaceRoot, "docs", "command-manifest.generated.yaml");
|
|
47
52
|
try {
|
|
48
|
-
const raw = await readFile(manifestPath
|
|
53
|
+
const raw = await io.readFile(manifestPath);
|
|
49
54
|
const manifest = yamlParse(raw) as { commands?: Array<{ name: string }> };
|
|
50
55
|
return new Set((manifest.commands ?? []).map((c) => c.name));
|
|
51
56
|
} catch {
|
|
@@ -290,7 +295,7 @@ export async function runProbe(
|
|
|
290
295
|
}
|
|
291
296
|
case "file-exists": {
|
|
292
297
|
try {
|
|
293
|
-
await stat(path.join(workspaceRoot, probe.path));
|
|
298
|
+
await io.stat(path.join(workspaceRoot, probe.path));
|
|
294
299
|
return { probe, ok: true, detail: "exists" };
|
|
295
300
|
} catch {
|
|
296
301
|
return { probe, ok: false, detail: "does not exist" };
|
|
@@ -298,7 +303,7 @@ export async function runProbe(
|
|
|
298
303
|
}
|
|
299
304
|
case "file-contains": {
|
|
300
305
|
try {
|
|
301
|
-
const content = await readFile(path.join(workspaceRoot, probe.path)
|
|
306
|
+
const content = await io.readFile(path.join(workspaceRoot, probe.path));
|
|
302
307
|
const re = new RegExp(probe.pattern, "m");
|
|
303
308
|
const ok = re.test(content);
|
|
304
309
|
return { probe, ok, detail: ok ? "pattern found" : "pattern not found" };
|
|
@@ -336,7 +341,7 @@ export async function runProbe(
|
|
|
336
341
|
const artifactPath = path.join(workspaceRoot, probe.artifact);
|
|
337
342
|
let raw: string;
|
|
338
343
|
try {
|
|
339
|
-
raw = await readFile(artifactPath
|
|
344
|
+
raw = await io.readFile(artifactPath);
|
|
340
345
|
} catch {
|
|
341
346
|
return { probe, ok: false, detail: "artifact file not found" };
|
|
342
347
|
}
|
|
@@ -373,6 +378,7 @@ export async function runRfcAcceptanceRun(
|
|
|
373
378
|
input: ForgeCommandInput,
|
|
374
379
|
context: ForgeRuntimeContext,
|
|
375
380
|
): Promise<ForgeCommandResult<RfcAcceptanceRunResult>> {
|
|
381
|
+
const _io = resolveIo(context.io);
|
|
376
382
|
const { workspaceRoot } = context;
|
|
377
383
|
const rfcDirPath = path.join(workspaceRoot, RFC_DIR);
|
|
378
384
|
const targetId = input.flags["id"] as string | undefined;
|
package/os/rfc/decision-log.ts
CHANGED
|
@@ -15,8 +15,8 @@ keywords for rfc.create consultation, and generate/validate projections.
|
|
|
15
15
|
</CHANGE_SUMMARY>
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { readFile } from "node:fs/promises";
|
|
19
18
|
import { join } from "node:path";
|
|
19
|
+
import { resolveIo } from "../../src/utils/io.ts";
|
|
20
20
|
|
|
21
21
|
import { writeFileAtomic } from "../../src/utils/fs-atomic.ts";
|
|
22
22
|
import { buildGeneratedHeader } from "../../src/utils/generated-marker.ts";
|
|
@@ -209,6 +209,7 @@ export async function runRfcDecisionLogGenerate(
|
|
|
209
209
|
input: ForgeCommandInput,
|
|
210
210
|
context: ForgeRuntimeContext,
|
|
211
211
|
): Promise<ForgeCommandResult<DecisionLogResult>> {
|
|
212
|
+
const io = resolveIo(context.io);
|
|
212
213
|
const { workspaceRoot, logger, outputFormat } = context;
|
|
213
214
|
const checkMode = Boolean(input.flags["check"]);
|
|
214
215
|
const rfcDirPath = join(workspaceRoot, RFC_DIR);
|
|
@@ -223,7 +224,7 @@ export async function runRfcDecisionLogGenerate(
|
|
|
223
224
|
let drift = false;
|
|
224
225
|
|
|
225
226
|
try {
|
|
226
|
-
const existingJson = await readFile(join(workspaceRoot, jsonRelPath)
|
|
227
|
+
const existingJson = await io.readFile(join(workspaceRoot, jsonRelPath));
|
|
227
228
|
const expectedJson = `${buildGeneratedHeader({ filePath: jsonRelPath, ownerCommand: "rfc.decision-log.generate" })}${yamlStringify({ command: "rfc.decision-log.generate", status: "ok", count: entries.length, entries })}\n`;
|
|
228
229
|
if (existingJson !== expectedJson) {
|
|
229
230
|
drift = true;
|
|
@@ -245,7 +246,7 @@ export async function runRfcDecisionLogGenerate(
|
|
|
245
246
|
}
|
|
246
247
|
|
|
247
248
|
try {
|
|
248
|
-
const existingMd = await readFile(join(workspaceRoot, mdRelPath)
|
|
249
|
+
const existingMd = await io.readFile(join(workspaceRoot, mdRelPath));
|
|
249
250
|
const expectedMd = renderMarkdown(entries);
|
|
250
251
|
if (existingMd !== expectedMd) {
|
|
251
252
|
drift = true;
|