Skip to content

Commit 93ae63a

Browse files
committed
feat: Add planning-with-files skill from OthmanAdi repository
Added the planning-with-files skill that implements Manus-style context engineering workflow using persistent markdown files for planning, progress tracking, and knowledge storage. Features: - 3-file pattern (task_plan.md, notes.md, deliverable) - Attention manipulation through file-based planning - Error persistence and tracking - Goal tracking with checkboxes - Reduces context stuffing Location: cli-tool/components/skills/workflow-automation/planning-with-files/ Source: https://github.com/OthmanAdi/planning-with-files
1 parent b289c87 commit 93ae63a

File tree

4 files changed

+521
-32
lines changed

4 files changed

+521
-32
lines changed
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
---
2+
name: planning-with-files
3+
description: Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage. Use when starting complex tasks, multi-step projects, research tasks, or when the user mentions planning, organizing work, tracking progress, or wants structured output.
4+
---
5+
6+
# Planning with Files
7+
8+
Work like Manus: Use persistent markdown files as your "working memory on disk."
9+
10+
## Quick Start
11+
12+
Before ANY complex task:
13+
14+
1. **Create `task_plan.md`** in the working directory
15+
2. **Define phases** with checkboxes
16+
3. **Update after each phase** - mark [x] and change status
17+
4. **Read before deciding** - refresh goals in attention window
18+
19+
## The 3-File Pattern
20+
21+
For every non-trivial task, create THREE files:
22+
23+
| File | Purpose | When to Update |
24+
|------|---------|----------------|
25+
| `task_plan.md` | Track phases and progress | After each phase |
26+
| `notes.md` | Store findings and research | During research |
27+
| `[deliverable].md` | Final output | At completion |
28+
29+
## Core Workflow
30+
31+
```
32+
Loop 1: Create task_plan.md with goal and phases
33+
Loop 2: Research → save to notes.md → update task_plan.md
34+
Loop 3: Read notes.md → create deliverable → update task_plan.md
35+
Loop 4: Deliver final output
36+
```
37+
38+
### The Loop in Detail
39+
40+
**Before each major action:**
41+
```bash
42+
Read task_plan.md # Refresh goals in attention window
43+
```
44+
45+
**After each phase:**
46+
```bash
47+
Edit task_plan.md # Mark [x], update status
48+
```
49+
50+
**When storing information:**
51+
```bash
52+
Write notes.md # Don't stuff context, store in file
53+
```
54+
55+
## task_plan.md Template
56+
57+
Create this file FIRST for any complex task:
58+
59+
```markdown
60+
# Task Plan: [Brief Description]
61+
62+
## Goal
63+
[One sentence describing the end state]
64+
65+
## Phases
66+
- [ ] Phase 1: Plan and setup
67+
- [ ] Phase 2: Research/gather information
68+
- [ ] Phase 3: Execute/build
69+
- [ ] Phase 4: Review and deliver
70+
71+
## Key Questions
72+
1. [Question to answer]
73+
2. [Question to answer]
74+
75+
## Decisions Made
76+
- [Decision]: [Rationale]
77+
78+
## Errors Encountered
79+
- [Error]: [Resolution]
80+
81+
## Status
82+
**Currently in Phase X** - [What I'm doing now]
83+
```
84+
85+
## notes.md Template
86+
87+
For research and findings:
88+
89+
```markdown
90+
# Notes: [Topic]
91+
92+
## Sources
93+
94+
### Source 1: [Name]
95+
- URL: [link]
96+
- Key points:
97+
- [Finding]
98+
- [Finding]
99+
100+
## Synthesized Findings
101+
102+
### [Category]
103+
- [Finding]
104+
- [Finding]
105+
```
106+
107+
## Critical Rules
108+
109+
### 1. ALWAYS Create Plan First
110+
Never start a complex task without `task_plan.md`. This is non-negotiable.
111+
112+
### 2. Read Before Decide
113+
Before any major decision, read the plan file. This keeps goals in your attention window.
114+
115+
### 3. Update After Act
116+
After completing any phase, immediately update the plan file:
117+
- Mark completed phases with [x]
118+
- Update the Status section
119+
- Log any errors encountered
120+
121+
### 4. Store, Don't Stuff
122+
Large outputs go to files, not context. Keep only paths in working memory.
123+
124+
### 5. Log All Errors
125+
Every error goes in the "Errors Encountered" section. This builds knowledge for future tasks.
126+
127+
## When to Use This Pattern
128+
129+
**Use 3-file pattern for:**
130+
- Multi-step tasks (3+ steps)
131+
- Research tasks
132+
- Building/creating something
133+
- Tasks spanning multiple tool calls
134+
- Anything requiring organization
135+
136+
**Skip for:**
137+
- Simple questions
138+
- Single-file edits
139+
- Quick lookups
140+
141+
## Anti-Patterns to Avoid
142+
143+
| Don't | Do Instead |
144+
|-------|------------|
145+
| Use TodoWrite for persistence | Create `task_plan.md` file |
146+
| State goals once and forget | Re-read plan before each decision |
147+
| Hide errors and retry | Log errors to plan file |
148+
| Stuff everything in context | Store large content in files |
149+
| Start executing immediately | Create plan file FIRST |
150+
151+
## Advanced Patterns
152+
153+
See [reference.md](reference.md) for:
154+
- Attention manipulation techniques
155+
- Error recovery patterns
156+
- Context optimization from Manus
157+
158+
See [examples.md](examples.md) for:
159+
- Real task examples
160+
- Complex workflow patterns
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
# Examples: Planning with Files in Action
2+
3+
## Example 1: Research Task
4+
5+
**User Request:** "Research the benefits of morning exercise and write a summary"
6+
7+
### Loop 1: Create Plan
8+
```bash
9+
Write task_plan.md
10+
```
11+
12+
```markdown
13+
# Task Plan: Morning Exercise Benefits Research
14+
15+
## Goal
16+
Create a research summary on the benefits of morning exercise.
17+
18+
## Phases
19+
- [ ] Phase 1: Create this plan ✓
20+
- [ ] Phase 2: Search and gather sources
21+
- [ ] Phase 3: Synthesize findings
22+
- [ ] Phase 4: Deliver summary
23+
24+
## Key Questions
25+
1. What are the physical health benefits?
26+
2. What are the mental health benefits?
27+
3. What scientific studies support this?
28+
29+
## Status
30+
**Currently in Phase 1** - Creating plan
31+
```
32+
33+
### Loop 2: Research
34+
```bash
35+
Read task_plan.md # Refresh goals
36+
WebSearch "morning exercise benefits"
37+
Write notes.md # Store findings
38+
Edit task_plan.md # Mark Phase 2 complete
39+
```
40+
41+
### Loop 3: Synthesize
42+
```bash
43+
Read task_plan.md # Refresh goals
44+
Read notes.md # Get findings
45+
Write morning_exercise_summary.md
46+
Edit task_plan.md # Mark Phase 3 complete
47+
```
48+
49+
### Loop 4: Deliver
50+
```bash
51+
Read task_plan.md # Verify complete
52+
Deliver morning_exercise_summary.md
53+
```
54+
55+
---
56+
57+
## Example 2: Bug Fix Task
58+
59+
**User Request:** "Fix the login bug in the authentication module"
60+
61+
### task_plan.md
62+
```markdown
63+
# Task Plan: Fix Login Bug
64+
65+
## Goal
66+
Identify and fix the bug preventing successful login.
67+
68+
## Phases
69+
- [x] Phase 1: Understand the bug report ✓
70+
- [x] Phase 2: Locate relevant code ✓
71+
- [ ] Phase 3: Identify root cause (CURRENT)
72+
- [ ] Phase 4: Implement fix
73+
- [ ] Phase 5: Test and verify
74+
75+
## Key Questions
76+
1. What error message appears?
77+
2. Which file handles authentication?
78+
3. What changed recently?
79+
80+
## Decisions Made
81+
- Auth handler is in src/auth/login.ts
82+
- Error occurs in validateToken() function
83+
84+
## Errors Encountered
85+
- [Initial] TypeError: Cannot read property 'token' of undefined
86+
→ Root cause: user object not awaited properly
87+
88+
## Status
89+
**Currently in Phase 3** - Found root cause, preparing fix
90+
```
91+
92+
---
93+
94+
## Example 3: Feature Development
95+
96+
**User Request:** "Add a dark mode toggle to the settings page"
97+
98+
### The 3-File Pattern in Action
99+
100+
**task_plan.md:**
101+
```markdown
102+
# Task Plan: Dark Mode Toggle
103+
104+
## Goal
105+
Add functional dark mode toggle to settings.
106+
107+
## Phases
108+
- [x] Phase 1: Research existing theme system ✓
109+
- [x] Phase 2: Design implementation approach ✓
110+
- [ ] Phase 3: Implement toggle component (CURRENT)
111+
- [ ] Phase 4: Add theme switching logic
112+
- [ ] Phase 5: Test and polish
113+
114+
## Decisions Made
115+
- Using CSS custom properties for theme
116+
- Storing preference in localStorage
117+
- Toggle component in SettingsPage.tsx
118+
119+
## Status
120+
**Currently in Phase 3** - Building toggle component
121+
```
122+
123+
**notes.md:**
124+
```markdown
125+
# Notes: Dark Mode Implementation
126+
127+
## Existing Theme System
128+
- Located in: src/styles/theme.ts
129+
- Uses: CSS custom properties
130+
- Current themes: light only
131+
132+
## Files to Modify
133+
1. src/styles/theme.ts - Add dark theme colors
134+
2. src/components/SettingsPage.tsx - Add toggle
135+
3. src/hooks/useTheme.ts - Create new hook
136+
4. src/App.tsx - Wrap with ThemeProvider
137+
138+
## Color Decisions
139+
- Dark background: #1a1a2e
140+
- Dark surface: #16213e
141+
- Dark text: #eaeaea
142+
```
143+
144+
**dark_mode_implementation.md:** (deliverable)
145+
```markdown
146+
# Dark Mode Implementation
147+
148+
## Changes Made
149+
150+
### 1. Added dark theme colors
151+
File: src/styles/theme.ts
152+
...
153+
154+
### 2. Created useTheme hook
155+
File: src/hooks/useTheme.ts
156+
...
157+
```
158+
159+
---
160+
161+
## Example 4: Error Recovery Pattern
162+
163+
When something fails, DON'T hide it:
164+
165+
### Before (Wrong)
166+
```
167+
Action: Read config.json
168+
Error: File not found
169+
Action: Read config.json # Silent retry
170+
Action: Read config.json # Another retry
171+
```
172+
173+
### After (Correct)
174+
```
175+
Action: Read config.json
176+
Error: File not found
177+
178+
# Update task_plan.md:
179+
## Errors Encountered
180+
- config.json not found → Will create default config
181+
182+
Action: Write config.json (default config)
183+
Action: Read config.json
184+
Success!
185+
```
186+
187+
---
188+
189+
## The Read-Before-Decide Pattern
190+
191+
**Always read your plan before major decisions:**
192+
193+
```
194+
[Many tool calls have happened...]
195+
[Context is getting long...]
196+
[Original goal might be forgotten...]
197+
198+
→ Read task_plan.md # This brings goals back into attention!
199+
→ Now make the decision # Goals are fresh in context
200+
```
201+
202+
This is why Manus can handle ~50 tool calls without losing track. The plan file acts as a "goal refresh" mechanism.

0 commit comments

Comments
 (0)