quantix-mcp 0.3.7 → 0.3.9

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 (105) hide show
  1. package/.github/agents/copilot-instructions.md +32 -32
  2. package/.github/copilot-instructions.md +17 -17
  3. package/.github/workflows/publish.yaml +28 -28
  4. package/.opencode/command/speckit.analyze.md +184 -184
  5. package/.opencode/command/speckit.checklist.md +294 -294
  6. package/.opencode/command/speckit.clarify.md +181 -181
  7. package/.opencode/command/speckit.constitution.md +84 -84
  8. package/.opencode/command/speckit.implement.md +135 -135
  9. package/.opencode/command/speckit.plan.md +89 -89
  10. package/.opencode/command/speckit.specify.md +258 -258
  11. package/.opencode/command/speckit.tasks.md +137 -137
  12. package/.opencode/command/speckit.taskstoissues.md +30 -30
  13. package/.specify/memory/constitution.md +58 -58
  14. package/.specify/templates/constitution-template.md +50 -50
  15. package/.vscode/launch.json +14 -14
  16. package/CLAUDE.md +64 -64
  17. package/README.md +176 -176
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +6 -5
  20. package/dist/index.js.map +1 -1
  21. package/dist/tools/accounts.d.ts.map +1 -1
  22. package/dist/tools/accounts.js +64 -28
  23. package/dist/tools/accounts.js.map +1 -1
  24. package/dist/tools/categories.d.ts.map +1 -1
  25. package/dist/tools/categories.js +46 -20
  26. package/dist/tools/categories.js.map +1 -1
  27. package/dist/tools/credit-cards.d.ts.map +1 -1
  28. package/dist/tools/credit-cards.js +89 -33
  29. package/dist/tools/credit-cards.js.map +1 -1
  30. package/dist/tools/data.d.ts.map +1 -1
  31. package/dist/tools/data.js +19 -8
  32. package/dist/tools/data.js.map +1 -1
  33. package/dist/tools/settings.d.ts.map +1 -1
  34. package/dist/tools/settings.js +28 -12
  35. package/dist/tools/settings.js.map +1 -1
  36. package/dist/tools/summary.d.ts.map +1 -1
  37. package/dist/tools/summary.js +17 -11
  38. package/dist/tools/summary.js.map +1 -1
  39. package/dist/tools/transactions.d.ts.map +1 -1
  40. package/dist/tools/transactions.js +86 -50
  41. package/dist/tools/transactions.js.map +1 -1
  42. package/dist/tools/transfers.d.ts +3 -0
  43. package/dist/tools/transfers.d.ts.map +1 -0
  44. package/dist/tools/transfers.js +107 -0
  45. package/dist/tools/transfers.js.map +1 -0
  46. package/dist/types/schemas.d.ts +25 -0
  47. package/dist/types/schemas.d.ts.map +1 -1
  48. package/dist/types/schemas.js +28 -2
  49. package/dist/types/schemas.js.map +1 -1
  50. package/dist/utils/toolHelpers.d.ts +7 -0
  51. package/dist/utils/toolHelpers.d.ts.map +1 -0
  52. package/dist/utils/toolHelpers.js +11 -0
  53. package/dist/utils/toolHelpers.js.map +1 -0
  54. package/openapi.yaml +2045 -1828
  55. package/package.json +41 -41
  56. package/specs/001-mcp-api-integration/checklists/requirements.md +34 -34
  57. package/specs/001-mcp-api-integration/contracts/openapi.yaml +635 -635
  58. package/specs/001-mcp-api-integration/data-model.md +106 -106
  59. package/specs/001-mcp-api-integration/plan.md +73 -73
  60. package/specs/001-mcp-api-integration/quickstart.md +74 -74
  61. package/specs/001-mcp-api-integration/research.md +58 -58
  62. package/specs/001-mcp-api-integration/spec.md +119 -119
  63. package/specs/001-mcp-api-integration/tasks.md +64 -64
  64. package/src/config.ts +36 -36
  65. package/src/index.ts +49 -47
  66. package/src/services/apiClient.ts +49 -49
  67. package/src/tools/accounts.ts +140 -111
  68. package/src/tools/categories.ts +102 -81
  69. package/src/tools/credit-cards.ts +184 -147
  70. package/src/tools/data.ts +45 -36
  71. package/src/tools/settings.ts +64 -51
  72. package/src/tools/summary.ts +29 -24
  73. package/src/tools/transactions.ts +157 -128
  74. package/src/tools/transfers.ts +122 -0
  75. package/src/types/schemas.ts +260 -235
  76. package/src/utils/toolHelpers.ts +11 -0
  77. package/tests/benchmark.test.d.ts +1 -1
  78. package/tests/benchmark.test.js +32 -32
  79. package/tests/benchmark.test.ts +38 -38
  80. package/tests/server.test.d.ts +1 -1
  81. package/tests/server.test.js +12 -12
  82. package/tests/server.test.ts +14 -14
  83. package/tests/setup.d.ts +3 -3
  84. package/tests/setup.js +16 -16
  85. package/tests/setup.ts +20 -20
  86. package/tests/tools/accounts.test.ts +159 -118
  87. package/tests/tools/categories.test.d.ts +1 -1
  88. package/tests/tools/categories.test.js +62 -62
  89. package/tests/tools/categories.test.ts +120 -78
  90. package/tests/tools/credit-cards.test.d.ts +1 -1
  91. package/tests/tools/credit-cards.test.js +70 -70
  92. package/tests/tools/credit-cards.test.ts +131 -89
  93. package/tests/tools/data.test.ts +100 -0
  94. package/tests/tools/settings.test.ts +116 -0
  95. package/tests/tools/summary.test.d.ts +1 -1
  96. package/tests/tools/summary.test.js +35 -35
  97. package/tests/tools/summary.test.ts +63 -42
  98. package/tests/tools/transactions.test.d.ts +1 -1
  99. package/tests/tools/transactions.test.js +66 -66
  100. package/tests/tools/transactions.test.ts +133 -82
  101. package/tests/tools/transfers.test.ts +141 -0
  102. package/tsconfig.json +52 -52
  103. package/vitest.config.d.ts +2 -2
  104. package/vitest.config.js +13 -13
  105. package/vitest.config.ts +14 -14
