@warpgogol/forge 5.2.4 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +32 -2
- package/README.md +1 -1
- package/README.uk.md +8 -8
- package/bin/cli.ts +1 -0
- package/dist/bin/cli.js +1 -0
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/adr/adr.module.d.ts.map +1 -1
- package/dist/os/adr/adr.module.js +8 -3
- package/dist/os/adr/adr.module.js.map +1 -1
- package/dist/os/adr/frontmatter-io.js +5 -5
- package/dist/os/adr/frontmatter-io.js.map +1 -1
- package/dist/os/adr/handlers/archive.d.ts.map +1 -1
- package/dist/os/adr/handlers/archive.js +10 -4
- package/dist/os/adr/handlers/archive.js.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.js +10 -9
- package/dist/os/adr/handlers/implement-stamp.js.map +1 -1
- package/dist/os/adr/handlers/list-create.js +5 -5
- package/dist/os/adr/handlers/list-create.js.map +1 -1
- package/dist/os/adr/handlers/validate.js +1 -1
- package/dist/os/adr/handlers/validate.js.map +1 -1
- package/dist/os/audit/audit.module.js +3 -3
- package/dist/os/audit/audit.module.js.map +1 -1
- package/dist/os/audit/frontmatter-io.js +5 -5
- package/dist/os/audit/frontmatter-io.js.map +1 -1
- package/dist/os/audit/handlers/archive.d.ts.map +1 -1
- package/dist/os/audit/handlers/archive.js +10 -4
- package/dist/os/audit/handlers/archive.js.map +1 -1
- package/dist/os/compass/compass.module.d.ts.map +1 -1
- package/dist/os/compass/compass.module.js +17 -1
- package/dist/os/compass/compass.module.js.map +1 -1
- package/dist/os/compass/handlers/compass-audit-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-audit-handler.js +12 -5
- package/dist/os/compass/handlers/compass-audit-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.js +3 -2
- package/dist/os/compass/handlers/compass-change-summary-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-inventory-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory-handler.js +6 -4
- package/dist/os/compass/handlers/compass-inventory-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-inventory.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory.js +10 -8
- package/dist/os/compass/handlers/compass-inventory.js.map +1 -1
- package/dist/os/compass/handlers/compass-migrate-handler.js +1 -1
- package/dist/os/compass/handlers/compass-migrate-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-migrate.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-migrate.js +6 -3
- package/dist/os/compass/handlers/compass-migrate.js.map +1 -1
- package/dist/os/compass/handlers/git-revision.d.ts.map +1 -1
- package/dist/os/compass/handlers/git-revision.js +9 -6
- package/dist/os/compass/handlers/git-revision.js.map +1 -1
- package/dist/os/compass/handlers/resolve-scan-root.js +1 -1
- package/dist/os/compass/handlers/resolve-scan-root.js.map +1 -1
- package/dist/os/compass/handlers/summary-record.d.ts.map +1 -1
- package/dist/os/compass/handlers/summary-record.js +8 -4
- package/dist/os/compass/handlers/summary-record.js.map +1 -1
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +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 +22 -19
- package/dist/os/mission/handlers/archive.js.map +1 -1
- package/dist/os/mission/mission.module.js +3 -3
- package/dist/os/mission/mission.module.js.map +1 -1
- package/dist/os/naming/naming-convention.d.ts.map +1 -1
- package/dist/os/naming/naming-convention.js +7 -3
- package/dist/os/naming/naming-convention.js.map +1 -1
- package/dist/os/naming/naming.module.d.ts.map +1 -1
- package/dist/os/naming/naming.module.js +4 -3
- package/dist/os/naming/naming.module.js.map +1 -1
- package/dist/os/notes/notes.module.d.ts.map +1 -1
- package/dist/os/notes/notes.module.js +6 -3
- package/dist/os/notes/notes.module.js.map +1 -1
- package/dist/os/plan/frontmatter-io.js +5 -5
- package/dist/os/plan/frontmatter-io.js.map +1 -1
- package/dist/os/plan/handlers/archive.d.ts.map +1 -1
- package/dist/os/plan/handlers/archive.js +10 -4
- package/dist/os/plan/handlers/archive.js.map +1 -1
- package/dist/os/plan/plan.module.js +3 -3
- package/dist/os/plan/plan.module.js.map +1 -1
- package/dist/os/plugin/plugin.module.d.ts.map +1 -1
- package/dist/os/plugin/plugin.module.js +6 -3
- package/dist/os/plugin/plugin.module.js.map +1 -1
- package/dist/os/program/discovery.js +2 -2
- package/dist/os/program/discovery.js.map +1 -1
- package/dist/os/program/handlers/complete.js +1 -1
- package/dist/os/program/handlers/complete.js.map +1 -1
- package/dist/os/program/handlers/lease.js +1 -1
- package/dist/os/program/handlers/lease.js.map +1 -1
- package/dist/os/program/handlers/seal.js +1 -1
- package/dist/os/program/handlers/seal.js.map +1 -1
- package/dist/os/program/lease.js +1 -1
- package/dist/os/program/lease.js.map +1 -1
- package/dist/os/program/program.module.d.ts.map +1 -1
- package/dist/os/program/program.module.js +9 -3
- package/dist/os/program/program.module.js.map +1 -1
- package/dist/os/queue/index.js +1 -1
- package/dist/os/queue/manifest.d.ts.map +1 -1
- package/dist/os/queue/manifest.js +4 -8
- package/dist/os/queue/manifest.js.map +1 -1
- package/dist/os/rfc/acceptance.d.ts.map +1 -1
- package/dist/os/rfc/acceptance.js +10 -6
- package/dist/os/rfc/acceptance.js.map +1 -1
- package/dist/os/rfc/decision-log.d.ts.map +1 -1
- package/dist/os/rfc/decision-log.js +4 -3
- package/dist/os/rfc/decision-log.js.map +1 -1
- package/dist/os/rfc/dna-trace.d.ts.map +1 -1
- package/dist/os/rfc/dna-trace.js +7 -2
- package/dist/os/rfc/dna-trace.js.map +1 -1
- package/dist/os/rfc/frontmatter-io.js +5 -5
- package/dist/os/rfc/frontmatter-io.js.map +1 -1
- package/dist/os/rfc/handlers/archive.d.ts.map +1 -1
- package/dist/os/rfc/handlers/archive.js +11 -5
- package/dist/os/rfc/handlers/archive.js.map +1 -1
- package/dist/os/rfc/handlers/check.d.ts.map +1 -1
- package/dist/os/rfc/handlers/check.js +6 -3
- package/dist/os/rfc/handlers/check.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +11 -10
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/index-graph.js +3 -3
- package/dist/os/rfc/handlers/index-graph.js.map +1 -1
- package/dist/os/rfc/handlers/lifecycle.d.ts.map +1 -1
- package/dist/os/rfc/handlers/lifecycle.js +6 -2
- package/dist/os/rfc/handlers/lifecycle.js.map +1 -1
- package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
- package/dist/os/rfc/handlers/list-create.js +7 -6
- package/dist/os/rfc/handlers/list-create.js.map +1 -1
- package/dist/os/rfc/handlers/shared.js +3 -3
- package/dist/os/rfc/handlers/shared.js.map +1 -1
- package/dist/os/rfc/handlers/supersede-propose.d.ts.map +1 -1
- package/dist/os/rfc/handlers/supersede-propose.js +7 -3
- package/dist/os/rfc/handlers/supersede-propose.js.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +8 -5
- package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +44 -4
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
- package/dist/os/rfc/verification-evidence.js +9 -5
- package/dist/os/rfc/verification-evidence.js.map +1 -1
- package/dist/os/rfc/verification-refresh.d.ts.map +1 -1
- package/dist/os/rfc/verification-refresh.js +4 -3
- package/dist/os/rfc/verification-refresh.js.map +1 -1
- package/dist/os/session/frontmatter-io.js +12 -12
- package/dist/os/session/frontmatter-io.js.map +1 -1
- package/dist/os/session/handlers/archive.d.ts.map +1 -1
- package/dist/os/session/handlers/archive.js +10 -4
- package/dist/os/session/handlers/archive.js.map +1 -1
- package/dist/os/session/handlers/metrics-aggregate.d.ts.map +1 -1
- package/dist/os/session/handlers/metrics-aggregate.js +9 -5
- package/dist/os/session/handlers/metrics-aggregate.js.map +1 -1
- package/dist/os/session/handlers/metrics-rfc.d.ts.map +1 -1
- package/dist/os/session/handlers/metrics-rfc.js +11 -8
- package/dist/os/session/handlers/metrics-rfc.js.map +1 -1
- package/dist/os/session/handlers/metrics-session.d.ts.map +1 -1
- package/dist/os/session/handlers/metrics-session.js +6 -3
- package/dist/os/session/handlers/metrics-session.js.map +1 -1
- package/dist/os/session/handlers/save.d.ts.map +1 -1
- package/dist/os/session/handlers/save.js +14 -8
- package/dist/os/session/handlers/save.js.map +1 -1
- package/dist/os/session/session.module.d.ts.map +1 -1
- package/dist/os/session/session.module.js +6 -0
- package/dist/os/session/session.module.js.map +1 -1
- package/dist/os/spec/live-spec-list.js +4 -4
- package/dist/os/spec/live-spec-list.js.map +1 -1
- package/dist/os/spec/live-spec-merge.js +5 -5
- package/dist/os/spec/live-spec-merge.js.map +1 -1
- package/dist/os/spec/live-spec-show.js +3 -3
- package/dist/os/spec/live-spec-show.js.map +1 -1
- package/dist/os/spec/live-spec-validate.js +4 -4
- package/dist/os/spec/live-spec-validate.js.map +1 -1
- package/dist/os/spec/spec-materialize.js +9 -9
- package/dist/os/spec/spec-materialize.js.map +1 -1
- package/dist/os/spec/spec-status.js +9 -9
- package/dist/os/spec/spec-status.js.map +1 -1
- package/dist/os/spec/spec-validate.js +7 -7
- package/dist/os/spec/spec-validate.js.map +1 -1
- package/dist/os/spec/spec.module.d.ts.map +1 -1
- package/dist/os/spec/spec.module.js +8 -0
- package/dist/os/spec/spec.module.js.map +1 -1
- package/dist/os/werkstatt/handlers/lock.js +16 -16
- package/dist/os/werkstatt/handlers/lock.js.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +3 -3
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js +3 -2
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js.map +1 -1
- package/dist/os/werkstatt/werkstatt.module.d.ts.map +1 -1
- package/dist/os/werkstatt/werkstatt.module.js +6 -2
- package/dist/os/werkstatt/werkstatt.module.js.map +1 -1
- package/dist/os/workflow/handlers.d.ts.map +1 -1
- package/dist/os/workflow/handlers.js +8 -5
- package/dist/os/workflow/handlers.js.map +1 -1
- package/dist/os/workflow/workflow.module.d.ts.map +1 -1
- package/dist/os/workflow/workflow.module.js +6 -3
- package/dist/os/workflow/workflow.module.js.map +1 -1
- package/dist/src/compass/contract-registry.js +1 -1
- package/dist/src/compass/contract-registry.js.map +1 -1
- package/dist/src/config/forge-config.d.ts +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 +60 -31
- 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 -9
- package/os/adr/handlers/list-create.ts +5 -5
- package/os/adr/handlers/validate.ts +1 -1
- package/os/audit/audit.module.ts +33 -34
- package/os/audit/frontmatter-io.ts +5 -5
- package/os/audit/handlers/archive.ts +8 -4
- package/os/compass/compass.module.ts +17 -1
- package/os/compass/handlers/compass-audit-handler.ts +13 -5
- package/os/compass/handlers/compass-change-summary-handler.ts +4 -2
- package/os/compass/handlers/compass-inventory-handler.ts +7 -4
- package/os/compass/handlers/compass-inventory.ts +11 -8
- package/os/compass/handlers/compass-migrate-handler.ts +1 -1
- package/os/compass/handlers/compass-migrate.ts +7 -3
- package/os/compass/handlers/git-revision.ts +11 -6
- package/os/compass/handlers/resolve-scan-root.ts +1 -1
- package/os/compass/handlers/summary-record.ts +10 -4
- package/os/compass/handlers/tests/compass-audit-plan.test.ts +2 -1
- package/os/core/core.module.ts +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.ts +27 -19
- package/os/mission/mission.module.ts +38 -39
- package/os/naming/naming-convention.ts +9 -3
- package/os/naming/naming.module.ts +25 -25
- package/os/notes/notes.module.ts +87 -85
- package/os/plan/frontmatter-io.ts +5 -5
- package/os/plan/handlers/archive.ts +8 -4
- package/os/plan/plan.module.ts +33 -34
- package/os/plugin/plugin.module.ts +8 -6
- package/os/program/discovery.ts +2 -2
- package/os/program/handlers/complete.ts +1 -1
- package/os/program/handlers/lease.ts +1 -1
- package/os/program/handlers/seal.ts +1 -1
- package/os/program/lease.ts +1 -1
- package/os/program/program.module.ts +198 -193
- package/os/queue/index.ts +1 -1
- package/os/queue/manifest.ts +10 -9
- package/os/queue/queue-validate.test.ts +6 -15
- package/os/rfc/acceptance.ts +12 -6
- package/os/rfc/decision-log.ts +4 -3
- package/os/rfc/dna-trace.ts +8 -2
- package/os/rfc/frontmatter-io.ts +5 -5
- package/os/rfc/handlers/archive.ts +9 -5
- package/os/rfc/handlers/check.ts +5 -3
- package/os/rfc/handlers/implement-stamp.ts +15 -10
- package/os/rfc/handlers/index-graph.ts +3 -3
- package/os/rfc/handlers/lifecycle.ts +7 -2
- package/os/rfc/handlers/list-create.ts +7 -6
- package/os/rfc/handlers/shared.ts +3 -3
- package/os/rfc/handlers/supersede-propose.ts +8 -3
- package/os/rfc/handlers/validate-rules-rfc1006.test.ts +18 -6
- package/os/rfc/handlers/validate-rules.ts +10 -5
- package/os/rfc/rfc-create-concurrent.test.ts +11 -3
- package/os/rfc/rfc.module.ts +413 -374
- package/os/rfc/verification-evidence.ts +11 -5
- package/os/rfc/verification-refresh.ts +4 -3
- package/os/session/frontmatter-io.ts +14 -14
- package/os/session/handlers/archive.ts +8 -4
- package/os/session/handlers/metrics-aggregate.ts +34 -13
- package/os/session/handlers/metrics-rfc.ts +13 -8
- package/os/session/handlers/metrics-session.ts +7 -3
- package/os/session/handlers/save.ts +12 -8
- package/os/session/session.module.ts +6 -0
- package/os/spec/live-spec-list.ts +4 -4
- package/os/spec/live-spec-merge.ts +5 -5
- package/os/spec/live-spec-show.ts +3 -3
- package/os/spec/live-spec-validate.ts +4 -4
- package/os/spec/spec-materialize.ts +9 -9
- package/os/spec/spec-status.ts +9 -9
- package/os/spec/spec-validate.ts +7 -7
- package/os/spec/spec.module.ts +8 -0
- package/os/werkstatt/handlers/lock.ts +16 -16
- package/os/werkstatt/handlers/werkstatt-lock-recover.ts +3 -3
- package/os/werkstatt/handlers/werkstatt-operation-validate.ts +4 -2
- package/os/werkstatt/werkstatt.module.ts +8 -5
- package/os/workflow/handlers.ts +7 -5
- package/os/workflow/workflow.module.ts +45 -44
- package/package.json +1 -1
- package/skills/fo/fo-add-tests/SKILL.md +2 -2
- package/skills/fo/fo-architecture/SKILL.md +2 -2
- package/skills/fo/fo-compass-annotate/SKILL.md +2 -2
- package/skills/fo/fo-design-summit/SKILL.md +2 -2
- package/skills/fo/fo-doc-audit/SKILL.md +2 -2
- package/skills/fo/fo-explore/SKILL.md +2 -2
- package/skills/fo/fo-extract-dna/SKILL.md +2 -2
- package/skills/fo/fo-fix/SKILL.md +2 -2
- package/skills/fo/fo-handoff/SKILL.md +2 -2
- package/skills/fo/fo-harvest/SKILL.md +2 -2
- package/skills/fo/fo-idea/SKILL.md +2 -2
- package/skills/fo/fo-idea-audit/SKILL.md +2 -2
- package/skills/fo/fo-idea-create-adr/SKILL.md +3 -3
- package/skills/fo/fo-idea-create-rfc/SKILL.md +3 -3
- package/skills/fo/fo-idea-enhance/SKILL.md +2 -2
- package/skills/fo/fo-idea-i-just-want-to-see-the-plan/SKILL.md +2 -2
- package/skills/fo/fo-idea-i-just-want-to-see-the-result/SKILL.md +1 -1
- package/skills/fo/fo-idea-implement/SKILL.md +2 -2
- package/skills/fo/fo-idea-plan/SKILL.md +2 -2
- package/skills/fo/fo-idea-status/SKILL.md +2 -2
- package/skills/fo/fo-knowledge-distill/SKILL.md +2 -2
- package/skills/fo/fo-memory-sync/SKILL.md +2 -2
- package/skills/fo/fo-qa/SKILL.md +2 -2
- package/skills/fo/fo-review/SKILL.md +2 -2
- package/skills/fo/fo-session-retro/SKILL.md +2 -2
- package/skills/fo/fo-session-save/SKILL.md +2 -2
- package/skills/fo/fo-spec-ingest/SKILL.md +2 -2
- package/skills/fo/fo-step-commit/SKILL.md +1 -1
- package/skills/fo/fo-triage/SKILL.md +2 -2
- package/skills/meta/forge-bootstrap/SKILL.md +1 -1
- package/skills/meta/port-to-forge/SKILL.md +1 -1
- package/skills/meta/skill-create/SKILL.md +1 -1
- package/skills/shared/grilling/SKILL.md +1 -1
- package/skills/shared/grilling/learned-principles.archive.md +17 -0
- package/skills/shared/grilling/learned-principles.md +0 -1
- package/skills/shared/knowledge/learned-principles.md +6 -0
- package/skills/shared/my-preferences/SKILL.md +1 -1
- package/skills/shared/windows-ai-tooling/SKILL.md +1 -1
- package/skills/shared/writing-great-skills/SKILL.md +1 -1
- package/src/compass/contract-registry.ts +1 -1
- package/src/config/forge-config.ts +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 +74 -33
- 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 +6 -4
- 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 +54 -54
- 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/os/adr/adr.module.ts
CHANGED
|
@@ -9,154 +9,158 @@
|
|
|
9
9
|
<item>RFC-0366: register adr.create, adr.validate, and adr.list commands.</item>
|
|
10
10
|
<item>RFC-0521: migrated from packages/os/site-kernel/src/adr/ to packages/forge/os/adr/ as forgeAdrModule.</item>
|
|
11
11
|
<item>RFC-0727: register adr.implement.stamp command for atomic ADR status transition.</item>
|
|
12
|
+
<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>
|
|
12
13
|
</CHANGE_SUMMARY>
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
16
|
import type { ForgeModule } from "../../src/forge-module.ts";
|
|
16
17
|
|
|
17
18
|
export async function createForgeAdrModule(): Promise<ForgeModule> {
|
|
18
|
-
const { runAdrList, runAdrCreate } = await import("./handlers/list-create.ts");
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const { runAdrList, runAdrCreate } = await import("./handlers/list-create.ts");
|
|
20
|
+
const { runAdrValidate } = await import("./handlers/validate.ts");
|
|
21
|
+
const { runAdrArchive } = await import("./handlers/archive.ts");
|
|
22
|
+
const { runAdrImplementStamp } = await import("./handlers/implement-stamp.ts");
|
|
22
23
|
return {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
name: "forge-adr",
|
|
25
|
+
version: "0.1.0",
|
|
26
|
+
runtime: "autonomous",
|
|
26
27
|
|
|
27
28
|
declarations: [],
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
commands: [
|
|
30
|
+
{
|
|
31
|
+
name: "adr.list",
|
|
32
|
+
mutatesState: false,
|
|
33
|
+
description:
|
|
34
|
+
"List all ADRs. Filter with --status, --scope, --decider flags. " +
|
|
35
|
+
"Use --json for machine-readable output. " +
|
|
36
|
+
"Parses frontmatter on the fly — no index file needed.",
|
|
37
|
+
scope: "workspace",
|
|
38
|
+
flags: {
|
|
39
|
+
status: {
|
|
40
|
+
kind: "string",
|
|
41
|
+
description: "Filter by ADR status (e.g. proposed, accepted, superseded).",
|
|
42
|
+
},
|
|
43
|
+
scope: {
|
|
44
|
+
kind: "string",
|
|
45
|
+
description: "Filter by ADR scope (package, app, workspace).",
|
|
46
|
+
},
|
|
47
|
+
decider: { kind: "string", description: "Filter by decider string." },
|
|
40
48
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
description: "Filter by ADR scope (package, app, workspace).",
|
|
44
|
-
},
|
|
45
|
-
decider: { kind: "string", description: "Filter by decider string." },
|
|
49
|
+
reads: ["docs/adrs/**/*.md"],
|
|
50
|
+
execute: runAdrList,
|
|
46
51
|
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
52
|
+
{
|
|
53
|
+
name: "adr.create",
|
|
54
|
+
description:
|
|
55
|
+
"Create a new ADR draft from the template. " +
|
|
56
|
+
'Pass --title "Short title" (required). ' +
|
|
57
|
+
"Optional: --scope, --decider, --status, --related. " +
|
|
58
|
+
"Always creates status: proposed unless overridden. " +
|
|
59
|
+
"AI agents are allowed to use this command.",
|
|
60
|
+
scope: "workspace",
|
|
61
|
+
mutatesState: true,
|
|
62
|
+
writes: ["docs/adrs/adr-*.md"],
|
|
63
|
+
generates: [],
|
|
64
|
+
reads: ["docs/adrs/**/*.md"],
|
|
65
|
+
cacheable: false,
|
|
66
|
+
flags: {
|
|
67
|
+
title: { kind: "string", required: true, description: "Short imperative ADR title." },
|
|
68
|
+
scope: {
|
|
69
|
+
kind: "string",
|
|
70
|
+
default: "package",
|
|
71
|
+
description: "ADR scope: package | app | workspace.",
|
|
72
|
+
},
|
|
73
|
+
decider: {
|
|
74
|
+
kind: "string",
|
|
75
|
+
default: "architecture",
|
|
76
|
+
description: "ADR decider, e.g. architecture or human:<handle>.",
|
|
77
|
+
},
|
|
78
|
+
status: {
|
|
79
|
+
kind: "string",
|
|
80
|
+
default: "proposed",
|
|
81
|
+
description: "ADR status: proposed | accepted | superseded | rejected.",
|
|
82
|
+
},
|
|
83
|
+
related: {
|
|
84
|
+
kind: "string",
|
|
85
|
+
description: "Comma-separated list of related RFC/ADR ids (e.g. RFC-0365,RFC-0001).",
|
|
86
|
+
},
|
|
79
87
|
},
|
|
80
|
-
|
|
81
|
-
kind: "string",
|
|
82
|
-
description: "Comma-separated list of related RFC/ADR ids (e.g. RFC-0365,RFC-0001).",
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
execute: runAdrCreate,
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: "adr.validate",
|
|
89
|
-
contract: "adr",
|
|
90
|
-
rules: [],
|
|
91
|
-
description:
|
|
92
|
-
"Validate ADR frontmatter schema, required markdown sections, " +
|
|
93
|
-
"referential integrity (supersedes/supersededBy), and id/filename consistency. " +
|
|
94
|
-
"Pass --id to validate a single file, or run without arguments for all.",
|
|
95
|
-
scope: "workspace",
|
|
96
|
-
flags: {
|
|
97
|
-
id: { kind: "string", description: "Target a single ADR by id (e.g. ADR-0003)." },
|
|
88
|
+
execute: runAdrCreate,
|
|
98
89
|
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
mutatesState: true,
|
|
112
|
-
writes: ["docs/adrs/*.md", "docs/adrs/archive/**"],
|
|
113
|
-
reads: ["docs/adrs/**/*.md"],
|
|
114
|
-
cacheable: false,
|
|
115
|
-
flags: {
|
|
116
|
-
"dry-run": {
|
|
117
|
-
kind: "boolean",
|
|
118
|
-
description: "Preview what would be moved without touching the filesystem.",
|
|
119
|
-
},
|
|
120
|
-
status: {
|
|
121
|
-
kind: "string",
|
|
122
|
-
description: "Filter to a single terminal status (implemented, rejected, superseded).",
|
|
90
|
+
{
|
|
91
|
+
name: "adr.validate",
|
|
92
|
+
mutatesState: false,
|
|
93
|
+
contract: "adr",
|
|
94
|
+
rules: [],
|
|
95
|
+
description:
|
|
96
|
+
"Validate ADR frontmatter schema, required markdown sections, " +
|
|
97
|
+
"referential integrity (supersedes/supersededBy), and id/filename consistency. " +
|
|
98
|
+
"Pass --id to validate a single file, or run without arguments for all.",
|
|
99
|
+
scope: "workspace",
|
|
100
|
+
flags: {
|
|
101
|
+
id: { kind: "string", description: "Target a single ADR by id (e.g. ADR-0003)." },
|
|
123
102
|
},
|
|
103
|
+
reads: ["docs/adrs/**/*.md"],
|
|
104
|
+
execute: runAdrValidate,
|
|
124
105
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
description: "SHA of the implementation commit.",
|
|
106
|
+
{
|
|
107
|
+
name: "adr.archive",
|
|
108
|
+
description:
|
|
109
|
+
"Move terminal-status ADR files (implemented, rejected, superseded) into " +
|
|
110
|
+
"docs/adrs/archive/<status>/ subdirectories. Bidirectional: moves non-terminal " +
|
|
111
|
+
"files found in subdirectories back to root. Use --dry-run to preview. " +
|
|
112
|
+
"Use --status to filter to a single terminal status. " +
|
|
113
|
+
"Prefer the docs.archive umbrella command unless you need to archive only ADRs.",
|
|
114
|
+
scope: "workspace",
|
|
115
|
+
mutatesState: true,
|
|
116
|
+
writes: ["docs/adrs/*.md", "docs/adrs/archive/**"],
|
|
117
|
+
generates: [],
|
|
118
|
+
reads: ["docs/adrs/**/*.md"],
|
|
119
|
+
cacheable: false,
|
|
120
|
+
flags: {
|
|
121
|
+
"dry-run": {
|
|
122
|
+
kind: "boolean",
|
|
123
|
+
description: "Preview what would be moved without touching the filesystem.",
|
|
124
|
+
},
|
|
125
|
+
status: {
|
|
126
|
+
kind: "string",
|
|
127
|
+
description: "Filter to a single terminal status (implemented, rejected, superseded).",
|
|
128
|
+
},
|
|
149
129
|
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
130
|
+
execute: runAdrArchive,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: "adr.implement.stamp",
|
|
134
|
+
description:
|
|
135
|
+
"Atomically transition an ADR from accepted/proposed to implemented. " +
|
|
136
|
+
"Validates preconditions (status, implementation commit, file cleanliness, " +
|
|
137
|
+
"concurrent safety) and mutates frontmatter in one atomic write. " +
|
|
138
|
+
"Use --dry-run to preview without mutating. Required flags: `--id`, `--implementation-commit`.",
|
|
139
|
+
scope: "workspace",
|
|
140
|
+
mutatesState: true,
|
|
141
|
+
writes: ["docs/adrs/*.md"],
|
|
142
|
+
generates: [],
|
|
143
|
+
reads: ["docs/adrs/**/*.md"],
|
|
144
|
+
cacheable: false,
|
|
145
|
+
flags: {
|
|
146
|
+
id: {
|
|
147
|
+
kind: "string",
|
|
148
|
+
required: true,
|
|
149
|
+
description: "Target ADR id (e.g. ADR-0003).",
|
|
150
|
+
},
|
|
151
|
+
"implementation-commit": {
|
|
152
|
+
kind: "string",
|
|
153
|
+
required: true,
|
|
154
|
+
description: "SHA of the implementation commit.",
|
|
155
|
+
},
|
|
156
|
+
"dry-run": {
|
|
157
|
+
kind: "boolean",
|
|
158
|
+
description: "Preview without mutating the ADR file.",
|
|
159
|
+
},
|
|
153
160
|
},
|
|
161
|
+
execute: runAdrImplementStamp,
|
|
154
162
|
},
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
pipelines: [
|
|
159
|
-
|
|
160
|
-
]};
|
|
163
|
+
],
|
|
164
|
+
pipelines: [],
|
|
165
|
+
};
|
|
161
166
|
}
|
|
162
|
-
;
|
package/os/adr/frontmatter-io.ts
CHANGED
|
@@ -14,7 +14,7 @@ without validating the shape.
|
|
|
14
14
|
</CHANGE_SUMMARY>
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import fs from "
|
|
17
|
+
import { ambientIo as fs } from "../../src/utils/io.ts";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import YAML from "yaml";
|
|
20
20
|
|
|
@@ -39,13 +39,13 @@ export async function listAdrFiles(adrDirPath: string): Promise<string[]> {
|
|
|
39
39
|
|
|
40
40
|
async function scanDir(dirPath: string, relativePrefix: string): Promise<void> {
|
|
41
41
|
try {
|
|
42
|
-
const entries = await fs.readdir(dirPath
|
|
42
|
+
const entries = await fs.readdir(dirPath);
|
|
43
43
|
for (const entry of entries) {
|
|
44
44
|
const relativePath = relativePrefix ? `${relativePrefix}/${entry.name}` : entry.name;
|
|
45
|
-
if (entry.isDirectory
|
|
45
|
+
if (entry.isDirectory) {
|
|
46
46
|
await scanDir(path.join(dirPath, entry.name), relativePath);
|
|
47
47
|
} else if (
|
|
48
|
-
entry.isFile
|
|
48
|
+
entry.isFile &&
|
|
49
49
|
entry.name.endsWith(".md") &&
|
|
50
50
|
!entry.name.startsWith("adr-0000") &&
|
|
51
51
|
entry.name !== "README.md"
|
|
@@ -72,7 +72,7 @@ export async function readAndParseAdr(
|
|
|
72
72
|
): Promise<{ fileName: string; parsed: ParsedAdr } | undefined> {
|
|
73
73
|
try {
|
|
74
74
|
const filePath = path.join(adrDirPath, fileName);
|
|
75
|
-
const content = await fs.readFile(filePath
|
|
75
|
+
const content = await fs.readFile(filePath);
|
|
76
76
|
return { fileName, parsed: parseAdrFile(content) };
|
|
77
77
|
} catch {
|
|
78
78
|
return undefined;
|
|
@@ -17,7 +17,7 @@ in subdirectories back to the root.
|
|
|
17
17
|
</CHANGE_SUMMARY>
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import fs from "
|
|
20
|
+
import { ambientIo as fs } from "../../../src/utils/io.ts";
|
|
21
21
|
import path from "node:path";
|
|
22
22
|
import { listAdrFiles, readAndParseAdr } from "../frontmatter-io.ts";
|
|
23
23
|
import type {
|
|
@@ -129,7 +129,9 @@ export async function runAdrArchive(
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
try {
|
|
132
|
-
await fs.
|
|
132
|
+
await fs.exists(targetPath).then((ok) => {
|
|
133
|
+
if (!ok) throw Object.assign(new Error("ENOENT"), { code: "ENOENT" });
|
|
134
|
+
});
|
|
133
135
|
skipped.push({ id, file: relFile, reason: "destination exists" });
|
|
134
136
|
continue;
|
|
135
137
|
} catch {
|
|
@@ -137,7 +139,7 @@ export async function runAdrArchive(
|
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
if (!dryRun) {
|
|
140
|
-
await fs.mkdir(targetDir
|
|
142
|
+
await fs.mkdir(targetDir);
|
|
141
143
|
try {
|
|
142
144
|
await fs.rename(path.join(adrDirPath, fileName), targetPath);
|
|
143
145
|
} catch (err) {
|
|
@@ -176,7 +178,9 @@ export async function runAdrArchive(
|
|
|
176
178
|
}
|
|
177
179
|
|
|
178
180
|
try {
|
|
179
|
-
await fs.
|
|
181
|
+
await fs.exists(targetPath).then((ok) => {
|
|
182
|
+
if (!ok) throw Object.assign(new Error("ENOENT"), { code: "ENOENT" });
|
|
183
|
+
});
|
|
180
184
|
skipped.push({ id, file: relFile, reason: "destination exists" });
|
|
181
185
|
continue;
|
|
182
186
|
} catch {
|
|
@@ -17,8 +17,9 @@ and atomically mutates ADR frontmatter.
|
|
|
17
17
|
</CHANGE_SUMMARY>
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { execFile } from "
|
|
21
|
-
import {
|
|
20
|
+
import { execFile, writeFileSync } from "../../../src/utils/sync-fs.ts";
|
|
21
|
+
import { ambientIo, resolveIo } from "../../../src/utils/io.ts";
|
|
22
|
+
|
|
22
23
|
import { join, dirname } from "node:path";
|
|
23
24
|
|
|
24
25
|
import { writeFileAtomic } from "../../../src/utils/fs-atomic.ts";
|
|
@@ -27,6 +28,10 @@ import { listAdrFiles, readAndParseAdr, adrFileMatchesId } from "../frontmatter-
|
|
|
27
28
|
import { evaluateAcceptanceCriteria } from "../../rfc/handlers/validate-rules.ts";
|
|
28
29
|
import { ADR_DIR, ADR_ACCEPTANCE_CRITERIA_CUTOFF } from "../types.ts";
|
|
29
30
|
import type { AdrStatus, AdrImplementStampViolation, AdrImplementStampResult } from "../types.ts";
|
|
31
|
+
|
|
32
|
+
// Ambient default for helper fns without a context param — handlers override
|
|
33
|
+
// with `const io = resolveIo(context.io)` inside their own scope.
|
|
34
|
+
const io = ambientIo;
|
|
30
35
|
import type {
|
|
31
36
|
ForgeCommandInput,
|
|
32
37
|
ForgeCommandResult,
|
|
@@ -98,15 +103,14 @@ async function acquireAdrLock(
|
|
|
98
103
|
): Promise<{ acquired: boolean; lockPath: string }> {
|
|
99
104
|
const lockPath = lockFilePath(workspaceRoot, adrId);
|
|
100
105
|
const lockDir = dirname(lockPath);
|
|
101
|
-
await mkdir(lockDir
|
|
106
|
+
await io.mkdir(lockDir);
|
|
102
107
|
|
|
103
|
-
const { open } = await import("node:fs/promises");
|
|
104
108
|
try {
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
writeFileSync(
|
|
110
|
+
lockPath,
|
|
107
111
|
JSON.stringify({ pid: process.pid, acquiredAt: new Date().toISOString() }),
|
|
112
|
+
{ flag: "wx" },
|
|
108
113
|
);
|
|
109
|
-
await handle.close();
|
|
110
114
|
return { acquired: true, lockPath };
|
|
111
115
|
} catch {
|
|
112
116
|
return { acquired: false, lockPath };
|
|
@@ -115,7 +119,7 @@ async function acquireAdrLock(
|
|
|
115
119
|
|
|
116
120
|
async function releaseAdrLock(lockPath: string): Promise<void> {
|
|
117
121
|
try {
|
|
118
|
-
await
|
|
122
|
+
await io.rm(lockPath);
|
|
119
123
|
} catch {
|
|
120
124
|
// Lock file already removed — safe
|
|
121
125
|
}
|
|
@@ -157,6 +161,7 @@ export async function runAdrImplementStamp(
|
|
|
157
161
|
input: ForgeCommandInput,
|
|
158
162
|
context: ForgeRuntimeContext,
|
|
159
163
|
): Promise<ForgeCommandResult<AdrImplementStampResult>> {
|
|
164
|
+
const io = resolveIo(context.io);
|
|
160
165
|
const { workspaceRoot, logger, outputFormat, dryRun } = context;
|
|
161
166
|
const adrDirPath = join(workspaceRoot, ADR_DIR);
|
|
162
167
|
|
|
@@ -276,7 +281,7 @@ export async function runAdrImplementStamp(
|
|
|
276
281
|
try {
|
|
277
282
|
// ── Atomic mutation ──────────────────────────────────────────────────────
|
|
278
283
|
const adrFilePath = join(adrDirPath, targetFile);
|
|
279
|
-
const adrSource = await readFile(adrFilePath
|
|
284
|
+
const adrSource = await io.readFile(adrFilePath);
|
|
280
285
|
|
|
281
286
|
const today = toIsoDate(new Date());
|
|
282
287
|
const stampedAt = new Date().toISOString();
|
|
@@ -14,8 +14,8 @@ Sweep batch 2: real KEY_DECISIONS on 10 files, expanded purposes (CONTRACT-02/PU
|
|
|
14
14
|
</CHANGE_SUMMARY>
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import fs from "
|
|
18
|
-
import { existsSync } from "
|
|
17
|
+
import { ambientIo as fs } from "../../../src/utils/io.ts";
|
|
18
|
+
import { existsSync } from "../../../src/utils/sync-fs.ts";
|
|
19
19
|
import path from "node:path";
|
|
20
20
|
import { fileURLToPath } from "node:url";
|
|
21
21
|
import { toKebabCase } from "../../../src/utils/string-utils.ts";
|
|
@@ -152,7 +152,7 @@ export async function runAdrCreate(
|
|
|
152
152
|
const templatePath = resolveAdrTemplate(workspaceRoot);
|
|
153
153
|
let templateContent: string;
|
|
154
154
|
try {
|
|
155
|
-
templateContent = await fs.readFile(templatePath
|
|
155
|
+
templateContent = await fs.readFile(templatePath);
|
|
156
156
|
} catch {
|
|
157
157
|
throw new Error(
|
|
158
158
|
`ADR template not found at ${templatePath}. Ensure docs/adrs/ contains the template.`,
|
|
@@ -190,13 +190,13 @@ export async function runAdrCreate(
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
try {
|
|
193
|
-
await fs.mkdir(adrDirPath
|
|
193
|
+
await fs.mkdir(adrDirPath);
|
|
194
194
|
} catch {
|
|
195
195
|
// ignore
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
const targetPath = path.join(adrDirPath, fileName);
|
|
199
|
-
await fs.writeFile(targetPath, content
|
|
199
|
+
await fs.writeFile(targetPath, content);
|
|
200
200
|
|
|
201
201
|
const relativeFile = path.join(ADR_DIR, fileName);
|
|
202
202
|
|
|
@@ -19,7 +19,7 @@ Sweep batch 4: 73 Compass headers on headerless engine files (certification, com
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
import path from "node:path";
|
|
22
|
-
import { execFile } from "
|
|
22
|
+
import { execFile } from "../../../src/utils/sync-fs.ts";
|
|
23
23
|
import {
|
|
24
24
|
listAdrFiles,
|
|
25
25
|
readAndParseAdr,
|
package/os/audit/audit.module.ts
CHANGED
|
@@ -13,42 +13,41 @@
|
|
|
13
13
|
import type { ForgeModule } from "../../src/forge-module.ts";
|
|
14
14
|
|
|
15
15
|
export async function createForgeAuditModule(): Promise<ForgeModule> {
|
|
16
|
-
const { runAuditArchive } = await import("./handlers/archive.ts");
|
|
16
|
+
const { runAuditArchive } = await import("./handlers/archive.ts");
|
|
17
17
|
return {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
name: "forge-audit",
|
|
19
|
+
version: "0.1.0",
|
|
20
|
+
runtime: "autonomous",
|
|
21
21
|
declarations: [],
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
22
|
+
commands: [
|
|
23
|
+
{
|
|
24
|
+
name: "audit.archive",
|
|
25
|
+
description:
|
|
26
|
+
"Move audit files whose parent RFC has terminal status " +
|
|
27
|
+
"(implemented, rejected, superseded) into docs/audits/archive/<status>/ " +
|
|
28
|
+
"subdirectories. Bidirectional: moves non-terminal files found in " +
|
|
29
|
+
"subdirectories back to root. Use --dry-run to preview. " +
|
|
30
|
+
"Use --status to filter to a single terminal status. " +
|
|
31
|
+
"Prefer the docs.archive umbrella command unless you need to archive only audits.",
|
|
32
|
+
scope: "workspace",
|
|
33
|
+
mutatesState: true,
|
|
34
|
+
writes: ["docs/audits/*.md", "docs/audits/archive/**"],
|
|
35
|
+
generates: [],
|
|
36
|
+
reads: ["docs/audits/**/*.md", "docs/rfcs/**/*.md"],
|
|
37
|
+
cacheable: false,
|
|
38
|
+
flags: {
|
|
39
|
+
"dry-run": {
|
|
40
|
+
kind: "boolean",
|
|
41
|
+
description: "Preview what would be moved without touching the filesystem.",
|
|
42
|
+
},
|
|
43
|
+
status: {
|
|
44
|
+
kind: "string",
|
|
45
|
+
description: "Filter to a single terminal status (implemented, rejected, superseded).",
|
|
46
|
+
},
|
|
45
47
|
},
|
|
48
|
+
execute: runAuditArchive,
|
|
46
49
|
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
pipelines: [
|
|
51
|
-
|
|
52
|
-
]};
|
|
50
|
+
],
|
|
51
|
+
pipelines: [],
|
|
52
|
+
};
|
|
53
53
|
}
|
|
54
|
-
;
|
|
@@ -15,7 +15,7 @@ are silently excluded.
|
|
|
15
15
|
</CHANGE_SUMMARY>
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import fs from "
|
|
18
|
+
import { ambientIo as fs } from "../../src/utils/io.ts";
|
|
19
19
|
import path from "node:path";
|
|
20
20
|
import YAML from "yaml";
|
|
21
21
|
import { AUDIT_RFC_FILE_PATTERN } from "./types.ts";
|
|
@@ -41,13 +41,13 @@ export async function listAuditFiles(auditDirPath: string): Promise<string[]> {
|
|
|
41
41
|
|
|
42
42
|
async function scanDir(dirPath: string, relativePrefix: string): Promise<void> {
|
|
43
43
|
try {
|
|
44
|
-
const entries = await fs.readdir(dirPath
|
|
44
|
+
const entries = await fs.readdir(dirPath);
|
|
45
45
|
for (const entry of entries) {
|
|
46
46
|
const relativePath = relativePrefix ? `${relativePrefix}/${entry.name}` : entry.name;
|
|
47
|
-
if (entry.isDirectory
|
|
47
|
+
if (entry.isDirectory) {
|
|
48
48
|
await scanDir(path.join(dirPath, entry.name), relativePath);
|
|
49
49
|
} else if (
|
|
50
|
-
entry.isFile
|
|
50
|
+
entry.isFile &&
|
|
51
51
|
entry.name.endsWith(".md") &&
|
|
52
52
|
!entry.name.startsWith("audit-0000") &&
|
|
53
53
|
entry.name !== "README.md" &&
|
|
@@ -71,7 +71,7 @@ export async function readAndParseAudit(
|
|
|
71
71
|
): Promise<{ fileName: string; parsed: ParsedAudit } | undefined> {
|
|
72
72
|
try {
|
|
73
73
|
const filePath = path.join(auditDirPath, fileName);
|
|
74
|
-
const content = await fs.readFile(filePath
|
|
74
|
+
const content = await fs.readFile(filePath);
|
|
75
75
|
return { fileName, parsed: parseAuditFile(content) };
|
|
76
76
|
} catch {
|
|
77
77
|
return undefined;
|
|
@@ -17,7 +17,7 @@ files (not matching audit-rfc-XXXX-*) are silently excluded.
|
|
|
17
17
|
</CHANGE_SUMMARY>
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import fs from "
|
|
20
|
+
import { ambientIo as fs } from "../../../src/utils/io.ts";
|
|
21
21
|
import path from "node:path";
|
|
22
22
|
import { listAuditFiles, extractRfcIdFromAuditFile } from "../frontmatter-io.ts";
|
|
23
23
|
import { loadRfcStatusMap } from "../../rfc/frontmatter-io.ts";
|
|
@@ -116,7 +116,9 @@ export async function runAuditArchive(
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
try {
|
|
119
|
-
await fs.
|
|
119
|
+
await fs.exists(targetPath).then((ok) => {
|
|
120
|
+
if (!ok) throw Object.assign(new Error("ENOENT"), { code: "ENOENT" });
|
|
121
|
+
});
|
|
120
122
|
skipped.push({ id: rfcId, file: relFile, reason: "destination exists" });
|
|
121
123
|
continue;
|
|
122
124
|
} catch {
|
|
@@ -124,7 +126,7 @@ export async function runAuditArchive(
|
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
if (!dryRun) {
|
|
127
|
-
await fs.mkdir(targetDir
|
|
129
|
+
await fs.mkdir(targetDir);
|
|
128
130
|
try {
|
|
129
131
|
await fs.rename(path.join(auditDirPath, fileName), targetPath);
|
|
130
132
|
} catch (err) {
|
|
@@ -167,7 +169,9 @@ export async function runAuditArchive(
|
|
|
167
169
|
}
|
|
168
170
|
|
|
169
171
|
try {
|
|
170
|
-
await fs.
|
|
172
|
+
await fs.exists(targetPath).then((ok) => {
|
|
173
|
+
if (!ok) throw Object.assign(new Error("ENOENT"), { code: "ENOENT" });
|
|
174
|
+
});
|
|
171
175
|
skipped.push({ id: rfcId, file: relFile, reason: "destination exists" });
|
|
172
176
|
continue;
|
|
173
177
|
} catch {
|