@warpgogol/forge 4.2.3 → 5.1.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 +12 -4
- 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 +9 -21
- 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 +50 -4
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +11 -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.js +7 -7
- 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 +6 -1
- 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/reference/forge-yaml.md +38 -9
- 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 +9 -21
- 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/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 +16 -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 +7 -7
- 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 +6 -1
- 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.test.ts +2 -2
- package/src/tests/forge-autonomy-validate.test.ts +1 -1
- 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/src/types/werkstatt-engine-shims.d.ts +0 -1416
- package/src/types/werkstatt-shared-shims.d.ts +0 -5686
|
@@ -1,228 +1,74 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
|
-
<purpose>CHANGE_SUMMARY
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<purpose>CHANGE_SUMMARY v2 repair logic per RFC-1095. Moved from
|
|
4
|
+
@warpgogol/site-kernel-checks to @warpgogol/forge for full autonomous mode
|
|
5
|
+
(RFC-0556). Provides compass.summary.trim --mode repair.</purpose>
|
|
6
6
|
<non-goals>
|
|
7
7
|
<item>Do not audit truthfulness of CHANGE_SUMMARY items against code — that is RFC-0352.</item>
|
|
8
|
-
<item>Do not
|
|
9
|
-
<item>Do not
|
|
8
|
+
<item>Do not use an LLM — repair is purely deterministic.</item>
|
|
9
|
+
<item>Do not classify items — under the v2 contract every item carries a governance ID; ID-less items are removed, not classified.</item>
|
|
10
10
|
</non-goals>
|
|
11
11
|
</MODULE_CONTRACT>
|
|
12
12
|
<CHANGE_SUMMARY>
|
|
13
|
-
<item>RFC-0349: initial implementation of classifyChangeSummaryItem, compass.changesummary.validate, and compass.changesummary.tidy.</item>
|
|
14
13
|
<item>RFC-0538: renamed compass.changesummary.tidy to compass.summary.trim, raised cap from 3 unprotected to 30 total items, aligned validate cap to 30 total.</item>
|
|
15
14
|
<item>RFC-0556: moved from @warpgogol/site-kernel-checks to @warpgogol/forge for autonomous mode.</item>
|
|
16
15
|
<item>RFC-1094: --mode flag; mode-aware COMPASS-CS-05/06/07 diagnostics via shared evaluateV2Rules; PROTECTED_RE now aliases GOVERNANCE_ID_RE.</item>
|
|
16
|
+
<item>RFC-1095: rewrote trim as v2 repair (collapse >5 described items into history, remove ID-less items, normalize history); removed compass.changesummary.validate and the classify machinery (classifyChangeSummaryItem, PROTECTED_RE, BOILERPLATE_RE).</item>
|
|
17
|
+
<item>RFC-1095: compass.summary.record, trim repair rewrite, commit integration</item>
|
|
18
|
+
<history>RFC-0349</history>
|
|
17
19
|
</CHANGE_SUMMARY>
|
|
18
20
|
*/
|
|
19
21
|
|
|
20
22
|
import { resolve } from "node:path";
|
|
21
23
|
import { readFile } from "node:fs/promises";
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
evaluateV2Rules,
|
|
25
|
-
getEntrySource,
|
|
26
|
-
resolveCompassMode,
|
|
27
|
-
GOVERNANCE_ID_RE,
|
|
28
|
-
} from "./compass-inventory.ts";
|
|
24
|
+
import { createCompassInventoryEntries } from "./compass-inventory.ts";
|
|
25
|
+
import { resolveCompassPolicy } from "../policy.ts";
|
|
29
26
|
import { resolveCompassScanRoot } from "./resolve-scan-root.ts";
|
|
30
27
|
import { writeFileIfChanged } from "../../../src/utils/fs-idempotent.ts";
|
|
28
|
+
import {
|
|
29
|
+
buildChangeSummaryBlock,
|
|
30
|
+
CHANGE_SUMMARY_WINDOW,
|
|
31
|
+
mergeHistoryIds,
|
|
32
|
+
parseChangeSummary,
|
|
33
|
+
} from "./summary-record.ts";
|
|
31
34
|
import type {
|
|
32
|
-
Diagnostic,
|
|
33
35
|
ForgeCommandInput,
|
|
34
36
|
ForgeCommandResult,
|
|
35
37
|
ForgeRuntimeContext,
|
|
36
38
|
} from "../../../src/types.ts";
|
|
37
39
|
|
|
38
|
-
const
|
|
39
|
-
const BOILERPLATE_RE =
|
|
40
|
-
/^(Wave\s+\d|Backfill\b|Annotate Compass|Annotation revision|Initial creation|Compass scaffolding|Created as part of|Enhance .* with Compass)/i;
|
|
41
|
-
|
|
42
|
-
export type ChangeSummaryItemClass = "protected" | "boilerplate" | "unprotected";
|
|
40
|
+
const CHANGE_SUMMARY_BLOCK_RE = /<CHANGE_SUMMARY>[\s\S]*?<\/CHANGE_SUMMARY>/;
|
|
43
41
|
|
|
44
|
-
export function
|
|
45
|
-
if (PROTECTED_RE.test(text)) return "protected";
|
|
46
|
-
if (BOILERPLATE_RE.test(text.trim())) return "boilerplate";
|
|
47
|
-
return "unprotected";
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function extractChangeSummaryBlock(source: string): string | null {
|
|
51
|
-
const match = source.match(/<CHANGE_SUMMARY>[\s\S]*?<\/CHANGE_SUMMARY>/);
|
|
52
|
-
return match?.[0] ?? null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function extractItems(block: string): string[] {
|
|
56
|
-
const items: string[] = [];
|
|
57
|
-
const re = /<item>([\s\S]*?)<\/item>/g;
|
|
58
|
-
let m: RegExpExecArray | null;
|
|
59
|
-
while ((m = re.exec(block)) !== null) {
|
|
60
|
-
items.push(m[1]!.trim());
|
|
61
|
-
}
|
|
62
|
-
return items;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function getLineCommentPrefix(filePath: string): string | null {
|
|
66
|
-
if (filePath.endsWith(".gd")) return "# ";
|
|
67
|
-
if (filePath.endsWith(".tscn") || filePath.endsWith(".tres")) return "; ";
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function rebuildChangeSummaryBlock(items: string[], filePath: string): string {
|
|
72
|
-
const prefix = getLineCommentPrefix(filePath);
|
|
73
|
-
const lines = ["<CHANGE_SUMMARY>"];
|
|
74
|
-
for (const item of items) {
|
|
75
|
-
lines.push(` <item>${item}</item>`);
|
|
76
|
-
}
|
|
77
|
-
lines.push("</CHANGE_SUMMARY>");
|
|
78
|
-
if (prefix) {
|
|
79
|
-
return lines.map((line, i) => (i === 0 ? line : prefix + line)).join("\n");
|
|
80
|
-
}
|
|
81
|
-
return lines.join("\n");
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function replaceChangeSummaryBlock(source: string, newBlock: string): string {
|
|
85
|
-
return source.replace(/<CHANGE_SUMMARY>[\s\S]*?<\/CHANGE_SUMMARY>/, newBlock);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const MAX_TOTAL_ITEMS = 30;
|
|
89
|
-
|
|
90
|
-
export async function runCompassChangeSummaryValidate(
|
|
42
|
+
export async function runCompassSummaryTrim(
|
|
91
43
|
input: ForgeCommandInput,
|
|
92
44
|
context: ForgeRuntimeContext,
|
|
93
45
|
): Promise<
|
|
94
46
|
ForgeCommandResult<{
|
|
95
47
|
command: string;
|
|
96
|
-
status: "
|
|
97
|
-
|
|
98
|
-
checkedFiles: number;
|
|
48
|
+
status: "ok";
|
|
49
|
+
files: Array<{ path: string; removed: string[]; kept: number }>;
|
|
99
50
|
}>
|
|
100
51
|
> {
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
try {
|
|
104
|
-
mode = resolveCompassMode(input);
|
|
105
|
-
} catch {
|
|
52
|
+
const mode = input.flags["mode"];
|
|
53
|
+
if (mode !== undefined && mode !== "repair") {
|
|
106
54
|
context.logger.error(
|
|
107
|
-
`[compass.
|
|
55
|
+
`[compass.summary.trim] invalid --mode value: ${String(mode)} (expected "repair")`,
|
|
108
56
|
);
|
|
109
57
|
return { exitCode: 1, summary: "invalid --mode value" };
|
|
110
58
|
}
|
|
111
|
-
const entries = await createCompassInventoryEntries(context.workspaceRoot, input, scanRoot);
|
|
112
|
-
|
|
113
|
-
const diagnostics: Diagnostic[] = [];
|
|
114
|
-
let checkedFiles = 0;
|
|
115
|
-
|
|
116
|
-
// RFC-1094: v2 CS rules (CS-05/06/07) are mode-aware; v1 rules (CS-01/02)
|
|
117
|
-
// stay at error severity in both modes until the sibling lifecycle RFC lands.
|
|
118
|
-
const v2Severity = mode === "error" ? "error" : "warning";
|
|
119
|
-
|
|
120
|
-
for (const entry of entries) {
|
|
121
|
-
if (entry.authoringStatus !== "authored" || entry.requiredScaffolding === "none") {
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
checkedFiles++;
|
|
126
|
-
|
|
127
|
-
const absPath = resolve(context.workspaceRoot, entry.path);
|
|
128
|
-
const source = getEntrySource(entry) ?? (await readFile(absPath, "utf8"));
|
|
129
|
-
|
|
130
|
-
for (const v2 of evaluateV2Rules(entry, source)) {
|
|
131
|
-
if (!v2.ruleId.startsWith("COMPASS-CS-")) {
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
diagnostics.push({
|
|
135
|
-
ruleId: v2.ruleId,
|
|
136
|
-
severity: v2Severity,
|
|
137
|
-
file: entry.path,
|
|
138
|
-
message: v2.message,
|
|
139
|
-
fixHint: v2.fix,
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (!entry.hasChangeSummary) {
|
|
144
|
-
continue;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
const block = extractChangeSummaryBlock(source);
|
|
148
|
-
if (!block) continue;
|
|
149
|
-
|
|
150
|
-
const items = extractItems(block);
|
|
151
|
-
let hasBoilerplate = false;
|
|
152
|
-
let totalItems = 0;
|
|
153
|
-
|
|
154
|
-
for (const item of items) {
|
|
155
|
-
const cls = classifyChangeSummaryItem(item);
|
|
156
|
-
if (cls === "boilerplate") {
|
|
157
|
-
hasBoilerplate = true;
|
|
158
|
-
}
|
|
159
|
-
totalItems++;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
if (hasBoilerplate) {
|
|
163
|
-
diagnostics.push({
|
|
164
|
-
ruleId: "COMPASS-CS-01",
|
|
165
|
-
severity: "error",
|
|
166
|
-
file: entry.path,
|
|
167
|
-
message: "CHANGE_SUMMARY contains a boilerplate item",
|
|
168
|
-
fixHint: "fix: run compass.summary.trim",
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (totalItems > MAX_TOTAL_ITEMS) {
|
|
173
|
-
diagnostics.push({
|
|
174
|
-
ruleId: "COMPASS-CS-02",
|
|
175
|
-
severity: "error",
|
|
176
|
-
file: entry.path,
|
|
177
|
-
message: `CHANGE_SUMMARY has ${totalItems} total items (cap is ${MAX_TOTAL_ITEMS})`,
|
|
178
|
-
fixHint: `fix: run compass.summary.trim (cap is ${MAX_TOTAL_ITEMS} total items)`,
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const failed = diagnostics.some((d) => d.severity === "error");
|
|
184
|
-
|
|
185
|
-
for (const d of diagnostics) {
|
|
186
|
-
const log = `[compass.changesummary.validate] ${d.ruleId}: ${d.file}: ${d.message}`;
|
|
187
|
-
if (d.severity === "error") {
|
|
188
|
-
context.logger.error(log);
|
|
189
|
-
} else {
|
|
190
|
-
context.logger.warn(log);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
return {
|
|
195
|
-
data: {
|
|
196
|
-
command: "compass.changesummary.validate",
|
|
197
|
-
status: failed ? "fail" : "pass",
|
|
198
|
-
diagnostics,
|
|
199
|
-
checkedFiles,
|
|
200
|
-
},
|
|
201
|
-
exitCode: failed ? 1 : 0,
|
|
202
|
-
summary: failed
|
|
203
|
-
? undefined
|
|
204
|
-
: `[compass.changesummary.validate] OK (${checkedFiles} authored files checked)`,
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
const TRIM_FALLBACK_ITEM = "Tidied by compass.summary.trim; see git history for prior entries.";
|
|
209
59
|
|
|
210
|
-
export async function runCompassSummaryTrim(
|
|
211
|
-
input: ForgeCommandInput,
|
|
212
|
-
context: ForgeRuntimeContext,
|
|
213
|
-
): Promise<
|
|
214
|
-
ForgeCommandResult<{
|
|
215
|
-
command: string;
|
|
216
|
-
status: "ok";
|
|
217
|
-
files: Array<{ path: string; removed: string[]; kept: number }>;
|
|
218
|
-
}>
|
|
219
|
-
> {
|
|
220
60
|
if (context.dryRun) {
|
|
221
61
|
context.logger.info(`[compass.summary.trim] dry-run active — will not apply changes`);
|
|
222
62
|
}
|
|
223
63
|
|
|
224
64
|
const scanRoot = resolveCompassScanRoot(input, context);
|
|
225
|
-
const
|
|
65
|
+
const policy = resolveCompassPolicy(context.workspaceRoot, context.forgeRoot);
|
|
66
|
+
const entries = await createCompassInventoryEntries(
|
|
67
|
+
context.workspaceRoot,
|
|
68
|
+
input,
|
|
69
|
+
scanRoot,
|
|
70
|
+
policy,
|
|
71
|
+
);
|
|
226
72
|
|
|
227
73
|
const results: Array<{ path: string; removed: string[]; kept: number }> = [];
|
|
228
74
|
|
|
@@ -237,58 +83,40 @@ export async function runCompassSummaryTrim(
|
|
|
237
83
|
|
|
238
84
|
const absPath = resolve(context.workspaceRoot, entry.path);
|
|
239
85
|
const source = await readFile(absPath, "utf8");
|
|
240
|
-
const
|
|
241
|
-
if (!
|
|
86
|
+
const blockMatch = source.match(CHANGE_SUMMARY_BLOCK_RE);
|
|
87
|
+
if (!blockMatch) continue;
|
|
242
88
|
|
|
243
|
-
const items =
|
|
244
|
-
const keptItems: string[] = [];
|
|
89
|
+
const { items, historyIds } = parseChangeSummary(blockMatch[0]);
|
|
245
90
|
const removedItems: string[] = [];
|
|
246
91
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
for (
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
if (cls === "protected") {
|
|
254
|
-
keptItems.push(text);
|
|
255
|
-
} else if (cls === "boilerplate") {
|
|
256
|
-
removedItems.push(text);
|
|
92
|
+
// v2 repair: drop ID-less items, collapse described items past the window.
|
|
93
|
+
const idItems: string[] = [];
|
|
94
|
+
for (const item of items) {
|
|
95
|
+
if (policy.idPatternPrefix.test(item)) {
|
|
96
|
+
idItems.push(item);
|
|
257
97
|
} else {
|
|
258
|
-
|
|
98
|
+
removedItems.push(item);
|
|
259
99
|
}
|
|
260
100
|
}
|
|
261
101
|
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
removedItems.push(item.text);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
const keepSet = new Set<string>();
|
|
272
|
-
for (const item of unprotectedToKeep) {
|
|
273
|
-
keepSet.add(item.text);
|
|
102
|
+
const collapsedIds: string[] = [];
|
|
103
|
+
while (idItems.length > CHANGE_SUMMARY_WINDOW) {
|
|
104
|
+
const oldest = idItems.shift()!;
|
|
105
|
+
const idMatch = oldest.match(policy.idPatternPrefix);
|
|
106
|
+
if (idMatch) collapsedIds.push(idMatch[0]);
|
|
107
|
+
removedItems.push(oldest);
|
|
274
108
|
}
|
|
275
109
|
|
|
276
|
-
const
|
|
277
|
-
const
|
|
278
|
-
|
|
110
|
+
const nextHistory = mergeHistoryIds(historyIds, collapsedIds, policy);
|
|
111
|
+
const historyChanged =
|
|
112
|
+
nextHistory.length !== historyIds.length || nextHistory.some((id, i) => id !== historyIds[i]);
|
|
279
113
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
finalItems.push(originalItem);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
if (finalItems.length === 0) {
|
|
287
|
-
finalItems.push(TRIM_FALLBACK_ITEM);
|
|
114
|
+
if (removedItems.length === 0 && !historyChanged) {
|
|
115
|
+
continue;
|
|
288
116
|
}
|
|
289
117
|
|
|
290
|
-
const newBlock =
|
|
291
|
-
const transformed =
|
|
118
|
+
const newBlock = buildChangeSummaryBlock(idItems, nextHistory, entry.path);
|
|
119
|
+
const transformed = source.replace(CHANGE_SUMMARY_BLOCK_RE, newBlock);
|
|
292
120
|
|
|
293
121
|
if (transformed === source) {
|
|
294
122
|
continue;
|
|
@@ -299,13 +127,13 @@ export async function runCompassSummaryTrim(
|
|
|
299
127
|
}
|
|
300
128
|
|
|
301
129
|
context.logger.info(
|
|
302
|
-
`[compass.summary.trim]
|
|
130
|
+
`[compass.summary.trim] repaired: ${entry.path} (removed ${removedItems.length}, kept ${idItems.length})`,
|
|
303
131
|
);
|
|
304
132
|
|
|
305
133
|
results.push({
|
|
306
134
|
path: entry.path,
|
|
307
135
|
removed: removedItems,
|
|
308
|
-
kept:
|
|
136
|
+
kept: idItems.length,
|
|
309
137
|
});
|
|
310
138
|
}
|
|
311
139
|
|
|
@@ -319,7 +147,7 @@ export async function runCompassSummaryTrim(
|
|
|
319
147
|
summary: `[compass.summary.trim] files=${results.length}, removed=${results.reduce((sum, r) => sum + r.removed.length, 0)}`,
|
|
320
148
|
nextSteps: [
|
|
321
149
|
{
|
|
322
|
-
action: `Commit the
|
|
150
|
+
action: `Commit the repaired headers: pnpm exec forge run ecosystem.commit`,
|
|
323
151
|
kind: "optional",
|
|
324
152
|
},
|
|
325
153
|
],
|
|
@@ -12,12 +12,16 @@ contract block specs alongside built-in MODULE_CONTRACT and CHANGE_SUMMARY check
|
|
|
12
12
|
</non-goals>
|
|
13
13
|
</MODULE_CONTRACT>
|
|
14
14
|
<CHANGE_SUMMARY>
|
|
15
|
-
<item>RFC-0348: v2 two-block contract — XML output updated, compass.validate emits COMPASS-* diagnostics, summary uses standard-required-files.</item>
|
|
16
|
-
<item>RFC-0350: added COMPASS-TODO-01 diagnostic for unfilled Compass TODO sentinels.</item>
|
|
17
|
-
<item>RFC-0556: moved from @warpgogol/site-kernel-checks to @warpgogol/forge for autonomous mode.</item>
|
|
18
|
-
<item>Game extensions: added COMPASS-SYNTAX-01 diagnostic validating comment syntax per file type (.gd needs # prefix, .tscn/.tres need ; prefix, .ts/.cs need block comment).</item>
|
|
19
15
|
<item>RFC-0943: added COMPASS-PLUGIN-01/02/03 diagnostics for pack-declared contract block specs from forge.plugin.yaml extensionPoints.</item>
|
|
20
16
|
<item>RFC-1094: --mode warning|error on compass.validate; mode-aware v2 diagnostics (KD/ORDER/PURPOSE) with severity field; inventory data.entries now carries full entries and XML gains v2 fields.</item>
|
|
17
|
+
<item>RFC-1095: summary-record unit tests, commit integration tests, CS rules into compass.validate</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 — packages/forge + services clean
|
|
22
|
+
|
|
23
|
+
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>
|
|
24
|
+
<history>RFC-0348, RFC-0350, RFC-0556</history>
|
|
21
25
|
</CHANGE_SUMMARY>
|
|
22
26
|
*/
|
|
23
27
|
|
|
@@ -31,6 +35,7 @@ import {
|
|
|
31
35
|
type CompassInventoryEntry,
|
|
32
36
|
} from "./compass-inventory.ts";
|
|
33
37
|
import { resolveCompassScanRoot } from "./resolve-scan-root.ts";
|
|
38
|
+
import { resolveCompassPolicy, type CompassPolicySource } from "../policy.ts";
|
|
34
39
|
import { writeFileIfChanged } from "../../../src/utils/fs-idempotent.ts";
|
|
35
40
|
import { loadForgeConfig } from "../../../src/config/forge-config.ts";
|
|
36
41
|
import {
|
|
@@ -259,10 +264,12 @@ export async function runCompassInventory(
|
|
|
259
264
|
entries: CompassInventoryEntry[];
|
|
260
265
|
outputPath: string;
|
|
261
266
|
summary: CompassInventorySummary;
|
|
267
|
+
policySource: CompassPolicySource;
|
|
262
268
|
}>
|
|
263
269
|
> {
|
|
264
270
|
const scanRoot = resolveCompassScanRoot(input, context) ?? context.workspaceRoot;
|
|
265
|
-
const
|
|
271
|
+
const policy = resolveCompassPolicy(scanRoot, context.forgeRoot);
|
|
272
|
+
const entries = await createCompassInventoryEntries(scanRoot, input, undefined, policy);
|
|
266
273
|
const summary = summarizeInventory(entries);
|
|
267
274
|
|
|
268
275
|
context.logger.info(
|
|
@@ -274,7 +281,7 @@ export async function runCompassInventory(
|
|
|
274
281
|
`[compass.inventory] dry-run active — skipped writing ${INVENTORY_OUTPUT_PATH}`,
|
|
275
282
|
);
|
|
276
283
|
return {
|
|
277
|
-
data: { entries, outputPath: INVENTORY_OUTPUT_PATH, summary },
|
|
284
|
+
data: { entries, outputPath: INVENTORY_OUTPUT_PATH, summary, policySource: policy.source },
|
|
278
285
|
summary: `[compass.inventory] previewed ${INVENTORY_OUTPUT_PATH}`,
|
|
279
286
|
nextSteps: [
|
|
280
287
|
{
|
|
@@ -290,7 +297,7 @@ export async function runCompassInventory(
|
|
|
290
297
|
await writeFileIfChanged(outputPath, xml);
|
|
291
298
|
|
|
292
299
|
return {
|
|
293
|
-
data: { entries, outputPath, summary },
|
|
300
|
+
data: { entries, outputPath, summary, policySource: policy.source },
|
|
294
301
|
summary: `[compass.inventory] ${context.dryRun ? "previewed" : "wrote"} ${INVENTORY_OUTPUT_PATH}`,
|
|
295
302
|
nextSteps: context.dryRun
|
|
296
303
|
? [
|
|
@@ -335,7 +342,13 @@ export async function runCompassValidation(
|
|
|
335
342
|
);
|
|
336
343
|
return { exitCode: 1, summary: "invalid --mode value" };
|
|
337
344
|
}
|
|
338
|
-
const
|
|
345
|
+
const policy = resolveCompassPolicy(context.workspaceRoot, context.forgeRoot);
|
|
346
|
+
const entries = await createCompassInventoryEntries(
|
|
347
|
+
context.workspaceRoot,
|
|
348
|
+
input,
|
|
349
|
+
scanRoot,
|
|
350
|
+
policy,
|
|
351
|
+
);
|
|
339
352
|
const summary = summarizeInventory(entries);
|
|
340
353
|
const failures = entries.filter(
|
|
341
354
|
(entry) =>
|
|
@@ -355,9 +368,14 @@ export async function runCompassValidation(
|
|
|
355
368
|
|
|
356
369
|
// RFC-1094: v2 rules are mode-aware — warnings in `warning` mode (default
|
|
357
370
|
// during the migration window), errors in `error` mode. Owned subset:
|
|
358
|
-
// COMPASS-KD-*, COMPASS-ORDER-01, COMPASS-PURPOSE
|
|
359
|
-
//
|
|
360
|
-
const V2_VALIDATE_RULE_PREFIXES = [
|
|
371
|
+
// COMPASS-KD-*, COMPASS-ORDER-01, COMPASS-PURPOSE-*, COMPASS-CS-*.
|
|
372
|
+
// RFC-1095: CS-* rules moved here — compass.changesummary.validate is removed.
|
|
373
|
+
const V2_VALIDATE_RULE_PREFIXES = [
|
|
374
|
+
"COMPASS-KD-",
|
|
375
|
+
"COMPASS-ORDER-",
|
|
376
|
+
"COMPASS-PURPOSE-",
|
|
377
|
+
"COMPASS-CS-",
|
|
378
|
+
];
|
|
361
379
|
const v2Severity = mode === "error" ? "error" : "warning";
|
|
362
380
|
const authoredEntries = entries.filter(
|
|
363
381
|
(entry) => entry.authoringStatus === "authored" && entry.requiredScaffolding !== "none",
|
|
@@ -365,7 +383,7 @@ export async function runCompassValidation(
|
|
|
365
383
|
for (const entry of authoredEntries) {
|
|
366
384
|
const absPath = resolve(context.workspaceRoot, entry.path);
|
|
367
385
|
const source = getEntrySource(entry) ?? (await readFile(absPath, "utf8"));
|
|
368
|
-
for (const v2 of evaluateV2Rules(entry, source)) {
|
|
386
|
+
for (const v2 of evaluateV2Rules(entry, source, policy)) {
|
|
369
387
|
if (!V2_VALIDATE_RULE_PREFIXES.some((prefix) => v2.ruleId.startsWith(prefix))) {
|
|
370
388
|
continue;
|
|
371
389
|
}
|