Skip to content

Commit c219559

Browse files
fix: Improve formatting and clarity in template files by standardizing code block syntax and removing unnecessary lines
1 parent e1a33f2 commit c219559

File tree

4 files changed

+44
-23
lines changed

4 files changed

+44
-23
lines changed

.specify/templates/agent-file-template.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
Auto-generated from all feature plans. Last updated: [DATE]
44

55
## Active Technologies
6+
67
[EXTRACTED FROM ALL PLAN.MD FILES]
78

89
## Project Structure
9-
```
10+
11+
```plaintext
1012
[ACTUAL STRUCTURE FROM PLANS]
1113
```
1214

@@ -20,4 +22,4 @@ Auto-generated from all feature plans. Last updated: [DATE]
2022
[LAST 3 FEATURES AND WHAT THEY ADDED]
2123

2224
<!-- MANUAL ADDITIONS START -->
23-
<!-- MANUAL ADDITIONS END -->
25+
<!-- MANUAL ADDITIONS END -->

.specify/templates/plan-template.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
## Execution Flow (/plan command scope)
77

8-
```
98
1. Load feature spec from Input path
109
→ If not found: ERROR "No feature spec at {path}"
1110
2. Fill Technical Context (scan for NEEDS CLARIFICATION)
@@ -24,7 +23,6 @@
2423
→ Update Progress Tracking: Post-Design Constitution Check
2524
8. Plan Phase 2 → Describe task generation approach (DO NOT create tasks.md)
2625
9. STOP - Ready for /tasks command
27-
```
2826

2927
**IMPORTANT**: The /plan command STOPS at step 7. Phases 2-4 are executed by other commands:
3028

@@ -100,7 +98,7 @@
10098

10199
### Documentation (this feature)
102100

103-
```
101+
```plaintext
104102
specs/[###-feature]/
105103
├── plan.md # This file (/plan command output)
106104
├── research.md # Phase 0 output (/plan command)
@@ -119,7 +117,7 @@ specs/[###-feature]/
119117
not include Option labels.
120118
-->
121119

122-
```
120+
```plaintext
123121
# [REMOVE IF UNUSED] Option 1: Single project (DEFAULT)
124122
src/
125123
├── models/
@@ -165,7 +163,7 @@ directories captured above]
165163
- For each dependency → best practices task
166164
- For each integration → patterns task
167165
2. **Generate and dispatch research agents**:
168-
```
166+
```plaintext
169167
For each unknown in Technical Context:
170168
Task: "Research {unknown} for {feature context}"
171169
For each technology choice:

.specify/templates/spec-template.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Feature Specification: [FEATURE NAME]
22

3-
**Feature Branch**: `[###-feature-name]`
4-
**Created**: [DATE]
5-
**Status**: Draft
3+
**Feature Branch**: `[###-feature-name]`
4+
**Created**: [DATE]
5+
**Status**: Draft
66
**Input**: User description: "$ARGUMENTS"
77

88
## Execution Flow (main)
9-
```
9+
1010
1. Parse user description from Input
1111
→ If empty: ERROR "No feature description provided"
1212
2. Extract key concepts from description
@@ -23,28 +23,31 @@
2323
→ If any [NEEDS CLARIFICATION]: WARN "Spec has uncertainties"
2424
→ If implementation details found: ERROR "Remove tech details"
2525
8. Return: SUCCESS (spec ready for planning)
26-
```
2726

2827
---
2928

3029
## ⚡ Quick Guidelines
30+
3131
- ✅ Focus on WHAT users need and WHY
3232
- ❌ Avoid HOW to implement (no tech stack, APIs, code structure)
3333
- 👥 Written for business stakeholders, not developers
3434

3535
### Section Requirements
36+
3637
- **Mandatory sections**: Must be completed for every feature
3738
- **Optional sections**: Include only when relevant to the feature
3839
- When a section doesn't apply, remove it entirely (don't leave as "N/A")
3940

