flow-cc 0.4.1 → 0.4.3
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/CHANGELOG.md +20 -0
- package/README.md +4 -6
- package/VERSION +1 -1
- package/package.json +1 -1
- package/skills/flow-done.md +10 -5
- package/skills/flow-go.md +4 -2
- package/skills/flow-intro.md +1 -1
- package/skills/flow-setup.md +4 -11
- package/skills/flow-spec.md +19 -8
- package/skills/flow-status.md +1 -1
- package/skills/flow-task.md +2 -1
- package/templates/CLAUDE.md.template +4 -1
- package/templates/lessons.md.template +3 -20
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.3] - 2026-02-12
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Lessons system refactored to 2-stage with hard caps — `tasks/lessons.md` max 10 active one-liners, `CLAUDE.md ## Learned Rules` max 15 permanent one-liners
|
|
12
|
+
- Replaced verbose PATTERN/CAUSE/FIX/RULE format with compact one-liner format: `- **[topic]** The rule`
|
|
13
|
+
- Removed 4-stage lifecycle (Capture → Refine → Promote Global → Promote CLAUDE.md), replaced with 2-stage (Capture → Promote to CLAUDE.md when full)
|
|
14
|
+
- Removed all references to `~/.claude/lessons.md` global lessons file
|
|
15
|
+
- `/flow:done` now enforces cap: promotes most battle-tested lesson to CLAUDE.md when lessons.md hits 10
|
|
16
|
+
- `/flow:status` shows `[N]/10 active` instead of `[N] rules`
|
|
17
|
+
- Agent prompts section renamed from "Anti-Patterns to Avoid" to "Lessons (Rules to Follow)"
|
|
18
|
+
- CLAUDE.md template now includes `## Learned Rules` placeholder section
|
|
19
|
+
- Updated DESIGN.md, README.md, and all skill files to reflect 2-stage system
|
|
20
|
+
|
|
21
|
+
## [0.4.2] - 2026-02-11
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
- `/flow:spec` Phase 1 codebase scan now delegates to 3 parallel Explore subagents instead of reading files into main context — saves 200-500 lines of context before the interview starts
|
|
25
|
+
- Added plan mode warnings to `/flow:spec` and `/flow:go` — plan mode's read-only constraint breaks both skills
|
|
26
|
+
- Added Plan Mode Compatibility section to DESIGN.md documenting the design philosophy
|
|
27
|
+
|
|
8
28
|
## [0.4.1] - 2026-02-11
|
|
9
29
|
|
|
10
30
|
### Fixed
|
package/README.md
CHANGED
|
@@ -113,19 +113,17 @@ your-project/
|
|
|
113
113
|
│ ├── ROADMAP.md # Milestone phases and progress
|
|
114
114
|
│ └── archive/ # Completed milestones and old PRDs
|
|
115
115
|
└── tasks/
|
|
116
|
-
└── lessons.md #
|
|
116
|
+
└── lessons.md # Active lessons (max 10 one-liners) → promoted to CLAUDE.md
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
## The Lessons System
|
|
120
120
|
|
|
121
121
|
Flow's knowledge compounding is what makes it get better over time:
|
|
122
122
|
|
|
123
|
-
1. **Capture** — Mistake happens,
|
|
124
|
-
2. **
|
|
125
|
-
3. **Promote** — Universal lessons move to `~/.claude/lessons.md` (all projects)
|
|
126
|
-
4. **Permanence** — Recurring patterns become rules in `CLAUDE.md`
|
|
123
|
+
1. **Capture** — Mistake happens, one-liner written to `tasks/lessons.md` (max 10 active)
|
|
124
|
+
2. **Promote** — When full, most battle-tested lesson moves to `CLAUDE.md ## Learned Rules` (max 15 permanent)
|
|
127
125
|
|
|
128
|
-
|
|
126
|
+
Hard caps prevent context bloat. Total worst-case: ~30 lines of lessons context per session.
|
|
129
127
|
|
|
130
128
|
## Compatible With GSD
|
|
131
129
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.4.
|
|
1
|
+
0.4.3
|
package/package.json
CHANGED
package/skills/flow-done.md
CHANGED
|
@@ -17,7 +17,7 @@ You are executing the `/flow:done` skill. This finalizes the current session by
|
|
|
17
17
|
Read these files (in parallel where possible):
|
|
18
18
|
- `.planning/STATE.md` — current state
|
|
19
19
|
- `.planning/ROADMAP.md` — milestone/phase progress
|
|
20
|
-
- `tasks/lessons.md` —
|
|
20
|
+
- `tasks/lessons.md` — active lessons (max 10)
|
|
21
21
|
- `CLAUDE.md` — project rules
|
|
22
22
|
- `PRD.md` — current spec (if exists)
|
|
23
23
|
|
|
@@ -83,9 +83,14 @@ Structure:
|
|
|
83
83
|
- "No new lessons"
|
|
84
84
|
- "Yes, let me add some" (user types them)
|
|
85
85
|
- "Use your suggestions" (if you auto-suggested any)
|
|
86
|
-
- Add new lessons
|
|
87
|
-
- **
|
|
88
|
-
-
|
|
86
|
+
- Add new lessons as one-liners: `- **[topic]** The rule`
|
|
87
|
+
- **Hard cap enforcement (max 10 active):**
|
|
88
|
+
- If lessons.md already has 10 items and a new one needs to be added:
|
|
89
|
+
1. Identify the most battle-tested/internalized lesson
|
|
90
|
+
2. Promote it to `CLAUDE.md ## Learned Rules` section
|
|
91
|
+
3. Delete it from lessons.md
|
|
92
|
+
4. Add the new lesson
|
|
93
|
+
- If `CLAUDE.md ## Learned Rules` hits 15 items, delete the most obvious/internalized rule to make room
|
|
89
94
|
|
|
90
95
|
### 5. Commit Doc Updates
|
|
91
96
|
|
|
@@ -119,7 +124,7 @@ Print the handoff prompt in a fenced code block so the user can copy it.
|
|
|
119
124
|
Session complete.
|
|
120
125
|
- STATE.md: updated
|
|
121
126
|
- ROADMAP.md: [N] phases marked complete
|
|
122
|
-
- lessons.md: [N]
|
|
127
|
+
- lessons.md: [N]/10 active, [N] promoted to CLAUDE.md
|
|
123
128
|
- Committed: [SHA]
|
|
124
129
|
|
|
125
130
|
Handoff prompt:
|
package/skills/flow-go.md
CHANGED
|
@@ -10,13 +10,15 @@ You are executing the `/flow:go` skill. This reads the PRD, identifies the next
|
|
|
10
10
|
|
|
11
11
|
**Core principle:** The PRD is the execution contract. You execute what it specifies. Do not freelance.
|
|
12
12
|
|
|
13
|
+
**Plan mode warning:** Do NOT use this skill with plan mode enabled. `/flow:go` is execution — plan mode's read-only constraint prevents it from creating files, running agents, and committing work. The PRD IS your plan; run `/flow:go` in normal mode.
|
|
14
|
+
|
|
13
15
|
## Step 1 — Orient
|
|
14
16
|
|
|
15
17
|
Read these files (in parallel):
|
|
16
18
|
- `.planning/STATE.md` — current position
|
|
17
19
|
- `.planning/ROADMAP.md` — phase progress
|
|
18
20
|
- `PRD.md` — the execution spec
|
|
19
|
-
- `tasks/lessons.md` —
|
|
21
|
+
- `tasks/lessons.md` — active lessons (max 10 one-liners)
|
|
20
22
|
- `CLAUDE.md` — execution rules and verification commands
|
|
21
23
|
|
|
22
24
|
**Identify the next phase:** Find the first phase in ROADMAP.md with status "Pending" or the first unstarted phase in the PRD.
|
|
@@ -74,7 +76,7 @@ so agents have it in their context without needing to search.]
|
|
|
74
76
|
- Stage only your files when committing (never `git add .` or `git add -A`)
|
|
75
77
|
- If you need output from another agent that isn't available yet, create a temporary stub and continue. Delete the stub before your final commit.
|
|
76
78
|
|
|
77
|
-
##
|
|
79
|
+
## Lessons (Rules to Follow)
|
|
78
80
|
[Relevant lessons from tasks/lessons.md — filter to lessons that apply to this agent's work]
|
|
79
81
|
```
|
|
80
82
|
|
package/skills/flow-intro.md
CHANGED
|
@@ -64,7 +64,7 @@ Flow is 6 commands that turn your specs into shipped code through agent teams. E
|
|
|
64
64
|
- Replaces STATE.md with current status
|
|
65
65
|
- Updates ROADMAP.md with phase completions
|
|
66
66
|
- Auto-transitions to the next planned milestone when the current one completes
|
|
67
|
-
-
|
|
67
|
+
- Captures lessons as one-liners, enforces 10-item cap (promotes to CLAUDE.md when full)
|
|
68
68
|
- Commits doc updates
|
|
69
69
|
- Generates a handoff prompt you copy-paste to start the next session
|
|
70
70
|
|
package/skills/flow-setup.md
CHANGED
|
@@ -169,18 +169,11 @@ Note: The first milestone gets status "Pending — needs `/flow:spec`". All subs
|
|
|
169
169
|
|
|
170
170
|
**`tasks/lessons.md`:**
|
|
171
171
|
```
|
|
172
|
-
# [Project Name] — Lessons
|
|
172
|
+
# [Project Name] — Lessons (max 10 active)
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
One-liner format: `- **[topic]** The rule`
|
|
175
175
|
|
|
176
|
-
|
|
177
|
-
<!-- Lessons about workflow, delegation, verification -->
|
|
178
|
-
|
|
179
|
-
## Domain Knowledge
|
|
180
|
-
<!-- Lessons about business logic, data models, user behavior -->
|
|
181
|
-
|
|
182
|
-
## Technical Patterns
|
|
183
|
-
<!-- Lessons about the tech stack, libraries, deployment -->
|
|
176
|
+
<!-- EXAMPLE: - **[agent context]** Always tell agents exactly which functions/lines to read — never "read file.ts", say "read file.ts lines 50-120" -->
|
|
184
177
|
```
|
|
185
178
|
|
|
186
179
|
**`.planning/archive/`** — Create this empty directory (use `mkdir -p` via Bash).
|
|
@@ -192,7 +185,7 @@ Project initialized:
|
|
|
192
185
|
- CLAUDE.md — project execution rules
|
|
193
186
|
- .planning/STATE.md — session GPS
|
|
194
187
|
- .planning/ROADMAP.md — milestone tracker
|
|
195
|
-
- tasks/lessons.md —
|
|
188
|
+
- tasks/lessons.md — active lessons (max 10)
|
|
196
189
|
- .planning/archive/ — for completed milestones
|
|
197
190
|
|
|
198
191
|
Run `/flow:spec` to plan your first milestone.
|
package/skills/flow-spec.md
CHANGED
|
@@ -10,18 +10,29 @@ You are executing the `/flow:spec` skill. This is the KEYSTONE skill of the flow
|
|
|
10
10
|
|
|
11
11
|
**Interview mode:** Always thorough by default. The user can say "done", "finalize", "that's enough", or "move on" at ANY time to wrap up early. Respect their signal and finalize with whatever depth has been achieved.
|
|
12
12
|
|
|
13
|
+
**Plan mode warning:** Do NOT use this skill with plan mode enabled. Plan mode's read-only constraint prevents PRD.md from being written during the interview. `/flow:spec` IS the planning phase — plan mode on top of it is redundant and breaks the workflow.
|
|
14
|
+
|
|
13
15
|
## Phase 1 — Context Gathering (automatic, no user input needed)
|
|
14
16
|
|
|
15
17
|
1. Read `.planning/STATE.md` and `.planning/ROADMAP.md` — understand current milestone and what's done
|
|
16
18
|
2. Read `CLAUDE.md` — understand project rules and tech stack
|
|
17
19
|
3. Read `PRD.md` if it exists — check for existing spec to build on
|
|
18
|
-
4. **Codebase scan** (brownfield projects):
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
4. **Codebase scan** (brownfield projects) — spawn **3 parallel Explore subagents** via the Task tool to scan the codebase without consuming main context:
|
|
21
|
+
|
|
22
|
+
| Agent | Focus | Looks For |
|
|
23
|
+
|-------|-------|-----------|
|
|
24
|
+
| **Structure & Config** | Project skeleton, build tooling | `package.json`, `tsconfig`, config files, entry points, CI/CD, env setup |
|
|
25
|
+
| **UI, Pages & Routes** | Components, pages, routing | `components/`, `pages/`, `app/`, route definitions, layouts, navigation |
|
|
26
|
+
| **Data Layer & APIs** | Database, APIs, types | `api/`, `models/`, `types/`, `schemas/`, ORM definitions, query functions |
|
|
27
|
+
|
|
28
|
+
**Each subagent prompt MUST include:**
|
|
29
|
+
- **Exclusions:** NEVER scan `node_modules/`, `.git/`, `dist/`, `build/`, `.next/`, `__pycache__/`, `*.min.js`, `*.map`, `*.lock`
|
|
30
|
+
- **Size-adaptive scanning:** If the agent's domain has >200 files, switch to focused mode (entry points, config, and type definitions only)
|
|
31
|
+
- **20-file sample cap per agent** (60 total across all 3)
|
|
32
|
+
- **15-line summary max** — structured as: key files found, patterns observed, reusable code/components, notes
|
|
33
|
+
- **Explicit instruction:** Do NOT return raw file contents — return only structured summaries
|
|
34
|
+
|
|
35
|
+
5. **Assemble summaries:** Collect the 3 agent summaries into a brief context block (~45 lines total). Print to user: "Here's what I found in the codebase: [key components, patterns, data layer]. Starting the spec interview."
|
|
25
36
|
|
|
26
37
|
## Phase 2 — Adaptive Interview
|
|
27
38
|
|
|
@@ -211,7 +222,7 @@ Write `PRD.md` to the project root with this EXACT structure:
|
|
|
211
222
|
2. Verify after every phase: [verification commands from CLAUDE.md]
|
|
212
223
|
3. Atomic commits after each agent's work lands
|
|
213
224
|
4. Never `git add .` — stage specific files only
|
|
214
|
-
5. Read `tasks/lessons.md` before spawning agents — inject relevant
|
|
225
|
+
5. Read `tasks/lessons.md` before spawning agents — inject relevant lessons into agent prompts
|
|
215
226
|
|
|
216
227
|
## Definition of Done
|
|
217
228
|
- [ ] All user story acceptance criteria pass
|
package/skills/flow-status.md
CHANGED
|
@@ -64,7 +64,7 @@ Use this explicit decision tree:
|
|
|
64
64
|
Milestone: [name] ([X/Y] phases complete)
|
|
65
65
|
Last session: [date] — [what was built]
|
|
66
66
|
Next: Phase [N] — [name] ([short description])
|
|
67
|
-
Lessons: [N]
|
|
67
|
+
Lessons: [N]/10 active
|
|
68
68
|
|
|
69
69
|
[routing recommendations from Step 3]
|
|
70
70
|
```
|
package/skills/flow-task.md
CHANGED
|
@@ -104,9 +104,10 @@ RULES:
|
|
|
104
104
|
Quick lessons prompt via AskUserQuestion:
|
|
105
105
|
- "Any lessons from this task worth capturing?"
|
|
106
106
|
- Option 1: "No, nothing new" — Skip lessons.
|
|
107
|
-
- Option 2: "Yes, let me describe it" — Capture to `tasks/lessons.md`
|
|
107
|
+
- Option 2: "Yes, let me describe it" — Capture to `tasks/lessons.md` as a one-liner: `- **[topic]** The rule`
|
|
108
108
|
|
|
109
109
|
If `tasks/lessons.md` doesn't exist, skip the lessons prompt.
|
|
110
|
+
If lessons.md already has 10 items, promote the most battle-tested to `CLAUDE.md ## Learned Rules` before adding the new one.
|
|
110
111
|
|
|
111
112
|
## Step 9 — Summary
|
|
112
113
|
|
|
@@ -23,9 +23,12 @@
|
|
|
23
23
|
## Session-End Docs (MANDATORY)
|
|
24
24
|
1. `.planning/STATE.md` — replace session notes (don't append), keep <80 lines
|
|
25
25
|
2. `.planning/ROADMAP.md` — update phase progress
|
|
26
|
-
3. `tasks/lessons.md` — add new lessons,
|
|
26
|
+
3. `tasks/lessons.md` — add new one-liner lessons, enforce max 10 cap (promote to Learned Rules when full)
|
|
27
27
|
4. Commit doc updates to feature branch
|
|
28
28
|
|
|
29
|
+
## Learned Rules
|
|
30
|
+
<!-- Max 15 permanent one-liners promoted from tasks/lessons.md -->
|
|
31
|
+
|
|
29
32
|
## Critical Rules
|
|
30
33
|
- No assumptions — ask if requirements unclear
|
|
31
34
|
- Fight entropy — leave code better than you found it
|
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
# {{PROJECT_NAME}} — Lessons
|
|
1
|
+
# {{PROJECT_NAME}} — Lessons (max 10 active)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One-liner format: `- **[topic]** The rule`
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
<!-- Lessons about workflow, delegation, verification -->
|
|
7
|
-
|
|
8
|
-
<!-- EXAMPLE (replace with real lessons as you work):
|
|
9
|
-
|
|
10
|
-
### Agent context overflow on large files
|
|
11
|
-
- **PATTERN:** Spawned agent tried to read a 2000-line file and ran out of context before finishing its task
|
|
12
|
-
- **CAUSE:** Agent prompt didn't specify which lines/functions to read — it read the whole file
|
|
13
|
-
- **FIX:** Added explicit line ranges and function names to the agent prompt
|
|
14
|
-
- **RULE:** Always tell agents exactly which functions/sections to read. Never say "read file.ts" — say "read file.ts lines 50-120 (the handleSubmit function)"
|
|
15
|
-
|
|
16
|
-
END EXAMPLE -->
|
|
17
|
-
|
|
18
|
-
## Domain Knowledge
|
|
19
|
-
<!-- Lessons about business logic, data models, user behavior -->
|
|
20
|
-
|
|
21
|
-
## Technical Patterns
|
|
22
|
-
<!-- Lessons about the tech stack, libraries, deployment -->
|
|
5
|
+
<!-- EXAMPLE: - **[agent context]** Always tell agents exactly which functions/lines to read — never "read file.ts", say "read file.ts lines 50-120" -->
|