planflow-ai 1.1.4 → 1.1.5

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.
Files changed (42) hide show
  1. package/.claude/commands/brain.md +9 -11
  2. package/.claude/commands/heartbeat.md +120 -0
  3. package/.claude/commands/learn.md +94 -14
  4. package/.claude/commands/setup.md +36 -4
  5. package/.claude/resources/core/_index.md +32 -2
  6. package/.claude/resources/core/autopilot-mode.md +6 -2
  7. package/.claude/resources/core/brain-capture.md +83 -71
  8. package/.claude/resources/core/heartbeat.md +117 -0
  9. package/.claude/resources/core/project-memory.md +69 -0
  10. package/.claude/resources/core/project-tasklist.md +65 -0
  11. package/.claude/resources/patterns/_index.md +2 -1
  12. package/.claude/resources/patterns/brain-patterns.md +11 -18
  13. package/.claude/resources/skills/_index.md +5 -3
  14. package/.claude/resources/skills/brain-skill.md +4 -7
  15. package/.claude/resources/skills/learn-skill.md +43 -0
  16. package/.claude/resources/skills/setup-skill.md +62 -4
  17. package/README.md +46 -0
  18. package/dist/cli/commands/heartbeat.d.ts +9 -0
  19. package/dist/cli/commands/heartbeat.d.ts.map +1 -0
  20. package/dist/cli/commands/heartbeat.js +145 -0
  21. package/dist/cli/commands/heartbeat.js.map +1 -0
  22. package/dist/cli/daemon/heartbeat-daemon.d.ts +9 -0
  23. package/dist/cli/daemon/heartbeat-daemon.d.ts.map +1 -0
  24. package/dist/cli/daemon/heartbeat-daemon.js +184 -0
  25. package/dist/cli/daemon/heartbeat-daemon.js.map +1 -0
  26. package/dist/cli/daemon/heartbeat-parser.d.ts +21 -0
  27. package/dist/cli/daemon/heartbeat-parser.d.ts.map +1 -0
  28. package/dist/cli/daemon/heartbeat-parser.js +136 -0
  29. package/dist/cli/daemon/heartbeat-parser.js.map +1 -0
  30. package/dist/cli/handlers/shared.d.ts +10 -0
  31. package/dist/cli/handlers/shared.d.ts.map +1 -1
  32. package/dist/cli/handlers/shared.js +250 -16
  33. package/dist/cli/handlers/shared.js.map +1 -1
  34. package/dist/cli/index.js +8 -0
  35. package/dist/cli/index.js.map +1 -1
  36. package/dist/cli/types.d.ts +18 -0
  37. package/dist/cli/types.d.ts.map +1 -1
  38. package/package.json +3 -2
  39. package/rules/core/brain-capture.mdc +19 -10
  40. package/rules/patterns/brain-patterns.mdc +6 -11
  41. package/templates/shared/AGENTS.md.template +1 -3
  42. package/templates/shared/CLAUDE.md.template +3 -5
@@ -48,12 +48,13 @@ MODES:
48
48
  Guided: Asks structured questions about work, insights, meetings, decisions
49
49
 
50
50
  BRAIN STRUCTURE:
51
- flow/brain/
52
- ├── index.md # Brain index (always loaded at session start)
53
- ├── features/ # Feature history and context
54
- ├── errors/ # Reusable error patterns
55
- ├── decisions/ # Decision records
56
- └── sessions/ # Daily activity logs
51
+ flow/brain/ # Per-project brain
52
+ ├── index.md # Brain index (loaded at session start)
53
+ ├── features/ # Feature history and context
54
+ └── errors/ # Reusable error patterns
55
+
56
+ ~/plan-flow/brain/daily/ # Global daily logs (cross-project)
57
+ └── YYYY-MM-DD.md
57
58
 
58
59
  RELATED COMMANDS:
59
60
  /setup Creates brain directory structure
@@ -69,7 +70,7 @@ RELATED COMMANDS:
69
70
  | ------------------------ | -------------------------------------------------------- |
70
71
  | **Brain Only** | ONLY write to `flow/brain/` - no source code, no config |
71
72
  | **Wiki-Links** | All cross-references use `[[kebab-case-name]]` format |
72
- | **Index Caps** | Max 5 errors, 3 decisions, 3 cross-project in index |
73
+ | **Index Caps** | Max 5 errors, 3 cross-project in index |
73
74
  | **No Code** | Brain is for knowledge capture, never write source code |
