@seanmars/tospec 0.19.0-beta.7 → 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 -231
- package/README.md +69 -82
- package/assets/dashboard/app.js +14 -3
- package/assets/dashboard/style.css +7 -0
- package/assets/rules/tospec/decision.md +3 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +227 -86
- 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 +366 -107
- 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 +224 -282
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/decision.d.ts +41 -19
- package/dist/commands/decision.d.ts.map +1 -1
- package/dist/commands/decision.js +385 -79
- 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 +18 -21
- package/dist/commands/shared-output.d.ts.map +1 -1
- package/dist/commands/shared-output.js +49 -23
- package/dist/commands/shared-output.js.map +1 -1
- package/dist/commands/show.d.ts +7 -0
- package/dist/commands/show.d.ts.map +1 -1
- package/dist/commands/show.js +29 -7
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/validate.d.ts +43 -45
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +262 -129
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/workflow/index.d.ts +6 -10
- package/dist/commands/workflow/index.d.ts.map +1 -1
- package/dist/commands/workflow/index.js +6 -10
- package/dist/commands/workflow/index.js.map +1 -1
- package/dist/commands/workflow/instructions.d.ts +21 -8
- package/dist/commands/workflow/instructions.d.ts.map +1 -1
- package/dist/commands/workflow/instructions.js +254 -95
- package/dist/commands/workflow/instructions.js.map +1 -1
- package/dist/commands/workflow/new-change.d.ts +4 -5
- package/dist/commands/workflow/new-change.d.ts.map +1 -1
- package/dist/commands/workflow/new-change.js +90 -25
- package/dist/commands/workflow/new-change.js.map +1 -1
- package/dist/commands/workflow/schemas.d.ts +3 -5
- package/dist/commands/workflow/schemas.d.ts.map +1 -1
- package/dist/commands/workflow/schemas.js +37 -11
- package/dist/commands/workflow/schemas.js.map +1 -1
- package/dist/commands/workflow/shared.d.ts +48 -21
- package/dist/commands/workflow/shared.d.ts.map +1 -1
- package/dist/commands/workflow/shared.js +36 -33
- package/dist/commands/workflow/shared.js.map +1 -1
- package/dist/commands/workflow/status.d.ts +10 -6
- package/dist/commands/workflow/status.d.ts.map +1 -1
- package/dist/commands/workflow/status.js +81 -42
- package/dist/commands/workflow/status.js.map +1 -1
- package/dist/commands/workflow/templates.d.ts +10 -3
- package/dist/commands/workflow/templates.d.ts.map +1 -1
- package/dist/commands/workflow/templates.js +39 -40
- package/dist/commands/workflow/templates.js.map +1 -1
- package/dist/core/archive.d.ts +26 -21
- package/dist/core/archive.d.ts.map +1 -1
- package/dist/core/archive.js +378 -235
- 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 +97 -103
- package/dist/core/artifact-graph/instruction-loader.d.ts.map +1 -1
- package/dist/core/artifact-graph/instruction-loader.js +146 -119
- 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 +44 -63
- package/dist/core/artifact-graph/resolver.d.ts.map +1 -1
- package/dist/core/artifact-graph/resolver.js +85 -86
- 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 +12 -0
- package/dist/core/artifact-graph/stub-detection.d.ts.map +1 -0
- package/dist/core/artifact-graph/stub-detection.js +39 -0
- package/dist/core/artifact-graph/stub-detection.js.map +1 -0
- 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 +23 -18
- package/dist/core/change-presenter.d.ts.map +1 -1
- package/dist/core/change-presenter.js +102 -43
- package/dist/core/change-presenter.js.map +1 -1
- package/dist/core/change-status-policy.d.ts +8 -1
- package/dist/core/change-status-policy.d.ts.map +1 -1
- package/dist/core/change-status-policy.js +25 -1
- 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 +8 -53
- package/dist/core/config-schema.d.ts.map +1 -1
- package/dist/core/config-schema.js +49 -62
- package/dist/core/config-schema.js.map +1 -1
- package/dist/core/config.d.ts +39 -26
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +36 -22
- 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 +40 -22
- package/dist/core/dashboard-data.d.ts.map +1 -1
- package/dist/core/dashboard-data.js +62 -70
- 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 +25 -19
- package/dist/core/init.d.ts.map +1 -1
- package/dist/core/init.js +168 -181
- package/dist/core/init.js.map +1 -1
- package/dist/core/list.d.ts +1 -1
- package/dist/core/list.d.ts.map +1 -1
- package/dist/core/list.js +121 -28
- 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 +25 -0
- package/dist/core/markdown-render.d.ts.map +1 -0
- package/dist/core/markdown-render.js +94 -0
- package/dist/core/markdown-render.js.map +1 -0
- package/dist/core/migrate.d.ts +29 -14
- package/dist/core/migrate.d.ts.map +1 -1
- package/dist/core/migrate.js +184 -122
- 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 +31 -22
- 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 +11 -7
- package/dist/core/root-selection.d.ts.map +1 -1
- package/dist/core/root-selection.js +7 -8
- package/dist/core/root-selection.js.map +1 -1
- package/dist/core/rules.d.ts +6 -1
- package/dist/core/rules.d.ts.map +1 -1
- package/dist/core/rules.js +23 -2
- 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 +3 -0
- package/dist/core/schemas/base.schema.d.ts.map +1 -1
- package/dist/core/schemas/base.schema.js +22 -6
- package/dist/core/schemas/base.schema.js.map +1 -1
- package/dist/core/schemas/change.schema.d.ts +16 -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/schemas/spec.schema.d.ts +2 -0
- package/dist/core/schemas/spec.schema.d.ts.map +1 -1
- package/dist/core/shared/index.d.ts +3 -8
- package/dist/core/shared/index.d.ts.map +1 -1
- package/dist/core/shared/index.js +3 -8
- package/dist/core/shared/index.js.map +1 -1
- package/dist/core/shared/rules-generation.d.ts +19 -8
- package/dist/core/shared/rules-generation.d.ts.map +1 -1
- package/dist/core/shared/rules-generation.js +117 -50
- 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 +39 -61
- package/dist/core/shared/tool-detection.d.ts.map +1 -1
- package/dist/core/shared/tool-detection.js +88 -80
- 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.js +6 -6
- package/dist/core/spec-presenter.js.map +1 -1
- package/dist/core/specs-apply.d.ts +22 -23
- package/dist/core/specs-apply.d.ts.map +1 -1
- package/dist/core/specs-apply.js +166 -193
- 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 +19 -6
- package/dist/core/templates/workflows/archive.js.map +1 -1
- package/dist/core/templates/workflows/decision.js +4 -4
- 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 +23 -23
- package/dist/core/update.d.ts.map +1 -1
- package/dist/core/update.js +139 -118
- 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 -20
- 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 +43 -7
- 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 +43 -63
- package/dist/core/validation/validator.d.ts.map +1 -1
- package/dist/core/validation/validator.js +500 -267
- 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 +30 -54
- package/dist/utils/change-utils.d.ts.map +1 -1
- package/dist/utils/change-utils.js +133 -91
- 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 +15 -10
- package/dist/utils/item-discovery.d.ts.map +1 -1
- package/dist/utils/item-discovery.js +42 -47
- 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/decision/templates/decision.md +3 -1
- package/schemas/decision/templates/index.md +2 -2
- package/schemas/issue/schema.yaml +8 -1
- package/schemas/issue/templates/spec.md +27 -2
- package/schemas/sdd/schema.yaml +20 -1
- package/schemas/sdd/templates/spec.md +27 -2
- /package/assets/rules/tospec/{single-sourc-of-truth.md → single-source-of-truth.md} +0 -0
package/dist/core/profiles.d.ts
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Profile System
|
|
3
|
-
*
|
|
4
|
-
* Defines workflow profiles that control which workflows are installed.
|
|
5
|
-
* Profiles determine WHICH workflows are installed.
|
|
6
|
-
*/
|
|
1
|
+
/** Workflow profiles: which workflows an install writes. */
|
|
7
2
|
import type { Profile } from './global-config.js';
|
|
8
3
|
export { ALL_WORKFLOWS, type WorkflowId } from './shared/skill-generation.js';
|
|
9
4
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* - 'core' profile always returns ALL_WORKFLOWS (the only profile's worth of workflows)
|
|
13
|
-
* - 'custom' profile returns the provided customWorkflows, or empty array if not provided
|
|
5
|
+
* The workflows a profile resolves to: `core` is always ALL_WORKFLOWS, `custom`
|
|
6
|
+
* is `customWorkflows`, or empty when none was given.
|
|
14
7
|
*/
|
|
15
8
|
export declare function getProfileWorkflows(profile: Profile, customWorkflows?: string[]): readonly string[];
|
|
16
9
|
//# sourceMappingURL=profiles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/core/profiles.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/core/profiles.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAE5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,OAAO,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAG9E;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,eAAe,CAAC,EAAE,MAAM,EAAE,GACzB,SAAS,MAAM,EAAE,CAKnB"}
|
package/dist/core/profiles.js
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Defines workflow profiles that control which workflows are installed.
|
|
5
|
-
* Profiles determine WHICH workflows are installed.
|
|
6
|
-
*/
|
|
7
|
-
// The workflow id list lives in the single workflow registry
|
|
8
|
-
// (shared/skill-generation.ts) — re-exported here for existing importers.
|
|
1
|
+
/** Workflow profiles: which workflows an install writes. */
|
|
2
|
+
// The workflow id list lives in the one registry (shared/skill-generation.ts);
|
|
3
|
+
// re-exported here for existing importers.
|
|
9
4
|
export { ALL_WORKFLOWS } from './shared/skill-generation.js';
|
|
10
5
|
import { ALL_WORKFLOWS } from './shared/skill-generation.js';
|
|
11
6
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* - 'core' profile always returns ALL_WORKFLOWS (the only profile's worth of workflows)
|
|
15
|
-
* - 'custom' profile returns the provided customWorkflows, or empty array if not provided
|
|
7
|
+
* The workflows a profile resolves to: `core` is always ALL_WORKFLOWS, `custom`
|
|
8
|
+
* is `customWorkflows`, or empty when none was given.
|
|
16
9
|
*/
|
|
17
10
|
export function getProfileWorkflows(profile, customWorkflows) {
|
|
18
11
|
if (profile === 'custom') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/core/profiles.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/core/profiles.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAI5D,+EAA+E;AAC/E,2CAA2C;AAC3C,OAAO,EAAE,aAAa,EAAmB,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAgB,EAChB,eAA0B;IAE1B,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QACzB,OAAO,eAAe,IAAI,EAAE,CAAC;IAC/B,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Zod schema for project configuration.
|
|
4
|
-
*
|
|
5
|
-
* Purpose:
|
|
6
|
-
* 1. Documentation - clearly defines the config file structure
|
|
7
|
-
* 2. Type safety - TypeScript infers ProjectConfig type from schema
|
|
8
|
-
* 3. Runtime validation - uses safeParse() for resilient field-by-field validation
|
|
9
|
-
*
|
|
10
|
-
* Why Zod over manual validation:
|
|
11
|
-
* - Helps understand Tospec's data interfaces at a glance
|
|
12
|
-
* - Single source of truth for type and validation
|
|
13
|
-
* - Consistent with other Tospec schemas
|
|
14
|
-
*/
|
|
2
|
+
/** Single source of truth for both `ProjectConfig` and its runtime validation. */
|
|
15
3
|
export declare const ProjectConfigSchema: z.ZodObject<{
|
|
16
4
|
schema: z.ZodString;
|
|
17
5
|
context: z.ZodOptional<z.ZodString>;
|
|
@@ -23,45 +11,56 @@ export declare const ProjectConfigSchema: z.ZodObject<{
|
|
|
23
11
|
export type ProjectConfig = z.infer<typeof ProjectConfigSchema>;
|
|
24
12
|
export declare const MAX_CONTEXT_SIZE: number;
|
|
25
13
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*
|
|
14
|
+
* A field this reader could not use, and therefore dropped. Returned rather than
|
|
15
|
+
* `console.warn`ed so it can reach `status[]`: "sets no context" and "your
|
|
16
|
+
* context was thrown away" are different facts.
|
|
17
|
+
*/
|
|
18
|
+
export interface ProjectConfigDiagnostic {
|
|
19
|
+
code: string;
|
|
20
|
+
message: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ProjectConfigResult {
|
|
23
|
+
config: ProjectConfig | null;
|
|
24
|
+
diagnostics: ProjectConfigDiagnostic[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Reads `tospec/config.yaml`, validating each field independently so one bad
|
|
28
|
+
* field does not discard the rest. Uncached on purpose: ~0.5 ms for a typical
|
|
29
|
+
* config and 1-2 reads per command, so mtime invalidation would buy nothing.
|
|
40
30
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
31
|
+
* Diagnostics go to stderr here, for callers with no envelope to carry them;
|
|
32
|
+
* the ones that have an envelope call the variant below.
|
|
43
33
|
*/
|
|
44
34
|
export declare function readProjectConfig(projectRoot: string): ProjectConfig | null;
|
|
45
35
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
|
|
53
|
-
|
|
36
|
+
* Stderr copy of the config diagnostics, for commands that never read the
|
|
37
|
+
* config themselves. `list` and `status` resolve each change's schema from its
|
|
38
|
+
* own `.tospec.yaml` and consult the project config only when that field is
|
|
39
|
+
* absent, so a config that no longer parses went unmentioned by exactly the
|
|
40
|
+
* commands a user runs to look around. Stderr in both modes: a `--json` stdout
|
|
41
|
+
* stays one document, and a warning is not a failed command.
|
|
42
|
+
*/
|
|
43
|
+
export declare function printProjectConfigDiagnostics(projectRoot: string): void;
|
|
44
|
+
/** The same read, with the dropped fields handed back instead of printed. */
|
|
45
|
+
export declare function readProjectConfigWithDiagnostics(projectRoot: string): ProjectConfigResult;
|
|
46
|
+
/**
|
|
47
|
+
* The one `rules:` key that is not an artifact: every other names a document to
|
|
48
|
+
* write, this one the phase that writes code. Without it a project can say how
|
|
49
|
+
* to write tasks.md but not how to implement it.
|
|
50
|
+
*/
|
|
51
|
+
export declare const APPLY_RULES_KEY = "apply";
|
|
52
|
+
/**
|
|
53
|
+
* Checks rule keys against the artifacts of *every* available schema. `rules:`
|
|
54
|
+
* is one global map but a change loads under one schema, so checking against
|
|
55
|
+
* that schema alone warns about real, correctly-spelled artifacts.
|
|
54
56
|
*
|
|
55
|
-
* @param
|
|
56
|
-
* @param validArtifactIds - Union of artifact IDs across all available schemas
|
|
57
|
-
* (see collectAllArtifactIds)
|
|
58
|
-
* @returns Array of warning messages for artifact IDs that match no schema
|
|
57
|
+
* @param validArtifactIds Union across all schemas; see collectAllArtifactIds.
|
|
59
58
|
*/
|
|
60
59
|
export declare function validateConfigRules(rules: Record<string, string[]>, validArtifactIds: Set<string>): string[];
|
|
61
60
|
/**
|
|
62
|
-
* Shared .yaml/.yml probe over an existing `tospec/` directory
|
|
63
|
-
* that decides which config file a root has
|
|
64
|
-
*
|
|
61
|
+
* Shared .yaml/.yml probe over an existing `tospec/` directory: the one place
|
|
62
|
+
* that decides which config file a root has, so init cannot report "created"
|
|
63
|
+
* next to a config the reader is already using.
|
|
65
64
|
*/
|
|
66
65
|
export declare function resolveConfigFileInDir(tospecDir: string): string | null;
|
|
67
66
|
/** Shared .yaml/.yml probe used by project-config readers. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-config.d.ts","sourceRoot":"","sources":["../../src/core/project-config.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM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,131 +2,143 @@ import { existsSync, readFileSync } from 'fs';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { parse as parseYaml } from 'yaml';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
/**
|
|
6
|
-
* Zod schema for project configuration.
|
|
7
|
-
*
|
|
8
|
-
* Purpose:
|
|
9
|
-
* 1. Documentation - clearly defines the config file structure
|
|
10
|
-
* 2. Type safety - TypeScript infers ProjectConfig type from schema
|
|
11
|
-
* 3. Runtime validation - uses safeParse() for resilient field-by-field validation
|
|
12
|
-
*
|
|
13
|
-
* Why Zod over manual validation:
|
|
14
|
-
* - Helps understand Tospec's data interfaces at a glance
|
|
15
|
-
* - Single source of truth for type and validation
|
|
16
|
-
* - Consistent with other Tospec schemas
|
|
17
|
-
*/
|
|
5
|
+
/** Single source of truth for both `ProjectConfig` and its runtime validation. */
|
|
18
6
|
export const ProjectConfigSchema = z.object({
|
|
19
|
-
// Required: which schema to use (e.g., "sdd", or project-local schema name)
|
|
20
7
|
schema: z
|
|
21
8
|
.string()
|
|
22
9
|
.min(1)
|
|
23
10
|
.describe('The workflow schema to use (e.g., "sdd")'),
|
|
24
|
-
//
|
|
25
|
-
// Max size: 50KB (enforced during parsing)
|
|
11
|
+
// Capped at MAX_CONTEXT_SIZE during parsing.
|
|
26
12
|
context: z
|
|
27
13
|
.string()
|
|
28
14
|
.optional()
|
|
29
15
|
.describe('Project context injected into all artifact instructions'),
|
|
30
|
-
//
|
|
16
|
+
// Additive to the schema's built-in guidance.
|
|
31
17
|
rules: z
|
|
32
|
-
.record(z.string(),
|
|
33
|
-
z.array(z.string()) // list of rules
|
|
34
|
-
)
|
|
18
|
+
.record(z.string(), z.array(z.string()))
|
|
35
19
|
.optional()
|
|
36
20
|
.describe('Per-artifact rules, keyed by artifact ID'),
|
|
37
|
-
//
|
|
38
|
-
//
|
|
21
|
+
// ADR 001. staleDays: days without a file change before an active change is
|
|
22
|
+
// flagged stale (default 14).
|
|
39
23
|
dashboard: z
|
|
40
24
|
.object({
|
|
41
25
|
staleDays: z.number().int().positive().optional(),
|
|
42
26
|
})
|
|
43
27
|
.optional()
|
|
44
28
|
.describe('Dashboard settings (staleDays: stale-change threshold in days)'),
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
// simply ignored, never an error.
|
|
29
|
+
// The retired `agentsLinkMode` field is absent on purpose: config files still
|
|
30
|
+
// carrying it are ignored, never an error.
|
|
48
31
|
});
|
|
49
32
|
export const MAX_CONTEXT_SIZE = 50 * 1024; // 50KB hard limit on inlined context
|
|
50
33
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* Returns partial config if some fields are invalid (with warnings).
|
|
34
|
+
* Reads `tospec/config.yaml`, validating each field independently so one bad
|
|
35
|
+
* field does not discard the rest. Uncached on purpose: ~0.5 ms for a typical
|
|
36
|
+
* config and 1-2 reads per command, so mtime invalidation would buy nothing.
|
|
55
37
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* - Typical config (1KB): ~0.5ms per read
|
|
59
|
-
* - Large config (50KB): ~1.6ms per read
|
|
60
|
-
* - Missing config: ~0.01ms per read
|
|
61
|
-
* Config is read 1-2 times per command (schema resolution + instruction loading),
|
|
62
|
-
* adding ~1-3ms total overhead. Caching would add complexity (mtime checks,
|
|
63
|
-
* invalidation logic) for negligible benefit. Direct reads also ensure config
|
|
64
|
-
* changes are reflected immediately without stale cache issues.
|
|
65
|
-
*
|
|
66
|
-
* @param projectRoot - The root directory of the project (where `tospec/` lives)
|
|
67
|
-
* @returns Parsed config or null if file doesn't exist
|
|
38
|
+
* Diagnostics go to stderr here, for callers with no envelope to carry them;
|
|
39
|
+
* the ones that have an envelope call the variant below.
|
|
68
40
|
*/
|
|
69
41
|
export function readProjectConfig(projectRoot) {
|
|
42
|
+
const { config, diagnostics } = readProjectConfigWithDiagnostics(projectRoot);
|
|
43
|
+
for (const diagnostic of diagnostics) {
|
|
44
|
+
console.warn(diagnostic.message);
|
|
45
|
+
}
|
|
46
|
+
return config;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Stderr copy of the config diagnostics, for commands that never read the
|
|
50
|
+
* config themselves. `list` and `status` resolve each change's schema from its
|
|
51
|
+
* own `.tospec.yaml` and consult the project config only when that field is
|
|
52
|
+
* absent, so a config that no longer parses went unmentioned by exactly the
|
|
53
|
+
* commands a user runs to look around. Stderr in both modes: a `--json` stdout
|
|
54
|
+
* stays one document, and a warning is not a failed command.
|
|
55
|
+
*/
|
|
56
|
+
export function printProjectConfigDiagnostics(projectRoot) {
|
|
57
|
+
for (const diagnostic of readProjectConfigWithDiagnostics(projectRoot).diagnostics) {
|
|
58
|
+
console.error(diagnostic.message.startsWith('Warning:') ? diagnostic.message : `Warning: ${diagnostic.message}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** The same read, with the dropped fields handed back instead of printed. */
|
|
62
|
+
export function readProjectConfigWithDiagnostics(projectRoot) {
|
|
70
63
|
const configPath = resolveConfigFilePath(projectRoot);
|
|
71
64
|
if (configPath === null) {
|
|
72
|
-
return null; // No config is OK
|
|
65
|
+
return { config: null, diagnostics: [] }; // No config is OK
|
|
73
66
|
}
|
|
67
|
+
const diagnostics = [];
|
|
68
|
+
const where = configPath;
|
|
74
69
|
try {
|
|
75
70
|
const content = readFileSync(configPath, 'utf-8');
|
|
76
71
|
const raw = parseYaml(content);
|
|
77
72
|
if (!raw || typeof raw !== 'object') {
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
return {
|
|
74
|
+
config: null,
|
|
75
|
+
diagnostics: [
|
|
76
|
+
{
|
|
77
|
+
code: 'config_not_a_mapping',
|
|
78
|
+
message: `${where} is not a YAML mapping; ignoring it.`,
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
};
|
|
80
82
|
}
|
|
81
83
|
const config = {};
|
|
82
|
-
// Parse schema field using Zod
|
|
83
84
|
const schemaField = z.string().min(1);
|
|
84
85
|
const schemaResult = schemaField.safeParse(raw.schema);
|
|
85
86
|
if (schemaResult.success) {
|
|
86
87
|
config.schema = schemaResult.data;
|
|
87
88
|
}
|
|
88
89
|
else if (raw.schema !== undefined) {
|
|
89
|
-
|
|
90
|
+
diagnostics.push({
|
|
91
|
+
code: 'config_field_invalid',
|
|
92
|
+
message: `Invalid 'schema' field in ${where} (must be a non-empty string); ignoring it.`,
|
|
93
|
+
});
|
|
90
94
|
}
|
|
91
|
-
// Parse context field with size limit
|
|
92
95
|
if (raw.context !== undefined) {
|
|
93
96
|
const contextField = z.string();
|
|
94
97
|
const contextResult = contextField.safeParse(raw.context);
|
|
95
98
|
if (contextResult.success) {
|
|
96
99
|
const contextSize = Buffer.byteLength(contextResult.data, 'utf-8');
|
|
97
100
|
if (contextSize > MAX_CONTEXT_SIZE) {
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
diagnostics.push({
|
|
102
|
+
code: 'config_context_too_large',
|
|
103
|
+
message: `Context too large (${(contextSize / 1024).toFixed(1)}KB, limit: ${MAX_CONTEXT_SIZE / 1024}KB); ignoring the context field in ${where}.`,
|
|
104
|
+
});
|
|
100
105
|
}
|
|
101
106
|
else {
|
|
102
107
|
config.context = contextResult.data;
|
|
103
108
|
}
|
|
104
109
|
}
|
|
105
110
|
else {
|
|
106
|
-
|
|
111
|
+
diagnostics.push({
|
|
112
|
+
code: 'config_field_invalid',
|
|
113
|
+
message: `Invalid 'context' field in ${where} (must be a string); ignoring it.`,
|
|
114
|
+
});
|
|
107
115
|
}
|
|
108
116
|
}
|
|
109
|
-
// Parse rules field using Zod
|
|
110
117
|
if (raw.rules !== undefined) {
|
|
111
|
-
//
|
|
118
|
+
// The null guard matters: typeof null === 'object'.
|
|
112
119
|
if (typeof raw.rules === 'object' && raw.rules !== null && !Array.isArray(raw.rules)) {
|
|
113
120
|
const parsedRules = {};
|
|
114
121
|
let hasValidRules = false;
|
|
115
122
|
for (const [artifactId, rules] of Object.entries(raw.rules)) {
|
|
116
123
|
const rulesArrayResult = z.array(z.string()).safeParse(rules);
|
|
117
124
|
if (rulesArrayResult.success) {
|
|
118
|
-
// Filter out empty strings
|
|
119
125
|
const validRules = rulesArrayResult.data.filter((r) => r.length > 0);
|
|
120
126
|
if (validRules.length > 0) {
|
|
121
127
|
parsedRules[artifactId] = validRules;
|
|
122
128
|
hasValidRules = true;
|
|
123
129
|
}
|
|
124
130
|
if (validRules.length < rulesArrayResult.data.length) {
|
|
125
|
-
|
|
131
|
+
diagnostics.push({
|
|
132
|
+
code: 'config_rules_empty_entries',
|
|
133
|
+
message: `Some rules for '${artifactId}' in ${where} are empty strings, ignoring them`,
|
|
134
|
+
});
|
|
126
135
|
}
|
|
127
136
|
}
|
|
128
137
|
else {
|
|
129
|
-
|
|
138
|
+
diagnostics.push({
|
|
139
|
+
code: 'config_field_invalid',
|
|
140
|
+
message: `Rules for '${artifactId}' in ${where} must be an array of strings, ignoring this artifact's rules`,
|
|
141
|
+
});
|
|
130
142
|
}
|
|
131
143
|
}
|
|
132
144
|
if (hasValidRules) {
|
|
@@ -134,10 +146,12 @@ export function readProjectConfig(projectRoot) {
|
|
|
134
146
|
}
|
|
135
147
|
}
|
|
136
148
|
else {
|
|
137
|
-
|
|
149
|
+
diagnostics.push({
|
|
150
|
+
code: 'config_field_invalid',
|
|
151
|
+
message: `Invalid 'rules' field in ${where} (must be a mapping); ignoring it.`,
|
|
152
|
+
});
|
|
138
153
|
}
|
|
139
154
|
}
|
|
140
|
-
// Parse dashboard field using Zod
|
|
141
155
|
if (raw.dashboard !== undefined) {
|
|
142
156
|
const dashboardField = z.object({ staleDays: z.number().int().positive().optional() });
|
|
143
157
|
const dashboardResult = dashboardField.safeParse(raw.dashboard);
|
|
@@ -145,40 +159,51 @@ export function readProjectConfig(projectRoot) {
|
|
|
145
159
|
config.dashboard = dashboardResult.data;
|
|
146
160
|
}
|
|
147
161
|
else {
|
|
148
|
-
|
|
162
|
+
diagnostics.push({
|
|
163
|
+
code: 'config_field_invalid',
|
|
164
|
+
message: `Invalid 'dashboard' field in ${where} (staleDays must be a positive integer); ignoring it.`,
|
|
165
|
+
});
|
|
149
166
|
}
|
|
150
167
|
}
|
|
151
|
-
//
|
|
152
|
-
return
|
|
168
|
+
// A partial config, even when some fields failed.
|
|
169
|
+
return {
|
|
170
|
+
config: Object.keys(config).length > 0 ? config : null,
|
|
171
|
+
diagnostics,
|
|
172
|
+
};
|
|
153
173
|
}
|
|
154
174
|
catch (error) {
|
|
155
|
-
|
|
156
|
-
|
|
175
|
+
return {
|
|
176
|
+
config: null,
|
|
177
|
+
diagnostics: [
|
|
178
|
+
{
|
|
179
|
+
code: 'config_unparseable',
|
|
180
|
+
// First line only, minus the colon that introduces the yaml
|
|
181
|
+
// library's code frame on the lines that follow.
|
|
182
|
+
message: `Warning: could not parse ${where} (${error instanceof Error ? error.message.split('\n')[0].replace(/:\s*$/, '') : String(error)}); ignoring it.`,
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
};
|
|
157
186
|
}
|
|
158
187
|
}
|
|
159
|
-
function configPathForWarnings(projectRoot) {
|
|
160
|
-
return resolveConfigFilePath(projectRoot) ?? path.join(projectRoot, 'tospec', 'config.yaml');
|
|
161
|
-
}
|
|
162
188
|
/**
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
*
|
|
170
|
-
*
|
|
189
|
+
* The one `rules:` key that is not an artifact: every other names a document to
|
|
190
|
+
* write, this one the phase that writes code. Without it a project can say how
|
|
191
|
+
* to write tasks.md but not how to implement it.
|
|
192
|
+
*/
|
|
193
|
+
export const APPLY_RULES_KEY = 'apply';
|
|
194
|
+
/**
|
|
195
|
+
* Checks rule keys against the artifacts of *every* available schema. `rules:`
|
|
196
|
+
* is one global map but a change loads under one schema, so checking against
|
|
197
|
+
* that schema alone warns about real, correctly-spelled artifacts.
|
|
171
198
|
*
|
|
172
|
-
* @param
|
|
173
|
-
* @param validArtifactIds - Union of artifact IDs across all available schemas
|
|
174
|
-
* (see collectAllArtifactIds)
|
|
175
|
-
* @returns Array of warning messages for artifact IDs that match no schema
|
|
199
|
+
* @param validArtifactIds Union across all schemas; see collectAllArtifactIds.
|
|
176
200
|
*/
|
|
177
201
|
export function validateConfigRules(rules, validArtifactIds) {
|
|
178
202
|
const warnings = [];
|
|
203
|
+
const validKeys = new Set([...validArtifactIds, APPLY_RULES_KEY]);
|
|
179
204
|
for (const artifactId of Object.keys(rules)) {
|
|
180
|
-
if (!
|
|
181
|
-
const validIds = Array.from(
|
|
205
|
+
if (!validKeys.has(artifactId)) {
|
|
206
|
+
const validIds = Array.from(validKeys).sort().join(', ');
|
|
182
207
|
warnings.push(`Unknown artifact ID in rules: "${artifactId}". ` +
|
|
183
208
|
`Valid IDs across all available schemas: ${validIds}`);
|
|
184
209
|
}
|
|
@@ -186,9 +211,9 @@ export function validateConfigRules(rules, validArtifactIds) {
|
|
|
186
211
|
return warnings;
|
|
187
212
|
}
|
|
188
213
|
/**
|
|
189
|
-
* Shared .yaml/.yml probe over an existing `tospec/` directory
|
|
190
|
-
* that decides which config file a root has
|
|
191
|
-
*
|
|
214
|
+
* Shared .yaml/.yml probe over an existing `tospec/` directory: the one place
|
|
215
|
+
* that decides which config file a root has, so init cannot report "created"
|
|
216
|
+
* next to a config the reader is already using.
|
|
192
217
|
*/
|
|
193
218
|
export function resolveConfigFileInDir(tospecDir) {
|
|
194
219
|
const yamlPath = path.join(tospecDir, 'config.yaml');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-config.js","sourceRoot":"","sources":["../../src/core/project-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;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AAC;IAClB,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IACnD,OAAO,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9C,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,qBAAqB,CAAC,WAAmB;IACvD,OAAO,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1,29 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The directory layout `tospec init` creates, and the anchors that make it
|
|
3
|
-
* survive version control.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* the first command that looks for one reports the project as uninitialized.
|
|
8
|
-
* Nothing is lost — every writer creates the directory it needs on demand — but
|
|
9
|
-
* a diagnostic that sends the reader to re-run a command that will change
|
|
10
|
-
* nothing is worse than a crash.
|
|
3
|
+
* survive version control. Git does not track an empty directory, so without
|
|
4
|
+
* them a collaborator clones a layout whose directories are gone and the first
|
|
5
|
+
* command reports the project as uninitialized — nothing is lost, but the
|
|
6
|
+
* diagnostic sends the reader to re-run a command that changes nothing.
|
|
11
7
|
*/
|
|
12
8
|
/**
|
|
13
|
-
* Relative to `tospec/`, in creation order.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* whether it ends up empty, and `changes/` never does because it holds
|
|
17
|
-
* `archive/`. A name asserting the property would be wrong for the next
|
|
18
|
-
* directory that ships with content.
|
|
9
|
+
* Relative to `tospec/`, in creation order. Not named for anchoring: whether a
|
|
10
|
+
* directory gets an anchor is computed from whether it ends up empty, and
|
|
11
|
+
* `changes/` never does because it holds `archive/`.
|
|
19
12
|
*/
|
|
20
13
|
export declare const TOSPEC_LAYOUT_DIRS: readonly ['specs', 'changes', 'changes/archive', 'decisions'];
|
|
21
14
|
/** The layout as absolute paths, so callers never re-derive the join. */
|
|
22
15
|
export declare function tospecLayoutDirs(tospecPath: string): string[];
|
|
23
16
|
/**
|
|
24
|
-
* Anchor `directory` if it is empty.
|
|
25
|
-
*
|
|
26
|
-
* and adding one beside real content leaves a file nobody asked for.
|
|
17
|
+
* Anchor `directory` if it is empty. An anchor exists to make an empty directory
|
|
18
|
+
* representable, so adding one beside real content leaves a file nobody wanted.
|
|
27
19
|
*/
|
|
28
20
|
export declare function ensureDirectoryAnchor(directory: string): Promise<void>;
|
|
29
21
|
//# sourceMappingURL=project-layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-layout.d.ts","sourceRoot":"","sources":["../../src/core/project-layout.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"project-layout.d.ts","sourceRoot":"","sources":["../../src/core/project-layout.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,YAC7B,OAAO,EACP,SAAS,EACT,iBAAiB,EAGjB,WAAW,CACH,CAAC;AAIX,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAE7D;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB5E"}
|