Skip to content

Commit 78e6c99

Browse files
authored
Merge branch 'github:main' into fix-proxy-cert
2 parents e21820f + 5170521 commit 78e6c99

File tree

3 files changed

+74
-41
lines changed

3 files changed

+74
-41
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Our research and experimentation focus on:
105105

106106
- Validate the concept of parallel implementation exploration
107107
- Provide robust iterative feature development workflows
108-
- Extend processes to handle upgrades and modernization tasks
108+
- Extend processes to handle upgrades and modernization tasks
109109

110110
## 🔧 Prerequisites
111111

@@ -118,7 +118,7 @@ Our research and experimentation focus on:
118118
## 📖 Learn more
119119

120120
- **[Complete Spec-Driven Development Methodology](./spec-driven.md)** - Deep dive into the full process
121-
- **[Detailed Walkthrough](#detailed-process)** - Step-by-step implementation guide
121+
- **[Detailed Walkthrough](#-detailed-process)** - Step-by-step implementation guide
122122

123123
---
124124

spec-driven.md

Lines changed: 71 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ Today, practicing SDD requires assembling existing tools and maintaining discipl
7070

7171
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.
7272

73-
## Streamlining SDD with Claude Commands
73+
## Streamlining SDD with Commands
7474

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:
7676

77-
### The `new_feature` Command
77+
### The `/specify` Command
7878

7979
This command transforms a simple feature description (the user-prompt) into a complete, structured specification with automatic repository management:
8080

@@ -83,22 +83,32 @@ This command transforms a simple feature description (the user-prompt) into a co
8383
3. **Template-Based Generation**: Copies and customizes the feature specification template with your requirements
8484
4. **Directory Structure**: Creates the proper `specs/[branch-name]/` structure for all related documents
8585

86-
### The `generate_plan` Command
86+
### The `/plan` Command
8787

8888
Once a feature specification exists, this command creates a comprehensive implementation plan:
8989

9090
1. **Specification Analysis**: Reads and understands the feature requirements, user stories, and acceptance criteria
9191
2. **Constitutional Compliance**: Ensures alignment with project constitution and architectural principles
9292
3. **Technical Translation**: Converts business requirements into technical architecture and implementation details
9393
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
95104

96105
### Example: Building a Chat Feature
97106

98107
Here's how these commands transform the traditional development workflow:
99108

100109
**Traditional Approach:**
101-
```
110+
111+
```text
102112
1. Write a PRD in a document (2-3 hours)
103113
2. Create design documents (2-3 hours)
104114
3. Set up project structure manually (30 minutes)
@@ -108,30 +118,33 @@ Total: ~12 hours of documentation work
108118
```
109119

110120
**SDD with Commands Approach:**
121+
111122
```bash
112123
# 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
114125

115126
# This automatically:
116127
# - Creates branch "003-chat-system"
117-
# - Generates specs/003-chat-system/feature-spec.md
128+
# - Generates specs/003-chat-system/spec.md
118129
# - Populates it with structured requirements
119130

120-
# Step 2: Generate implementation plan (10 minutes)
121-
/generate_plan WebSocket for real-time messaging, PostgreSQL for history, Redis for presence
131+
# Step 2: Generate implementation plan (5 minutes)
132+
/plan WebSocket for real-time messaging, PostgreSQL for history, Redis for presence
133+
134+
# Step 3: Generate executable tasks (5 minutes)
135+
/tasks
122136

123137
# This automatically creates:
124-
# - specs/003-chat-system/implementation-plan.md
125-
# - specs/003-chat-system/implementation-details/
126-
# - 00-research.md (WebSocket library comparisons)
127-
# - 02-data-model.md (Message and User schemas)
128-
# - 03-api-contracts.md (WebSocket events, REST endpoints)
129-
# - 06-contract-tests.md (Message flow scenarios)
130-
# - 08-inter-library-tests.md (Database-WebSocket integration)
131-
# - specs/003-chat-system/manual-testing.md
138+
# - specs/003-chat-system/plan.md
139+
# - specs/003-chat-system/research.md (WebSocket library comparisons)
140+
# - specs/003-chat-system/data-model.md (Message and User schemas)
141+
# - specs/003-chat-system/contracts/ (WebSocket events, REST endpoints)
142+
# - specs/003-chat-system/quickstart.md (Key validation scenarios)
143+
# - specs/003-chat-system/tasks.md (Task list derived from the plan)
132144
```
133145

134146
In 15 minutes, you have:
147+
135148
- A complete feature specification with user stories and acceptance criteria
136149
- A detailed implementation plan with technology choices and rationale
137150
- API contracts and data models ready for code generation
@@ -156,7 +169,8 @@ The true power of these commands lies not just in automation, but in how the tem
156169
#### 1. **Preventing Premature Implementation Details**
157170

158171
The feature specification template explicitly instructs:
159-
```
172+
173+
```text
160174
- ✅ Focus on WHAT users need and WHY
161175
- ❌ Avoid HOW to implement (no tech stack, APIs, code structure)
162176
```
@@ -166,9 +180,10 @@ This constraint forces the LLM to maintain proper abstraction levels. When an LL
166180
#### 2. **Forcing Explicit Uncertainty Markers**
167181

168182
Both templates mandate the use of `[NEEDS CLARIFICATION]` markers:
169-
```
183+
184+
```text
170185
When creating this spec from a user prompt:
171-
1. **Mark all ambiguities**: Use [NEEDS CLARIFICATION: specific question]
186+
1. **Mark all ambiguities**: Use [NEEDS CLARIFICATION: specific question]
172187
2. **Don't guess**: If the prompt doesn't specify something, mark it
173188
```
174189

@@ -177,10 +192,11 @@ This prevents the common LLM behavior of making plausible but potentially incorr
177192
#### 3. **Structured Thinking Through Checklists**
178193

179194
The templates include comprehensive checklists that act as "unit tests" for the specification:
180-
```
195+
196+
```markdown
181197
### Requirement Completeness
182198
- [ ] No [NEEDS CLARIFICATION] markers remain
183-
- [ ] Requirements are testable and unambiguous
199+
- [ ] Requirements are testable and unambiguous
184200
- [ ] Success criteria are measurable
185201
```
186202

@@ -189,7 +205,8 @@ These checklists force the LLM to self-review its output systematically, catchin
189205
#### 4. **Constitutional Compliance Through Gates**
190206

191207
The implementation plan template enforces architectural principles through phase gates:
192-
```
208+
209+
```markdown
193210
### Phase -1: Pre-Implementation Gates
194211
#### Simplicity Gate (Article VII)
195212
- [ ] Using ≤3 projects?
@@ -204,9 +221,10 @@ These gates prevent over-engineering by making the LLM explicitly justify any co
204221
#### 5. **Hierarchical Detail Management**
205222

206223
The templates enforce proper information architecture:
207-
```
208-
**IMPORTANT**: This implementation plan should remain high-level and readable.
209-
Any code samples, detailed algorithms, or extensive technical specifications
224+
225+
```text
226+
**IMPORTANT**: This implementation plan should remain high-level and readable.
227+
Any code samples, detailed algorithms, or extensive technical specifications
210228
must be placed in the appropriate `implementation-details/` file
211229
```
212230

@@ -215,7 +233,8 @@ This prevents the common problem of specifications becoming unreadable code dump
215233
#### 6. **Test-First Thinking**
216234

217235
The implementation template enforces test-first development:
218-
```
236+
237+
```text
219238
### File Creation Order
220239
1. Create `contracts/` with API specifications
221240
2. Create test files in order: contract → integration → e2e → unit
@@ -227,7 +246,8 @@ This ordering constraint ensures the LLM thinks about testability and contracts
227246
#### 7. **Preventing Speculative Features**
228247

229248
Templates explicitly discourage speculation:
230-
```
249+
250+
```text
231251
- [ ] No speculative or "might need" features
232252
- [ ] All phases have clear prerequisites and deliverables
233253
```
@@ -237,6 +257,7 @@ This stops the LLM from adding "nice to have" features that complicate implement
237257
### The Compound Effect
238258

239259
These constraints work together to produce specifications that are:
260+
240261
- **Complete**: Checklists ensure nothing is forgotten
241262
- **Unambiguous**: Forced clarification markers highlight uncertainties
242263
- **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
247268

248269
## The Constitutional Foundation: Enforcing Architectural Discipline
249270

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.
251272

252273
### The Nine Articles of Development
253274

254275
The constitution defines nine articles that shape every aspect of the development process:
255276

256277
#### Article I: Library-First Principle
278+
257279
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
261284
first being abstracted into a reusable library component.
262285
```
263286

264287
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.
265288

266289
#### Article II: CLI Interface Mandate
290+
267291
Every library must expose its functionality through a command-line interface:
268-
```
292+
293+
```text
269294
All CLI interfaces MUST:
270295
- Accept text as input (via stdin, arguments, or files)
271296
- Produce text as output (via stdout)
@@ -275,8 +300,10 @@ All CLI interfaces MUST:
275300
This enforces observability and testability. The LLM cannot hide functionality inside opaque classes—everything must be accessible and verifiable through text-based interfaces.
276301

277302
#### Article III: Test-First Imperative
303+
278304
The most transformative article—no code before tests:
279-
```
305+
306+
```text
280307
This is NON-NEGOTIABLE: All implementation MUST follow strict Test-Driven Development.
281308
No implementation code shall be written before:
282309
1. Unit tests are written
@@ -287,8 +314,10 @@ No implementation code shall be written before:
287314
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.
288315

289316
#### Articles VII & VIII: Simplicity and Anti-Abstraction
317+
290318
These paired articles combat over-engineering:
291-
```
319+
320+
```text
292321
Section 7.3: Minimal Project Structure
293322
- Maximum 3 projects for initial implementation
294323
- Additional projects require documented justification
@@ -300,8 +329,10 @@ Section 8.1: Framework Trust
300329
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.
301330

302331
#### Article IX: Integration-First Testing
332+
303333
Prioritizes real-world testing over isolated unit tests:
304-
```
334+
335+
```text
305336
Tests MUST use realistic environments:
306337
- Prefer real databases over mocks
307338
- Use actual service instances over stubs
@@ -343,7 +374,8 @@ The constitution's power lies in its immutability. While implementation details
343374
### Constitutional Evolution
344375

345376
While principles are immutable, their application can evolve:
346-
```
377+
378+
```text
347379
Section 4.2: Amendment Process
348380
Modifications to this constitution require:
349381
- Explicit documentation of the rationale for change
@@ -368,4 +400,4 @@ By embedding these principles into the specification and planning process, SDD e
368400

369401
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.
370402

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.

src/specify_cli/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,7 @@ def init(
826826
steps_lines.append(f"{step_num}. Use / commands with Gemini CLI")
827827
steps_lines.append(" - Run gemini /specify to create specifications")
828828
steps_lines.append(" - Run gemini /plan to create implementation plans")
829+
steps_lines.append(" - Run gemini /tasks to generate tasks")
829830
steps_lines.append(" - See GEMINI.md for all available commands")
830831
elif selected_ai == "copilot":
831832
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

Comments
 (0)