@@ -1,258 +1,258 @@
1
- ---
2
- description: Create or update the feature specification from a natural language feature description.
3
- handoffs:
4
- - label: Build Technical Plan
5
- agent: speckit.plan
6
- prompt: Create a plan for the spec. I am building with...
7
- - label: Clarify Spec Requirements
8
- agent: speckit.clarify
9
- prompt: Clarify specification requirements
10
- send: true
11
- ---
12
-
13
- ## User Input
14
-
15
- ```text
16
- $ARGUMENTS
17
- ```
18
-
19
- You **MUST** consider the user input before proceeding (if not empty).
20
-
21
- ## Outline
22
-
23
- The text the user typed after `/speckit.specify` in the triggering message **is** the feature description. Assume you always have it available in this conversation even if `$ARGUMENTS` appears literally below. Do not ask the user to repeat it unless they provided an empty command.
24
-
25
- Given that feature description, do this:
26
-
27
- 1. **Generate a concise short name** (2-4 words) for the branch:
28
- - Analyze the feature description and extract the most meaningful keywords
29
- - Create a 2-4 word short name that captures the essence of the feature
30
- - Use action-noun format when possible (e.g., "add-user-auth", "fix-payment-bug")
31
- - Preserve technical terms and acronyms (OAuth2, API, JWT, etc.)
32
- - Keep it concise but descriptive enough to understand the feature at a glance
33
- - Examples:
34
- - "I want to add user authentication" → "user-auth"
35
- - "Implement OAuth2 integration for the API" → "oauth2-api-integration"
36
- - "Create a dashboard for analytics" → "analytics-dashboard"
37
- - "Fix payment processing timeout bug" → "fix-payment-timeout"
38
-
39
- 2. **Check for existing branches before creating new one**:
40
-
41
- a. First, fetch all remote branches to ensure we have the latest information:
42
-
43
- ```bash
44
- git fetch --all --prune
45
- ```
46
-
47
- b. Find the highest feature number across all sources for the short-name:
48
- - Remote branches: `git ls-remote --heads origin | grep -E 'refs/heads/[0-9]+-<short-name>$'`
49
- - Local branches: `git branch | grep -E '^[* ]*[0-9]+-<short-name>$'`
50
- - Specs directories: Check for directories matching `specs/[0-9]+-<short-name>`
51
-
52
- c. Determine the next available number:
53
- - Extract all numbers from all three sources
54
- - Find the highest number N
55
- - Use N+1 for the new branch number
56
-
57
- d. Run the script `.specify/scripts/powershell/create-new-feature.ps1 -Json "$ARGUMENTS"` with the calculated number and short-name:
58
- - Pass `--number N+1` and `--short-name "your-short-name"` along with the feature description
59
- - Bash example: `.specify/scripts/powershell/create-new-feature.ps1 -Json "$ARGUMENTS" --json --number 5 --short-name "user-auth" "Add user authentication"`
60
- - PowerShell example: `.specify/scripts/powershell/create-new-feature.ps1 -Json "$ARGUMENTS" -Json -Number 5 -ShortName "user-auth" "Add user authentication"`
61
-
62
- **IMPORTANT**:
63
- - Check all three sources (remote branches, local branches, specs directories) to find the highest number
64
- - Only match branches/directories with the exact short-name pattern
65
- - If no existing branches/directories found with this short-name, start with number 1
66
- - You must only ever run this script once per feature
67
- - The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for
68
- - The JSON output will contain BRANCH_NAME and SPEC_FILE paths
69
- - For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot")
70
-
71
- 3. Load `.specify/templates/spec-template.md` to understand required sections.
72
-
73
- 4. Follow this execution flow:
74
-
75
- 1. Parse user description from Input
76
- If empty: ERROR "No feature description provided"
77
- 2. Extract key concepts from description
78
- Identify: actors, actions, data, constraints
79
- 3. For unclear aspects:
80
- - Make informed guesses based on context and industry standards
81
- - Only mark with [NEEDS CLARIFICATION: specific question] if:
82
- - The choice significantly impacts feature scope or user experience
83
- - Multiple reasonable interpretations exist with different implications
84
- - No reasonable default exists
85
- - **LIMIT: Maximum 3 [NEEDS CLARIFICATION] markers total**
86
- - Prioritize clarifications by impact: scope > security/privacy > user experience > technical details
87
- 4. Fill User Scenarios & Testing section
88
- If no clear user flow: ERROR "Cannot determine user scenarios"
89
- 5. Generate Functional Requirements
90
- Each requirement must be testable
91
- Use reasonable defaults for unspecified details (document assumptions in Assumptions section)
92
- 6. Define Success Criteria
93
- Create measurable, technology-agnostic outcomes
94
- Include both quantitative metrics (time, performance, volume) and qualitative measures (user satisfaction, task completion)
95
- Each criterion must be verifiable without implementation details
96
- 7. Identify Key Entities (if data involved)
97
- 8. Return: SUCCESS (spec ready for planning)
98
-
99
- 5. Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.
100
-
101
- 6. **Specification Quality Validation**: After writing the initial spec, validate it against quality criteria:
102
-
103
- a. **Create Spec Quality Checklist**: Generate a checklist file at `FEATURE_DIR/checklists/requirements.md` using the checklist template structure with these validation items:
104
-
105
- ```markdown
106
- # Specification Quality Checklist: [FEATURE NAME]
107
-
108
- **Purpose**: Validate specification completeness and quality before proceeding to planning
109
- **Created**: [DATE]
110
- **Feature**: [Link to spec.md]
111
-
112
- ## Content Quality
113
-
114
- - [ ] No implementation details (languages, frameworks, APIs)
115
- - [ ] Focused on user value and business needs
116
- - [ ] Written for non-technical stakeholders
117
- - [ ] All mandatory sections completed
118
-
119
- ## Requirement Completeness
120
-
121
- - [ ] No [NEEDS CLARIFICATION] markers remain
122
- - [ ] Requirements are testable and unambiguous
123
- - [ ] Success criteria are measurable
124
- - [ ] Success criteria are technology-agnostic (no implementation details)
125
- - [ ] All acceptance scenarios are defined
126
- - [ ] Edge cases are identified
127
- - [ ] Scope is clearly bounded
128
- - [ ] Dependencies and assumptions identified
129
-
130
- ## Feature Readiness
131
-
132
- - [ ] All functional requirements have clear acceptance criteria
133
- - [ ] User scenarios cover primary flows
134
- - [ ] Feature meets measurable outcomes defined in Success Criteria
135
- - [ ] No implementation details leak into specification
136
-
137
- ## Notes
138
-
139
- - Items marked incomplete require spec updates before `/speckit.clarify` or `/speckit.plan`
140
- ```
141
-
142
- b. **Run Validation Check**: Review the spec against each checklist item:
143
- - For each item, determine if it passes or fails
144
- - Document specific issues found (quote relevant spec sections)
145
-
146
- c. **Handle Validation Results**:
147
-
148
- - **If all items pass**: Mark checklist complete and proceed to step 6
149
-
150
- - **If items fail (excluding [NEEDS CLARIFICATION])**:
151
- 1. List the failing items and specific issues
152
- 2. Update the spec to address each issue
153
- 3. Re-run validation until all items pass (max 3 iterations)
154
- 4. If still failing after 3 iterations, document remaining issues in checklist notes and warn user
155
-
156
- - **If [NEEDS CLARIFICATION] markers remain**:
157
- 1. Extract all [NEEDS CLARIFICATION: ...] markers from the spec
158
- 2. **LIMIT CHECK**: If more than 3 markers exist, keep only the 3 most critical (by scope/security/UX impact) and make informed guesses for the rest
159
- 3. For each clarification needed (max 3), present options to user in this format:
160
-
161
- ```markdown
162
- ## Question [N]: [Topic]
163
-
164
- **Context**: [Quote relevant spec section]
165
-
166
- **What we need to know**: [Specific question from NEEDS CLARIFICATION marker]
167
-
168
- **Suggested Answers**:
169
-
170
- | Option | Answer | Implications |
171
- |--------|--------|--------------|
172
- | A | [First suggested answer] | [What this means for the feature] |
173
- | B | [Second suggested answer] | [What this means for the feature] |
174
- | C | [Third suggested answer] | [What this means for the feature] |
175
- | Custom | Provide your own answer | [Explain how to provide custom input] |
176
-
177
- **Your choice**: _[Wait for user response]_
178
- ```
179
-
180
- 4. **CRITICAL - Table Formatting**: Ensure markdown tables are properly formatted:
181
- - Use consistent spacing with pipes aligned
182
- - Each cell should have spaces around content: `| Content |` not `|Content|`
183
- - Header separator must have at least 3 dashes: `|--------|`
184
- - Test that the table renders correctly in markdown preview
185
- 5. Number questions sequentially (Q1, Q2, Q3 - max 3 total)
186
- 6. Present all questions together before waiting for responses
187
- 7. Wait for user to respond with their choices for all questions (e.g., "Q1: A, Q2: Custom - [details], Q3: B")
188
- 8. Update the spec by replacing each [NEEDS CLARIFICATION] marker with the user's selected or provided answer
189
- 9. Re-run validation after all clarifications are resolved
190
-
191
- d. **Update Checklist**: After each validation iteration, update the checklist file with current pass/fail status
192
-
193
- 7. Report completion with branch name, spec file path, checklist results, and readiness for the next phase (`/speckit.clarify` or `/speckit.plan`).
194
-
195
- **NOTE:** The script creates and checks out the new branch and initializes the spec file before writing.
196
-
197
- ## General Guidelines
198
-
199
- ## Quick Guidelines
200
-
201
- - Focus on **WHAT** users need and **WHY**.
202
- - Avoid HOW to implement (no tech stack, APIs, code structure).
203
- - Written for business stakeholders, not developers.
204
- - DO NOT create any checklists that are embedded in the spec. That will be a separate command.
205
-
206
- ### Section Requirements
207
-
208
- - **Mandatory sections**: Must be completed for every feature
209
- - **Optional sections**: Include only when relevant to the feature
210
- - When a section doesn't apply, remove it entirely (don't leave as "N/A")
211
-
212
- ### For AI Generation
213
-
214
- When creating this spec from a user prompt:
215
-
216
- 1. **Make informed guesses**: Use context, industry standards, and common patterns to fill gaps
217
- 2. **Document assumptions**: Record reasonable defaults in the Assumptions section
218
- 3. **Limit clarifications**: Maximum 3 [NEEDS CLARIFICATION] markers - use only for critical decisions that:
219
- - Significantly impact feature scope or user experience
220
- - Have multiple reasonable interpretations with different implications
221
- - Lack any reasonable default
222
- 4. **Prioritize clarifications**: scope > security/privacy > user experience > technical details
223
- 5. **Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item
224
- 6. **Common areas needing clarification** (only if no reasonable default exists):
225
- - Feature scope and boundaries (include/exclude specific use cases)
226
- - User types and permissions (if multiple conflicting interpretations possible)
227
- - Security/compliance requirements (when legally/financially significant)
228
-
229
- **Examples of reasonable defaults** (don't ask about these):
230
-
231
- - Data retention: Industry-standard practices for the domain
232
- - Performance targets: Standard web/mobile app expectations unless specified
233
- - Error handling: User-friendly messages with appropriate fallbacks
234
- - Authentication method: Standard session-based or OAuth2 for web apps
235
- - Integration patterns: RESTful APIs unless specified otherwise
236
-
237
- ### Success Criteria Guidelines
238
-
239
- Success criteria must be:
240
-
241
- 1. **Measurable**: Include specific metrics (time, percentage, count, rate)
242
- 2. **Technology-agnostic**: No mention of frameworks, languages, databases, or tools
243
- 3. **User-focused**: Describe outcomes from user/business perspective, not system internals
244
- 4. **Verifiable**: Can be tested/validated without knowing implementation details
245
-
246
- **Good examples**:
247
-
248
- - "Users can complete checkout in under 3 minutes"
249
- - "System supports 10,000 concurrent users"
250
- - "95% of searches return results in under 1 second"
251
- - "Task completion rate improves by 40%"
252
-
253
- **Bad examples** (implementation-focused):
254
-
255
- - "API response time is under 200ms" (too technical, use "Users see results instantly")
256
- - "Database can handle 1000 TPS" (implementation detail, use user-facing metric)
257
- - "React components render efficiently" (framework-specific)
258
- - "Redis cache hit rate above 80%" (technology-specific)
1
+ ---
2
+ description: Create or update the feature specification from a natural language feature description.
3
+ handoffs:
4
+ - label: Build Technical Plan
5
+ agent: speckit.plan
6
+ prompt: Create a plan for the spec. I am building with...
7
+ - label: Clarify Spec Requirements
8
+ agent: speckit.clarify
9
+ prompt: Clarify specification requirements
10
+ send: true
11
+ ---
12
+
13
+ ## User Input
14
+
15
+ ```text
16
+ $ARGUMENTS
17
+ ```
18
+
19
+ You **MUST** consider the user input before proceeding (if not empty).
20
+
21
+ ## Outline
22
+
23
+ The text the user typed after `/speckit.specify` in the triggering message **is** the feature description. Assume you always have it available in this conversation even if `$ARGUMENTS` appears literally below. Do not ask the user to repeat it unless they provided an empty command.
24
+
25
+ Given that feature description, do this:
26
+
27
+ 1. **Generate a concise short name** (2-4 words) for the branch:
28
+ - Analyze the feature description and extract the most meaningful keywords
29
+ - Create a 2-4 word short name that captures the essence of the feature
30
+ - Use action-noun format when possible (e.g., "add-user-auth", "fix-payment-bug")
31
+ - Preserve technical terms and acronyms (OAuth2, API, JWT, etc.)
32
+ - Keep it concise but descriptive enough to understand the feature at a glance
33
+ - Examples:
34
+ - "I want to add user authentication" → "user-auth"
35
+ - "Implement OAuth2 integration for the API" → "oauth2-api-integration"
36
+ - "Create a dashboard for analytics" → "analytics-dashboard"
37
+ - "Fix payment processing timeout bug" → "fix-payment-timeout"
38
+
39
+ 2. **Check for existing branches before creating new one**:
40
+
41
+ a. First, fetch all remote branches to ensure we have the latest information:
42
+
43
+ ```bash
44
+ git fetch --all --prune
45
+ ```
46
+
47
+ b. Find the highest feature number across all sources for the short-name:
48
+ - Remote branches: `git ls-remote --heads origin | grep -E 'refs/heads/[0-9]+-<short-name>$'`
49
+ - Local branches: `git branch | grep -E '^[* ]*[0-9]+-<short-name>$'`
50
+ - Specs directories: Check for directories matching `specs/[0-9]+-<short-name>`
51
+
52
+ c. Determine the next available number:
53
+ - Extract all numbers from all three sources
54
+ - Find the highest number N
55
+ - Use N+1 for the new branch number
56
+
57
+ d. Run the script `.specify/scripts/powershell/create-new-feature.ps1 -Json "$ARGUMENTS"` with the calculated number and short-name:
58
+ - Pass `--number N+1` and `--short-name "your-short-name"` along with the feature description
59
+ - Bash example: `.specify/scripts/powershell/create-new-feature.ps1 -Json "$ARGUMENTS" --json --number 5 --short-name "user-auth" "Add user authentication"`
60
+ - PowerShell example: `.specify/scripts/powershell/create-new-feature.ps1 -Json "$ARGUMENTS" -Json -Number 5 -ShortName "user-auth" "Add user authentication"`
61
+
62
+ **IMPORTANT**:
63
+ - Check all three sources (remote branches, local branches, specs directories) to find the highest number
64
+ - Only match branches/directories with the exact short-name pattern
65
+ - If no existing branches/directories found with this short-name, start with number 1
66
+ - You must only ever run this script once per feature
67
+ - The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for
68
+ - The JSON output will contain BRANCH_NAME and SPEC_FILE paths
69
+ - For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot")
70
+
71
+ 3. Load `.specify/templates/spec-template.md` to understand required sections.
72
+
73
+ 4. Follow this execution flow:
74
+
75
+ 1. Parse user description from Input
76
+ If empty: ERROR "No feature description provided"
77
+ 2. Extract key concepts from description
78
+ Identify: actors, actions, data, constraints
79
+ 3. For unclear aspects:
80
+ - Make informed guesses based on context and industry standards
81
+ - Only mark with [NEEDS CLARIFICATION: specific question] if:
82
+ - The choice significantly impacts feature scope or user experience
83
+ - Multiple reasonable interpretations exist with different implications
84
+ - No reasonable default exists
85
+ - **LIMIT: Maximum 3 [NEEDS CLARIFICATION] markers total**
86
+ - Prioritize clarifications by impact: scope > security/privacy > user experience > technical details
87
+ 4. Fill User Scenarios & Testing section
88
+ If no clear user flow: ERROR "Cannot determine user scenarios"
89
+ 5. Generate Functional Requirements
90
+ Each requirement must be testable
91
+ Use reasonable defaults for unspecified details (document assumptions in Assumptions section)
92
+ 6. Define Success Criteria
93
+ Create measurable, technology-agnostic outcomes
94
+ Include both quantitative metrics (time, performance, volume) and qualitative measures (user satisfaction, task completion)
95
+ Each criterion must be verifiable without implementation details
96
+ 7. Identify Key Entities (if data involved)
97
+ 8. Return: SUCCESS (spec ready for planning)
98
+
99
+ 5. Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.
100
+
101
+ 6. **Specification Quality Validation**: After writing the initial spec, validate it against quality criteria:
102
+
103
+ a. **Create Spec Quality Checklist**: Generate a checklist file at `FEATURE_DIR/checklists/requirements.md` using the checklist template structure with these validation items:
104
+
105
+ ```markdown
106
+ # Specification Quality Checklist: [FEATURE NAME]
107
+
108
+ **Purpose**: Validate specification completeness and quality before proceeding to planning
109
+ **Created**: [DATE]
110
+ **Feature**: [Link to spec.md]
111
+
112
+ ## Content Quality
113
+
114
+ - [ ] No implementation details (languages, frameworks, APIs)
115
+ - [ ] Focused on user value and business needs
116
+ - [ ] Written for non-technical stakeholders
117
+ - [ ] All mandatory sections completed
118
+
119
+ ## Requirement Completeness
120
+
121
+ - [ ] No [NEEDS CLARIFICATION] markers remain
122
+ - [ ] Requirements are testable and unambiguous
123
+ - [ ] Success criteria are measurable
124
+ - [ ] Success criteria are technology-agnostic (no implementation details)
125
+ - [ ] All acceptance scenarios are defined
126
+ - [ ] Edge cases are identified
127
+ - [ ] Scope is clearly bounded
128
+ - [ ] Dependencies and assumptions identified
129
+
130
+ ## Feature Readiness
131
+
132
+ - [ ] All functional requirements have clear acceptance criteria
133
+ - [ ] User scenarios cover primary flows
134
+ - [ ] Feature meets measurable outcomes defined in Success Criteria
135
+ - [ ] No implementation details leak into specification
136
+
137
+ ## Notes
138
+
139
+ - Items marked incomplete require spec updates before `/speckit.clarify` or `/speckit.plan`
140
+ ```
141
+
142
+ b. **Run Validation Check**: Review the spec against each checklist item:
143
+ - For each item, determine if it passes or fails
144
+ - Document specific issues found (quote relevant spec sections)
145
+
146
+ c. **Handle Validation Results**:
147
+
148
+ - **If all items pass**: Mark checklist complete and proceed to step 6
149
+
150
+ - **If items fail (excluding [NEEDS CLARIFICATION])**:
151
+ 1. List the failing items and specific issues
152
+ 2. Update the spec to address each issue
153
+ 3. Re-run validation until all items pass (max 3 iterations)
154
+ 4. If still failing after 3 iterations, document remaining issues in checklist notes and warn user
155
+
156
+ - **If [NEEDS CLARIFICATION] markers remain**:
157
+ 1. Extract all [NEEDS CLARIFICATION: ...] markers from the spec
158
+ 2. **LIMIT CHECK**: If more than 3 markers exist, keep only the 3 most critical (by scope/security/UX impact) and make informed guesses for the rest
159
+ 3. For each clarification needed (max 3), present options to user in this format:
160
+
161
+ ```markdown
162
+ ## Question [N]: [Topic]
163
+
164
+ **Context**: [Quote relevant spec section]
165
+
166
+ **What we need to know**: [Specific question from NEEDS CLARIFICATION marker]
167
+
168
+ **Suggested Answers**:
169
+
170
+ | Option | Answer | Implications |
171
+ |--------|--------|--------------|
172
+ | A | [First suggested answer] | [What this means for the feature] |
173
+ | B | [Second suggested answer] | [What this means for the feature] |
174
+ | C | [Third suggested answer] | [What this means for the feature] |
175
+ | Custom | Provide your own answer | [Explain how to provide custom input] |
176
+
177
+ **Your choice**: _[Wait for user response]_
178
+ ```
179
+
180
+ 4. **CRITICAL - Table Formatting**: Ensure markdown tables are properly formatted:
181
+ - Use consistent spacing with pipes aligned
182
+ - Each cell should have spaces around content: `| Content |` not `|Content|`
183
+ - Header separator must have at least 3 dashes: `|--------|`
184
+ - Test that the table renders correctly in markdown preview
185
+ 5. Number questions sequentially (Q1, Q2, Q3 - max 3 total)
186
+ 6. Present all questions together before waiting for responses
187
+ 7. Wait for user to respond with their choices for all questions (e.g., "Q1: A, Q2: Custom - [details], Q3: B")
188
+ 8. Update the spec by replacing each [NEEDS CLARIFICATION] marker with the user's selected or provided answer
189
+ 9. Re-run validation after all clarifications are resolved
190
+
191
+ d. **Update Checklist**: After each validation iteration, update the checklist file with current pass/fail status
192
+
193
+ 7. Report completion with branch name, spec file path, checklist results, and readiness for the next phase (`/speckit.clarify` or `/speckit.plan`).
194
+
195
+ **NOTE:** The script creates and checks out the new branch and initializes the spec file before writing.
196
+
197
+ ## General Guidelines
198
+
199
+ ## Quick Guidelines
200
+
201
+ - Focus on **WHAT** users need and **WHY**.
202
+ - Avoid HOW to implement (no tech stack, APIs, code structure).
203
+ - Written for business stakeholders, not developers.
204
+ - DO NOT create any checklists that are embedded in the spec. That will be a separate command.
205
+
206
+ ### Section Requirements
207
+
208
+ - **Mandatory sections**: Must be completed for every feature
209
+ - **Optional sections**: Include only when relevant to the feature
210
+ - When a section doesn't apply, remove it entirely (don't leave as "N/A")
211
+
212
+ ### For AI Generation
213
+
214
+ When creating this spec from a user prompt:
215
+
216
+ 1. **Make informed guesses**: Use context, industry standards, and common patterns to fill gaps
217
+ 2. **Document assumptions**: Record reasonable defaults in the Assumptions section
218
+ 3. **Limit clarifications**: Maximum 3 [NEEDS CLARIFICATION] markers - use only for critical decisions that:
219
+ - Significantly impact feature scope or user experience
220
+ - Have multiple reasonable interpretations with different implications
221
+ - Lack any reasonable default
222
+ 4. **Prioritize clarifications**: scope > security/privacy > user experience > technical details
223
+ 5. **Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item
224
+ 6. **Common areas needing clarification** (only if no reasonable default exists):
225
+ - Feature scope and boundaries (include/exclude specific use cases)
226
+ - User types and permissions (if multiple conflicting interpretations possible)
227
+ - Security/compliance requirements (when legally/financially significant)
228
+
229
+ **Examples of reasonable defaults** (don't ask about these):
230
+
231
+ - Data retention: Industry-standard practices for the domain
232
+ - Performance targets: Standard web/mobile app expectations unless specified
233
+ - Error handling: User-friendly messages with appropriate fallbacks
234
+ - Authentication method: Standard session-based or OAuth2 for web apps
235
+ - Integration patterns: RESTful APIs unless specified otherwise
236
+
237
+ ### Success Criteria Guidelines
238
+
239
+ Success criteria must be:
240
+
241
+ 1. **Measurable**: Include specific metrics (time, percentage, count, rate)
242
+ 2. **Technology-agnostic**: No mention of frameworks, languages, databases, or tools
243
+ 3. **User-focused**: Describe outcomes from user/business perspective, not system internals
244
+ 4. **Verifiable**: Can be tested/validated without knowing implementation details
245
+
246
+ **Good examples**:
247
+
248
+ - "Users can complete checkout in under 3 minutes"
249
+ - "System supports 10,000 concurrent users"
250
+ - "95% of searches return results in under 1 second"
251
+ - "Task completion rate improves by 40%"
252
+
253
+ **Bad examples** (implementation-focused):
254
+
255
+ - "API response time is under 200ms" (too technical, use "Users see results instantly")
256
+ - "Database can handle 1000 TPS" (implementation detail, use user-facing metric)
257
+ - "React components render efficiently" (framework-specific)
258
+ - "Redis cache hit rate above 80%" (technology-specific)