.kiro/skills/planning-with-files/references/manus-principles.md
This workflow is inspired by Manus-style context engineering: treat markdown on disk as durable working memory while the model context window behaves like volatile RAM.
Kiro layout: planning files live under .kiro/plan/ (not the project root). See Kiro Steering — file references for #[[file:path]] live includes.
This skill is based on context engineering principles from Manus, the AI agent company acquired by Meta for $2 billion in December 2025.
"KV-cache hit rate is THE single most important metric for production AI agents."
Statistics:
Implementation:
Don't dynamically remove tools (breaks KV-cache). Use logit masking instead.
Best Practice: Use consistent action prefixes (e.g., browser_, shell_, file_) for easier masking.
"Markdown is my 'working memory' on disk."
The Formula:
Context Window = RAM (volatile, limited)
Filesystem = Disk (persistent, unlimited)
Compression Must Be Restorable:
"Creates and updates todo.md throughout tasks to push global plan into model's recent attention span."
Problem: After ~50 tool calls, models forget original goals ("lost in the middle" effect).
Solution: Re-read .kiro/plan/task_plan.md before major decisions. Goals appear in the attention window.
"Leave the wrong turns in the context."
Why:
"Uniformity breeds fragility."
Problem: Repetitive action-observation pairs cause drift and hallucination.
Solution: Introduce controlled variation:
Based on Lance Martin's analysis of Manus architecture.
Compaction:
Tool calls have TWO representations:
├── FULL: Raw tool content (stored in filesystem)
└── COMPACT: Reference/file path only
RULES:
- Apply compaction to STALE (older) tool results
- Keep RECENT results FULL (to guide next decision)
Multi-agent setups can isolate exploration in separate contexts while persisting shared state in files (e.g. under .kiro/plan/).
| File | Purpose |
|---|---|
.kiro/plan/task_plan.md | Phase tracking, progress |
.kiro/plan/findings.md | Discoveries, decisions |
.kiro/plan/progress.md | Session log |
Manus context engineering blog: https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus