@seanmars/tospec 0.19.0-beta.0 → 0.19.0-beta.13
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 +578 -0
- package/README.md +71 -77
- package/assets/dashboard/app.js +14 -3
- package/assets/dashboard/style.css +7 -0
- package/assets/metrics/app.js +22 -0
- package/assets/metrics/style.css +8 -0
- package/assets/rules/tospec/decision.md +3 -0
- package/assets/rules/tospec/single-source-of-truth.md +19 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +266 -82
- 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 +374 -95
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/dashboard.d.ts +64 -81
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +350 -218
- 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 +400 -70
- package/dist/commands/decision.js.map +1 -1
- package/dist/commands/metrics.d.ts +34 -48
- package/dist/commands/metrics.d.ts.map +1 -1
- package/dist/commands/metrics.js +74 -84
- package/dist/commands/metrics.js.map +1 -1
- package/dist/commands/shared-output.d.ts +24 -10
- package/dist/commands/shared-output.d.ts.map +1 -1
- package/dist/commands/shared-output.js +62 -11
- 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 +39 -8
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/validate.d.ts +47 -30
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +282 -108
- 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 +84 -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 +415 -201
- package/dist/core/archive.js.map +1 -1
- package/dist/core/artifact-graph/graph.d.ts +29 -36
- package/dist/core/artifact-graph/graph.d.ts.map +1 -1
- package/dist/core/artifact-graph/graph.js +50 -58
- package/dist/core/artifact-graph/graph.js.map +1 -1
- package/dist/core/artifact-graph/index.d.ts +2 -2
- package/dist/core/artifact-graph/index.d.ts.map +1 -1
- package/dist/core/artifact-graph/index.js +2 -2
- package/dist/core/artifact-graph/index.js.map +1 -1
- package/dist/core/artifact-graph/instruction-loader.d.ts +105 -100
- package/dist/core/artifact-graph/instruction-loader.d.ts.map +1 -1
- package/dist/core/artifact-graph/instruction-loader.js +176 -110
- package/dist/core/artifact-graph/instruction-loader.js.map +1 -1
- package/dist/core/artifact-graph/outputs.d.ts +13 -6
- package/dist/core/artifact-graph/outputs.d.ts.map +1 -1
- package/dist/core/artifact-graph/outputs.js +146 -8
- 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 +22 -0
- package/dist/core/codex-residue.d.ts.map +1 -0
- package/dist/core/codex-residue.js +61 -0
- package/dist/core/codex-residue.js.map +1 -0
- 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 +56 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +73 -2
- package/dist/core/config.js.map +1 -1
- package/dist/core/converters/json-converter.d.ts.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 +84 -68
- 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 +43 -62
- package/dist/core/global-config.js.map +1 -1
- package/dist/core/init.d.ts +29 -11
- package/dist/core/init.d.ts.map +1 -1
- package/dist/core/init.js +232 -164
- 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 +63 -39
- package/dist/core/local-server.d.ts.map +1 -1
- package/dist/core/local-server.js +99 -53
- 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 +32 -15
- package/dist/core/migrate.d.ts.map +1 -1
- package/dist/core/migrate.js +220 -108
- 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 +53 -11
- package/dist/core/parsers/requirement-blocks.d.ts.map +1 -1
- package/dist/core/parsers/requirement-blocks.js +200 -60
- 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 +1 -1
- package/dist/core/parsers/spec-structure.d.ts.map +1 -1
- package/dist/core/parsers/spec-structure.js +30 -3
- package/dist/core/parsers/spec-structure.js.map +1 -1
- package/dist/core/planning-home.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 +10 -18
- 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 +10 -0
- package/dist/core/rules.d.ts.map +1 -0
- package/dist/core/rules.js +43 -0
- package/dist/core/rules.js.map +1 -0
- 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 +27 -8
- package/dist/core/shared/rules-generation.d.ts.map +1 -1
- package/dist/core/shared/rules-generation.js +151 -16
- package/dist/core/shared/rules-generation.js.map +1 -1
- package/dist/core/shared/skill-generation.d.ts +38 -53
- 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 +40 -62
- 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.d.ts.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 +24 -23
- package/dist/core/specs-apply.d.ts.map +1 -1
- package/dist/core/specs-apply.js +188 -173
- 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/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 +9 -12
- 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 +7 -5
- 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 -0
- 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 +0 -1
- 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 +2 -2
- 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.map +1 -1
- package/dist/core/update.d.ts +26 -21
- package/dist/core/update.d.ts.map +1 -1
- package/dist/core/update.js +165 -116
- 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 +19 -25
- 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 +50 -51
- package/dist/core/validation/validator.d.ts.map +1 -1
- package/dist/core/validation/validator.js +486 -263
- 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 +31 -54
- package/dist/utils/change-utils.d.ts.map +1 -1
- package/dist/utils/change-utils.js +143 -100
- 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 +13 -4
- package/dist/utils/link.d.ts.map +1 -1
- package/dist/utils/link.js +13 -4
- package/dist/utils/link.js.map +1 -1
- package/dist/utils/match.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 +10 -11
- package/dist/utils/spec-files.d.ts.map +1 -1
- package/dist/utils/spec-files.js +31 -22
- 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 +9 -10
- package/schemas/decision/templates/decision.md +3 -1
- package/schemas/decision/templates/index.md +2 -2
- package/schemas/issue/schema.yaml +11 -2
- package/schemas/issue/templates/spec.md +37 -3
- package/schemas/sdd/schema.yaml +24 -1
- package/schemas/sdd/templates/spec.md +37 -3
|
@@ -1,26 +1,41 @@
|
|
|
1
1
|
import { promises as fs } from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { resolveArtifactOutputs, resolveSchema } from '../core/artifact-graph/index.js';
|
|
4
|
+
import { buildCodeFenceMask, normalizeDocument, stripBom } from '../core/parsers/requirement-text.js';
|
|
4
5
|
import { resolveSchemaForChange } from './change-metadata.js';
|
|
5
6
|
/**
|
|
6
|
-
* `- [ ] text` / `- [x] text`, capturing
|
|
7
|
-
*
|
|
8
|
-
* subtask is never invisible to progress; the indent is kept only so the
|
|
7
|
+
* `- [ ] text` / `- [x] text`, capturing indentation, checkbox state and text.
|
|
8
|
+
* Nested tasks count like top-level ones; the indent is kept only so the
|
|
9
9
|
* dashboard can render the nesting it found.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* The bullet class and the required whitespace after `]` are GFM's deliberately:
|
|
12
|
+
* GitHub's rendering is the only view of tasks.md the author can check against,
|
|
13
|
+
* so "tasks tospec sees" must equal "tasks GitHub draws". Too narrow and
|
|
14
|
+
* `+ [ ] 1.2 …` is a box nobody can count; too wide and `- [ ]2.6 …` is a task
|
|
15
|
+
* nobody can tick.
|
|
16
|
+
*
|
|
17
|
+
* Fences are masked by the callers (`buildCodeFenceMask`), not here: a tasks.md
|
|
18
|
+
* documenting the task format puts real `- [ ]` lines in a fence, which would
|
|
19
|
+
* leave the archive gate permanently incomplete.
|
|
13
20
|
*/
|
|
14
|
-
const TASK_PATTERN = /^([ \t]*)[
|
|
21
|
+
const TASK_PATTERN = /^([ \t]*)[-*+][ \t]+\[([ \txX])\](?:[ \t]+(.*))?$/;
|
|
15
22
|
export function parseTasksFromContent(content) {
|
|
16
23
|
const tasks = [];
|
|
17
|
-
|
|
24
|
+
// normalizeDocument so a leading BOM cannot hide the first line:
|
|
25
|
+
// `<BOM>- [ ] 1.1` fails TASK_PATTERN's `^` anchor.
|
|
26
|
+
const lines = normalizeDocument(content).split('\n');
|
|
27
|
+
const fenced = buildCodeFenceMask(lines);
|
|
28
|
+
lines.forEach((raw, i) => {
|
|
29
|
+
if (fenced[i])
|
|
30
|
+
return;
|
|
18
31
|
const match = TASK_PATTERN.exec(raw);
|
|
19
32
|
if (!match)
|
|
20
33
|
return;
|
|
21
34
|
tasks.push({
|
|
22
35
|
line: i + 1,
|
|
23
|
-
|
|
36
|
+
// Undefined when the marker is the whole line (`- [ ]`), which GFM draws
|
|
37
|
+
// as a checkbox: an empty task, not a missing one.
|
|
38
|
+
text: (match[3] ?? '').trim(),
|
|
24
39
|
done: match[2].toLowerCase() === 'x',
|
|
25
40
|
indent: match[1].replace(/\t/g, ' ').length,
|
|
26
41
|
});
|
|
@@ -28,10 +43,10 @@ export function parseTasksFromContent(content) {
|
|
|
28
43
|
return tasks;
|
|
29
44
|
}
|
|
30
45
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
46
|
+
* The change's tracked-tasks artifact: the one whose `generates` equals the
|
|
47
|
+
* schema's `apply.tracks` value, falling back to the artifact with id `tasks`
|
|
48
|
+
* when no `apply` block declares what it tracks. (`apply.tracks` *selects* the
|
|
49
|
+
* artifact; the glob is that artifact's `generates`.)
|
|
35
50
|
*/
|
|
36
51
|
function findTrackedTasksArtifact(schema) {
|
|
37
52
|
const tracks = schema.apply?.tracks;
|
|
@@ -41,10 +56,8 @@ function findTrackedTasksArtifact(schema) {
|
|
|
41
56
|
return schema.artifacts.find((a) => a.id === 'tasks');
|
|
42
57
|
}
|
|
43
58
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* `resolveSchema` throws on an unresolvable/misnamed schema; we swallow that so
|
|
47
|
-
* the caller falls back to a single top-level `tasks.md` and never crashes.
|
|
59
|
+
* Undefined when the schema is unresolvable or has no tracked-tasks artifact, so
|
|
60
|
+
* the caller falls back to a single top-level `tasks.md` rather than crashing.
|
|
48
61
|
*/
|
|
49
62
|
function resolveTrackedTasksGlob(changeDir, projectRoot) {
|
|
50
63
|
try {
|
|
@@ -57,12 +70,9 @@ function resolveTrackedTasksGlob(changeDir, projectRoot) {
|
|
|
57
70
|
}
|
|
58
71
|
}
|
|
59
72
|
/**
|
|
60
|
-
* Absolute paths of the files holding a change's tracked tasks
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* no longer blind to nested `tasks.md` files (#1202). Falls back to a single
|
|
64
|
-
* top-level `tasks.md` when the schema is unresolvable, no tracked-tasks
|
|
65
|
-
* artifact is found, or the glob matches no file.
|
|
73
|
+
* Absolute paths of the files holding a change's tracked tasks, through the same
|
|
74
|
+
* `resolveArtifactOutputs` glob resolution `tospec status` uses. Falls back to a
|
|
75
|
+
* single top-level `tasks.md` when nothing resolves.
|
|
66
76
|
*/
|
|
67
77
|
export function resolveTaskFiles(changeDir, projectRoot) {
|
|
68
78
|
const generates = resolveTrackedTasksGlob(changeDir, projectRoot);
|
|
@@ -74,9 +84,8 @@ export function resolveTaskFiles(changeDir, projectRoot) {
|
|
|
74
84
|
return [path.join(changeDir, 'tasks.md')];
|
|
75
85
|
}
|
|
76
86
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* throwing.
|
|
87
|
+
* Every task of a change, in file order. Files that cannot be read contribute
|
|
88
|
+
* nothing rather than throwing.
|
|
80
89
|
*/
|
|
81
90
|
export async function listTasksForChange(changesDir, changeName, projectRoot) {
|
|
82
91
|
const changeDir = path.join(changesDir, changeName);
|
|
@@ -107,22 +116,34 @@ export async function getTaskProgressForChange(changesDir, changeName, projectRo
|
|
|
107
116
|
*/
|
|
108
117
|
export async function setTaskDone(file, line, done) {
|
|
109
118
|
const content = await fs.readFile(file, 'utf-8');
|
|
110
|
-
|
|
119
|
+
// BOM stripped so `line` means the same line it did in `parseTasksFromContent`,
|
|
120
|
+
// which numbers from BOM-free text. Splitting on '\n' leaves each line's '\r'
|
|
121
|
+
// attached, which is what preserves CRLF through the rejoin below.
|
|
122
|
+
const lines = stripBom(content).split('\n');
|
|
111
123
|
const raw = lines[line - 1];
|
|
112
|
-
//
|
|
113
|
-
//
|
|
114
|
-
//
|
|
115
|
-
|
|
124
|
+
// A fenced line is "not a task" for the same reason it is not counted: it is a
|
|
125
|
+
// quoted example, and writing to it edits documentation. The UI draws no
|
|
126
|
+
// checkbox there, so reaching here means a stale client — hence the caller's 409.
|
|
127
|
+
const fenced = buildCodeFenceMask(lines);
|
|
128
|
+
if (raw === undefined || fenced[line - 1] || !TASK_PATTERN.test(raw.replace(/\r$/, ''))) {
|
|
116
129
|
throw new Error(`Line ${line} of ${path.basename(file)} is not a task`);
|
|
117
130
|
}
|
|
118
|
-
|
|
131
|
+
// Same box class as TASK_PATTERN, so this rewrites exactly the marker the line
|
|
132
|
+
// matched on; the first `[…]` on a task line is always it.
|
|
133
|
+
lines[line - 1] = raw.replace(/\[[ \txX]\]/, done ? '[x]' : '[ ]');
|
|
119
134
|
await fs.writeFile(file, lines.join('\n'), 'utf-8');
|
|
120
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* "Tasks done", not "Complete": this counts checkboxes, while `tospec status`
|
|
138
|
+
* answers whether the change's artifacts exist. A change with only a finished
|
|
139
|
+
* `tasks.md` read as `✓ Complete` in `list` and `1/4 artifacts complete` in
|
|
140
|
+
* `status`, and the word was what made them look contradictory.
|
|
141
|
+
*/
|
|
121
142
|
export function formatTaskStatus(progress) {
|
|
122
143
|
if (progress.total === 0)
|
|
123
144
|
return 'No tasks';
|
|
124
145
|
if (progress.completed === progress.total)
|
|
125
|
-
return '✓
|
|
146
|
+
return '✓ Tasks done';
|
|
126
147
|
return `${progress.completed}/${progress.total} tasks`;
|
|
127
148
|
}
|
|
128
149
|
//# sourceMappingURL=task-progress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-progress.js","sourceRoot":"","sources":["../../src/utils/task-progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D
|
|
1
|
+
{"version":3,"file":"task-progress.js","sourceRoot":"","sources":["../../src/utils/task-progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;;;;;;;;;;;;GAcG;AACH,MAAM,YAAY,GAAG,mDAAmD,CAAC;AAkBzE,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,MA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AQ,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC1E,CAAC;IACD,+EAA+E;IAC/E,2DAA2D;IAC3D,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnE,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;AACtD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAsB;IACrD,IAAI,QAAQ,CAAC,KAAK,KAAK,CAAC;QAAE,OAAO,UAAU,CAAC;IAC5C,IAAI,QAAQ,CAAC,SAAS,KAAK,QAAQ,CAAC,KAAK;QAAE,OAAO,cAAc,CAAC;IACjE,OAAO,GAAG,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,KAAK,QAAQ,CAAC;AACzD,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* The single source of CLI-generated timestamps used for naming files and
|
|
5
|
-
* directories (archive dirs, ticket files) — agents must never assemble the
|
|
6
|
-
* timestamp themselves, so the format lives in exactly one place.
|
|
2
|
+
* `yyyyMMdd_HHmmss` in local time. The single source of the stamps that name
|
|
3
|
+
* archive dirs and ticket files — agents must never assemble one by hand.
|
|
7
4
|
*/
|
|
8
5
|
export declare function formatTimestamp(date: Date): string;
|
|
9
6
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* A Date as `yyyy-MM-dd` in local time. For date-only metadata, instead of
|
|
8
|
+
* `toISOString().split('T')[0]`, which truncates in UTC and records the wrong
|
|
9
|
+
* calendar day near local midnight.
|
|
13
10
|
*/
|
|
14
11
|
export declare function formatLocalDate(date?: Date): string;
|
|
15
12
|
//# sourceMappingURL=timestamp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp.d.ts","sourceRoot":"","sources":["../../src/utils/timestamp.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"timestamp.d.ts","sourceRoot":"","sources":["../../src/utils/timestamp.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CASlD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,GAAE,IAAiB,GAAG,MAAM,CAG/D"}
|
package/dist/utils/timestamp.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* The single source of CLI-generated timestamps used for naming files and
|
|
5
|
-
* directories (archive dirs, ticket files) — agents must never assemble the
|
|
6
|
-
* timestamp themselves, so the format lives in exactly one place.
|
|
2
|
+
* `yyyyMMdd_HHmmss` in local time. The single source of the stamps that name
|
|
3
|
+
* archive dirs and ticket files — agents must never assemble one by hand.
|
|
7
4
|
*/
|
|
8
5
|
export function formatTimestamp(date) {
|
|
9
6
|
const pad = (n) => String(n).padStart(2, '0');
|
|
@@ -16,9 +13,9 @@ export function formatTimestamp(date) {
|
|
|
16
13
|
return `${year}${month}${day}_${hours}${minutes}${seconds}`;
|
|
17
14
|
}
|
|
18
15
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
16
|
+
* A Date as `yyyy-MM-dd` in local time. For date-only metadata, instead of
|
|
17
|
+
* `toISOString().split('T')[0]`, which truncates in UTC and records the wrong
|
|
18
|
+
* calendar day near local midnight.
|
|
22
19
|
*/
|
|
23
20
|
export function formatLocalDate(date = new Date()) {
|
|
24
21
|
const pad = (n) => String(n).padStart(2, '0');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../src/utils/timestamp.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../src/utils/timestamp.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,IAAU;IACxC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC9D,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAChC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;IACvC,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAChC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IACvC,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IACvC,OAAO,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,IAAI,KAAK,GAAG,OAAO,GAAG,OAAO,EAAE,CAAC;AAC9D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,IAAI,GAAS,IAAI,IAAI,EAAE;IACrD,MAAM,GAAG,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC9D,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;AACpF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seanmars/tospec",
|
|
3
|
-
"version": "0.19.0-beta.
|
|
3
|
+
"version": "0.19.0-beta.13",
|
|
4
4
|
"description": "Spec-driven development CLI for structured requirements and issue workflows",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.npmjs.com/package/@seanmars/tospec",
|
|
@@ -34,26 +34,25 @@
|
|
|
34
34
|
"node": ">=22.22.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/node": "^24.13.
|
|
38
|
-
"typescript": "^
|
|
39
|
-
"vitest": "^
|
|
37
|
+
"@types/node": "^24.13.4",
|
|
38
|
+
"typescript": "^7.0.2",
|
|
39
|
+
"vitest": "^5.0.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@inquirer/core": "^
|
|
43
|
-
"@inquirer/prompts": "^8.
|
|
42
|
+
"@inquirer/core": "^12.0.3",
|
|
43
|
+
"@inquirer/prompts": "^8.7.2",
|
|
44
44
|
"commander": "^15.0.0",
|
|
45
45
|
"diff": "^9.0.0",
|
|
46
46
|
"fast-glob": "^3.3.3",
|
|
47
|
-
"marked": "^18.0.
|
|
47
|
+
"marked": "^18.0.12",
|
|
48
48
|
"yaml": "^2.9.0",
|
|
49
|
-
"zod": "^4.
|
|
49
|
+
"zod": "^4.6.2"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "node build.js",
|
|
53
53
|
"skills": "node build.js && node scripts/gen-skills.mjs",
|
|
54
54
|
"templates": "node scripts/gen-templates.mjs",
|
|
55
55
|
"dev": "tsc --watch",
|
|
56
|
-
"test": "vitest run"
|
|
57
|
-
"prepublish": "node build.js"
|
|
56
|
+
"test": "vitest run"
|
|
58
57
|
}
|
|
59
58
|
}
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
<!-- Follow-up implementation items, phased if useful -->
|
|
24
24
|
|
|
25
25
|
## Related Changes
|
|
26
|
-
<!-- Optional
|
|
26
|
+
<!-- Optional, maintained by hand: nothing writes this section. `tospec new change --decisions <file>`
|
|
27
|
+
records the link on the change's side only. List change names here yourself, add archive paths
|
|
28
|
+
once archived; omit if none yet -->
|
|
27
29
|
|
|
28
30
|
## Decision Process
|
|
29
31
|
<!-- Optional: the key Q&A that shaped this decision; each pair starts with **Q:**, answer in the next paragraph; summarize, don't paste a transcript; omit if there was no interactive discussion -->
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
| timestamp | title | summary | file |
|
|
2
|
-
| ----- | ----- | ----- | ----- |
|
|
1
|
+
| timestamp | status | title | summary | file |
|
|
2
|
+
| ----- | ----- | ----- | ----- | ----- |
|
|
@@ -29,8 +29,17 @@ artifacts:
|
|
|
29
29
|
instruction: |
|
|
30
30
|
Write delta specs only when the fix changes externally observable behavior
|
|
31
31
|
(same grammar as sdd, same layout: specs/<capability>/spec.md, exactly one
|
|
32
|
-
directory level).
|
|
33
|
-
|
|
32
|
+
directory level). REMOVED lists each name as a bullet with Reason and
|
|
33
|
+
Migration fields; RENAMED writes a FROM:/TO: pair, e.g. "- FROM: `<old
|
|
34
|
+
name>`" / "- TO: `<new name>`". If the bug stems from a wrong spec, fix
|
|
35
|
+
that Requirement with MODIFIED — pasting the full updated block, since a
|
|
36
|
+
MODIFIED that omits a scenario the current spec still has is rejected. To
|
|
37
|
+
drop or rename a scenario on purpose, omit it and declare it under
|
|
38
|
+
"## REMOVED Scenarios" as "- Requirement: `<requirement name>`" /
|
|
39
|
+
"- Scenario: `<scenario name>`" / "- Reason: ...".
|
|
40
|
+
Include only the sections this fix needs: the template ships ADDED and
|
|
41
|
+
keeps the optional sections in a fenced example inside a comment. A
|
|
42
|
+
placeholder section pasted in and left unfilled fails validation.
|
|
34
43
|
apply:
|
|
35
44
|
requires: [task]
|
|
36
45
|
tracks: task.md
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
<!-- A NEW capability's delta opens with ## Purpose (one sentence on why this
|
|
2
|
+
capability exists); archive carries it into the newly created main spec. Delete
|
|
3
|
+
this block when the delta targets a capability that already has a main spec —
|
|
4
|
+
edit that spec's Purpose directly instead. -->
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
[One sentence: why this capability exists]
|
|
8
|
+
|
|
1
9
|
## ADDED Requirements
|
|
2
10
|
|
|
3
11
|
### Requirement: [name]
|
|
@@ -8,6 +16,32 @@
|
|
|
8
16
|
- **THEN** [outcome]
|
|
9
17
|
- **AND** [additional outcome]
|
|
10
18
|
|
|
11
|
-
<!-- MODIFIED, REMOVED,
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
<!-- MODIFIED, REMOVED, RENAMED Requirements and REMOVED Scenarios are optional
|
|
20
|
+
sections. Add only the ones this change needs, copied from the fenced example
|
|
21
|
+
below. The fence keeps the example out of the parser, so an untouched template
|
|
22
|
+
still validates — a placeholder section pasted in and left as-is does not,
|
|
23
|
+
because its `[name]` is read as a real requirement.
|
|
24
|
+
|
|
25
|
+
MODIFIED must contain the full updated requirement block — omitting a scenario
|
|
26
|
+
the current spec still has is rejected, because archiving would delete it. To
|
|
27
|
+
drop or rename one on purpose, declare it under ## REMOVED Scenarios.
|
|
28
|
+
|
|
29
|
+
```markdown
|
|
30
|
+
## REMOVED Requirements
|
|
31
|
+
|
|
32
|
+
- `[name]`
|
|
33
|
+
- Reason: [why removed]
|
|
34
|
+
- Migration: [how existing usage migrates]
|
|
35
|
+
|
|
36
|
+
## RENAMED Requirements
|
|
37
|
+
|
|
38
|
+
- FROM: `[old name]`
|
|
39
|
+
- TO: `[new name]`
|
|
40
|
+
|
|
41
|
+
## REMOVED Scenarios
|
|
42
|
+
|
|
43
|
+
- Requirement: `[requirement the scenario belongs to]`
|
|
44
|
+
- Scenario: `[scenario name, omitted from the MODIFIED block above]`
|
|
45
|
+
- Reason: [why this scenario no longer applies]
|
|
46
|
+
```
|
|
47
|
+
-->
|
package/schemas/sdd/schema.yaml
CHANGED
|
@@ -22,6 +22,10 @@ artifacts:
|
|
|
22
22
|
requiredSections: [Why, What Changes, Impact]
|
|
23
23
|
minSectionLength:
|
|
24
24
|
Why: 50
|
|
25
|
+
# The ceiling is advice about where detail belongs: a Why this long is
|
|
26
|
+
# usually design.md content, or a change that wants splitting.
|
|
27
|
+
maxSectionLength:
|
|
28
|
+
Why: 1000
|
|
25
29
|
- id: specs
|
|
26
30
|
# Exactly one directory level. A deeper path (specs/<area>/<capability>/spec.md)
|
|
27
31
|
# is rejected by the validator: archive's merge only reads one level, so a nested
|
|
@@ -38,7 +42,20 @@ artifacts:
|
|
|
38
42
|
### Requirement: <name> (state the obligation with SHALL or MUST in the
|
|
39
43
|
body, not only in the heading) /
|
|
40
44
|
#### Scenario: <name> (four #, WHEN/THEN/AND bullets).
|
|
41
|
-
MODIFIED must paste the full updated requirement block.
|
|
45
|
+
MODIFIED must paste the full updated requirement block. A MODIFIED that
|
|
46
|
+
omits a scenario the current spec still has is rejected, because it would
|
|
47
|
+
delete it silently; to remove or rename one deliberately, drop it from the
|
|
48
|
+
MODIFIED block and declare it under "## REMOVED Scenarios" as
|
|
49
|
+
"- Requirement: `<requirement name>`" / "- Scenario: `<scenario name>`" /
|
|
50
|
+
"- Reason: ...". A rename is that declaration plus the new scenario in the
|
|
51
|
+
same MODIFIED block.
|
|
52
|
+
REMOVED lists each removed name as a bullet with Reason and Migration
|
|
53
|
+
fields, e.g. "- <name>" / "- Reason: ..." / "- Migration: ...".
|
|
54
|
+
RENAMED writes a FROM:/TO: pair per entry, e.g. "- FROM: `<old name>`" /
|
|
55
|
+
"- TO: `<new name>`".
|
|
56
|
+
Include only the sections this change needs: the template ships ADDED
|
|
57
|
+
and keeps the optional sections in a fenced example inside a comment. A
|
|
58
|
+
placeholder section pasted in and left unfilled fails validation.
|
|
42
59
|
A new capability's delta must open with ## Purpose (one sentence on why this
|
|
43
60
|
capability exists); archive carries it into the newly created main spec. Do
|
|
44
61
|
not add Purpose to an existing capability's delta (edit the main spec's
|
|
@@ -79,6 +96,12 @@ artifacts:
|
|
|
79
96
|
Each task group = one narrow, complete path (independently verifiable).
|
|
80
97
|
Every implementation task is preceded by its own "write the test first" task
|
|
81
98
|
(TDD red before green).
|
|
99
|
+
Number tasks `<group>.<n>` under a `## <group>.` heading. Validation checks
|
|
100
|
+
that a task's leading number matches the group it sits under and that no ID
|
|
101
|
+
is used twice — the two mistakes that make "continue with 2.3" point at the
|
|
102
|
+
wrong item. Gaps in a sequence (1.1, 1.3) are not checked and are fine:
|
|
103
|
+
deleting a task mid-list is normal and renumbering the rest would invalidate
|
|
104
|
+
every reference already made to them.
|
|
82
105
|
apply:
|
|
83
106
|
requires: [tasks]
|
|
84
107
|
tracks: tasks.md
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
<!-- A NEW capability's delta opens with ## Purpose (one sentence on why this
|
|
2
|
+
capability exists); archive carries it into the newly created main spec. Delete
|
|
3
|
+
this block when the delta targets a capability that already has a main spec —
|
|
4
|
+
edit that spec's Purpose directly instead. -->
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
[One sentence: why this capability exists]
|
|
8
|
+
|
|
1
9
|
## ADDED Requirements
|
|
2
10
|
|
|
3
11
|
### Requirement: [name]
|
|
@@ -8,6 +16,32 @@
|
|
|
8
16
|
- **THEN** [outcome]
|
|
9
17
|
- **AND** [additional outcome]
|
|
10
18
|
|
|
11
|
-
<!-- MODIFIED, REMOVED,
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
<!-- MODIFIED, REMOVED, RENAMED Requirements and REMOVED Scenarios are optional
|
|
20
|
+
sections. Add only the ones this change needs, copied from the fenced example
|
|
21
|
+
below. The fence keeps the example out of the parser, so an untouched template
|
|
22
|
+
still validates — a placeholder section pasted in and left as-is does not,
|
|
23
|
+
because its `[name]` is read as a real requirement.
|
|
24
|
+
|
|
25
|
+
MODIFIED must contain the full updated requirement block — omitting a scenario
|
|
26
|
+
the current spec still has is rejected, because archiving would delete it. To
|
|
27
|
+
drop or rename one on purpose, declare it under ## REMOVED Scenarios.
|
|
28
|
+
|
|
29
|
+
```markdown
|
|
30
|
+
## REMOVED Requirements
|
|
31
|
+
|
|
32
|
+
- `[name]`
|
|
33
|
+
- Reason: [why removed]
|
|
34
|
+
- Migration: [how existing usage migrates]
|
|
35
|
+
|
|
36
|
+
## RENAMED Requirements
|
|
37
|
+
|
|
38
|
+
- FROM: `[old name]`
|
|
39
|
+
- TO: `[new name]`
|
|
40
|
+
|
|
41
|
+
## REMOVED Scenarios
|
|
42
|
+
|
|
43
|
+
- Requirement: `[requirement the scenario belongs to]`
|
|
44
|
+
- Scenario: `[scenario name, omitted from the MODIFIED block above]`
|
|
45
|
+
- Reason: [why this scenario no longer applies]
|
|
46
|
+
```
|
|
47
|
+
-->
|