@dedesfr/prompter 0.6.15 → 0.7.1
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 +14 -0
- package/dist/cli/index.js +144 -12
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/archive.d.ts +11 -0
- package/dist/commands/archive.d.ts.map +1 -0
- package/dist/commands/archive.js +280 -0
- package/dist/commands/archive.js.map +1 -0
- package/dist/commands/change.d.ts +35 -0
- package/dist/commands/change.d.ts.map +1 -0
- package/dist/commands/change.js +277 -0
- package/dist/commands/change.js.map +1 -0
- package/dist/commands/config.d.ts +8 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +198 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +21 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.d.ts +2 -2
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +153 -47
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/show.d.ts +14 -0
- package/dist/commands/show.d.ts.map +1 -0
- package/dist/commands/show.js +132 -0
- package/dist/commands/show.js.map +1 -0
- package/dist/commands/spec.d.ts +15 -0
- package/dist/commands/spec.d.ts.map +1 -0
- package/dist/commands/spec.js +225 -0
- package/dist/commands/spec.js.map +1 -0
- package/dist/commands/validate.d.ts +24 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +294 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/core/artifact-graph/graph.d.ts +56 -0
- package/dist/core/artifact-graph/graph.d.ts.map +1 -0
- package/dist/core/artifact-graph/graph.js +141 -0
- package/dist/core/artifact-graph/graph.js.map +1 -0
- package/dist/core/artifact-graph/index.d.ts +7 -0
- package/dist/core/artifact-graph/index.d.ts.map +1 -0
- package/dist/core/artifact-graph/index.js +13 -0
- package/dist/core/artifact-graph/index.js.map +1 -0
- package/dist/core/artifact-graph/instruction-loader.d.ts +130 -0
- package/dist/core/artifact-graph/instruction-loader.d.ts.map +1 -0
- package/dist/core/artifact-graph/instruction-loader.js +173 -0
- package/dist/core/artifact-graph/instruction-loader.js.map +1 -0
- package/dist/core/artifact-graph/resolver.d.ts +61 -0
- package/dist/core/artifact-graph/resolver.d.ts.map +1 -0
- package/dist/core/artifact-graph/resolver.js +187 -0
- package/dist/core/artifact-graph/resolver.js.map +1 -0
- package/dist/core/artifact-graph/schema.d.ts +13 -0
- package/dist/core/artifact-graph/schema.d.ts.map +1 -0
- package/dist/core/artifact-graph/schema.js +108 -0
- package/dist/core/artifact-graph/schema.js.map +1 -0
- package/dist/core/artifact-graph/state.d.ts +12 -0
- package/dist/core/artifact-graph/state.d.ts.map +1 -0
- package/dist/core/artifact-graph/state.js +54 -0
- package/dist/core/artifact-graph/state.js.map +1 -0
- package/dist/core/artifact-graph/types.d.ts +45 -0
- package/dist/core/artifact-graph/types.d.ts.map +1 -0
- package/dist/core/artifact-graph/types.js +43 -0
- package/dist/core/artifact-graph/types.js.map +1 -0
- package/dist/core/completions/command-registry.d.ts +7 -0
- package/dist/core/completions/command-registry.d.ts.map +1 -0
- package/dist/core/completions/command-registry.js +380 -0
- package/dist/core/completions/command-registry.js.map +1 -0
- package/dist/core/completions/completion-provider.d.ts +60 -0
- package/dist/core/completions/completion-provider.d.ts.map +1 -0
- package/dist/core/completions/completion-provider.js +102 -0
- package/dist/core/completions/completion-provider.js.map +1 -0
- package/dist/core/completions/generators/bash-generator.d.ts +32 -0
- package/dist/core/completions/generators/bash-generator.d.ts.map +1 -0
- package/dist/core/completions/generators/bash-generator.js +174 -0
- package/dist/core/completions/generators/bash-generator.js.map +1 -0
- package/dist/core/completions/generators/fish-generator.d.ts +32 -0
- package/dist/core/completions/generators/fish-generator.d.ts.map +1 -0
- package/dist/core/completions/generators/fish-generator.js +157 -0
- package/dist/core/completions/generators/fish-generator.js.map +1 -0
- package/dist/core/completions/generators/powershell-generator.d.ts +33 -0
- package/dist/core/completions/generators/powershell-generator.d.ts.map +1 -0
- package/dist/core/completions/generators/powershell-generator.js +207 -0
- package/dist/core/completions/generators/powershell-generator.js.map +1 -0
- package/dist/core/completions/generators/zsh-generator.d.ts +44 -0
- package/dist/core/completions/generators/zsh-generator.d.ts.map +1 -0
- package/dist/core/completions/generators/zsh-generator.js +250 -0
- package/dist/core/completions/generators/zsh-generator.js.map +1 -0
- package/dist/core/completions/templates/bash-templates.d.ts +6 -0
- package/dist/core/completions/templates/bash-templates.d.ts.map +1 -0
- package/dist/core/completions/templates/bash-templates.js +24 -0
- package/dist/core/completions/templates/bash-templates.js.map +1 -0
- package/dist/core/completions/templates/fish-templates.d.ts +7 -0
- package/dist/core/completions/templates/fish-templates.d.ts.map +1 -0
- package/dist/core/completions/templates/fish-templates.js +39 -0
- package/dist/core/completions/templates/fish-templates.js.map +1 -0
- package/dist/core/completions/templates/powershell-templates.d.ts +6 -0
- package/dist/core/completions/templates/powershell-templates.d.ts.map +1 -0
- package/dist/core/completions/templates/powershell-templates.js +25 -0
- package/dist/core/completions/templates/powershell-templates.js.map +1 -0
- package/dist/core/completions/templates/zsh-templates.d.ts +6 -0
- package/dist/core/completions/templates/zsh-templates.d.ts.map +1 -0
- package/dist/core/completions/templates/zsh-templates.js +36 -0
- package/dist/core/completions/templates/zsh-templates.js.map +1 -0
- package/dist/core/completions/types.d.ts +78 -0
- package/dist/core/completions/types.d.ts.map +1 -0
- package/dist/core/completions/types.js +2 -0
- package/dist/core/completions/types.js.map +1 -0
- package/dist/core/config-schema.d.ts +76 -0
- package/dist/core/config-schema.d.ts.map +1 -0
- package/dist/core/config-schema.js +200 -0
- package/dist/core/config-schema.js.map +1 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +18 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/configurators/slash/antigravity.d.ts.map +1 -1
- package/dist/core/configurators/slash/antigravity.js +6 -0
- package/dist/core/configurators/slash/antigravity.js.map +1 -1
- package/dist/core/configurators/slash/base.js +1 -1
- package/dist/core/configurators/slash/base.js.map +1 -1
- package/dist/core/configurators/slash/claude.d.ts.map +1 -1
- package/dist/core/configurators/slash/claude.js +6 -0
- package/dist/core/configurators/slash/claude.js.map +1 -1
- package/dist/core/configurators/slash/codex.d.ts.map +1 -1
- package/dist/core/configurators/slash/codex.js +6 -0
- package/dist/core/configurators/slash/codex.js.map +1 -1
- package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -1
- package/dist/core/configurators/slash/github-copilot.js +6 -0
- package/dist/core/configurators/slash/github-copilot.js.map +1 -1
- package/dist/core/configurators/slash/kilocode.d.ts.map +1 -1
- package/dist/core/configurators/slash/kilocode.js +6 -0
- package/dist/core/configurators/slash/kilocode.js.map +1 -1
- package/dist/core/configurators/slash/opencode.d.ts.map +1 -1
- package/dist/core/configurators/slash/opencode.js +6 -0
- package/dist/core/configurators/slash/opencode.js.map +1 -1
- package/dist/core/converters/json-converter.d.ts +6 -0
- package/dist/core/converters/json-converter.d.ts.map +1 -0
- package/dist/core/converters/json-converter.js +51 -0
- package/dist/core/converters/json-converter.js.map +1 -0
- package/dist/core/global-config.d.ts +39 -0
- package/dist/core/global-config.d.ts.map +1 -0
- package/dist/core/global-config.js +115 -0
- package/dist/core/global-config.js.map +1 -0
- package/dist/core/parsers/change-parser.d.ts +13 -0
- package/dist/core/parsers/change-parser.d.ts.map +1 -0
- package/dist/core/parsers/change-parser.js +193 -0
- package/dist/core/parsers/change-parser.js.map +1 -0
- package/dist/core/parsers/markdown-parser.d.ts +22 -0
- package/dist/core/parsers/markdown-parser.d.ts.map +1 -0
- package/dist/core/parsers/markdown-parser.js +187 -0
- package/dist/core/parsers/markdown-parser.js.map +1 -0
- package/dist/core/parsers/requirement-blocks.d.ts +37 -0
- package/dist/core/parsers/requirement-blocks.d.ts.map +1 -0
- package/dist/core/parsers/requirement-blocks.js +201 -0
- package/dist/core/parsers/requirement-blocks.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +3 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +66 -0
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/schemas/base.schema.d.ts +13 -0
- package/dist/core/schemas/base.schema.d.ts.map +1 -0
- package/dist/core/schemas/base.schema.js +13 -0
- package/dist/core/schemas/base.schema.js.map +1 -0
- package/dist/core/schemas/change.schema.d.ts +73 -0
- package/dist/core/schemas/change.schema.d.ts.map +1 -0
- package/dist/core/schemas/change.schema.js +31 -0
- package/dist/core/schemas/change.schema.js.map +1 -0
- package/dist/core/schemas/index.d.ts +4 -0
- package/dist/core/schemas/index.d.ts.map +1 -0
- package/dist/core/schemas/index.js +4 -0
- package/dist/core/schemas/index.js.map +1 -0
- package/dist/core/schemas/spec.schema.d.ts +18 -0
- package/dist/core/schemas/spec.schema.d.ts.map +1 -0
- package/dist/core/schemas/spec.schema.js +15 -0
- package/dist/core/schemas/spec.schema.js.map +1 -0
- package/dist/core/specs-apply.d.ts +73 -0
- package/dist/core/specs-apply.d.ts.map +1 -0
- package/dist/core/specs-apply.js +384 -0
- package/dist/core/specs-apply.js.map +1 -0
- package/dist/core/styles/palette.d.ts +7 -0
- package/dist/core/styles/palette.d.ts.map +1 -0
- package/dist/core/styles/palette.js +8 -0
- package/dist/core/styles/palette.js.map +1 -0
- package/dist/core/templates/agents-template.d.ts +1 -1
- package/dist/core/templates/agents-template.d.ts.map +1 -1
- package/dist/core/templates/agents-template.js +443 -19
- package/dist/core/templates/agents-template.js.map +1 -1
- package/dist/core/templates/slash-command-templates.d.ts +1 -1
- package/dist/core/templates/slash-command-templates.d.ts.map +1 -1
- package/dist/core/templates/slash-command-templates.js +4 -1
- package/dist/core/templates/slash-command-templates.js.map +1 -1
- package/dist/core/validation/constants.d.ts +34 -0
- package/dist/core/validation/constants.d.ts.map +1 -0
- package/dist/core/validation/constants.js +40 -0
- package/dist/core/validation/constants.js.map +1 -0
- package/dist/core/validation/types.d.ts +18 -0
- package/dist/core/validation/types.d.ts.map +1 -0
- package/dist/core/validation/types.js +2 -0
- package/dist/core/validation/types.js.map +1 -0
- package/dist/core/validation/validator.d.ts +33 -0
- package/dist/core/validation/validator.d.ts.map +1 -0
- package/dist/core/validation/validator.js +409 -0
- package/dist/core/validation/validator.js.map +1 -0
- package/dist/core/view.d.ts +8 -0
- package/dist/core/view.d.ts.map +1 -0
- package/dist/core/view.js +168 -0
- package/dist/core/view.js.map +1 -0
- package/dist/utils/change-metadata.d.ts +47 -0
- package/dist/utils/change-metadata.d.ts.map +1 -0
- package/dist/utils/change-metadata.js +130 -0
- package/dist/utils/change-metadata.js.map +1 -0
- package/dist/utils/change-utils.d.ts +51 -0
- package/dist/utils/change-utils.d.ts.map +1 -0
- package/dist/utils/change-utils.js +100 -0
- package/dist/utils/change-utils.js.map +1 -0
- package/dist/utils/file-system.d.ts +25 -0
- package/dist/utils/file-system.d.ts.map +1 -0
- package/dist/utils/file-system.js +218 -0
- package/dist/utils/file-system.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/interactive.d.ts +18 -0
- package/dist/utils/interactive.d.ts.map +1 -0
- package/dist/utils/interactive.js +21 -0
- package/dist/utils/interactive.js.map +1 -0
- package/dist/utils/item-discovery.d.ts +4 -0
- package/dist/utils/item-discovery.d.ts.map +1 -0
- package/dist/utils/item-discovery.js +72 -0
- package/dist/utils/item-discovery.js.map +1 -0
- package/dist/utils/match.d.ts +3 -0
- package/dist/utils/match.d.ts.map +1 -0
- package/dist/utils/match.js +22 -0
- package/dist/utils/match.js.map +1 -0
- package/dist/utils/shell-detection.d.ts +20 -0
- package/dist/utils/shell-detection.d.ts.map +1 -0
- package/dist/utils/shell-detection.js +41 -0
- package/dist/utils/shell-detection.js.map +1 -0
- package/dist/utils/task-progress.d.ts +8 -0
- package/dist/utils/task-progress.d.ts.map +1 -0
- package/dist/utils/task-progress.js +36 -0
- package/dist/utils/task-progress.js.map +1 -0
- package/docs/tasks.md +1 -1
- package/package.json +6 -2
- package/prompt/apply.md +17 -0
- package/prompt/archive.md +21 -0
- package/prompt/proposal.md +22 -0
- package/src/cli/index.ts +151 -16
- package/src/commands/archive.ts +302 -0
- package/src/commands/change.ts +292 -0
- package/src/commands/config.ts +233 -0
- package/src/commands/init.ts +19 -5
- package/src/commands/list.ts +176 -66
- package/src/commands/show.ts +138 -0
- package/src/commands/spec.ts +251 -0
- package/src/commands/validate.ts +326 -0
- package/src/core/artifact-graph/graph.ts +167 -0
- package/src/core/artifact-graph/index.ts +44 -0
- package/src/core/artifact-graph/instruction-loader.ts +302 -0
- package/src/core/artifact-graph/resolver.ts +226 -0
- package/src/core/artifact-graph/schema.ts +124 -0
- package/src/core/artifact-graph/state.ts +64 -0
- package/src/core/artifact-graph/types.ts +65 -0
- package/src/core/completions/command-registry.ts +382 -0
- package/src/core/completions/completion-provider.ts +128 -0
- package/src/core/completions/generators/bash-generator.ts +191 -0
- package/src/core/completions/generators/fish-generator.ts +188 -0
- package/src/core/completions/generators/powershell-generator.ts +223 -0
- package/src/core/completions/generators/zsh-generator.ts +281 -0
- package/src/core/completions/templates/bash-templates.ts +24 -0
- package/src/core/completions/templates/fish-templates.ts +40 -0
- package/src/core/completions/templates/powershell-templates.ts +25 -0
- package/src/core/completions/templates/zsh-templates.ts +36 -0
- package/src/core/completions/types.ts +90 -0
- package/src/core/config-schema.ts +230 -0
- package/src/core/config.ts +18 -0
- package/src/core/configurators/slash/antigravity.ts +6 -0
- package/src/core/configurators/slash/base.ts +1 -1
- package/src/core/configurators/slash/claude.ts +6 -0
- package/src/core/configurators/slash/codex.ts +6 -0
- package/src/core/configurators/slash/github-copilot.ts +6 -0
- package/src/core/configurators/slash/kilocode.ts +6 -0
- package/src/core/configurators/slash/opencode.ts +6 -0
- package/src/core/converters/json-converter.ts +62 -0
- package/src/core/global-config.ts +136 -0
- package/src/core/parsers/change-parser.ts +234 -0
- package/src/core/parsers/markdown-parser.ts +237 -0
- package/src/core/parsers/requirement-blocks.ts +234 -0
- package/src/core/prompt-templates.ts +69 -0
- package/src/core/schemas/base.schema.ts +20 -0
- package/src/core/schemas/change.schema.ts +42 -0
- package/src/core/schemas/index.ts +20 -0
- package/src/core/schemas/spec.schema.ts +17 -0
- package/src/core/specs-apply.ts +483 -0
- package/src/core/styles/palette.ts +8 -0
- package/src/core/templates/agents-template.ts +443 -19
- package/src/core/templates/slash-command-templates.ts +7 -1
- package/src/core/validation/constants.ts +48 -0
- package/src/core/validation/types.ts +19 -0
- package/src/core/validation/validator.ts +449 -0
- package/src/core/view.ts +219 -0
- package/src/utils/change-metadata.ts +171 -0
- package/src/utils/change-utils.ts +131 -0
- package/src/utils/file-system.ts +252 -0
- package/src/utils/index.ts +12 -0
- package/src/utils/interactive.ts +29 -0
- package/src/utils/item-discovery.ts +66 -0
- package/src/utils/match.ts +26 -0
- package/src/utils/shell-detection.ts +62 -0
- package/src/utils/task-progress.ts +43 -0
- package/dist/commands/ai-humanizer.d.ts +0 -11
- package/dist/commands/ai-humanizer.d.ts.map +0 -1
- package/dist/commands/ai-humanizer.js +0 -97
- package/dist/commands/ai-humanizer.js.map +0 -1
- package/dist/commands/api-contract-generator.d.ts +0 -11
- package/dist/commands/api-contract-generator.d.ts.map +0 -1
- package/dist/commands/api-contract-generator.js +0 -97
- package/dist/commands/api-contract-generator.js.map +0 -1
- package/dist/commands/design-system.d.ts +0 -11
- package/dist/commands/design-system.d.ts.map +0 -1
- package/dist/commands/design-system.js +0 -97
- package/dist/commands/design-system.js.map +0 -1
- package/dist/commands/document-explainer.d.ts +0 -11
- package/dist/commands/document-explainer.d.ts.map +0 -1
- package/dist/commands/document-explainer.js +0 -97
- package/dist/commands/document-explainer.js.map +0 -1
- package/dist/commands/epic-generator.d.ts +0 -11
- package/dist/commands/epic-generator.d.ts.map +0 -1
- package/dist/commands/epic-generator.js +0 -97
- package/dist/commands/epic-generator.js.map +0 -1
- package/dist/commands/erd-generator.d.ts +0 -11
- package/dist/commands/erd-generator.d.ts.map +0 -1
- package/dist/commands/erd-generator.js +0 -97
- package/dist/commands/erd-generator.js.map +0 -1
- package/dist/commands/fsd-generator.d.ts +0 -11
- package/dist/commands/fsd-generator.d.ts.map +0 -1
- package/dist/commands/fsd-generator.js +0 -97
- package/dist/commands/fsd-generator.js.map +0 -1
- package/dist/commands/prd-agent-generator.d.ts +0 -11
- package/dist/commands/prd-agent-generator.d.ts.map +0 -1
- package/dist/commands/prd-agent-generator.js +0 -95
- package/dist/commands/prd-agent-generator.js.map +0 -1
- package/dist/commands/prd-generator.d.ts +0 -11
- package/dist/commands/prd-generator.d.ts.map +0 -1
- package/dist/commands/prd-generator.js +0 -97
- package/dist/commands/prd-generator.js.map +0 -1
- package/dist/commands/product-brief.d.ts +0 -11
- package/dist/commands/product-brief.d.ts.map +0 -1
- package/dist/commands/product-brief.js +0 -97
- package/dist/commands/product-brief.js.map +0 -1
- package/dist/commands/skill-creator.d.ts +0 -11
- package/dist/commands/skill-creator.d.ts.map +0 -1
- package/dist/commands/skill-creator.js +0 -101
- package/dist/commands/skill-creator.js.map +0 -1
- package/dist/commands/story-generator.d.ts +0 -11
- package/dist/commands/story-generator.d.ts.map +0 -1
- package/dist/commands/story-generator.js +0 -97
- package/dist/commands/story-generator.js.map +0 -1
- package/dist/commands/tdd-generator.d.ts +0 -11
- package/dist/commands/tdd-generator.d.ts.map +0 -1
- package/dist/commands/tdd-generator.js +0 -97
- package/dist/commands/tdd-generator.js.map +0 -1
- package/dist/commands/tdd-lite-generator.d.ts +0 -11
- package/dist/commands/tdd-lite-generator.d.ts.map +0 -1
- package/dist/commands/tdd-lite-generator.js +0 -97
- package/dist/commands/tdd-lite-generator.js.map +0 -1
- package/dist/commands/wireframe-generator.d.ts +0 -11
- package/dist/commands/wireframe-generator.d.ts.map +0 -1
- package/dist/commands/wireframe-generator.js +0 -97
- package/dist/commands/wireframe-generator.js.map +0 -1
- package/src/commands/ai-humanizer.ts +0 -118
- package/src/commands/api-contract-generator.ts +0 -118
- package/src/commands/design-system.ts +0 -118
- package/src/commands/document-explainer.ts +0 -118
- package/src/commands/epic-generator.ts +0 -118
- package/src/commands/erd-generator.ts +0 -118
- package/src/commands/fsd-generator.ts +0 -118
- package/src/commands/prd-agent-generator.ts +0 -115
- package/src/commands/prd-generator.ts +0 -118
- package/src/commands/product-brief.ts +0 -118
- package/src/commands/skill-creator.ts +0 -123
- package/src/commands/story-generator.ts +0 -118
- package/src/commands/tdd-generator.ts +0 -118
- package/src/commands/tdd-lite-generator.ts +0 -118
- package/src/commands/wireframe-generator.ts +0 -118
|
@@ -1,34 +1,458 @@
|
|
|
1
|
-
export const agentsTemplate = `# Prompter
|
|
1
|
+
export const agentsTemplate = `# Prompter Instructions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Instructions for AI coding assistants using Prompter for spec-driven development.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## TL;DR Quick Checklist
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Search existing work: \`prompter spec list --long\`, \`prompter list\` (use \`rg\` only for full-text search)
|
|
8
|
+
- Decide scope: new capability vs modify existing capability
|
|
9
|
+
- Pick a unique \`change-id\`: kebab-case, verb-led (\`add-\`, \`update-\`, \`remove-\`, \`refactor-\`)
|
|
10
|
+
- Scaffold: \`proposal.md\`, \`tasks.md\`, \`design.md\` (only if needed), and delta specs per affected capability
|
|
11
|
+
- Write deltas: use \`## ADDED|MODIFIED|REMOVED|RENAMED Requirements\`; include at least one \`#### Scenario:\` per requirement
|
|
12
|
+
- Validate: \`prompter validate [change-id] --strict --no-interactive\` and fix issues
|
|
13
|
+
- Request approval: Do not start implementation until proposal is approved
|
|
8
14
|
|
|
9
|
-
##
|
|
15
|
+
## Three-Stage Workflow
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
### Stage 1: Creating Changes
|
|
18
|
+
Create proposal when you need to:
|
|
19
|
+
- Add features or functionality
|
|
20
|
+
- Make breaking changes (API, schema)
|
|
21
|
+
- Change architecture or patterns
|
|
22
|
+
- Optimize performance (changes behavior)
|
|
23
|
+
- Update security patterns
|
|
15
24
|
|
|
16
|
-
|
|
25
|
+
Triggers (examples):
|
|
26
|
+
- "Help me create a change proposal"
|
|
27
|
+
- "Help me plan a change"
|
|
28
|
+
- "Help me create a proposal"
|
|
29
|
+
- "I want to create a spec proposal"
|
|
30
|
+
- "I want to create a spec"
|
|
17
31
|
|
|
18
|
-
|
|
32
|
+
Loose matching guidance:
|
|
33
|
+
- Contains one of: \`proposal\`, \`change\`, \`spec\`
|
|
34
|
+
- With one of: \`create\`, \`plan\`, \`make\`, \`start\`, \`help\`
|
|
35
|
+
|
|
36
|
+
Skip proposal for:
|
|
37
|
+
- Bug fixes (restore intended behavior)
|
|
38
|
+
- Typos, formatting, comments
|
|
39
|
+
- Dependency updates (non-breaking)
|
|
40
|
+
- Configuration changes
|
|
41
|
+
- Tests for existing behavior
|
|
42
|
+
|
|
43
|
+
**Workflow**
|
|
44
|
+
1. Review \`prompter/project.md\`, \`prompter list\`, and \`prompter list --specs\` to understand current context.
|
|
45
|
+
2. Choose a unique verb-led \`change-id\` and scaffold \`proposal.md\`, \`tasks.md\`, optional \`design.md\`, and spec deltas under \`prompter/changes/<id>/\`.
|
|
46
|
+
3. Draft spec deltas using \`## ADDED|MODIFIED|REMOVED Requirements\` with at least one \`#### Scenario:\` per requirement.
|
|
47
|
+
4. Run \`prompter validate <id> --strict --no-interactive\` and resolve any issues before sharing the proposal.
|
|
48
|
+
|
|
49
|
+
### Stage 2: Implementing Changes
|
|
50
|
+
Track these steps as TODOs and complete them one by one.
|
|
51
|
+
1. **Read proposal.md** - Understand what's being built
|
|
52
|
+
2. **Read design.md** (if exists) - Review technical decisions
|
|
53
|
+
3. **Read tasks.md** - Get implementation checklist
|
|
54
|
+
4. **Implement tasks sequentially** - Complete in order
|
|
55
|
+
5. **Confirm completion** - Ensure every item in \`tasks.md\` is finished before updating statuses
|
|
56
|
+
6. **Update checklist** - After all work is done, set every task to \`- [x]\` so the list reflects reality
|
|
57
|
+
7. **Approval gate** - Do not start implementation until the proposal is reviewed and approved
|
|
58
|
+
|
|
59
|
+
### Stage 3: Archiving Changes
|
|
60
|
+
After deployment, create separate PR to:
|
|
61
|
+
- Move \`changes/[name]/\` → \`changes/archive/YYYY-MM-DD-[name]/\`
|
|
62
|
+
- Update \`specs/\` if capabilities changed
|
|
63
|
+
- Use \`prompter archive <change-id> --skip-specs --yes\` for tooling-only changes (always pass the change ID explicitly)
|
|
64
|
+
- Run \`prompter validate --strict --no-interactive\` to confirm the archived change passes checks
|
|
65
|
+
|
|
66
|
+
## Before Any Task
|
|
67
|
+
|
|
68
|
+
**Context Checklist:**
|
|
69
|
+
- [ ] Read relevant specs in \`specs/[capability]/spec.md\`
|
|
70
|
+
- [ ] Check pending changes in \`changes/\` for conflicts
|
|
71
|
+
- [ ] Read \`prompter/project.md\` for conventions
|
|
72
|
+
- [ ] Run \`prompter list\` to see active changes
|
|
73
|
+
- [ ] Run \`prompter list --specs\` to see existing capabilities
|
|
74
|
+
|
|
75
|
+
**Before Creating Specs:**
|
|
76
|
+
- Always check if capability already exists
|
|
77
|
+
- Prefer modifying existing specs over creating duplicates
|
|
78
|
+
- Use \`prompter show [spec]\` to review current state
|
|
79
|
+
- If request is ambiguous, ask 1–2 clarifying questions before scaffolding
|
|
80
|
+
|
|
81
|
+
### Search Guidance
|
|
82
|
+
- Enumerate specs: \`prompter spec list --long\` (or \`--json\` for scripts)
|
|
83
|
+
- Enumerate changes: \`prompter list\` (or \`prompter change list --json\` - deprecated but available)
|
|
84
|
+
- Show details:
|
|
85
|
+
- Spec: \`prompter show <spec-id> --type spec\` (use \`--json\` for filters)
|
|
86
|
+
- Change: \`prompter show <change-id> --json --deltas-only\`
|
|
87
|
+
- Full-text search (use ripgrep): \`rg -n "Requirement:|Scenario:" prompter/specs\`
|
|
88
|
+
|
|
89
|
+
## Quick Start
|
|
90
|
+
|
|
91
|
+
### CLI Commands
|
|
92
|
+
|
|
93
|
+
\`\`\`bash
|
|
94
|
+
# Essential commands
|
|
95
|
+
prompter list # List active changes
|
|
96
|
+
prompter list --specs # List specifications
|
|
97
|
+
prompter show [item] # Display change or spec
|
|
98
|
+
prompter validate [item] # Validate changes or specs
|
|
99
|
+
prompter archive <change-id> [--yes|-y] # Archive after deployment (add --yes for non-interactive runs)
|
|
100
|
+
|
|
101
|
+
# Project management
|
|
102
|
+
prompter init [path] # Initialize Prompter
|
|
103
|
+
prompter update [path] # Update instruction files
|
|
104
|
+
|
|
105
|
+
# Interactive mode
|
|
106
|
+
prompter show # Prompts for selection
|
|
107
|
+
prompter validate # Bulk validation mode
|
|
108
|
+
|
|
109
|
+
# Debugging
|
|
110
|
+
prompter show [change] --json --deltas-only
|
|
111
|
+
prompter validate [change] --strict --no-interactive
|
|
112
|
+
\`\`\`
|
|
113
|
+
|
|
114
|
+
### Command Flags
|
|
115
|
+
|
|
116
|
+
- \`--json\` - Machine-readable output
|
|
117
|
+
- \`--type change|spec\` - Disambiguate items
|
|
118
|
+
- \`--strict\` - Comprehensive validation
|
|
119
|
+
- \`--no-interactive\` - Disable prompts
|
|
120
|
+
- \`--skip-specs\` - Archive without spec updates
|
|
121
|
+
- \`--yes\`/\`-y\` - Skip confirmation prompts (non-interactive archive)
|
|
122
|
+
|
|
123
|
+
## Directory Structure
|
|
19
124
|
|
|
20
125
|
\`\`\`
|
|
21
126
|
prompter/
|
|
22
|
-
├── project.md # Project
|
|
23
|
-
├──
|
|
24
|
-
│ └──
|
|
25
|
-
|
|
127
|
+
├── project.md # Project conventions
|
|
128
|
+
├── specs/ # Current truth - what IS built
|
|
129
|
+
│ └── [capability]/ # Single focused capability
|
|
130
|
+
│ ├── spec.md # Requirements and scenarios
|
|
131
|
+
│ └── design.md # Technical patterns
|
|
132
|
+
├── changes/ # Proposals - what SHOULD change
|
|
133
|
+
│ ├── [change-name]/
|
|
134
|
+
│ │ ├── proposal.md # Why, what, impact
|
|
135
|
+
│ │ ├── tasks.md # Implementation checklist
|
|
136
|
+
│ │ ├── design.md # Technical decisions (optional; see criteria)
|
|
137
|
+
│ │ └── specs/ # Delta changes
|
|
138
|
+
│ │ └── [capability]/
|
|
139
|
+
│ │ └── spec.md # ADDED/MODIFIED/REMOVED
|
|
140
|
+
│ └── archive/ # Completed changes
|
|
141
|
+
\`\`\`
|
|
142
|
+
|
|
143
|
+
## Creating Change Proposals
|
|
144
|
+
|
|
145
|
+
### Decision Tree
|
|
146
|
+
|
|
147
|
+
\`\`\`
|
|
148
|
+
New request?
|
|
149
|
+
├─ Bug fix restoring spec behavior? → Fix directly
|
|
150
|
+
├─ Typo/format/comment? → Fix directly
|
|
151
|
+
├─ New feature/capability? → Create proposal
|
|
152
|
+
├─ Breaking change? → Create proposal
|
|
153
|
+
├─ Architecture change? → Create proposal
|
|
154
|
+
└─ Unclear? → Create proposal (safer)
|
|
155
|
+
\`\`\`
|
|
156
|
+
|
|
157
|
+
### Proposal Structure
|
|
158
|
+
|
|
159
|
+
1. **Create directory:** \`changes/[change-id]/\` (kebab-case, verb-led, unique)
|
|
160
|
+
|
|
161
|
+
2. **Write proposal.md:**
|
|
162
|
+
\`\`\`markdown
|
|
163
|
+
# Change: [Brief description of change]
|
|
164
|
+
|
|
165
|
+
## Why
|
|
166
|
+
[1-2 sentences on problem/opportunity]
|
|
167
|
+
|
|
168
|
+
## What Changes
|
|
169
|
+
- [Bullet list of changes]
|
|
170
|
+
- [Mark breaking changes with **BREAKING**]
|
|
171
|
+
|
|
172
|
+
## Impact
|
|
173
|
+
- Affected specs: [list capabilities]
|
|
174
|
+
- Affected code: [key files/systems]
|
|
175
|
+
\`\`\`
|
|
176
|
+
|
|
177
|
+
3. **Create spec deltas:** \`specs/[capability]/spec.md\`
|
|
178
|
+
\`\`\`markdown
|
|
179
|
+
## ADDED Requirements
|
|
180
|
+
### Requirement: New Feature
|
|
181
|
+
The system SHALL provide...
|
|
182
|
+
|
|
183
|
+
#### Scenario: Success case
|
|
184
|
+
- **WHEN** user performs action
|
|
185
|
+
- **THEN** expected result
|
|
186
|
+
|
|
187
|
+
## MODIFIED Requirements
|
|
188
|
+
### Requirement: Existing Feature
|
|
189
|
+
[Complete modified requirement]
|
|
190
|
+
|
|
191
|
+
## REMOVED Requirements
|
|
192
|
+
### Requirement: Old Feature
|
|
193
|
+
**Reason**: [Why removing]
|
|
194
|
+
**Migration**: [How to handle]
|
|
195
|
+
\`\`\`
|
|
196
|
+
If multiple capabilities are affected, create multiple delta files under \`changes/[change-id]/specs/<capability>/spec.md\`—one per capability.
|
|
197
|
+
|
|
198
|
+
4. **Create tasks.md:**
|
|
199
|
+
\`\`\`markdown
|
|
200
|
+
## 1. Implementation
|
|
201
|
+
- [ ] 1.1 Create database schema
|
|
202
|
+
- [ ] 1.2 Implement API endpoint
|
|
203
|
+
- [ ] 1.3 Add frontend component
|
|
204
|
+
- [ ] 1.4 Write tests
|
|
205
|
+
\`\`\`
|
|
206
|
+
|
|
207
|
+
5. **Create design.md when needed:**
|
|
208
|
+
Create \`design.md\` if any of the following apply; otherwise omit it:
|
|
209
|
+
- Cross-cutting change (multiple services/modules) or a new architectural pattern
|
|
210
|
+
- New external dependency or significant data model changes
|
|
211
|
+
- Security, performance, or migration complexity
|
|
212
|
+
- Ambiguity that benefits from technical decisions before coding
|
|
213
|
+
|
|
214
|
+
Minimal \`design.md\` skeleton:
|
|
215
|
+
\`\`\`markdown
|
|
216
|
+
## Context
|
|
217
|
+
[Background, constraints, stakeholders]
|
|
218
|
+
|
|
219
|
+
## Goals / Non-Goals
|
|
220
|
+
- Goals: [...]
|
|
221
|
+
- Non-Goals: [...]
|
|
222
|
+
|
|
223
|
+
## Decisions
|
|
224
|
+
- Decision: [What and why]
|
|
225
|
+
- Alternatives considered: [Options + rationale]
|
|
226
|
+
|
|
227
|
+
## Risks / Trade-offs
|
|
228
|
+
- [Risk] → Mitigation
|
|
229
|
+
|
|
230
|
+
## Migration Plan
|
|
231
|
+
[Steps, rollback]
|
|
232
|
+
|
|
233
|
+
## Open Questions
|
|
234
|
+
- [...]
|
|
235
|
+
\`\`\`
|
|
236
|
+
|
|
237
|
+
## Spec File Format
|
|
238
|
+
|
|
239
|
+
### Critical: Scenario Formatting
|
|
240
|
+
|
|
241
|
+
**CORRECT** (use #### headers):
|
|
242
|
+
\`\`\`markdown
|
|
243
|
+
#### Scenario: User login success
|
|
244
|
+
- **WHEN** valid credentials provided
|
|
245
|
+
- **THEN** return JWT token
|
|
246
|
+
\`\`\`
|
|
247
|
+
|
|
248
|
+
**WRONG** (don't use bullets or bold):
|
|
249
|
+
\`\`\`markdown
|
|
250
|
+
- **Scenario: User login** ❌
|
|
251
|
+
**Scenario**: User login ❌
|
|
252
|
+
### Scenario: User login ❌
|
|
26
253
|
\`\`\`
|
|
27
254
|
|
|
28
|
-
|
|
255
|
+
Every requirement MUST have at least one scenario.
|
|
256
|
+
|
|
257
|
+
### Requirement Wording
|
|
258
|
+
- Use SHALL/MUST for normative requirements (avoid should/may unless intentionally non-normative)
|
|
259
|
+
|
|
260
|
+
### Delta Operations
|
|
261
|
+
|
|
262
|
+
- \`## ADDED Requirements\` - New capabilities
|
|
263
|
+
- \`## MODIFIED Requirements\` - Changed behavior
|
|
264
|
+
- \`## REMOVED Requirements\` - Deprecated features
|
|
265
|
+
- \`## RENAMED Requirements\` - Name changes
|
|
266
|
+
|
|
267
|
+
Headers matched with \`trim(header)\` - whitespace ignored.
|
|
268
|
+
|
|
269
|
+
#### When to use ADDED vs MODIFIED
|
|
270
|
+
- ADDED: Introduces a new capability or sub-capability that can stand alone as a requirement. Prefer ADDED when the change is orthogonal (e.g., adding "Slash Command Configuration") rather than altering the semantics of an existing requirement.
|
|
271
|
+
- MODIFIED: Changes the behavior, scope, or acceptance criteria of an existing requirement. Always paste the full, updated requirement content (header + all scenarios). The archiver will replace the entire requirement with what you provide here; partial deltas will drop previous details.
|
|
272
|
+
- RENAMED: Use when only the name changes. If you also change behavior, use RENAMED (name) plus MODIFIED (content) referencing the new name.
|
|
273
|
+
|
|
274
|
+
Common pitfall: Using MODIFIED to add a new concern without including the previous text. This causes loss of detail at archive time. If you aren’t explicitly changing the existing requirement, add a new requirement under ADDED instead.
|
|
275
|
+
|
|
276
|
+
Authoring a MODIFIED requirement correctly:
|
|
277
|
+
1) Locate the existing requirement in \`prompter/specs/<capability>/spec.md\`.
|
|
278
|
+
2) Copy the entire requirement block (from \`### Requirement: ...\` through its scenarios).
|
|
279
|
+
3) Paste it under \`## MODIFIED Requirements\` and edit to reflect the new behavior.
|
|
280
|
+
4) Ensure the header text matches exactly (whitespace-insensitive) and keep at least one \`#### Scenario:\`.
|
|
281
|
+
|
|
282
|
+
Example for RENAMED:
|
|
283
|
+
\`\`\`markdown
|
|
284
|
+
## RENAMED Requirements
|
|
285
|
+
- FROM: \`### Requirement: Login\`
|
|
286
|
+
- TO: \`### Requirement: User Authentication\`
|
|
287
|
+
\`\`\`
|
|
288
|
+
|
|
289
|
+
## Troubleshooting
|
|
290
|
+
|
|
291
|
+
### Common Errors
|
|
292
|
+
|
|
293
|
+
**"Change must have at least one delta"**
|
|
294
|
+
- Check \`changes/[name]/specs/\` exists with .md files
|
|
295
|
+
- Verify files have operation prefixes (## ADDED Requirements)
|
|
296
|
+
|
|
297
|
+
**"Requirement must have at least one scenario"**
|
|
298
|
+
- Check scenarios use \`#### Scenario:\` format (4 hashtags)
|
|
299
|
+
- Don't use bullet points or bold for scenario headers
|
|
300
|
+
|
|
301
|
+
**Silent scenario parsing failures**
|
|
302
|
+
- Exact format required: \`#### Scenario: Name\`
|
|
303
|
+
- Debug with: \`prompter show [change] --json --deltas-only\`
|
|
304
|
+
|
|
305
|
+
### Validation Tips
|
|
306
|
+
|
|
307
|
+
\`\`\`bash
|
|
308
|
+
# Always use strict mode for comprehensive checks
|
|
309
|
+
prompter validate [change] --strict --no-interactive
|
|
310
|
+
|
|
311
|
+
# Debug delta parsing
|
|
312
|
+
prompter show [change] --json | jq '.deltas'
|
|
313
|
+
|
|
314
|
+
# Check specific requirement
|
|
315
|
+
prompter show [spec] --json -r 1
|
|
316
|
+
\`\`\`
|
|
317
|
+
|
|
318
|
+
## Happy Path Script
|
|
319
|
+
|
|
320
|
+
\`\`\`bash
|
|
321
|
+
# 1) Explore current state
|
|
322
|
+
prompter spec list --long
|
|
323
|
+
prompter list
|
|
324
|
+
# Optional full-text search:
|
|
325
|
+
# rg -n "Requirement:|Scenario:" prompter/specs
|
|
326
|
+
# rg -n "^#|Requirement:" prompter/changes
|
|
327
|
+
|
|
328
|
+
# 2) Choose change id and scaffold
|
|
329
|
+
CHANGE=add-two-factor-auth
|
|
330
|
+
mkdir -p prompter/changes/$CHANGE/{specs/auth}
|
|
331
|
+
printf "## Why\\n...\\n\\n## What Changes\\n- ...\\n\\n## Impact\\n- ...\\n" > prompter/changes/$CHANGE/proposal.md
|
|
332
|
+
printf "## 1. Implementation\\n- [ ] 1.1 ...\\n" > prompter/changes/$CHANGE/tasks.md
|
|
333
|
+
|
|
334
|
+
# 3) Add deltas (example)
|
|
335
|
+
cat > prompter/changes/$CHANGE/specs/auth/spec.md << 'EOF'
|
|
336
|
+
## ADDED Requirements
|
|
337
|
+
### Requirement: Two-Factor Authentication
|
|
338
|
+
Users MUST provide a second factor during login.
|
|
339
|
+
|
|
340
|
+
#### Scenario: OTP required
|
|
341
|
+
- **WHEN** valid credentials are provided
|
|
342
|
+
- **THEN** an OTP challenge is required
|
|
343
|
+
EOF
|
|
344
|
+
|
|
345
|
+
# 4) Validate
|
|
346
|
+
prompter validate $CHANGE --strict --no-interactive
|
|
347
|
+
\`\`\`
|
|
348
|
+
|
|
349
|
+
## Multi-Capability Example
|
|
350
|
+
|
|
351
|
+
\`\`\`
|
|
352
|
+
prompter/changes/add-2fa-notify/
|
|
353
|
+
├── proposal.md
|
|
354
|
+
├── tasks.md
|
|
355
|
+
└── specs/
|
|
356
|
+
├── auth/
|
|
357
|
+
│ └── spec.md # ADDED: Two-Factor Authentication
|
|
358
|
+
└── notifications/
|
|
359
|
+
└── spec.md # ADDED: OTP email notification
|
|
360
|
+
\`\`\`
|
|
361
|
+
|
|
362
|
+
auth/spec.md
|
|
363
|
+
\`\`\`markdown
|
|
364
|
+
## ADDED Requirements
|
|
365
|
+
### Requirement: Two-Factor Authentication
|
|
366
|
+
...
|
|
367
|
+
\`\`\`
|
|
368
|
+
|
|
369
|
+
notifications/spec.md
|
|
370
|
+
\`\`\`markdown
|
|
371
|
+
## ADDED Requirements
|
|
372
|
+
### Requirement: OTP Email Notification
|
|
373
|
+
...
|
|
374
|
+
\`\`\`
|
|
375
|
+
|
|
376
|
+
## Best Practices
|
|
377
|
+
|
|
378
|
+
### Simplicity First
|
|
379
|
+
- Default to <100 lines of new code
|
|
380
|
+
- Single-file implementations until proven insufficient
|
|
381
|
+
- Avoid frameworks without clear justification
|
|
382
|
+
- Choose boring, proven patterns
|
|
383
|
+
|
|
384
|
+
### Complexity Triggers
|
|
385
|
+
Only add complexity with:
|
|
386
|
+
- Performance data showing current solution too slow
|
|
387
|
+
- Concrete scale requirements (>1000 users, >100MB data)
|
|
388
|
+
- Multiple proven use cases requiring abstraction
|
|
389
|
+
|
|
390
|
+
### Clear References
|
|
391
|
+
- Use \`file.ts:42\` format for code locations
|
|
392
|
+
- Reference specs as \`specs/auth/spec.md\`
|
|
393
|
+
- Link related changes and PRs
|
|
394
|
+
|
|
395
|
+
### Capability Naming
|
|
396
|
+
- Use verb-noun: \`user-auth\`, \`payment-capture\`
|
|
397
|
+
- Single purpose per capability
|
|
398
|
+
- 10-minute understandability rule
|
|
399
|
+
- Split if description needs "AND"
|
|
400
|
+
|
|
401
|
+
### Change ID Naming
|
|
402
|
+
- Use kebab-case, short and descriptive: \`add-two-factor-auth\`
|
|
403
|
+
- Prefer verb-led prefixes: \`add-\`, \`update-\`, \`remove-\`, \`refactor-\`
|
|
404
|
+
- Ensure uniqueness; if taken, append \`-2\`, \`-3\`, etc.
|
|
405
|
+
|
|
406
|
+
## Tool Selection Guide
|
|
407
|
+
|
|
408
|
+
| Task | Tool | Why |
|
|
409
|
+
|------|------|-----|
|
|
410
|
+
| Find files by pattern | Glob | Fast pattern matching |
|
|
411
|
+
| Search code content | Grep | Optimized regex search |
|
|
412
|
+
| Read specific files | Read | Direct file access |
|
|
413
|
+
| Explore unknown scope | Task | Multi-step investigation |
|
|
414
|
+
|
|
415
|
+
## Error Recovery
|
|
416
|
+
|
|
417
|
+
### Change Conflicts
|
|
418
|
+
1. Run \`prompter list\` to see active changes
|
|
419
|
+
2. Check for overlapping specs
|
|
420
|
+
3. Coordinate with change owners
|
|
421
|
+
4. Consider combining proposals
|
|
422
|
+
|
|
423
|
+
### Validation Failures
|
|
424
|
+
1. Run with \`--strict\` flag
|
|
425
|
+
2. Check JSON output for details
|
|
426
|
+
3. Verify spec file format
|
|
427
|
+
4. Ensure scenarios properly formatted
|
|
428
|
+
|
|
429
|
+
### Missing Context
|
|
430
|
+
1. Read project.md first
|
|
431
|
+
2. Check related specs
|
|
432
|
+
3. Review recent archives
|
|
433
|
+
4. Ask for clarification
|
|
434
|
+
|
|
435
|
+
## Quick Reference
|
|
436
|
+
|
|
437
|
+
### Stage Indicators
|
|
438
|
+
- \`changes/\` - Proposed, not yet built
|
|
439
|
+
- \`specs/\` - Built and deployed
|
|
440
|
+
- \`archive/\` - Completed changes
|
|
441
|
+
|
|
442
|
+
### File Purposes
|
|
443
|
+
- \`proposal.md\` - Why and what
|
|
444
|
+
- \`tasks.md\` - Implementation steps
|
|
445
|
+
- \`design.md\` - Technical decisions
|
|
446
|
+
- \`spec.md\` - Requirements and behavior
|
|
447
|
+
|
|
448
|
+
### CLI Essentials
|
|
449
|
+
\`\`\`bash
|
|
450
|
+
prompter list # What's in progress?
|
|
451
|
+
prompter show [item] # View details
|
|
452
|
+
prompter validate --strict --no-interactive # Is it correct?
|
|
453
|
+
prompter archive <change-id> [--yes|-y] # Mark complete (add --yes for automation)
|
|
454
|
+
\`\`\`
|
|
29
455
|
|
|
30
|
-
|
|
31
|
-
- Be specific in your initial prompt for better results
|
|
32
|
-
- Review and refine the enhanced specification before implementing
|
|
456
|
+
Remember: Specs are truth. Changes are proposals. Keep them in sync.
|
|
33
457
|
`;
|
|
34
458
|
//# sourceMappingURL=agents-template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-template.js","sourceRoot":"","sources":["../../../src/core/templates/agents-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG
|
|
1
|
+
{"version":3,"file":"agents-template.js","sourceRoot":"","sources":["../../../src/core/templates/agents-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwc7B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type SlashCommandId = 'enhance' | 'prd-generator' | 'prd-agent-generator' | 'product-brief' | 'epic-single' | 'epic-generator' | 'story-single' | 'story-generator' | 'qa-test-scenario' | 'skill-creator' | 'ai-humanizer' | 'api-contract-generator' | 'design-system' | 'erd-generator' | 'fsd-generator' | 'tdd-generator' | 'tdd-lite-generator' | 'wireframe-generator' | 'document-explainer';
|
|
1
|
+
export type SlashCommandId = 'enhance' | 'prd-generator' | 'prd-agent-generator' | 'product-brief' | 'epic-single' | 'epic-generator' | 'story-single' | 'story-generator' | 'qa-test-scenario' | 'skill-creator' | 'ai-humanizer' | 'api-contract-generator' | 'apply' | 'archive' | 'design-system' | 'erd-generator' | 'fsd-generator' | 'proposal' | 'tdd-generator' | 'tdd-lite-generator' | 'wireframe-generator' | 'document-explainer';
|
|
2
2
|
export declare const slashCommandBodies: Record<SlashCommandId, string>;
|
|
3
3
|
export declare function getSlashCommandBody(id: SlashCommandId): string;
|
|
4
4
|
export declare class TemplateManager {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash-command-templates.d.ts","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slash-command-templates.d.ts","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,eAAe,GAAG,qBAAqB,GAAG,eAAe,GAAG,aAAa,GAAG,gBAAgB,GAAG,cAAc,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,eAAe,GAAG,cAAc,GAAG,wBAAwB,GAAG,OAAO,GAAG,SAAS,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,UAAU,GAAG,eAAe,GAAG,oBAAoB,GAAG,qBAAqB,GAAG,oBAAoB,CAAC;AA0/B/a,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAuB7D,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,CAE9D;AAED,qBAAa,eAAe;IACxB,MAAM,CAAC,mBAAmB,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM;CAGzD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { API_CONTRACT_GENERATOR_TEMPLATE, DESIGN_SYSTEM_TEMPLATE, EPIC_GENERATOR_TEMPLATE, ERD_GENERATOR_TEMPLATE, FSD_GENERATOR_TEMPLATE, STORY_GENERATOR_TEMPLATE, TDD_GENERATOR_TEMPLATE, TDD_LITE_GENERATOR_TEMPLATE, WIREFRAME_GENERATOR_TEMPLATE, DOCUMENT_EXPLAINER_TEMPLATE } from '../prompt-templates.js';
|
|
1
|
+
import { API_CONTRACT_GENERATOR_TEMPLATE, APPLY_TEMPLATE, ARCHIVE_TEMPLATE, DESIGN_SYSTEM_TEMPLATE, EPIC_GENERATOR_TEMPLATE, ERD_GENERATOR_TEMPLATE, FSD_GENERATOR_TEMPLATE, PROPOSAL_TEMPLATE, STORY_GENERATOR_TEMPLATE, TDD_GENERATOR_TEMPLATE, TDD_LITE_GENERATOR_TEMPLATE, WIREFRAME_GENERATOR_TEMPLATE, DOCUMENT_EXPLAINER_TEMPLATE } from '../prompt-templates.js';
|
|
2
2
|
const enhanceWorkflow = `## MUST FOLLOW
|
|
3
3
|
- Response Language: {User Request Language}
|
|
4
4
|
|
|
@@ -1019,9 +1019,12 @@ export const slashCommandBodies = {
|
|
|
1019
1019
|
'skill-creator': skillCreatorWorkflow,
|
|
1020
1020
|
'ai-humanizer': aiHumanizerWorkflow,
|
|
1021
1021
|
'api-contract-generator': API_CONTRACT_GENERATOR_TEMPLATE,
|
|
1022
|
+
'apply': APPLY_TEMPLATE,
|
|
1023
|
+
'archive': ARCHIVE_TEMPLATE,
|
|
1022
1024
|
'design-system': DESIGN_SYSTEM_TEMPLATE,
|
|
1023
1025
|
'erd-generator': ERD_GENERATOR_TEMPLATE,
|
|
1024
1026
|
'fsd-generator': FSD_GENERATOR_TEMPLATE,
|
|
1027
|
+
'proposal': PROPOSAL_TEMPLATE,
|
|
1025
1028
|
'tdd-generator': TDD_GENERATOR_TEMPLATE,
|
|
1026
1029
|
'tdd-lite-generator': TDD_LITE_GENERATOR_TEMPLATE,
|
|
1027
1030
|
'wireframe-generator': WIREFRAME_GENERATOR_TEMPLATE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash-command-templates.js","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"slash-command-templates.js","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation threshold constants
|
|
3
|
+
*/
|
|
4
|
+
export declare const MIN_WHY_SECTION_LENGTH = 50;
|
|
5
|
+
export declare const MIN_PURPOSE_LENGTH = 50;
|
|
6
|
+
export declare const MAX_WHY_SECTION_LENGTH = 1000;
|
|
7
|
+
export declare const MAX_REQUIREMENT_TEXT_LENGTH = 500;
|
|
8
|
+
export declare const MAX_DELTAS_PER_CHANGE = 10;
|
|
9
|
+
export declare const VALIDATION_MESSAGES: {
|
|
10
|
+
readonly SCENARIO_EMPTY: "Scenario text cannot be empty";
|
|
11
|
+
readonly REQUIREMENT_EMPTY: "Requirement text cannot be empty";
|
|
12
|
+
readonly REQUIREMENT_NO_SHALL: "Requirement must contain SHALL or MUST keyword";
|
|
13
|
+
readonly REQUIREMENT_NO_SCENARIOS: "Requirement must have at least one scenario";
|
|
14
|
+
readonly SPEC_NAME_EMPTY: "Spec name cannot be empty";
|
|
15
|
+
readonly SPEC_PURPOSE_EMPTY: "Purpose section cannot be empty";
|
|
16
|
+
readonly SPEC_NO_REQUIREMENTS: "Spec must have at least one requirement";
|
|
17
|
+
readonly CHANGE_NAME_EMPTY: "Change name cannot be empty";
|
|
18
|
+
readonly CHANGE_WHY_TOO_SHORT: "Why section must be at least 50 characters";
|
|
19
|
+
readonly CHANGE_WHY_TOO_LONG: "Why section should not exceed 1000 characters";
|
|
20
|
+
readonly CHANGE_WHAT_EMPTY: "What Changes section cannot be empty";
|
|
21
|
+
readonly CHANGE_NO_DELTAS: "Change must have at least one delta";
|
|
22
|
+
readonly CHANGE_TOO_MANY_DELTAS: "Consider splitting changes with more than 10 deltas";
|
|
23
|
+
readonly DELTA_SPEC_EMPTY: "Spec name cannot be empty";
|
|
24
|
+
readonly DELTA_DESCRIPTION_EMPTY: "Delta description cannot be empty";
|
|
25
|
+
readonly PURPOSE_TOO_BRIEF: "Purpose section is too brief (less than 50 characters)";
|
|
26
|
+
readonly REQUIREMENT_TOO_LONG: "Requirement text is very long (>500 characters). Consider breaking it down.";
|
|
27
|
+
readonly DELTA_DESCRIPTION_TOO_BRIEF: "Delta description is too brief";
|
|
28
|
+
readonly DELTA_MISSING_REQUIREMENTS: "Delta should include requirements";
|
|
29
|
+
readonly GUIDE_NO_DELTAS: "No deltas found. Ensure your change has a specs/ directory with capability folders (e.g. specs/http-server/spec.md) containing .md files that use delta headers (## ADDED/MODIFIED/REMOVED/RENAMED Requirements) and that each requirement includes at least one \"#### Scenario:\" block. Tip: run \"prompter change show <change-id> --json --deltas-only\" to inspect parsed deltas.";
|
|
30
|
+
readonly GUIDE_MISSING_SPEC_SECTIONS: "Missing required sections. Expected headers: \"## Purpose\" and \"## Requirements\". Example:\n## Purpose\n[brief purpose]\n\n## Requirements\n### Requirement: Clear requirement statement\nUsers SHALL ...\n\n#### Scenario: Descriptive name\n- **WHEN** ...\n- **THEN** ...";
|
|
31
|
+
readonly GUIDE_MISSING_CHANGE_SECTIONS: "Missing required sections. Expected headers: \"## Why\" and \"## What Changes\". Ensure deltas are documented in specs/ using delta headers.";
|
|
32
|
+
readonly GUIDE_SCENARIO_FORMAT: "Scenarios must use level-4 headers. Convert bullet lists into:\n#### Scenario: Short name\n- **WHEN** ...\n- **THEN** ...\n- **AND** ...";
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/core/validation/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAGrC,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAGxC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;CAiCtB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation threshold constants
|
|
3
|
+
*/
|
|
4
|
+
// Minimum character lengths
|
|
5
|
+
export const MIN_WHY_SECTION_LENGTH = 50;
|
|
6
|
+
export const MIN_PURPOSE_LENGTH = 50;
|
|
7
|
+
// Maximum character/item limits
|
|
8
|
+
export const MAX_WHY_SECTION_LENGTH = 1000;
|
|
9
|
+
export const MAX_REQUIREMENT_TEXT_LENGTH = 500;
|
|
10
|
+
export const MAX_DELTAS_PER_CHANGE = 10;
|
|
11
|
+
// Validation messages
|
|
12
|
+
export const VALIDATION_MESSAGES = {
|
|
13
|
+
// Required content
|
|
14
|
+
SCENARIO_EMPTY: 'Scenario text cannot be empty',
|
|
15
|
+
REQUIREMENT_EMPTY: 'Requirement text cannot be empty',
|
|
16
|
+
REQUIREMENT_NO_SHALL: 'Requirement must contain SHALL or MUST keyword',
|
|
17
|
+
REQUIREMENT_NO_SCENARIOS: 'Requirement must have at least one scenario',
|
|
18
|
+
SPEC_NAME_EMPTY: 'Spec name cannot be empty',
|
|
19
|
+
SPEC_PURPOSE_EMPTY: 'Purpose section cannot be empty',
|
|
20
|
+
SPEC_NO_REQUIREMENTS: 'Spec must have at least one requirement',
|
|
21
|
+
CHANGE_NAME_EMPTY: 'Change name cannot be empty',
|
|
22
|
+
CHANGE_WHY_TOO_SHORT: `Why section must be at least ${MIN_WHY_SECTION_LENGTH} characters`,
|
|
23
|
+
CHANGE_WHY_TOO_LONG: `Why section should not exceed ${MAX_WHY_SECTION_LENGTH} characters`,
|
|
24
|
+
CHANGE_WHAT_EMPTY: 'What Changes section cannot be empty',
|
|
25
|
+
CHANGE_NO_DELTAS: 'Change must have at least one delta',
|
|
26
|
+
CHANGE_TOO_MANY_DELTAS: `Consider splitting changes with more than ${MAX_DELTAS_PER_CHANGE} deltas`,
|
|
27
|
+
DELTA_SPEC_EMPTY: 'Spec name cannot be empty',
|
|
28
|
+
DELTA_DESCRIPTION_EMPTY: 'Delta description cannot be empty',
|
|
29
|
+
// Warnings
|
|
30
|
+
PURPOSE_TOO_BRIEF: `Purpose section is too brief (less than ${MIN_PURPOSE_LENGTH} characters)`,
|
|
31
|
+
REQUIREMENT_TOO_LONG: `Requirement text is very long (>${MAX_REQUIREMENT_TEXT_LENGTH} characters). Consider breaking it down.`,
|
|
32
|
+
DELTA_DESCRIPTION_TOO_BRIEF: 'Delta description is too brief',
|
|
33
|
+
DELTA_MISSING_REQUIREMENTS: 'Delta should include requirements',
|
|
34
|
+
// Guidance snippets (appended to primary messages for remediation)
|
|
35
|
+
GUIDE_NO_DELTAS: 'No deltas found. Ensure your change has a specs/ directory with capability folders (e.g. specs/http-server/spec.md) containing .md files that use delta headers (## ADDED/MODIFIED/REMOVED/RENAMED Requirements) and that each requirement includes at least one "#### Scenario:" block. Tip: run "prompter change show <change-id> --json --deltas-only" to inspect parsed deltas.',
|
|
36
|
+
GUIDE_MISSING_SPEC_SECTIONS: 'Missing required sections. Expected headers: "## Purpose" and "## Requirements". Example:\n## Purpose\n[brief purpose]\n\n## Requirements\n### Requirement: Clear requirement statement\nUsers SHALL ...\n\n#### Scenario: Descriptive name\n- **WHEN** ...\n- **THEN** ...',
|
|
37
|
+
GUIDE_MISSING_CHANGE_SECTIONS: 'Missing required sections. Expected headers: "## Why" and "## What Changes". Ensure deltas are documented in specs/ using delta headers.',
|
|
38
|
+
GUIDE_SCENARIO_FORMAT: 'Scenarios must use level-4 headers. Convert bullet lists into:\n#### Scenario: Short name\n- **WHEN** ...\n- **THEN** ...\n- **AND** ...',
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/core/validation/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,4BAA4B;AAC5B,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAErC,gCAAgC;AAChC,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAC3C,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAC/C,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAExC,sBAAsB;AACtB,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,mBAAmB;IACnB,cAAc,EAAE,+BAA+B;IAC/C,iBAAiB,EAAE,kCAAkC;IACrD,oBAAoB,EAAE,gDAAgD;IACtE,wBAAwB,EAAE,6CAA6C;IACvE,eAAe,EAAE,2BAA2B;IAC5C,kBAAkB,EAAE,iCAAiC;IACrD,oBAAoB,EAAE,yCAAyC;IAC/D,iBAAiB,EAAE,6BAA6B;IAChD,oBAAoB,EAAE,gCAAgC,sBAAsB,aAAa;IACzF,mBAAmB,EAAE,iCAAiC,sBAAsB,aAAa;IACzF,iBAAiB,EAAE,sCAAsC;IACzD,gBAAgB,EAAE,qCAAqC;IACvD,sBAAsB,EAAE,6CAA6C,qBAAqB,SAAS;IACnG,gBAAgB,EAAE,2BAA2B;IAC7C,uBAAuB,EAAE,mCAAmC;IAE5D,WAAW;IACX,iBAAiB,EAAE,2CAA2C,kBAAkB,cAAc;IAC9F,oBAAoB,EAAE,mCAAmC,2BAA2B,0CAA0C;IAC9H,2BAA2B,EAAE,gCAAgC;IAC7D,0BAA0B,EAAE,mCAAmC;IAE/D,mEAAmE;IACnE,eAAe,EACb,qXAAqX;IACvX,2BAA2B,EACzB,6QAA6Q;IAC/Q,6BAA6B,EAC3B,0IAA0I;IAC5I,qBAAqB,EACnB,0IAA0I;CACpI,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type ValidationLevel = 'ERROR' | 'WARNING' | 'INFO';
|
|
2
|
+
export interface ValidationIssue {
|
|
3
|
+
level: ValidationLevel;
|
|
4
|
+
path: string;
|
|
5
|
+
message: string;
|
|
6
|
+
line?: number;
|
|
7
|
+
column?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ValidationReport {
|
|
10
|
+
valid: boolean;
|
|
11
|
+
issues: ValidationIssue[];
|
|
12
|
+
summary: {
|
|
13
|
+
errors: number;
|
|
14
|
+
warnings: number;
|
|
15
|
+
info: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/validation/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/validation/types.ts"],"names":[],"mappings":""}
|