You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The user input to you can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding with the prompt (if not empty).
@@ -11,36 +14,72 @@ User input:
11
14
12
15
$ARGUMENTS
13
16
14
-
Given the implementation details provided as an argument, do this:
15
-
16
-
1. Run `{SCRIPT}` from the repo root and parse JSON for FEATURE_SPEC, IMPL_PLAN, SPECS_DIR, BRANCH. All future file paths must be absolute.
17
-
- BEFORE proceeding, inspect FEATURE_SPEC for a `## Clarifications` section with at least one `Session` subheading. If missing or clearly ambiguous areas remain (vague adjectives, unresolved critical choices), PAUSE and instruct the user to run `/clarify` first to reduce rework. Only continue if: (a) Clarifications exist OR (b) an explicit user override is provided (e.g., "proceed without clarification"). Do not attempt to fabricate clarifications yourself.
18
-
2. Read and analyze the feature specification to understand:
19
-
- The feature requirements and user stories
20
-
- Functional and non-functional requirements
21
-
- Success criteria and acceptance criteria
22
-
- Any technical constraints or dependencies mentioned
23
-
24
-
3. Read the constitution at `/memory/constitution.md` to understand constitutional requirements.
25
-
26
-
4. Execute the implementation plan template:
27
-
- Load `/templates/plan-template.md` (already copied to IMPL_PLAN path)
28
-
- Set Input path to FEATURE_SPEC
29
-
- Run the Execution Flow (main) function steps 1-9
30
-
- The template is self-contained and executable
31
-
- Follow error handling and gate checks as specified
32
-
- Let the template guide artifact generation in $SPECS_DIR:
Copy file name to clipboardExpand all lines: templates/commands/specify.md
+52-3Lines changed: 52 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,56 @@ Given that feature description, do this:
18
18
1. Run the script `{SCRIPT}` from repo root and parse its JSON output for BRANCH_NAME and SPEC_FILE. All file paths must be absolute.
19
19
**IMPORTANT** You must only ever run this script once. The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for.
20
20
2. Load `templates/spec-template.md` to understand required sections.
21
-
3. 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.
22
-
4. Report completion with branch name, spec file path, and readiness for the next phase.
23
21
24
-
Note: The script creates and checks out the new branch and initializes the spec file before writing.
22
+
3. Follow this execution flow:
23
+
24
+
1. Parse user description from Input
25
+
If empty: ERROR "No feature description provided"
26
+
2. Extract key concepts from description
27
+
Identify: actors, actions, data, constraints
28
+
3. For each unclear aspect:
29
+
Mark with [NEEDS CLARIFICATION: specific question]
30
+
4. Fill User Scenarios & Testing section
31
+
If no clear user flow: ERROR "Cannot determine user scenarios"
32
+
5. Generate Functional Requirements
33
+
Each requirement must be testable
34
+
Mark ambiguous requirements
35
+
6. Identify Key Entities (if data involved)
36
+
7. Run Review Checklist
37
+
If any [NEEDS CLARIFICATION]: WARN "Spec has uncertainties"
38
+
If implementation details found: ERROR "Remove tech details"
39
+
8. Return: SUCCESS (spec ready for planning)
40
+
41
+
4. 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.
42
+
5. Report completion with branch name, spec file path, and readiness for the next phase.
43
+
44
+
**NOTE:** The script creates and checks out the new branch and initializes the spec file before writing.
45
+
46
+
## General Guidelines
47
+
48
+
## Quick Guidelines
49
+
50
+
- Focus on WHAT users need and WHY
51
+
- Avoid HOW to implement (no tech stack, APIs, code structure)
52
+
- Written for business stakeholders, not developers
53
+
54
+
### Section Requirements
55
+
56
+
-**Mandatory sections**: Must be completed for every feature
57
+
-**Optional sections**: Include only when relevant to the feature
58
+
- When a section doesn't apply, remove it entirely (don't leave as "N/A")
59
+
60
+
### For AI Generation
61
+
62
+
When creating this spec from a user prompt:
63
+
64
+
1.**Mark all ambiguities**: Use [NEEDS CLARIFICATION: specific question] for any assumption you'd need to make
65
+
2.**Don't guess**: If the prompt doesn't specify something (e.g., "login system" without auth method), mark it
66
+
3.**Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item
0 commit comments