74
75
  | **Complete and Stop** | After writing entry, STOP and wait for user |
75
76
 
@@ -99,7 +100,7 @@ What would you like to capture? You can:
99
100
  Check if `flow/brain/` exists. If not, create:
100
101
 
101
102
  ```bash
102
- mkdir -p flow/brain/features flow/brain/errors flow/brain/decisions flow/brain/sessions
103
+ mkdir -p flow/brain/features flow/brain/errors
103
104
  ```
104
105
 
105
106
  Check if `flow/brain/index.md` exists. If not, create initial index:
@@ -113,9 +114,6 @@ _No features tracked yet._
113
114
  ## Recent Errors
114
115
  _No errors captured yet._
115
116
 
116
- ## Recent Decisions
117
- _No decisions recorded yet._
118
-
119
117
  ## Cross-Project Patterns
120
118
  _No cross-project patterns yet._
121
119
  ```
@@ -0,0 +1,120 @@
1
+ ---
2
+ description: Manage scheduled automated tasks via the heartbeat daemon
3
+ ---
4
+
5
+ # Heartbeat: Scheduled Task Automation
6
+
7
+ ## Command Description
8
+
9
+ Manage the heartbeat daemon — a cron-like automation system that runs scheduled tasks defined in `flow/heartbeat.md`. Tasks can include research, feature creation, execution, and pushing to repos.
10
+
11
+ **Config**: `flow/heartbeat.md`
12
+ **Daemon**: `npx plan-flow heartbeat start|stop|status`
13
+
14
+ ---
15
+
16
+ ## Help
17
+
18
+ **If the user invokes this command with `-help`, display only this section and stop:**
19
+
20
+ ```
21
+ /heartbeat - Scheduled Task Automation
22
+
23
+ DESCRIPTION:
24
+ Manage the heartbeat daemon for automated scheduled tasks.
25
+ Tasks are defined in flow/heartbeat.md with human-readable schedules.
26
+
27
+ USAGE:
28
+ /heartbeat -add Add a new scheduled task interactively
29
+ /heartbeat -remove Remove an existing scheduled task
30
+ /heartbeat -list List all scheduled tasks with status
31
+ /heartbeat -help Show this help
32
+
33
+ CLI COMMANDS:
34
+ npx plan-flow heartbeat start Start the daemon
35
+ npx plan-flow heartbeat stop Stop the daemon
36
+ npx plan-flow heartbeat status Show daemon status
37
+
38
+ SCHEDULE SYNTAX:
39
+ daily at {HH:MM AM/PM} Run once daily at the specified time
40
+ every {N} hours Run every N hours
41
+ every {N} minutes Run every N minutes
42
+ weekly on {day} at {HH:MM} Run weekly on a specific day
43
+
44
+ EXAMPLE TASKS:
45
+ daily at 10:00 PM - research about topic X, create md files and add to brain
46
+ every 6 hours - check for new issues and update tasklist
47
+ weekly on Monday at 9:00 AM - generate weekly summary report
48
+
49
+ RELATED COMMANDS:
50
+ /flow Toggle autopilot mode
51
+ /brain Manual brain entry
52
+ ```
53
+
54
+ ---
55
+
56
+ ## Critical Rules
57
+
58
+ | Rule | Description |
59
+ |------|-------------|
60
+ | **File-Based Config** | All tasks are defined in `flow/heartbeat.md` |
61
+ | **No Direct Execution** | This command manages tasks, not executes them — the daemon handles execution |
62
+ | **Confirm Before Remove** | Always confirm before removing a scheduled task |
63
+ | **Complete and Stop** | After adding/removing/listing, STOP and wait for user input |
64
+
65
+ ---
66
+
67
+ ## Instructions
68
+
69
+ ### /heartbeat -add
70
+
71
+ 1. Ask the user for:
72
+ - **Task name**: Short descriptive name (kebab-case)
73
+ - **Schedule**: Using human-readable syntax (see help)
74
+ - **Command**: What the daemon should execute
75
+ - **Description**: What this task does
76
+ 2. Add the task to `flow/heartbeat.md` using the task template
77
+ 3. Confirm the addition
78
+
79
+ ### /heartbeat -remove
80
+
81
+ 1. List all tasks in `flow/heartbeat.md`
82
+ 2. Ask the user which task to remove
83
+ 3. Confirm before removing
84
+ 4. Remove the task entry from the file
85
+
86
+ ### /heartbeat -list
87
+
88
+ 1. Read `flow/heartbeat.md`
89
+ 2. Display all tasks with their schedule, status, and description
90
+
91
+ ---
92
+
93
+ ## Context Optimization
94
+
95
+ ### Reference Codes for Heartbeat
96
+
97
+ | Code | Description | When to Expand |
98
+ |------|-------------|----------------|
99
+ | COR-HB-1 | Heartbeat file format and schedule syntax | Creating or editing heartbeat tasks |
100
+ | COR-HB-2 | Daemon architecture and CLI commands | Starting/stopping the daemon |
101
+
102
+ ---
103
+
104
+ ## Brain Capture
105
+
106
+ <!-- brain-capture
107
+ skill: heartbeat
108
+ captures:
109
+ - task name and schedule added/removed
110
+ - daemon start/stop events
111
+ -->
112
+
113
+ ---
114
+
115
+ ## Related Resources
116
+
117
+ | Resource | Purpose |
118
+ |----------|---------|
119
+ | `resources/core/heartbeat.md` | File format rules and daemon architecture |
120
+ | `resources/core/_index.md` | Index of core rules with reference codes |
@@ -1,34 +1,50 @@
1
1
  ---
2
- description: Extract reusable patterns from the current session and save them to the project
2
+ description: Extract reusable patterns from the current session, or learn about a topic with step-by-step teaching
3
3
  ---
4
4
 
5
- # Learn: Session Pattern Extraction
5
+ # Learn: Session Pattern Extraction & Teaching Mode
6
6
 
7
7
  ## Command Description
8
8
 
9
- This command analyzes the current session for reusable patterns — error resolutions, debugging techniques, workarounds, project-specific conventions — and saves them to `flow/resources/` as learned pattern files with `[[wiki-links]]` for Obsidian compatibility.
9
+ This command has two modes:
10
10
 
11
- **Output**: Pattern files in `flow/resources/learned-{pattern-name}.md`.
11
+ 1. **Pattern Extraction** (`/learn`): Analyzes the current session for reusable patterns and saves them to `flow/resources/`.
12
+ 2. **Teaching Mode** (`/learn about <topic>`): Creates a structured step-by-step curriculum to teach you about a topic, contextualized to your project's tech stack.
13
+
14
+ **Output**:
15
+ - Pattern mode: `flow/resources/learned-{pattern-name}.md`
16
+ - Teaching mode: `flow/brain/learning/{topic-kebab}.md`
12
17
 
13
18
  ---
14
19
 
20
+ ## Mode Detection
21
+
22
+ Determine the mode based on user input:
23
+
24
+ - `/learn` → **Pattern Extraction Mode** (existing behavior, see Steps 1-4 below)
25
+ - `/learn about <topic>` → **Teaching Mode** (see Teaching Mode section below)
26
+ - `/learn -help` → Show help and stop
27
+
28
+ ---
15
29
 
16
30
  ## Help
17
31
 
18
32
  **If the user invokes this command with `-help`, display only this section and stop:**
19
33
 
20
34
  ```
21
- /learn - Extract Reusable Patterns
35
+ /learn - Extract Patterns & Teaching Mode
22
36
 
23
37
  DESCRIPTION:
24
- Analyzes the current session for reusable patterns and saves them
25
- to flow/resources/ as learned pattern files with [[wiki-links]].
38
+ Two modes: extract reusable patterns from the current session,
39
+ or learn about a topic with step-by-step teaching.
26
40
 
27
41
  USAGE:
28
42
  /learn Analyze session and suggest patterns
43
+ /learn about <topic> Start teaching mode for a topic
29
44
  /learn -help Show this help
30
45
 
31
- WHAT GETS EXTRACTED:
46
+ PATTERN EXTRACTION MODE (/learn):
47
+ Extracts:
32
48
  - Error resolutions (how you fixed a tricky bug)
33
49
  - Debugging techniques (steps to diagnose an issue)
34
50
  - Workarounds (non-obvious solutions to platform/tool limitations)
@@ -36,16 +52,19 @@ WHAT GETS EXTRACTED:
36
52
  - Architecture insights (structural decisions made during work)
37
53
  - Integration patterns (how services/APIs were connected)
38
54
 
39
- WHAT DOES NOT GET EXTRACTED:
55
+ Does NOT extract:
40
56
  - Trivial fixes (typos, missing imports, obvious syntax errors)
41
57
  - One-time issues unlikely to recur
42
58
  - Generic knowledge available in documentation
