@dedesfr/prompter 0.9.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +105 -77
  3. package/dist/cli/index.js +25 -1
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/init.d.ts.map +1 -1
  6. package/dist/commands/init.js +32 -9
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/login.d.ts +4 -0
  9. package/dist/commands/login.d.ts.map +1 -0
  10. package/dist/commands/login.js +56 -0
  11. package/dist/commands/login.js.map +1 -0
  12. package/dist/commands/logout.d.ts +4 -0
  13. package/dist/commands/logout.d.ts.map +1 -0
  14. package/dist/commands/logout.js +14 -0
  15. package/dist/commands/logout.js.map +1 -0
  16. package/dist/commands/update.d.ts.map +1 -1
  17. package/dist/commands/update.js +18 -5
  18. package/dist/commands/update.js.map +1 -1
  19. package/dist/commands/whoami.d.ts +4 -0
  20. package/dist/commands/whoami.d.ts.map +1 -0
  21. package/dist/commands/whoami.js +42 -0
  22. package/dist/commands/whoami.js.map +1 -0
  23. package/dist/core/auth-store.d.ts +10 -0
  24. package/dist/core/auth-store.d.ts.map +1 -0
  25. package/dist/core/auth-store.js +39 -0
  26. package/dist/core/auth-store.js.map +1 -0
  27. package/dist/core/registry.d.ts +18 -0
  28. package/dist/core/registry.d.ts.map +1 -0
  29. package/dist/core/registry.js +94 -0
  30. package/dist/core/registry.js.map +1 -0
  31. package/package.json +7 -1
  32. package/AGENTS.md +0 -123
  33. package/CLAUDE.md +0 -17
  34. package/build.js +0 -20
  35. package/convex-setup.md +0 -403
  36. package/prompt/ai-humanizer.md +0 -45
  37. package/prompt/api-contract-generator.md +0 -234
  38. package/prompt/apply.md +0 -17
  39. package/prompt/archive.md +0 -21
  40. package/prompt/design-system.md +0 -210
  41. package/prompt/document-explainer.md +0 -149
  42. package/prompt/epic-generator.md +0 -198
  43. package/prompt/epic-single.md +0 -47
  44. package/prompt/erd-generator.md +0 -130
  45. package/prompt/fsd-generator.md +0 -157
  46. package/prompt/prd-agent-generator.md +0 -147
  47. package/prompt/prd-generator.md +0 -195
  48. package/prompt/product-brief.md +0 -289
  49. package/prompt/proposal.md +0 -22
  50. package/prompt/qa-test-scenario.md +0 -133
  51. package/prompt/skill-creator.md +0 -350
  52. package/prompt/story-generator.md +0 -278
  53. package/prompt/story-single.md +0 -70
  54. package/prompt/tdd-generator.md +0 -294
  55. package/prompt/tdd-lite-generator.md +0 -224
  56. package/prompt/wireframe-generator.md +0 -219
  57. package/skills/ai-context-generator/SKILL.md +0 -54
  58. package/skills/ai-context-generator/references/AGENTS.template.md +0 -83
  59. package/skills/ai-context-generator/references/CLAUDE.template.md +0 -39
  60. package/skills/ai-context-generator/references/behavioral-guidelines.md +0 -71
  61. package/skills/ai-context-generator/references/discovery-checklist.md +0 -40
  62. package/skills/ai-context-generator/references/examples/AGENTS.good.md +0 -103
  63. package/skills/ai-context-generator/references/extraction-checklist.md +0 -23
  64. package/skills/ai-context-generator/references/overlays/laravel.md +0 -44
  65. package/skills/ai-humanizer/SKILL.md +0 -50
  66. package/skills/api-contract-generator/SKILL.md +0 -243
  67. package/skills/apply/SKILL.md +0 -23
  68. package/skills/archive/SKILL.md +0 -27
  69. package/skills/cerebro/SKILL.md +0 -187
  70. package/skills/cerebro/references/agents.md +0 -213
  71. package/skills/code-review/SKILL.md +0 -373
  72. package/skills/code-review/assets/report-template-agent.md +0 -212
  73. package/skills/code-review/assets/report-template-compact.md +0 -81
  74. package/skills/code-review/assets/report-template-full.md +0 -264
  75. package/skills/code-review/assets/report-template-human.md +0 -168
  76. package/skills/code-review/references/universal-patterns.md +0 -495
  77. package/skills/design-md/README.md +0 -34
  78. package/skills/design-md/SKILL.md +0 -172
  79. package/skills/design-md/examples/DESIGN.md +0 -154
  80. package/skills/design-system/SKILL.md +0 -216
  81. package/skills/design-system-generator/SKILL.md +0 -324
  82. package/skills/design-system-generator/assets/design-system-template.md +0 -348
  83. package/skills/design-system-generator/references/extraction-patterns.md +0 -321
  84. package/skills/doc-builder/SKILL.md +0 -115
  85. package/skills/doc-builder/references/ui-patterns.md +0 -394
  86. package/skills/document-explainer/SKILL.md +0 -155
  87. package/skills/document-translator/SKILL.md +0 -58
  88. package/skills/enhance/SKILL.md +0 -47
  89. package/skills/enhance-prompt/README.md +0 -34
  90. package/skills/enhance-prompt/SKILL.md +0 -204
  91. package/skills/enhance-prompt/references/KEYWORDS.md +0 -114
  92. package/skills/epic-generator/SKILL.md +0 -204
  93. package/skills/epic-single/SKILL.md +0 -63
  94. package/skills/erd-generator/SKILL.md +0 -138
  95. package/skills/feature-planner/SKILL.md +0 -305
  96. package/skills/feature-planner/assets/implementation-plan-template.md +0 -85
  97. package/skills/frontend-design/LICENSE.txt +0 -177
  98. package/skills/frontend-design/SKILL.md +0 -42
  99. package/skills/fsd-generator/SKILL.md +0 -163
  100. package/skills/gamma-builder/SKILL.md +0 -134
  101. package/skills/laravel-code-review/SKILL.md +0 -383
  102. package/skills/laravel-code-review/assets/report-template-agent.md +0 -195
  103. package/skills/laravel-code-review/assets/report-template-compact.md +0 -79
  104. package/skills/laravel-code-review/assets/report-template-full.md +0 -253
  105. package/skills/laravel-code-review/assets/report-template-human.md +0 -159
  106. package/skills/laravel-code-review/references/laravel-patterns.md +0 -571
  107. package/skills/laravel-code-review/references/php84-features.md +0 -442
  108. package/skills/mcp-builder/LICENSE.txt +0 -202
  109. package/skills/mcp-builder/SKILL.md +0 -236
  110. package/skills/mcp-builder/reference/evaluation.md +0 -602
  111. package/skills/mcp-builder/reference/mcp_best_practices.md +0 -249
  112. package/skills/mcp-builder/reference/node_mcp_server.md +0 -970
  113. package/skills/mcp-builder/reference/python_mcp_server.md +0 -719
  114. package/skills/mcp-builder/scripts/connections.py +0 -151
  115. package/skills/mcp-builder/scripts/evaluation.py +0 -373
  116. package/skills/mcp-builder/scripts/example_evaluation.xml +0 -22
  117. package/skills/mcp-builder/scripts/requirements.txt +0 -2
  118. package/skills/meeting-notes/SKILL.md +0 -159
  119. package/skills/meeting-notes/evals/evals.json +0 -23
  120. package/skills/prd-agent-generator/SKILL.md +0 -132
  121. package/skills/prd-generator/SKILL.md +0 -211
  122. package/skills/product-brief/SKILL.md +0 -141
  123. package/skills/project-orchestrator/SKILL.md +0 -487
  124. package/skills/project-orchestrator/assets/caddy-vps-setup.md +0 -180
  125. package/skills/project-orchestrator/assets/plan-summary-template.md +0 -159
  126. package/skills/prompter-specs/SKILL.md +0 -115
  127. package/skills/prompter-workflow/SKILL.md +0 -166
  128. package/skills/prompter-workflow/evals/evals.json +0 -89
  129. package/skills/proposal/SKILL.md +0 -28
  130. package/skills/qa-test-scenario/SKILL.md +0 -149
  131. package/skills/skill-creator/SKILL.md +0 -173
  132. package/skills/sph-generator/SKILL.md +0 -488
  133. package/skills/story-generator/SKILL.md +0 -285
  134. package/skills/story-single/SKILL.md +0 -86
  135. package/skills/tdd-generator/SKILL.md +0 -300
  136. package/skills/tdd-lite-generator/SKILL.md +0 -230
  137. package/skills/ui-ux-pro/SKILL.md +0 -199
  138. package/skills/ui-ux-pro/assets/design-spec-template.md +0 -173
  139. package/skills/ui-ux-pro/references/component-patterns.md +0 -255
  140. package/skills/ui-ux-pro/references/design-principles.md +0 -167
  141. package/skills/wireframe-generator/SKILL.md +0 -227
  142. package/src/cli/index.ts +0 -223
  143. package/src/commands/archive.ts +0 -302
  144. package/src/commands/change.ts +0 -292
  145. package/src/commands/config.ts +0 -233
  146. package/src/commands/guide.ts +0 -50
  147. package/src/commands/init.ts +0 -597
  148. package/src/commands/list.ts +0 -194
  149. package/src/commands/show.ts +0 -138
  150. package/src/commands/spec.ts +0 -251
  151. package/src/commands/update.ts +0 -129
  152. package/src/commands/upgrade.ts +0 -30
  153. package/src/commands/validate.ts +0 -326
  154. package/src/core/artifact-graph/graph.ts +0 -167
  155. package/src/core/artifact-graph/index.ts +0 -44
  156. package/src/core/artifact-graph/instruction-loader.ts +0 -302
  157. package/src/core/artifact-graph/resolver.ts +0 -226
  158. package/src/core/artifact-graph/schema.ts +0 -124
  159. package/src/core/artifact-graph/state.ts +0 -64
  160. package/src/core/artifact-graph/types.ts +0 -65
  161. package/src/core/completions/command-registry.ts +0 -382
  162. package/src/core/completions/completion-provider.ts +0 -128
  163. package/src/core/completions/generators/bash-generator.ts +0 -191
  164. package/src/core/completions/generators/fish-generator.ts +0 -188
  165. package/src/core/completions/generators/powershell-generator.ts +0 -223
  166. package/src/core/completions/generators/zsh-generator.ts +0 -281
  167. package/src/core/completions/templates/bash-templates.ts +0 -24
  168. package/src/core/completions/templates/fish-templates.ts +0 -40
  169. package/src/core/completions/templates/powershell-templates.ts +0 -25
  170. package/src/core/completions/templates/zsh-templates.ts +0 -36
  171. package/src/core/completions/types.ts +0 -90
  172. package/src/core/config-schema.ts +0 -230
  173. package/src/core/config.ts +0 -181
  174. package/src/core/configurators/slash/antigravity.ts +0 -10
  175. package/src/core/configurators/slash/base.ts +0 -109
  176. package/src/core/configurators/slash/claude.ts +0 -10
  177. package/src/core/configurators/slash/codex.ts +0 -10
  178. package/src/core/configurators/slash/droid.ts +0 -10
  179. package/src/core/configurators/slash/forge.ts +0 -10
  180. package/src/core/configurators/slash/github-copilot.ts +0 -10
  181. package/src/core/configurators/slash/index.ts +0 -10
  182. package/src/core/configurators/slash/kilocode.ts +0 -10
  183. package/src/core/configurators/slash/opencode.ts +0 -10
  184. package/src/core/configurators/slash/registry.ts +0 -51
  185. package/src/core/converters/json-converter.ts +0 -62
  186. package/src/core/global-config.ts +0 -136
  187. package/src/core/parsers/change-parser.ts +0 -234
  188. package/src/core/parsers/markdown-parser.ts +0 -237
  189. package/src/core/parsers/requirement-blocks.ts +0 -234
  190. package/src/core/prompt-templates.ts +0 -3504
  191. package/src/core/schemas/base.schema.ts +0 -20
  192. package/src/core/schemas/change.schema.ts +0 -42
  193. package/src/core/schemas/index.ts +0 -20
  194. package/src/core/schemas/spec.schema.ts +0 -17
  195. package/src/core/skill-discovery.ts +0 -68
  196. package/src/core/specs-apply.ts +0 -483
  197. package/src/core/styles/palette.ts +0 -8
  198. package/src/core/templates/agents-template.ts +0 -459
  199. package/src/core/templates/claude-template.ts +0 -2
  200. package/src/core/templates/index.ts +0 -3
  201. package/src/core/templates/project-template.ts +0 -32
  202. package/src/core/validation/constants.ts +0 -48
  203. package/src/core/validation/types.ts +0 -19
  204. package/src/core/validation/validator.ts +0 -449
  205. package/src/core/view.ts +0 -219
  206. package/src/index.ts +0 -1
  207. package/src/utils/change-metadata.ts +0 -171
  208. package/src/utils/change-utils.ts +0 -131
  209. package/src/utils/file-system.ts +0 -252
  210. package/src/utils/index.ts +0 -12
  211. package/src/utils/interactive.ts +0 -29
  212. package/src/utils/item-discovery.ts +0 -66
  213. package/src/utils/match.ts +0 -26
  214. package/src/utils/shell-detection.ts +0 -62
  215. package/src/utils/task-progress.ts +0 -43
  216. package/tsconfig.json +0 -28
