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
Use the **`/constitution`** command to create your project's governing principles and development guidelines that will guide all subsequent development.
50
+
51
+
```bash
52
+
/constitution Create principles focused on code quality, testing standards, user experience consistency, and performance requirements
53
+
```
54
+
55
+
### 3. Create the spec
48
56
49
57
Use the **`/specify`** command to describe what you want to build. Focus on the **what** and **why**, not the tech stack.
50
58
51
59
```bash
52
60
/specify Build an application that can help me organize my photos in separate photo albums. Albums are grouped by date and can be re-organized by dragging and dropping on the main page. Albums are never in other nested albums. Within each album, photos are previewed in a tile-like interface.
53
61
```
54
62
55
-
### 3. Create a technical implementation plan
63
+
### 4. Create a technical implementation plan
56
64
57
65
Use the **`/plan`** command to provide your tech stack and architecture choices.
58
66
59
67
```bash
60
68
/plan The application uses Vite with minimal number of libraries. Use vanilla HTML, CSS, and JavaScript as much as possible. Images are not uploaded anywhere and metadata is stored in a local SQLite database.
61
69
```
62
70
63
-
### 4. Break down and implement
71
+
### 5. Break down into tasks
72
+
73
+
Use **`/tasks`** to create an actionable task list from your implementation plan.
74
+
75
+
```bash
76
+
/tasks
77
+
```
78
+
79
+
### 6. Execute implementation
80
+
81
+
Use **`/implement`** to execute all tasks and build your feature according to the plan.
64
82
65
-
Use **`/tasks`** to create an actionable task list, then ask your agent to implement the feature.
83
+
```bash
84
+
/implement
85
+
```
66
86
67
87
For detailed step-by-step instructions, see our [comprehensive guide](./spec-driven.md).
68
88
@@ -124,6 +144,18 @@ specify init my-project --ai claude --debug
124
144
specify check
125
145
```
126
146
147
+
### Available Slash Commands
148
+
149
+
After running `specify init`, your AI coding agent will have access to these slash commands for structured development:
|`/constitution`| Create or update project governing principles and development guidelines |
154
+
|`/specify`| Define what you want to build (requirements and user stories) |
155
+
|`/plan`| Create technical implementation plans with your chosen tech stack |
156
+
|`/tasks`| Generate actionable task lists for implementation |
157
+
|`/implement`| Execute all tasks to build the feature according to the plan |
158
+
127
159
## 📚 Core philosophy
128
160
129
161
Spec-Driven Development is a structured process that emphasizes:
@@ -219,15 +251,25 @@ The CLI will check if you have Claude Code, Gemini CLI, Qwen CLI or opencode ins
219
251
specify init <project_name> --ai claude --ignore-agent-tools
220
252
```
221
253
222
-
### **STEP 1:**Bootstrap the project
254
+
### **STEP 1:**Establish project principles
223
255
224
256
Go to the project folder and run your AI agent. In our example, we're using `claude`.
225
257
226
258