43
- - Patterns already captured in existing learned files
44
59
 
45
- OUTPUT:
46
- - Saves to flow/resources/learned-{pattern-name}.md
47
- - Creates [[wiki-links]] to related brain entries
48
- - One pattern per file
60
+ Output: flow/resources/learned-{pattern-name}.md
61
+
62
+ TEACHING MODE (/learn about <topic>):
63
+ Creates a structured curriculum (3-7 steps) contextualized
64
+ to your project's tech stack. Each step is confirmed before
65
+ proceeding. Completed curricula are saved to the brain.
66
+
67
+ Output: flow/brain/learning/{topic-kebab}.md
49
68
 
50
69
  RELATED COMMANDS:
51
70
  /brain Capture meeting notes, ideas, brainstorms
@@ -160,6 +179,67 @@ If multiple patterns were found, repeat Steps 3-4 for each one.
160
179
 
161
180
  ---
162
181
 
182
+ ## Teaching Mode (`/learn about <topic>`)
183
+
184
+ When the user invokes `/learn about <topic>`, switch to teaching mode:
185
+
186
+ ### Teaching Restrictions
187
+
188
+ | Rule | Description |
189
+ |------|-------------|
190
+ | **Project Context** | Contextualize all examples to the project's actual tech stack |
191
+ | **Step Confirmation** | Wait for user confirmation before proceeding to the next step |
192
+ | **Brain Storage** | Save the curriculum to `flow/brain/learning/{topic-kebab}.md` |
193
+ | **No Code Changes** | Teaching mode does NOT write source code or modify configs |
194
+ | **Complete and Stop** | After all steps are confirmed, STOP and wait for user input |
195
+
196
+ ### Teaching Workflow
197
+
198
+ 1. **Analyze Context**: Read `flow/brain/index.md` and `flow/references/tech-foundation.md` to understand the project's stack
199
+ 2. **Generate Curriculum**: Create a 3-7 step curriculum for the topic, contextualized to the project
200
+ 3. **Present Overview**: Show the full curriculum outline to the user for approval
201
+ 4. **Step-by-Step Teaching**: For each step:
202
+ - Present the step content with explanations and examples
203
+ - Wait for user confirmation (`next`, `done`, or questions)
204
+ - Mark the step as completed in the curriculum file
205
+ - If the user asks questions, answer them before proceeding
206
+ 5. **Save Curriculum**: Write the completed curriculum to `flow/brain/learning/{topic-kebab}.md`
207
+
208
+ ### Curriculum Template
209
+
210
+ ```markdown
211
+ # Learning: {Topic}
212
+
213
+ **Project**: [[{project-name}]]
214
+ **Started**: {YYYY-MM-DD}
215
+ **Status**: {in-progress|completed}
216
+
217
+ ## Curriculum
218
+
219
+ ### Step 1: {Title}
220
+ - **Status**: {pending|completed}
221
+ - **Content**: {explanation with project-contextualized examples}
222
+
223
+ ### Step 2: {Title}
224
+ - **Status**: {pending|completed}
225
+ - **Content**: {explanation}
226
+
227
+ ...
228
+
229
+ ## Notes
230
+
231
+ {Any additional notes, questions asked, or insights gained during learning}
232
+ ```
233
+
234
+ ### Reference Codes for Teaching
235
+
236
+ | Code | Description | When to Expand |
237
+ |------|-------------|----------------|
238
+ | SKL-LRN-3 | Teaching mode restrictions and workflow | Starting teaching mode |
239
+ | SKL-LRN-4 | Curriculum template and brain storage | Generating curriculum |
240
+
241
+ ---
242
+
163
243
  ## Flow Diagram
164
244
 
165
245
  ```
@@ -399,7 +399,7 @@ See: `.claude/resources/skills/setup-skill.md`
399
399
  If the `flow/` folder doesn't exist, create it:
400
400
 
401
401
  ```bash