4041
### For AI Generation
42+
4143
When creating this spec from a user prompt:
44+
4245
1. **Mark all ambiguities**: Use [NEEDS CLARIFICATION: specific question] for any assumption you'd need to make
4346
2. **Don't guess**: If the prompt doesn't specify something (e.g., "login system" without auth method), mark it
4447
3. **Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item
4548
4. **Common underspecified areas**:
4649
- User types and permissions
47-
- Data retention/deletion policies
50+
- Data retention/deletion policies
4851
- Performance targets and scale
4952
- Error handling behaviors
5053
- Integration requirements
@@ -55,54 +58,64 @@ When creating this spec from a user prompt:
5558
## User Scenarios & Testing *(mandatory)*
5659

5760
### Primary User Story
61+
5862
[Describe the main user journey in plain language]
5963

6064
### Acceptance Scenarios
65+
6166
1. **Given** [initial state], **When** [action], **Then** [expected outcome]
6267
2. **Given** [initial state], **When** [action], **Then** [expected outcome]
6368

6469
### Edge Cases
70+
6571
- What happens when [boundary condition]?
6672
- How does system handle [error scenario]?
6773

6874
## Requirements *(mandatory)*
6975

7076
### Functional Requirements
77+
7178
- **FR-001**: System MUST [specific capability, e.g., "allow users to create accounts"]
72-
- **FR-002**: System MUST [specific capability, e.g., "validate email addresses"]
79+
- **FR-002**: System MUST [specific capability, e.g., "validate email addresses"]
7380
- **FR-003**: Users MUST be able to [key interaction, e.g., "reset their password"]
7481
- **FR-004**: System MUST [data requirement, e.g., "persist user preferences"]
7582
- **FR-005**: System MUST [behavior, e.g., "log all security events"]
7683

77-
*Example of marking unclear requirements:*
84+
Example of marking unclear requirements:
85+
7886
- **FR-006**: System MUST authenticate users via [NEEDS CLARIFICATION: auth method not specified - email/password, SSO, OAuth?]
7987
- **FR-007**: System MUST retain user data for [NEEDS CLARIFICATION: retention period not specified]
8088

8189
### Key Entities *(include if feature involves data)*
90+
8291
- **[Entity 1]**: [What it represents, key attributes without implementation]
8392
- **[Entity 2]**: [What it represents, relationships to other entities]
8493

8594
---
8695

8796
## Review & Acceptance Checklist
97+
8898
*GATE: Automated checks run during main() execution*
8999

90100
### Content Quality
101+
91102
- [ ] No implementation details (languages, frameworks, APIs)
92103
- [ ] Focused on user value and business needs
93104
- [ ] Written for non-technical stakeholders
94105
- [ ] All mandatory sections completed
95106

96107
### Requirement Completeness
108+
97109
- [ ] No [NEEDS CLARIFICATION] markers remain
98-
- [ ] Requirements are testable and unambiguous
110+
- [ ] Requirements are testable and unambiguous
99111
- [ ] Success criteria are measurable
100112
- [ ] Scope is clearly bounded
101113
- [ ] Dependencies and assumptions identified
102114

103115
---
104116

105117
## Execution Status
118+
106119
*Updated by main() during processing*
107120

108121
- [ ] User description parsed

.specify/templates/tasks-template.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
**Prerequisites**: plan.md (required), research.md, data-model.md, contracts/
55

66
## Execution Flow (main)
7-
```
7+
88
1. Load plan.md from feature directory
99
→ If not found: ERROR "No implementation plan found"
1010
→ Extract: tech stack, libraries, structure
@@ -30,31 +30,35 @@
3030
→ All entities have models?
3131
→ All endpoints implemented?
3232
9. Return: SUCCESS (tasks ready for execution)
33-
```
3433

3534
## Format: `[ID] [P?] Description`
35+
3636
- **[P]**: Can run in parallel (different files, no dependencies)
3737
- Include exact file paths in descriptions
3838

