@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
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-0374: initial forgeCompassModule registering 12 compass commands.</item>
|
|
10
9
|
<item>RFC-0538: renamed compass.changesummary.tidy to compass.summary.trim, removed compass.annotate, compass.clear, compass.markup.migrate, compass.invariant.add.</item>
|
|
11
10
|
<item>RFC-0556: removed dynamic import of @warpgogol/site-kernel-checks, all handlers now inlined in forge/os/compass/handlers/.</item>
|
|
12
11
|
<item>RFC-1095: compass.summary.record, trim repair rewrite, commit integration</item>
|
|
13
12
|
<item>RFC-1097: steps 1-4 — compass.migrate codemod
|
|
14
13
|
|
|
15
14
|
Add the v1 to v2 Compass header codemod: migrateFile pure transform (collapse, strip, seed, reorder, purpose-flag actions), migrateWorkspace walker, runCompassMigrate handler with dirty-tree refusal and --force/--files/--dry-run flags, module registration, and 15 unit tests.</item>
|
|
15
|
+
<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>
|
|
16
|
+
<history>RFC-0374</history>
|
|
16
17
|
</CHANGE_SUMMARY>
|
|
17
18
|
*/
|
|
18
19
|
|
|
@@ -59,6 +60,7 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
59
60
|
commands: [
|
|
60
61
|
{
|
|
61
62
|
name: "compass.inventory",
|
|
63
|
+
mutatesState: true,
|
|
62
64
|
description: "Generate the repository-wide Compass source inventory XML report.",
|
|
63
65
|
scope: "workspace",
|
|
64
66
|
supportsAllSites: true,
|
|
@@ -72,6 +74,7 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
72
74
|
},
|
|
73
75
|
{
|
|
74
76
|
name: "compass.validate",
|
|
77
|
+
mutatesState: false,
|
|
75
78
|
contract: "compass",
|
|
76
79
|
rules: [],
|
|
77
80
|
description:
|
|
@@ -99,6 +102,7 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
99
102
|
"packages/**/*.{astro,ts,tsx,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
100
103
|
"services/**/*.{ts,tsx,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
101
104
|
],
|
|
105
|
+
generates: [],
|
|
102
106
|
reads: [
|
|
103
107
|
"packages/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
104
108
|
"apps/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
@@ -137,6 +141,7 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
137
141
|
"packages/**/*.{astro,ts,tsx,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
138
142
|
"services/**/*.{ts,tsx,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
139
143
|
],
|
|
144
|
+
generates: [],
|
|
140
145
|
reads: [
|
|
141
146
|
"packages/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
142
147
|
"apps/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
@@ -164,6 +169,7 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
164
169
|
"packages/**/*.{astro,ts,tsx,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
165
170
|
"services/**/*.{ts,tsx,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
166
171
|
],
|
|
172
|
+
generates: [],
|
|
167
173
|
reads: [
|
|
168
174
|
"packages/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
169
175
|
"apps/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
@@ -189,6 +195,8 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
189
195
|
},
|
|
190
196
|
{
|
|
191
197
|
name: "compass.audit.plan",
|
|
198
|
+
mutatesState: false,
|
|
199
|
+
execOnReadOnly: true,
|
|
192
200
|
description:
|
|
193
201
|
"Emit a deterministic work-order of files whose revision has advanced past the threshold since their last Compass audit (RFC-0352). Read-only, no LLM.",
|
|
194
202
|
scope: "workspace",
|
|
@@ -210,12 +218,14 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
210
218
|
},
|
|
211
219
|
{
|
|
212
220
|
name: "compass.audit.record",
|
|
221
|
+
modulePath: "packages/forge/os/compass/compass.module.ts",
|
|
213
222
|
description:
|
|
214
223
|
"Stamp a file's audit verdict and current revision into the compass-audit ledger (RFC-0352). Mutating. Required flags: `--file`, `--verdict`.",
|
|
215
224
|
scope: "workspace",
|
|
216
225
|
mutatesState: true,
|
|
217
226
|
supportsAllSites: true,
|
|
218
227
|
writes: ["docs/compass-audit-ledger.generated.yaml"],
|
|
228
|
+
generates: [{ path: "docs/compass-audit-ledger.generated.yaml", phase: "on-demand" }],
|
|
219
229
|
reads: ["docs/compass-audit-ledger.generated.yaml"],
|
|
220
230
|
cacheable: false,
|
|
221
231
|
flags: {
|
|
@@ -231,12 +241,16 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
231
241
|
},
|
|
232
242
|
{
|
|
233
243
|
name: "compass.audit.baseline",
|
|
244
|
+
modulePath: "packages/forge/os/compass/compass.module.ts",
|
|
234
245
|
description:
|
|
235
246
|
"Seed the compass-audit ledger for every authored file at its current revision with verdict=baseline (RFC-0352). One-time bootstrap.",
|
|
236
247
|
scope: "workspace",
|
|
237
248
|
mutatesState: true,
|
|
238
249
|
supportsAllSites: true,
|
|
239
250
|
writes: ["docs/compass-audit-ledger.generated.yaml"],
|
|
251
|
+
// Artifact ownership is claimed by compass.audit.record (GENERATES-PATH-
|
|
252
|
+
// COLLISION forbids two owners on a non-glob path); baseline only writes it.
|
|
253
|
+
generates: [],
|
|
240
254
|
reads: [
|
|
241
255
|
"packages/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
242
256
|
"apps/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
@@ -248,6 +262,8 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
248
262
|
},
|
|
249
263
|
{
|
|
250
264
|
name: "compass.audit.validate",
|
|
265
|
+
mutatesState: false,
|
|
266
|
+
execOnReadOnly: true,
|
|
251
267
|
contract: "compass",
|
|
252
268
|
rules: [],
|
|
253
269
|
description:
|
|
@@ -18,9 +18,9 @@ mode (RFC-0556). Drives per-file semantic-truth auditing on a revision cadence (
|
|
|
18
18
|
</CHANGE_SUMMARY>
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import { mkdir, readFile } from "node:fs/promises";
|
|
22
21
|
import { resolve, relative } from "node:path";
|
|
23
|
-
import {
|
|
22
|
+
import { ambientIo, resolveIo } from "../../../src/utils/io.ts";
|
|
23
|
+
import { execFile, execFileSync } from "../../../src/utils/sync-fs.ts";
|
|
24
24
|
import { promisify } from "node:util";
|
|
25
25
|
import { createCompassInventoryEntries } from "./compass-inventory.ts";
|
|
26
26
|
import { resolveCompassPolicy } from "../policy.ts";
|
|
@@ -36,6 +36,10 @@ import type {
|
|
|
36
36
|
} from "../../../src/types.ts";
|
|
37
37
|
import { parse as yamlParse, stringify as yamlStringify } from "yaml";
|
|
38
38
|
|
|
39
|
+
// Ambient default for helper fns without a context param — handlers override
|
|
40
|
+
// with `const io = resolveIo(context.io)` inside their own scope.
|
|
41
|
+
const io = ambientIo;
|
|
42
|
+
|
|
39
43
|
const execFileAsync = promisify(execFile);
|
|
40
44
|
const LEDGER_PATH = "docs/compass-audit-ledger.generated.yaml";
|
|
41
45
|
const DEFAULT_THRESHOLD = 30;
|
|
@@ -93,7 +97,7 @@ function withLedgerAdvisory(ledger: Partial<CompassAuditLedger>): CompassAuditLe
|
|
|
93
97
|
async function loadLedger(workspaceRoot: string): Promise<CompassAuditLedger> {
|
|
94
98
|
const abs = resolve(workspaceRoot, LEDGER_PATH);
|
|
95
99
|
try {
|
|
96
|
-
const content = await readFile(abs
|
|
100
|
+
const content = await io.readFile(abs);
|
|
97
101
|
return withLedgerAdvisory(yamlParse(content) as Partial<CompassAuditLedger>);
|
|
98
102
|
} catch {
|
|
99
103
|
return withLedgerAdvisory({});
|
|
@@ -104,7 +108,7 @@ async function saveLedger(workspaceRoot: string, ledger: CompassAuditLedger): Pr
|
|
|
104
108
|
const normalized = withLedgerAdvisory(ledger);
|
|
105
109
|
normalized.entries.sort((a, b) => a.path.localeCompare(b.path));
|
|
106
110
|
const abs = resolve(workspaceRoot, LEDGER_PATH);
|
|
107
|
-
await mkdir(resolve(abs, "..")
|
|
111
|
+
await io.mkdir(resolve(abs, ".."));
|
|
108
112
|
const header = buildGeneratedHeader({
|
|
109
113
|
ownerCommand: "compass.audit.record",
|
|
110
114
|
filePath: LEDGER_PATH,
|
|
@@ -194,6 +198,7 @@ export async function runCompassAuditPlan(
|
|
|
194
198
|
skippedIneligible: number;
|
|
195
199
|
}>
|
|
196
200
|
> {
|
|
201
|
+
const io = resolveIo(context.io);
|
|
197
202
|
const scanRoot = resolveCompassScanRoot(input, context);
|
|
198
203
|
const policy = resolveCompassPolicy(context.workspaceRoot, context.forgeRoot);
|
|
199
204
|
const entries = await createCompassInventoryEntries(
|
|
@@ -238,7 +243,7 @@ export async function runCompassAuditPlan(
|
|
|
238
243
|
}
|
|
239
244
|
|
|
240
245
|
const absPath = resolve(context.workspaceRoot, entry.path);
|
|
241
|
-
const source = await readFile(absPath
|
|
246
|
+
const source = await io.readFile(absPath);
|
|
242
247
|
const moduleContract = extractBlock(source, "MODULE_CONTRACT");
|
|
243
248
|
const keyDecisions = extractBlock(source, "KEY_DECISIONS");
|
|
244
249
|
const changeSummary = extractBlock(source, "CHANGE_SUMMARY");
|
|
@@ -285,6 +290,7 @@ export async function runCompassAuditRecord(
|
|
|
285
290
|
action: "recorded";
|
|
286
291
|
}>
|
|
287
292
|
> {
|
|
293
|
+
const _io = resolveIo(context.io);
|
|
288
294
|
const rawFilePath = input.flags["file"] as string | undefined;
|
|
289
295
|
const verdict = input.flags["verdict"] as CompassAuditVerdict | undefined;
|
|
290
296
|
const agentFlag = input.flags["agent"] as string | undefined;
|
|
@@ -366,6 +372,7 @@ export async function runCompassAuditBaseline(
|
|
|
366
372
|
total: number;
|
|
367
373
|
}>
|
|
368
374
|
> {
|
|
375
|
+
const _io = resolveIo(context.io);
|
|
369
376
|
const scanRoot = resolveCompassScanRoot(input, context);
|
|
370
377
|
const policy = resolveCompassPolicy(context.workspaceRoot, context.forgeRoot);
|
|
371
378
|
const entries = await createCompassInventoryEntries(
|
|
@@ -444,6 +451,7 @@ export async function runCompassAuditValidate(
|
|
|
444
451
|
skippedPaths: string[];
|
|
445
452
|
}>
|
|
446
453
|
> {
|
|
454
|
+
const _io = resolveIo(context.io);
|
|
447
455
|
const strict = input.flags["strict"] === true;
|
|
448
456
|
const scanRoot = resolveCompassScanRoot(input, context);
|
|
449
457
|
const policy = resolveCompassPolicy(context.workspaceRoot, context.forgeRoot);
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import { resolve } from "node:path";
|
|
23
|
-
import {
|
|
23
|
+
import { resolveIo } from "../../../src/utils/io.ts";
|
|
24
|
+
|
|
24
25
|
import { createCompassInventoryEntries } from "./compass-inventory.ts";
|
|
25
26
|
import { resolveCompassPolicy } from "../policy.ts";
|
|
26
27
|
import { resolveCompassScanRoot } from "./resolve-scan-root.ts";
|
|
@@ -49,6 +50,7 @@ export async function runCompassSummaryTrim(
|
|
|
49
50
|
files: Array<{ path: string; removed: string[]; kept: number }>;
|
|
50
51
|
}>
|
|
51
52
|
> {
|
|
53
|
+
const io = resolveIo(context.io);
|
|
52
54
|
const mode = input.flags["mode"];
|
|
53
55
|
if (mode !== undefined && mode !== "repair") {
|
|
54
56
|
context.logger.error(
|
|
@@ -83,7 +85,7 @@ export async function runCompassSummaryTrim(
|
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
const absPath = resolve(context.workspaceRoot, entry.path);
|
|
86
|
-
const source = await readFile(absPath
|
|
88
|
+
const source = await io.readFile(absPath);
|
|
87
89
|
const blockMatch = source.match(CHANGE_SUMMARY_BLOCK_RE);
|
|
88
90
|
if (!blockMatch) continue;
|
|
89
91
|
|
|
@@ -26,7 +26,8 @@ Sweep batch 2: real KEY_DECISIONS on 10 files, expanded purposes (CONTRACT-02/PU
|
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
import { resolve } from "node:path";
|
|
29
|
-
import {
|
|
29
|
+
import { resolveIo } from "../../../src/utils/io.ts";
|
|
30
|
+
|
|
30
31
|
import {
|
|
31
32
|
createCompassInventoryEntries,
|
|
32
33
|
evaluateV2Rules,
|
|
@@ -267,6 +268,7 @@ export async function runCompassInventory(
|
|
|
267
268
|
policySource: CompassPolicySource;
|
|
268
269
|
}>
|
|
269
270
|
> {
|
|
271
|
+
const _io = resolveIo(context.io);
|
|
270
272
|
const scanRoot = resolveCompassScanRoot(input, context) ?? context.workspaceRoot;
|
|
271
273
|
const policy = resolveCompassPolicy(scanRoot, context.forgeRoot);
|
|
272
274
|
const entries = await createCompassInventoryEntries(scanRoot, input, undefined, policy);
|
|
@@ -332,6 +334,7 @@ export async function runCompassValidation(
|
|
|
332
334
|
}>;
|
|
333
335
|
}>
|
|
334
336
|
> {
|
|
337
|
+
const io = resolveIo(context.io);
|
|
335
338
|
const scanRoot = resolveCompassScanRoot(input, context);
|
|
336
339
|
let mode: ReturnType<typeof resolveCompassMode>;
|
|
337
340
|
try {
|
|
@@ -383,7 +386,7 @@ export async function runCompassValidation(
|
|
|
383
386
|
);
|
|
384
387
|
for (const entry of authoredEntries) {
|
|
385
388
|
const absPath = resolve(context.workspaceRoot, entry.path);
|
|
386
|
-
const source = getEntrySource(entry) ?? (await readFile(absPath
|
|
389
|
+
const source = getEntrySource(entry) ?? (await io.readFile(absPath));
|
|
387
390
|
for (const v2 of evaluateV2Rules(entry, source, policy)) {
|
|
388
391
|
if (!V2_VALIDATE_RULE_PREFIXES.some((prefix) => v2.ruleId.startsWith(prefix))) {
|
|
389
392
|
continue;
|
|
@@ -449,7 +452,7 @@ export async function runCompassValidation(
|
|
|
449
452
|
}
|
|
450
453
|
|
|
451
454
|
const absPath = resolve(context.workspaceRoot, entry.path);
|
|
452
|
-
const source = await readFile(absPath
|
|
455
|
+
const source = await io.readFile(absPath);
|
|
453
456
|
if (TODO_COMPASS_RE.test(source)) {
|
|
454
457
|
context.logger.error(
|
|
455
458
|
`[compass.validate] COMPASS-TODO-01: ${entry.path}: unfilled ${compassTodoLabel} sentinel in Compass block`,
|
|
@@ -496,7 +499,7 @@ export async function runCompassValidation(
|
|
|
496
499
|
if (applicableSpecs.length === 0) continue;
|
|
497
500
|
|
|
498
501
|
const absPath = resolve(context.workspaceRoot, entry.path);
|
|
499
|
-
const source = await readFile(absPath
|
|
502
|
+
const source = await io.readFile(absPath);
|
|
500
503
|
|
|
501
504
|
for (const spec of applicableSpecs) {
|
|
502
505
|
const blockMarker = `<${spec.blockId.toUpperCase().replace(/-/g, "_")}>`;
|
|
@@ -29,10 +29,14 @@ Sweep batch 2: real KEY_DECISIONS on 10 files, expanded purposes (CONTRACT-02/PU
|
|
|
29
29
|
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
-
import { readdir, readFile } from "node:fs/promises";
|
|
33
32
|
import { join, relative, resolve } from "node:path";
|
|
33
|
+
import { ambientIo } from "../../../src/utils/io.ts";
|
|
34
34
|
import type { ForgeCommandInput } from "../../../src/types.ts";
|
|
35
35
|
import { hasGeneratedMarker } from "../../../src/utils/generated-marker.ts";
|
|
36
|
+
|
|
37
|
+
// Ambient default for helper fns without a context param — handlers override
|
|
38
|
+
// with `const io = resolveIo(context.io)` inside their own scope.
|
|
39
|
+
const io = ambientIo;
|
|
36
40
|
import {
|
|
37
41
|
parseGovernanceIdParts,
|
|
38
42
|
resolveCompassPolicy,
|
|
@@ -158,19 +162,18 @@ function hasRelevantExtension(filePath: string, policy: CompassPolicy): boolean
|
|
|
158
162
|
async function collectSourceFiles(targetPath: string, policy: CompassPolicy): Promise<string[]> {
|
|
159
163
|
let stat;
|
|
160
164
|
try {
|
|
161
|
-
|
|
162
|
-
stat = await fsStat(targetPath);
|
|
165
|
+
stat = await io.stat(targetPath);
|
|
163
166
|
} catch {
|
|
164
167
|
return [];
|
|
165
168
|
}
|
|
166
169
|
|
|
167
|
-
if (stat.isFile
|
|
170
|
+
if (stat.isFile) {
|
|
168
171
|
return hasRelevantExtension(targetPath, policy) ? [targetPath] : [];
|
|
169
172
|
}
|
|
170
173
|
|
|
171
174
|
let entries;
|
|
172
175
|
try {
|
|
173
|
-
entries = await readdir(targetPath
|
|
176
|
+
entries = await io.readdir(targetPath);
|
|
174
177
|
} catch {
|
|
175
178
|
return [];
|
|
176
179
|
}
|
|
@@ -179,7 +182,7 @@ async function collectSourceFiles(targetPath: string, policy: CompassPolicy): Pr
|
|
|
179
182
|
for (const entry of entries) {
|
|
180
183
|
const absolutePath = join(targetPath, entry.name);
|
|
181
184
|
|
|
182
|
-
if (entry.isDirectory
|
|
185
|
+
if (entry.isDirectory) {
|
|
183
186
|
if (shouldIgnoreDirectory(entry.name, policy)) {
|
|
184
187
|
continue;
|
|
185
188
|
}
|
|
@@ -188,7 +191,7 @@ async function collectSourceFiles(targetPath: string, policy: CompassPolicy): Pr
|
|
|
188
191
|
continue;
|
|
189
192
|
}
|
|
190
193
|
|
|
191
|
-
if (entry.isFile
|
|
194
|
+
if (entry.isFile && hasRelevantExtension(absolutePath, policy)) {
|
|
192
195
|
files.push(absolutePath);
|
|
193
196
|
}
|
|
194
197
|
}
|
|
@@ -722,7 +725,7 @@ export async function createCompassInventoryEntries(
|
|
|
722
725
|
const entries: CompassInventoryEntry[] = [];
|
|
723
726
|
|
|
724
727
|
for (const filePath of files.sort()) {
|
|
725
|
-
const source = await readFile(filePath
|
|
728
|
+
const source = await io.readFile(filePath);
|
|
726
729
|
const pathFromRoot = relative(workspaceRoot, filePath).replace(/\\/g, "/");
|
|
727
730
|
const segments = getRelativeSegments(filePath, workspaceRoot);
|
|
728
731
|
const relativePathWithinWorkspace = leafWorkspaceRoot
|
|
@@ -25,7 +25,7 @@ compass-migrate-handler hint used a consumer-specific run command — switched t
|
|
|
25
25
|
</CHANGE_SUMMARY>
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
-
import { execFileSync } from "
|
|
28
|
+
import { execFileSync } from "../../../src/utils/sync-fs.ts";
|
|
29
29
|
import { migrateWorkspace, type MigrateResult } from "./compass-migrate.ts";
|
|
30
30
|
import { resolveCompassScanRoot } from "./resolve-scan-root.ts";
|
|
31
31
|
import { resolveCompassPolicy } from "../policy.ts";
|
|
@@ -26,8 +26,8 @@ Add the v1 to v2 Compass header codemod: migrateFile pure transform (collapse, s
|
|
|
26
26
|
</CHANGE_SUMMARY>
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
import { readFile } from "node:fs/promises";
|
|
30
29
|
import { relative, resolve } from "node:path";
|
|
30
|
+
import { ambientIo } from "../../../src/utils/io.ts";
|
|
31
31
|
import {
|
|
32
32
|
createCompassInventoryEntries,
|
|
33
33
|
detectRiskClass,
|
|
@@ -46,6 +46,10 @@ import { writeFileIfChanged } from "../../../src/utils/fs-idempotent.ts";
|
|
|
46
46
|
import type { CompassPolicy } from "../policy.ts";
|
|
47
47
|
import type { ForgeCommandInput } from "../../../src/types.ts";
|
|
48
48
|
|
|
49
|
+
// Ambient default for helper fns without a context param — handlers override
|
|
50
|
+
// with `const io = resolveIo(context.io)` inside their own scope.
|
|
51
|
+
const io = ambientIo;
|
|
52
|
+
|
|
49
53
|
export type MigrateAction =
|
|
50
54
|
| "collapsed"
|
|
51
55
|
| "stripped"
|
|
@@ -324,7 +328,7 @@ export async function migrateWorkspace(
|
|
|
324
328
|
const target = toTarget(workspaceRoot, absPath, policy);
|
|
325
329
|
let source: string;
|
|
326
330
|
try {
|
|
327
|
-
source = await readFile(absPath
|
|
331
|
+
source = await io.readFile(absPath);
|
|
328
332
|
} catch {
|
|
329
333
|
result.files.push({ path: file, actions: ["unparseable"] });
|
|
330
334
|
continue;
|
|
@@ -354,7 +358,7 @@ export async function migrateWorkspace(
|
|
|
354
358
|
if (entry.authoringStatus !== "authored") continue;
|
|
355
359
|
result.scanned += 1;
|
|
356
360
|
const absPath = resolve(workspaceRoot, entry.path);
|
|
357
|
-
const source = getEntrySource(entry) ?? (await readFile(absPath
|
|
361
|
+
const source = getEntrySource(entry) ?? (await io.readFile(absPath));
|
|
358
362
|
const segments = getRelativeSegments(absPath, workspaceRoot);
|
|
359
363
|
const workspaceRelativePath = getWorkspaceRelativeSegments(segments, policy).join("/");
|
|
360
364
|
const migrated = migrateFile(source, policy, entry.path, workspaceRelativePath);
|
|
@@ -14,12 +14,17 @@ with integrity-registry lookup and git-history fallback, plus getFileRevisionFro
|
|
|
14
14
|
</CHANGE_SUMMARY>
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { execFile } from "
|
|
17
|
+
import { execFile } from "../../../src/utils/sync-fs.ts";
|
|
18
|
+
import { ambientIo } from "../../../src/utils/io.ts";
|
|
18
19
|
import { promisify } from "node:util";
|
|
19
20
|
import { createHash } from "node:crypto";
|
|
20
|
-
|
|
21
|
+
|
|
21
22
|
import { resolve, join } from "node:path";
|
|
22
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;
|
|
27
|
+
|
|
23
28
|
const execFileAsync = promisify(execFile);
|
|
24
29
|
const DEFAULT_GIT_TIMEOUT_MS = 15_000;
|
|
25
30
|
|
|
@@ -73,7 +78,7 @@ type PathsCurrent = Record<string, string>;
|
|
|
73
78
|
async function loadEntitiesById(cwd: string): Promise<EntitiesById> {
|
|
74
79
|
const filePath = join(cwd, ".integrity", "index", "entities.by-id.json");
|
|
75
80
|
try {
|
|
76
|
-
const content = await readFile(filePath
|
|
81
|
+
const content = await io.readFile(filePath);
|
|
77
82
|
return JSON.parse(content) as EntitiesById;
|
|
78
83
|
} catch {
|
|
79
84
|
return {};
|
|
@@ -83,7 +88,7 @@ async function loadEntitiesById(cwd: string): Promise<EntitiesById> {
|
|
|
83
88
|
async function loadPathsCurrent(cwd: string): Promise<PathsCurrent> {
|
|
84
89
|
const filePath = join(cwd, ".integrity", "index", "paths.current.json");
|
|
85
90
|
try {
|
|
86
|
-
const content = await readFile(filePath
|
|
91
|
+
const content = await io.readFile(filePath);
|
|
87
92
|
return JSON.parse(content) as PathsCurrent;
|
|
88
93
|
} catch {
|
|
89
94
|
return {};
|
|
@@ -110,7 +115,7 @@ export async function getRevisionByPath(
|
|
|
110
115
|
let contentHash = entity.contentHash;
|
|
111
116
|
try {
|
|
112
117
|
const abs = resolve(cwd, repoPath);
|
|
113
|
-
const content = await readFile(abs
|
|
118
|
+
const content = await io.readFile(abs);
|
|
114
119
|
contentHash = "sha256-" + createHash("sha256").update(content).digest("hex");
|
|
115
120
|
} catch {
|
|
116
121
|
// keep registry hash
|
|
@@ -127,7 +132,7 @@ export async function getRevisionByPath(
|
|
|
127
132
|
let contentHash = "";
|
|
128
133
|
try {
|
|
129
134
|
const abs = resolve(cwd, repoPath);
|
|
130
|
-
const content = await readFile(abs
|
|
135
|
+
const content = await io.readFile(abs);
|
|
131
136
|
contentHash = "sha256-" + createHash("sha256").update(content).digest("hex");
|
|
132
137
|
} catch {
|
|
133
138
|
// file may not exist
|
|
@@ -23,7 +23,7 @@ compass-migrate-handler hint used a consumer-specific run command — switched t
|
|
|
23
23
|
</CHANGE_SUMMARY>
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import { existsSync } from "
|
|
26
|
+
import { existsSync } from "../../../src/utils/sync-fs.ts";
|
|
27
27
|
import { resolve } from "node:path";
|
|
28
28
|
import type { ForgeCommandInput, ForgeRuntimeContext } from "../../../src/types.ts";
|
|
29
29
|
|
|
@@ -32,13 +32,18 @@ compass-migrate-handler hint used a consumer-specific run command — switched t
|
|
|
32
32
|
</CHANGE_SUMMARY>
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
|
-
import { existsSync } from "
|
|
36
|
-
import {
|
|
35
|
+
import { existsSync } from "../../../src/utils/sync-fs.ts";
|
|
36
|
+
import { ambientIo, resolveIo } from "../../../src/utils/io.ts";
|
|
37
|
+
|
|
37
38
|
import { resolve, relative } from "node:path";
|
|
38
39
|
import { detectRiskClass, getWorkspaceRelativeSegments } from "./compass-inventory.ts";
|
|
39
40
|
import { parseGovernanceIdParts, resolveCompassPolicy, type CompassPolicy } from "../policy.ts";
|
|
40
41
|
import { resolveCompassScanRoot } from "./resolve-scan-root.ts";
|
|
41
42
|
import { writeFileIfChanged } from "../../../src/utils/fs-idempotent.ts";
|
|
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;
|
|
42
47
|
import type {
|
|
43
48
|
ForgeCommandInput,
|
|
44
49
|
ForgeCommandResult,
|
|
@@ -185,7 +190,7 @@ export async function recordSummaryItem(
|
|
|
185
190
|
dryRun: boolean,
|
|
186
191
|
policy: CompassPolicy,
|
|
187
192
|
): Promise<RecordOutcome> {
|
|
188
|
-
const source = await readFile(absPath
|
|
193
|
+
const source = await io.readFile(absPath);
|
|
189
194
|
const blockMatch = source.match(CHANGE_SUMMARY_BLOCK_RE);
|
|
190
195
|
// Header-region guard: a CHANGE_SUMMARY is a header only when it sits at the
|
|
191
196
|
// top of the file. Blocks deeper in the source are examples inside template
|
|
@@ -243,6 +248,7 @@ export async function runCompassSummaryRecord(
|
|
|
243
248
|
input: ForgeCommandInput,
|
|
244
249
|
context: ForgeRuntimeContext,
|
|
245
250
|
): Promise<ForgeCommandResult<SummaryRecordResult>> {
|
|
251
|
+
const io = resolveIo(context.io);
|
|
246
252
|
const scanRoot = resolveCompassScanRoot(input, context);
|
|
247
253
|
const baseRoot = scanRoot ?? context.workspaceRoot;
|
|
248
254
|
const policy = resolveCompassPolicy(baseRoot, context.forgeRoot);
|
|
@@ -291,7 +297,7 @@ export async function runCompassSummaryRecord(
|
|
|
291
297
|
if (outcome.recorded) {
|
|
292
298
|
result.recorded.push(relPath);
|
|
293
299
|
if (outcome.collapsed) result.collapsed.push(relPath);
|
|
294
|
-
const source = await readFile(absPath
|
|
300
|
+
const source = await io.readFile(absPath);
|
|
295
301
|
if (riskReminderNeeded(relPath, source, policy)) {
|
|
296
302
|
result.keyDecisionsReminders.push(relPath);
|
|
297
303
|
context.logger.warn(`[compass.summary.record] review KEY_DECISIONS in ${relPath}`);
|
|
@@ -16,6 +16,7 @@ import { execFile } from "node:child_process";
|
|
|
16
16
|
import { promisify } from "node:util";
|
|
17
17
|
import { runCompassAuditPlan } from "../compass-audit-handler.ts";
|
|
18
18
|
import type { ForgeCommandInput, ForgeRuntimeContext } from "../../../../src/types.ts";
|
|
19
|
+
import { ambientIo } from "../../../../src/utils/io.ts";
|
|
19
20
|
|
|
20
21
|
const execFileAsync = promisify(execFile);
|
|
21
22
|
|
|
@@ -38,7 +39,7 @@ function makeContext(workspaceRoot: string): ForgeRuntimeContext {
|
|
|
38
39
|
logger: logger as never,
|
|
39
40
|
dryRun: false,
|
|
40
41
|
outputFormat: "json",
|
|
41
|
-
io:
|
|
42
|
+
io: ambientIo,
|
|
42
43
|
actualState: undefined as never,
|
|
43
44
|
fileIntents: [],
|
|
44
45
|
} as unknown as ForgeRuntimeContext;
|