@warpgogol/forge 5.2.4 → 5.3.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/README.md +1 -1
- package/README.uk.md +8 -8
- package/bin/cli.ts +25 -33
- package/dist/bin/cli.js +21 -32
- 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 -10
- 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 +43 -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 +44 -23
- 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/handlers/validate.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate.js +6 -1
- package/dist/os/rfc/handlers/validate.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/handlers/workspace-deps.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/workspace-deps.js +0 -1
- package/dist/os/werkstatt/handlers/workspace-deps.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/cli-flags.d.ts +28 -0
- package/dist/src/cli-flags.d.ts.map +1 -0
- package/dist/src/cli-flags.js +232 -0
- package/dist/src/cli-flags.js.map +1 -0
- 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 +1 -1
- package/dist/src/config/forge-config.js +1 -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.map +1 -1
- package/dist/src/onboarding/agents-generate.js +76 -34
- 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.map +1 -1
- package/dist/src/onboarding/doctor.js +68 -59
- 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.map +1 -1
- package/dist/src/onboarding/memory-compact.js +5 -4
- package/dist/src/onboarding/memory-compact.js.map +1 -1
- package/dist/src/onboarding/memory-scaffold.js +1 -1
- 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 +34 -5
- 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.js +1 -1
- 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/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 -10
- 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 +43 -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.test.ts +38 -1
- package/os/mission/handlers/archive.ts +54 -23
- 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/handlers/validate.test.ts +71 -0
- package/os/rfc/handlers/validate.ts +6 -1
- 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/handlers/workspace-deps.ts +0 -1
- 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 +1 -1
- package/profiles/godot-game.yaml +1 -1
- package/profiles/knowledge.yaml +1 -1
- package/profiles/phaser-game.yaml +1 -1
- package/profiles/site-workshop.yaml +1 -1
- package/profiles/typescript.yaml +1 -1
- 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/cli-flags.ts +285 -0
- package/src/compass/contract-registry.ts +1 -1
- package/src/config/forge-config.ts +1 -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 +92 -36
- package/src/onboarding/create.ts +10 -10
- package/src/onboarding/doctor.ts +70 -55
- package/src/onboarding/init.ts +38 -1
- package/src/onboarding/invariant-engine.ts +1 -1
- package/src/onboarding/memory-compact.ts +5 -4
- package/src/onboarding/memory-scaffold.ts +1 -1
- package/src/onboarding/nested-agents-generate.ts +45 -4
- 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 +1 -1
- 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 +28 -5
- package/src/tests/cli-flags.test.ts +169 -0
- package/src/tests/contract-registry.test.ts +12 -6
- package/src/tests/doctor-fix.test.ts +1 -4
- package/src/tests/doctor-nested-agents.test.ts +53 -1
- 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 +85 -56
- package/src/tests/markdown-table.test.ts +107 -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/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
- package/AGENTS.md +0 -502
package/os/core/core.module.ts
CHANGED
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-1088: register forge.file-size.lint command for portable SIZE-01 line-count validation.</item>
|
|
10
|
-
<item>RFC-1088 fix: add writes field to forge.file-size.lint registration per fo-review.</item>
|
|
11
9
|
<item>RFC-1089: rename forge.file-size.lint to file.size.lint (domain validator, no forge. prefix).</item>
|
|
12
10
|
<item>RFC-1097: step 6 — compass.migrate codemod run
|
|
13
11
|
|
|
@@ -15,7 +13,9 @@ Mechanical v1 to v2 header migration across the workspace: 942 files rewritten
|
|
|
15
13
|
<item>RFC-1097: sweep — packages/forge + services clean
|
|
16
14
|
|
|
17
15
|
Sweep batch 2: real KEY_DECISIONS on 10 files, expanded purposes (CONTRACT-02/PURPOSE-02), headers on mission/index + gen-upstreams, sanitizeItemText in summary.record (literal Compass tags corrupted history), excludedPaths for wrangler types, test-fixtures testPattern. forge+services now 0 diagnostics under --mode error.</item>
|
|
18
|
-
<
|
|
16
|
+
<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>
|
|
17
|
+
<item>RFC-1173: fixup: flip mutatesState to true on 19 commands that declare writes/generates — the codemod's name-suffix rules misclassified leitstand.dev-deploy, leitstand.certify, coverage.report and peers as read-only; declared writes imply mutation</item>
|
|
18
|
+
<history>ADR-0021, RFC-0374, RFC-0521, RFC-0539, RFC-0542, RFC-0543, RFC-0544, RFC-0546, RFC-0640, RFC-0662, RFC-0674, RFC-0678, RFC-0679, RFC-0680, RFC-0711, RFC-0733, RFC-0877, RFC-0940, RFC-1080, RFC-1088</history>
|
|
19
19
|
</CHANGE_SUMMARY>
|
|
20
20
|
*/
|
|
21
21
|
|
|
@@ -27,6 +27,7 @@ import type {
|
|
|
27
27
|
ForgeRuntimeContext,
|
|
28
28
|
} from "../../src/types.ts";
|
|
29
29
|
import path from "node:path";
|
|
30
|
+
import { execSync } from "../../src/utils/sync-fs.ts";
|
|
30
31
|
import {
|
|
31
32
|
FORGE_SKILLS,
|
|
32
33
|
discoverPackSkills,
|
|
@@ -212,6 +213,9 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
212
213
|
commands: [
|
|
213
214
|
{
|
|
214
215
|
name: "forge.doctor",
|
|
216
|
+
mutatesState: true,
|
|
217
|
+
writes: [".agents/memory/**"],
|
|
218
|
+
generates: [],
|
|
215
219
|
description: "Diagnose forge state in an existing project.",
|
|
216
220
|
scope: "workspace",
|
|
217
221
|
supportsAllSites: false,
|
|
@@ -230,6 +234,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
230
234
|
},
|
|
231
235
|
{
|
|
232
236
|
name: "forge.port.scaffold",
|
|
237
|
+
mutatesState: true,
|
|
233
238
|
description: "Generate a skeleton for a new forge skill or command.",
|
|
234
239
|
scope: "workspace",
|
|
235
240
|
supportsAllSites: false,
|
|
@@ -242,6 +247,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
242
247
|
},
|
|
243
248
|
{
|
|
244
249
|
name: "forge.skill.validate",
|
|
250
|
+
mutatesState: false,
|
|
245
251
|
contract: "forge",
|
|
246
252
|
rules: [],
|
|
247
253
|
description:
|
|
@@ -254,6 +260,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
254
260
|
},
|
|
255
261
|
{
|
|
256
262
|
name: "forge.skill.list",
|
|
263
|
+
mutatesState: false,
|
|
257
264
|
description: "List all registered forge skills.",
|
|
258
265
|
scope: "workspace",
|
|
259
266
|
supportsAllSites: false,
|
|
@@ -263,6 +270,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
263
270
|
},
|
|
264
271
|
{
|
|
265
272
|
name: "forge.port.validate",
|
|
273
|
+
mutatesState: false,
|
|
266
274
|
contract: "forge",
|
|
267
275
|
rules: [],
|
|
268
276
|
description:
|
|
@@ -277,16 +285,20 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
277
285
|
},
|
|
278
286
|
{
|
|
279
287
|
name: "forge.agents.generate",
|
|
288
|
+
mutatesState: true,
|
|
280
289
|
description:
|
|
281
290
|
"Regenerate AGENTS.md deterministically from forge.yaml and the skill registry.",
|
|
282
291
|
scope: "workspace",
|
|
283
292
|
supportsAllSites: false,
|
|
284
293
|
flags: {},
|
|
294
|
+
writes: ["AGENTS.md", "**/AGENTS.md"],
|
|
295
|
+
generates: [],
|
|
285
296
|
cacheable: false,
|
|
286
297
|
execute: runAgentsGenerate,
|
|
287
298
|
},
|
|
288
299
|
{
|
|
289
300
|
name: "memory.compact",
|
|
301
|
+
mutatesState: true,
|
|
290
302
|
description:
|
|
291
303
|
"Enforce the MEMORY.md character budget by removing oldest Environment notes bullets (RFC-1151).",
|
|
292
304
|
scope: "workspace",
|
|
@@ -297,6 +309,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
297
309
|
},
|
|
298
310
|
{
|
|
299
311
|
name: "forge.upgrade",
|
|
312
|
+
mutatesState: true,
|
|
300
313
|
description:
|
|
301
314
|
"Additive sync for npm consumers: refresh .agents/skills/ from installed forge, add missing binding defaults, update forge.syncedVersion, run doctor.",
|
|
302
315
|
scope: "workspace",
|
|
@@ -313,12 +326,14 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
313
326
|
},
|
|
314
327
|
},
|
|
315
328
|
writes: [".agents/skills/**", "forge.yaml"],
|
|
329
|
+
generates: [],
|
|
316
330
|
reads: ["forge.yaml", "packages/forge/skills/**", "packages/forge/package.json"],
|
|
317
331
|
cacheable: false,
|
|
318
332
|
execute: runUpgrade,
|
|
319
333
|
},
|
|
320
334
|
{
|
|
321
335
|
name: "forge.scaffold",
|
|
336
|
+
mutatesState: true,
|
|
322
337
|
description:
|
|
323
338
|
"Create a working pnpm + Turborepo monorepo from a stack profile in an empty directory. Required flags: `--profile`, `--name`.",
|
|
324
339
|
scope: "workspace",
|
|
@@ -341,6 +356,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
341
356
|
},
|
|
342
357
|
{
|
|
343
358
|
name: "forge.create",
|
|
359
|
+
mutatesState: true,
|
|
344
360
|
description:
|
|
345
361
|
"Create a forge project in-place: scaffold + init + binding defaults. The target directory must be empty (only .git/ tolerated). Usage: forge create --in-place --profile <profile-id> [--name <name>] [--package-manager pnpm]",
|
|
346
362
|
scope: "workspace",
|
|
@@ -376,6 +392,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
376
392
|
},
|
|
377
393
|
{
|
|
378
394
|
name: "forge.init",
|
|
395
|
+
mutatesState: true,
|
|
379
396
|
description:
|
|
380
397
|
"Deploy forge into a project: create forge.yaml, PREFERENCES.md, copy skills, create docs dirs. Hidden recovery command — normally called by forge.create.",
|
|
381
398
|
scope: "workspace",
|
|
@@ -397,6 +414,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
397
414
|
},
|
|
398
415
|
{
|
|
399
416
|
name: "forge.profile.validate",
|
|
417
|
+
mutatesState: false,
|
|
400
418
|
contract: "forge",
|
|
401
419
|
rules: [],
|
|
402
420
|
description:
|
|
@@ -415,6 +433,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
415
433
|
},
|
|
416
434
|
{
|
|
417
435
|
name: "forge.dev",
|
|
436
|
+
mutatesState: true,
|
|
418
437
|
description:
|
|
419
438
|
"Start the dev/preview server declared in the active stack profile. Use --dry-run to print the resolved command without executing.",
|
|
420
439
|
scope: "workspace",
|
|
@@ -436,6 +455,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
436
455
|
},
|
|
437
456
|
{
|
|
438
457
|
name: "forge.build",
|
|
458
|
+
mutatesState: true,
|
|
439
459
|
description:
|
|
440
460
|
"Execute produce commands for all artifacts declared in the active stack profile. Use --dry-run to print resolved commands.",
|
|
441
461
|
scope: "workspace",
|
|
@@ -456,6 +476,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
456
476
|
},
|
|
457
477
|
{
|
|
458
478
|
name: "forge.validate",
|
|
479
|
+
mutatesState: false,
|
|
459
480
|
contract: "forge",
|
|
460
481
|
rules: [],
|
|
461
482
|
description:
|
|
@@ -482,6 +503,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
482
503
|
},
|
|
483
504
|
{
|
|
484
505
|
name: "forge.determinism.check",
|
|
506
|
+
mutatesState: true,
|
|
485
507
|
contract: "forge",
|
|
486
508
|
rules: [],
|
|
487
509
|
description:
|
|
@@ -504,11 +526,13 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
504
526
|
},
|
|
505
527
|
reads: ["forge.yaml", "packages/forge/profiles/*.yaml", "dist/.determinism-cache.json"],
|
|
506
528
|
writes: ["dist/.determinism-cache.json"],
|
|
529
|
+
generates: [],
|
|
507
530
|
cacheable: false,
|
|
508
531
|
execute: runDeterminismCheck,
|
|
509
532
|
},
|
|
510
533
|
{
|
|
511
534
|
name: "forge.assets.list",
|
|
535
|
+
mutatesState: false,
|
|
512
536
|
description:
|
|
513
537
|
"List all assets declared in the active stack profile, grouped by type. Use --dry-run to skip hashing, --type to filter by asset type.",
|
|
514
538
|
scope: "workspace",
|
|
@@ -533,6 +557,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
533
557
|
},
|
|
534
558
|
{
|
|
535
559
|
name: "forge.assets.check",
|
|
560
|
+
mutatesState: false,
|
|
536
561
|
contract: "forge",
|
|
537
562
|
rules: [],
|
|
538
563
|
description:
|
|
@@ -559,6 +584,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
559
584
|
},
|
|
560
585
|
{
|
|
561
586
|
name: "forge.release.prepare",
|
|
587
|
+
mutatesState: true,
|
|
562
588
|
description:
|
|
563
589
|
"Bundle built artifacts into a release package with a manifest. Use --dry-run to preview without writing.",
|
|
564
590
|
scope: "workspace",
|
|
@@ -575,11 +601,13 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
575
601
|
},
|
|
576
602
|
reads: ["forge.yaml", "packages/forge/profiles/*.yaml", "dist/**"],
|
|
577
603
|
writes: ["release/**"],
|
|
604
|
+
generates: [],
|
|
578
605
|
cacheable: false,
|
|
579
606
|
execute: runReleasePrepare,
|
|
580
607
|
},
|
|
581
608
|
{
|
|
582
609
|
name: "forge.release.publish",
|
|
610
|
+
mutatesState: true,
|
|
583
611
|
description:
|
|
584
612
|
"Publish a prepared release to the declared target (local, R2, S3). Use --dry-run to preview without uploading.",
|
|
585
613
|
scope: "workspace",
|
|
@@ -596,11 +624,13 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
596
624
|
},
|
|
597
625
|
reads: ["forge.yaml", "packages/forge/profiles/*.yaml", "release/**"],
|
|
598
626
|
writes: ["release/published/**"],
|
|
627
|
+
generates: [],
|
|
599
628
|
cacheable: false,
|
|
600
629
|
execute: runReleasePublish,
|
|
601
630
|
},
|
|
602
631
|
{
|
|
603
632
|
name: "forge.skill.knowledge.compact",
|
|
633
|
+
mutatesState: true,
|
|
604
634
|
description:
|
|
605
635
|
"Compact skill knowledge files: archive expired/superseded/aged L0 entries, mark stale L2 principles. " +
|
|
606
636
|
"Usage: forge.skill.knowledge.compact --all-skills [--dry-run] [--json] | --skill <name> [--dry-run] [--json]",
|
|
@@ -636,6 +666,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
636
666
|
},
|
|
637
667
|
},
|
|
638
668
|
writes: ["packages/forge/skills/**/*.md", "packages/forge/skills/**/*.archive.md"],
|
|
669
|
+
generates: [],
|
|
639
670
|
reads: [
|
|
640
671
|
"packages/forge/skills/**/*.md",
|
|
641
672
|
"packages/forge/skills/**/*.archive.md",
|
|
@@ -646,6 +677,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
646
677
|
},
|
|
647
678
|
{
|
|
648
679
|
name: "pinned.validate",
|
|
680
|
+
mutatesState: true,
|
|
649
681
|
contract: "pinned",
|
|
650
682
|
rules: [],
|
|
651
683
|
description:
|
|
@@ -656,6 +688,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
656
688
|
scope: "workspace",
|
|
657
689
|
reads: [".forge/pinned.yaml", ".forge/pinned-audit.log"],
|
|
658
690
|
writes: [".forge/pinned-audit.log"],
|
|
691
|
+
generates: [],
|
|
659
692
|
cacheable: false,
|
|
660
693
|
flags: {
|
|
661
694
|
"allow-pinned-override": {
|
|
@@ -690,6 +723,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
690
723
|
".gitignore",
|
|
691
724
|
".github/workflows/pinned-check.yml",
|
|
692
725
|
],
|
|
726
|
+
generates: [],
|
|
693
727
|
reads: [".forge/pinned.yaml", ".git/hooks/pre-commit", ".gitignore"],
|
|
694
728
|
cacheable: false,
|
|
695
729
|
flags: {
|
|
@@ -702,6 +736,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
702
736
|
},
|
|
703
737
|
{
|
|
704
738
|
name: "forge.package.health",
|
|
739
|
+
mutatesState: false,
|
|
705
740
|
description:
|
|
706
741
|
"Validate all published packages (private: false) for standalone extraction readiness. " +
|
|
707
742
|
"Checks engines.node, embedded .github/workflows/ci.yml, extract.config.yaml, " +
|
|
@@ -725,6 +760,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
725
760
|
},
|
|
726
761
|
{
|
|
727
762
|
name: "forge.autonomy.validate",
|
|
763
|
+
mutatesState: false,
|
|
728
764
|
contract: "forge",
|
|
729
765
|
rules: [],
|
|
730
766
|
description:
|
|
@@ -740,6 +776,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
740
776
|
},
|
|
741
777
|
{
|
|
742
778
|
name: "forge.public-surface.validate",
|
|
779
|
+
mutatesState: false,
|
|
743
780
|
description:
|
|
744
781
|
"Check consistency between README.md, package.json, and docs/ structure. " +
|
|
745
782
|
"Enforces SURFACE-01..05 rules: README length, Node version match, " +
|
|
@@ -755,6 +792,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
755
792
|
},
|
|
756
793
|
{
|
|
757
794
|
name: "file.size.lint",
|
|
795
|
+
mutatesState: true,
|
|
758
796
|
contract: "file",
|
|
759
797
|
rules: ["SIZE-01"],
|
|
760
798
|
description:
|
|
@@ -763,6 +801,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
763
801
|
supportsAllSites: false,
|
|
764
802
|
reads: ["packages/*/src/**/*.ts", "packages/*/src/**/*.tsx"],
|
|
765
803
|
writes: ["file-size-lint.baseline.yaml"],
|
|
804
|
+
generates: [],
|
|
766
805
|
cacheable: false,
|
|
767
806
|
flags: {
|
|
768
807
|
"write-baseline": {
|
|
@@ -801,6 +840,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
801
840
|
"missions/*",
|
|
802
841
|
"missions/archive/**",
|
|
803
842
|
],
|
|
843
|
+
generates: [],
|
|
804
844
|
reads: [
|
|
805
845
|
"docs/rfcs/**/*.md",
|
|
806
846
|
"docs/adrs/**/*.md",
|
|
@@ -942,7 +982,6 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
942
982
|
// so the caller (or the next commit) includes it.
|
|
943
983
|
if (!dryRun && totalMoved > 0) {
|
|
944
984
|
try {
|
|
945
|
-
const { execSync } = await import("node:child_process");
|
|
946
985
|
const lockfileStatus = execSync("git status --porcelain pnpm-lock.yaml", {
|
|
947
986
|
cwd: context.workspaceRoot,
|
|
948
987
|
encoding: "utf-8",
|
|
@@ -11,11 +11,15 @@
|
|
|
11
11
|
</CHANGE_SUMMARY>
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { readFile, stat } from "node:fs/promises";
|
|
15
14
|
import { join, relative, extname } from "node:path";
|
|
15
|
+
import { ambientIo } from "../../../src/utils/io.ts";
|
|
16
16
|
import { loadWorkspaceDeps } from "../../werkstatt/handlers/workspace-deps.ts";
|
|
17
17
|
import type { ProfileAsset, ProfileAssetType } from "../../../src/profiles/profile-schema.ts";
|
|
18
18
|
|
|
19
|
+
// Ambient default for helper fns without a context param — handlers override
|
|
20
|
+
// with `const io = resolveIo(context.io)` inside their own scope.
|
|
21
|
+
const io = ambientIo;
|
|
22
|
+
|
|
19
23
|
export interface AssetEntry {
|
|
20
24
|
path: string;
|
|
21
25
|
type: string;
|
|
@@ -63,7 +67,7 @@ export async function scanAssets(
|
|
|
63
67
|
let hash = "";
|
|
64
68
|
|
|
65
69
|
if (!options.dryRun) {
|
|
66
|
-
const stats = await stat(absPath);
|
|
70
|
+
const stats = await io.stat(absPath);
|
|
67
71
|
size = stats.size;
|
|
68
72
|
hash = await byteHashFile(absPath);
|
|
69
73
|
}
|
|
@@ -103,7 +107,7 @@ export async function extractReferences(
|
|
|
103
107
|
for (const absPath of allFiles) {
|
|
104
108
|
const relPath = relative(workspaceRoot, absPath);
|
|
105
109
|
try {
|
|
106
|
-
const content = await readFile(absPath
|
|
110
|
+
const content = await io.readFile(absPath);
|
|
107
111
|
|
|
108
112
|
for (const assetType of assetsConfig.types) {
|
|
109
113
|
if (!assetType.referencePattern) continue;
|
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
</CHANGE_SUMMARY>
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { exec } from "
|
|
14
|
+
import { exec } from "../../../src/utils/sync-fs.ts";
|
|
15
|
+
import { ambientIo, resolveIo } from "../../../src/utils/io.ts";
|
|
15
16
|
import { promisify } from "node:util";
|
|
16
|
-
|
|
17
|
-
import { existsSync } from "
|
|
17
|
+
|
|
18
|
+
import { existsSync } from "../../../src/utils/sync-fs.ts";
|
|
18
19
|
import { join, relative, dirname } from "node:path";
|
|
19
20
|
import { createHash } from "node:crypto";
|
|
20
21
|
import { loadWorkspaceDeps } from "../../werkstatt/handlers/workspace-deps.ts";
|
|
@@ -25,6 +26,10 @@ import type {
|
|
|
25
26
|
} from "../../../src/types.ts";
|
|
26
27
|
import { resolveActiveProfile, resolveLifecycleFlags } from "./profile-resolve.ts";
|
|
27
28
|
|
|
29
|
+
// Ambient default for helper fns without a context param — handlers override
|
|
30
|
+
// with `const io = resolveIo(context.io)` inside their own scope.
|
|
31
|
+
const io = ambientIo;
|
|
32
|
+
|
|
28
33
|
const execAsync = promisify(exec);
|
|
29
34
|
|
|
30
35
|
export interface DeterminismCheckResult {
|
|
@@ -119,7 +124,7 @@ async function computeInputHash(workspaceRoot: string, inputPatterns: string[]):
|
|
|
119
124
|
|
|
120
125
|
async function readCache(cachePath: string): Promise<CacheFile> {
|
|
121
126
|
try {
|
|
122
|
-
const content = await readFile(cachePath
|
|
127
|
+
const content = await io.readFile(cachePath);
|
|
123
128
|
return JSON.parse(content) as CacheFile;
|
|
124
129
|
} catch {
|
|
125
130
|
return { entries: {} };
|
|
@@ -129,15 +134,16 @@ async function readCache(cachePath: string): Promise<CacheFile> {
|
|
|
129
134
|
async function writeCache(cachePath: string, cache: CacheFile): Promise<void> {
|
|
130
135
|
const dir = dirname(cachePath);
|
|
131
136
|
if (!existsSync(dir)) {
|
|
132
|
-
await mkdir(dir
|
|
137
|
+
await io.mkdir(dir);
|
|
133
138
|
}
|
|
134
|
-
await writeFile(cachePath, JSON.stringify(cache, null, 2) + "\n"
|
|
139
|
+
await io.writeFile(cachePath, JSON.stringify(cache, null, 2) + "\n");
|
|
135
140
|
}
|
|
136
141
|
|
|
137
142
|
export async function runDeterminismCheck(
|
|
138
143
|
input: ForgeCommandInput,
|
|
139
144
|
context: ForgeRuntimeContext,
|
|
140
145
|
): Promise<ForgeCommandResult<ForgeDeterminismCheckResult>> {
|
|
146
|
+
const _io = resolveIo(context.io);
|
|
141
147
|
const { workspaceRoot, logger } = context;
|
|
142
148
|
const { dryRun, profileIdOverride } = resolveLifecycleFlags(input, context);
|
|
143
149
|
const artifactFilter =
|
package/os/core/handlers/dev.ts
CHANGED
|
@@ -17,9 +17,13 @@ collectFiles and diagnosticsResult. Ratcheted baseline at workspace root.
|
|
|
17
17
|
</CHANGE_SUMMARY>
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { readdir, readFile, writeFile } from "node:fs/promises";
|
|
21
20
|
import { join, relative } from "node:path";
|
|
21
|
+
import { ambientIo, resolveIo } from "../../../src/utils/io.ts";
|
|
22
22
|
import { parse as yamlParse, stringify as yamlStringify } from "yaml";
|
|
23
|
+
|
|
24
|
+
// Ambient default for helper fns without a context param — handlers override
|
|
25
|
+
// with `const io = resolveIo(context.io)` inside their own scope.
|
|
26
|
+
const io = ambientIo;
|
|
23
27
|
import type {
|
|
24
28
|
CheckResult,
|
|
25
29
|
Diagnostic,
|
|
@@ -52,25 +56,26 @@ async function collectSourceFiles(root: string): Promise<string[]> {
|
|
|
52
56
|
async function walk(dir: string): Promise<void> {
|
|
53
57
|
let entries;
|
|
54
58
|
try {
|
|
55
|
-
entries = await readdir(dir
|
|
59
|
+
entries = await io.readdir(dir);
|
|
56
60
|
} catch {
|
|
57
61
|
return;
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
for (const entry of entries) {
|
|
61
65
|
if (entry.name.startsWith("-") || entry.name.startsWith("old-")) continue;
|
|
62
|
-
if (entry.name === "tests" || entry.name === "node_modules" || entry.name === "dist")
|
|
66
|
+
if (entry.name === "tests" || entry.name === "node_modules" || entry.name === "dist")
|
|
67
|
+
continue;
|
|
63
68
|
if (entry.name === ".astro" || entry.name.endsWith(".d.ts")) continue;
|
|
64
69
|
if (entry.name.endsWith(".generated.yaml")) continue;
|
|
65
70
|
|
|
66
71
|
const full = join(dir, entry.name);
|
|
67
72
|
|
|
68
|
-
if (entry.isDirectory
|
|
73
|
+
if (entry.isDirectory) {
|
|
69
74
|
await walk(full);
|
|
70
75
|
continue;
|
|
71
76
|
}
|
|
72
77
|
|
|
73
|
-
if (!entry.isFile
|
|
78
|
+
if (!entry.isFile) continue;
|
|
74
79
|
if (!entry.name.endsWith(".ts") && !entry.name.endsWith(".tsx")) continue;
|
|
75
80
|
|
|
76
81
|
results.push(full);
|
|
@@ -86,7 +91,7 @@ async function readBaseline(
|
|
|
86
91
|
baselinePath: string,
|
|
87
92
|
): Promise<FileSizeLintBaseline | undefined> {
|
|
88
93
|
try {
|
|
89
|
-
const raw = await readFile(join(workspaceRoot, baselinePath)
|
|
94
|
+
const raw = await io.readFile(join(workspaceRoot, baselinePath));
|
|
90
95
|
return yamlParse(raw) as FileSizeLintBaseline;
|
|
91
96
|
} catch {
|
|
92
97
|
return undefined;
|
|
@@ -107,7 +112,7 @@ async function findOversizedFiles(workspaceRoot: string): Promise<Map<string, nu
|
|
|
107
112
|
for (const filePath of files) {
|
|
108
113
|
let source: string;
|
|
109
114
|
try {
|
|
110
|
-
source = await readFile(filePath
|
|
115
|
+
source = await io.readFile(filePath);
|
|
111
116
|
} catch {
|
|
112
117
|
continue;
|
|
113
118
|
}
|
|
@@ -134,7 +139,8 @@ function diagnosticsResult(
|
|
|
134
139
|
summary.error > 0 ? "fail" : summary.warning > 0 ? "warn" : "pass";
|
|
135
140
|
const counts: string[] = [];
|
|
136
141
|
if (summary.error > 0) counts.push(`${summary.error} error${summary.error === 1 ? "" : "s"}`);
|
|
137
|
-
if (summary.warning > 0)
|
|
142
|
+
if (summary.warning > 0)
|
|
143
|
+
counts.push(`${summary.warning} warning${summary.warning === 1 ? "" : "s"}`);
|
|
138
144
|
const summaryStr = counts.length > 0 ? `[${command}] ${counts.join(", ")}` : `[${command}]`;
|
|
139
145
|
return {
|
|
140
146
|
data: { command, status, diagnostics, summary },
|
|
@@ -156,6 +162,7 @@ export async function runFileSizeLint(
|
|
|
156
162
|
input: ForgeCommandInput,
|
|
157
163
|
context: ForgeRuntimeContext,
|
|
158
164
|
): Promise<ForgeCommandResult<CheckResult | { file: string; files: number }>> {
|
|
165
|
+
const io = resolveIo(context.io);
|
|
159
166
|
const { workspaceRoot } = context;
|
|
160
167
|
const baselinePath =
|
|
161
168
|
(input.flags["baseline-path"] as string | undefined) ?? DEFAULT_BASELINE_PATH;
|
|
@@ -164,7 +171,7 @@ export async function runFileSizeLint(
|
|
|
164
171
|
if (input.flags["write-baseline"] === true) {
|
|
165
172
|
const ceilings: Record<string, number> = {};
|
|
166
173
|
for (const [file, lines] of oversized) ceilings[file] = lines;
|
|
167
|
-
await writeFile(join(workspaceRoot, baselinePath), renderBaseline(ceilings)
|
|
174
|
+
await io.writeFile(join(workspaceRoot, baselinePath), renderBaseline(ceilings));
|
|
168
175
|
return {
|
|
169
176
|
data: { file: baselinePath, files: oversized.size },
|
|
170
177
|
exitCode: 0,
|
|
@@ -24,8 +24,12 @@ Sweep batch 4: 73 Compass headers on headerless engine files (certification, com
|
|
|
24
24
|
</CHANGE_SUMMARY>
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
import { readdir, readFile } from "node:fs/promises";
|
|
28
27
|
import { join, relative } from "node:path";
|
|
28
|
+
import { ambientIo, resolveIo } from "../../../src/utils/io.ts";
|
|
29
|
+
|
|
30
|
+
// Ambient default for helper fns without a context param — handlers override
|
|
31
|
+
// with `const io = resolveIo(context.io)` inside their own scope.
|
|
32
|
+
const io = ambientIo;
|
|
29
33
|
import type {
|
|
30
34
|
ForgeCommandInput,
|
|
31
35
|
ForgeCommandResult,
|
|
@@ -51,19 +55,19 @@ async function scanDirectoryForImports(
|
|
|
51
55
|
): Promise<{ violations: { file: string; specifier: string }[]; scannedFiles: number }> {
|
|
52
56
|
let scannedFiles = 0;
|
|
53
57
|
const violations: { file: string; specifier: string }[] = [];
|
|
54
|
-
const entries = await readdir(dir
|
|
58
|
+
const entries = await io.readdir(dir).catch(() => []);
|
|
55
59
|
|
|
56
60
|
for (const entry of entries) {
|
|
57
61
|
const fullPath = join(dir, entry.name);
|
|
58
62
|
|
|
59
|
-
if (entry.isDirectory
|
|
63
|
+
if (entry.isDirectory) {
|
|
60
64
|
if (EXCLUDE_DIRS.has(entry.name)) continue;
|
|
61
65
|
const subResult = await scanDirectoryForImports(fullPath, workspaceRoot, specifierFilter);
|
|
62
66
|
scannedFiles += subResult.scannedFiles;
|
|
63
67
|
violations.push(...subResult.violations);
|
|
64
68
|
} else if (entry.name.endsWith(".ts") && !shouldExcludeFile(entry.name)) {
|
|
65
69
|
scannedFiles++;
|
|
66
|
-
const content = await readFile(fullPath
|
|
70
|
+
const content = await io.readFile(fullPath).catch(() => "");
|
|
67
71
|
let match: RegExpExecArray | null;
|
|
68
72
|
const pattern = new RegExp(IMPORT_PATTERN.source, "g");
|
|
69
73
|
while ((match = pattern.exec(content)) !== null) {
|
|
@@ -110,6 +114,7 @@ export async function runForgeAutonomyValidate(
|
|
|
110
114
|
_input: ForgeCommandInput,
|
|
111
115
|
context: ForgeRuntimeContext,
|
|
112
116
|
): Promise<ForgeCommandResult<ForgeAutonomyValidateResult>> {
|
|
117
|
+
const io = resolveIo(context.io);
|
|
113
118
|
const workspaceRoot = context.workspaceRoot;
|
|
114
119
|
const forgeOsDir = join(workspaceRoot, "packages", "forge", "os");
|
|
115
120
|
|
|
@@ -124,7 +129,7 @@ export async function runForgeAutonomyValidate(
|
|
|
124
129
|
if (v.file.startsWith(ADAPTER_DIR_PREFIX)) continue;
|
|
125
130
|
|
|
126
131
|
const fullPath = join(workspaceRoot, v.file);
|
|
127
|
-
const content = await readFile(fullPath
|
|
132
|
+
const content = await io.readFile(fullPath).catch(() => "");
|
|
128
133
|
if (!isTypeOnlyImport(content, v.specifier)) {
|
|
129
134
|
violations.push({
|
|
130
135
|
ruleId: "FORGE-AUTONOMY-01",
|
|
@@ -17,7 +17,7 @@ Sweep batch 4: 73 Compass headers on headerless engine files (certification, com
|
|
|
17
17
|
</CHANGE_SUMMARY>
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import fs from "
|
|
20
|
+
import * as fs from "../../../src/utils/sync-fs.ts";
|
|
21
21
|
import path from "node:path";
|
|
22
22
|
import type {
|
|
23
23
|
ForgeCommandInput,
|
|
@@ -21,7 +21,7 @@ Sweep batch 4: 73 Compass headers on headerless engine files (certification, com
|
|
|
21
21
|
</CHANGE_SUMMARY>
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
import fs from "
|
|
24
|
+
import { ambientIo as fs } from "../../../src/utils/io.ts";
|
|
25
25
|
import path from "node:path";
|
|
26
26
|
import { parse as parseYaml } from "yaml";
|
|
27
27
|
import type { PinnedEntry, PinnedManifest, PinnedMode, PinnedViolation } from "./pinned-types.ts";
|
|
@@ -55,7 +55,7 @@ export async function loadPinnedManifest(repoRoot: string): Promise<PinnedManife
|
|
|
55
55
|
|
|
56
56
|
let content: string;
|
|
57
57
|
try {
|
|
58
|
-
content = await fs.readFile(manifestPath
|
|
58
|
+
content = await fs.readFile(manifestPath);
|
|
59
59
|
} catch {
|
|
60
60
|
return null;
|
|
61
61
|
}
|
|
@@ -13,7 +13,8 @@ generates CI workflow. Idempotent: re-running merges defaults with existing entr
|
|
|
13
13
|
</CHANGE_SUMMARY>
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import fs from "
|
|
16
|
+
import { ambientIo as fs } from "../../../src/utils/io.ts";
|
|
17
|
+
import { chmodSync } from "../../../src/utils/sync-fs.ts";
|
|
17
18
|
import path from "node:path";
|
|
18
19
|
import { stringify as stringifyYaml } from "yaml";
|
|
19
20
|
import type {
|
|
@@ -184,12 +185,12 @@ async function installPreCommitHook(
|
|
|
184
185
|
|
|
185
186
|
let existingContent: string;
|
|
186
187
|
try {
|
|
187
|
-
existingContent = await fs.readFile(hookPath
|
|
188
|
+
existingContent = await fs.readFile(hookPath);
|
|
188
189
|
} catch {
|
|
189
190
|
// No existing hook — create new
|
|
190
|
-
await fs.mkdir(path.dirname(hookPath)
|
|
191
|
+
await fs.mkdir(path.dirname(hookPath));
|
|
191
192
|
await writeFileIfChanged(hookPath, PRE_COMMIT_HOOK_SCRIPT);
|
|
192
|
-
|
|
193
|
+
chmodSync(hookPath, 0o755);
|
|
193
194
|
return "created";
|
|
194
195
|
}
|
|
195
196
|
|
|
@@ -201,7 +202,7 @@ async function installPreCommitHook(
|
|
|
201
202
|
// Append forge hook to existing hook
|
|
202
203
|
const mergedContent = existingContent + "\n" + PRE_COMMIT_HOOK_SCRIPT;
|
|
203
204
|
await writeFileIfChanged(hookPath, mergedContent);
|
|
204
|
-
|
|
205
|
+
chmodSync(hookPath, 0o755);
|
|
205
206
|
return "updated";
|
|
206
207
|
}
|
|
207
208
|
|
|
@@ -214,7 +215,7 @@ async function addToGitignore(repoRoot: string): Promise<"created" | "updated" |
|
|
|
214
215
|
|
|
215
216
|
let existingContent: string;
|
|
216
217
|
try {
|
|
217
|
-
existingContent = await fs.readFile(gitignorePath
|
|
218
|
+
existingContent = await fs.readFile(gitignorePath);
|
|
218
219
|
} catch {
|
|
219
220
|
// No .gitignore — create new
|
|
220
221
|
await writeFileIfChanged(gitignorePath, entry + "\n");
|
|
@@ -238,7 +239,7 @@ async function addToGitignore(repoRoot: string): Promise<"created" | "updated" |
|
|
|
238
239
|
*/
|
|
239
240
|
async function generateCiWorkflow(repoRoot: string): Promise<"created" | "unchanged"> {
|
|
240
241
|
const workflowPath = path.join(repoRoot, ".github", "workflows", "pinned-check.yml");
|
|
241
|
-
await fs.mkdir(path.dirname(workflowPath)
|
|
242
|
+
await fs.mkdir(path.dirname(workflowPath));
|
|
242
243
|
await writeFileIfChanged(workflowPath, CI_WORKFLOW_TEMPLATE);
|
|
243
244
|
return "created";
|
|
244
245
|
}
|
|
@@ -283,7 +284,7 @@ export async function runPinnedInit(
|
|
|
283
284
|
|
|
284
285
|
// Write manifest
|
|
285
286
|
const manifestFullPath = path.join(workspaceRoot, PINNED_MANIFEST_PATH);
|
|
286
|
-
await fs.mkdir(path.dirname(manifestFullPath)
|
|
287
|
+
await fs.mkdir(path.dirname(manifestFullPath));
|
|
287
288
|
const manifestContent = stringifyYaml(merged);
|
|
288
289
|
await writeFileIfChanged(manifestFullPath, manifestContent);
|
|
289
290
|
|