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