402
- mkdir -p flow/archive flow/brain/features flow/brain/errors flow/brain/decisions flow/brain/sessions flow/contracts flow/discovery flow/plans flow/references flow/reviewed-code flow/reviewed-pr
402
+ mkdir -p flow/archive flow/brain/features flow/brain/errors flow/contracts flow/discovery flow/plans flow/references flow/reviewed-code flow/reviewed-pr
403
403
  ```
404
404
 
405
405
  **Add `.gitkeep` files**:
@@ -416,7 +416,6 @@ flow/
416
416
  ├── brain/ # Automatic knowledge capture (Obsidian-compatible)
417
417
  │ ├── features/ # Feature history and context
418
418
  │ ├── errors/ # Reusable error patterns
419
- │ ├── decisions/ # Decision records
420
419
  │ └── sessions/ # Daily activity logs
421
420
  ├── contracts/ # Integration contracts
422
421
  ├── discovery/ # Discovery documents
@@ -454,7 +453,6 @@ flow/
454
453
  ├── brain/ # Automatic knowledge capture (Obsidian-compatible)
455
454
  │ ├── features/ # Feature history and context
456
455
  │ ├── errors/ # Reusable error patterns
457
- │ ├── decisions/ # Decision records
458
456
  │ └── sessions/ # Daily activity logs
459
457
  ├── contracts/ # Integration contracts
460
458
  ├── discovery/ # Discovery documents
@@ -711,6 +709,39 @@ When executing this command:
711
709
 
712
710
  ---
713
711
 
712
+ ## Global Pattern Sync
713
+
714
+ After generating pattern files in Step 8, sync **generic** patterns to the global brain at `~/plan-flow/brain/patterns/`.
715
+
716
+ ### What to Sync
717
+
718
+ | Local Pattern File | Global Target | Sync? |
719
+ |---|---|---|
720
+ | `.claude/resources/frameworks/<fw>-patterns.md` | `~/plan-flow/brain/patterns/<fw>.md` | Yes — framework best practices are generic |
721
+ | `.claude/resources/libraries/<lib>-patterns.md` | `~/plan-flow/brain/patterns/<lib>.md` | Yes — library patterns are generic |
722
+ | `.claude/resources/project/project-patterns.md` | — | No — project-specific paths and structure |
723
+
724
+ ### Sync Process
725
+
726
+ For each framework and library pattern file generated:
727
+
728
+ 1. Check if `~/plan-flow/brain/patterns/<name>.md` already exists
729
+ 2. **If it does NOT exist**:
730
+ - Copy the pattern file, but strip project-specific file paths and code examples that reference specific project directories
731
+ - Keep generic best practices, conventions, allowed/forbidden patterns
732
+ - Add a `## Projects Using This` section at the bottom: `- [[project-name]]`
733
+ 3. **If it ALREADY exists**:
734
+ - Read the existing global file
735
+ - Append any NEW sections or patterns not already present (do NOT overwrite existing content — it may contain knowledge from other projects)
736
+ - Add `[[project-name]]` to the `## Projects Using This` section if not already listed
737
+ 4. Use kebab-case for file names: `nextjs.md`, `typescript.md`, `zod.md`, `react-query.md`
738
+
739
+ ### Example
740
+
741
+ If setup generates `.claude/resources/frameworks/nextjs-patterns.md`, create or update `~/plan-flow/brain/patterns/nextjs.md` with the generic patterns, linked to the project via `[[project-name]]`.
742
+
743
+ ---
744
+
714
745
  ## Brain Capture
715
746
 
716
747
  After setup completes successfully, append a brain-capture block to the session file. See `.claude/resources/core/brain-capture.md` for processing rules.
@@ -726,11 +757,12 @@ data:
726
757
  project_name: [detected project name]
727
758
  stack: [language + framework]
728
759
  patterns_generated: [count of pattern files created]
760
+ patterns_synced_to_global: [list of global pattern files created/updated]
729
761
  files_created: [list of generated files]
730
762
  -->