@@ -1,459 +0,0 @@
1
- export const agentsTemplate = `# Prompter Instructions
2
-
3
- Instructions for AI coding assistants using Prompter for spec-driven development.
4
-
5
- ## TL;DR Quick Checklist
6
-
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
14
-
15
- ## Three-Stage Workflow
16
-
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
24
-
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"
31
-
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
-
104
- # Interactive mode
105
- prompter show # Prompts for selection
106
- prompter validate # Bulk validation mode
107
-
108
- # Debugging
109
- prompter show [change] --json --deltas-only
110
- prompter validate [change] --strict --no-interactive
111
- \`\`\`
112
-
113
- ### Command Flags
114
-
115
- - \`--json\` - Machine-readable output
116
- - \`--type change|spec\` - Disambiguate items
117
- - \`--strict\` - Comprehensive validation
118
- - \`--no-interactive\` - Disable prompts
119
- - \`--skip-specs\` - Archive without spec updates
120
- - \`--yes\`/\`-y\` - Skip confirmation prompts (non-interactive archive)
121
-
122
- ## Directory Structure
123
-
124
- \`\`\`
125
- prompter/
126
- ├── project.md # Project conventions
127
- ├── specs/ # Current truth - what IS built
128
- │ └── [capability]/ # Single focused capability
129
- │ ├── spec.md # Requirements and scenarios
130
- │ └── design.md # Technical patterns
131
- ├── changes/ # Proposals - what SHOULD change
132
- │ ├── [change-name]/
133
- │ │ ├── proposal.md # Why, what, impact
134
- │ │ ├── tasks.md # Implementation checklist
135
- │ │ ├── design.md # Technical decisions (optional; see criteria)
136
- │ │ └── specs/ # Delta changes
137
- │ │ └── [capability]/
138
- │ │ └── spec.md # ADDED/MODIFIED/REMOVED
139
- │ └── archive/ # Completed changes
140
- \`\`\`
141
-
142
- ## Creating Change Proposals
143
-
144
- ### Decision Tree
145
-
146
- \`\`\`
147
- New request?
148
- ├─ Bug fix restoring spec behavior? → Fix directly
149
- ├─ Typo/format/comment? → Fix directly
150
- ├─ New feature/capability? → Create proposal
151
- ├─ Breaking change? → Create proposal
152
- ├─ Architecture change? → Create proposal
153
- └─ Unclear? → Create proposal (safer)
154
- \`\`\`
155
-
156
- ### Proposal Structure
157
-
158
- 1. **Create directory:** \`changes/[change-id]/\` (kebab-case, verb-led, unique)
159
-
160
- 2. **Write proposal.md:**
161
- \`\`\`markdown
162
- # Change: [Brief description of change]
163
-
164
- ## Why
165
- [1-2 sentences on problem/opportunity]
166
-
167
- ## What Changes
168
- - [Bullet list of changes]
169
- - [Mark breaking changes with **BREAKING**]
170
-
171
- ## Impact
172
- - Affected specs: [list capabilities]
173
- - Affected code: [key files/systems]
174
- \`\`\`
175
-
176
- 3. **Create spec deltas:** \`specs/[capability]/spec.md\`
177
- \`\`\`markdown
178
- ## ADDED Requirements
179
- ### Requirement: New Feature
180
- The system SHALL provide...
181
-
182
- #### Scenario: Success case
183
- - **WHEN** user performs action
184
- - **THEN** expected result
185
-
186
- ## MODIFIED Requirements
187
- ### Requirement: Existing Feature
188
- [Complete modified requirement]
189
-
190
- ## REMOVED Requirements
191
- ### Requirement: Old Feature
192
- **Reason**: [Why removing]
193
- **Migration**: [How to handle]
194
- \`\`\`
195
- If multiple capabilities are affected, create multiple delta files under \`changes/[change-id]/specs/<capability>/spec.md\`—one per capability.
196
-
197
- 4. **Create tasks.md:**
198
- \`\`\`markdown
199
- ## 1. Implementation
200
- - [ ] 1.1 Create database schema
201
- - [ ] 1.2 Implement API endpoint
202
- - [ ] 1.3 Add frontend component
203
- - [ ] 1.4 Write tests
204
-
205
- ## Post-Implementation
206
- - [ ] Update AGENTS.md in the project root for new changes in this specs
207
- \`\`\`
208
-
209
- 5. **Create design.md when needed:**
210
- Create \`design.md\` if any of the following apply; otherwise omit it:
211
- - Cross-cutting change (multiple services/modules) or a new architectural pattern
212
- - New external dependency or significant data model changes
213
- - Security, performance, or migration complexity
214
- - Ambiguity that benefits from technical decisions before coding
215
-
216
- Minimal \`design.md\` skeleton:
217
- \`\`\`markdown
218
- ## Context
219
- [Background, constraints, stakeholders]
220
-
221
- ## Goals / Non-Goals
222
- - Goals: [...]
223
- - Non-Goals: [...]
224
-
225
- ## Decisions
226
- - Decision: [What and why]
227
- - Alternatives considered: [Options + rationale]
228
-
229
- ## Risks / Trade-offs
230
- - [Risk] → Mitigation
231
-
232
- ## Migration Plan
233
- [Steps, rollback]
234
-
235
- ## Open Questions
236
- - [...]
237
- \`\`\`
238
-
239
- ## Spec File Format
240
-
241
- ### Critical: Scenario Formatting
242
-
243
- **CORRECT** (use #### headers):
244
- \`\`\`markdown
245
- #### Scenario: User login success
246
- - **WHEN** valid credentials provided
247
- - **THEN** return JWT token
248
- \`\`\`
249
-
250
- **WRONG** (don't use bullets or bold):
251
- \`\`\`markdown
252
- - **Scenario: User login** ❌
253
- **Scenario**: User login ❌
254
- ### Scenario: User login ❌
255
- \`\`\`
256
-
257
- Every requirement MUST have at least one scenario.
258
-
259
- ### Requirement Wording
260
- - Use SHALL/MUST for normative requirements (avoid should/may unless intentionally non-normative)
261
-
262
- ### Delta Operations
263
-
264
- - \`## ADDED Requirements\` - New capabilities
265
- - \`## MODIFIED Requirements\` - Changed behavior
266
- - \`## REMOVED Requirements\` - Deprecated features
267
- - \`## RENAMED Requirements\` - Name changes
268
-
269
- Headers matched with \`trim(header)\` - whitespace ignored.
270
-
271
- #### When to use ADDED vs MODIFIED
272
- - 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.
273
- - 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.
274
- - RENAMED: Use when only the name changes. If you also change behavior, use RENAMED (name) plus MODIFIED (content) referencing the new name.
275
-
276
- 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.
277
-
278
- Authoring a MODIFIED requirement correctly:
279
- 1) Locate the existing requirement in \`prompter/specs/<capability>/spec.md\`.
280
- 2) Copy the entire requirement block (from \`### Requirement: ...\` through its scenarios).
281
- 3) Paste it under \`## MODIFIED Requirements\` and edit to reflect the new behavior.
282
- 4) Ensure the header text matches exactly (whitespace-insensitive) and keep at least one \`#### Scenario:\`.
283
-
284
- Example for RENAMED:
285
- \`\`\`markdown
286
- ## RENAMED Requirements
287
- - FROM: \`### Requirement: Login\`
288
- - TO: \`### Requirement: User Authentication\`
289
- \`\`\`
290
-
291
- ## Troubleshooting
292
-
293
- ### Common Errors
294
-
295
- **"Change must have at least one delta"**
296
- - Check \`changes/[name]/specs/\` exists with .md files
297
- - Verify files have operation prefixes (## ADDED Requirements)
298
-
299
- **"Requirement must have at least one scenario"**
300
- - Check scenarios use \`#### Scenario:\` format (4 hashtags)
301
- - Don't use bullet points or bold for scenario headers
302
-
303
- **Silent scenario parsing failures**
304
- - Exact format required: \`#### Scenario: Name\`
305
- - Debug with: \`prompter show [change] --json --deltas-only\`
306
-
307
- ### Validation Tips
308
-
309
- \`\`\`bash
310
- # Always use strict mode for comprehensive checks
311
- prompter validate [change] --strict --no-interactive
312
-
313
- # Debug delta parsing
314
- prompter show [change] --json | jq '.deltas'
315
-
316
- # Check specific requirement
317
- prompter show [spec] --json -r 1
318
- \`\`\`
319
-
320
- ## Happy Path Script
321
-
322
- \`\`\`bash
323
- # 1) Explore current state
324
- prompter spec list --long
325
- prompter list
326
- # Optional full-text search:
327
- # rg -n "Requirement:|Scenario:" prompter/specs
328
- # rg -n "^#|Requirement:" prompter/changes
329
-
330
- # 2) Choose change id and scaffold
331
- CHANGE=add-two-factor-auth
332
- mkdir -p prompter/changes/$CHANGE/{specs/auth}
333
- printf "## Why\\n...\\n\\n## What Changes\\n- ...\\n\\n## Impact\\n- ...\\n" > prompter/changes/$CHANGE/proposal.md
334
- printf "## 1. Implementation\\n- [ ] 1.1 ...\\n" > prompter/changes/$CHANGE/tasks.md
335
-
336
- # 3) Add deltas (example)
337
- cat > prompter/changes/$CHANGE/specs/auth/spec.md << 'EOF'
338
- ## ADDED Requirements
339
- ### Requirement: Two-Factor Authentication
340
- Users MUST provide a second factor during login.
341
-
342
- #### Scenario: OTP required
343
- - **WHEN** valid credentials are provided
344
- - **THEN** an OTP challenge is required
345
- EOF
346
-
347
- # 4) Validate
348
- prompter validate $CHANGE --strict --no-interactive
349
- \`\`\`
350
-
351
- ## Multi-Capability Example
352
-
353
- \`\`\`
354
- prompter/changes/add-2fa-notify/
355
- ├── proposal.md
356
- ├── tasks.md
357
- └── specs/
358
- ├── auth/
359
- │ └── spec.md # ADDED: Two-Factor Authentication
360
- └── notifications/
361
- └── spec.md # ADDED: OTP email notification
362
- \`\`\`
363
-
364
- auth/spec.md
365
- \`\`\`markdown
366
- ## ADDED Requirements
367
- ### Requirement: Two-Factor Authentication
368
- ...
369
- \`\`\`
370
-
371
- notifications/spec.md
372
- \`\`\`markdown
373
- ## ADDED Requirements
374
- ### Requirement: OTP Email Notification
375
- ...
376
- \`\`\`
377
-
378
- ## Best Practices
379
-
380
- ### Simplicity First
381
- - Default to <100 lines of new code
382
- - Single-file implementations until proven insufficient
383
- - Avoid frameworks without clear justification
384
- - Choose boring, proven patterns
385
-
386
- ### Complexity Triggers
387
- Only add complexity with:
388
- - Performance data showing current solution too slow
389
- - Concrete scale requirements (>1000 users, >100MB data)
390
- - Multiple proven use cases requiring abstraction
391
-
392
- ### Clear References
393
- - Use \`file.ts:42\` format for code locations
394
- - Reference specs as \`specs/auth/spec.md\`
395
- - Link related changes and PRs
396
-
397
- ### Capability Naming
398
- - Use verb-noun: \`user-auth\`, \`payment-capture\`
399
- - Single purpose per capability
400
- - 10-minute understandability rule
401
- - Split if description needs "AND"
402
-
403
- ### Change ID Naming
404
- - Use kebab-case, short and descriptive: \`add-two-factor-auth\`
405
- - Prefer verb-led prefixes: \`add-\`, \`update-\`, \`remove-\`, \`refactor-\`
406
- - Ensure uniqueness; if taken, append \`-2\`, \`-3\`, etc.
407
-
408
- ## Tool Selection Guide
409
-
410
- | Task | Tool | Why |
411
- |------|------|-----|
412
- | Find files by pattern | Glob | Fast pattern matching |
413
- | Search code content | Grep | Optimized regex search |
414
- | Read specific files | Read | Direct file access |
415
- | Explore unknown scope | Task | Multi-step investigation |
416
-
417
- ## Error Recovery
418
-
419
- ### Change Conflicts
420
- 1. Run \`prompter list\` to see active changes
421
- 2. Check for overlapping specs
422
- 3. Coordinate with change owners
423
- 4. Consider combining proposals
424
-
425
- ### Validation Failures
426
- 1. Run with \`--strict\` flag
427
- 2. Check JSON output for details
428
- 3. Verify spec file format
429
- 4. Ensure scenarios properly formatted
430
-
431
- ### Missing Context
432
- 1. Read project.md first
433
- 2. Check related specs
434
- 3. Review recent archives
435
- 4. Ask for clarification
436
-
437
- ## Quick Reference
438
-
439
- ### Stage Indicators
440
- - \`changes/\` - Proposed, not yet built
441
- - \`specs/\` - Built and deployed
442
- - \`archive/\` - Completed changes
443
-
444
- ### File Purposes
445
- - \`proposal.md\` - Why and what
446
- - \`tasks.md\` - Implementation steps
447
- - \`design.md\` - Technical decisions
448
- - \`spec.md\` - Requirements and behavior
449
-
450
- ### CLI Essentials
451
- \`\`\`bash
452
- prompter list # What's in progress?
453
- prompter show [item] # View details
454
- prompter validate --strict --no-interactive # Is it correct?
455
- prompter archive <change-id> [--yes|-y] # Mark complete (add --yes for automation)
456
- \`\`\`
457
-
458
- Remember: Specs are truth. Changes are proposals. Keep them in sync.
459
- `;
@@ -1,2 +0,0 @@
1
- // Claude Code uses CLAUDE.md - same content as AGENTS.md
2
- export { agentsTemplate as claudeTemplate } from './agents-template.js';
@@ -1,3 +0,0 @@
1
- export { projectTemplate } from './project-template.js';
2
- export { agentsTemplate } from './agents-template.js';
3
- export { claudeTemplate } from './claude-template.js';
@@ -1,32 +0,0 @@
1
- export const projectTemplate = `# Project Context
2
-
3
- ## Purpose
4
- [Describe your project's purpose and goals]
5
-
6
- ## Tech Stack
7
- - [List your primary technologies]
8
- - [e.g., TypeScript, React, Node.js]
9
-
10
- ## Project Conventions
11
-
12
- ### Code Style
13
- [Describe your code style preferences, formatting rules, and naming conventions]
14
-
15
- ### Architecture Patterns
16
- [Document your architectural decisions and patterns]
17
-
18
- ### Testing Strategy
19
- [Explain your testing approach and requirements]
20
-
21
- ### Git Workflow
22
- [Describe your branching strategy and commit conventions]
23
-
24
- ## Domain Context
25
- [Add domain-specific knowledge that AI assistants need to understand]
26
-
27
- ## Important Constraints
28
- [List any technical, business, or regulatory constraints]
29
-
30
- ## External Dependencies
31
- [Document key external services, APIs, or systems]
32
- `;
@@ -1,48 +0,0 @@
1
- /**
2
- * Validation threshold constants
3
- */
4
-
5
- // Minimum character lengths
6
- export const MIN_WHY_SECTION_LENGTH = 50;
7
- export const MIN_PURPOSE_LENGTH = 50;
8
-
9
- // Maximum character/item limits
10
- export const MAX_WHY_SECTION_LENGTH = 1000;
11
- export const MAX_REQUIREMENT_TEXT_LENGTH = 500;
12
- export const MAX_DELTAS_PER_CHANGE = 10;
13
-
14
- // Validation messages
15
- export const VALIDATION_MESSAGES = {
16
- // Required content
17
- SCENARIO_EMPTY: 'Scenario text cannot be empty',
18
- REQUIREMENT_EMPTY: 'Requirement text cannot be empty',
19
- REQUIREMENT_NO_SHALL: 'Requirement must contain SHALL or MUST keyword',
20
- REQUIREMENT_NO_SCENARIOS: 'Requirement must have at least one scenario',
21
- SPEC_NAME_EMPTY: 'Spec name cannot be empty',
22
- SPEC_PURPOSE_EMPTY: 'Purpose section cannot be empty',
23
- SPEC_NO_REQUIREMENTS: 'Spec must have at least one requirement',
24
- CHANGE_NAME_EMPTY: 'Change name cannot be empty',
25
- CHANGE_WHY_TOO_SHORT: `Why section must be at least ${MIN_WHY_SECTION_LENGTH} characters`,
26
- CHANGE_WHY_TOO_LONG: `Why section should not exceed ${MAX_WHY_SECTION_LENGTH} characters`,
27
- CHANGE_WHAT_EMPTY: 'What Changes section cannot be empty',
28
- CHANGE_NO_DELTAS: 'Change must have at least one delta',
29
- CHANGE_TOO_MANY_DELTAS: `Consider splitting changes with more than ${MAX_DELTAS_PER_CHANGE} deltas`,
30
- DELTA_SPEC_EMPTY: 'Spec name cannot be empty',
31
- DELTA_DESCRIPTION_EMPTY: 'Delta description cannot be empty',
32
-
33
- // Warnings
34
- PURPOSE_TOO_BRIEF: `Purpose section is too brief (less than ${MIN_PURPOSE_LENGTH} characters)`,
35
- REQUIREMENT_TOO_LONG: `Requirement text is very long (>${MAX_REQUIREMENT_TEXT_LENGTH} characters). Consider breaking it down.`,
36
- DELTA_DESCRIPTION_TOO_BRIEF: 'Delta description is too brief',
37
- DELTA_MISSING_REQUIREMENTS: 'Delta should include requirements',
38
-
39
- // Guidance snippets (appended to primary messages for remediation)
40
- GUIDE_NO_DELTAS:
41
- '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.',
42
- GUIDE_MISSING_SPEC_SECTIONS:
43
- '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** ...',
44
- GUIDE_MISSING_CHANGE_SECTIONS:
45
- 'Missing required sections. Expected headers: "## Why" and "## What Changes". Ensure deltas are documented in specs/ using delta headers.',
46
- GUIDE_SCENARIO_FORMAT:
47
- 'Scenarios must use level-4 headers. Convert bullet lists into:\n#### Scenario: Short name\n- **WHEN** ...\n- **THEN** ...\n- **AND** ...',
48
- } as const;
@@ -1,19 +0,0 @@
1
- export type ValidationLevel = 'ERROR' | 'WARNING' | 'INFO';
2
-
3
- export interface ValidationIssue {
4
- level: ValidationLevel;
5
- path: string;
6
- message: string;
7
- line?: number;
8
- column?: number;
9
- }
10
-
11
- export interface ValidationReport {
12
- valid: boolean;
13
- issues: ValidationIssue[];
14
- summary: {
15
- errors: number;
16
- warnings: number;
17
- info: number;
18
- };
19
- }