@cliangdev/flux-plugin 0.0.0-dev.1db9c6c

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.
@@ -0,0 +1,242 @@
1
+ ---
2
+ name: flux:prd-template
3
+ description: PRD structure and patterns for Flux. Use when creating or refining product requirement documents. PRDs should be concise for humans but detailed enough for AI agents to implement.
4
+ user-invocable: false
5
+ ---
6
+
7
+ # PRD Template Skill
8
+
9
+ PRDs should be **concise for human review** but contain **enough detail for AI implementation**.
10
+
11
+ ## PRD Structure (Required)
12
+
13
+ ```markdown
14
+ # {Project Name}
15
+
16
+ ## Table of Contents
17
+ - [Problem](#problem)
18
+ - [Users](#users)
19
+ - [Solution](#solution)
20
+ - [Features (MVP)](#features-mvp)
21
+ - [P0: Must Have](#p0-must-have)
22
+ - [P1: Should Have](#p1-should-have)
23
+ - [Out of Scope](#out-of-scope)
24
+ - [Constraints](#constraints)
25
+ - [Open Questions](#open-questions)
26
+
27
+ ## Problem
28
+ {2-3 sentences: What problem are we solving? Why does it matter?}
29
+
30
+ ## Users
31
+ {Who has this problem? 1-2 user segments.}
32
+
33
+ ## Solution
34
+ {1 paragraph: What are we building to solve this?}
35
+
36
+ ## Features (MVP)
37
+
38
+ ### P0: Must Have
39
+ - **{Feature 1}**: {One sentence description}
40
+ - {Acceptance criterion 1}
41
+ - {Acceptance criterion 2}
42
+ - **{Feature 2}**: {One sentence description}
43
+ - {Acceptance criterion}
44
+
45
+ ### P1: Should Have
46
+ - **{Feature}**: {Description}
47
+
48
+ ### Out of Scope
49
+ - {What we're NOT building}
50
+ - {Future considerations}
51
+
52
+ ## Constraints
53
+ - **Tech Stack**: {Required technologies, if any}
54
+ - **Timeline**: {Any deadlines}
55
+ - **Other**: {Budget, compliance, etc.}
56
+
57
+ ## Open Questions
58
+ - {Unresolved decisions needing input}
59
+ ```
60
+
61
+ ### TOC Guidelines
62
+
63
+ **For Local Adapter** (files in `.flux/prds/`):
64
+ - Include TOC with anchor links (e.g., `[Problem](#problem)`)
65
+ - Use lowercase with hyphens for anchors
66
+ - Nest sub-sections under parent sections
67
+
68
+ **For External Adapters** (Linear, Notion):
69
+ - **Skip TOC** - External systems have their own navigation (Linear's outline, collapsible sections)
70
+ - Linear generates unique anchor suffixes making pre-built links impossible
71
+
72
+ ## Guidelines
73
+
74
+ ### Keep It Short
75
+ - Problem: 2-3 sentences max
76
+ - Features: 3-5 P0 features for MVP
77
+ - Each feature: 1 sentence + 2-4 acceptance criteria
78
+ - Total PRD: 1-2 pages
79
+
80
+ ### Write for AI Implementation
81
+ - Acceptance criteria should be testable
82
+ - Use specific, unambiguous language
83
+ - Include edge cases in criteria when important
84
+
85
+ ### Bad vs Good Examples
86
+
87
+ **Bad feature:**
88
+ > - User authentication
89
+
90
+ **Good feature:**
91
+ > - **User Authentication**: Users can sign up and log in with email/password
92
+ > - Sign up requires email, password (min 8 chars), and name
93
+ > - Login with email + password returns JWT token
94
+ > - Invalid credentials show error message
95
+ > - Forgot password sends reset email
96
+
97
+ ## Supporting Documents (Optional)
98
+
99
+ Generate based on **agent confidence** and **user request**.
100
+
101
+ | Document | When to Generate |
102
+ |----------|------------------|
103
+ | `architecture.md` | Complex systems, multiple components, API integrations |
104
+ | `wireframes.md` | UI-heavy features, user specifically requests |
105
+ | `data-model.md` | Custom data storage, complex relationships |
106
+ | `user-flows.md` | Multi-step processes, complex user journeys |
107
+
108
+ ### Asking About Supporting Docs
109
+
110
+ After PRD outline approval, ask:
111
+
112
+ ```
113
+ PRD outline looks good. I can also generate:
114
+ - Architecture diagram (recommended for this project)
115
+ - UI wireframes
116
+ - Data model
117
+
118
+ Which would you like? Or should I proceed with just the PRD?
119
+ ```
120
+
121
+ Recommend based on project type:
122
+ - **Web App**: architecture, wireframes
123
+ - **API/Backend**: architecture, data-model
124
+ - **CLI Tool**: usually just PRD
125
+ - **Mobile App**: architecture, wireframes
126
+
127
+ ## Supporting Doc Templates
128
+
129
+ ### architecture.md
130
+
131
+ ```markdown
132
+ # Architecture
133
+
134
+ ## Overview
135
+ {One paragraph system description}
136
+
137
+ ## Components
138
+
139
+ ```mermaid
140
+ graph TB
141
+ Client[Client] --> API[API Server]
142
+ API --> DB[(Database)]
143
+ API --> Cache[(Redis)]
144
+ ```
145
+
146
+ ## API Endpoints
147
+
148
+ | Method | Path | Description |
149
+ |--------|------|-------------|
150
+ | POST | /api/users | Create user |
151
+ | GET | /api/users/:id | Get user |
152
+
153
+ ## Data Flow
154
+ {Describe key data flows}
155
+
156
+ ## Tech Stack
157
+ - **Frontend**: {tech}
158
+ - **Backend**: {tech}
159
+ - **Database**: {tech}
160
+ ```
161
+
162
+ ### wireframes.md
163
+
164
+ ```markdown
165
+ # Wireframes
166
+
167
+ ## Screen: {Name}
168
+
169
+ ```
170
+ +----------------------------------+
171
+ | Logo [Login] [Sign Up]
172
+ +----------------------------------+
173
+ | |
174
+ | Welcome to {App Name} |
175
+ | |
176
+ | [ Email ] |
177
+ | [Password ] |
178
+ | [ Login ] |
179
+ | |
180
+ | Forgot password? |
181
+ +----------------------------------+
182
+ ```
183
+
184
+ **Elements:**
185
+ - Logo: links to home
186
+ - Login button: submits form
187
+ - Forgot password: opens reset flow
188
+ ```
189
+
190
+ ### data-model.md
191
+
192
+ ```markdown
193
+ # Data Model
194
+
195
+ ## ERD
196
+
197
+ ```mermaid
198
+ erDiagram
199
+ User ||--o{ Post : creates
200
+ Post ||--o{ Comment : has
201
+ ```
202
+
203
+ ## Tables
204
+
205
+ ### users
206
+ | Column | Type | Constraints |
207
+ |--------|------|-------------|
208
+ | id | uuid | PK |
209
+ | email | varchar | unique, not null |
210
+ | created_at | timestamp | default now() |
211
+
212
+ ### posts
213
+ | Column | Type | Constraints |
214
+ |--------|------|-------------|
215
+ | id | uuid | PK |
216
+ | user_id | uuid | FK users.id |
217
+ | content | text | not null |
218
+ ```
219
+
220
+ ## Workflow
221
+
222
+ Check adapter type via `get_project_context` to determine storage behavior.
223
+
224
+ ### Local Adapter (`adapter.type === "local"`)
225
+
226
+ 1. **Interview** → Collect answers via AskUserQuestion
227
+ 2. **Outline** → Generate brief outline, ask for approval
228
+ 3. **Create entity** → Call `create_prd` with title and short description
229
+ 4. **Write PRD** → Write full PRD to `.flux/prds/{slug}/prd.md`
230
+ 5. **Set folder_path** → Call `update_entity` with `folder_path`: `.flux/prds/{slug}`
231
+ 6. **Ask about docs** → Offer relevant supporting docs
232
+ 7. **Generate docs** → Write requested docs to same folder
233
+
234
+ ### External Adapters (`adapter.type === "linear"`, `"notion"`, etc.)
235
+
236
+ 1. **Interview** → Collect answers via AskUserQuestion
237
+ 2. **Outline** → Generate brief outline, ask for approval
238
+ 3. **Create entity** → Call `create_prd` with title and short description
239
+ 4. **Sync content** → Call `update_entity` with `description`: Full PRD markdown content
240
+ 5. **Ask about docs** → Offer relevant supporting docs (stored as attachments in external system)
241
+
242
+ **Note**: External adapters store all content in the external system. No local `.flux/prds/` files are created.