731
763
  ```
732
764
 
733
- Write to `flow/brain/sessions/YYYY-MM-DD.md` and update `flow/brain/index.md` if this is a new project setup.
765
+ Write to `~/plan-flow/brain/daily/YYYY-MM-DD.md` and update `flow/brain/index.md` if this is a new project setup.
734
766
 
735
767
  ---
736
768
 
@@ -5,8 +5,8 @@
5
5
 
6
6
  Core rules define the foundational coding standards that apply across the entire project. These include best practices to follow (allowed patterns), anti-patterns to avoid (forbidden patterns), and complexity scoring for implementation planning.
7
7
 
8
- **Total Files**: 7 files, ~1300 lines
9
- **Reference Codes**: COR-AP-1 through COR-RC-2
8
+ **Total Files**: 10 files, ~1560 lines
9
+ **Reference Codes**: COR-AP-1 through COR-HB-2
10
10
 
11
11
  ---
12
12
 
@@ -59,6 +59,27 @@ Core rules define the foundational coding standards that apply across the entire
59
59
  | COR-BR-2 | File templates (feature, error, decision, session) and naming conventions | brain-capture.md | 52-170 |
60
60
  | COR-BR-3 | Index management (caps, rotation) and global brain sync | brain-capture.md | 172-240 |
61
61
 
62
+ ### Project Memory (`project-memory.md`)
63
+
64
+ | Code | Description | Source | Lines |
65
+ |------|-------------|--------|-------|
66
+ | COR-MEM-1 | Memory session start behavior and entry format | project-memory.md | 10-50 |
67
+ | COR-MEM-2 | Field descriptions and maintenance rules | project-memory.md | 52-75 |
68
+
69
+ ### Project Tasklist (`project-tasklist.md`)
70
+
71
+ | Code | Description | Source | Lines |
72
+ |------|-------------|--------|-------|
73
+ | COR-TL-1 | Tasklist session start behavior and task format | project-tasklist.md | 10-45 |
74
+ | COR-TL-2 | Brain integration and maintenance rules | project-tasklist.md | 47-65 |
75
+
76
+ ### Heartbeat (`heartbeat.md`)
77
+
78
+ | Code | Description | Source | Lines |
79
+ |------|-------------|--------|-------|
80
+ | COR-HB-1 | Heartbeat file format and schedule syntax | heartbeat.md | 10-55 |
81
+ | COR-HB-2 | Daemon architecture, CLI commands, and rules | heartbeat.md | 57-110 |
82
+
62
83
  ### Resource Capture (`resource-capture.md`)
63
84
 
64
85
  | Code | Description | Source | Lines |
@@ -89,6 +110,12 @@ Core rules define the foundational coding standards that apply across the entire
89
110
  | COR-BR-1 | Need brain session start behavior and processing rules |
90
111
  | COR-BR-2 | Need brain file templates and naming conventions |
91
112
  | COR-BR-3 | Need index management caps and global sync rules |
113
+ | COR-MEM-1 | Need memory session start behavior and entry format |
114
+ | COR-MEM-2 | Need memory field descriptions and maintenance rules |
115
+ | COR-TL-1 | Need tasklist session start behavior and task format |
116
+ | COR-TL-2 | Need tasklist brain integration and maintenance rules |
117
+ | COR-HB-1 | Need heartbeat file format and schedule syntax |
118
+ | COR-HB-2 | Need daemon architecture and CLI commands |
92
119
  | COR-RC-1 | Need resource capture behavior and criteria |
93
120
  | COR-RC-2 | Need resource file format and naming conventions |
94
121
 
@@ -127,3 +154,6 @@ Core rules define the foundational coding standards that apply across the entire
127
154
  - `autopilot-mode.md` has `alwaysApply: true` - detects and orchestrates autopilot flow mode
128
155
  - `brain-capture.md` is loaded on-demand - processes brain-capture blocks and manages brain index
129
156
  - `resource-capture.md` is loaded on-demand - watches for valuable reference materials during skill execution
157
+ - `project-tasklist.md` is loaded on-demand - session start tasklist behavior
158
+ - `project-memory.md` is loaded on-demand - artifact tracking and 7-day session loading
159
+ - `heartbeat.md` is loaded on-demand - scheduled task daemon configuration
@@ -11,6 +11,8 @@ When `flow/.autopilot` exists, this rule is active. It automatically orchestrate
11
11
  1. Check if `flow/.autopilot` exists
12
12
  2. If it exists: autopilot mode is **ON** - follow the rules below for every user input
13
13
  3. If it does not exist: autopilot mode is **OFF** - ignore this rule entirely, normal behavior applies
14
+ 4. Load `flow/tasklist.md` if it exists — summarize active tasks and ask if the user wants to pick one
15
+ 5. Load `flow/memory.md` if it exists — internalize last 7 days of completed work silently
14
16
 
15
17
  ---
16
18
 
@@ -105,8 +107,10 @@ Check `flow/contracts/` for any relevant integration contracts. If found, note t
105
107
 
106
108
  1. Move the discovery document to `flow/archive/`
107
109
  2. Move the plan document to `flow/archive/`
108
- 3. Present completion summary
109
- 4. **Prompt for context cleanup** (see below)
110
+ 3. Update `flow/tasklist.md` — mark the completed task as **Done** with today's date
111
+ 4. Append a memory entry to `flow/memory.md` with the completed feature summary
112
+ 5. Present completion summary
113
+ 5. **Prompt for context cleanup** (see below)
110
114
 
111
115
  ---
112
116