flow-cc 0.4.2 → 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 CHANGED
@@ -5,6 +5,19 @@ 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
+
8
21
  ## [0.4.2] - 2026-02-11
9
22
 
10
23
  ### 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 # Mistake catalogrefined into permanent rules
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, lesson written to `tasks/lessons.md`
124
- 2. **Refine** — Each `/flow:done` merges duplicates, sharpens rules, removes obvious ones
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
- The goal: fewer, sharper lessons over time not an ever-growing list.
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.2
1
+ 0.4.3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flow-cc",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Structured workflow system for Claude Code — spec interviews, agent-team execution, session handoffs, compounding knowledge",
5
5
  "author": "Troy Hoffman",
6
6
  "license": "MIT",
@@ -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` — existing lessons
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 in PATTERN/CAUSE/FIX/RULE format
87
- - **Refine existing lessons:** merge duplicates, sharpen vague rules, delete obvious ones
88
- - **Promote check:** For lessons that seem universal (not project-specific), ask: "This lesson seems universal. Promote to global lessons (~/.claude/lessons.md)?"
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] lessons added, [N] refined
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
@@ -18,7 +18,7 @@ Read these files (in parallel):
18
18
  - `.planning/STATE.md` — current position
19
19
  - `.planning/ROADMAP.md` — phase progress
20
20
  - `PRD.md` — the execution spec
21
- - `tasks/lessons.md` — anti-patterns to avoid
21
+ - `tasks/lessons.md` — active lessons (max 10 one-liners)
22
22
  - `CLAUDE.md` — execution rules and verification commands
23
23
 
24
24
  **Identify the next phase:** Find the first phase in ROADMAP.md with status "Pending" or the first unstarted phase in the PRD.
@@ -76,7 +76,7 @@ so agents have it in their context without needing to search.]
76
76
  - Stage only your files when committing (never `git add .` or `git add -A`)
77
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.
78
78
 
79
- ## Anti-Patterns to Avoid
79
+ ## Lessons (Rules to Follow)
80
80
  [Relevant lessons from tasks/lessons.md — filter to lessons that apply to this agent's work]
81
81
  ```
82
82
 
@@ -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
- - Asks about lessons, refines existing ones
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
 
@@ -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 Learned
172
+ # [Project Name] — Lessons (max 10 active)
173
173
 
174
- Format: PATTERN CAUSE → FIX → RULE
174
+ One-liner format: `- **[topic]** The rule`
175
175
 
176
- ## Execution Patterns
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 — anti-pattern catalog
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.
@@ -222,7 +222,7 @@ Write `PRD.md` to the project root with this EXACT structure:
222
222
  2. Verify after every phase: [verification commands from CLAUDE.md]
223
223
  3. Atomic commits after each agent's work lands
224
224
  4. Never `git add .` — stage specific files only
225
- 5. Read `tasks/lessons.md` before spawning agents — inject relevant anti-patterns
225
+ 5. Read `tasks/lessons.md` before spawning agents — inject relevant lessons into agent prompts
226
226
 
227
227
  ## Definition of Done
228
228
  - [ ] All user story acceptance criteria pass
@@ -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] rules
67
+ Lessons: [N]/10 active
68
68
 
69
69
  [routing recommendations from Step 3]
70
70
  ```
@@ -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` in PATTERN/CAUSE/FIX/RULE format.
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, refine existing ones
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 Learned
1
+ # {{PROJECT_NAME}} — Lessons (max 10 active)
2
2
 
3
- Format: PATTERN CAUSE → FIX → RULE
3
+ One-liner format: `- **[topic]** The rule`
4
4
 
5
- ## Execution Patterns
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" -->