@seanmars/tospec 0.19.0-beta.8 → 0.20.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/CHANGELOG.md +60 -310
- package/README.md +69 -82
- package/assets/dashboard/app.js +11 -0
- package/assets/dashboard/style.css +7 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +89 -106
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/config.d.ts +9 -17
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +293 -145
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/dashboard.d.ts +57 -99
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +190 -313
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/decision.d.ts +38 -27
- package/dist/commands/decision.d.ts.map +1 -1
- package/dist/commands/decision.js +296 -128
- package/dist/commands/decision.js.map +1 -1
- package/dist/commands/metrics.d.ts +28 -51
- package/dist/commands/metrics.d.ts.map +1 -1
- package/dist/commands/metrics.js +62 -93
- package/dist/commands/metrics.js.map +1 -1
- package/dist/commands/shared-output.d.ts +12 -27
- package/dist/commands/shared-output.d.ts.map +1 -1
- package/dist/commands/shared-output.js +22 -45
- package/dist/commands/shared-output.js.map +1 -1
- package/dist/commands/show.d.ts +4 -7
- package/dist/commands/show.d.ts.map +1 -1
- package/dist/commands/show.js +23 -11
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/validate.d.ts +34 -58
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +225 -141
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/workflow/index.d.ts +1 -5
- package/dist/commands/workflow/index.d.ts.map +1 -1
- package/dist/commands/workflow/index.js +1 -5
- package/dist/commands/workflow/index.js.map +1 -1
- package/dist/commands/workflow/instructions.d.ts +14 -24
- package/dist/commands/workflow/instructions.d.ts.map +1 -1
- package/dist/commands/workflow/instructions.js +219 -128
- package/dist/commands/workflow/instructions.js.map +1 -1
- package/dist/commands/workflow/new-change.d.ts +2 -5
- package/dist/commands/workflow/new-change.d.ts.map +1 -1
- package/dist/commands/workflow/new-change.js +69 -32
- package/dist/commands/workflow/new-change.js.map +1 -1
- package/dist/commands/workflow/schemas.d.ts +1 -5
- package/dist/commands/workflow/schemas.d.ts.map +1 -1
- package/dist/commands/workflow/schemas.js +6 -17
- package/dist/commands/workflow/schemas.js.map +1 -1
- package/dist/commands/workflow/shared.d.ts +37 -42
- package/dist/commands/workflow/shared.d.ts.map +1 -1
- package/dist/commands/workflow/shared.js +23 -54
- package/dist/commands/workflow/shared.js.map +1 -1
- package/dist/commands/workflow/status.d.ts +7 -17
- package/dist/commands/workflow/status.d.ts.map +1 -1
- package/dist/commands/workflow/status.js +57 -72
- package/dist/commands/workflow/status.js.map +1 -1
- package/dist/commands/workflow/templates.d.ts +8 -8
- package/dist/commands/workflow/templates.d.ts.map +1 -1
- package/dist/commands/workflow/templates.js +32 -46
- package/dist/commands/workflow/templates.js.map +1 -1
- package/dist/core/archive.d.ts +22 -31
- package/dist/core/archive.d.ts.map +1 -1
- package/dist/core/archive.js +296 -283
- package/dist/core/archive.js.map +1 -1
- package/dist/core/artifact-graph/graph.d.ts +25 -42
- package/dist/core/artifact-graph/graph.d.ts.map +1 -1
- package/dist/core/artifact-graph/graph.js +45 -63
- package/dist/core/artifact-graph/graph.js.map +1 -1
- package/dist/core/artifact-graph/index.d.ts +1 -1
- package/dist/core/artifact-graph/index.d.ts.map +1 -1
- package/dist/core/artifact-graph/index.js +1 -1
- package/dist/core/artifact-graph/index.js.map +1 -1
- package/dist/core/artifact-graph/instruction-loader.d.ts +54 -120
- package/dist/core/artifact-graph/instruction-loader.d.ts.map +1 -1
- package/dist/core/artifact-graph/instruction-loader.js +129 -111
- package/dist/core/artifact-graph/instruction-loader.js.map +1 -1
- package/dist/core/artifact-graph/outputs.d.ts +9 -23
- package/dist/core/artifact-graph/outputs.d.ts.map +1 -1
- package/dist/core/artifact-graph/outputs.js +45 -38
- package/dist/core/artifact-graph/outputs.js.map +1 -1
- package/dist/core/artifact-graph/resolver.d.ts +36 -81
- package/dist/core/artifact-graph/resolver.d.ts.map +1 -1
- package/dist/core/artifact-graph/resolver.js +60 -101
- package/dist/core/artifact-graph/resolver.js.map +1 -1
- package/dist/core/artifact-graph/schema.d.ts +0 -6
- package/dist/core/artifact-graph/schema.d.ts.map +1 -1
- package/dist/core/artifact-graph/schema.js +7 -32
- package/dist/core/artifact-graph/schema.js.map +1 -1
- package/dist/core/artifact-graph/state.d.ts +1 -8
- package/dist/core/artifact-graph/state.d.ts.map +1 -1
- package/dist/core/artifact-graph/state.js +2 -17
- package/dist/core/artifact-graph/state.js.map +1 -1
- package/dist/core/artifact-graph/stub-detection.d.ts +6 -14
- package/dist/core/artifact-graph/stub-detection.d.ts.map +1 -1
- package/dist/core/artifact-graph/stub-detection.js +13 -16
- package/dist/core/artifact-graph/stub-detection.js.map +1 -1
- package/dist/core/artifact-graph/types.d.ts +4 -0
- package/dist/core/artifact-graph/types.d.ts.map +1 -1
- package/dist/core/artifact-graph/types.js +30 -10
- package/dist/core/artifact-graph/types.js.map +1 -1
- package/dist/core/available-tools.d.ts +3 -12
- package/dist/core/available-tools.d.ts.map +1 -1
- package/dist/core/available-tools.js +4 -13
- package/dist/core/available-tools.js.map +1 -1
- package/dist/core/change-metadata/schema.d.ts +1 -1
- package/dist/core/change-metadata/schema.d.ts.map +1 -1
- package/dist/core/change-metadata/schema.js +10 -7
- package/dist/core/change-metadata/schema.js.map +1 -1
- package/dist/core/change-presenter.d.ts +16 -27
- package/dist/core/change-presenter.d.ts.map +1 -1
- package/dist/core/change-presenter.js +53 -53
- package/dist/core/change-presenter.js.map +1 -1
- package/dist/core/change-status-policy.d.ts +4 -8
- package/dist/core/change-status-policy.d.ts.map +1 -1
- package/dist/core/change-status-policy.js +9 -17
- package/dist/core/change-status-policy.js.map +1 -1
- package/dist/core/codex-metrics.d.ts +25 -45
- package/dist/core/codex-metrics.d.ts.map +1 -1
- package/dist/core/codex-metrics.js +44 -88
- package/dist/core/codex-metrics.js.map +1 -1
- package/dist/core/codex-residue.d.ts +14 -15
- package/dist/core/codex-residue.d.ts.map +1 -1
- package/dist/core/codex-residue.js +18 -22
- package/dist/core/codex-residue.js.map +1 -1
- package/dist/core/command-generation/adapters/claude.d.ts +2 -9
- package/dist/core/command-generation/adapters/claude.d.ts.map +1 -1
- package/dist/core/command-generation/adapters/claude.js +2 -12
- package/dist/core/command-generation/adapters/claude.js.map +1 -1
- package/dist/core/command-generation/adapters/index.d.ts +1 -9
- package/dist/core/command-generation/adapters/index.d.ts.map +1 -1
- package/dist/core/command-generation/adapters/index.js +1 -9
- package/dist/core/command-generation/adapters/index.js.map +1 -1
- package/dist/core/command-generation/generator.d.ts +0 -17
- package/dist/core/command-generation/generator.d.ts.map +1 -1
- package/dist/core/command-generation/generator.js +0 -17
- package/dist/core/command-generation/generator.js.map +1 -1
- package/dist/core/command-generation/index.d.ts +2 -5
- package/dist/core/command-generation/index.d.ts.map +1 -1
- package/dist/core/command-generation/index.js +0 -9
- package/dist/core/command-generation/index.js.map +1 -1
- package/dist/core/command-generation/types.d.ts +10 -36
- package/dist/core/command-generation/types.d.ts.map +1 -1
- package/dist/core/command-generation/types.js +0 -6
- package/dist/core/command-generation/types.js.map +1 -1
- package/dist/core/command-generation/yaml.d.ts +3 -18
- package/dist/core/command-generation/yaml.d.ts.map +1 -1
- package/dist/core/command-generation/yaml.js +5 -23
- package/dist/core/command-generation/yaml.js.map +1 -1
- package/dist/core/config-prompts.d.ts +2 -4
- package/dist/core/config-prompts.d.ts.map +1 -1
- package/dist/core/config-prompts.js +2 -7
- package/dist/core/config-prompts.js.map +1 -1
- package/dist/core/config-schema.d.ts +7 -41
- package/dist/core/config-schema.d.ts.map +1 -1
- package/dist/core/config-schema.js +35 -74
- package/dist/core/config-schema.js.map +1 -1
- package/dist/core/config.d.ts +25 -49
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +22 -45
- package/dist/core/config.js.map +1 -1
- package/dist/core/dashboard-activity.d.ts +7 -9
- package/dist/core/dashboard-activity.d.ts.map +1 -1
- package/dist/core/dashboard-activity.js +26 -24
- package/dist/core/dashboard-activity.js.map +1 -1
- package/dist/core/dashboard-data.d.ts +35 -22
- package/dist/core/dashboard-data.d.ts.map +1 -1
- package/dist/core/dashboard-data.js +57 -72
- package/dist/core/dashboard-data.js.map +1 -1
- package/dist/core/global-config.d.ts +24 -53
- package/dist/core/global-config.d.ts.map +1 -1
- package/dist/core/global-config.js +38 -67
- package/dist/core/global-config.js.map +1 -1
- package/dist/core/init.d.ts +12 -28
- package/dist/core/init.d.ts.map +1 -1
- package/dist/core/init.js +90 -168
- package/dist/core/init.js.map +1 -1
- package/dist/core/list.d.ts.map +1 -1
- package/dist/core/list.js +80 -38
- package/dist/core/list.js.map +1 -1
- package/dist/core/local-server.d.ts +41 -83
- package/dist/core/local-server.d.ts.map +1 -1
- package/dist/core/local-server.js +53 -98
- package/dist/core/local-server.js.map +1 -1
- package/dist/core/markdown-render.d.ts +15 -23
- package/dist/core/markdown-render.d.ts.map +1 -1
- package/dist/core/markdown-render.js +25 -34
- package/dist/core/markdown-render.js.map +1 -1
- package/dist/core/migrate.d.ts +19 -16
- package/dist/core/migrate.d.ts.map +1 -1
- package/dist/core/migrate.js +151 -135
- package/dist/core/migrate.js.map +1 -1
- package/dist/core/parsers/change-parser.d.ts +7 -10
- package/dist/core/parsers/change-parser.d.ts.map +1 -1
- package/dist/core/parsers/change-parser.js +48 -56
- package/dist/core/parsers/change-parser.js.map +1 -1
- package/dist/core/parsers/markdown-parser.d.ts +8 -9
- package/dist/core/parsers/markdown-parser.d.ts.map +1 -1
- package/dist/core/parsers/markdown-parser.js +23 -30
- package/dist/core/parsers/markdown-parser.js.map +1 -1
- package/dist/core/parsers/requirement-blocks.d.ts +43 -15
- package/dist/core/parsers/requirement-blocks.d.ts.map +1 -1
- package/dist/core/parsers/requirement-blocks.js +142 -70
- package/dist/core/parsers/requirement-blocks.js.map +1 -1
- package/dist/core/parsers/requirement-text.d.ts +73 -79
- package/dist/core/parsers/requirement-text.d.ts.map +1 -1
- package/dist/core/parsers/requirement-text.js +137 -79
- package/dist/core/parsers/requirement-text.js.map +1 -1
- package/dist/core/parsers/spec-structure.d.ts.map +1 -1
- package/dist/core/parsers/spec-structure.js +10 -6
- package/dist/core/parsers/spec-structure.js.map +1 -1
- package/dist/core/profiles.d.ts +3 -10
- package/dist/core/profiles.d.ts.map +1 -1
- package/dist/core/profiles.js +5 -12
- package/dist/core/profiles.js.map +1 -1
- package/dist/core/project-config.d.ts +43 -44
- package/dist/core/project-config.d.ts.map +1 -1
- package/dist/core/project-config.js +107 -82
- package/dist/core/project-config.js.map +1 -1
- package/dist/core/project-layout.d.ts +9 -17
- package/dist/core/project-layout.d.ts.map +1 -1
- package/dist/core/project-layout.js +16 -26
- package/dist/core/project-layout.js.map +1 -1
- package/dist/core/root-selection.d.ts +8 -14
- package/dist/core/root-selection.d.ts.map +1 -1
- package/dist/core/root-selection.js +3 -6
- package/dist/core/root-selection.js.map +1 -1
- package/dist/core/rules.d.ts.map +1 -1
- package/dist/core/rules.js +2 -3
- package/dist/core/rules.js.map +1 -1
- package/dist/core/schema-names.d.ts +16 -0
- package/dist/core/schema-names.d.ts.map +1 -0
- package/dist/core/schema-names.js +16 -0
- package/dist/core/schema-names.js.map +1 -0
- package/dist/core/schemas/base.schema.d.ts.map +1 -1
- package/dist/core/schemas/base.schema.js +6 -12
- package/dist/core/schemas/base.schema.js.map +1 -1
- package/dist/core/schemas/change.schema.d.ts +8 -0
- package/dist/core/schemas/change.schema.d.ts.map +1 -1
- package/dist/core/schemas/change.schema.js +41 -10
- package/dist/core/schemas/change.schema.js.map +1 -1
- package/dist/core/shared/index.d.ts +2 -7
- package/dist/core/shared/index.d.ts.map +1 -1
- package/dist/core/shared/index.js +2 -7
- package/dist/core/shared/index.js.map +1 -1
- package/dist/core/shared/rules-generation.d.ts +5 -15
- package/dist/core/shared/rules-generation.d.ts.map +1 -1
- package/dist/core/shared/rules-generation.js +33 -37
- package/dist/core/shared/rules-generation.js.map +1 -1
- package/dist/core/shared/skill-generation.d.ts +28 -43
- package/dist/core/shared/skill-generation.d.ts.map +1 -1
- package/dist/core/shared/skill-generation.js +82 -51
- package/dist/core/shared/skill-generation.js.map +1 -1
- package/dist/core/shared/tool-detection.d.ts +35 -76
- package/dist/core/shared/tool-detection.d.ts.map +1 -1
- package/dist/core/shared/tool-detection.js +73 -93
- package/dist/core/shared/tool-detection.js.map +1 -1
- package/dist/core/skill-metrics.d.ts +36 -63
- package/dist/core/skill-metrics.d.ts.map +1 -1
- package/dist/core/skill-metrics.js +34 -73
- package/dist/core/skill-metrics.js.map +1 -1
- package/dist/core/spec-presenter.d.ts.map +1 -1
- package/dist/core/spec-presenter.js +5 -10
- package/dist/core/spec-presenter.js.map +1 -1
- package/dist/core/specs-apply.d.ts +16 -31
- package/dist/core/specs-apply.d.ts.map +1 -1
- package/dist/core/specs-apply.js +146 -195
- package/dist/core/specs-apply.js.map +1 -1
- package/dist/core/templates/fragments/interview.d.ts +2 -6
- package/dist/core/templates/fragments/interview.d.ts.map +1 -1
- package/dist/core/templates/fragments/interview.js +2 -6
- package/dist/core/templates/fragments/interview.js.map +1 -1
- package/dist/core/templates/fragments/next-step.d.ts +4 -8
- package/dist/core/templates/fragments/next-step.d.ts.map +1 -1
- package/dist/core/templates/fragments/next-step.js +4 -8
- package/dist/core/templates/fragments/next-step.js.map +1 -1
- package/dist/core/templates/fragments/validate.d.ts +13 -0
- package/dist/core/templates/fragments/validate.d.ts.map +1 -0
- package/dist/core/templates/fragments/validate.js +13 -0
- package/dist/core/templates/fragments/validate.js.map +1 -0
- package/dist/core/templates/fragments/verify.d.ts +9 -12
- package/dist/core/templates/fragments/verify.d.ts.map +1 -1
- package/dist/core/templates/fragments/verify.js +9 -12
- package/dist/core/templates/fragments/verify.js.map +1 -1
- package/dist/core/templates/index.d.ts +0 -6
- package/dist/core/templates/index.d.ts.map +1 -1
- package/dist/core/templates/index.js +0 -7
- package/dist/core/templates/index.js.map +1 -1
- package/dist/core/templates/skill-templates.d.ts +1 -5
- package/dist/core/templates/skill-templates.d.ts.map +1 -1
- package/dist/core/templates/skill-templates.js +0 -5
- package/dist/core/templates/skill-templates.js.map +1 -1
- package/dist/core/templates/types.d.ts +3 -7
- package/dist/core/templates/types.d.ts.map +1 -1
- package/dist/core/templates/types.js +0 -3
- package/dist/core/templates/types.js.map +1 -1
- package/dist/core/templates/workflows/apply.d.ts +3 -9
- package/dist/core/templates/workflows/apply.d.ts.map +1 -1
- package/dist/core/templates/workflows/apply.js +11 -13
- package/dist/core/templates/workflows/apply.js.map +1 -1
- package/dist/core/templates/workflows/archive.d.ts +0 -6
- package/dist/core/templates/workflows/archive.d.ts.map +1 -1
- package/dist/core/templates/workflows/archive.js +16 -5
- package/dist/core/templates/workflows/archive.js.map +1 -1
- package/dist/core/templates/workflows/decision.js +3 -3
- package/dist/core/templates/workflows/decision.js.map +1 -1
- package/dist/core/templates/workflows/explore.js +1 -1
- package/dist/core/templates/workflows/grill.d.ts.map +1 -1
- package/dist/core/templates/workflows/grill.js +0 -2
- package/dist/core/templates/workflows/grill.js.map +1 -1
- package/dist/core/templates/workflows/issue.d.ts +0 -6
- package/dist/core/templates/workflows/issue.d.ts.map +1 -1
- package/dist/core/templates/workflows/issue.js +3 -2
- package/dist/core/templates/workflows/issue.js.map +1 -1
- package/dist/core/templates/workflows/propose.d.ts +0 -6
- package/dist/core/templates/workflows/propose.d.ts.map +1 -1
- package/dist/core/templates/workflows/propose.js +2 -2
- package/dist/core/templates/workflows/propose.js.map +1 -1
- package/dist/core/templates/workflows/sync.d.ts +2 -8
- package/dist/core/templates/workflows/sync.d.ts.map +1 -1
- package/dist/core/templates/workflows/sync.js +4 -3
- package/dist/core/templates/workflows/sync.js.map +1 -1
- package/dist/core/templates/workflows/update.d.ts +0 -6
- package/dist/core/templates/workflows/update.d.ts.map +1 -1
- package/dist/core/templates/workflows/update.js +9 -2
- package/dist/core/templates/workflows/update.js.map +1 -1
- package/dist/core/update.d.ts +10 -36
- package/dist/core/update.d.ts.map +1 -1
- package/dist/core/update.js +59 -126
- package/dist/core/update.js.map +1 -1
- package/dist/core/user-state-migration.d.ts +13 -15
- package/dist/core/user-state-migration.d.ts.map +1 -1
- package/dist/core/user-state-migration.js +16 -20
- package/dist/core/user-state-migration.js.map +1 -1
- package/dist/core/validation/constants.d.ts +4 -10
- package/dist/core/validation/constants.d.ts.map +1 -1
- package/dist/core/validation/constants.js +25 -25
- package/dist/core/validation/constants.js.map +1 -1
- package/dist/core/validation/prose-length.d.ts +15 -0
- package/dist/core/validation/prose-length.d.ts.map +1 -0
- package/dist/core/validation/prose-length.js +29 -0
- package/dist/core/validation/prose-length.js.map +1 -0
- package/dist/core/validation/purpose-placeholder.d.ts +9 -16
- package/dist/core/validation/purpose-placeholder.d.ts.map +1 -1
- package/dist/core/validation/purpose-placeholder.js +30 -44
- package/dist/core/validation/purpose-placeholder.js.map +1 -1
- package/dist/core/validation/section-validator.d.ts +4 -4
- package/dist/core/validation/section-validator.d.ts.map +1 -1
- package/dist/core/validation/section-validator.js +30 -12
- package/dist/core/validation/section-validator.js.map +1 -1
- package/dist/core/validation/task-numbering.d.ts +6 -3
- package/dist/core/validation/task-numbering.d.ts.map +1 -1
- package/dist/core/validation/task-numbering.js +23 -11
- package/dist/core/validation/task-numbering.js.map +1 -1
- package/dist/core/validation/types.d.ts +18 -0
- package/dist/core/validation/types.d.ts.map +1 -1
- package/dist/core/validation/types.js +12 -1
- package/dist/core/validation/types.js.map +1 -1
- package/dist/core/validation/validator.d.ts +42 -68
- package/dist/core/validation/validator.d.ts.map +1 -1
- package/dist/core/validation/validator.js +468 -285
- package/dist/core/validation/validator.js.map +1 -1
- package/dist/prompts/searchable-multi-select.d.ts +3 -8
- package/dist/prompts/searchable-multi-select.d.ts.map +1 -1
- package/dist/prompts/searchable-multi-select.js +16 -39
- package/dist/prompts/searchable-multi-select.js.map +1 -1
- package/dist/utils/change-metadata.d.ts +11 -50
- package/dist/utils/change-metadata.d.ts.map +1 -1
- package/dist/utils/change-metadata.js +48 -67
- package/dist/utils/change-metadata.js.map +1 -1
- package/dist/utils/change-utils.d.ts +24 -76
- package/dist/utils/change-utils.d.ts.map +1 -1
- package/dist/utils/change-utils.js +95 -142
- package/dist/utils/change-utils.js.map +1 -1
- package/dist/utils/file-lock.d.ts +39 -0
- package/dist/utils/file-lock.d.ts.map +1 -0
- package/dist/utils/file-lock.js +149 -0
- package/dist/utils/file-lock.js.map +1 -0
- package/dist/utils/file-system.d.ts +12 -32
- package/dist/utils/file-system.d.ts.map +1 -1
- package/dist/utils/file-system.js +16 -40
- package/dist/utils/file-system.js.map +1 -1
- package/dist/utils/frontmatter.d.ts +7 -11
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +11 -11
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/interactive.d.ts +4 -9
- package/dist/utils/interactive.d.ts.map +1 -1
- package/dist/utils/interactive.js +2 -4
- package/dist/utils/interactive.js.map +1 -1
- package/dist/utils/item-discovery.d.ts +10 -20
- package/dist/utils/item-discovery.d.ts.map +1 -1
- package/dist/utils/item-discovery.js +31 -55
- package/dist/utils/item-discovery.js.map +1 -1
- package/dist/utils/link.d.ts +9 -18
- package/dist/utils/link.d.ts.map +1 -1
- package/dist/utils/link.js +9 -18
- package/dist/utils/link.js.map +1 -1
- package/dist/utils/requirement-diff.d.ts +13 -23
- package/dist/utils/requirement-diff.d.ts.map +1 -1
- package/dist/utils/requirement-diff.js +13 -23
- package/dist/utils/requirement-diff.js.map +1 -1
- package/dist/utils/spec-files.d.ts +7 -20
- package/dist/utils/spec-files.d.ts.map +1 -1
- package/dist/utils/spec-files.js +26 -51
- package/dist/utils/spec-files.js.map +1 -1
- package/dist/utils/task-progress.d.ts +11 -9
- package/dist/utils/task-progress.d.ts.map +1 -1
- package/dist/utils/task-progress.js +53 -32
- package/dist/utils/task-progress.js.map +1 -1
- package/dist/utils/timestamp.d.ts +5 -8
- package/dist/utils/timestamp.d.ts.map +1 -1
- package/dist/utils/timestamp.js +5 -8
- package/dist/utils/timestamp.js.map +1 -1
- package/package.json +2 -3
- package/schemas/issue/schema.yaml +8 -1
- package/schemas/issue/templates/spec.md +20 -3
- package/schemas/sdd/schema.yaml +20 -1
- package/schemas/sdd/templates/spec.md +20 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules-generation.js","sourceRoot":"","sources":["../../../src/core/shared/rules-generation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rules-generation.js","sourceRoot":"","sources":["../../../src/core/shared/rules-generation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,QAAQ,EACR,eAAe,EACf,sBAAsB,EACtB,6BAA6B,EAC7B,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AA4B7D;;;;GAIG;AACH,MAAM,sBAAsB,GAAG;;;CAG9B,CAAC;AAEF,MAAM,aAAa,GAA2B;IAC5C;QACE,QAAQ,EAAE,sBAAsB;QAChC,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,IAAI,GAAG,CAAC,wDAAwD,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC;QAC/F,uEAAuE;QACvE,WAAW,EAAE,CAAC,uBAAuB,CAAC;QACtC,cAAc,EAAE,6BAA6B;KAC9C;IACD;QACE,QAAQ,EAAE,sBAAsB;QAChC,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,IAAI,GAAG,CAAC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;YACjB,MAAM,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAC3C,GAAG,CAAC,4BAA4B,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;IACD,8EAA8E;IAC9E,yEAAyE;IACzE,wBAAwB;IACxB,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,eAAe,CAAC,EAAE,CAAC;QAC3D,GAAG,CAAC,yNAAyN,CAAC,CAAC;IACjO,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Skill Generation Utilities
|
|
3
|
-
*
|
|
4
|
-
* Shared utilities for generating skill and command files.
|
|
5
|
-
*/
|
|
6
1
|
import { getExploreSkillTemplate, getGrillSkillTemplate, getTospecProposeSkillTemplate, getTospecIssueSkillTemplate, getTospecDecisionSkillTemplate, getTospecUpdateSkillTemplate, getTospecApplySkillTemplate, getTospecApplyWithTDDSkillTemplate, getTospecSyncSkillTemplate, getTospecArchiveSkillTemplate, getTospecExploreCommandTemplate, getTospecGrillCommandTemplate, getTospecProposeCommandTemplate, getTospecIssueCommandTemplate, getTospecDecisionCommandTemplate, getTospecUpdateCommandTemplate, getTospecApplyCommandTemplate, getTospecApplyWithTDDCommandTemplate, getTospecSyncCommandTemplate, getTospecArchiveCommandTemplate, type SkillTemplate } from '../templates/skill-templates.js';
|
|
7
2
|
import { type CommandContent } from '../command-generation/index.js';
|
|
8
3
|
declare const WORKFLOW_DEFS: readonly [{
|
|
@@ -50,66 +45,56 @@ export type WorkflowId = (typeof WORKFLOW_DEFS)[number]['id'];
|
|
|
50
45
|
export declare const ALL_WORKFLOWS: readonly WorkflowId[];
|
|
51
46
|
/** Skill directory name convention: `tospec-<workflow>`. */
|
|
52
47
|
export declare function workflowSkillDirName(id: string): string;
|
|
48
|
+
/** A `tospec-<id>` mention in the prose of a skill that is being installed. */
|
|
49
|
+
export interface WorkflowReferenceGap {
|
|
50
|
+
/** The workflow whose skill/command text carries the reference. */
|
|
51
|
+
from: WorkflowId;
|
|
52
|
+
/** The workflow it points at, which this selection does not install. */
|
|
53
|
+
missing: WorkflowId;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Skills a selection installs whose instructions send the agent to a workflow that
|
|
57
|
+
* selection leaves out.
|
|
58
|
+
*
|
|
59
|
+
* A custom profile is a subset and the prose is not: templates name sibling
|
|
60
|
+
* workflows unconditionally, so `propose,apply,archive` installs an archive
|
|
61
|
+
* skill saying "Run the `tospec-sync` workflow now" of a skill that is not
|
|
62
|
+
* there, and the agent improvises the step.
|
|
63
|
+
*
|
|
64
|
+
* Reported rather than corrected: the selection is the user's, and rewriting
|
|
65
|
+
* prose per profile would fork the installed text from the canonical template.
|
|
66
|
+
*/
|
|
67
|
+
export declare function findWorkflowReferenceGaps(selected: readonly string[]): WorkflowReferenceGap[];
|
|
53
68
|
/**
|
|
54
|
-
*
|
|
69
|
+
* One line per skill that points somewhere the selection does not install,
|
|
70
|
+
* e.g. `tospec-archive refers to tospec-sync`.
|
|
55
71
|
*/
|
|
72
|
+
export declare function describeWorkflowReferenceGaps(gaps: readonly WorkflowReferenceGap[]): string;
|
|
56
73
|
export interface SkillTemplateEntry {
|
|
57
74
|
template: SkillTemplate;
|
|
58
75
|
dirName: string;
|
|
59
76
|
workflowId: string;
|
|
60
77
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Command template with ID mapping.
|
|
63
|
-
*/
|
|
64
78
|
export interface CommandTemplateEntry {
|
|
65
79
|
template: ReturnType<typeof getTospecExploreCommandTemplate>;
|
|
66
80
|
id: string;
|
|
67
81
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Gets skill templates with their directory names, optionally filtered by workflow IDs.
|
|
70
|
-
*
|
|
71
|
-
* @param workflowFilter - If provided, only return templates whose workflowId is in this array
|
|
72
|
-
*/
|
|
73
82
|
export declare function getSkillTemplates(workflowFilter?: readonly string[]): SkillTemplateEntry[];
|
|
74
|
-
/**
|
|
75
|
-
* Gets command templates with their IDs, optionally filtered by workflow IDs.
|
|
76
|
-
*
|
|
77
|
-
* @param workflowFilter - If provided, only return templates whose id is in this array
|
|
78
|
-
*/
|
|
79
83
|
export declare function getCommandTemplates(workflowFilter?: readonly string[]): CommandTemplateEntry[];
|
|
80
|
-
/**
|
|
81
|
-
* Converts command templates to CommandContent array, optionally filtered by workflow IDs.
|
|
82
|
-
*
|
|
83
|
-
* @param workflowFilter - If provided, only return contents whose id is in this array
|
|
84
|
-
*/
|
|
85
84
|
export declare function getCommandContents(workflowFilter?: readonly string[]): CommandContent[];
|
|
86
|
-
/**
|
|
87
|
-
* Generates skill file content with YAML frontmatter.
|
|
88
|
-
*
|
|
89
|
-
* @param template - The skill template
|
|
90
|
-
* @param generatedByVersion - The Tospec version to embed in the file
|
|
91
|
-
* @param transformInstructions - Optional callback to transform the instructions content
|
|
92
|
-
*/
|
|
85
|
+
/** Renders a skill's YAML frontmatter plus its instructions. */
|
|
93
86
|
export declare function generateSkillContent(template: SkillTemplate, generatedByVersion: string, transformInstructions?: (instructions: string) => string): string;
|
|
94
87
|
/**
|
|
95
88
|
* Writes one skill directory: `SKILL.md` plus any `extraFiles` the template
|
|
96
89
|
* discloses beside it. The single writer for `.agents/skills/<dir>/`, shared by
|
|
97
|
-
* `init`, `update
|
|
90
|
+
* `init`, `update` and the `pnpm skills` dump, so a new sibling file cannot
|
|
98
91
|
* reach one path and miss another.
|
|
99
92
|
*/
|
|
100
93
|
export declare function writeSkillDir(skillsDir: string, dirName: string, template: SkillTemplate, generatedByVersion: string): Promise<void>;
|
|
101
94
|
/**
|
|
102
|
-
* Writes slash-command files for a tool that has a
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* Refreshes the tospec command directory first so deselected or renamed
|
|
107
|
-
* commands don't linger. Only removes a tospec-specific command dir, never a
|
|
108
|
-
* shared `commands/` directory.
|
|
109
|
-
*
|
|
110
|
-
* @param projectPath - Project root
|
|
111
|
-
* @param toolValue - Tool id (e.g. 'claude')
|
|
112
|
-
* @param workflowFilter - If provided, only these workflow ids get commands
|
|
95
|
+
* Writes slash-command files for a tool that has a command adapter (Claude Code
|
|
96
|
+
* writes `.claude/commands/tosx/<id>.md`, invocable as `/tosx:<id>`). A no-op
|
|
97
|
+
* for tools without one.
|
|
113
98
|
*/
|
|
114
99
|
export declare function writeToolCommands(projectPath: string, toolValue: string, workflowFilter?: readonly string[]): Promise<void>;
|
|
115
100
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-generation.d.ts","sourceRoot":"","sources":["../../../src/core/shared/skill-generation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"skill-generation.d.ts","sourceRoot":"","sources":["../../../src/core/shared/skill-generation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,EAC9B,4BAA4B,EAC5B,2BAA2B,EAC3B,kCAAkC,EAClC,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,gCAAgC,EAChC,8BAA8B,EAC9B,6BAA6B,EAC7B,oCAAoC,EACpC,4BAA4B,EAC5B,+BAA+B,EAC/B,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,gCAAgC,CAAC;AAKxC,QAAA,MAAM,aAAa;aACf,EAAE,EAAE,SAAS;aAAE,KAAK;aAA2B,OAAO;;aACtD,EAAE,EAAE,OAAO;aAAE,KAAK;aAAyB,OAAO;;aAClD,EAAE,EAAE,SAAS;aAAE,KAAK;aAAiC,OAAO;;aAC5D,EAAE,EAAE,OAAO;aAAE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kBAAkB,EAAE,CAM1F;AAED,wBAAgB,mBAAmB,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,oBAAoB,EAAE,CAK9F;AAED,wBAAgB,kBAAkB,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,cAAc,EAAE,CASvF;AAED,gEAAgE;AAChE,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,aAAa,EACvB,kBAAkB,EAAE,MAAM,EAC1B,qBAAqB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,GACvD,MAAM,CAyBR;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,aAAa,EACvB,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,IAAI,CAAC,CASf;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GACjC,OAAO,CAAC,IAAI,CAAC,CAgBf"}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Skill Generation Utilities
|
|
3
|
-
*
|
|
4
|
-
* Shared utilities for generating skill and command files.
|
|
5
|
-
*/
|
|
6
1
|
import { getExploreSkillTemplate, getGrillSkillTemplate, getTospecProposeSkillTemplate, getTospecIssueSkillTemplate, getTospecDecisionSkillTemplate, getTospecUpdateSkillTemplate, getTospecApplySkillTemplate, getTospecApplyWithTDDSkillTemplate, getTospecSyncSkillTemplate, getTospecArchiveSkillTemplate, getTospecExploreCommandTemplate, getTospecGrillCommandTemplate, getTospecProposeCommandTemplate, getTospecIssueCommandTemplate, getTospecDecisionCommandTemplate, getTospecUpdateCommandTemplate, getTospecApplyCommandTemplate, getTospecApplyWithTDDCommandTemplate, getTospecSyncCommandTemplate, getTospecArchiveCommandTemplate, } from '../templates/skill-templates.js';
|
|
7
2
|
import path from 'path';
|
|
8
3
|
import { promises as fs } from 'fs';
|
|
9
4
|
import { FileSystemUtils } from '../../utils/file-system.js';
|
|
10
5
|
import { findCommandAdapter, generateCommands, } from '../command-generation/index.js';
|
|
11
6
|
import { escapeYamlValue } from '../command-generation/yaml.js';
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
// template functions. ALL_WORKFLOWS, skill dir names, and both template lists
|
|
15
|
-
// derive from this array — adding a workflow means adding exactly one row.
|
|
16
|
-
// -----------------------------------------------------------------------------
|
|
7
|
+
// The one workflow registry. ALL_WORKFLOWS, skill dir names and both template
|
|
8
|
+
// lists derive from it, so adding a workflow is one row.
|
|
17
9
|
const WORKFLOW_DEFS = [
|
|
18
10
|
{ id: 'explore', skill: getExploreSkillTemplate, command: getTospecExploreCommandTemplate },
|
|
19
11
|
{ id: 'grill', skill: getGrillSkillTemplate, command: getTospecGrillCommandTemplate },
|
|
@@ -32,38 +24,92 @@ export function workflowSkillDirName(id) {
|
|
|
32
24
|
return `tospec-${id}`;
|
|
33
25
|
}
|
|
34
26
|
/**
|
|
35
|
-
*
|
|
27
|
+
* Every `tospec-<workflow>` the given selection's own prose names.
|
|
28
|
+
*
|
|
29
|
+
* `[a-z0-9-]+` is greedy on purpose, so `tospec-apply-with-tdd` reads as
|
|
30
|
+
* `apply-with-tdd` rather than `apply`; anything that is not a known workflow
|
|
31
|
+
* id (`tospec-cli`, a stray hyphenated word) is dropped by the caller.
|
|
32
|
+
*/
|
|
33
|
+
const WORKFLOW_REFERENCE = /tospec-([a-z0-9-]+)/g;
|
|
34
|
+
/**
|
|
35
|
+
* Skills a selection installs whose instructions send the agent to a workflow that
|
|
36
|
+
* selection leaves out.
|
|
37
|
+
*
|
|
38
|
+
* A custom profile is a subset and the prose is not: templates name sibling
|
|
39
|
+
* workflows unconditionally, so `propose,apply,archive` installs an archive
|
|
40
|
+
* skill saying "Run the `tospec-sync` workflow now" of a skill that is not
|
|
41
|
+
* there, and the agent improvises the step.
|
|
36
42
|
*
|
|
37
|
-
*
|
|
43
|
+
* Reported rather than corrected: the selection is the user's, and rewriting
|
|
44
|
+
* prose per profile would fork the installed text from the canonical template.
|
|
38
45
|
*/
|
|
46
|
+
export function findWorkflowReferenceGaps(selected) {
|
|
47
|
+
const selectedSet = new Set(selected);
|
|
48
|
+
const known = new Set(ALL_WORKFLOWS);
|
|
49
|
+
const gaps = [];
|
|
50
|
+
const seen = new Set();
|
|
51
|
+
for (const workflow of WORKFLOW_DEFS) {
|
|
52
|
+
if (!selectedSet.has(workflow.id))
|
|
53
|
+
continue;
|
|
54
|
+
// Skill and command carry the same guidance in two renderings, and a
|
|
55
|
+
// reference in either reaches an agent.
|
|
56
|
+
const skill = workflow.skill();
|
|
57
|
+
const prose = [
|
|
58
|
+
skill.instructions,
|
|
59
|
+
...Object.values(skill.extraFiles ?? {}),
|
|
60
|
+
workflow.command().content,
|
|
61
|
+
].join('\n');
|
|
62
|
+
for (const [, referenced] of prose.matchAll(WORKFLOW_REFERENCE)) {
|
|
63
|
+
if (referenced === workflow.id)
|
|
64
|
+
continue;
|
|
65
|
+
if (!known.has(referenced) || selectedSet.has(referenced))
|
|
66
|
+
continue;
|
|
67
|
+
const key = `${workflow.id}->${referenced}`;
|
|
68
|
+
if (seen.has(key))
|
|
69
|
+
continue;
|
|
70
|
+
seen.add(key);
|
|
71
|
+
gaps.push({ from: workflow.id, missing: referenced });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return gaps;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* One line per skill that points somewhere the selection does not install,
|
|
78
|
+
* e.g. `tospec-archive refers to tospec-sync`.
|
|
79
|
+
*/
|
|
80
|
+
export function describeWorkflowReferenceGaps(gaps) {
|
|
81
|
+
const byFrom = new Map();
|
|
82
|
+
for (const gap of gaps) {
|
|
83
|
+
const list = byFrom.get(gap.from) ?? [];
|
|
84
|
+
list.push(workflowSkillDirName(gap.missing));
|
|
85
|
+
byFrom.set(gap.from, list);
|
|
86
|
+
}
|
|
87
|
+
return [...byFrom.entries()]
|
|
88
|
+
.map(([from, missing]) => `${workflowSkillDirName(from)} refers to ${missing.join(', ')}`)
|
|
89
|
+
.join('; ');
|
|
90
|
+
}
|
|
91
|
+
/** An absent filter selects every workflow. */
|
|
92
|
+
function selectWorkflows(workflowFilter) {
|
|
93
|
+
if (!workflowFilter)
|
|
94
|
+
return WORKFLOW_DEFS;
|
|
95
|
+
const filterSet = new Set(workflowFilter);
|
|
96
|
+
return WORKFLOW_DEFS.filter((w) => filterSet.has(w.id));
|
|
97
|
+
}
|
|
39
98
|
export function getSkillTemplates(workflowFilter) {
|
|
40
|
-
|
|
41
|
-
return WORKFLOW_DEFS.filter((w) => !filterSet || filterSet.has(w.id)).map((w) => ({
|
|
99
|
+
return selectWorkflows(workflowFilter).map((w) => ({
|
|
42
100
|
template: w.skill(),
|
|
43
101
|
dirName: workflowSkillDirName(w.id),
|
|
44
102
|
workflowId: w.id,
|
|
45
103
|
}));
|
|
46
104
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Gets command templates with their IDs, optionally filtered by workflow IDs.
|
|
49
|
-
*
|
|
50
|
-
* @param workflowFilter - If provided, only return templates whose id is in this array
|
|
51
|
-
*/
|
|
52
105
|
export function getCommandTemplates(workflowFilter) {
|
|
53
|
-
|
|
54
|
-
return WORKFLOW_DEFS.filter((w) => !filterSet || filterSet.has(w.id)).map((w) => ({
|
|
106
|
+
return selectWorkflows(workflowFilter).map((w) => ({
|
|
55
107
|
template: w.command(),
|
|
56
108
|
id: w.id,
|
|
57
109
|
}));
|
|
58
110
|
}
|
|
59
|
-
/**
|
|
60
|
-
* Converts command templates to CommandContent array, optionally filtered by workflow IDs.
|
|
61
|
-
*
|
|
62
|
-
* @param workflowFilter - If provided, only return contents whose id is in this array
|
|
63
|
-
*/
|
|
64
111
|
export function getCommandContents(workflowFilter) {
|
|
65
|
-
|
|
66
|
-
return commandTemplates.map(({ template, id }) => ({
|
|
112
|
+
return getCommandTemplates(workflowFilter).map(({ template, id }) => ({
|
|
67
113
|
id,
|
|
68
114
|
name: template.name,
|
|
69
115
|
description: template.description,
|
|
@@ -72,13 +118,7 @@ export function getCommandContents(workflowFilter) {
|
|
|
72
118
|
body: template.content,
|
|
73
119
|
}));
|
|
74
120
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Generates skill file content with YAML frontmatter.
|
|
77
|
-
*
|
|
78
|
-
* @param template - The skill template
|
|
79
|
-
* @param generatedByVersion - The Tospec version to embed in the file
|
|
80
|
-
* @param transformInstructions - Optional callback to transform the instructions content
|
|
81
|
-
*/
|
|
121
|
+
/** Renders a skill's YAML frontmatter plus its instructions. */
|
|
82
122
|
export function generateSkillContent(template, generatedByVersion, transformInstructions) {
|
|
83
123
|
const instructions = transformInstructions
|
|
84
124
|
? transformInstructions(template.instructions)
|
|
@@ -105,7 +145,7 @@ ${instructions}
|
|
|
105
145
|
/**
|
|
106
146
|
* Writes one skill directory: `SKILL.md` plus any `extraFiles` the template
|
|
107
147
|
* discloses beside it. The single writer for `.agents/skills/<dir>/`, shared by
|
|
108
|
-
* `init`, `update
|
|
148
|
+
* `init`, `update` and the `pnpm skills` dump, so a new sibling file cannot
|
|
109
149
|
* reach one path and miss another.
|
|
110
150
|
*/
|
|
111
151
|
export async function writeSkillDir(skillsDir, dirName, template, generatedByVersion) {
|
|
@@ -116,26 +156,17 @@ export async function writeSkillDir(skillsDir, dirName, template, generatedByVer
|
|
|
116
156
|
}
|
|
117
157
|
}
|
|
118
158
|
/**
|
|
119
|
-
* Writes slash-command files for a tool that has a
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* Refreshes the tospec command directory first so deselected or renamed
|
|
124
|
-
* commands don't linger. Only removes a tospec-specific command dir, never a
|
|
125
|
-
* shared `commands/` directory.
|
|
126
|
-
*
|
|
127
|
-
* @param projectPath - Project root
|
|
128
|
-
* @param toolValue - Tool id (e.g. 'claude')
|
|
129
|
-
* @param workflowFilter - If provided, only these workflow ids get commands
|
|
159
|
+
* Writes slash-command files for a tool that has a command adapter (Claude Code
|
|
160
|
+
* writes `.claude/commands/tosx/<id>.md`, invocable as `/tosx:<id>`). A no-op
|
|
161
|
+
* for tools without one.
|
|
130
162
|
*/
|
|
131
163
|
export async function writeToolCommands(projectPath, toolValue, workflowFilter) {
|
|
132
|
-
// Tools without a command adapter (Codex today) simply get no commands.
|
|
133
164
|
const adapter = findCommandAdapter(toolValue);
|
|
134
165
|
if (!adapter)
|
|
135
166
|
return;
|
|
136
|
-
//
|
|
137
|
-
//
|
|
138
|
-
//
|
|
167
|
+
// Wipe first so deselected or renamed commands do not linger, but only a
|
|
168
|
+
// tospec-owned namespace sub-dir: a flat adapter writes straight into a
|
|
169
|
+
// shared `commands/` dir alongside unrelated commands.
|
|
139
170
|
const commandBaseDir = path.dirname(adapter.getFilePath('_probe'));
|
|
140
171
|
if (path.basename(commandBaseDir) !== 'commands') {
|
|
141
172
|
await fs.rm(path.join(projectPath, commandBaseDir), { recursive: true, force: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-generation.js","sourceRoot":"","sources":["../../../src/core/shared/skill-generation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"skill-generation.js","sourceRoot":"","sources":["../../../src/core/shared/skill-generation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,EAC9B,4BAA4B,EAC5B,2BAA2B,EAC3B,kCAAkC,EAClC,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,gCAAgC,EAChC,8BAA8B,EAC9B,6BAA6B,EAC7B,oCAAoC,EACpC,4BAA4B,EAC5B,+BAA+B,GAEhC,MAAM,iCAAiC,CAAC;AACzC,OAAO,IAAI,MAAM,M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AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,WAAmB,EACnB,SAAiB,EACjB,cAAkC;IAElC,MAAM,OAAO,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC9C,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,yEAAyE;IACzE,wEAAwE;IACxE,uDAAuD;IACvD,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;IACnE,IAAI,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,UAAU,EAAE,CAAC;QACjD,MAAM,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACxF,CAAC;IAED,MAAM,QAAQ,GAAG,gBAAgB,CAAC,kBAAkB,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;IAC/E,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7F,CAAC;AACH,CAAC"}
|
|
@@ -1,112 +1,71 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Names of skill directories created by tospec init, derived from the one
|
|
8
|
-
* workflow registry. Project-scope skills can't be nested, so they live flat
|
|
9
|
-
* and prefixed at `<tool.skillsDir>/skills/tospec-<workflow>/SKILL.md`.
|
|
2
|
+
* Skill directories `tospec init` creates, derived from the one workflow registry.
|
|
3
|
+
* Project-scope skills can't be nested, so they live flat and prefixed at
|
|
4
|
+
* `<tool.skillsDir>/skills/tospec-<workflow>/SKILL.md`.
|
|
10
5
|
*/
|
|
11
6
|
export declare const SKILL_NAMES: readonly string[];
|
|
12
7
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* `.agents/skills/`. verify was folded into apply; reconcile was renamed back
|
|
16
|
-
* to sync, so its dir must go rather than sit beside the new one.
|
|
8
|
+
* Skill directories tospec used to create but no longer does; removed on
|
|
9
|
+
* init/update so an upgrade leaves no orphans.
|
|
17
10
|
*
|
|
18
|
-
* A name
|
|
19
|
-
* runs on every init/update, so an overlap
|
|
20
|
-
* just wrote — silently, surfacing later as a missing skill rather than an error.
|
|
21
|
-
* That is why `tospec-sync` came out of this list when the reconcile rename was
|
|
22
|
-
* reverted, instead of `tospec-reconcile` simply being appended.
|
|
11
|
+
* A name WORKFLOW_DEFS generates must never appear here: removeLegacySkillDirs
|
|
12
|
+
* runs on every init/update, so an overlap deletes the skill the run just wrote.
|
|
23
13
|
*/
|
|
24
14
|
export declare const LEGACY_SKILL_DIRS: readonly ['tospec-verify', 'tospec-reconcile'];
|
|
25
|
-
/**
|
|
26
|
-
* Status of skill configuration for a tool.
|
|
27
|
-
*/
|
|
28
15
|
export interface ToolSkillStatus {
|
|
29
|
-
/**
|
|
16
|
+
/** The tool has at least one skill. */
|
|
30
17
|
configured: boolean;
|
|
31
|
-
/**
|
|
18
|
+
/** The tool has every skill in SKILL_NAMES. */
|
|
32
19
|
fullyConfigured: boolean;
|
|
33
|
-
/** Number of skills currently configured */
|
|
34
20
|
skillCount: number;
|
|
35
21
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Version information for a tool's skills.
|
|
38
|
-
*/
|
|
39
22
|
export interface ToolVersionStatus {
|
|
40
|
-
/** The tool ID */
|
|
41
23
|
toolId: string;
|
|
42
|
-
/** The tool's display name */
|
|
43
24
|
toolName: string;
|
|
44
|
-
/** Whether the tool has any skills configured */
|
|
45
25
|
configured: boolean;
|
|
46
|
-
/** The generatedBy
|
|
26
|
+
/** The `generatedBy` frontmatter found in the skill files, or null. */
|
|
47
27
|
generatedByVersion: string | null;
|
|
48
|
-
/**
|
|
28
|
+
/** Version mismatched or missing. */
|
|
49
29
|
needsUpdate: boolean;
|
|
50
30
|
}
|
|
51
|
-
/**
|
|
52
|
-
* Removes any legacy skill directories (see LEGACY_SKILL_DIRS) from the given
|
|
53
|
-
* skills directory. Idempotent — safe to call when they don't exist. Used by
|
|
54
|
-
* init/update so upgrades leave no orphan verify/sync dirs behind.
|
|
55
|
-
*/
|
|
31
|
+
/** Idempotent: safe when the legacy dirs do not exist. */
|
|
56
32
|
export declare function removeLegacySkillDirs(skillsDir: string): Promise<number>;
|
|
57
33
|
/**
|
|
58
|
-
* Removes the
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
34
|
+
* Removes the skill directories for workflows the active profile does not select.
|
|
35
|
+
*
|
|
36
|
+
* Shared by `init` and `update`: agents load skills from the skill directory, so
|
|
37
|
+
* a run that prunes only `.claude/commands/tosx/` leaves excluded workflows
|
|
38
|
+
* loadable.
|
|
39
|
+
*
|
|
40
|
+
* ALL_WORKFLOWS and the directory naming are derived here rather than passed in,
|
|
41
|
+
* since a caller supplying either is a copy that can fall behind WORKFLOW_DEFS.
|
|
66
42
|
*/
|
|
67
|
-
export declare function
|
|
43
|
+
export declare function removeUnselectedSkillDirs(skillsDir: string, desiredWorkflows: readonly string[]): Promise<number>;
|
|
68
44
|
/**
|
|
69
|
-
*
|
|
45
|
+
* Removes the grouped skill layouts earlier builds wrote, so an upgrade lands at
|
|
46
|
+
* the current flat `<toolBaseDir>/skills/tospec-<workflow>/`. The flat dirs are
|
|
47
|
+
* left alone: the copy loop refreshes them, and retired ones go via
|
|
48
|
+
* removeLegacySkillDirs.
|
|
70
49
|
*/
|
|
50
|
+
export declare function removeLegacyToolSkillLayout(toolBaseDir: string): Promise<number>;
|
|
71
51
|
export declare function getToolsWithSkillsDir(): string[];
|
|
72
|
-
/**
|
|
73
|
-
* Checks which skill files exist for a tool.
|
|
74
|
-
*/
|
|
75
52
|
export declare function getToolSkillStatus(projectRoot: string, toolId: string): ToolSkillStatus;
|
|
76
|
-
/**
|
|
77
|
-
* Gets the skill status for all tools with skillsDir configured.
|
|
78
|
-
*/
|
|
79
53
|
export declare function getToolStates(projectRoot: string): Map<string, ToolSkillStatus>;
|
|
80
|
-
/**
|
|
81
|
-
* Extracts the generatedBy version from a skill file's YAML frontmatter.
|
|
82
|
-
* Returns null if the field is not found or the file doesn't exist.
|
|
83
|
-
*/
|
|
54
|
+
/** Null when the field is absent or the file cannot be read. */
|
|
84
55
|
export declare function extractGeneratedByVersion(skillFilePath: string): string | null;
|
|
85
|
-
/**
|
|
86
|
-
* Gets version status for a tool by reading the first available skill file.
|
|
87
|
-
*/
|
|
56
|
+
/** Reads the version from the first skill file the tool has. */
|
|
88
57
|
export declare function getToolVersionStatus(projectRoot: string, toolId: string, currentVersion: string): ToolVersionStatus;
|
|
89
|
-
/**
|
|
90
|
-
* Gets all configured tools in the project.
|
|
91
|
-
*/
|
|
92
58
|
export declare function getConfiguredTools(projectRoot: string): string[];
|
|
93
59
|
/**
|
|
94
60
|
* Whether tospec has been installed into this tool dir, independent of how many
|
|
95
|
-
* skills
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* and the wrong one for `update`/`rules`. A profile that selects no workflows
|
|
100
|
-
* makes `update` remove every `tospec-<workflow>` dir, and while installation was
|
|
101
|
-
* inferred from that same directory count, the run that emptied the dir also
|
|
102
|
-
* erased the only evidence the tool was ever set up: the next `update` reported
|
|
103
|
-
* "No configured tools found" and only `init` could recover. See
|
|
104
|
-
* tospec/decisions/20260916_152000-tool-install-marker-not-skill-count.md
|
|
61
|
+
* skills sit there — the right question for `update`/`rules`, where
|
|
62
|
+
* `getToolSkillStatus().configured` is wrong: a profile selecting no workflows
|
|
63
|
+
* makes `update` remove every skill dir, erasing the evidence the tool was set
|
|
64
|
+
* up. tospec/decisions/20260916_152000-tool-install-marker-not-skill-count.md
|
|
105
65
|
*
|
|
106
|
-
* The workflow rule document is the durable marker: written
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* only, so it proves tospec once touched the dir, not that it still manages it.
|
|
66
|
+
* The workflow rule document is the durable marker: written on every
|
|
67
|
+
* init/update/rules, removed by none. The legacy `rules/tospec/decision.md` is
|
|
68
|
+
* init-only, so it proves tospec once touched the dir, not that it manages it.
|
|
110
69
|
*/
|
|
111
70
|
export declare function isToolInstalled(projectRoot: string, toolId: string): boolean;
|
|
112
71
|
//# sourceMappingURL=tool-detection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-detection.d.ts","sourceRoot":"","sources":["../../../src/core/shared/tool-detection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tool-detection.d.ts","sourceRoot":"","sources":["../../../src/core/shared/tool-detection.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAA4C,CAAC;AAEtF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,YAAI,eAAe,EAAE,kBAAkB,CAAU,CAAC;AAEhF,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,+CAA+C;IAC/C,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,uEAAuE;IACvE,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,qCAAqC;IACrC,WAAW,EAAE,OAAO,CAAC;CACtB;AAsBD,0DAA0D;AAC1D,wBAAsB,qBAAqB,CAAC,SAAS,E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