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 key is treating specifications as the source of truth, with code as the generated output that serves the specification rather than the other way around.
72
72
73
-
## Streamlining SDD with Claude Commands
73
+
## Streamlining SDD with Commands
74
74
75
-
The SDD methodology is significantly enhanced through two powerful Claude commands that automate the specification and planning workflow:
75
+
The SDD methodology is significantly enhanced through three powerful commands that automate the specification → planning → tasking workflow:
76
76
77
-
### The `new_feature` Command
77
+
### The `/specify` Command
78
78
79
79
This command transforms a simple feature description (the user-prompt) into a complete, structured specification with automatic repository management:
80
80
@@ -83,22 +83,32 @@ This command transforms a simple feature description (the user-prompt) into a co
83
83
3.**Template-Based Generation**: Copies and customizes the feature specification template with your requirements
84
84
4.**Directory Structure**: Creates the proper `specs/[branch-name]/` structure for all related documents
85
85
86
-
### The `generate_plan` Command
86
+
### The `/plan` Command
87
87
88
88
Once a feature specification exists, this command creates a comprehensive implementation plan:
89
89
90
90
1.**Specification Analysis**: Reads and understands the feature requirements, user stories, and acceptance criteria
91
91
2.**Constitutional Compliance**: Ensures alignment with project constitution and architectural principles
92
92
3.**Technical Translation**: Converts business requirements into technical architecture and implementation details
93
93
4.**Detailed Documentation**: Generates supporting documents for data models, API contracts, and test scenarios
94
-
5.**Manual Testing Plans**: Creates step-by-step validation procedures for each user story
94
+
5.**Quickstart Validation**: Produces a quickstart guide capturing key validation scenarios
95
+
96
+
### The `/tasks` Command
97
+
98
+
After a plan is created, this command analyzes the plan and related design documents to generate an executable task list:
99
+
100
+
1.**Inputs**: Reads `plan.md` (required) and, if present, `data-model.md`, `contracts/`, and `research.md`
101
+
2.**Task Derivation**: Converts contracts, entities, and scenarios into specific tasks
102
+
3.**Parallelization**: Marks independent tasks `[P]` and outlines safe parallel groups
103
+
4.**Output**: Writes `tasks.md` in the feature directory, ready for execution by a Task agent
95
104
96
105
### Example: Building a Chat Feature
97
106
98
107
Here's how these commands transform the traditional development workflow:
99
108
100
109
**Traditional Approach:**
101
-
```
110
+
111
+
```text
102
112
1. Write a PRD in a document (2-3 hours)
103
113
2. Create design documents (2-3 hours)
104
114
3. Set up project structure manually (30 minutes)
@@ -108,30 +118,33 @@ Total: ~12 hours of documentation work
108
118
```
109
119
110
120
**SDD with Commands Approach:**
121
+
111
122
```bash
112
123
# Step 1: Create the feature specification (5 minutes)
113
-
/new_feature Real-time chat system with message history and user presence
124
+
/specify Real-time chat system with message history and user presence
-**Testable**: Test-first thinking baked into the process
@@ -247,25 +268,29 @@ The templates transform the LLM from a creative writer into a disciplined specif
247
268
248
269
## The Constitutional Foundation: Enforcing Architectural Discipline
249
270
250
-
At the heart of SDD lies a constitution—a set of immutable principles that govern how specifications become code. The constitution (`base/memory/constitution.md`) acts as the architectural DNA of the system, ensuring that every generated implementation maintains consistency, simplicity, and quality.
271
+
At the heart of SDD lies a constitution—a set of immutable principles that govern how specifications become code. The constitution (`memory/constitution.md`) acts as the architectural DNA of the system, ensuring that every generated implementation maintains consistency, simplicity, and quality.
251
272
252
273
### The Nine Articles of Development
253
274
254
275
The constitution defines nine articles that shape every aspect of the development process:
255
276
256
277
#### Article I: Library-First Principle
278
+
257
279
Every feature must begin as a standalone library—no exceptions. This forces modular design from the start:
258
-
```
259
-
Every feature in Specify MUST begin its existence as a standalone library.
260
-
No feature shall be implemented directly within application code without
280
+
281
+
```text
282
+
Every feature in Specify MUST begin its existence as a standalone library.
283
+
No feature shall be implemented directly within application code without
261
284
first being abstracted into a reusable library component.
262
285
```
263
286
264
287
This principle ensures that specifications generate modular, reusable code rather than monolithic applications. When the LLM generates an implementation plan, it must structure features as libraries with clear boundaries and minimal dependencies.
265
288
266
289
#### Article II: CLI Interface Mandate
290
+
267
291
Every library must expose its functionality through a command-line interface:
268
-
```
292
+
293
+
```text
269
294
All CLI interfaces MUST:
270
295
- Accept text as input (via stdin, arguments, or files)
271
296
- Produce text as output (via stdout)
@@ -275,8 +300,10 @@ All CLI interfaces MUST:
275
300
This enforces observability and testability. The LLM cannot hide functionality inside opaque classes—everything must be accessible and verifiable through text-based interfaces.
276
301
277
302
#### Article III: Test-First Imperative
303
+
278
304
The most transformative article—no code before tests:
279
-
```
305
+
306
+
```text
280
307
This is NON-NEGOTIABLE: All implementation MUST follow strict Test-Driven Development.
281
308
No implementation code shall be written before:
282
309
1. Unit tests are written
@@ -287,8 +314,10 @@ No implementation code shall be written before:
287
314
This completely inverts traditional AI code generation. Instead of generating code and hoping it works, the LLM must first generate comprehensive tests that define behavior, get them approved, and only then generate implementation.
288
315
289
316
#### Articles VII & VIII: Simplicity and Anti-Abstraction
When an LLM might naturally create elaborate abstractions, these articles force it to justify every layer of complexity. The implementation plan template's "Phase -1 Gates" directly enforce these principles.
301
330
302
331
#### Article IX: Integration-First Testing
332
+
303
333
Prioritizes real-world testing over isolated unit tests:
304
-
```
334
+
335
+
```text
305
336
Tests MUST use realistic environments:
306
337
- Prefer real databases over mocks
307
338
- Use actual service instances over stubs
@@ -343,7 +374,8 @@ The constitution's power lies in its immutability. While implementation details
343
374
### Constitutional Evolution
344
375
345
376
While principles are immutable, their application can evolve:
346
-
```
377
+
378
+
```text
347
379
Section 4.2: Amendment Process
348
380
Modifications to this constitution require:
349
381
- Explicit documentation of the rationale for change
@@ -368,4 +400,4 @@ By embedding these principles into the specification and planning process, SDD e
368
400
369
401
This isn't about replacing developers or automating creativity. It's about amplifying human capability by automating mechanical translation. It's about creating a tight feedback loop where specifications, research, and code evolve together, each iteration bringing deeper understanding and better alignment between intent and implementation.
370
402
371
-
Software development needs better tools for maintaining alignment between intent and implementation. SDD provides the methodology for achieving this alignment through executable specifications that generate code rather than merely guiding it.
403
+
Software development needs better tools for maintaining alignment between intent and implementation. SDD provides the methodology for achieving this alignment through executable specifications that generate code rather than merely guiding it.
Copy file name to clipboardExpand all lines: src/specify_cli/__init__.py
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -826,6 +826,7 @@ def init(
826
826
steps_lines.append(f"{step_num}. Use / commands with Gemini CLI")
827
827
steps_lines.append(" - Run gemini /specify to create specifications")
828
828
steps_lines.append(" - Run gemini /plan to create implementation plans")
829
+
steps_lines.append(" - Run gemini /tasks to generate tasks")
829
830
steps_lines.append(" - See GEMINI.md for all available commands")
830
831
elifselected_ai=="copilot":
831
832
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")
0 commit comments