@warpgogol/forge 4.2.4 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +14 -6
- package/CHANGELOG.md +72 -0
- package/README.md +8 -8
- package/README.uk.md +5 -5
- package/dist/os/adr/handlers/list-create.d.ts.map +1 -1
- package/dist/os/adr/handlers/list-create.js +4 -1
- package/dist/os/adr/handlers/list-create.js.map +1 -1
- package/dist/os/adr/handlers/validate.d.ts.map +1 -1
- package/dist/os/adr/handlers/validate.js +6 -1
- package/dist/os/adr/handlers/validate.js.map +1 -1
- package/dist/os/adr/types.d.ts.map +1 -1
- package/dist/os/adr/types.js +7 -3
- package/dist/os/adr/types.js.map +1 -1
- package/dist/os/compass/compass.module.d.ts.map +1 -1
- package/dist/os/compass/compass.module.js +76 -10
- 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 +7 -3
- package/dist/os/compass/handlers/compass-audit-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.d.ts +1 -9
- package/dist/os/compass/handlers/compass-change-summary-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.js +44 -186
- package/dist/os/compass/handlers/compass-change-summary-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-inventory-handler.d.ts +2 -0
- package/dist/os/compass/handlers/compass-inventory-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory-handler.js +24 -12
- package/dist/os/compass/handlers/compass-inventory-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-inventory.d.ts +7 -5
- package/dist/os/compass/handlers/compass-inventory.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory.js +84 -241
- package/dist/os/compass/handlers/compass-inventory.js.map +1 -1
- package/dist/os/compass/handlers/compass-migrate-handler.d.ts +4 -0
- package/dist/os/compass/handlers/compass-migrate-handler.d.ts.map +1 -0
- package/dist/os/compass/handlers/compass-migrate-handler.js +100 -0
- package/dist/os/compass/handlers/compass-migrate-handler.js.map +1 -0
- package/dist/os/compass/handlers/compass-migrate.d.ts +34 -0
- package/dist/os/compass/handlers/compass-migrate.d.ts.map +1 -0
- package/dist/os/compass/handlers/compass-migrate.js +273 -0
- package/dist/os/compass/handlers/compass-migrate.js.map +1 -0
- package/dist/os/compass/handlers/resolve-scan-root.d.ts.map +1 -1
- package/dist/os/compass/handlers/resolve-scan-root.js +15 -8
- package/dist/os/compass/handlers/resolve-scan-root.js.map +1 -1
- package/dist/os/compass/handlers/summary-record.d.ts +46 -0
- package/dist/os/compass/handlers/summary-record.d.ts.map +1 -0
- package/dist/os/compass/handlers/summary-record.js +233 -0
- package/dist/os/compass/handlers/summary-record.js.map +1 -0
- package/dist/os/compass/index.d.ts +4 -1
- package/dist/os/compass/index.d.ts.map +1 -1
- package/dist/os/compass/index.js +9 -1
- package/dist/os/compass/index.js.map +1 -1
- package/dist/os/compass/policy.d.ts +65 -0
- package/dist/os/compass/policy.d.ts.map +1 -0
- package/dist/os/compass/policy.js +241 -0
- package/dist/os/compass/policy.js.map +1 -0
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +11 -23
- package/dist/os/core/core.module.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 +7 -1
- package/dist/os/core/handlers/forge-autonomy-validate.js.map +1 -1
- package/dist/os/core/handlers/package-health.d.ts.map +1 -1
- package/dist/os/core/handlers/package-health.js +6 -1
- package/dist/os/core/handlers/package-health.js.map +1 -1
- package/dist/os/core/handlers/pinned-check.d.ts.map +1 -1
- package/dist/os/core/handlers/pinned-check.js +6 -1
- package/dist/os/core/handlers/pinned-check.js.map +1 -1
- package/dist/os/core/handlers/pinned-validate.d.ts.map +1 -1
- package/dist/os/core/handlers/pinned-validate.js +6 -1
- package/dist/os/core/handlers/pinned-validate.js.map +1 -1
- package/dist/os/core/handlers/validate.d.ts.map +1 -1
- package/dist/os/core/handlers/validate.js +6 -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 +6 -4
- package/dist/os/exploration/exploration.module.js.map +1 -1
- package/dist/os/exploration/handlers/list.d.ts.map +1 -1
- package/dist/os/exploration/handlers/list.js +4 -1
- package/dist/os/exploration/handlers/list.js.map +1 -1
- package/dist/os/mission/handlers/archive.d.ts.map +1 -1
- package/dist/os/mission/handlers/archive.js +7 -3
- package/dist/os/mission/handlers/archive.js.map +1 -1
- package/dist/os/mission/index.d.ts.map +1 -1
- package/dist/os/mission/index.js +13 -0
- package/dist/os/mission/index.js.map +1 -1
- package/dist/os/notes/index.d.ts.map +1 -1
- package/dist/os/notes/index.js +7 -1
- package/dist/os/notes/index.js.map +1 -1
- package/dist/os/rfc/frontmatter-io.d.ts.map +1 -1
- package/dist/os/rfc/frontmatter-io.js +6 -1
- 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 +6 -1
- package/dist/os/rfc/handlers/archive.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +7 -3
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/index-graph.d.ts.map +1 -1
- package/dist/os/rfc/handlers/index-graph.js +6 -1
- 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 -1
- 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 +6 -1
- package/dist/os/rfc/handlers/list-create.js.map +1 -1
- package/dist/os/rfc/handlers/pipeline-status.d.ts.map +1 -1
- package/dist/os/rfc/handlers/pipeline-status.js +6 -1
- package/dist/os/rfc/handlers/pipeline-status.js.map +1 -1
- package/dist/os/rfc/handlers/supersede-propose.d.ts.map +1 -1
- package/dist/os/rfc/handlers/supersede-propose.js +6 -1
- 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 +7 -3
- 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/index.d.ts.map +1 -1
- package/dist/os/rfc/index.js +6 -1
- package/dist/os/rfc/index.js.map +1 -1
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +6 -1
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/types.d.ts +7 -4
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +7 -4
- package/dist/os/rfc/types.js.map +1 -1
- package/dist/os/session/handlers/save.d.ts.map +1 -1
- package/dist/os/session/handlers/save.js +6 -1
- package/dist/os/session/handlers/save.js.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +6 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +1 -1
- package/dist/os/werkstatt/handlers/workspace-deps.js +3 -3
- package/dist/os/werkstatt/handlers/workspace-deps.js.map +1 -1
- package/dist/os/workflow/index.d.ts.map +1 -1
- package/dist/os/workflow/index.js +6 -1
- package/dist/os/workflow/index.js.map +1 -1
- package/dist/src/config/forge-config.d.ts +62 -4
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +35 -19
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/forge-module.d.ts.map +1 -1
- package/dist/src/forge-module.js +6 -1
- package/dist/src/forge-module.js.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +10 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/migration-adapters/git-utils.d.ts.map +1 -1
- package/dist/src/migration-adapters/git-utils.js +6 -2
- package/dist/src/migration-adapters/git-utils.js.map +1 -1
- package/dist/src/migration-adapters/ignored-files.d.ts.map +1 -1
- package/dist/src/migration-adapters/ignored-files.js +6 -1
- package/dist/src/migration-adapters/ignored-files.js.map +1 -1
- package/dist/src/migration-adapters/index.d.ts.map +1 -1
- package/dist/src/migration-adapters/index.js +4 -1
- package/dist/src/migration-adapters/index.js.map +1 -1
- package/dist/src/migration-adapters/types.d.ts.map +1 -1
- package/dist/src/migration-adapters/types.js +6 -2
- package/dist/src/migration-adapters/types.js.map +1 -1
- package/dist/src/onboarding/agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/agents-generate.js +18 -14
- 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 +7 -6
- 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 +7 -13
- 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 +7 -12
- package/dist/src/onboarding/init.js.map +1 -1
- package/dist/src/onboarding/invariant-engine.d.ts.map +1 -1
- package/dist/src/onboarding/invariant-engine.js +7 -2
- package/dist/src/onboarding/invariant-engine.js.map +1 -1
- package/dist/src/onboarding/nested-agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/nested-agents-generate.js +7 -2
- 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 +11 -3
- package/dist/src/onboarding/nested-agents-templates.js.map +1 -1
- package/dist/src/onboarding/scaffold-project.d.ts.map +1 -1
- package/dist/src/onboarding/scaffold-project.js +6 -1
- package/dist/src/onboarding/scaffold-project.js.map +1 -1
- package/dist/src/onboarding/upgrade.d.ts.map +1 -1
- package/dist/src/onboarding/upgrade.js +7 -3
- package/dist/src/onboarding/upgrade.js.map +1 -1
- package/dist/src/profiles/profile-schema.d.ts +54 -4
- package/dist/src/profiles/profile-schema.d.ts.map +1 -1
- package/dist/src/profiles/profile-schema.js +34 -14
- package/dist/src/profiles/profile-schema.js.map +1 -1
- package/dist/src/profiles/stack-profile.d.ts +24 -0
- package/dist/src/profiles/stack-profile.d.ts.map +1 -1
- package/dist/src/profiles/stack-profile.js +7 -3
- package/dist/src/profiles/stack-profile.js.map +1 -1
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +7 -9
- package/dist/src/registry.js.map +1 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +6 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/fs-atomic.d.ts.map +1 -1
- package/dist/src/utils/fs-atomic.js +13 -1
- package/dist/src/utils/fs-atomic.js.map +1 -1
- package/dist/src/utils/fs-idempotent.d.ts.map +1 -1
- package/dist/src/utils/fs-idempotent.js +13 -0
- package/dist/src/utils/fs-idempotent.js.map +1 -1
- package/dist/src/utils/fs-trash-sync.d.ts.map +1 -1
- package/dist/src/utils/fs-trash-sync.js +13 -1
- package/dist/src/utils/fs-trash-sync.js.map +1 -1
- package/dist/src/utils/fs-trash.d.ts.map +1 -1
- package/dist/src/utils/fs-trash.js +13 -1
- package/dist/src/utils/fs-trash.js.map +1 -1
- package/dist/src/utils/fs.d.ts.map +1 -1
- package/dist/src/utils/fs.js +14 -3
- package/dist/src/utils/fs.js.map +1 -1
- package/dist/src/utils/hash.d.ts.map +1 -1
- package/dist/src/utils/hash.js +12 -1
- package/dist/src/utils/hash.js.map +1 -1
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/index.js +13 -2
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/utils/string-utils.d.ts.map +1 -1
- package/dist/src/utils/string-utils.js +12 -1
- package/dist/src/utils/string-utils.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 +7 -8
- package/dist/src/validators/skill-validate.js.map +1 -1
- package/docs/getting-started.md +1 -1
- package/docs/reference/forge-yaml.md +38 -9
- package/docs/reference/profiles.md +8 -8
- package/os/adr/handlers/list-create.ts +4 -1
- package/os/adr/handlers/validate.ts +6 -1
- package/os/adr/types.ts +7 -3
- package/os/compass/compass.module.ts +79 -13
- package/os/compass/handlers/compass-audit-handler.ts +22 -3
- package/os/compass/handlers/compass-change-summary-handler.ts +55 -227
- package/os/compass/handlers/compass-inventory-handler.ts +30 -12
- package/os/compass/handlers/compass-inventory.ts +103 -240
- package/os/compass/handlers/compass-migrate-handler.ts +122 -0
- package/os/compass/handlers/compass-migrate.ts +361 -0
- package/os/compass/handlers/resolve-scan-root-package.test.ts +70 -0
- package/os/compass/handlers/resolve-scan-root.ts +15 -8
- package/os/compass/handlers/summary-record.ts +313 -0
- package/os/compass/handlers/tests/compass-migrate.test.ts +291 -0
- package/os/compass/handlers/tests/compass-policy.test.ts +249 -0
- package/os/compass/handlers/tests/compass-v2-contract.test.ts +9 -9
- package/os/compass/handlers/tests/summary-record.test.ts +224 -0
- package/os/compass/index.ts +23 -5
- package/os/compass/policy.ts +350 -0
- package/os/core/core.module.ts +11 -23
- package/os/core/handlers/forge-autonomy-validate.ts +7 -1
- package/os/core/handlers/package-health.ts +6 -1
- package/os/core/handlers/pinned-check.ts +6 -1
- package/os/core/handlers/pinned-validate.ts +6 -1
- package/os/core/handlers/validate.ts +6 -1
- package/os/exploration/exploration.module.ts +72 -71
- package/os/exploration/handlers/list.ts +4 -1
- package/os/mission/handlers/archive.ts +7 -3
- package/os/mission/index.ts +14 -0
- package/os/notes/index.ts +7 -1
- package/os/rfc/frontmatter-io.ts +6 -1
- package/os/rfc/handlers/archive.ts +6 -1
- package/os/rfc/handlers/implement-stamp.ts +7 -3
- package/os/rfc/handlers/index-graph.ts +6 -1
- package/os/rfc/handlers/lifecycle.ts +6 -1
- package/os/rfc/handlers/list-create.ts +6 -1
- package/os/rfc/handlers/pipeline-status.ts +6 -1
- package/os/rfc/handlers/supersede-propose.ts +6 -1
- package/os/rfc/handlers/validate-rules.ts +7 -3
- package/os/rfc/handlers/validate.ts +6 -1
- package/os/rfc/index.ts +6 -1
- package/os/rfc/rfc.module.ts +6 -1
- package/os/rfc/types.ts +7 -4
- package/os/session/handlers/save.ts +6 -1
- package/os/werkstatt/handlers/werkstatt-lock-recover.ts +6 -1
- package/os/werkstatt/handlers/workspace-deps.ts +3 -3
- package/os/workflow/index.ts +6 -1
- package/package.json +1 -1
- package/profiles/{godot-csharp.yaml → godot-game.yaml} +2 -2
- package/profiles/{knowledge-typescript-turborepo.yaml → knowledge.yaml} +1 -1
- package/profiles/{phaser-turborepo.yaml → phaser-game.yaml} +2 -2
- package/profiles/{typescript-turborepo.yaml → typescript.yaml} +2 -2
- package/skills/fo/fo-add-tests/SKILL.md +14 -0
- package/skills/fo/fo-architecture/SKILL.md +14 -0
- package/skills/fo/fo-compass-annotate/SKILL.md +14 -0
- package/skills/fo/fo-design-summit/SKILL.md +14 -0
- package/skills/fo/fo-doc-audit/SKILL.md +14 -0
- package/skills/fo/fo-explore/SKILL.md +14 -0
- package/skills/fo/fo-extract-dna/SKILL.md +14 -0
- package/skills/fo/fo-fix/SKILL.md +14 -0
- package/skills/fo/fo-handoff/SKILL.md +14 -0
- package/skills/fo/fo-harvest/SKILL.md +14 -0
- package/skills/fo/fo-idea/SKILL.md +14 -0
- package/skills/fo/fo-idea-audit/SKILL.md +14 -0
- package/skills/fo/fo-idea-create-adr/SKILL.md +14 -0
- package/skills/fo/fo-idea-create-rfc/SKILL.md +14 -0
- package/skills/fo/fo-idea-enhance/SKILL.md +14 -0
- package/skills/fo/fo-idea-i-just-want-to-see-the-plan/SKILL.md +14 -0
- package/skills/fo/fo-idea-i-just-want-to-see-the-result/SKILL.md +14 -0
- package/skills/fo/fo-idea-implement/SKILL.md +14 -0
- package/skills/fo/fo-idea-plan/SKILL.md +14 -0
- package/skills/fo/fo-idea-status/SKILL.md +14 -0
- package/skills/fo/fo-knowledge-distill/SKILL.md +14 -0
- package/skills/fo/fo-memory-sync/SKILL.md +14 -0
- package/skills/fo/fo-qa/SKILL.md +14 -0
- package/skills/fo/fo-review/SKILL.md +14 -0
- package/skills/fo/fo-session-retro/SKILL.md +14 -0
- package/skills/fo/fo-session-save/SKILL.md +14 -0
- package/skills/fo/fo-spec-ingest/SKILL.md +14 -0
- package/skills/fo/fo-step-commit/SKILL.md +14 -0
- package/skills/fo/fo-triage/SKILL.md +14 -0
- package/skills/meta/forge-bootstrap/SKILL.md +14 -0
- package/skills/meta/port-to-forge/SKILL.md +14 -0
- package/skills/meta/skill-create/SKILL.md +14 -0
- package/skills/shared/grilling/SKILL.md +14 -0
- package/skills/shared/my-preferences/SKILL.md +14 -0
- package/skills/shared/windows-ai-tooling/SKILL.md +14 -0
- package/skills/shared/writing-great-skills/SKILL.md +14 -0
- package/src/config/forge-config.ts +40 -23
- package/src/forge-module.ts +6 -1
- package/src/index.ts +10 -2
- package/src/migration-adapters/git-utils.ts +6 -2
- package/src/migration-adapters/ignored-files.ts +6 -1
- package/src/migration-adapters/index.ts +4 -1
- package/src/migration-adapters/types.ts +6 -2
- package/src/onboarding/agents-generate.ts +23 -14
- package/src/onboarding/create.ts +7 -6
- package/src/onboarding/doctor.ts +7 -13
- package/src/onboarding/init.ts +7 -12
- package/src/onboarding/invariant-engine.ts +7 -2
- package/src/onboarding/nested-agents-generate.ts +7 -2
- package/src/onboarding/nested-agents-templates.ts +11 -3
- package/src/onboarding/scaffold-project.ts +6 -1
- package/src/onboarding/upgrade.ts +7 -3
- package/src/profiles/profile-schema.ts +42 -18
- package/src/profiles/stack-profile.ts +7 -3
- package/src/registry.ts +7 -9
- package/src/tests/agents-generate-domain.test.ts +3 -3
- package/src/tests/agents-generate.test.ts +2 -2
- package/src/tests/create.test.ts +4 -4
- package/src/tests/forge-autonomy-validate.test.ts +1 -1
- package/src/tests/package-files.test.ts +53 -1
- package/src/tests/profile-schema.test.ts +4 -4
- package/src/tests/scaffold-project.test.ts +3 -3
- package/src/tests/stack-profile.test.ts +12 -12
- package/src/types.ts +6 -1
- package/src/utils/fs-atomic.ts +13 -1
- package/src/utils/fs-idempotent.ts +13 -0
- package/src/utils/fs-trash-sync.ts +13 -1
- package/src/utils/fs-trash.ts +13 -1
- package/src/utils/fs.ts +14 -3
- package/src/utils/hash.ts +12 -1
- package/src/utils/index.ts +13 -2
- package/src/utils/string-utils.ts +12 -1
- package/src/validators/port-validate.ts +1 -1
- package/src/validators/skill-validate.ts +7 -8
- package/skills/shared/extension-e2e-mitm/SKILL.md +0 -53
- package/skills/shared/extension-e2e-mitm/fixture-proxy.ts +0 -113
- package/src/types/werkstatt-engine-shims.d.ts +0 -1416
- package/src/types/werkstatt-shared-shims.d.ts +0 -5686
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Compass policy resolution — generic defaults overlaid by the stack
|
|
4
|
+
profile's compass section (forge.yaml `profile` field, RFC-0643) and the
|
|
5
|
+
consumer's bindings.compass overrides. Single source of truth for which files
|
|
6
|
+
are authored, how risky they are, and what counts as a governance ID
|
|
7
|
+
(RFC-1096).</purpose>
|
|
8
|
+
<non-goals>
|
|
9
|
+
<item>Do not scan files or classify entries — that lives in handlers/compass-inventory.ts.</item>
|
|
10
|
+
<item>Do not register commands — this is a pure policy module.</item>
|
|
11
|
+
</non-goals>
|
|
12
|
+
</MODULE_CONTRACT>
|
|
13
|
+
<CHANGE_SUMMARY>
|
|
14
|
+
<item>RFC-1096: initial policy resolver — generic defaults + profile compass section + bindings.compass overrides.</item>
|
|
15
|
+
</CHANGE_SUMMARY>
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import picomatch from "picomatch";
|
|
19
|
+
import { loadForgeConfig } from "../../src/config/forge-config.ts";
|
|
20
|
+
import type { CompassPolicyOverrides } from "../../src/profiles/profile-schema.ts";
|
|
21
|
+
|
|
22
|
+
export type CompassRiskClass = "high" | "medium" | "low";
|
|
23
|
+
export type CompassWorkspaceKind = "app" | "package" | "service";
|
|
24
|
+
|
|
25
|
+
export interface CompassLayerRule {
|
|
26
|
+
pattern: string;
|
|
27
|
+
layer: string;
|
|
28
|
+
risk: CompassRiskClass;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface CompassExcludedPath {
|
|
32
|
+
pattern: string;
|
|
33
|
+
reason: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface CompassPolicySource {
|
|
37
|
+
/** Stack profile id that contributed a `compass:` section, or null. */
|
|
38
|
+
profile: string | null;
|
|
39
|
+
/** Keys the consumer's bindings.compass overrode. */
|
|
40
|
+
overriddenKeys: string[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface CompassPolicy {
|
|
44
|
+
fileExtensions: ReadonlySet<string>;
|
|
45
|
+
testPatterns: readonly string[];
|
|
46
|
+
scanRoots: readonly string[];
|
|
47
|
+
ignoredDirs: ReadonlySet<string>;
|
|
48
|
+
ignoredDirPrefixes: readonly string[];
|
|
49
|
+
/** picomatch globs on the root-relative path that force riskClass=high. */
|
|
50
|
+
highRiskPaths: readonly string[];
|
|
51
|
+
/** Governance-ID detection pattern (unanchored, as configured). */
|
|
52
|
+
idPattern: RegExp;
|
|
53
|
+
/** `^(?:idPattern)$` — full-string governance-ID match. */
|
|
54
|
+
idPatternFull: RegExp;
|
|
55
|
+
/** `^(?:idPattern)` — leading governance-ID match. */
|
|
56
|
+
idPatternPrefix: RegExp;
|
|
57
|
+
purposeBoilerplatePatterns: readonly RegExp[];
|
|
58
|
+
/** Ordered first-match layer rules on the workspace-relative path. */
|
|
59
|
+
layerRules: readonly CompassLayerRule[];
|
|
60
|
+
workspaceKinds: Readonly<Record<string, CompassWorkspaceKind>>;
|
|
61
|
+
/** Workspace-relative globs that mark a file excluded with a reason. */
|
|
62
|
+
excludedPaths: readonly CompassExcludedPath[];
|
|
63
|
+
source: CompassPolicySource;
|
|
64
|
+
/** First-match layer rule for a workspace-relative path. */
|
|
65
|
+
matchLayer(workspaceRelativePath: string): CompassLayerRule | undefined;
|
|
66
|
+
/** Whether a root-relative path is forced high-risk. */
|
|
67
|
+
isHighRisk(pathFromRoot: string): boolean;
|
|
68
|
+
/** Whether a workspace-relative path is a test file. */
|
|
69
|
+
isTestPath(workspaceRelativePath: string): boolean;
|
|
70
|
+
/** Exclusion reason for a workspace-relative path, if any. */
|
|
71
|
+
excludedReason(workspaceRelativePath: string): string | undefined;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export class CompassPolicyConfigError extends Error {
|
|
75
|
+
readonly key: string;
|
|
76
|
+
constructor(key: string, detail: string) {
|
|
77
|
+
super(`[compass.policy] invalid compass policy key "${key}": ${detail}`);
|
|
78
|
+
this.name = "CompassPolicyConfigError";
|
|
79
|
+
this.key = key;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
// Generic defaults — stack-neutral values only. Consumer- or stack-specific
|
|
85
|
+
// literals are forbidden here (RFC-1096 AC-4); they live in profiles or
|
|
86
|
+
// forge.yaml bindings.compass.
|
|
87
|
+
// ---------------------------------------------------------------------------
|
|
88
|
+
|
|
89
|
+
const GENERIC_FILE_EXTENSIONS = [
|
|
90
|
+
".ts",
|
|
91
|
+
".tsx",
|
|
92
|
+
".astro",
|
|
93
|
+
".js",
|
|
94
|
+
".jsx",
|
|
95
|
+
".mjs",
|
|
96
|
+
".mts",
|
|
97
|
+
".css",
|
|
98
|
+
".cs",
|
|
99
|
+
".tscn",
|
|
100
|
+
".tres",
|
|
101
|
+
".gd",
|
|
102
|
+
".md",
|
|
103
|
+
];
|
|
104
|
+
|
|
105
|
+
const GENERIC_IGNORED_DIRS = [
|
|
106
|
+
".git",
|
|
107
|
+
".turbo",
|
|
108
|
+
".astro",
|
|
109
|
+
".wrangler",
|
|
110
|
+
".vscode",
|
|
111
|
+
".cache",
|
|
112
|
+
"coverage",
|
|
113
|
+
"dist",
|
|
114
|
+
"node_modules",
|
|
115
|
+
];
|
|
116
|
+
|
|
117
|
+
const GENERIC_SCAN_ROOTS = ["src", "apps", "packages", "services"];
|
|
118
|
+
|
|
119
|
+
const GENERIC_TEST_PATTERNS = [
|
|
120
|
+
"test/**",
|
|
121
|
+
"**/*.test.ts",
|
|
122
|
+
"**/*.test.js",
|
|
123
|
+
"**/*.spec.ts",
|
|
124
|
+
"**/*.spec.js",
|
|
125
|
+
];
|
|
126
|
+
|
|
127
|
+
const GENERIC_ID_PATTERN = "\\b([A-Z][A-Z0-9]*-)+\\d+\\b";
|
|
128
|
+
|
|
129
|
+
const GENERIC_PURPOSE_BOILERPLATE = [
|
|
130
|
+
"^(this file|the file|a file|this module|a module)\\b",
|
|
131
|
+
"^(utility|utilities|helper|helpers|misc)\\b",
|
|
132
|
+
"^(todo|placeholder|fixme)\\b",
|
|
133
|
+
];
|
|
134
|
+
|
|
135
|
+
const GENERIC_LAYER_RULES: CompassLayerRule[] = [
|
|
136
|
+
{ pattern: "bin/**", layer: "bin", risk: "low" },
|
|
137
|
+
{ pattern: "src/middleware.ts", layer: "middleware", risk: "low" },
|
|
138
|
+
{ pattern: "src/middleware/**", layer: "middleware", risk: "high" },
|
|
139
|
+
{ pattern: "src/pages/**", layer: "page", risk: "medium" },
|
|
140
|
+
{ pattern: "src/components/**", layer: "component", risk: "medium" },
|
|
141
|
+
{ pattern: "src/content/schemas/**", layer: "schema", risk: "medium" },
|
|
142
|
+
{ pattern: "src/content/**", layer: "content", risk: "low" },
|
|
143
|
+
{ pattern: "src/styles/**", layer: "style", risk: "low" },
|
|
144
|
+
{ pattern: "src/scripts/**", layer: "script", risk: "medium" },
|
|
145
|
+
{ pattern: "src/layouts/**", layer: "layout", risk: "high" },
|
|
146
|
+
{ pattern: "src/utils/**", layer: "utility", risk: "medium" },
|
|
147
|
+
{ pattern: "src/configure/**", layer: "config", risk: "low" },
|
|
148
|
+
{ pattern: "test/**", layer: "test", risk: "low" },
|
|
149
|
+
{ pattern: "src/tests/**", layer: "test", risk: "low" },
|
|
150
|
+
{ pattern: "**/*.test.ts", layer: "test", risk: "low" },
|
|
151
|
+
{ pattern: "**/*.spec.ts", layer: "test", risk: "low" },
|
|
152
|
+
{ pattern: "src/**", layer: "source", risk: "low" },
|
|
153
|
+
{ pattern: "**/SKILL.md", layer: "skill", risk: "low" },
|
|
154
|
+
];
|
|
155
|
+
|
|
156
|
+
const GENERIC_WORKSPACE_KINDS: Record<string, CompassWorkspaceKind> = {
|
|
157
|
+
apps: "app",
|
|
158
|
+
packages: "package",
|
|
159
|
+
services: "service",
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// ---------------------------------------------------------------------------
|
|
163
|
+
// Merge semantics (RFC-1096): union keys merge with `!entry` subtraction
|
|
164
|
+
// (fileExtensions, testPatterns, ignoredDirs, ignoredDirPrefixes, highRiskPaths,
|
|
165
|
+
// excludedPaths — matched by `pattern`); scanRoots, idPattern,
|
|
166
|
+
// purposeBoilerplatePatterns, layerRules, and workspaceKinds replace wholesale
|
|
167
|
+
// (bindings > profile > generic).
|
|
168
|
+
// ---------------------------------------------------------------------------
|
|
169
|
+
|
|
170
|
+
function mergeStringList(
|
|
171
|
+
generic: readonly string[],
|
|
172
|
+
...overrides: Array<readonly string[] | undefined>
|
|
173
|
+
): string[] {
|
|
174
|
+
const result = new Set(generic);
|
|
175
|
+
for (const list of overrides) {
|
|
176
|
+
for (const item of list ?? []) {
|
|
177
|
+
if (item.startsWith("!")) {
|
|
178
|
+
result.delete(item.slice(1));
|
|
179
|
+
} else {
|
|
180
|
+
result.add(item);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return [...result];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function mergeExcludedPaths(
|
|
188
|
+
generic: readonly CompassExcludedPath[],
|
|
189
|
+
...overrides: Array<readonly CompassExcludedPath[] | undefined>
|
|
190
|
+
): CompassExcludedPath[] {
|
|
191
|
+
const byPattern = new Map<string, string>();
|
|
192
|
+
for (const entry of generic) {
|
|
193
|
+
byPattern.set(entry.pattern, entry.reason);
|
|
194
|
+
}
|
|
195
|
+
for (const list of overrides) {
|
|
196
|
+
for (const entry of list ?? []) {
|
|
197
|
+
if (entry.pattern.startsWith("!")) {
|
|
198
|
+
byPattern.delete(entry.pattern.slice(1));
|
|
199
|
+
} else {
|
|
200
|
+
byPattern.set(entry.pattern, entry.reason);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return [...byPattern.entries()].map(([pattern, reason]) => ({ pattern, reason }));
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function compilePattern(key: string, pattern: string, flags?: string): RegExp {
|
|
208
|
+
try {
|
|
209
|
+
return new RegExp(pattern, flags);
|
|
210
|
+
} catch {
|
|
211
|
+
throw new CompassPolicyConfigError(key, `not a compilable regex: ${pattern}`);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/** Split a `NAMESPACE-NUMBER` governance ID on its last dash. */
|
|
216
|
+
export function parseGovernanceIdParts(id: string): { namespace: string; numeric: number } | null {
|
|
217
|
+
const match = id.match(/^(.*)-(\d+)$/);
|
|
218
|
+
if (!match) return null;
|
|
219
|
+
return { namespace: match[1]!, numeric: Number(match[2]) };
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Resolve the effective Compass policy for a workspace: generic defaults,
|
|
224
|
+
* overlaid by the stack profile `compass:` section (when forge.yaml declares
|
|
225
|
+
* `profile`), then by `bindings.compass`. Missing or unreadable forge.yaml
|
|
226
|
+
* yields the generic policy. Invalid regexes throw CompassPolicyConfigError
|
|
227
|
+
* naming the offending key.
|
|
228
|
+
*/
|
|
229
|
+
export function resolveCompassPolicy(workspaceRoot: string, forgeRoot?: string): CompassPolicy {
|
|
230
|
+
let profileCompass: CompassPolicyOverrides | undefined;
|
|
231
|
+
let bindingsCompass: CompassPolicyOverrides | undefined;
|
|
232
|
+
let profileId: string | null = null;
|
|
233
|
+
try {
|
|
234
|
+
const config = loadForgeConfig(workspaceRoot, forgeRoot);
|
|
235
|
+
profileCompass = config.profile?.compass;
|
|
236
|
+
bindingsCompass = config.bindings?.compass;
|
|
237
|
+
profileId = config.profile?.id ?? null;
|
|
238
|
+
} catch {
|
|
239
|
+
// No forge.yaml or unreadable config — generic policy only.
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const overriddenKeys = Object.keys(bindingsCompass ?? {}).filter(
|
|
243
|
+
(key) => (bindingsCompass as Record<string, unknown>)[key] !== undefined,
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
const fileExtensions = mergeStringList(
|
|
247
|
+
GENERIC_FILE_EXTENSIONS,
|
|
248
|
+
profileCompass?.fileExtensions,
|
|
249
|
+
bindingsCompass?.fileExtensions,
|
|
250
|
+
);
|
|
251
|
+
const testPatterns = mergeStringList(
|
|
252
|
+
GENERIC_TEST_PATTERNS,
|
|
253
|
+
profileCompass?.testPatterns,
|
|
254
|
+
bindingsCompass?.testPatterns,
|
|
255
|
+
);
|
|
256
|
+
const ignoredDirs = mergeStringList(
|
|
257
|
+
GENERIC_IGNORED_DIRS,
|
|
258
|
+
profileCompass?.ignoredDirs,
|
|
259
|
+
bindingsCompass?.ignoredDirs,
|
|
260
|
+
);
|
|
261
|
+
const ignoredDirPrefixes = mergeStringList(
|
|
262
|
+
[],
|
|
263
|
+
profileCompass?.ignoredDirPrefixes,
|
|
264
|
+
bindingsCompass?.ignoredDirPrefixes,
|
|
265
|
+
);
|
|
266
|
+
const highRiskPaths = mergeStringList(
|
|
267
|
+
[],
|
|
268
|
+
profileCompass?.highRiskPaths,
|
|
269
|
+
bindingsCompass?.highRiskPaths,
|
|
270
|
+
);
|
|
271
|
+
const excludedPaths = mergeExcludedPaths(
|
|
272
|
+
[],
|
|
273
|
+
profileCompass?.excludedPaths,
|
|
274
|
+
bindingsCompass?.excludedPaths,
|
|
275
|
+
);
|
|
276
|
+
const layerRules =
|
|
277
|
+
bindingsCompass?.layerRules ?? profileCompass?.layerRules ?? GENERIC_LAYER_RULES;
|
|
278
|
+
const workspaceKinds: Record<string, CompassWorkspaceKind> =
|
|
279
|
+
bindingsCompass?.workspaceKinds ?? profileCompass?.workspaceKinds ?? GENERIC_WORKSPACE_KINDS;
|
|
280
|
+
const scanRoots = bindingsCompass?.scanRoots ?? profileCompass?.scanRoots ?? GENERIC_SCAN_ROOTS;
|
|
281
|
+
|
|
282
|
+
const idPatternRaw =
|
|
283
|
+
bindingsCompass?.idPattern ?? profileCompass?.idPattern ?? GENERIC_ID_PATTERN;
|
|
284
|
+
const idPattern = compilePattern("idPattern", idPatternRaw);
|
|
285
|
+
if (!idPattern.test("ABC-123")) {
|
|
286
|
+
throw new CompassPolicyConfigError(
|
|
287
|
+
"idPattern",
|
|
288
|
+
`must match NAMESPACE-NUMBER governance ids (probe "ABC-123" failed): ${idPatternRaw}`,
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
const idPatternFull = new RegExp(`^(?:${idPattern.source})$`);
|
|
292
|
+
const idPatternPrefix = new RegExp(`^(?:${idPattern.source})`);
|
|
293
|
+
|
|
294
|
+
const boilerplateRaw =
|
|
295
|
+
bindingsCompass?.purposeBoilerplatePatterns ??
|
|
296
|
+
profileCompass?.purposeBoilerplatePatterns ??
|
|
297
|
+
GENERIC_PURPOSE_BOILERPLATE;
|
|
298
|
+
// Boilerplate detectors match English prose — always case-insensitive.
|
|
299
|
+
const purposeBoilerplatePatterns = boilerplateRaw.map((pattern) =>
|
|
300
|
+
compilePattern("purposeBoilerplatePatterns", pattern, "i"),
|
|
301
|
+
);
|
|
302
|
+
|
|
303
|
+
const layerMatchers = layerRules.map((rule) => ({
|
|
304
|
+
rule,
|
|
305
|
+
is: picomatch(rule.pattern, { dot: true }),
|
|
306
|
+
}));
|
|
307
|
+
const highRiskMatchers = highRiskPaths.map((pattern) => picomatch(pattern, { dot: true }));
|
|
308
|
+
const testMatchers = testPatterns.map((pattern) => picomatch(pattern, { dot: true }));
|
|
309
|
+
const excludedMatchers = excludedPaths.map((entry) => ({
|
|
310
|
+
reason: entry.reason,
|
|
311
|
+
is: picomatch(entry.pattern, { dot: true }),
|
|
312
|
+
}));
|
|
313
|
+
|
|
314
|
+
// Shallow freeze: the Readonly* types are the real immutability contract —
|
|
315
|
+
// do not mutate the nested Sets/arrays after resolution.
|
|
316
|
+
return Object.freeze({
|
|
317
|
+
fileExtensions: new Set(fileExtensions),
|
|
318
|
+
testPatterns,
|
|
319
|
+
scanRoots,
|
|
320
|
+
ignoredDirs: new Set(ignoredDirs),
|
|
321
|
+
ignoredDirPrefixes,
|
|
322
|
+
highRiskPaths,
|
|
323
|
+
idPattern,
|
|
324
|
+
idPatternFull,
|
|
325
|
+
idPatternPrefix,
|
|
326
|
+
purposeBoilerplatePatterns,
|
|
327
|
+
layerRules,
|
|
328
|
+
workspaceKinds,
|
|
329
|
+
excludedPaths,
|
|
330
|
+
source: { profile: profileId, overriddenKeys },
|
|
331
|
+
matchLayer(workspaceRelativePath: string): CompassLayerRule | undefined {
|
|
332
|
+
for (const { rule, is } of layerMatchers) {
|
|
333
|
+
if (is(workspaceRelativePath)) return rule;
|
|
334
|
+
}
|
|
335
|
+
return undefined;
|
|
336
|
+
},
|
|
337
|
+
isHighRisk(pathFromRoot: string): boolean {
|
|
338
|
+
return highRiskMatchers.some((is) => is(pathFromRoot));
|
|
339
|
+
},
|
|
340
|
+
isTestPath(workspaceRelativePath: string): boolean {
|
|
341
|
+
return testMatchers.some((is) => is(workspaceRelativePath));
|
|
342
|
+
},
|
|
343
|
+
excludedReason(workspaceRelativePath: string): string | undefined {
|
|
344
|
+
for (const { reason, is } of excludedMatchers) {
|
|
345
|
+
if (is(workspaceRelativePath)) return reason;
|
|
346
|
+
}
|
|
347
|
+
return undefined;
|
|
348
|
+
},
|
|
349
|
+
});
|
|
350
|
+
}
|
package/os/core/core.module.ts
CHANGED
|
@@ -6,30 +6,16 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-0374: initial forgeCoreModule registering 4 forge commands.</item>
|
|
10
|
-
<item>RFC-0521: register docs.archive umbrella command dispatching to rfc/adr/plan/audit archive commands.</item>
|
|
11
|
-
<item>RFC-0539: extended forge.skill.list to include pack skills with pack column.</item>
|
|
12
|
-
<item>RFC-0542: populate nextSteps in forge.init, forge.scaffold, forge.doctor, forge.port.scaffold results.</item>
|
|
13
|
-
<item>RFC-0543: register forge.upgrade command for additive consumer sync.</item>
|
|
14
|
-
<item>RFC-0544: register forge.create command composing scaffold + init.</item>
|
|
15
|
-
<item>RFC-0544 fix: simplify createWrapper — runCreate already populates nextSteps.</item>
|
|
16
|
-
<item>RFC-0546: remove forge.init CLI registration; runInit() remains as internal primitive called by forge.create.</item>
|
|
17
|
-
<item>RFC-0640: register forge.profile.validate command, add --strict flag to forge.doctor.</item>
|
|
18
|
-
<item>RFC-0662: register forge.skill.knowledge.compact command for skill knowledge lifecycle compaction.</item>
|
|
19
|
-
<item>RFC-0674: register forge.dev, forge.build, forge.validate lifecycle commands.</item>
|
|
20
|
-
<item>RFC-0678: register forge.determinism.check lifecycle command.</item>
|
|
21
|
-
<item>RFC-0679: register forge.assets.list, forge.assets.check commands.</item>
|
|
22
|
-
<item>RFC-0680: register forge.release.prepare, forge.release.publish commands.</item>
|
|
23
|
-
<item>ADR-0021: profile-driven video lifecycle — all lifecycle commands read behavior from profile YAML, zero domain-specific code in Forge source.</item>
|
|
24
|
-
<item>RFC-0711: docs.archive post-loop step calls spec.live.merge for implemented RFCs with liveSpec field; skips rejected RFCs.</item>
|
|
25
|
-
<item>RFC-0733: register forge pinned.validate and forge pinned.init commands for pinned-files protection system.</item>
|
|
26
|
-
<item>Lockfile safety net: docs.archive post-loop refreshes pnpm-lock.yaml after mission workpiece moves.</item>
|
|
27
|
-
<item>RFC-0877: forge.create --in-place required, --profile required, --name optional (derived from folder), strict empty-directory check (only .git/ tolerated).</item>
|
|
28
|
-
<item>RFC-0940: register forge.autonomy.validate command enforcing FORGE-AUTONOMY-01 (no @warpgogol/werkstatt-engine imports outside os/werkstatt/).</item>
|
|
29
|
-
<item>RFC-1080: register forge.public-surface.validate command for README/package.json consistency checks (SURFACE-01..05).</item>
|
|
30
9
|
<item>RFC-1088: register forge.file-size.lint command for portable SIZE-01 line-count validation.</item>
|
|
31
10
|
<item>RFC-1088 fix: add writes field to forge.file-size.lint registration per fo-review.</item>
|
|
32
11
|
<item>RFC-1089: rename forge.file-size.lint to file.size.lint (domain validator, no forge. prefix).</item>
|
|
12
|
+
<item>RFC-1097: step 6 — compass.migrate codemod run
|
|
13
|
+
|
|
14
|
+
Mechanical v1 to v2 header migration across the workspace: 942 files rewritten — CHANGE_SUMMARY windows collapsed into history, forbidden v1 blocks stripped, KEY_DECISIONS seeded from @ai-invariant comments (5 files) or TODO placeholders (103 files), blocks reordered to canonical order.</item>
|
|
15
|
+
<item>RFC-1097: sweep — packages/forge + services clean
|
|
16
|
+
|
|
17
|
+
Sweep batch 2: real KEY_DECISIONS on 10 files, expanded purposes (CONTRACT-02/PURPOSE-02), headers on mission/index + gen-upstreams, sanitizeItemText in summary.record (literal Compass tags corrupted history), excludedPaths for wrangler types, test-fixtures testPattern. forge+services now 0 diagnostics under --mode error.</item>
|
|
18
|
+
<history>ADR-0021, RFC-0374, RFC-0521, RFC-0539, RFC-0542, RFC-0543, RFC-0544, RFC-0546, RFC-0640, RFC-0662, RFC-0674, RFC-0678, RFC-0679, RFC-0680, RFC-0711, RFC-0733, RFC-0877, RFC-0940, RFC-1080</history>
|
|
33
19
|
</CHANGE_SUMMARY>
|
|
34
20
|
*/
|
|
35
21
|
|
|
@@ -326,7 +312,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
326
312
|
profile: {
|
|
327
313
|
kind: "string",
|
|
328
314
|
required: true,
|
|
329
|
-
description: "Stack profile id (e.g. phaser-
|
|
315
|
+
description: "Stack profile id (e.g. phaser-game).",
|
|
330
316
|
},
|
|
331
317
|
name: { kind: "string", required: true, description: "Project name (kebab-case)." },
|
|
332
318
|
template: {
|
|
@@ -354,7 +340,7 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
354
340
|
kind: "string",
|
|
355
341
|
required: true,
|
|
356
342
|
description:
|
|
357
|
-
"Stack profile id. Required. Available: forge-shell, phaser-
|
|
343
|
+
"Stack profile id. Required. Available: forge-shell, phaser-game, godot-game, knowledge, typescript.",
|
|
358
344
|
},
|
|
359
345
|
name: {
|
|
360
346
|
kind: "string",
|
|
@@ -743,6 +729,8 @@ export async function createForgeCoreModule(): Promise<ForgeModule> {
|
|
|
743
729
|
"Check consistency between README.md, package.json, and docs/ structure. " +
|
|
744
730
|
"Enforces SURFACE-01..05 rules: README length, Node version match, " +
|
|
745
731
|
"no .tgz in root, docs/ structure, required root files (RFC-1080).",
|
|
732
|
+
contract: "forge",
|
|
733
|
+
rules: ["SURFACE-01", "SURFACE-02", "SURFACE-03", "SURFACE-04", "SURFACE-05"],
|
|
746
734
|
scope: "workspace",
|
|
747
735
|
supportsAllSites: false,
|
|
748
736
|
reads: ["README.md", "package.json", "docs/**"],
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
@warpgogol/werkstatt-engine imports outside os/werkstatt/. Enforces FORGE-AUTONOMY-01
|
|
5
5
|
(RFC-0940, DNA-64). @warpgogol/werkstatt-shared is exempt (shared infrastructure).
|
|
6
6
|
Type-only imports (import type) are exempt.</purpose>
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
<non-goals>
|
|
9
9
|
<item>Does not scan test files — .test.ts and .spec.ts are always excluded.</item>
|
|
10
10
|
<item>Does not scan os/werkstatt/ — the adapter directory may import @warpgogol/werkstatt-engine.</item>
|
|
@@ -15,6 +15,12 @@ Type-only imports (import type) are exempt.</purpose>
|
|
|
15
15
|
<CHANGE_SUMMARY>
|
|
16
16
|
<item>RFC-0940: initial forge.autonomy.validate handler implementing FORGE-AUTONOMY-01.</item>
|
|
17
17
|
<item>ADR-0019: inlined scanDirectoryForImports to make forge dependency-free.</item>
|
|
18
|
+
<item>RFC-1097: step 6 — compass.migrate codemod run
|
|
19
|
+
|
|
20
|
+
Mechanical v1 to v2 header migration across the workspace: 942 files rewritten — CHANGE_SUMMARY windows collapsed into history, forbidden v1 blocks stripped, KEY_DECISIONS seeded from @ai-invariant comments (5 files) or TODO placeholders (103 files), blocks reordered to canonical order.</item>
|
|
21
|
+
<item>RFC-1097: sweep — werkstatt-engine clean
|
|
22
|
+
|
|
23
|
+
Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
|
|
18
24
|
</CHANGE_SUMMARY>
|
|
19
25
|
*/
|
|
20
26
|
|
|
@@ -7,8 +7,13 @@
|
|
|
7
7
|
</non-goals>
|
|
8
8
|
</MODULE_CONTRACT>
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
|
-
<item>Initial: forge.package.health validator — engines, CI workflow, extract config, devDeps completeness.</item>
|
|
11
10
|
<item>PKG-HEALTH-05: reject any versionBump in extract.config.yaml — version in package.json is source of truth.</item>
|
|
11
|
+
<item>RFC-1097: step 6 — compass.migrate codemod run
|
|
12
|
+
|
|
13
|
+
Mechanical v1 to v2 header migration across the workspace: 942 files rewritten — CHANGE_SUMMARY windows collapsed into history, forbidden v1 blocks stripped, KEY_DECISIONS seeded from @ai-invariant comments (5 files) or TODO placeholders (103 files), blocks reordered to canonical order.</item>
|
|
14
|
+
<item>RFC-1097: sweep — werkstatt-engine clean
|
|
15
|
+
|
|
16
|
+
Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
|
|
12
17
|
</CHANGE_SUMMARY>
|
|
13
18
|
*/
|
|
14
19
|
|
|
@@ -12,7 +12,12 @@ per invocation — loadPinnedManifest is called once and the result is reused.</
|
|
|
12
12
|
</MODULE_CONTRACT>
|
|
13
13
|
<CHANGE_SUMMARY>
|
|
14
14
|
<item>RFC-0733: initial pinned-check utility — loadPinnedManifest, isPinned, checkFilesForPinned.</item>
|
|
15
|
-
<item>
|
|
15
|
+
<item>RFC-1097: step 6 — compass.migrate codemod run
|
|
16
|
+
|
|
17
|
+
Mechanical v1 to v2 header migration across the workspace: 942 files rewritten — CHANGE_SUMMARY windows collapsed into history, forbidden v1 blocks stripped, KEY_DECISIONS seeded from @ai-invariant comments (5 files) or TODO placeholders (103 files), blocks reordered to canonical order.</item>
|
|
18
|
+
<item>RFC-1097: sweep — werkstatt-engine clean
|
|
19
|
+
|
|
20
|
+
Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
|
|
16
21
|
</CHANGE_SUMMARY>
|
|
17
22
|
*/
|
|
18
23
|
|
|
@@ -12,7 +12,12 @@ pinned files. Supports --allow-pinned-override for audited escape hatch,
|
|
|
12
12
|
</MODULE_CONTRACT>
|
|
13
13
|
<CHANGE_SUMMARY>
|
|
14
14
|
<item>RFC-0733: initial pinned.validate handler with staged/ci modes, override, audit log, manifest integrity check.</item>
|
|
15
|
-
<item>
|
|
15
|
+
<item>RFC-1097: step 6 — compass.migrate codemod run
|
|
16
|
+
|
|
17
|
+
Mechanical v1 to v2 header migration across the workspace: 942 files rewritten — CHANGE_SUMMARY windows collapsed into history, forbidden v1 blocks stripped, KEY_DECISIONS seeded from @ai-invariant comments (5 files) or TODO placeholders (103 files), blocks reordered to canonical order.</item>
|
|
18
|
+
<item>RFC-1097: sweep — werkstatt-engine clean
|
|
19
|
+
|
|
20
|
+
Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
|
|
16
21
|
</CHANGE_SUMMARY>
|
|
17
22
|
*/
|
|
18
23
|
|
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
10
|
<item>RFC-0674: initial forge.validate handler with profile resolution, --dry-run, and per-artifact execution.</item>
|
|
11
11
|
<item>RFC-0677: extended with --artifact filtering, violation parsing (outputFormat: json/plain), passed/allPassed fields.</item>
|
|
12
|
-
<item>
|
|
12
|
+
<item>RFC-1097: step 6 — compass.migrate codemod run
|
|
13
|
+
|
|
14
|
+
Mechanical v1 to v2 header migration across the workspace: 942 files rewritten — CHANGE_SUMMARY windows collapsed into history, forbidden v1 blocks stripped, KEY_DECISIONS seeded from @ai-invariant comments (5 files) or TODO placeholders (103 files), blocks reordered to canonical order.</item>
|
|
15
|
+
<item>RFC-1097: sweep — werkstatt-engine clean
|
|
16
|
+
|
|
17
|
+
Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
|
|
13
18
|
</CHANGE_SUMMARY>
|
|
14
19
|
*/
|
|
15
20
|
|