227
259
228
-
You will know that things are configured correctly if you see the `/specify`, `/plan`, and `/tasks` commands available.
260
+
You will know that things are configured correctly if you see the `/constitution`, `/specify`, `/plan`, `/tasks`, and `/implement` commands available.
261
+
262
+
The first step should be establishing your project's governing principles using the `/constitution` command. This helps ensure consistent decision-making throughout all subsequent development phases:
263
+
264
+
```text
265
+
/constitution Create principles focused on code quality, testing standards, user experience consistency, and performance requirements. Include governance for how these principles should guide technical decisions and implementation choices.
266
+
```
267
+
268
+
This step creates or updates the `/memory/constitution.md` file with your project's foundational guidelines that the AI agent will reference during specification, planning, and implementation phases.
269
+
270
+
### **STEP 2:** Create project specifications
229
271
230
-
The first step should be creating a new project scaffolding. Use `/specify` command and then provide the concrete requirements for the project you want to develop.
272
+
With your project principles established, you can now create the functional specifications. Use the`/specify` command and then provide the concrete requirements for the project you want to develop.
231
273
232
274
>[!IMPORTANT]
233
275
>Be as explicit as possible about _what_ you are trying to build and _why_. **Do not focus on the tech stack at this point**.
@@ -281,7 +323,7 @@ At this stage, your project folder contents should resemble the following:
With the baseline specification created, you can go ahead and clarify any of the requirements that were not captured properly within the first shot attempt. For example, you could use a prompt like this within the same Claude Code session:
287
329
@@ -299,7 +341,7 @@ Read the review and acceptance checklist, and check off each item in the checkli
299
341
300
342
It's important to use the interaction with Claude Code as an opportunity to clarify and ask questions around the specification - **do not treat its first attempt as final**.
301
343
302
-
### **STEP 3:** Generate a plan
344
+
### **STEP 4:** Generate a plan
303
345
304
346
You can now be specific about the tech stack and other technical requirements. You can use the `/plan` command that is built into the project template with a prompt like this:
305
347
@@ -368,7 +410,7 @@ That's way too untargeted research. The research needs to help you solve a speci
368
410
>[!NOTE]
369
411
>Claude Code might be over-eager and add components that you did not ask for. Ask it to clarify the rationale and the source of the change.
370
412
371
-
### **STEP 4:** Have Claude Code validate the plan
413
+
### **STEP 5:** Have Claude Code validate the plan
372
414
373
415
With the plan in place, you should have Claude Code run through it to make sure that there are no missing pieces. You can use a prompt like this:
374
416
@@ -387,20 +429,25 @@ You can also ask Claude Code (if you have the [GitHub CLI](https://docs.github.c
387
429
>[!NOTE]
388
430
>Before you have the agent implement it, it's also worth prompting Claude Code to cross-check the details to see if there are any over-engineered pieces (remember - it can be over-eager). If over-engineered components or decisions exist, you can ask Claude Code to resolve them. Ensure that Claude Code follows the [constitution](base/memory/constitution.md) as the foundational piece that it must adhere to when establishing the plan.
389
431
390
-
### STEP 5: Implementation
432
+
### STEP 6: Implementation
391
433
392
-
Once ready, instruct Claude Code to implement your solution (example path included):
434
+
Once ready, use the `/implement` command to execute your implementation plan:
393
435
394
436
```text
395
-
implement specs/002-create-taskify/plan.md
437
+
/implement
396
438
```
397
439
398
-
Claude Code will spring into action and will start creating the implementation.
440
+
The `/implement` command will:
441
+
- Validate that all prerequisites are in place (constitution, spec, plan, and tasks)
442
+
- Parse the task breakdown from `tasks.md`
443
+
- Execute tasks in the correct order, respecting dependencies and parallel execution markers
444
+
- Follow the TDD approach defined in your task plan
445
+
- Provide progress updates and handle errors appropriately
399
446
400
447
>[!IMPORTANT]
401
-
>Claude Code will execute local CLI commands (such as `dotnet`) - make sure you have them installed on your machine.
448
+
>The AI agent will execute local CLI commands (such as `dotnet`, `npm`, etc.) - make sure you have the required tools installed on your machine.
402
449
403
-
Once the implementation step is done, ask Claude Code to try to run the application and resolve any emerging build errors. If the application runs, but there are _runtime errors_that are not directly available to Claude Code through CLI logs (e.g., errors rendered in browser logs), copy and paste the error in Claude Code and have it attempt to resolve it.
450
+
Once the implementation is complete, test the application and resolve any runtime errorsthat may not be visible in CLI logs (e.g., browser console errors). You can copy and paste such errors back to your AI agent for resolution.
Copy file name to clipboardExpand all lines: src/specify_cli/__init__.py
+11-40Lines changed: 11 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -950,53 +950,29 @@ def init(
950
950
steps_lines.append("1. You're already in the project directory!")
951
951
step_num=2
952
952
953
-
ifselected_ai=="claude":
954
-
steps_lines.append(f"{step_num}. Open in Visual Studio Code and start using / commands with Claude Code")
955
-
steps_lines.append(" - Type / in any file to see available commands")
956
-
steps_lines.append(" - Use /specify to create specifications")
957
-
steps_lines.append(" - Use /plan to create implementation plans")
958
-
steps_lines.append(" - Use /tasks to generate tasks")
959
-
elifselected_ai=="gemini":
960
-
steps_lines.append(f"{step_num}. Use / commands with Gemini CLI")
961
-
steps_lines.append(" - Run gemini /specify to create specifications")
962
-
steps_lines.append(" - Run gemini /plan to create implementation plans")
963
-
steps_lines.append(" - Run gemini /tasks to generate tasks")
964
-
steps_lines.append(" - See GEMINI.md for all available commands")
965
-
elifselected_ai=="copilot":
966
-
steps_lines.append(f"{step_num}. Open in Visual Studio Code and use [bold cyan]/specify[/], [bold cyan]/plan[/], [bold cyan]/tasks[/] commands with GitHub Copilot")
967
-
elifselected_ai=="qwen":
968
-
steps_lines.append(f"{step_num}. Use / commands with Qwen CLI")
969
-
steps_lines.append(" - Run qwen /specify to create specifications")
970
-
steps_lines.append(" - Run qwen /plan to create implementation plans")
971
-
steps_lines.append(" - Run qwen /tasks to generate tasks")
972
-
steps_lines.append(" - See QWEN.md for all available commands")
973
-
elifselected_ai=="opencode":
974
-
steps_lines.append(f"{step_num}. Use / commands with opencode")
975
-
steps_lines.append(" - Use /specify to create specifications")
976
-
steps_lines.append(" - Use /plan to create implementation plans")
977
-
steps_lines.append(" - Use /tasks to generate tasks")
978
-
979
-
# Removed script variant step (scripts are transparent to users)
953
+
steps_lines.append(f"{step_num}. Start using slash commands with your AI agent:")
0 commit comments