@curdx/flow 2.0.0-beta.1 → 2.0.0-beta.10
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +3 -10
- package/CHANGELOG.md +20 -0
- package/README.zh.md +2 -2
- package/agent-preamble/preamble.md +81 -11
- package/agents/flow-adversary.md +40 -55
- package/agents/flow-architect.md +23 -10
- package/agents/flow-debugger.md +2 -2
- package/agents/flow-edge-hunter.md +20 -6
- package/agents/flow-executor.md +3 -3
- package/agents/flow-planner.md +51 -48
- package/agents/flow-product-designer.md +14 -1
- package/agents/flow-qa-engineer.md +1 -1
- package/agents/flow-researcher.md +17 -2
- package/agents/flow-reviewer.md +5 -1
- package/agents/flow-security-auditor.md +1 -1
- package/agents/flow-triage-analyst.md +1 -1
- package/agents/flow-ui-researcher.md +2 -2
- package/agents/flow-ux-designer.md +1 -1
- package/agents/flow-verifier.md +47 -14
- package/bin/curdx-flow.js +13 -1
- package/cli/doctor.js +28 -13
- package/cli/install.js +62 -36
- package/cli/protocols.js +63 -10
- package/cli/registry.js +73 -0
- package/cli/uninstall.js +9 -11
- package/cli/upgrade.js +6 -10
- package/cli/utils.js +104 -56
- package/commands/fast.md +1 -1
- package/commands/implement.md +4 -4
- package/commands/init.md +14 -3
- package/commands/review.md +14 -5
- package/commands/spec.md +26 -2
- package/commands/start.md +47 -17
- package/commands/verify.md +13 -0
- package/gates/adversarial-review-gate.md +19 -19
- package/gates/devex-gate.md +4 -5
- package/gates/edge-case-gate.md +1 -1
- package/hooks/hooks.json +0 -11
- package/hooks/scripts/quick-mode-guard.sh +12 -9
- package/hooks/scripts/session-start.sh +1 -1
- package/hooks/scripts/stop-watcher.sh +25 -15
- package/knowledge/execution-strategies.md +6 -5
- package/knowledge/spec-driven-development.md +8 -7
- package/knowledge/two-stage-review.md +4 -3
- package/package.json +4 -2
- package/skills/brownfield-index/SKILL.md +62 -0
- package/skills/browser-qa/SKILL.md +50 -0
- package/skills/epic/SKILL.md +68 -0
- package/skills/security-audit/SKILL.md +50 -0
- package/skills/ui-sketch/SKILL.md +49 -0
- package/templates/config.json.tmpl +1 -1
- package/templates/design.md.tmpl +32 -112
- package/templates/requirements.md.tmpl +25 -43
- package/templates/research.md.tmpl +37 -68
- package/templates/tasks.md.tmpl +27 -84
- package/hooks/scripts/fail-tracker.sh +0 -31
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: epic
|
|
3
|
+
description: Invoke when user wants to break a large feature into multiple smaller specs with a dependency graph. Triggers on "epic", "big feature", "too big", "decompose", "break down", "break into", "split into", "multi-spec", "multiple features", "sub-features", "vertical slice", "parent feature", "large scope", "won't fit in one sprint", "needs splitting".
|
|
4
|
+
allowed-tools: [Read, Write, Grep, Glob, Bash]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Epic Decomposition
|
|
8
|
+
|
|
9
|
+
You are invoked when the user wants to break a large feature into multiple vertical-slice specs.
|
|
10
|
+
|
|
11
|
+
## Preconditions
|
|
12
|
+
|
|
13
|
+
1. A `.flow/` project must exist (run `/curdx-flow:init` first if missing).
|
|
14
|
+
2. The user has stated a feature scope that is too large for a single spec.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
### Step 1: Clarify the epic scope
|
|
19
|
+
|
|
20
|
+
Ask the user (or infer from context) for:
|
|
21
|
+
- **Epic name** (short identifier, kebab-case)
|
|
22
|
+
- **One-sentence goal** of the whole epic
|
|
23
|
+
- **Hard boundary**: what is explicitly out of scope for this epic
|
|
24
|
+
|
|
25
|
+
### Step 2: Dispatch `flow-triage-analyst`
|
|
26
|
+
|
|
27
|
+
Delegate to the `flow-triage-analyst` agent with the epic name + goal + boundary. The agent returns:
|
|
28
|
+
- A vertical-slice decomposition (not horizontal by layer)
|
|
29
|
+
- Dependency graph between slices
|
|
30
|
+
- Shared interfaces that must be frozen before parallel work begins
|
|
31
|
+
- Suggested slice ordering (MVP → iteration → polish)
|
|
32
|
+
|
|
33
|
+
### Step 3: Write epic manifest
|
|
34
|
+
|
|
35
|
+
Create `.flow/_epics/<epic-name>/epic.md` with:
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
# Epic: <name>
|
|
39
|
+
|
|
40
|
+
## Goal
|
|
41
|
+
<one sentence>
|
|
42
|
+
|
|
43
|
+
## Slices (vertical)
|
|
44
|
+
| ID | Slice | Depends on | Shared interface |
|
|
45
|
+
|----|-------|-----------|------------------|
|
|
46
|
+
| S1 | ... | — | — |
|
|
47
|
+
| S2 | ... | S1 | `types/auth.ts` |
|
|
48
|
+
| S3 | ... | S1 | — |
|
|
49
|
+
|
|
50
|
+
## Frozen Interfaces
|
|
51
|
+
(contracts that must not change once slices start)
|
|
52
|
+
|
|
53
|
+
## Out of Scope
|
|
54
|
+
- ...
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Step 4: Scaffold sub-spec skeletons
|
|
58
|
+
|
|
59
|
+
For each slice, create `.flow/specs/<epic-name>-<slice-id>/` with a minimal `.state.json` linking back to the epic manifest.
|
|
60
|
+
|
|
61
|
+
### Step 5: Report to user
|
|
62
|
+
|
|
63
|
+
Summarize: "Epic `<name>` decomposed into N vertical slices. Start any slice with `/curdx-flow:start <epic-name>-<slice-id>`. Suggested order: S1 → S2 → S3."
|
|
64
|
+
|
|
65
|
+
## References
|
|
66
|
+
|
|
67
|
+
- Vertical-slice methodology: `@${CLAUDE_PLUGIN_ROOT}/knowledge/epic-decomposition.md`
|
|
68
|
+
- Spec skeleton: `@${CLAUDE_PLUGIN_ROOT}/templates/`
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-audit
|
|
3
|
+
description: Invoke when the user wants a security review — OWASP Top 10, STRIDE threat modeling, credential handling, injection, secrets, sensitive data handling. Triggers on "security", "auth", "authentication", "credential", "password", "secret", "API key", "token", "OWASP", "STRIDE", "CVE", "vulnerability", "injection", "XSS", "CSRF", "SSRF", "SQL injection", "hardcoded secret", "sensitive data", "leak", "will my API key leak", "is this safe".
|
|
4
|
+
allowed-tools: [Read, Grep, Glob, Bash, WebSearch]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Security Audit
|
|
8
|
+
|
|
9
|
+
You are invoked when the user wants a systematic security review of the current spec or codebase.
|
|
10
|
+
|
|
11
|
+
## Preconditions
|
|
12
|
+
|
|
13
|
+
1. The code or spec under review is reachable from the current working directory.
|
|
14
|
+
2. The user has identified the scope (current spec, specific module, or whole repo).
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
### Step 1: Clarify audit scope
|
|
19
|
+
|
|
20
|
+
Confirm:
|
|
21
|
+
- **Scope** (current spec / specific paths / whole repo)
|
|
22
|
+
- **Depth** (OWASP-only / OWASP + STRIDE / + dependency CVE scan)
|
|
23
|
+
- **Risk tolerance** (block on any SR / only block on SR with POC / advisory only)
|
|
24
|
+
|
|
25
|
+
### Step 2: Dispatch `flow-security-auditor`
|
|
26
|
+
|
|
27
|
+
Delegate to the `flow-security-auditor` agent. It will:
|
|
28
|
+
1. Scan for hardcoded secrets, weak crypto, unsanitized inputs
|
|
29
|
+
2. Apply OWASP Top 10 (A01 Broken Access Control → A10 SSRF)
|
|
30
|
+
3. Apply STRIDE threat modeling (Spoofing, Tampering, Repudiation, Information disclosure, DoS, Elevation)
|
|
31
|
+
4. Run dependency CVE scan (`npm audit` / equivalent)
|
|
32
|
+
5. Produce a findings report with severity labels (SR = Blocking Red line, SW = Warning, SM = Mandatory-to-address)
|
|
33
|
+
|
|
34
|
+
### Step 3: Write security report
|
|
35
|
+
|
|
36
|
+
Output `.flow/specs/<active>/security-audit.md` containing:
|
|
37
|
+
- **SR (blocking)** — must fix before ship
|
|
38
|
+
- **SW (warning)** — should fix, won't block
|
|
39
|
+
- **SM (mandatory)** — baseline items that must be present
|
|
40
|
+
- **CVE hits** — direct / transitive dependencies with known vulns
|
|
41
|
+
- **Recommended fixes** — concrete patches, not generic advice
|
|
42
|
+
|
|
43
|
+
### Step 4: Enforce gate
|
|
44
|
+
|
|
45
|
+
Apply the `security-gate` (`@${CLAUDE_PLUGIN_ROOT}/gates/security-gate.md`) — if any SR findings exist, block completion until remediated or explicitly waived with a D-NN decision in STATE.md.
|
|
46
|
+
|
|
47
|
+
## References
|
|
48
|
+
|
|
49
|
+
- `flow-security-auditor` agent: `@${CLAUDE_PLUGIN_ROOT}/agents/flow-security-auditor.md`
|
|
50
|
+
- security-gate: `@${CLAUDE_PLUGIN_ROOT}/gates/security-gate.md`
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-sketch
|
|
3
|
+
description: Invoke when the user wants UI design drafts — components, layouts, variants, mockups, CSS/theme/styling decisions. Triggers on "design UI", "UI design", "component layout", "variants", "wireframe", "mockup", "prototype", "sketch", "draft layout", "visual design", "styling", "CSS", "theming", "dark mode", "responsive design", "color scheme", "build me a UI", "show several variants", "try different colors".
|
|
4
|
+
allowed-tools: [Read, Write, Bash, WebSearch]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# UI Sketch
|
|
8
|
+
|
|
9
|
+
You are invoked when the user wants fresh UI design drafts — typically 2–4 variants for comparison, or a single iterative refinement.
|
|
10
|
+
|
|
11
|
+
## Preconditions
|
|
12
|
+
|
|
13
|
+
1. The `frontend-design` skill (Anthropic official) should be installed. Without it, fall back to Tailwind + shadcn/ui defaults.
|
|
14
|
+
2. The user provides a description of the UI goal (component, page, or flow).
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
### Step 1: Clarify design brief
|
|
19
|
+
|
|
20
|
+
Confirm with the user:
|
|
21
|
+
- **What is being designed** (component / page / full screen)
|
|
22
|
+
- **Context** (consumer product / enterprise tool / marketing site / internal dashboard)
|
|
23
|
+
- **Must-haves** (brand colors / existing design system / responsive breakpoints)
|
|
24
|
+
- **Variant count** (default: 3 variants with distinct design directions)
|
|
25
|
+
|
|
26
|
+
### Step 2: Dispatch `flow-ux-designer`
|
|
27
|
+
|
|
28
|
+
Delegate to the `flow-ux-designer` agent with the brief. It will:
|
|
29
|
+
1. Invoke the `frontend-design` skill with the brief
|
|
30
|
+
2. Generate N variant HTML/JSX files under `.flow/specs/<active>/sketches/`
|
|
31
|
+
3. For each variant, produce a rationale: typography, color, layout decisions
|
|
32
|
+
4. Open the variants for user preview if a dev server is running
|
|
33
|
+
|
|
34
|
+
### Step 3: Present variants
|
|
35
|
+
|
|
36
|
+
Show the user:
|
|
37
|
+
- **Variant preview URLs** or file paths
|
|
38
|
+
- **Design rationale** per variant (what's different, why)
|
|
39
|
+
- **Accessibility notes** (contrast ratios, focus states)
|
|
40
|
+
|
|
41
|
+
### Step 4: Iterate or finalize
|
|
42
|
+
|
|
43
|
+
- If user picks a variant: move the chosen file into the spec's `design.md` asset section.
|
|
44
|
+
- If user wants a hybrid: dispatch `flow-ux-designer` again with "merge variant A layout + variant B color scheme".
|
|
45
|
+
|
|
46
|
+
## References
|
|
47
|
+
|
|
48
|
+
- `flow-ux-designer` agent: `@${CLAUDE_PLUGIN_ROOT}/agents/flow-ux-designer.md`
|
|
49
|
+
- `flow-ui-researcher` agent (for competitive reference scraping): `@${CLAUDE_PLUGIN_ROOT}/agents/flow-ui-researcher.md`
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"specs": {
|
|
33
33
|
"directories": ["./.flow/specs"],
|
|
34
34
|
"default_task_size": "fine",
|
|
35
|
-
"
|
|
35
|
+
"_task_size_hint": "as-needed decomposition (no fixed count) — see agents/flow-planner.md"
|
|
36
36
|
},
|
|
37
37
|
|
|
38
38
|
"addons": {
|
package/templates/design.md.tmpl
CHANGED
|
@@ -9,155 +9,75 @@ depends_on: requirements.md
|
|
|
9
9
|
|
|
10
10
|
# Technical Design: {{SPEC_NAME}}
|
|
11
11
|
|
|
12
|
-
> Conclusions from
|
|
13
|
-
>
|
|
12
|
+
> Conclusions from flow-architect. Sequential-thinking is invoked proportional to the genuine tradeoff surface — the chain lives in the thinking tool, not this document.
|
|
13
|
+
>
|
|
14
|
+
> **Fill only the sections that carry real design information for this feature.** Well-known stack assemblies legitimately compress to a stack list + data model + a few real ADs. Delete sections whose honest answer would be "N/A" or "standard for this stack". A forced 13-section template is the bloat pattern this is designed to prevent.
|
|
14
15
|
|
|
15
16
|
---
|
|
16
17
|
|
|
17
18
|
## Design Overview (one paragraph)
|
|
18
19
|
|
|
19
|
-
<!-- One
|
|
20
|
+
<!-- One sentence summary of the approach. -->
|
|
20
21
|
|
|
21
22
|
## Architecture Decisions
|
|
22
23
|
|
|
23
|
-
<!-- Each
|
|
24
|
+
<!-- Each real decision gets an AD-NN. If a decision is "obvious, no alternative worth listing," use one line and move on. -->
|
|
24
25
|
|
|
25
26
|
### AD-01: ...
|
|
26
|
-
- **Decision**: Use X
|
|
27
|
+
- **Decision**: Use X
|
|
27
28
|
- **Rationale**: ...
|
|
28
|
-
- **Trade-off**:
|
|
29
|
-
- **sequentialthinking rounds**: rounds 3-5
|
|
30
|
-
|
|
31
|
-
### AD-02: ...
|
|
32
|
-
|
|
33
|
-
## System Architecture Diagram
|
|
34
|
-
|
|
35
|
-
```mermaid
|
|
36
|
-
flowchart TB
|
|
37
|
-
<!-- actual data flow generated by flow-architect -->
|
|
38
|
-
User[User] --> API[API Gateway]
|
|
39
|
-
API --> Auth[Auth Service]
|
|
40
|
-
Auth --> DB[(Database)]
|
|
41
|
-
```
|
|
29
|
+
- **Trade-off**: ... (omit if there is no genuine tradeoff)
|
|
42
30
|
|
|
43
31
|
## Component Design
|
|
44
32
|
|
|
45
|
-
<!-- Each component
|
|
33
|
+
<!-- Each component: responsibility, input type, output type, dependencies, error path. Skip if the feature is a single module with no internal boundaries worth naming. -->
|
|
46
34
|
|
|
47
|
-
### Component: {{
|
|
35
|
+
### Component: {{COMP_NAME}}
|
|
48
36
|
- **Responsibility**: ...
|
|
49
|
-
- **Input**:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
- **Output**:
|
|
56
|
-
```ts
|
|
57
|
-
interface Output {
|
|
58
|
-
field: Type;
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
- **Dependencies**: Component X, Library Y
|
|
62
|
-
- **Errors**:
|
|
63
|
-
- `ErrorCode.X` — when ... happens
|
|
64
|
-
- `ErrorCode.Y` — when ... happens
|
|
65
|
-
|
|
66
|
-
### Component: {{COMP_NAME_2}}
|
|
67
|
-
<!-- ... -->
|
|
68
|
-
|
|
69
|
-
## Data Model
|
|
70
|
-
|
|
71
|
-
<!-- Database schema / data structures -->
|
|
72
|
-
|
|
73
|
-
### Entity: ...
|
|
74
|
-
```sql
|
|
75
|
-
CREATE TABLE ... (
|
|
76
|
-
id UUID PRIMARY KEY,
|
|
77
|
-
...
|
|
78
|
-
);
|
|
79
|
-
```
|
|
37
|
+
- **Input**: `interface Input { ... }`
|
|
38
|
+
- **Output**: `interface Output { ... }`
|
|
39
|
+
- **Dependencies**: ...
|
|
40
|
+
- **Errors**: ...
|
|
80
41
|
|
|
81
|
-
|
|
82
|
-
```ts
|
|
83
|
-
interface Entity {
|
|
84
|
-
id: string;
|
|
85
|
-
...
|
|
86
|
-
}
|
|
87
|
-
```
|
|
42
|
+
## Data Model (if the feature touches persistence or structured data)
|
|
88
43
|
|
|
89
|
-
|
|
44
|
+
<!-- SQL schema, TypeScript types, or API payload shape. Delete if the feature has no meaningful data shape. -->
|
|
45
|
+
|
|
46
|
+
## Architecture Diagram (include only when it clarifies; prose often suffices)
|
|
90
47
|
|
|
91
48
|
```mermaid
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Pending --> Active: approve
|
|
95
|
-
Pending --> Rejected: reject
|
|
96
|
-
Active --> Completed: finish
|
|
49
|
+
flowchart TB
|
|
50
|
+
...
|
|
97
51
|
```
|
|
98
52
|
|
|
99
|
-
##
|
|
53
|
+
## State Machine (include only if the feature has non-trivial state transitions)
|
|
100
54
|
|
|
101
|
-
|
|
55
|
+
## Error Path Design (include when error behavior is not obvious)
|
|
102
56
|
|
|
103
|
-
| Scenario |
|
|
104
|
-
|
|
105
|
-
|
|
|
106
|
-
| Rate limit hit | none | return 429 | "Too many requests, retry in 60 seconds" |
|
|
57
|
+
| Scenario | System Response | User-visible |
|
|
58
|
+
|-----|---------|---------|
|
|
59
|
+
| ... | ... | ... |
|
|
107
60
|
|
|
108
|
-
## API Contract
|
|
109
|
-
|
|
110
|
-
<!-- If this is an API project -->
|
|
61
|
+
## API Contract (include only if this feature exposes or changes an API)
|
|
111
62
|
|
|
112
63
|
```yaml
|
|
113
|
-
|
|
114
|
-
Request:
|
|
115
|
-
body:
|
|
116
|
-
field: string
|
|
117
|
-
Response:
|
|
118
|
-
200:
|
|
119
|
-
body:
|
|
120
|
-
field: string
|
|
121
|
-
400:
|
|
122
|
-
body:
|
|
123
|
-
error: string
|
|
64
|
+
...
|
|
124
65
|
```
|
|
125
66
|
|
|
126
|
-
## Test Matrix
|
|
67
|
+
## Test Matrix (brief — one line per layer)
|
|
127
68
|
|
|
128
69
|
| Layer | Coverage | Tool |
|
|
129
70
|
|---|-----|------|
|
|
130
|
-
|
|
|
131
|
-
| Integration | Between components | vitest + supertest |
|
|
132
|
-
| E2E | Complete user flows | playwright / chrome-devtools MCP |
|
|
133
|
-
|
|
134
|
-
### Key Test Scenarios
|
|
135
|
-
1. Happy path: ...
|
|
136
|
-
2. Edge case 1: ...
|
|
137
|
-
3. Error recovery: ...
|
|
138
|
-
|
|
139
|
-
## Suggested Implementation Order
|
|
140
|
-
|
|
141
|
-
<!-- Reference for decomposition in the tasks phase -->
|
|
142
|
-
|
|
143
|
-
1. Build skeleton first (Component A → empty implementation)
|
|
144
|
-
2. Then wire up the real logic (core logic of Component A)
|
|
145
|
-
3. Connect DB (persistence for Component A)
|
|
146
|
-
4. Then do Component B ...
|
|
147
|
-
|
|
148
|
-
## Risks and Mitigations
|
|
71
|
+
| ... | ... | ... |
|
|
149
72
|
|
|
150
|
-
|
|
151
|
-
|-----|-----|------|
|
|
152
|
-
| ... | medium | ... |
|
|
73
|
+
## Risks and Mitigations (include only if risks exist that aren't obvious from the ADs)
|
|
153
74
|
|
|
154
75
|
## Defer to Implementation
|
|
155
76
|
|
|
156
|
-
<!-- Decisions
|
|
77
|
+
<!-- Decisions explicitly deferred to when the executor writes the code. -->
|
|
157
78
|
|
|
158
|
-
-
|
|
159
|
-
- Caching strategy → no caching initially, adjust based on data after launch
|
|
79
|
+
- ...
|
|
160
80
|
|
|
161
81
|
---
|
|
162
82
|
|
|
163
|
-
_Generated by flow-architect
|
|
83
|
+
_Generated by flow-architect on {{CREATED_DATE}}._
|
|
@@ -9,86 +9,68 @@ depends_on: research.md
|
|
|
9
9
|
|
|
10
10
|
# Requirements Spec: {{SPEC_NAME}}
|
|
11
11
|
|
|
12
|
-
> **Recommended direction from
|
|
12
|
+
> **Recommended direction from research**: {{RESEARCH_CONCLUSION}}
|
|
13
13
|
>
|
|
14
|
-
>
|
|
14
|
+
> **Fill only the sections that carry real information for this feature.** Delete or collapse any section whose honest content would be "N/A" or "same as usual". Padding sections with "TBD" is worse than omitting them.
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
## User Stories
|
|
19
19
|
|
|
20
|
-
<!-- Each story follows the format: As X, I want Y, so that Z -->
|
|
21
|
-
|
|
22
20
|
### US-01: ...
|
|
23
|
-
**As** [user role],
|
|
24
|
-
**I want** [capability],
|
|
25
|
-
**so that** [business value].
|
|
21
|
+
**As** [user role], **I want** [capability], **so that** [business value].
|
|
26
22
|
|
|
27
23
|
**Acceptance criteria**:
|
|
28
24
|
- AC-1.1: [verifiable behavior]
|
|
29
|
-
- AC-1.2:
|
|
30
|
-
- AC-1.3: [edge case handling]
|
|
25
|
+
- AC-1.2: ...
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
<!-- ... -->
|
|
27
|
+
<!-- Add more US-NN blocks only if the feature genuinely has multiple independent user flows. -->
|
|
34
28
|
|
|
35
29
|
## Functional Requirements
|
|
36
30
|
|
|
37
|
-
<!-- FR-NN format. Each FR must be a verifiable statement of "the system must X". -->
|
|
38
|
-
|
|
39
31
|
- **FR-01**: The system must ...
|
|
40
|
-
- **FR-02**:
|
|
41
|
-
- **FR-03**: ...
|
|
32
|
+
- **FR-02**: ...
|
|
42
33
|
|
|
43
34
|
## Non-Functional Requirements
|
|
44
35
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
<!--
|
|
37
|
+
Include ONLY the NFR categories that this feature is actually constrained by.
|
|
38
|
+
For a small internal CRUD feature, "Performance / Security / Maintainability / Compatibility" as a four-bucket grid is usually padding.
|
|
39
|
+
Delete categories that have no real requirement, or collapse into one line: "NFR: standard for this stack, no special constraints."
|
|
40
|
+
-->
|
|
48
41
|
|
|
49
|
-
###
|
|
50
|
-
- **NFR-
|
|
51
|
-
- **NFR-S-02**: ...
|
|
42
|
+
### Performance (if applicable)
|
|
43
|
+
- **NFR-P-01**: ...
|
|
52
44
|
|
|
53
|
-
###
|
|
54
|
-
- **NFR-
|
|
45
|
+
### Security (if applicable)
|
|
46
|
+
- **NFR-S-01**: ...
|
|
55
47
|
|
|
56
|
-
|
|
57
|
-
- **NFR-C-01**: ...
|
|
48
|
+
<!-- Delete Maintainability / Compatibility sections unless they carry a real constraint. -->
|
|
58
49
|
|
|
59
50
|
## Edge Cases and Error Handling
|
|
60
51
|
|
|
61
|
-
<!--
|
|
52
|
+
<!-- Include rows only for scenarios that actually apply. -->
|
|
62
53
|
|
|
63
54
|
| Scenario | Expected behavior |
|
|
64
55
|
|-----|--------|
|
|
65
|
-
|
|
|
66
|
-
| Database exception | ... |
|
|
67
|
-
| Invalid input | ... |
|
|
68
|
-
| Concurrent conflict | ... |
|
|
56
|
+
| ... | ... |
|
|
69
57
|
|
|
70
58
|
## Out of Scope
|
|
71
59
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- ✗ Feature A — deferred to the next version
|
|
75
|
-
- ✗ Feature B — out of budget
|
|
76
|
-
- ✗ Feature C — needs its own spec
|
|
60
|
+
- ✗ ...
|
|
77
61
|
|
|
78
|
-
## Success Metrics
|
|
62
|
+
## Success Metrics (if the feature has measurable outcomes)
|
|
79
63
|
|
|
80
|
-
<!--
|
|
64
|
+
<!-- Delete this section for internal tools or refactors with no user-visible metric. -->
|
|
81
65
|
|
|
82
|
-
- Metric 1:
|
|
83
|
-
- Metric 2: [e.g. complaint rate < 1%]
|
|
66
|
+
- Metric 1: ...
|
|
84
67
|
|
|
85
68
|
## Open Questions
|
|
86
69
|
|
|
87
|
-
<!--
|
|
70
|
+
<!-- Include only if there are genuinely unresolved questions. Delete when empty. -->
|
|
88
71
|
|
|
89
|
-
1.
|
|
90
|
-
2. **Question 2**: ...
|
|
72
|
+
1. ...
|
|
91
73
|
|
|
92
74
|
---
|
|
93
75
|
|
|
94
|
-
_Generated by flow-product-designer
|
|
76
|
+
_Generated by flow-product-designer on {{CREATED_DATE}}._
|
|
@@ -10,105 +10,74 @@ status: in_progress
|
|
|
10
10
|
|
|
11
11
|
> **Goal**: {{SPEC_GOAL}}
|
|
12
12
|
>
|
|
13
|
-
>
|
|
13
|
+
> **Fill only the sections that carry real information.** For a well-understood feature on a known stack, research legitimately compresses to: goal, one recommended direction, known constraints. Delete sections whose honest content would be "N/A" or "first time, nothing to fetch". Padding this document with "TBD" is worse than omitting sections.
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
## Prior Experience (from claude-mem)
|
|
18
|
-
|
|
19
|
-
<!--
|
|
20
|
-
flow-researcher first calls mcp__claude_mem__search to retrieve relevant history.
|
|
21
|
-
If there are relevant observations, summarize them here; if not, write "(first research on this topic)".
|
|
22
|
-
-->
|
|
17
|
+
## Prior Experience (from claude-mem, if relevant)
|
|
23
18
|
|
|
24
19
|
{{CLAUDE_MEM_FINDINGS}}
|
|
25
20
|
|
|
26
|
-
|
|
21
|
+
<!-- Delete this section if there are no relevant prior observations. -->
|
|
27
22
|
|
|
28
|
-
|
|
23
|
+
## Problem Understanding
|
|
29
24
|
|
|
30
25
|
### Core Problem
|
|
31
|
-
<!-- One
|
|
26
|
+
<!-- One sentence. What are we solving? -->
|
|
32
27
|
|
|
33
28
|
### Explicit Assumptions
|
|
34
|
-
<!--
|
|
29
|
+
<!-- Only real assumptions that matter. Don't list "assumption: we will write code." -->
|
|
30
|
+
|
|
35
31
|
- Assumption 1: ...
|
|
36
|
-
- Assumption 2: ...
|
|
37
32
|
|
|
38
33
|
### Known Constraints
|
|
39
|
-
|
|
40
|
-
- Budget / time:
|
|
41
|
-
- Team capability:
|
|
42
|
-
- Compliance requirements:
|
|
43
|
-
|
|
44
|
-
## Technical Solution Space
|
|
34
|
+
<!-- Include only the constraints that actually shape the solution. -->
|
|
45
35
|
|
|
46
|
-
|
|
36
|
+
- Tech stack: ...
|
|
37
|
+
- Time budget: ...
|
|
38
|
+
- (Compliance, team capability, etc — only if they constrain this feature)
|
|
47
39
|
|
|
48
|
-
|
|
49
|
-
- **Pros**:
|
|
50
|
-
- **Cons**:
|
|
51
|
-
- **Complexity**: low / medium / high
|
|
52
|
-
- **Docs (context7 queries)**:
|
|
53
|
-
- `library-name@version`: ...
|
|
40
|
+
## Technical Solution Space
|
|
54
41
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
42
|
+
<!--
|
|
43
|
+
If one approach is clearly the right call for this stack, write only that approach with its rationale.
|
|
44
|
+
Include alternative options ONLY when there is a genuine tradeoff a thoughtful engineer might disagree on.
|
|
45
|
+
Do not invent Option B and Option C just to fill the template.
|
|
46
|
+
-->
|
|
59
47
|
|
|
60
|
-
###
|
|
48
|
+
### Recommended Approach: ...
|
|
49
|
+
- **Why**: ...
|
|
50
|
+
- **Complexity**: ...
|
|
51
|
+
- **Key APIs verified via context7**: ...
|
|
61
52
|
|
|
62
|
-
|
|
53
|
+
### Alternative: ... (include only if a real alternative exists)
|
|
63
54
|
|
|
64
|
-
|
|
55
|
+
## Existing Code Analysis (include only if the codebase has relevant prior work)
|
|
65
56
|
|
|
66
57
|
### Reusable Modules
|
|
67
|
-
- `path/to/
|
|
68
|
-
|
|
69
|
-
### Modules to Create
|
|
70
|
-
- `path/to/new-module.ts` — ...
|
|
71
|
-
|
|
72
|
-
### Modules to Modify
|
|
73
|
-
- `path/to/modify.ts` — ...
|
|
74
|
-
|
|
75
|
-
## Latest Documentation Summary (context7)
|
|
76
|
-
|
|
77
|
-
<!-- Latest APIs / best practices found by flow-researcher via mcp__context7__* -->
|
|
78
|
-
|
|
79
|
-
### {{LIBRARY_1}}
|
|
80
|
-
- Version:
|
|
81
|
-
- Relevant APIs:
|
|
82
|
-
- Gotchas / changes:
|
|
83
|
-
|
|
84
|
-
### {{LIBRARY_2}}
|
|
85
|
-
- ...
|
|
86
|
-
|
|
87
|
-
## Feasibility Assessment
|
|
58
|
+
- `path/to/module` — ...
|
|
88
59
|
|
|
89
|
-
|
|
60
|
+
### New Modules Required
|
|
61
|
+
- `path/to/new` — ...
|
|
90
62
|
|
|
91
|
-
|
|
92
|
-
- **Estimated complexity**: 1-10
|
|
93
|
-
- **Main risks**:
|
|
94
|
-
- Risk 1: ...
|
|
95
|
-
- Risk 2: ...
|
|
63
|
+
## Latest Documentation Summary
|
|
96
64
|
|
|
97
|
-
|
|
65
|
+
<!-- Only include libraries whose API is version-sensitive AND used by this feature. Do not cite every library in the stack. -->
|
|
98
66
|
|
|
99
|
-
|
|
67
|
+
### {{LIBRARY}}
|
|
68
|
+
- Version: ...
|
|
69
|
+
- Relevant APIs: ...
|
|
70
|
+
- Gotchas: ...
|
|
100
71
|
|
|
101
|
-
|
|
102
|
-
**Rationale**:
|
|
103
|
-
**To confirm in the design phase**:
|
|
72
|
+
## Feasibility
|
|
104
73
|
|
|
105
|
-
|
|
74
|
+
- **Verdict**: feasible / risky / not recommended
|
|
75
|
+
- **Main risks**: (only if real risks exist)
|
|
106
76
|
|
|
107
|
-
|
|
77
|
+
## Open Questions (delete if none)
|
|
108
78
|
|
|
109
79
|
1. ...
|
|
110
|
-
2. ...
|
|
111
80
|
|
|
112
81
|
---
|
|
113
82
|
|
|
114
|
-
_Generated by flow-researcher
|
|
83
|
+
_Generated by flow-researcher on {{CREATED_DATE}}._
|