How to work with Plan, Scratch, and Tasks
This how-to explains how technical Buffaly users can keep long-running work reviewable and resumable by using three different working-memory layers: Plan, Scratch, and durable task artifacts. These are session artifacts, not replacements for implementation files, commits, wiki pages, ontology memory, or secrets.
Plan
Plan.md is the short routing artifact for the current session. The ToInitializeSessionPlanAndScratch action creates Plan.md and Scratch.md together if missing. Plan operations let you set the routing explanation and manage task steps:
| Action | Purpose |
|---|---|
ToSetSessionPlanExplanation | Set the short routing summary |
ToAddSessionPlanTask | Add a pending plan step |
ToStartSessionPlanTask | Mark a step in progress |
ToCompleteSessionPlanTask | Mark a step complete |
ToBlockSessionPlanTask | Mark a step blocked |
ToGetSessionPlan | Read the current plan |
Use Plan for the immediate route, current/next concrete step, compact statuses (pending/in progress/completed/blocked), and a short note explaining why a step changed.
Scratch
Scratch.md is session-local working memory. The same ToInitializeSessionPlanAndScratch call ensures it exists alongside Plan. Use it for implementation files inspected, command output summaries, hypotheses, pivots, intermediate conclusions, blockers, and reminders for the next turn.
Do not treat Scratch as durable memory, a final deliverable, a protected secret store, or the only record of work that spans multiple days. If acceptance criteria or handoff evidence matter, promote the durable state into a task artifact.
Tasks
A durable task artifact is a root-level markdown file (task-*.md). The typed actions ToCreateAndMaintainLocalTask and ToUpdateExistingLocalTask manage these artifacts with concrete scope and acceptance criteria.
Use a task artifact for multi-turn implementation, debugging that spans turns, delegated child-session work, explicit acceptance criteria, decisions a future session may need, and validation history.
A good task artifact names the task scope, acceptance criteria, references inspected, decisions made, files changed, validation performed, blockers or open questions, and final result such as a commit hash when applicable.
How these layers relate to timeline and artifacts
| Layer | Main purpose | User-facing check |
|---|---|---|
| Timeline | Chronological evidence stream | Ask what message/tool result proves the claim. |
| Plan | Current route | Ask for current step, next step, and blockers. |
| Scratch | Session-local evidence and pivots | Ask what was inspected and what changed. |
| Task artifact | Durable task record | Ask for scope, acceptance criteria, status, and validation. |
| Final deliverable | File, commit, response, or external artifact | Verify the path, diff, output, or commit hash. |
When Buffaly should create or update each layer
- At task start: initialize Plan and Scratch; create a durable task artifact if acceptance criteria or multiple turns are expected.
- During investigation: keep Plan short; append evidence to Scratch; update the task artifact when durable state changes.
- Before compaction or delegation: preserve scope, acceptance criteria, changed files, blockers, and next validation step in the task artifact.
- When resuming: re-read Plan, Scratch, task artifacts, target files, and scoped git status before acting.
- At completion: update the task artifact with final validation, changed files, commit hash, and open questions.
Practical prompt examples
This is a multi-step documentation task. Initialize Plan and Scratch. Create a durable task artifact with acceptance criteria and implementation files to inspect.
Continue the current task. Re-read Plan, Scratch, the durable task artifact, and the target article. Report the last completed step and next safe step before editing.
Inspect session artifacts for Plan.md, Scratch.md, task-*.md, compaction files, and the last timeline result. Tell me whether the task is ready to continue, blocked, or already complete.
How to verify Plan, Scratch, and Tasks
Ask Buffaly for direct evidence: "Show the current Plan summary, the latest Scratch evidence note, and the task artifact status. Include file names and last modified times if available."
- Check the session directory for
Plan.md,Scratch.md, and root-leveltask-*.mdartifacts. - Use session artifact surfaces when available to list or read artifacts without relying only on prose summaries.
- Confirm final deliverables independently by file path, diff, command output, route render, or commit hash.
Common mistakes and how to avoid them
| Mistake | Better request |
|---|---|
| Putting all evidence in Plan | "Keep Plan short and put evidence in Scratch." |
| Treating Scratch as durable memory | "Create/update a durable task artifact for acceptance criteria and decisions." |
| Waiting until the end to create a task artifact | "Create the task artifact before investigation begins." |
| Storing secrets in task files | "Store credentials using the secret mechanism; refer to them by key only." |
| Repeating instructions after compaction | "Re-read Plan, Scratch, task artifacts, and target files, then continue." |
| Letting child work return only prose | "Require changed files, validation evidence, and completion status in the child task report." |
Summary
- Plan is the short current route.
- Scratch is session-local evidence and pivots.
- Task artifacts are the durable system of record for multi-turn work.