Save
Route the stash, write the log, update the bundle, trigger projection.
Pre-Save
- Ask: "Anything else before I save?"
- Scan back through conversation for missed stash items
- Present stash grouped by type:
Stash (N items):
Decisions:
1. [decision] -> [walnut]
2. [decision] -> [walnut]
Tasks:
3. [task] -> [walnut]
Notes:
4. [note] -> [walnut]
5. [note] -> [[person]]
Confirm, edit, or drop items?
Write Log Entry
Prepend to _kernel/log.md after frontmatter. Use terminal:
# Read existing log, prepend new entry after frontmatter
Entry format:
## YYYY-MM-DDTHH:MM:SS -- squirrel:[session_id]
**Type:** [feature/decision/research/strategy/etc]
[Narrative paragraph -- what happened, why, what it means]
### Decisions
- [decision with rationale]
### Artifacts
- [files created/modified]
signed: squirrel:[session_id]
Update Active Bundle
Write to the active bundle's context.manifest.yaml:
- Update
context:field with current state - Update
status:if changed
Route Tasks
Confirmed task-shaped stash items are promoted in a single batch via alive tasks promote after the squirrel YAML stash is written. The CLI walks each type: task stash item, writes the task row, and stamps promotion_state / task_id markers back onto the squirrel file under a single flock for crash safety.
"$ALIVE_PLUGIN_ROOT/bin/alive" tasks promote \
--squirrel "[session_id]" \
--walnut "[path]"
Python fallback if bin/alive is missing:
"${ALIVE_PYTHON:-python3}" "$ALIVE_PLUGIN_ROOT/scripts/cli.py" tasks promote \
--squirrel "[session_id]" --walnut "[path]"
For non-promotion edits on existing tasks (mark done, change priority), use tasks.py directly:
python3 "$ALIVE_PLUGIN_ROOT/scripts/tasks.py" done --walnut "[path]" --id "[task_id]"
Never read or write tasks.json directly. Fail-loud if the CLI binary is missing on both paths — do not fall back to per-item adds from the agent.
Route People
Stash items tagged with [[person-name]] get dispatched to person walnuts as brief log entries.
Post-Save
The post-save hook triggers project.py to regenerate now.json. This is automatic.
Update _kernel/log.md frontmatter:
last-entry:timestampentry-count:incrementsummary:one-line summary
Zero-Context Check
Ask: "If a new agent loaded this walnut with no context, would it have everything it needs?"
If no, fix the log entry or manifest before finishing.
Nudge Sharing
"Any bundles worth sharing?"
Reset
Stash clears. Session continues.