@warpgogol/forge 1.2.2 → 2.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 +1 -0
- package/README.md +33 -19
- package/README.uk.md +33 -19
- package/package.json +1 -1
- package/profiles/astro-typescript-turborepo.yaml +147 -0
- package/profiles/forge-shell.yaml +120 -1
- package/profiles/godot-csharp.yaml +280 -6
- package/profiles/phaser-turborepo.yaml +134 -0
- package/skills/_shared/fo-pipeline-conventions.md +55 -0
- package/skills/fo/fo-doc-audit/SKILL.md +2 -2
- package/skills/fo/fo-idea-i-just-want-to-see-the-plan/SKILL.md +2 -0
- package/skills/fo/fo-idea-i-just-want-to-see-the-result/SKILL.md +7 -3
- package/skills/fo/fo-idea-implement/SKILL.md +50 -46
- package/skills/fo/fo-session-retro/SKILL.md +2 -2
- package/dist/bin/cli.d.ts +0 -3
- package/dist/bin/cli.d.ts.map +0 -1
- package/dist/bin/cli.js +0 -292
- package/dist/bin/cli.js.map +0 -1
- package/dist/os/adr/adr.module.d.ts +0 -3
- package/dist/os/adr/adr.module.d.ts.map +0 -1
- package/dist/os/adr/adr.module.js +0 -145
- package/dist/os/adr/adr.module.js.map +0 -1
- package/dist/os/adr/frontmatter-io.d.ts +0 -12
- package/dist/os/adr/frontmatter-io.d.ts.map +0 -1
- package/dist/os/adr/frontmatter-io.js +0 -67
- package/dist/os/adr/frontmatter-io.js.map +0 -1
- package/dist/os/adr/handlers/archive.d.ts +0 -24
- package/dist/os/adr/handlers/archive.d.ts.map +0 -1
- package/dist/os/adr/handlers/archive.js +0 -194
- package/dist/os/adr/handlers/archive.js.map +0 -1
- package/dist/os/adr/handlers/implement-stamp.d.ts +0 -4
- package/dist/os/adr/handlers/implement-stamp.d.ts.map +0 -1
- package/dist/os/adr/handlers/implement-stamp.js +0 -258
- package/dist/os/adr/handlers/implement-stamp.js.map +0 -1
- package/dist/os/adr/handlers/list-create.d.ts +0 -5
- package/dist/os/adr/handlers/list-create.d.ts.map +0 -1
- package/dist/os/adr/handlers/list-create.js +0 -165
- package/dist/os/adr/handlers/list-create.js.map +0 -1
- package/dist/os/adr/handlers/validate.d.ts +0 -4
- package/dist/os/adr/handlers/validate.d.ts.map +0 -1
- package/dist/os/adr/handlers/validate.js +0 -265
- package/dist/os/adr/handlers/validate.js.map +0 -1
- package/dist/os/adr/index.d.ts +0 -8
- package/dist/os/adr/index.d.ts.map +0 -1
- package/dist/os/adr/index.js +0 -18
- package/dist/os/adr/index.js.map +0 -1
- package/dist/os/adr/types.d.ts +0 -75
- package/dist/os/adr/types.d.ts.map +0 -1
- package/dist/os/adr/types.js +0 -55
- package/dist/os/adr/types.js.map +0 -1
- package/dist/os/audit/audit.module.d.ts +0 -3
- package/dist/os/audit/audit.module.d.ts.map +0 -1
- package/dist/os/audit/audit.module.js +0 -44
- package/dist/os/audit/audit.module.js.map +0 -1
- package/dist/os/audit/frontmatter-io.d.ts +0 -12
- package/dist/os/audit/frontmatter-io.d.ts.map +0 -1
- package/dist/os/audit/frontmatter-io.js +0 -71
- package/dist/os/audit/frontmatter-io.js.map +0 -1
- package/dist/os/audit/handlers/archive.d.ts +0 -4
- package/dist/os/audit/handlers/archive.d.ts.map +0 -1
- package/dist/os/audit/handlers/archive.js +0 -207
- package/dist/os/audit/handlers/archive.js.map +0 -1
- package/dist/os/audit/index.d.ts +0 -6
- package/dist/os/audit/index.d.ts.map +0 -1
- package/dist/os/audit/index.js +0 -16
- package/dist/os/audit/index.js.map +0 -1
- package/dist/os/audit/types.d.ts +0 -12
- package/dist/os/audit/types.d.ts.map +0 -1
- package/dist/os/audit/types.js +0 -17
- package/dist/os/audit/types.js.map +0 -1
- package/dist/os/compass/compass.module.d.ts +0 -3
- package/dist/os/compass/compass.module.d.ts.map +0 -1
- package/dist/os/compass/compass.module.js +0 -166
- package/dist/os/compass/compass.module.js.map +0 -1
- package/dist/os/compass/handlers/compass-audit-handler.d.ts +0 -36
- package/dist/os/compass/handlers/compass-audit-handler.d.ts.map +0 -1
- package/dist/os/compass/handlers/compass-audit-handler.js +0 -238
- package/dist/os/compass/handlers/compass-audit-handler.js.map +0 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.d.ts +0 -19
- package/dist/os/compass/handlers/compass-change-summary-handler.d.ts.map +0 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.js +0 -205
- package/dist/os/compass/handlers/compass-change-summary-handler.js.map +0 -1
- package/dist/os/compass/handlers/compass-inventory-handler.d.ts +0 -28
- package/dist/os/compass/handlers/compass-inventory-handler.d.ts.map +0 -1
- package/dist/os/compass/handlers/compass-inventory-handler.js +0 -213
- package/dist/os/compass/handlers/compass-inventory-handler.js.map +0 -1
- package/dist/os/compass/handlers/compass-inventory.d.ts +0 -30
- package/dist/os/compass/handlers/compass-inventory.d.ts.map +0 -1
- package/dist/os/compass/handlers/compass-inventory.js +0 -418
- package/dist/os/compass/handlers/compass-inventory.js.map +0 -1
- package/dist/os/compass/handlers/git-revision.d.ts +0 -8
- package/dist/os/compass/handlers/git-revision.d.ts.map +0 -1
- package/dist/os/compass/handlers/git-revision.js +0 -99
- package/dist/os/compass/handlers/git-revision.js.map +0 -1
- package/dist/os/compass/handlers/resolve-scan-root.d.ts +0 -3
- package/dist/os/compass/handlers/resolve-scan-root.d.ts.map +0 -1
- package/dist/os/compass/handlers/resolve-scan-root.js +0 -57
- package/dist/os/compass/handlers/resolve-scan-root.js.map +0 -1
- package/dist/os/compass/index.d.ts +0 -8
- package/dist/os/compass/index.d.ts.map +0 -1
- package/dist/os/compass/index.js +0 -19
- package/dist/os/compass/index.js.map +0 -1
- package/dist/os/core/core.module.d.ts +0 -3
- package/dist/os/core/core.module.d.ts.map +0 -1
- package/dist/os/core/core.module.js +0 -758
- package/dist/os/core/core.module.js.map +0 -1
- package/dist/os/core/handlers/assets-check.d.ts +0 -19
- package/dist/os/core/handlers/assets-check.d.ts.map +0 -1
- package/dist/os/core/handlers/assets-check.js +0 -89
- package/dist/os/core/handlers/assets-check.js.map +0 -1
- package/dist/os/core/handlers/assets-helpers.d.ts +0 -28
- package/dist/os/core/handlers/assets-helpers.d.ts.map +0 -1
- package/dist/os/core/handlers/assets-helpers.js +0 -128
- package/dist/os/core/handlers/assets-helpers.js.map +0 -1
- package/dist/os/core/handlers/assets-list.d.ts +0 -9
- package/dist/os/core/handlers/assets-list.d.ts.map +0 -1
- package/dist/os/core/handlers/assets-list.js +0 -72
- package/dist/os/core/handlers/assets-list.js.map +0 -1
- package/dist/os/core/handlers/build.d.ts +0 -16
- package/dist/os/core/handlers/build.d.ts.map +0 -1
- package/dist/os/core/handlers/build.js +0 -123
- package/dist/os/core/handlers/build.js.map +0 -1
- package/dist/os/core/handlers/determinism-check.d.ts +0 -20
- package/dist/os/core/handlers/determinism-check.d.ts.map +0 -1
- package/dist/os/core/handlers/determinism-check.js +0 -289
- package/dist/os/core/handlers/determinism-check.js.map +0 -1
- package/dist/os/core/handlers/dev.d.ts +0 -10
- package/dist/os/core/handlers/dev.d.ts.map +0 -1
- package/dist/os/core/handlers/dev.js +0 -102
- package/dist/os/core/handlers/dev.js.map +0 -1
- package/dist/os/core/handlers/knowledge-compact.d.ts +0 -4
- package/dist/os/core/handlers/knowledge-compact.d.ts.map +0 -1
- package/dist/os/core/handlers/knowledge-compact.js +0 -198
- package/dist/os/core/handlers/knowledge-compact.js.map +0 -1
- package/dist/os/core/handlers/pinned-check.d.ts +0 -49
- package/dist/os/core/handlers/pinned-check.d.ts.map +0 -1
- package/dist/os/core/handlers/pinned-check.js +0 -159
- package/dist/os/core/handlers/pinned-check.js.map +0 -1
- package/dist/os/core/handlers/pinned-init.d.ts +0 -19
- package/dist/os/core/handlers/pinned-init.d.ts.map +0 -1
- package/dist/os/core/handlers/pinned-init.js +0 -283
- package/dist/os/core/handlers/pinned-init.js.map +0 -1
- package/dist/os/core/handlers/pinned-types.d.ts +0 -29
- package/dist/os/core/handlers/pinned-types.d.ts.map +0 -1
- package/dist/os/core/handlers/pinned-types.js +0 -16
- package/dist/os/core/handlers/pinned-types.js.map +0 -1
- package/dist/os/core/handlers/pinned-validate.d.ts +0 -4
- package/dist/os/core/handlers/pinned-validate.d.ts.map +0 -1
- package/dist/os/core/handlers/pinned-validate.js +0 -248
- package/dist/os/core/handlers/pinned-validate.js.map +0 -1
- package/dist/os/core/handlers/profile-resolve.d.ts +0 -13
- package/dist/os/core/handlers/profile-resolve.d.ts.map +0 -1
- package/dist/os/core/handlers/profile-resolve.js +0 -65
- package/dist/os/core/handlers/profile-resolve.js.map +0 -1
- package/dist/os/core/handlers/release-prepare.d.ts +0 -25
- package/dist/os/core/handlers/release-prepare.d.ts.map +0 -1
- package/dist/os/core/handlers/release-prepare.js +0 -228
- package/dist/os/core/handlers/release-prepare.js.map +0 -1
- package/dist/os/core/handlers/release-publish.d.ts +0 -13
- package/dist/os/core/handlers/release-publish.d.ts.map +0 -1
- package/dist/os/core/handlers/release-publish.js +0 -173
- package/dist/os/core/handlers/release-publish.js.map +0 -1
- package/dist/os/core/handlers/validate.d.ts +0 -26
- package/dist/os/core/handlers/validate.d.ts.map +0 -1
- package/dist/os/core/handlers/validate.js +0 -208
- package/dist/os/core/handlers/validate.js.map +0 -1
- package/dist/os/core/handlers/workspace-deps.d.ts +0 -12
- package/dist/os/core/handlers/workspace-deps.d.ts.map +0 -1
- package/dist/os/core/handlers/workspace-deps.js +0 -39
- package/dist/os/core/handlers/workspace-deps.js.map +0 -1
- package/dist/os/core/index.d.ts +0 -2
- package/dist/os/core/index.d.ts.map +0 -1
- package/dist/os/core/index.js +0 -13
- package/dist/os/core/index.js.map +0 -1
- package/dist/os/exploration/exploration.module.d.ts +0 -3
- package/dist/os/exploration/exploration.module.d.ts.map +0 -1
- package/dist/os/exploration/exploration.module.js +0 -82
- package/dist/os/exploration/exploration.module.js.map +0 -1
- package/dist/os/exploration/frontmatter-io.d.ts +0 -13
- package/dist/os/exploration/frontmatter-io.d.ts.map +0 -1
- package/dist/os/exploration/frontmatter-io.js +0 -61
- package/dist/os/exploration/frontmatter-io.js.map +0 -1
- package/dist/os/exploration/handlers/archive.d.ts +0 -4
- package/dist/os/exploration/handlers/archive.d.ts.map +0 -1
- package/dist/os/exploration/handlers/archive.js +0 -135
- package/dist/os/exploration/handlers/archive.js.map +0 -1
- package/dist/os/exploration/handlers/list.d.ts +0 -4
- package/dist/os/exploration/handlers/list.d.ts.map +0 -1
- package/dist/os/exploration/handlers/list.js +0 -56
- package/dist/os/exploration/handlers/list.js.map +0 -1
- package/dist/os/exploration/handlers/show.d.ts +0 -4
- package/dist/os/exploration/handlers/show.d.ts.map +0 -1
- package/dist/os/exploration/handlers/show.js +0 -91
- package/dist/os/exploration/handlers/show.js.map +0 -1
- package/dist/os/exploration/index.d.ts +0 -7
- package/dist/os/exploration/index.d.ts.map +0 -1
- package/dist/os/exploration/index.js +0 -17
- package/dist/os/exploration/index.js.map +0 -1
- package/dist/os/exploration/types.d.ts +0 -38
- package/dist/os/exploration/types.d.ts.map +0 -1
- package/dist/os/exploration/types.js +0 -23
- package/dist/os/exploration/types.js.map +0 -1
- package/dist/os/mission/handlers/archive.d.ts +0 -4
- package/dist/os/mission/handlers/archive.d.ts.map +0 -1
- package/dist/os/mission/handlers/archive.js +0 -356
- package/dist/os/mission/handlers/archive.js.map +0 -1
- package/dist/os/mission/index.d.ts +0 -2
- package/dist/os/mission/index.d.ts.map +0 -1
- package/dist/os/mission/index.js +0 -2
- package/dist/os/mission/index.js.map +0 -1
- package/dist/os/mission/mission.module.d.ts +0 -3
- package/dist/os/mission/mission.module.d.ts.map +0 -1
- package/dist/os/mission/mission.module.js +0 -44
- package/dist/os/mission/mission.module.js.map +0 -1
- package/dist/os/mission/types.d.ts +0 -23
- package/dist/os/mission/types.d.ts.map +0 -1
- package/dist/os/mission/types.js +0 -18
- package/dist/os/mission/types.js.map +0 -1
- package/dist/os/naming/index.d.ts +0 -3
- package/dist/os/naming/index.d.ts.map +0 -1
- package/dist/os/naming/index.js +0 -14
- package/dist/os/naming/index.js.map +0 -1
- package/dist/os/naming/naming-convention.d.ts +0 -25
- package/dist/os/naming/naming-convention.d.ts.map +0 -1
- package/dist/os/naming/naming-convention.js +0 -324
- package/dist/os/naming/naming-convention.js.map +0 -1
- package/dist/os/naming/naming.module.d.ts +0 -3
- package/dist/os/naming/naming.module.d.ts.map +0 -1
- package/dist/os/naming/naming.module.js +0 -33
- package/dist/os/naming/naming.module.js.map +0 -1
- package/dist/os/notes/index.d.ts +0 -2
- package/dist/os/notes/index.d.ts.map +0 -1
- package/dist/os/notes/index.js +0 -10
- package/dist/os/notes/index.js.map +0 -1
- package/dist/os/notes/notes.module.d.ts +0 -3
- package/dist/os/notes/notes.module.d.ts.map +0 -1
- package/dist/os/notes/notes.module.js +0 -83
- package/dist/os/notes/notes.module.js.map +0 -1
- package/dist/os/plan/frontmatter-io.d.ts +0 -12
- package/dist/os/plan/frontmatter-io.d.ts.map +0 -1
- package/dist/os/plan/frontmatter-io.js +0 -69
- package/dist/os/plan/frontmatter-io.js.map +0 -1
- package/dist/os/plan/handlers/archive.d.ts +0 -4
- package/dist/os/plan/handlers/archive.d.ts.map +0 -1
- package/dist/os/plan/handlers/archive.js +0 -206
- package/dist/os/plan/handlers/archive.js.map +0 -1
- package/dist/os/plan/index.d.ts +0 -6
- package/dist/os/plan/index.d.ts.map +0 -1
- package/dist/os/plan/index.js +0 -16
- package/dist/os/plan/index.js.map +0 -1
- package/dist/os/plan/plan.module.d.ts +0 -3
- package/dist/os/plan/plan.module.d.ts.map +0 -1
- package/dist/os/plan/plan.module.js +0 -44
- package/dist/os/plan/plan.module.js.map +0 -1
- package/dist/os/plan/types.d.ts +0 -12
- package/dist/os/plan/types.d.ts.map +0 -1
- package/dist/os/plan/types.js +0 -17
- package/dist/os/plan/types.js.map +0 -1
- package/dist/os/program/discovery.d.ts +0 -61
- package/dist/os/program/discovery.d.ts.map +0 -1
- package/dist/os/program/discovery.js +0 -236
- package/dist/os/program/discovery.js.map +0 -1
- package/dist/os/program/handlers/complete.d.ts +0 -12
- package/dist/os/program/handlers/complete.d.ts.map +0 -1
- package/dist/os/program/handlers/complete.js +0 -344
- package/dist/os/program/handlers/complete.js.map +0 -1
- package/dist/os/program/handlers/lease.d.ts +0 -13
- package/dist/os/program/handlers/lease.d.ts.map +0 -1
- package/dist/os/program/handlers/lease.js +0 -322
- package/dist/os/program/handlers/lease.js.map +0 -1
- package/dist/os/program/handlers/seal.d.ts +0 -12
- package/dist/os/program/handlers/seal.d.ts.map +0 -1
- package/dist/os/program/handlers/seal.js +0 -265
- package/dist/os/program/handlers/seal.js.map +0 -1
- package/dist/os/program/handlers/validate.d.ts +0 -14
- package/dist/os/program/handlers/validate.d.ts.map +0 -1
- package/dist/os/program/handlers/validate.js +0 -164
- package/dist/os/program/handlers/validate.js.map +0 -1
- package/dist/os/program/lease.d.ts +0 -39
- package/dist/os/program/lease.d.ts.map +0 -1
- package/dist/os/program/lease.js +0 -129
- package/dist/os/program/lease.js.map +0 -1
- package/dist/os/program/program.module.d.ts +0 -3
- package/dist/os/program/program.module.d.ts.map +0 -1
- package/dist/os/program/program.module.js +0 -201
- package/dist/os/program/program.module.js.map +0 -1
- package/dist/os/program/schemas.d.ts +0 -225
- package/dist/os/program/schemas.d.ts.map +0 -1
- package/dist/os/program/schemas.js +0 -174
- package/dist/os/program/schemas.js.map +0 -1
- package/dist/os/program/state.d.ts +0 -38
- package/dist/os/program/state.d.ts.map +0 -1
- package/dist/os/program/state.js +0 -189
- package/dist/os/program/state.js.map +0 -1
- package/dist/os/rfc/acceptance.d.ts +0 -15
- package/dist/os/rfc/acceptance.d.ts.map +0 -1
- package/dist/os/rfc/acceptance.js +0 -310
- package/dist/os/rfc/acceptance.js.map +0 -1
- package/dist/os/rfc/decision-log.d.ts +0 -6
- package/dist/os/rfc/decision-log.d.ts.map +0 -1
- package/dist/os/rfc/decision-log.js +0 -269
- package/dist/os/rfc/decision-log.js.map +0 -1
- package/dist/os/rfc/dna-trace.d.ts +0 -27
- package/dist/os/rfc/dna-trace.d.ts.map +0 -1
- package/dist/os/rfc/dna-trace.js +0 -214
- package/dist/os/rfc/dna-trace.js.map +0 -1
- package/dist/os/rfc/frontmatter-io.d.ts +0 -18
- package/dist/os/rfc/frontmatter-io.d.ts.map +0 -1
- package/dist/os/rfc/frontmatter-io.js +0 -110
- package/dist/os/rfc/frontmatter-io.js.map +0 -1
- package/dist/os/rfc/handlers/archive.d.ts +0 -25
- package/dist/os/rfc/handlers/archive.d.ts.map +0 -1
- package/dist/os/rfc/handlers/archive.js +0 -247
- package/dist/os/rfc/handlers/archive.js.map +0 -1
- package/dist/os/rfc/handlers/check.d.ts +0 -4
- package/dist/os/rfc/handlers/check.d.ts.map +0 -1
- package/dist/os/rfc/handlers/check.js +0 -195
- package/dist/os/rfc/handlers/check.js.map +0 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts +0 -4
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +0 -1
- package/dist/os/rfc/handlers/implement-stamp.js +0 -420
- package/dist/os/rfc/handlers/implement-stamp.js.map +0 -1
- package/dist/os/rfc/handlers/index-graph.d.ts +0 -13
- package/dist/os/rfc/handlers/index-graph.d.ts.map +0 -1
- package/dist/os/rfc/handlers/index-graph.js +0 -192
- package/dist/os/rfc/handlers/index-graph.js.map +0 -1
- package/dist/os/rfc/handlers/lifecycle.d.ts +0 -13
- package/dist/os/rfc/handlers/lifecycle.d.ts.map +0 -1
- package/dist/os/rfc/handlers/lifecycle.js +0 -155
- package/dist/os/rfc/handlers/lifecycle.js.map +0 -1
- package/dist/os/rfc/handlers/list-create.d.ts +0 -6
- package/dist/os/rfc/handlers/list-create.d.ts.map +0 -1
- package/dist/os/rfc/handlers/list-create.js +0 -240
- package/dist/os/rfc/handlers/list-create.js.map +0 -1
- package/dist/os/rfc/handlers/pipeline-status.d.ts +0 -26
- package/dist/os/rfc/handlers/pipeline-status.d.ts.map +0 -1
- package/dist/os/rfc/handlers/pipeline-status.js +0 -124
- package/dist/os/rfc/handlers/pipeline-status.js.map +0 -1
- package/dist/os/rfc/handlers/shared.d.ts +0 -22
- package/dist/os/rfc/handlers/shared.d.ts.map +0 -1
- package/dist/os/rfc/handlers/shared.js +0 -105
- package/dist/os/rfc/handlers/shared.js.map +0 -1
- package/dist/os/rfc/handlers/supersede-propose.d.ts +0 -4
- package/dist/os/rfc/handlers/supersede-propose.d.ts.map +0 -1
- package/dist/os/rfc/handlers/supersede-propose.js +0 -203
- package/dist/os/rfc/handlers/supersede-propose.js.map +0 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts +0 -32
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +0 -1
- package/dist/os/rfc/handlers/validate-rules.js +0 -590
- package/dist/os/rfc/handlers/validate-rules.js.map +0 -1
- package/dist/os/rfc/handlers/validate.d.ts +0 -4
- package/dist/os/rfc/handlers/validate.d.ts.map +0 -1
- package/dist/os/rfc/handlers/validate.js +0 -108
- package/dist/os/rfc/handlers/validate.js.map +0 -1
- package/dist/os/rfc/handlers.d.ts +0 -7
- package/dist/os/rfc/handlers.d.ts.map +0 -1
- package/dist/os/rfc/handlers.js +0 -19
- package/dist/os/rfc/handlers.js.map +0 -1
- package/dist/os/rfc/index.d.ts +0 -18
- package/dist/os/rfc/index.d.ts.map +0 -1
- package/dist/os/rfc/index.js +0 -24
- package/dist/os/rfc/index.js.map +0 -1
- package/dist/os/rfc/rfc.module.d.ts +0 -3
- package/dist/os/rfc/rfc.module.d.ts.map +0 -1
- package/dist/os/rfc/rfc.module.js +0 -366
- package/dist/os/rfc/rfc.module.js.map +0 -1
- package/dist/os/rfc/types.d.ts +0 -483
- package/dist/os/rfc/types.d.ts.map +0 -1
- package/dist/os/rfc/types.js +0 -100
- package/dist/os/rfc/types.js.map +0 -1
- package/dist/os/rfc/verification-evidence.d.ts +0 -8
- package/dist/os/rfc/verification-evidence.d.ts.map +0 -1
- package/dist/os/rfc/verification-evidence.js +0 -184
- package/dist/os/rfc/verification-evidence.js.map +0 -1
- package/dist/os/session/atif-parser.d.ts +0 -29
- package/dist/os/session/atif-parser.d.ts.map +0 -1
- package/dist/os/session/atif-parser.js +0 -140
- package/dist/os/session/atif-parser.js.map +0 -1
- package/dist/os/session/frontmatter-io.d.ts +0 -31
- package/dist/os/session/frontmatter-io.d.ts.map +0 -1
- package/dist/os/session/frontmatter-io.js +0 -146
- package/dist/os/session/frontmatter-io.js.map +0 -1
- package/dist/os/session/handlers/archive.d.ts +0 -4
- package/dist/os/session/handlers/archive.d.ts.map +0 -1
- package/dist/os/session/handlers/archive.js +0 -241
- package/dist/os/session/handlers/archive.js.map +0 -1
- package/dist/os/session/handlers/list.d.ts +0 -4
- package/dist/os/session/handlers/list.d.ts.map +0 -1
- package/dist/os/session/handlers/list.js +0 -147
- package/dist/os/session/handlers/list.js.map +0 -1
- package/dist/os/session/handlers/save.d.ts +0 -6
- package/dist/os/session/handlers/save.d.ts.map +0 -1
- package/dist/os/session/handlers/save.js +0 -297
- package/dist/os/session/handlers/save.js.map +0 -1
- package/dist/os/session/handlers/validate.d.ts +0 -4
- package/dist/os/session/handlers/validate.d.ts.map +0 -1
- package/dist/os/session/handlers/validate.js +0 -188
- package/dist/os/session/handlers/validate.js.map +0 -1
- package/dist/os/session/index.d.ts +0 -9
- package/dist/os/session/index.d.ts.map +0 -1
- package/dist/os/session/index.js +0 -20
- package/dist/os/session/index.js.map +0 -1
- package/dist/os/session/session.module.d.ts +0 -3
- package/dist/os/session/session.module.d.ts.map +0 -1
- package/dist/os/session/session.module.js +0 -115
- package/dist/os/session/session.module.js.map +0 -1
- package/dist/os/session/types.d.ts +0 -101
- package/dist/os/session/types.d.ts.map +0 -1
- package/dist/os/session/types.js +0 -52
- package/dist/os/session/types.js.map +0 -1
- package/dist/os/spec/live-spec-list.d.ts +0 -4
- package/dist/os/spec/live-spec-list.d.ts.map +0 -1
- package/dist/os/spec/live-spec-list.js +0 -64
- package/dist/os/spec/live-spec-list.js.map +0 -1
- package/dist/os/spec/live-spec-merge.d.ts +0 -4
- package/dist/os/spec/live-spec-merge.d.ts.map +0 -1
- package/dist/os/spec/live-spec-merge.js +0 -345
- package/dist/os/spec/live-spec-merge.js.map +0 -1
- package/dist/os/spec/live-spec-show.d.ts +0 -4
- package/dist/os/spec/live-spec-show.d.ts.map +0 -1
- package/dist/os/spec/live-spec-show.js +0 -99
- package/dist/os/spec/live-spec-show.js.map +0 -1
- package/dist/os/spec/live-spec-types.d.ts +0 -71
- package/dist/os/spec/live-spec-types.d.ts.map +0 -1
- package/dist/os/spec/live-spec-types.js +0 -14
- package/dist/os/spec/live-spec-types.js.map +0 -1
- package/dist/os/spec/live-spec-validate.d.ts +0 -4
- package/dist/os/spec/live-spec-validate.d.ts.map +0 -1
- package/dist/os/spec/live-spec-validate.js +0 -140
- package/dist/os/spec/live-spec-validate.js.map +0 -1
- package/dist/os/spec/spec-materialize.d.ts +0 -21
- package/dist/os/spec/spec-materialize.d.ts.map +0 -1
- package/dist/os/spec/spec-materialize.js +0 -336
- package/dist/os/spec/spec-materialize.js.map +0 -1
- package/dist/os/spec/spec-schema.d.ts +0 -126
- package/dist/os/spec/spec-schema.d.ts.map +0 -1
- package/dist/os/spec/spec-schema.js +0 -118
- package/dist/os/spec/spec-schema.js.map +0 -1
- package/dist/os/spec/spec-status.d.ts +0 -33
- package/dist/os/spec/spec-status.d.ts.map +0 -1
- package/dist/os/spec/spec-status.js +0 -222
- package/dist/os/spec/spec-status.js.map +0 -1
- package/dist/os/spec/spec-validate.d.ts +0 -4
- package/dist/os/spec/spec-validate.d.ts.map +0 -1
- package/dist/os/spec/spec-validate.js +0 -435
- package/dist/os/spec/spec-validate.js.map +0 -1
- package/dist/os/spec/spec.module.d.ts +0 -3
- package/dist/os/spec/spec.module.d.ts.map +0 -1
- package/dist/os/spec/spec.module.js +0 -119
- package/dist/os/spec/spec.module.js.map +0 -1
- package/dist/os/werkstatt/handlers/lock.d.ts +0 -10
- package/dist/os/werkstatt/handlers/lock.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/lock.js +0 -153
- package/dist/os/werkstatt/handlers/lock.js.map +0 -1
- package/dist/os/werkstatt/handlers/schema.d.ts +0 -33
- package/dist/os/werkstatt/handlers/schema.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/schema.js +0 -42
- package/dist/os/werkstatt/handlers/schema.js.map +0 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts +0 -15
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +0 -144
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +0 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-status.d.ts +0 -18
- package/dist/os/werkstatt/handlers/werkstatt-lock-status.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-status.js +0 -43
- package/dist/os/werkstatt/handlers/werkstatt-lock-status.js.map +0 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts +0 -11
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js +0 -79
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js.map +0 -1
- package/dist/os/werkstatt/index.d.ts +0 -7
- package/dist/os/werkstatt/index.d.ts.map +0 -1
- package/dist/os/werkstatt/index.js +0 -18
- package/dist/os/werkstatt/index.js.map +0 -1
- package/dist/os/werkstatt/werkstatt.module.d.ts +0 -3
- package/dist/os/werkstatt/werkstatt.module.d.ts.map +0 -1
- package/dist/os/werkstatt/werkstatt.module.js +0 -58
- package/dist/os/werkstatt/werkstatt.module.js.map +0 -1
- package/dist/os/workflow/handlers.d.ts +0 -12
- package/dist/os/workflow/handlers.d.ts.map +0 -1
- package/dist/os/workflow/handlers.js +0 -254
- package/dist/os/workflow/handlers.js.map +0 -1
- package/dist/os/workflow/index.d.ts +0 -4
- package/dist/os/workflow/index.d.ts.map +0 -1
- package/dist/os/workflow/index.js +0 -18
- package/dist/os/workflow/index.js.map +0 -1
- package/dist/os/workflow/types.d.ts +0 -69
- package/dist/os/workflow/types.d.ts.map +0 -1
- package/dist/os/workflow/types.js +0 -23
- package/dist/os/workflow/types.js.map +0 -1
- package/dist/os/workflow/workflow.module.d.ts +0 -3
- package/dist/os/workflow/workflow.module.d.ts.map +0 -1
- package/dist/os/workflow/workflow.module.js +0 -48
- package/dist/os/workflow/workflow.module.js.map +0 -1
- package/dist/src/cli-output.d.ts +0 -5
- package/dist/src/cli-output.d.ts.map +0 -1
- package/dist/src/cli-output.js +0 -53
- package/dist/src/cli-output.js.map +0 -1
- package/dist/src/config/forge-config.d.ts +0 -242
- package/dist/src/config/forge-config.d.ts.map +0 -1
- package/dist/src/config/forge-config.js +0 -359
- package/dist/src/config/forge-config.js.map +0 -1
- package/dist/src/forge-module.d.ts +0 -16
- package/dist/src/forge-module.d.ts.map +0 -1
- package/dist/src/forge-module.js +0 -15
- package/dist/src/forge-module.js.map +0 -1
- package/dist/src/index.d.ts +0 -36
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -56
- package/dist/src/index.js.map +0 -1
- package/dist/src/knowledge/budgets.d.ts +0 -38
- package/dist/src/knowledge/budgets.d.ts.map +0 -1
- package/dist/src/knowledge/budgets.js +0 -157
- package/dist/src/knowledge/budgets.js.map +0 -1
- package/dist/src/knowledge/compact.d.ts +0 -47
- package/dist/src/knowledge/compact.d.ts.map +0 -1
- package/dist/src/knowledge/compact.js +0 -320
- package/dist/src/knowledge/compact.js.map +0 -1
- package/dist/src/knowledge/index.d.ts +0 -7
- package/dist/src/knowledge/index.d.ts.map +0 -1
- package/dist/src/knowledge/index.js +0 -19
- package/dist/src/knowledge/index.js.map +0 -1
- package/dist/src/knowledge/parse.d.ts +0 -3
- package/dist/src/knowledge/parse.d.ts.map +0 -1
- package/dist/src/knowledge/parse.js +0 -205
- package/dist/src/knowledge/parse.js.map +0 -1
- package/dist/src/knowledge/promote.d.ts +0 -37
- package/dist/src/knowledge/promote.d.ts.map +0 -1
- package/dist/src/knowledge/promote.js +0 -120
- package/dist/src/knowledge/promote.js.map +0 -1
- package/dist/src/knowledge/schema.d.ts +0 -61
- package/dist/src/knowledge/schema.d.ts.map +0 -1
- package/dist/src/knowledge/schema.js +0 -64
- package/dist/src/knowledge/schema.js.map +0 -1
- package/dist/src/knowledge/serialize.d.ts +0 -3
- package/dist/src/knowledge/serialize.d.ts.map +0 -1
- package/dist/src/knowledge/serialize.js +0 -67
- package/dist/src/knowledge/serialize.js.map +0 -1
- package/dist/src/migration-adapters/git-utils.d.ts +0 -3
- package/dist/src/migration-adapters/git-utils.d.ts.map +0 -1
- package/dist/src/migration-adapters/git-utils.js +0 -56
- package/dist/src/migration-adapters/git-utils.js.map +0 -1
- package/dist/src/migration-adapters/ignored-files.d.ts +0 -12
- package/dist/src/migration-adapters/ignored-files.d.ts.map +0 -1
- package/dist/src/migration-adapters/ignored-files.js +0 -190
- package/dist/src/migration-adapters/ignored-files.js.map +0 -1
- package/dist/src/migration-adapters/index.d.ts +0 -8
- package/dist/src/migration-adapters/index.d.ts.map +0 -1
- package/dist/src/migration-adapters/index.js +0 -17
- package/dist/src/migration-adapters/index.js.map +0 -1
- package/dist/src/migration-adapters/node-typescript-pnpm/index.d.ts +0 -3
- package/dist/src/migration-adapters/node-typescript-pnpm/index.d.ts.map +0 -1
- package/dist/src/migration-adapters/node-typescript-pnpm/index.js +0 -141
- package/dist/src/migration-adapters/node-typescript-pnpm/index.js.map +0 -1
- package/dist/src/migration-adapters/phaser-pnpm/index.d.ts +0 -3
- package/dist/src/migration-adapters/phaser-pnpm/index.d.ts.map +0 -1
- package/dist/src/migration-adapters/phaser-pnpm/index.js +0 -142
- package/dist/src/migration-adapters/phaser-pnpm/index.js.map +0 -1
- package/dist/src/migration-adapters/registry.d.ts +0 -6
- package/dist/src/migration-adapters/registry.d.ts.map +0 -1
- package/dist/src/migration-adapters/registry.js +0 -55
- package/dist/src/migration-adapters/registry.js.map +0 -1
- package/dist/src/migration-adapters/types.d.ts +0 -35
- package/dist/src/migration-adapters/types.d.ts.map +0 -1
- package/dist/src/migration-adapters/types.js +0 -31
- package/dist/src/migration-adapters/types.js.map +0 -1
- package/dist/src/onboarding/agents-generate.d.ts +0 -30
- package/dist/src/onboarding/agents-generate.d.ts.map +0 -1
- package/dist/src/onboarding/agents-generate.js +0 -352
- package/dist/src/onboarding/agents-generate.js.map +0 -1
- package/dist/src/onboarding/create.d.ts +0 -12
- package/dist/src/onboarding/create.d.ts.map +0 -1
- package/dist/src/onboarding/create.js +0 -318
- package/dist/src/onboarding/create.js.map +0 -1
- package/dist/src/onboarding/doctor.d.ts +0 -45
- package/dist/src/onboarding/doctor.d.ts.map +0 -1
- package/dist/src/onboarding/doctor.js +0 -1108
- package/dist/src/onboarding/doctor.js.map +0 -1
- package/dist/src/onboarding/init.d.ts +0 -32
- package/dist/src/onboarding/init.d.ts.map +0 -1
- package/dist/src/onboarding/init.js +0 -291
- package/dist/src/onboarding/init.js.map +0 -1
- package/dist/src/onboarding/invariant-engine.d.ts +0 -17
- package/dist/src/onboarding/invariant-engine.d.ts.map +0 -1
- package/dist/src/onboarding/invariant-engine.js +0 -416
- package/dist/src/onboarding/invariant-engine.js.map +0 -1
- package/dist/src/onboarding/memory-scaffold.d.ts +0 -18
- package/dist/src/onboarding/memory-scaffold.d.ts.map +0 -1
- package/dist/src/onboarding/memory-scaffold.js +0 -151
- package/dist/src/onboarding/memory-scaffold.js.map +0 -1
- package/dist/src/onboarding/nested-agents-generate.d.ts +0 -18
- package/dist/src/onboarding/nested-agents-generate.d.ts.map +0 -1
- package/dist/src/onboarding/nested-agents-generate.js +0 -69
- package/dist/src/onboarding/nested-agents-generate.js.map +0 -1
- package/dist/src/onboarding/nested-agents-templates.d.ts +0 -26
- package/dist/src/onboarding/nested-agents-templates.d.ts.map +0 -1
- package/dist/src/onboarding/nested-agents-templates.js +0 -178
- package/dist/src/onboarding/nested-agents-templates.js.map +0 -1
- package/dist/src/onboarding/profile-validate.d.ts +0 -13
- package/dist/src/onboarding/profile-validate.d.ts.map +0 -1
- package/dist/src/onboarding/profile-validate.js +0 -109
- package/dist/src/onboarding/profile-validate.js.map +0 -1
- package/dist/src/onboarding/scaffold-project.d.ts +0 -12
- package/dist/src/onboarding/scaffold-project.d.ts.map +0 -1
- package/dist/src/onboarding/scaffold-project.js +0 -248
- package/dist/src/onboarding/scaffold-project.js.map +0 -1
- package/dist/src/onboarding/scaffold.d.ts +0 -15
- package/dist/src/onboarding/scaffold.d.ts.map +0 -1
- package/dist/src/onboarding/scaffold.js +0 -120
- package/dist/src/onboarding/scaffold.js.map +0 -1
- package/dist/src/onboarding/upgrade.d.ts +0 -25
- package/dist/src/onboarding/upgrade.d.ts.map +0 -1
- package/dist/src/onboarding/upgrade.js +0 -391
- package/dist/src/onboarding/upgrade.js.map +0 -1
- package/dist/src/onboarding/workspace-discovery.d.ts +0 -11
- package/dist/src/onboarding/workspace-discovery.d.ts.map +0 -1
- package/dist/src/onboarding/workspace-discovery.js +0 -138
- package/dist/src/onboarding/workspace-discovery.js.map +0 -1
- package/dist/src/profiles/profile-schema.d.ts +0 -351
- package/dist/src/profiles/profile-schema.d.ts.map +0 -1
- package/dist/src/profiles/profile-schema.js +0 -201
- package/dist/src/profiles/profile-schema.js.map +0 -1
- package/dist/src/profiles/stack-profile.d.ts +0 -168
- package/dist/src/profiles/stack-profile.d.ts.map +0 -1
- package/dist/src/profiles/stack-profile.js +0 -144
- package/dist/src/profiles/stack-profile.js.map +0 -1
- package/dist/src/profiles/terminology-utils.d.ts +0 -8
- package/dist/src/profiles/terminology-utils.d.ts.map +0 -1
- package/dist/src/profiles/terminology-utils.js +0 -31
- package/dist/src/profiles/terminology-utils.js.map +0 -1
- package/dist/src/registry.d.ts +0 -38
- package/dist/src/registry.d.ts.map +0 -1
- package/dist/src/registry.js +0 -135
- package/dist/src/registry.js.map +0 -1
- package/dist/src/skill-schema.d.ts +0 -30
- package/dist/src/skill-schema.d.ts.map +0 -1
- package/dist/src/skill-schema.js +0 -34
- package/dist/src/skill-schema.js.map +0 -1
- package/dist/src/types.d.ts +0 -152
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -17
- package/dist/src/types.js.map +0 -1
- package/dist/src/utils/fs-atomic.d.ts +0 -7
- package/dist/src/utils/fs-atomic.d.ts.map +0 -1
- package/dist/src/utils/fs-atomic.js +0 -81
- package/dist/src/utils/fs-atomic.js.map +0 -1
- package/dist/src/utils/fs-idempotent.d.ts +0 -2
- package/dist/src/utils/fs-idempotent.d.ts.map +0 -1
- package/dist/src/utils/fs-idempotent.js +0 -39
- package/dist/src/utils/fs-idempotent.js.map +0 -1
- package/dist/src/utils/fs-trash-sync.d.ts +0 -2
- package/dist/src/utils/fs-trash-sync.d.ts.map +0 -1
- package/dist/src/utils/fs-trash-sync.js +0 -34
- package/dist/src/utils/fs-trash-sync.js.map +0 -1
- package/dist/src/utils/fs-trash.d.ts +0 -2
- package/dist/src/utils/fs-trash.d.ts.map +0 -1
- package/dist/src/utils/fs-trash.js +0 -24
- package/dist/src/utils/fs-trash.js.map +0 -1
- package/dist/src/utils/fs.d.ts +0 -8
- package/dist/src/utils/fs.d.ts.map +0 -1
- package/dist/src/utils/fs.js +0 -60
- package/dist/src/utils/fs.js.map +0 -1
- package/dist/src/utils/generated-marker.d.ts +0 -21
- package/dist/src/utils/generated-marker.d.ts.map +0 -1
- package/dist/src/utils/generated-marker.js +0 -128
- package/dist/src/utils/generated-marker.js.map +0 -1
- package/dist/src/utils/hash.d.ts +0 -2
- package/dist/src/utils/hash.d.ts.map +0 -1
- package/dist/src/utils/hash.js +0 -18
- package/dist/src/utils/hash.js.map +0 -1
- package/dist/src/utils/index.d.ts +0 -9
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/index.js +0 -21
- package/dist/src/utils/index.js.map +0 -1
- package/dist/src/utils/string-utils.d.ts +0 -2
- package/dist/src/utils/string-utils.d.ts.map +0 -1
- package/dist/src/utils/string-utils.js +0 -19
- package/dist/src/utils/string-utils.js.map +0 -1
- package/dist/src/validators/note-frontmatter-validate.d.ts +0 -20
- package/dist/src/validators/note-frontmatter-validate.d.ts.map +0 -1
- package/dist/src/validators/note-frontmatter-validate.js +0 -117
- package/dist/src/validators/note-frontmatter-validate.js.map +0 -1
- package/dist/src/validators/note-link-validate.d.ts +0 -21
- package/dist/src/validators/note-link-validate.d.ts.map +0 -1
- package/dist/src/validators/note-link-validate.js +0 -121
- package/dist/src/validators/note-link-validate.js.map +0 -1
- package/dist/src/validators/note-orphan-detect.d.ts +0 -19
- package/dist/src/validators/note-orphan-detect.d.ts.map +0 -1
- package/dist/src/validators/note-orphan-detect.js +0 -123
- package/dist/src/validators/note-orphan-detect.js.map +0 -1
- package/dist/src/validators/port-validate.d.ts +0 -12
- package/dist/src/validators/port-validate.d.ts.map +0 -1
- package/dist/src/validators/port-validate.js +0 -78
- package/dist/src/validators/port-validate.js.map +0 -1
- package/dist/src/validators/skill-validate.d.ts +0 -29
- package/dist/src/validators/skill-validate.d.ts.map +0 -1
- package/dist/src/validators/skill-validate.js +0 -689
- package/dist/src/validators/skill-validate.js.map +0 -1
|
@@ -1,689 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
<MODULE_CONTRACT>
|
|
3
|
-
<purpose>forge.skill.validate — validates all forge skills and declared pack skills against frontmatter contract and invariants SKILL-01..SKILL-21.</purpose>
|
|
4
|
-
<non-goals>
|
|
5
|
-
<item>Do not validate third-party skills — only forge-managed skills in packages/forge/skills/ and declared pack skills.</item>
|
|
6
|
-
</non-goals>
|
|
7
|
-
</MODULE_CONTRACT>
|
|
8
|
-
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-0374: initial forge.skill.validate handler.</item>
|
|
10
|
-
<item>RFC-0393: added SKILL-11 — canonical skill bodies must not contain hardcoded project-specific literals.</item>
|
|
11
|
-
<item>RFC-0523: added SKILL-12 — concerns must be one of four-level enum. Updated SKILL-10 to cover read-only skills.</item>
|
|
12
|
-
<item>RFC-0524: added SKILL-13 — declared knowledge files must exist relative to SKILL.md directory.</item>
|
|
13
|
-
<item>RFC-0539: added SKILL-14 (pack skill name must start with pack prefix) and SKILL-15 (non-forge skill may not use fo- prefix). Extended SKILL-07 with asymmetric dependency direction (forge→pack forbidden). Added pack skill validation loop.</item>
|
|
14
|
-
<item>RFC-0548: added SKILL-16 — triggers field must be an array of 1-5 strings, each 5-100 characters, only allowed on fo-category skills.</item>
|
|
15
|
-
<item>RFC-0553: added SKILL-17 — skill files must not contain specific platform RFC/ADR ids (RFC-\\d{4}, ADR-\\d{4}) or platform names (Warpgogol, WarpGogol).</item>
|
|
16
|
-
<item>RFC-0642: added SKILL-18 — forge skill instruction lines must not reference software-specific binding keys (typecheck, scopedBuild, test); use semantic keys (validate, produce, verify) instead.</item>
|
|
17
|
-
<item>RFC-0660: added SKILL-19 (knowledge entry schema validity) and SKILL-20 (entry identifier uniqueness) for structured knowledge files.</item>
|
|
18
|
-
<item>RFC-0661: added SKILL-21 (knowledge layer token budget warnings), refactored warning handling — warnings go to separate `warnings` array, not `violations`.</item>
|
|
19
|
-
<item>2026-08-03: SKILL-17 WarpGogol brand pattern made case-sensitive — the /gi flag defeated the first pattern's @-lookbehind and false-flagged every `@warpgogol/<pkg>` npm-scope reference.</item>
|
|
20
|
-
</CHANGE_SUMMARY>
|
|
21
|
-
*/
|
|
22
|
-
import fs from "node:fs";
|
|
23
|
-
import path from "node:path";
|
|
24
|
-
import { parse as parseYaml } from "yaml";
|
|
25
|
-
import { skillFrontmatterSchema } from "../skill-schema.js";
|
|
26
|
-
import { FORGE_SKILLS, discoverPackSkills } from "../registry.js";
|
|
27
|
-
import { loadForgeConfig, resolveForgeRoot } from "../config/forge-config.js";
|
|
28
|
-
import { parseKnowledgeFile } from "../knowledge/index.js";
|
|
29
|
-
import { computeLayerBudgets, resolveKnowledgeBudgets, } from "../knowledge/budgets.js";
|
|
30
|
-
const PREFERENCES_PATTERN = /Read `PREFERENCES\.md`/i;
|
|
31
|
-
export function runSkillValidate(_input, context) {
|
|
32
|
-
const ctx = context;
|
|
33
|
-
const workspaceRoot = ctx?.workspaceRoot ?? process.cwd();
|
|
34
|
-
const forgeRoot = path.join(workspaceRoot, "packages", "forge");
|
|
35
|
-
const skillsDir = path.join(forgeRoot, "skills");
|
|
36
|
-
// RFC-0539: Load config to discover declared skill packs
|
|
37
|
-
let packSkills = [];
|
|
38
|
-
try {
|
|
39
|
-
const forgeConfigRoot = resolveForgeRoot(workspaceRoot);
|
|
40
|
-
const config = loadForgeConfig(forgeConfigRoot);
|
|
41
|
-
packSkills = discoverPackSkills(workspaceRoot, config);
|
|
42
|
-
}
|
|
43
|
-
catch {
|
|
44
|
-
// Config not found or invalid — skip pack skill validation
|
|
45
|
-
}
|
|
46
|
-
// Build known names set for SKILL-07: forge skills + pack skills
|
|
47
|
-
const forgeSkillNames = new Set(FORGE_SKILLS.map((s) => s.name));
|
|
48
|
-
const packSkillNames = new Set(packSkills.map((s) => s.name));
|
|
49
|
-
const violations = [];
|
|
50
|
-
const warnings = [];
|
|
51
|
-
// RFC-0661: resolve effective knowledge budgets from forge.yaml
|
|
52
|
-
const budgets = resolveKnowledgeBudgets(workspaceRoot);
|
|
53
|
-
for (const entry of FORGE_SKILLS) {
|
|
54
|
-
const skillPath = path.join(forgeRoot, entry.path);
|
|
55
|
-
const skillDir = path.dirname(skillPath);
|
|
56
|
-
// SKILL-02: name matches directory name
|
|
57
|
-
if (path.basename(skillDir) !== entry.name) {
|
|
58
|
-
violations.push({
|
|
59
|
-
skill: entry.name,
|
|
60
|
-
rule: "SKILL-02",
|
|
61
|
-
message: `Directory name "${path.basename(skillDir)}" does not match skill name "${entry.name}"`,
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
if (!fs.existsSync(skillPath)) {
|
|
65
|
-
violations.push({
|
|
66
|
-
skill: entry.name,
|
|
67
|
-
rule: "SKILL-01",
|
|
68
|
-
message: `SKILL.md not found at ${entry.path}`,
|
|
69
|
-
});
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
const content = fs.readFileSync(skillPath, "utf8");
|
|
73
|
-
const fmMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
74
|
-
if (!fmMatch) {
|
|
75
|
-
violations.push({
|
|
76
|
-
skill: entry.name,
|
|
77
|
-
rule: "SKILL-01",
|
|
78
|
-
message: "No frontmatter block found",
|
|
79
|
-
});
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
let fm;
|
|
83
|
-
try {
|
|
84
|
-
fm = parseYaml(fmMatch[1]);
|
|
85
|
-
}
|
|
86
|
-
catch {
|
|
87
|
-
violations.push({
|
|
88
|
-
skill: entry.name,
|
|
89
|
-
rule: "SKILL-01",
|
|
90
|
-
message: "Frontmatter is not valid YAML",
|
|
91
|
-
});
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
// SKILL-01: Frontmatter parses against Zod schema
|
|
95
|
-
// SKILL-12: concerns must be one of the four-level enum (RFC-0523)
|
|
96
|
-
const parsed = skillFrontmatterSchema.safeParse(fm);
|
|
97
|
-
if (!parsed.success) {
|
|
98
|
-
for (const issue of parsed.error.issues) {
|
|
99
|
-
const isConcernsIssue = issue.path.join(".") === "concerns";
|
|
100
|
-
violations.push({
|
|
101
|
-
skill: entry.name,
|
|
102
|
-
rule: isConcernsIssue ? "SKILL-12" : "SKILL-01",
|
|
103
|
-
message: `${issue.path.join(".")}: ${issue.message}`,
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
// SKILL-02: name matches directory name (already checked above, also check frontmatter)
|
|
109
|
-
if (parsed.data.name !== entry.name) {
|
|
110
|
-
violations.push({
|
|
111
|
-
skill: entry.name,
|
|
112
|
-
rule: "SKILL-02",
|
|
113
|
-
message: `Frontmatter name "${parsed.data.name}" does not match registry name "${entry.name}"`,
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
// SKILL-03: description present and ≤ 200 chars (enforced by Zod)
|
|
117
|
-
// SKILL-04: invocation is user|model (enforced by Zod)
|
|
118
|
-
// SKILL-05: category is fo|shared|meta (enforced by Zod)
|
|
119
|
-
// SKILL-06: concerns is read-only|document-only|content-mutation|code-mutation (enforced by Zod)
|
|
120
|
-
// SKILL-08: languagePolicy is ref(PREFERENCES.md) (enforced by Zod)
|
|
121
|
-
// SKILL-07: dependsOn entries correspond to existing skill names
|
|
122
|
-
// RFC-0539: Asymmetric dependency direction — forge skills may only depend on
|
|
123
|
-
// other forge skills (forge→pack is forbidden — breaks portability).
|
|
124
|
-
for (const dep of parsed.data.dependsOn) {
|
|
125
|
-
if (!forgeSkillNames.has(dep)) {
|
|
126
|
-
violations.push({
|
|
127
|
-
skill: entry.name,
|
|
128
|
-
rule: "SKILL-07",
|
|
129
|
-
message: `dependsOn references non-existent forge skill '${dep}'`,
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// SKILL-09: Body contains standardized "Read PREFERENCES.md…" instruction
|
|
134
|
-
const body = content.slice(fmMatch[0].length);
|
|
135
|
-
if (!PREFERENCES_PATTERN.test(body)) {
|
|
136
|
-
violations.push({
|
|
137
|
-
skill: entry.name,
|
|
138
|
-
rule: "SKILL-09",
|
|
139
|
-
message: 'Body does not contain the standardized "Read PREFERENCES.md…" instruction',
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
// SKILL-10: read-only and document-only skills do not contain code execution instructions.
|
|
143
|
-
// NOTE: `exec` is excluded from the pattern because `pnpm exec werkstatt run …`
|
|
144
|
-
// is the standard governance command invocation in this ecosystem, not a code
|
|
145
|
-
// build/install. The pattern catches `pnpm run build`, `pnpm install`, `npm run
|
|
146
|
-
// test`, `npx vitest run`, `tsc --noEmit` (via `tsc` + `run`), etc.
|
|
147
|
-
if (parsed.data.concerns === "read-only" || parsed.data.concerns === "document-only") {
|
|
148
|
-
const execPattern = /\b(pnpm|npm|npx|node|vitest|tsc)\s+(run|install|build)/gi;
|
|
149
|
-
execPattern.lastIndex = 0;
|
|
150
|
-
if (execPattern.test(body)) {
|
|
151
|
-
violations.push({
|
|
152
|
-
skill: entry.name,
|
|
153
|
-
rule: "SKILL-10",
|
|
154
|
-
message: `${parsed.data.concerns} skill contains code execution instructions`,
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
// SKILL-11: Canonical skill bodies must not contain hardcoded project-specific
|
|
159
|
-
// literals in instruction lines (code blocks and "run:" directives).
|
|
160
|
-
// Scans only imperative instruction lines, not narrative prose.
|
|
161
|
-
// Supports <!-- skill-lint-disable SKILL-11 --> escape hatch.
|
|
162
|
-
{
|
|
163
|
-
const skill11Violations = checkSkill11(entry.name, body);
|
|
164
|
-
violations.push(...skill11Violations);
|
|
165
|
-
}
|
|
166
|
-
// SKILL-18: Forge skill instruction lines must not reference software-specific
|
|
167
|
-
// binding keys (typecheck, scopedBuild, test). Use semantic keys instead
|
|
168
|
-
// (validate, produce, verify). Same scope as SKILL-11 (code blocks + run: directives).
|
|
169
|
-
// Supports <!-- skill-lint-disable SKILL-18 --> escape hatch.
|
|
170
|
-
// Forge-skill path only — pack skills are domain-specific by design.
|
|
171
|
-
{
|
|
172
|
-
const skill18Violations = checkSkill18(entry.name, body);
|
|
173
|
-
violations.push(...skill18Violations);
|
|
174
|
-
}
|
|
175
|
-
// SKILL-13: Declared knowledge files must exist relative to SKILL.md directory (RFC-0524)
|
|
176
|
-
// SKILL-19/SKILL-20: Knowledge entry schema and identifier uniqueness (RFC-0660)
|
|
177
|
-
// SKILL-21: Knowledge layer token budget warnings (RFC-0661)
|
|
178
|
-
if (parsed.data.knowledge) {
|
|
179
|
-
const parsedFiles = [];
|
|
180
|
-
for (const knowledgeFile of parsed.data.knowledge) {
|
|
181
|
-
const knowledgePath = path.join(skillDir, knowledgeFile);
|
|
182
|
-
if (!fs.existsSync(knowledgePath)) {
|
|
183
|
-
violations.push({
|
|
184
|
-
skill: entry.name,
|
|
185
|
-
rule: "SKILL-13",
|
|
186
|
-
message: `Declared knowledge file '${knowledgeFile}' not found relative to SKILL.md directory`,
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
const { errors, warnings: skillWarnings } = checkSkill19And20(entry.name, knowledgeFile, knowledgePath);
|
|
191
|
-
violations.push(...errors);
|
|
192
|
-
warnings.push(...skillWarnings);
|
|
193
|
-
// Collect parsed files for SKILL-21 batch budget check
|
|
194
|
-
parsedFiles.push(parseKnowledgeFile(knowledgePath));
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
// SKILL-21: Check hot/warm layer budgets
|
|
198
|
-
warnings.push(...checkSkill21Budgets(parsedFiles, budgets, entry.name));
|
|
199
|
-
}
|
|
200
|
-
// SKILL-16: triggers field format and category restriction (RFC-0548)
|
|
201
|
-
if (parsed.data.triggers) {
|
|
202
|
-
if (entry.category !== "fo") {
|
|
203
|
-
violations.push({
|
|
204
|
-
skill: entry.name,
|
|
205
|
-
rule: "SKILL-16",
|
|
206
|
-
message: `triggers field is only allowed on fo-category skills (got '${entry.category}') — intent-to-skill routing is for fo-skills only`,
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
for (const trigger of parsed.data.triggers) {
|
|
210
|
-
if (trigger.length < 5 || trigger.length > 100) {
|
|
211
|
-
violations.push({
|
|
212
|
-
skill: entry.name,
|
|
213
|
-
rule: "SKILL-16",
|
|
214
|
-
message: `triggers entry '${trigger.slice(0, 50)}' must be 5-100 characters (got ${trigger.length})`,
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
if (parsed.data.triggers.length > 5) {
|
|
219
|
-
violations.push({
|
|
220
|
-
skill: entry.name,
|
|
221
|
-
rule: "SKILL-16",
|
|
222
|
-
message: `triggers array must have at most 5 entries (got ${parsed.data.triggers.length})`,
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
// SKILL-17: No internal platform RFC/ADR id references or platform names (RFC-0553)
|
|
227
|
-
{
|
|
228
|
-
const skill17Violations = checkSkill17(entry.name, content);
|
|
229
|
-
violations.push(...skill17Violations);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
// RFC-0539: Validate pack skills
|
|
233
|
-
for (const entry of packSkills) {
|
|
234
|
-
const skillPath = path.join(workspaceRoot, entry.dir, entry.path);
|
|
235
|
-
const skillDir = path.dirname(skillPath);
|
|
236
|
-
// SKILL-02: name matches directory name
|
|
237
|
-
if (path.basename(skillDir) !== entry.name) {
|
|
238
|
-
violations.push({
|
|
239
|
-
skill: entry.name,
|
|
240
|
-
pack: entry.pack,
|
|
241
|
-
rule: "SKILL-02",
|
|
242
|
-
message: `Directory name "${path.basename(skillDir)}" does not match skill name "${entry.name}"`,
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
if (!fs.existsSync(skillPath)) {
|
|
246
|
-
violations.push({
|
|
247
|
-
skill: entry.name,
|
|
248
|
-
pack: entry.pack,
|
|
249
|
-
rule: "SKILL-01",
|
|
250
|
-
message: `SKILL.md not found at ${entry.dir}/${entry.path}`,
|
|
251
|
-
});
|
|
252
|
-
continue;
|
|
253
|
-
}
|
|
254
|
-
const content = fs.readFileSync(skillPath, "utf8");
|
|
255
|
-
const fmMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
256
|
-
if (!fmMatch) {
|
|
257
|
-
violations.push({
|
|
258
|
-
skill: entry.name,
|
|
259
|
-
pack: entry.pack,
|
|
260
|
-
rule: "SKILL-01",
|
|
261
|
-
message: "No frontmatter block found",
|
|
262
|
-
});
|
|
263
|
-
continue;
|
|
264
|
-
}
|
|
265
|
-
let fm;
|
|
266
|
-
try {
|
|
267
|
-
fm = parseYaml(fmMatch[1]);
|
|
268
|
-
}
|
|
269
|
-
catch {
|
|
270
|
-
violations.push({
|
|
271
|
-
skill: entry.name,
|
|
272
|
-
pack: entry.pack,
|
|
273
|
-
rule: "SKILL-01",
|
|
274
|
-
message: "Frontmatter is not valid YAML",
|
|
275
|
-
});
|
|
276
|
-
continue;
|
|
277
|
-
}
|
|
278
|
-
const parsed = skillFrontmatterSchema.safeParse(fm);
|
|
279
|
-
if (!parsed.success) {
|
|
280
|
-
for (const issue of parsed.error.issues) {
|
|
281
|
-
const isConcernsIssue = issue.path.join(".") === "concerns";
|
|
282
|
-
violations.push({
|
|
283
|
-
skill: entry.name,
|
|
284
|
-
pack: entry.pack,
|
|
285
|
-
rule: isConcernsIssue ? "SKILL-12" : "SKILL-01",
|
|
286
|
-
message: `${issue.path.join(".")}: ${issue.message}`,
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
continue;
|
|
290
|
-
}
|
|
291
|
-
// SKILL-02: name matches frontmatter
|
|
292
|
-
if (parsed.data.name !== entry.name) {
|
|
293
|
-
violations.push({
|
|
294
|
-
skill: entry.name,
|
|
295
|
-
pack: entry.pack,
|
|
296
|
-
rule: "SKILL-02",
|
|
297
|
-
message: `Frontmatter name "${parsed.data.name}" does not match directory name "${entry.name}"`,
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
// SKILL-07: dependsOn entries — pack skills may depend on forge skills or other pack skills
|
|
301
|
-
for (const dep of parsed.data.dependsOn) {
|
|
302
|
-
if (!forgeSkillNames.has(dep) && !packSkillNames.has(dep)) {
|
|
303
|
-
violations.push({
|
|
304
|
-
skill: entry.name,
|
|
305
|
-
pack: entry.pack,
|
|
306
|
-
rule: "SKILL-07",
|
|
307
|
-
message: `dependsOn references non-existent skill '${dep}'`,
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
// SKILL-09: Body contains standardized "Read PREFERENCES.md…" instruction
|
|
312
|
-
const body = content.slice(fmMatch[0].length);
|
|
313
|
-
if (!PREFERENCES_PATTERN.test(body)) {
|
|
314
|
-
violations.push({
|
|
315
|
-
skill: entry.name,
|
|
316
|
-
pack: entry.pack,
|
|
317
|
-
rule: "SKILL-09",
|
|
318
|
-
message: 'Body does not contain the standardized "Read PREFERENCES.md…" instruction',
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
// SKILL-10: read-only and document-only skills do not contain code execution instructions
|
|
322
|
-
if (parsed.data.concerns === "read-only" || parsed.data.concerns === "document-only") {
|
|
323
|
-
const execPattern = /\b(pnpm|npm|npx|node|vitest|tsc)\s+(run|install|build)/gi;
|
|
324
|
-
execPattern.lastIndex = 0;
|
|
325
|
-
if (execPattern.test(body)) {
|
|
326
|
-
violations.push({
|
|
327
|
-
skill: entry.name,
|
|
328
|
-
pack: entry.pack,
|
|
329
|
-
rule: "SKILL-10",
|
|
330
|
-
message: `${parsed.data.concerns} skill contains code execution instructions`,
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
// SKILL-11: No hardcoded project-specific literals in canonical skill bodies
|
|
335
|
-
{
|
|
336
|
-
const skill11Violations = checkSkill11(entry.name, body);
|
|
337
|
-
for (const v of skill11Violations) {
|
|
338
|
-
v.pack = entry.pack;
|
|
339
|
-
}
|
|
340
|
-
violations.push(...skill11Violations);
|
|
341
|
-
}
|
|
342
|
-
// SKILL-13: Declared knowledge files must exist
|
|
343
|
-
// SKILL-19/SKILL-20: Knowledge entry schema and identifier uniqueness (RFC-0660)
|
|
344
|
-
// SKILL-21: Knowledge layer token budget warnings (RFC-0661)
|
|
345
|
-
if (parsed.data.knowledge) {
|
|
346
|
-
const parsedFiles = [];
|
|
347
|
-
for (const knowledgeFile of parsed.data.knowledge) {
|
|
348
|
-
const knowledgePath = path.join(skillDir, knowledgeFile);
|
|
349
|
-
if (!fs.existsSync(knowledgePath)) {
|
|
350
|
-
violations.push({
|
|
351
|
-
skill: entry.name,
|
|
352
|
-
pack: entry.pack,
|
|
353
|
-
rule: "SKILL-13",
|
|
354
|
-
message: `Declared knowledge file '${knowledgeFile}' not found relative to SKILL.md directory`,
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
else {
|
|
358
|
-
const { errors, warnings: skillWarnings } = checkSkill19And20(entry.name, knowledgeFile, knowledgePath, entry.pack);
|
|
359
|
-
violations.push(...errors);
|
|
360
|
-
warnings.push(...skillWarnings);
|
|
361
|
-
parsedFiles.push(parseKnowledgeFile(knowledgePath));
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
// SKILL-21: Check hot/warm layer budgets for pack skills
|
|
365
|
-
warnings.push(...checkSkill21Budgets(parsedFiles, budgets, entry.name, entry.pack));
|
|
366
|
-
}
|
|
367
|
-
// SKILL-16: triggers field format (RFC-0548) — pack skills may not use triggers
|
|
368
|
-
if (parsed.data.triggers) {
|
|
369
|
-
violations.push({
|
|
370
|
-
skill: entry.name,
|
|
371
|
-
pack: entry.pack,
|
|
372
|
-
rule: "SKILL-16",
|
|
373
|
-
message: "triggers field is only allowed on forge fo-category skills — pack skills may not declare triggers",
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
// SKILL-14: Pack skill name must start with its pack prefix (RFC-0539)
|
|
377
|
-
if (!entry.name.startsWith(`${entry.pack}-`)) {
|
|
378
|
-
violations.push({
|
|
379
|
-
skill: entry.name,
|
|
380
|
-
pack: entry.pack,
|
|
381
|
-
rule: "SKILL-14",
|
|
382
|
-
message: `Pack skill name must start with pack prefix '${entry.pack}-'`,
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
|
-
// SKILL-15: Non-forge skill may not use the 'fo-' prefix (RFC-0539)
|
|
386
|
-
if (entry.name.startsWith("fo-")) {
|
|
387
|
-
violations.push({
|
|
388
|
-
skill: entry.name,
|
|
389
|
-
pack: entry.pack,
|
|
390
|
-
rule: "SKILL-15",
|
|
391
|
-
message: "Non-forge skill may not use the 'fo-' prefix (reserved for forge skills)",
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
// SKILL-17: No internal platform RFC/ADR id references or platform names (RFC-0553)
|
|
395
|
-
{
|
|
396
|
-
const skill17Violations = checkSkill17(entry.name, content);
|
|
397
|
-
for (const v of skill17Violations) {
|
|
398
|
-
v.pack = entry.pack;
|
|
399
|
-
}
|
|
400
|
-
violations.push(...skill17Violations);
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
// Check: every SKILL.md on disk has a registry entry
|
|
404
|
-
if (fs.existsSync(skillsDir)) {
|
|
405
|
-
scanForOrphanSkills(skillsDir, new Set(FORGE_SKILLS.map((s) => s.path)), forgeRoot, violations);
|
|
406
|
-
}
|
|
407
|
-
return {
|
|
408
|
-
command: "forge.skill.validate",
|
|
409
|
-
status: violations.length === 0 ? "pass" : "fail",
|
|
410
|
-
violations,
|
|
411
|
-
warnings,
|
|
412
|
-
};
|
|
413
|
-
}
|
|
414
|
-
// ---------------------------------------------------------------------------
|
|
415
|
-
// SKILL-11: No hardcoded project-specific literals in canonical skill bodies
|
|
416
|
-
// ---------------------------------------------------------------------------
|
|
417
|
-
const SKILL11_PATTERNS = [
|
|
418
|
-
/pnpm\s+exec\s+werkstatt\s+run/gi,
|
|
419
|
-
/docs\/architecture-dna\.md/gi,
|
|
420
|
-
];
|
|
421
|
-
const SKILL11_DISABLE_MARKER = "<!-- skill-lint-disable SKILL-11 -->";
|
|
422
|
-
function checkSkill11(skillName, body) {
|
|
423
|
-
const result = [];
|
|
424
|
-
// If the entire file has the disable marker, skip all SKILL-11 checks
|
|
425
|
-
if (body.includes(SKILL11_DISABLE_MARKER)) {
|
|
426
|
-
return result;
|
|
427
|
-
}
|
|
428
|
-
// Extract instruction lines: lines inside code blocks (``` ... ```)
|
|
429
|
-
// and lines starting with "run:" directives
|
|
430
|
-
const instructionLines = extractInstructionLines(body);
|
|
431
|
-
for (const line of instructionLines) {
|
|
432
|
-
// Check for per-line disable marker
|
|
433
|
-
if (line.includes(SKILL11_DISABLE_MARKER)) {
|
|
434
|
-
continue;
|
|
435
|
-
}
|
|
436
|
-
for (const pattern of SKILL11_PATTERNS) {
|
|
437
|
-
const re = new RegExp(pattern.source, pattern.flags);
|
|
438
|
-
if (re.test(line)) {
|
|
439
|
-
result.push({
|
|
440
|
-
skill: skillName,
|
|
441
|
-
rule: "SKILL-11",
|
|
442
|
-
message: `Instruction line contains hardcoded project-specific literal: ${line.trim().slice(0, 100)}`,
|
|
443
|
-
});
|
|
444
|
-
break; // one violation per line
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
return result;
|
|
449
|
-
}
|
|
450
|
-
// ---------------------------------------------------------------------------
|
|
451
|
-
// SKILL-18: No software-specific binding keys in forge skill instruction lines (RFC-0642)
|
|
452
|
-
// ---------------------------------------------------------------------------
|
|
453
|
-
const SKILL18_PATTERNS = [
|
|
454
|
-
/bindings\.commands\.typecheck/gi,
|
|
455
|
-
/bindings\.commands\.scopedBuild/gi,
|
|
456
|
-
/bindings\.commands\.test/gi,
|
|
457
|
-
];
|
|
458
|
-
const SKILL18_DISABLE_MARKER = "<!-- skill-lint-disable SKILL-18 -->";
|
|
459
|
-
function checkSkill18(skillName, body) {
|
|
460
|
-
const result = [];
|
|
461
|
-
if (body.includes(SKILL18_DISABLE_MARKER)) {
|
|
462
|
-
return result;
|
|
463
|
-
}
|
|
464
|
-
const instructionLines = extractInstructionLines(body);
|
|
465
|
-
for (const line of instructionLines) {
|
|
466
|
-
if (line.includes(SKILL18_DISABLE_MARKER)) {
|
|
467
|
-
continue;
|
|
468
|
-
}
|
|
469
|
-
for (const pattern of SKILL18_PATTERNS) {
|
|
470
|
-
const re = new RegExp(pattern.source, pattern.flags);
|
|
471
|
-
const match = re.exec(line);
|
|
472
|
-
if (match) {
|
|
473
|
-
result.push({
|
|
474
|
-
skill: skillName,
|
|
475
|
-
rule: "SKILL-18",
|
|
476
|
-
message: `Instruction line references software-specific binding key '${match[0]}' — use semantic key instead`,
|
|
477
|
-
});
|
|
478
|
-
break;
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
return result;
|
|
483
|
-
}
|
|
484
|
-
function extractInstructionLines(body) {
|
|
485
|
-
const lines = [];
|
|
486
|
-
const bodyLines = body.split(/\r?\n/);
|
|
487
|
-
let inCodeBlock = false;
|
|
488
|
-
for (const line of bodyLines) {
|
|
489
|
-
if (line.trim().startsWith("```")) {
|
|
490
|
-
inCodeBlock = !inCodeBlock;
|
|
491
|
-
continue;
|
|
492
|
-
}
|
|
493
|
-
if (inCodeBlock) {
|
|
494
|
-
lines.push(line);
|
|
495
|
-
}
|
|
496
|
-
else if (/^\s*run:/i.test(line)) {
|
|
497
|
-
lines.push(line);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
return lines;
|
|
501
|
-
}
|
|
502
|
-
// ---------------------------------------------------------------------------
|
|
503
|
-
// SKILL-17: No internal platform RFC/ADR/DNA id references or platform names (RFC-0553)
|
|
504
|
-
// ---------------------------------------------------------------------------
|
|
505
|
-
const SKILL17_ID_PATTERNS = [/\bRFC-\d{4}\b/g, /\bADR-\d{4}\b/g, /\bDNA-\d+\b/g];
|
|
506
|
-
const SKILL17_PLATFORM_PATTERNS = [/(?<!@)Warpgogol\b/gi, /\bWarpGogol\b/g];
|
|
507
|
-
const SKILL17_DISABLE_MARKER = "<!-- skill-lint-disable SKILL-17 -->";
|
|
508
|
-
function checkSkill17(skillName, content) {
|
|
509
|
-
const result = [];
|
|
510
|
-
if (content.includes(SKILL17_DISABLE_MARKER)) {
|
|
511
|
-
return result;
|
|
512
|
-
}
|
|
513
|
-
const lines = content.split(/\r?\n/);
|
|
514
|
-
for (const line of lines) {
|
|
515
|
-
if (line.includes(SKILL17_DISABLE_MARKER)) {
|
|
516
|
-
continue;
|
|
517
|
-
}
|
|
518
|
-
for (const pattern of SKILL17_ID_PATTERNS) {
|
|
519
|
-
const re = new RegExp(pattern.source, pattern.flags);
|
|
520
|
-
const match = re.exec(line);
|
|
521
|
-
if (match) {
|
|
522
|
-
result.push({
|
|
523
|
-
skill: skillName,
|
|
524
|
-
rule: "SKILL-17",
|
|
525
|
-
message: `Contains internal platform RFC/ADR/DNA id '${match[0]}': ${line.trim().slice(0, 100)}`,
|
|
526
|
-
});
|
|
527
|
-
break;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
for (const pattern of SKILL17_PLATFORM_PATTERNS) {
|
|
531
|
-
const re = new RegExp(pattern.source, pattern.flags);
|
|
532
|
-
const match = re.exec(line);
|
|
533
|
-
if (match) {
|
|
534
|
-
result.push({
|
|
535
|
-
skill: skillName,
|
|
536
|
-
rule: "SKILL-17",
|
|
537
|
-
message: `Contains internal platform name '${match[0]}': ${line.trim().slice(0, 100)}`,
|
|
538
|
-
});
|
|
539
|
-
break;
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
return result;
|
|
544
|
-
}
|
|
545
|
-
function checkSkill19And20(skillName, fileName, filePath, pack) {
|
|
546
|
-
const errors = [];
|
|
547
|
-
const warnings = [];
|
|
548
|
-
const parsed = parseKnowledgeFile(filePath);
|
|
549
|
-
// Knowledge-adjacent files are exempt from SKILL-19/SKILL-20
|
|
550
|
-
if (parsed.isKnowledgeAdjacent) {
|
|
551
|
-
return { errors, warnings };
|
|
552
|
-
}
|
|
553
|
-
// SKILL-19: Entry schema validity (errors)
|
|
554
|
-
for (const issue of parsed.parseIssues) {
|
|
555
|
-
errors.push({
|
|
556
|
-
skill: skillName,
|
|
557
|
-
rule: "SKILL-19",
|
|
558
|
-
file: fileName,
|
|
559
|
-
line: issue.line,
|
|
560
|
-
severity: "error",
|
|
561
|
-
message: issue.message,
|
|
562
|
-
pack,
|
|
563
|
-
});
|
|
564
|
-
}
|
|
565
|
-
// SKILL-19: Legacy section warnings (migration window) — go to warnings, not errors
|
|
566
|
-
if (parsed.legacySections.length > 0) {
|
|
567
|
-
warnings.push({
|
|
568
|
-
skill: skillName,
|
|
569
|
-
rule: "SKILL-19",
|
|
570
|
-
file: fileName,
|
|
571
|
-
severity: "warning",
|
|
572
|
-
message: `${parsed.legacySections.length} legacy section${parsed.legacySections.length === 1 ? "" : "s"} predate RFC-0660 — run the knowledge compaction command to migrate`,
|
|
573
|
-
pack,
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
// SKILL-20: Identifier uniqueness and reference validity (errors)
|
|
577
|
-
const seenIds = new Map(); // id → first line
|
|
578
|
-
for (const entry of parsed.entries) {
|
|
579
|
-
// Check id format
|
|
580
|
-
if (!/^K-\d{4}$/.test(entry.meta.id)) {
|
|
581
|
-
errors.push({
|
|
582
|
-
skill: skillName,
|
|
583
|
-
rule: "SKILL-20",
|
|
584
|
-
file: fileName,
|
|
585
|
-
line: entry.lineStart,
|
|
586
|
-
severity: "error",
|
|
587
|
-
message: `Entry id '${entry.meta.id}' does not match ^K-\d{4}$`,
|
|
588
|
-
pack,
|
|
589
|
-
});
|
|
590
|
-
continue;
|
|
591
|
-
}
|
|
592
|
-
// Check uniqueness
|
|
593
|
-
if (seenIds.has(entry.meta.id)) {
|
|
594
|
-
errors.push({
|
|
595
|
-
skill: skillName,
|
|
596
|
-
rule: "SKILL-20",
|
|
597
|
-
file: fileName,
|
|
598
|
-
line: entry.lineStart,
|
|
599
|
-
severity: "error",
|
|
600
|
-
message: `Duplicate entry id ${entry.meta.id} (first occurrence at line ${seenIds.get(entry.meta.id)})`,
|
|
601
|
-
pack,
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
else {
|
|
605
|
-
seenIds.set(entry.meta.id, entry.lineStart);
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
// Check supersedes references resolve within the same file
|
|
609
|
-
const entryIds = new Set(parsed.entries.map((e) => e.meta.id));
|
|
610
|
-
for (const entry of parsed.entries) {
|
|
611
|
-
if (entry.meta.supersedes) {
|
|
612
|
-
for (const refId of entry.meta.supersedes) {
|
|
613
|
-
if (!entryIds.has(refId)) {
|
|
614
|
-
errors.push({
|
|
615
|
-
skill: skillName,
|
|
616
|
-
rule: "SKILL-20",
|
|
617
|
-
file: fileName,
|
|
618
|
-
line: entry.lineStart,
|
|
619
|
-
severity: "error",
|
|
620
|
-
message: `Entry ${entry.meta.id}: supersedes reference '${refId}' does not resolve to an entry in the same file`,
|
|
621
|
-
pack,
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
// Check promotedTo format
|
|
627
|
-
if (entry.meta.promotedTo !== null && entry.meta.promotedTo !== undefined) {
|
|
628
|
-
if (!/^shared\/K-\d{4}$/.test(entry.meta.promotedTo)) {
|
|
629
|
-
errors.push({
|
|
630
|
-
skill: skillName,
|
|
631
|
-
rule: "SKILL-20",
|
|
632
|
-
file: fileName,
|
|
633
|
-
line: entry.lineStart,
|
|
634
|
-
severity: "error",
|
|
635
|
-
message: `Entry ${entry.meta.id}: promotedTo '${entry.meta.promotedTo}' does not match ^shared/K-\d{4}$`,
|
|
636
|
-
pack,
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
return { errors, warnings };
|
|
642
|
-
}
|
|
643
|
-
// ---------------------------------------------------------------------------
|
|
644
|
-
// SKILL-21: Knowledge layer token budget warnings (RFC-0661)
|
|
645
|
-
// ---------------------------------------------------------------------------
|
|
646
|
-
function checkSkill21Budgets(parsedFiles, budgets, skillName, pack) {
|
|
647
|
-
const warnings = [];
|
|
648
|
-
const skillNames = new Map();
|
|
649
|
-
for (const pf of parsedFiles) {
|
|
650
|
-
skillNames.set(pf.path, skillName);
|
|
651
|
-
}
|
|
652
|
-
const budgetReports = computeLayerBudgets(parsedFiles, budgets, skillNames);
|
|
653
|
-
for (const report of budgetReports) {
|
|
654
|
-
if (report.exceededBy > 0) {
|
|
655
|
-
const layerName = report.layer === "L2" ? "Hot" : "Warm";
|
|
656
|
-
const pctOver = Math.round((report.exceededBy / report.budget) * 100);
|
|
657
|
-
warnings.push({
|
|
658
|
-
skill: skillName,
|
|
659
|
-
rule: "SKILL-21",
|
|
660
|
-
file: report.file,
|
|
661
|
-
layer: report.layer,
|
|
662
|
-
severity: "warning",
|
|
663
|
-
message: `${layerName} layer exceeds budget: ${report.activeChars} of ${report.budget} characters (${pctOver}% over)`,
|
|
664
|
-
fixHint: "Run the knowledge compaction command (RFC-0662) to archive stale entries, or promote duplicated principles to the shared layer (RFC-0663)",
|
|
665
|
-
pack,
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
return warnings;
|
|
670
|
-
}
|
|
671
|
-
function scanForOrphanSkills(dir, knownPaths, forgeRoot, violations) {
|
|
672
|
-
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
673
|
-
for (const entry of entries) {
|
|
674
|
-
if (entry.isDirectory()) {
|
|
675
|
-
scanForOrphanSkills(path.join(dir, entry.name), knownPaths, forgeRoot, violations);
|
|
676
|
-
}
|
|
677
|
-
else if (entry.name === "SKILL.md") {
|
|
678
|
-
const relPath = path.relative(forgeRoot, path.join(dir, entry.name)).replace(/\\/g, "/");
|
|
679
|
-
if (!knownPaths.has(relPath)) {
|
|
680
|
-
violations.push({
|
|
681
|
-
skill: path.basename(dir),
|
|
682
|
-
rule: "SKILL-01",
|
|
683
|
-
message: `SKILL.md at ${relPath} has no registry entry`,
|
|
684
|
-
});
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
//# sourceMappingURL=skill-validate.js.map
|