3939
## Path Conventions
40+
4041
- **Single project**: `src/`, `tests/` at repository root
4142
- **Web app**: `backend/src/`, `frontend/src/`
4243
- **Mobile**: `api/src/`, `ios/src/` or `android/src/`
4344
- Paths shown below assume single project - adjust based on plan.md structure
4445

4546
## Phase 3.1: Setup
47+
4648
- [ ] T001 Create project structure per implementation plan
4749
- [ ] T002 Initialize [language] project with [framework] dependencies
4850
- [ ] T003 [P] Configure linting and formatting tools
4951

5052
## Phase 3.2: Tests First (TDD) ⚠️ MUST COMPLETE BEFORE 3.3
53+
5154
**CRITICAL: These tests MUST be written and MUST FAIL before ANY implementation**
5255
- [ ] T004 [P] Contract test POST /api/users in tests/contract/test_users_post.py
5356
- [ ] T005 [P] Contract test GET /api/users/{id} in tests/contract/test_users_get.py
5457
- [ ] T006 [P] Integration test user registration in tests/integration/test_registration.py
5558
- [ ] T007 [P] Integration test auth flow in tests/integration/test_auth.py
5659

5760
## Phase 3.3: Core Implementation (ONLY after tests are failing)
61+
5862
- [ ] T008 [P] User model in src/models/user.py
5963
- [ ] T009 [P] UserService CRUD in src/services/user_service.py
6064
- [ ] T010 [P] CLI --create-user in src/cli/user_commands.py
@@ -64,26 +68,30 @@
6468
- [ ] T014 Error handling and logging
6569

6670
## Phase 3.4: Integration
71+
6772
- [ ] T015 Connect UserService to DB
6873
- [ ] T016 Auth middleware
6974
- [ ] T017 Request/response logging
7075
- [ ] T018 CORS and security headers
7176

7277
## Phase 3.5: Polish
78+
7379
- [ ] T019 [P] Unit tests for validation in tests/unit/test_validation.py
7480
- [ ] T020 Performance tests (<200ms)
7581
- [ ] T021 [P] Update docs/api.md
7682
- [ ] T022 Remove duplication
7783
- [ ] T023 Run manual-testing.md
7884

7985
## Dependencies
86+
8087
- Tests (T004-T007) before implementation (T008-T014)
8188
- T008 blocks T009, T015
8289
- T016 blocks T018
8390
- Implementation before polish (T019-T023)
8491

8592
## Parallel Example
86-
```
93+
94+
```plaintext
8795
# Launch T004-T007 together:
8896
Task: "Contract test POST /api/users in tests/contract/test_users_post.py"
8997
Task: "Contract test GET /api/users/{id} in tests/contract/test_users_get.py"
@@ -92,36 +100,36 @@ Task: "Integration test auth in tests/integration/test_auth.py"
92100
```
93101

94102
## Notes
103+
95104
- [P] tasks = different files, no dependencies
96105
- Verify tests fail before implementing
97106
- Commit after each task
98107
- Avoid: vague tasks, same file conflicts
99108

100109
## Task Generation Rules
110+
101111
*Applied during main() execution*
102112

103113
1. **From Contracts**:
104114
- Each contract file → contract test task [P]
105115
- Each endpoint → implementation task
106-
107116
2. **From Data Model**:
108117
- Each entity → model creation task [P]
109118
- Relationships → service layer tasks
110-
111119
3. **From User Stories**:
112120
- Each story → integration test [P]
113121
- Quickstart scenarios → validation tasks
114-
115122
4. **Ordering**:
116123
- Setup → Tests → Models → Services → Endpoints → Polish
117124
- Dependencies block parallel execution
118125

119126
## Validation Checklist
127+
120128
*GATE: Checked by main() before returning*
121129

122130
- [ ] All contracts have corresponding tests
123131
- [ ] All entities have model tasks
124132
- [ ] All tests come before implementation
125133
- [ ] Parallel tasks truly independent
126134
- [ ] Each task specifies exact file path
127-
- [ ] No task modifies same file as another [P] task
135+
- [ ] No task modifies same file as another [P] task

0 commit comments

Comments
 (0)