flight-rules 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +270 -0
- package/dist/commands/adapter.d.ts +35 -0
- package/dist/commands/adapter.js +308 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +197 -0
- package/dist/commands/upgrade.d.ts +1 -0
- package/dist/commands/upgrade.js +255 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +83 -0
- package/dist/utils/files.d.ts +75 -0
- package/dist/utils/files.js +245 -0
- package/dist/utils/interactive.d.ts +5 -0
- package/dist/utils/interactive.js +7 -0
- package/package.json +52 -0
- package/payload/.editorconfig +15 -0
- package/payload/AGENTS.md +247 -0
- package/payload/commands/dev-session.end.md +79 -0
- package/payload/commands/dev-session.start.md +54 -0
- package/payload/commands/impl.create.md +178 -0
- package/payload/commands/impl.outline.md +120 -0
- package/payload/commands/prd.clarify.md +139 -0
- package/payload/commands/prd.create.md +154 -0
- package/payload/commands/test.add.md +73 -0
- package/payload/commands/test.assess-current.md +75 -0
- package/payload/doc-templates/critical-learnings.md +21 -0
- package/payload/doc-templates/implementation/overview.md +27 -0
- package/payload/doc-templates/prd.md +49 -0
- package/payload/doc-templates/progress.md +19 -0
- package/payload/doc-templates/session-log.md +62 -0
- package/payload/doc-templates/tech-stack.md +101 -0
- package/payload/prompts/.gitkeep +0 -0
- package/payload/prompts/implementation/README.md +26 -0
- package/payload/prompts/implementation/plan-review.md +80 -0
- package/payload/prompts/prd/README.md +46 -0
- package/payload/prompts/prd/creation-conversational.md +46 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Start Coding Session
|
|
2
|
+
|
|
3
|
+
When the user invokes "start coding session", follow this process:
|
|
4
|
+
|
|
5
|
+
## 1. Review Project Context
|
|
6
|
+
|
|
7
|
+
Read and understand:
|
|
8
|
+
- `docs/prd.md` – What is this project?
|
|
9
|
+
- `docs/implementation/overview.md` – What are the implementation areas?
|
|
10
|
+
- `docs/progress.md` – What was done recently?
|
|
11
|
+
- The most recent `docs/session_logs/*_session.md` – What happened last session?
|
|
12
|
+
|
|
13
|
+
Scan relevant code as needed to understand current state.
|
|
14
|
+
|
|
15
|
+
## 2. Establish Session Goals
|
|
16
|
+
|
|
17
|
+
Ask the user:
|
|
18
|
+
> "What would you like to accomplish in this session?"
|
|
19
|
+
|
|
20
|
+
Also suggest goals based on:
|
|
21
|
+
- "Next Steps" from the last session
|
|
22
|
+
- Spec items with status 🔵 Planned or 🟡 In Progress
|
|
23
|
+
|
|
24
|
+
Agree on a small set of specific, achievable goals (typically 1-3).
|
|
25
|
+
|
|
26
|
+
## 3. Create Implementation Plan
|
|
27
|
+
|
|
28
|
+
Collaborate with the user on:
|
|
29
|
+
- **Technical approach** – How will we implement this?
|
|
30
|
+
- **Alternatives considered** – What other options exist?
|
|
31
|
+
- **Constraints** – What limitations should we keep in mind?
|
|
32
|
+
- **Potential challenges** – What might go wrong and how will we handle it?
|
|
33
|
+
|
|
34
|
+
## 4. Document the Session Plan
|
|
35
|
+
|
|
36
|
+
Create a new file: `docs/session_logs/YYYYMMDD_HHMM_session.md`
|
|
37
|
+
|
|
38
|
+
Use the template at `.flight-rules/doc-templates/session-log.md` as a guide.
|
|
39
|
+
|
|
40
|
+
Include:
|
|
41
|
+
- Session goals
|
|
42
|
+
- Related Task Groups and Tasks (by ID)
|
|
43
|
+
- Technical approach
|
|
44
|
+
- Task breakdown
|
|
45
|
+
|
|
46
|
+
## 5. Confirm Before Coding
|
|
47
|
+
|
|
48
|
+
Present the plan to the user and ask:
|
|
49
|
+
|
|
50
|
+
> "The session plan has been documented in `docs/session_logs/YYYYMMDD_HHMM_session.md`. Are you ready for me to begin implementing this plan?"
|
|
51
|
+
|
|
52
|
+
**Do not begin implementation until the user confirms.**
|
|
53
|
+
|
|
54
|
+
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Create Implementation Detail
|
|
2
|
+
|
|
3
|
+
When the user invokes "impl.create", add detailed task groups and tasks to the implementation specs.
|
|
4
|
+
|
|
5
|
+
This command works at different scopes:
|
|
6
|
+
- **Full project** – Detail all areas (for smaller projects)
|
|
7
|
+
- **One area** – Detail a specific area's task groups
|
|
8
|
+
- **One task group** – Add tasks to a specific task group
|
|
9
|
+
|
|
10
|
+
## 1. Determine Scope
|
|
11
|
+
|
|
12
|
+
Check if the user provided a scope argument:
|
|
13
|
+
- `/impl.create` → Ask what scope they want
|
|
14
|
+
- `/impl.create 1-authentication` → Detail that area
|
|
15
|
+
- `/impl.create 1.2` → Detail that task group
|
|
16
|
+
|
|
17
|
+
If no argument provided, ask:
|
|
18
|
+
> "What would you like to detail?
|
|
19
|
+
> 1. **Full project** – Create detailed specs for all areas
|
|
20
|
+
> 2. **One area** – Pick an area to flesh out (e.g., `1-authentication`)
|
|
21
|
+
> 3. **One task group** – Add detail to a specific task group (e.g., `1.2`)
|
|
22
|
+
>
|
|
23
|
+
> Which scope, or enter an area/task group identifier?"
|
|
24
|
+
|
|
25
|
+
## 2. Verify Prerequisites
|
|
26
|
+
|
|
27
|
+
### For full project or area scope:
|
|
28
|
+
- Check `docs/implementation/overview.md` exists
|
|
29
|
+
- If not, suggest running `/impl.outline` first
|
|
30
|
+
|
|
31
|
+
### For task group scope:
|
|
32
|
+
- Check the parent area exists
|
|
33
|
+
- If not, suggest creating the area first
|
|
34
|
+
|
|
35
|
+
### Always:
|
|
36
|
+
- Read `docs/prd.md` for context on goals and constraints
|
|
37
|
+
- Scan relevant existing code to understand what's already built
|
|
38
|
+
|
|
39
|
+
## 3. Propose the Detail
|
|
40
|
+
|
|
41
|
+
Based on scope, propose task groups and/or tasks:
|
|
42
|
+
|
|
43
|
+
### For Area Scope
|
|
44
|
+
|
|
45
|
+
Propose task groups within the area:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Detailing Area: 1. Authentication
|
|
49
|
+
|
|
50
|
+
Proposed Task Groups:
|
|
51
|
+
|
|
52
|
+
1.1 **User Registration** – Account creation flow
|
|
53
|
+
- Email validation, password requirements, confirmation
|
|
54
|
+
|
|
55
|
+
1.2 **Login/Logout** – Session management
|
|
56
|
+
- Credential verification, session tokens, logout cleanup
|
|
57
|
+
|
|
58
|
+
1.3 **Password Reset** – Recovery flow
|
|
59
|
+
- Reset requests, email tokens, password update
|
|
60
|
+
|
|
61
|
+
Does this breakdown make sense? Would you like to adjust before I create the specs?
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### For Task Group Scope
|
|
65
|
+
|
|
66
|
+
Propose tasks within the task group:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Detailing Task Group: 1.2 Login/Logout
|
|
70
|
+
|
|
71
|
+
Proposed Tasks:
|
|
72
|
+
|
|
73
|
+
1.2.1 **Login Form UI** – Create the login interface
|
|
74
|
+
1.2.2 **Credential Verification** – Backend auth logic
|
|
75
|
+
1.2.3 **Session Token Management** – Create and validate tokens
|
|
76
|
+
1.2.4 **Logout Flow** – Clear session and redirect
|
|
77
|
+
|
|
78
|
+
Does this breakdown make sense?
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### For Full Project Scope
|
|
82
|
+
|
|
83
|
+
Show the complete structure across all areas, then confirm.
|
|
84
|
+
|
|
85
|
+
**Do not create files until the user confirms.**
|
|
86
|
+
|
|
87
|
+
## 4. Create the Spec Files
|
|
88
|
+
|
|
89
|
+
Once approved, create or update:
|
|
90
|
+
|
|
91
|
+
### Task Group Files
|
|
92
|
+
|
|
93
|
+
For each task group, create `docs/implementation/{N}-{area}/{N}.{M}-topic.md`:
|
|
94
|
+
|
|
95
|
+
```markdown
|
|
96
|
+
# {N}.{M} Task Group Name
|
|
97
|
+
|
|
98
|
+
Brief description of what this task group covers and why it matters.
|
|
99
|
+
|
|
100
|
+
## Goals
|
|
101
|
+
- What this task group accomplishes
|
|
102
|
+
- How it maps to PRD goals
|
|
103
|
+
|
|
104
|
+
## Constraints
|
|
105
|
+
- Technical limitations or requirements
|
|
106
|
+
- Dependencies on other task groups (if any)
|
|
107
|
+
|
|
108
|
+
## Dependencies
|
|
109
|
+
- **Requires**: List any task groups that must be completed first
|
|
110
|
+
- **Enables**: List any task groups that depend on this one
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## {N}.{M}.1. First Task Name
|
|
115
|
+
|
|
116
|
+
**Goal**: What this specific task accomplishes
|
|
117
|
+
|
|
118
|
+
**Approach**: High-level technical approach (2-3 sentences)
|
|
119
|
+
|
|
120
|
+
**Acceptance Criteria**:
|
|
121
|
+
- Specific, testable criteria
|
|
122
|
+
- What "done" looks like
|
|
123
|
+
|
|
124
|
+
**Status**: 🔵 Planned
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## {N}.{M}.2. Second Task Name
|
|
129
|
+
|
|
130
|
+
**Goal**: ...
|
|
131
|
+
|
|
132
|
+
**Approach**: ...
|
|
133
|
+
|
|
134
|
+
**Acceptance Criteria**:
|
|
135
|
+
- ...
|
|
136
|
+
|
|
137
|
+
**Status**: 🔵 Planned
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Update Area Index
|
|
141
|
+
|
|
142
|
+
Update `docs/implementation/{N}-{area}/index.md` to list the task groups:
|
|
143
|
+
|
|
144
|
+
```markdown
|
|
145
|
+
## Task Groups
|
|
146
|
+
|
|
147
|
+
- **[1.1 User Registration](./1.1-user-registration.md)** – Account creation flow
|
|
148
|
+
- **[1.2 Login/Logout](./1.2-login-logout.md)** – Session management
|
|
149
|
+
- ...
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Update Overview (if needed)
|
|
153
|
+
|
|
154
|
+
Update area status in `docs/implementation/overview.md` if moving from planned to detailed.
|
|
155
|
+
|
|
156
|
+
## 5. Summarize What Was Created
|
|
157
|
+
|
|
158
|
+
After creating files, present:
|
|
159
|
+
- List of files created/updated
|
|
160
|
+
- Total number of tasks defined
|
|
161
|
+
- Suggested starting point
|
|
162
|
+
- Any noted dependencies
|
|
163
|
+
|
|
164
|
+
Ask:
|
|
165
|
+
> "The specs have been created. Would you like to:
|
|
166
|
+
> - Start a coding session with `/dev-session.start`?
|
|
167
|
+
> - Detail another area with `/impl.create {area}`?
|
|
168
|
+
> - Review and adjust any of the specs?"
|
|
169
|
+
|
|
170
|
+
## Guidelines
|
|
171
|
+
|
|
172
|
+
- **Right-size tasks** – Each task should be roughly one focused coding session
|
|
173
|
+
- **Clear acceptance criteria** – Every task needs testable "done" conditions
|
|
174
|
+
- **Note dependencies** – If Task B requires Task A, document it explicitly
|
|
175
|
+
- **Map to PRD** – Reference which PRD goals each task group supports
|
|
176
|
+
- **Start simple** – Placeholder descriptions are fine; they'll be refined during sessions
|
|
177
|
+
- **All tasks start 🔵 Planned** – Status updates happen during `/dev-session.start` and `/dev-session.end`
|
|
178
|
+
- **Respect existing work** – If specs already exist for a scope, ask before overwriting
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Create Implementation Outline
|
|
2
|
+
|
|
3
|
+
When the user invokes "impl.outline", create a high-level implementation structure from the PRD.
|
|
4
|
+
|
|
5
|
+
This command creates the skeleton — areas and their brief descriptions — without detailed tasks. Use `/impl.create` afterward to add detail to specific areas.
|
|
6
|
+
|
|
7
|
+
## 1. Review the PRD
|
|
8
|
+
|
|
9
|
+
Read `docs/prd.md` thoroughly. Understand:
|
|
10
|
+
- **Overview** – What problem are we solving?
|
|
11
|
+
- **Goals** – What are the measurable outcomes?
|
|
12
|
+
- **Non-Goals** – What's explicitly out of scope?
|
|
13
|
+
- **User Stories** – Who benefits and how?
|
|
14
|
+
- **Constraints** – What limitations apply?
|
|
15
|
+
|
|
16
|
+
If no PRD exists, stop and suggest running `/prd.create` first.
|
|
17
|
+
|
|
18
|
+
## 2. Scan Existing Structure
|
|
19
|
+
|
|
20
|
+
Check what already exists:
|
|
21
|
+
- `docs/implementation/overview.md` – Is there an existing outline?
|
|
22
|
+
- `docs/implementation/*/` – Any existing area directories?
|
|
23
|
+
- Codebase structure – What patterns exist?
|
|
24
|
+
|
|
25
|
+
If an outline already exists, ask:
|
|
26
|
+
> "An implementation outline already exists. Would you like me to revise it, or extend it with additional areas?"
|
|
27
|
+
|
|
28
|
+
## 3. Propose Areas
|
|
29
|
+
|
|
30
|
+
Design 3-7 major implementation areas that map to PRD goals. Consider:
|
|
31
|
+
- **Logical grouping** – Related functionality together
|
|
32
|
+
- **Dependencies** – Lower numbers = foundational, higher = builds on earlier
|
|
33
|
+
- **Scope** – Each area should be substantial but not overwhelming
|
|
34
|
+
|
|
35
|
+
Present the proposed structure:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Proposed Implementation Areas:
|
|
39
|
+
|
|
40
|
+
1. **Area Name** – Brief description (1-2 sentences)
|
|
41
|
+
Maps to PRD goals: [list relevant goals]
|
|
42
|
+
|
|
43
|
+
2. **Another Area** – Brief description
|
|
44
|
+
Maps to PRD goals: [list relevant goals]
|
|
45
|
+
|
|
46
|
+
3. ...
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Ask:
|
|
50
|
+
> "Does this breakdown make sense? Would you like to add, remove, or reorganize any areas before I create the structure?"
|
|
51
|
+
|
|
52
|
+
**Do not create files until the user confirms.**
|
|
53
|
+
|
|
54
|
+
## 4. Create the Skeleton
|
|
55
|
+
|
|
56
|
+
Once approved, create:
|
|
57
|
+
|
|
58
|
+
### Overview File
|
|
59
|
+
|
|
60
|
+
Create or update `docs/implementation/overview.md`:
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
# Implementation Overview
|
|
64
|
+
|
|
65
|
+
This document lists the major implementation areas for this project.
|
|
66
|
+
|
|
67
|
+
## Implementation Areas
|
|
68
|
+
|
|
69
|
+
1. **Area Name** – Brief description
|
|
70
|
+
- Status: 🔵 Planned
|
|
71
|
+
- See: `1-area-name/`
|
|
72
|
+
|
|
73
|
+
2. **Another Area** – Brief description
|
|
74
|
+
- Status: 🔵 Planned
|
|
75
|
+
- See: `2-another-area/`
|
|
76
|
+
|
|
77
|
+
...
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Area Directories
|
|
81
|
+
|
|
82
|
+
For each area, create:
|
|
83
|
+
- Directory: `docs/implementation/{N}-{kebab-name}/`
|
|
84
|
+
- Index file: `docs/implementation/{N}-{kebab-name}/index.md`
|
|
85
|
+
|
|
86
|
+
Index file template:
|
|
87
|
+
```markdown
|
|
88
|
+
# {N}. Area Name
|
|
89
|
+
|
|
90
|
+
Brief description of this area and what it accomplishes.
|
|
91
|
+
|
|
92
|
+
## Goals
|
|
93
|
+
- What this area achieves
|
|
94
|
+
- How it relates to PRD goals
|
|
95
|
+
|
|
96
|
+
## Key Considerations
|
|
97
|
+
- Important constraints or decisions
|
|
98
|
+
- Dependencies on other areas
|
|
99
|
+
|
|
100
|
+
## Task Groups
|
|
101
|
+
|
|
102
|
+
_Task groups will be defined when this area is detailed. Run `/impl.create {N}-{area-name}` to add detail._
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## 5. Summarize and Suggest Next Steps
|
|
106
|
+
|
|
107
|
+
After creating files, present:
|
|
108
|
+
- List of files created
|
|
109
|
+
- Suggested order for detailing areas (based on dependencies)
|
|
110
|
+
|
|
111
|
+
Ask:
|
|
112
|
+
> "The implementation outline has been created. Which area would you like to detail first? You can run `/impl.create {area}` to add task groups and tasks."
|
|
113
|
+
|
|
114
|
+
## Guidelines
|
|
115
|
+
|
|
116
|
+
- **Keep it high-level** – Don't try to detail tasks yet; that's what `/impl.create` is for
|
|
117
|
+
- **Map to PRD goals** – Every area should trace back to at least one PRD goal
|
|
118
|
+
- **Respect non-goals** – Don't create areas for out-of-scope work
|
|
119
|
+
- **Consider dependencies** – Number areas so foundational work comes first
|
|
120
|
+
- **3-7 areas is ideal** – Fewer than 3 suggests the project is simple; more than 7 suggests areas should be consolidated
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Clarify PRD
|
|
2
|
+
|
|
3
|
+
When the user invokes this command, help them refine specific sections of an existing Product Requirements Document (PRD).
|
|
4
|
+
|
|
5
|
+
## 1. Read Existing PRD
|
|
6
|
+
|
|
7
|
+
Read `docs/prd.md`. If it doesn't exist or is empty:
|
|
8
|
+
|
|
9
|
+
> "I couldn't find an existing PRD at `docs/prd.md`. Would you like me to create one first with `/prd.create`?"
|
|
10
|
+
|
|
11
|
+
Stop and wait for the user's response.
|
|
12
|
+
|
|
13
|
+
## 2. Identify Sections to Clarify
|
|
14
|
+
|
|
15
|
+
If the user specified a section with the command (e.g., "clarify the Goals section"), proceed to clarify that section.
|
|
16
|
+
|
|
17
|
+
Otherwise, present the current PRD structure and ask:
|
|
18
|
+
|
|
19
|
+
> **Current PRD Structure:**
|
|
20
|
+
>
|
|
21
|
+
> 1. **Overview** — [brief summary or "minimal content"]
|
|
22
|
+
> 2. **Goals** — [count of goals or "minimal content"]
|
|
23
|
+
> 3. **Non-Goals** — [count of non-goals or "minimal content"]
|
|
24
|
+
> 4. **User Stories** — [count of stories or "minimal content"]
|
|
25
|
+
> 5. **Constraints** — [count of constraints or "minimal content"]
|
|
26
|
+
> 6. **Success Criteria** — [count of criteria or "minimal content"]
|
|
27
|
+
>
|
|
28
|
+
> Which section(s) would you like to clarify?
|
|
29
|
+
|
|
30
|
+
Wait for the user to specify which section(s) to work on.
|
|
31
|
+
|
|
32
|
+
## 3. Clarify Each Section
|
|
33
|
+
|
|
34
|
+
For each section the user wants to clarify, follow this process:
|
|
35
|
+
|
|
36
|
+
### 3.1 Summarize Current Content
|
|
37
|
+
|
|
38
|
+
> **Current [Section Name]:**
|
|
39
|
+
>
|
|
40
|
+
> [Quote or summarize the current content]
|
|
41
|
+
|
|
42
|
+
### 3.2 Ask Targeted Questions
|
|
43
|
+
|
|
44
|
+
Ask 1-2 specific questions to draw out more detail. Tailor questions to the section:
|
|
45
|
+
|
|
46
|
+
**Overview:**
|
|
47
|
+
- "What specific problem does this solve for users?"
|
|
48
|
+
- "Why is this the right time to build this?"
|
|
49
|
+
|
|
50
|
+
**Goals:**
|
|
51
|
+
- "How will you measure [specific goal]?"
|
|
52
|
+
- "What does success look like for [goal] — can you put a number on it?"
|
|
53
|
+
- "Is [goal] achievable in your timeline, or should it be scoped differently?"
|
|
54
|
+
|
|
55
|
+
**Non-Goals:**
|
|
56
|
+
- "I noticed [feature/scope] wasn't mentioned in goals. Is that intentionally out of scope?"
|
|
57
|
+
- "Are there adjacent problems you're explicitly not solving in v1?"
|
|
58
|
+
- "What requests might stakeholders make that you'll need to say no to?"
|
|
59
|
+
|
|
60
|
+
**User Stories:**
|
|
61
|
+
- "Are there other user types who would benefit from this?"
|
|
62
|
+
- "What's the most important thing [user type] needs to accomplish?"
|
|
63
|
+
- "What would make [user type] frustrated with this solution?"
|
|
64
|
+
|
|
65
|
+
**Constraints:**
|
|
66
|
+
- "Are there technology choices that are fixed vs. flexible?"
|
|
67
|
+
- "What's the timeline, and is it firm or negotiable?"
|
|
68
|
+
- "Are there dependencies on other teams or systems?"
|
|
69
|
+
|
|
70
|
+
**Success Criteria:**
|
|
71
|
+
- "How will you actually measure [criterion]? What data do you have access to?"
|
|
72
|
+
- "What's the threshold for success vs. failure?"
|
|
73
|
+
- "When will you evaluate this — at launch, 30 days, 90 days?"
|
|
74
|
+
|
|
75
|
+
### 3.3 Push Back on Vagueness
|
|
76
|
+
|
|
77
|
+
If the user's answers are vague or unmeasurable, push back:
|
|
78
|
+
|
|
79
|
+
- ❌ "Improve user experience" → ✅ "Reduce task completion time by 20%"
|
|
80
|
+
- ❌ "Make it faster" → ✅ "Page load under 2 seconds on 3G connections"
|
|
81
|
+
- ❌ "Users will like it" → ✅ "NPS score of 40+ within 90 days"
|
|
82
|
+
|
|
83
|
+
> "That's a good direction, but it's hard to measure. How would you know if you've achieved [vague goal]? What would you observe or measure?"
|
|
84
|
+
|
|
85
|
+
### 3.4 Check for Conflicts
|
|
86
|
+
|
|
87
|
+
As you clarify, watch for conflicts with other sections:
|
|
88
|
+
|
|
89
|
+
- Goals that contradict non-goals
|
|
90
|
+
- Success criteria that don't align with goals
|
|
91
|
+
- Constraints that make goals unachievable
|
|
92
|
+
- User stories that suggest goals not listed
|
|
93
|
+
|
|
94
|
+
If you spot a conflict:
|
|
95
|
+
|
|
96
|
+
> "I noticed a potential conflict: [describe conflict]. Should we adjust one of these?"
|
|
97
|
+
|
|
98
|
+
### 3.5 Propose Updated Content
|
|
99
|
+
|
|
100
|
+
After gathering more detail, propose the updated section:
|
|
101
|
+
|
|
102
|
+
> **Proposed [Section Name]:**
|
|
103
|
+
>
|
|
104
|
+
> [Show the proposed updated content]
|
|
105
|
+
>
|
|
106
|
+
> Does this capture what we discussed, or would you like to adjust it?
|
|
107
|
+
|
|
108
|
+
Wait for user approval before proceeding.
|
|
109
|
+
|
|
110
|
+
## 4. Update the PRD
|
|
111
|
+
|
|
112
|
+
After the user approves the clarified sections:
|
|
113
|
+
|
|
114
|
+
1. Update `docs/prd.md` with the new content
|
|
115
|
+
2. Preserve sections that weren't modified
|
|
116
|
+
|
|
117
|
+
## 5. Report Changes
|
|
118
|
+
|
|
119
|
+
Summarize what was changed:
|
|
120
|
+
|
|
121
|
+
> **PRD Updated:** `docs/prd.md`
|
|
122
|
+
>
|
|
123
|
+
> **Sections clarified:**
|
|
124
|
+
> - [Section 1]: [brief description of changes]
|
|
125
|
+
> - [Section 2]: [brief description of changes]
|
|
126
|
+
>
|
|
127
|
+
> Would you like to clarify any other sections?
|
|
128
|
+
|
|
129
|
+
## Key Behaviors
|
|
130
|
+
|
|
131
|
+
Throughout this command, maintain these behaviors:
|
|
132
|
+
|
|
133
|
+
- **Be specific in questions** — Ask about concrete details, not abstract concepts
|
|
134
|
+
- **Push back on vagueness** — Measurable > aspirational
|
|
135
|
+
- **Watch for conflicts** — Sections should be internally consistent
|
|
136
|
+
- **Propose, don't impose** — Show proposed changes and wait for approval
|
|
137
|
+
- **One section at a time** — Don't overwhelm with too many changes at once
|
|
138
|
+
|
|
139
|
+
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Create PRD
|
|
2
|
+
|
|
3
|
+
When the user invokes this command, help them create a Product Requirements Document (PRD). This command supports two modes: conversational (default) and one-shot (when the user provides a description).
|
|
4
|
+
|
|
5
|
+
## 1. Check for Existing PRD
|
|
6
|
+
|
|
7
|
+
Read `docs/prd.md` if it exists. If it contains substantive content (not just the template):
|
|
8
|
+
|
|
9
|
+
> "I found an existing PRD at `docs/prd.md`. Would you like me to:"
|
|
10
|
+
> 1. **Replace it** — Start fresh with a new PRD
|
|
11
|
+
> 2. **Refine it** — Use `/prd.clarify` to improve specific sections
|
|
12
|
+
>
|
|
13
|
+
> Which would you prefer?
|
|
14
|
+
|
|
15
|
+
Wait for the user's response before proceeding.
|
|
16
|
+
|
|
17
|
+
## 2. Determine Mode
|
|
18
|
+
|
|
19
|
+
**One-shot mode:** If the user provided a description with the command (e.g., "create a PRD for a photo organization app"), proceed to Step 3.
|
|
20
|
+
|
|
21
|
+
**Conversational mode:** If the user invoked the command without a description, proceed to Step 4.
|
|
22
|
+
|
|
23
|
+
## 3. One-Shot Mode
|
|
24
|
+
|
|
25
|
+
Generate an initial PRD draft based on the user's description:
|
|
26
|
+
|
|
27
|
+
1. Parse the description for key information about:
|
|
28
|
+
- What the product/feature is
|
|
29
|
+
- Who it's for
|
|
30
|
+
- What problem it solves
|
|
31
|
+
|
|
32
|
+
2. Generate a draft PRD following the template structure from `.flight-rules/doc-templates/prd.md`:
|
|
33
|
+
- **Overview** — Synthesize the core concept
|
|
34
|
+
- **Goals** — Infer 3-5 measurable goals
|
|
35
|
+
- **Non-Goals** — Infer reasonable boundaries
|
|
36
|
+
- **User Stories** — Generate stories in "As a [user], I want [goal] so that [benefit]" format
|
|
37
|
+
- **Constraints** — Note any mentioned limitations
|
|
38
|
+
- **Success Criteria** — Propose measurable outcomes
|
|
39
|
+
|
|
40
|
+
3. Present the draft with highlighted gaps:
|
|
41
|
+
|
|
42
|
+
> **Draft PRD Generated**
|
|
43
|
+
>
|
|
44
|
+
> I've created an initial PRD based on your description. Here it is:
|
|
45
|
+
>
|
|
46
|
+
> [Show the complete draft]
|
|
47
|
+
>
|
|
48
|
+
> **Areas that may need more detail:**
|
|
49
|
+
> - [List sections that seem thin or assumed]
|
|
50
|
+
>
|
|
51
|
+
> Would you like me to:
|
|
52
|
+
> 1. Save this draft and refine specific sections
|
|
53
|
+
> 2. Walk through each section conversationally to fill in gaps
|
|
54
|
+
> 3. Save as-is
|
|
55
|
+
|
|
56
|
+
4. Based on the user's choice:
|
|
57
|
+
- Option 1: Save to `docs/prd.md` and offer to run `/prd.clarify`
|
|
58
|
+
- Option 2: Switch to conversational mode (Step 4), using the draft as a starting point
|
|
59
|
+
- Option 3: Save to `docs/prd.md` and report completion
|
|
60
|
+
|
|
61
|
+
## 4. Conversational Mode
|
|
62
|
+
|
|
63
|
+
Adopt the persona of a senior product manager who has shipped multiple successful products. You're known for asking "why" until you truly understand the problem, and for pushing back when requirements are vague or unmeasurable.
|
|
64
|
+
|
|
65
|
+
### 4.1 Introduction
|
|
66
|
+
|
|
67
|
+
> "I'm going to help you create a Product Requirements Document. I'll walk you through 6 sections, asking questions and pushing back when things are unclear. At the end, we'll have a complete PRD.
|
|
68
|
+
>
|
|
69
|
+
> Let's start with the **Overview**. What is this project, and why does it exist?"
|
|
70
|
+
|
|
71
|
+
### 4.2 Interview Through Each Section
|
|
72
|
+
|
|
73
|
+
Walk through each section one at a time:
|
|
74
|
+
|
|
75
|
+
**Section 1: Overview**
|
|
76
|
+
- Ask: What is this project? Why does it exist?
|
|
77
|
+
- Push for clarity on the core problem being solved
|
|
78
|
+
- Summarize before moving on
|
|
79
|
+
|
|
80
|
+
**Section 2: Goals**
|
|
81
|
+
- Ask: What are you trying to achieve? (aim for 3-5 goals)
|
|
82
|
+
- Challenge platitudes ("improve user experience" → "reduce time to complete X by Y%")
|
|
83
|
+
- Ask "how will you measure that?" for each goal
|
|
84
|
+
- Summarize before moving on
|
|
85
|
+
|
|
86
|
+
**Section 3: Non-Goals**
|
|
87
|
+
- Ask: What is explicitly out of scope?
|
|
88
|
+
- Don't let them skip this — people always forget and regret it
|
|
89
|
+
- Suggest non-goals based on what you've heard (e.g., "It sounds like mobile support might be a non-goal for v1?")
|
|
90
|
+
- Summarize before moving on
|
|
91
|
+
|
|
92
|
+
**Section 4: User Stories**
|
|
93
|
+
- Ask: Who benefits from this, and how?
|
|
94
|
+
- Guide toward the format: "As a [type of user], I want [goal] so that [benefit]"
|
|
95
|
+
- Push for multiple user types if appropriate
|
|
96
|
+
- Summarize before moving on
|
|
97
|
+
|
|
98
|
+
**Section 5: Constraints**
|
|
99
|
+
- Ask: What limitations affect this project?
|
|
100
|
+
- Prompt with categories: timeline, budget, technology, dependencies, team capacity
|
|
101
|
+
- Summarize before moving on
|
|
102
|
+
|
|
103
|
+
**Section 6: Success Criteria**
|
|
104
|
+
- Ask: How will you know this project succeeded?
|
|
105
|
+
- Insist on specific, measurable, observable outcomes
|
|
106
|
+
- Connect back to Goals — every goal should have a way to measure success
|
|
107
|
+
- Summarize before moving on
|
|
108
|
+
|
|
109
|
+
### 4.3 Review and Validate
|
|
110
|
+
|
|
111
|
+
Before generating the final PRD:
|
|
112
|
+
|
|
113
|
+
1. **Check consistency:**
|
|
114
|
+
- Do goals and non-goals conflict?
|
|
115
|
+
- Are success criteria aligned with goals?
|
|
116
|
+
- Are user stories coherent with the overview?
|
|
117
|
+
|
|
118
|
+
2. **Flag issues:**
|
|
119
|
+
|
|
120
|
+
> **Before I generate the PRD, I noticed:**
|
|
121
|
+
> - [List any inconsistencies or gaps]
|
|
122
|
+
>
|
|
123
|
+
> Would you like to address these, or proceed as-is?
|
|
124
|
+
|
|
125
|
+
3. **Generate the complete PRD** following the template structure
|
|
126
|
+
|
|
127
|
+
## 5. Save and Report
|
|
128
|
+
|
|
129
|
+
Save the PRD to `docs/prd.md` and confirm:
|
|
130
|
+
|
|
131
|
+
> **PRD Created:** `docs/prd.md`
|
|
132
|
+
>
|
|
133
|
+
> **Summary:**
|
|
134
|
+
> - Overview: [one-line summary]
|
|
135
|
+
> - Goals: [count] goals defined
|
|
136
|
+
> - Non-Goals: [count] non-goals defined
|
|
137
|
+
> - User Stories: [count] user stories
|
|
138
|
+
> - Constraints: [count] constraints noted
|
|
139
|
+
> - Success Criteria: [count] measurable criteria
|
|
140
|
+
>
|
|
141
|
+
> You can refine specific sections later with `/prd.clarify`.
|
|
142
|
+
|
|
143
|
+
## Key Behaviors
|
|
144
|
+
|
|
145
|
+
Throughout this command, maintain these behaviors:
|
|
146
|
+
|
|
147
|
+
- **Push back on vagueness** — Don't accept first answers that are unclear
|
|
148
|
+
- **Ask "why" repeatedly** — Until the real problem is understood
|
|
149
|
+
- **Demand measurability** — Goals and success criteria must be specific
|
|
150
|
+
- **Enforce non-goals** — These prevent scope creep
|
|
151
|
+
- **Check consistency** — Goals, non-goals, and success criteria should align
|
|
152
|
+
- **Help, don't block** — If user says "I don't know," help them figure it out
|
|
153
|
+
|
|
154
|
+
|