name: session-save description: Save PFO work context, state, decisions, blockers, and next steps for continuity. argument-hint: session summary or project path license: MIT metadata: category: workflow tags: [memory, context, session] effort: low side_effect: memory-write explicit_invocation: false skill_version: 1 prompt_version: pfo-session-save-v1 eval_dataset: tests/eval-datasets/session-save.json
Session Save
Preserve continuity between sessions.
Output
Write a dated session note under a project memory location, for example:
.codex-memory/STATE.json
.codex-memory/session_YYYY-MM-DD.md
.codex-memory/MEMORY.md
When Obsidian export is requested, regenerate the local knowledge layer with:
python3 scripts/pfo.py export <project> --target obsidian
Include
- What changed
- Decisions made
- Commands/tests run
- Current status
- Blockers
- Next steps
- Files touched
- PFO current state
- Latest
HANDOFF.mdstatus when present - Product classification
- Idea, validation, feedback, funnel, asset, and content status when present
- Completed modules
- Failed validations
Template
---
title: Session YYYY-MM-DD
tags:
- pfo/session
- pfo/memory
aliases:
- YYYY-MM-DD Session
---
# Session YYYY-MM-DD
## Summary
## Changes
## Decisions
## Verification
## Blockers
## Next Steps
## Files Touched
Update .codex-memory/MEMORY.md with a newest-first index:
---
title: Memory
tags:
- pfo/memory
- pfo/project
aliases:
- Project Memory
---
# Memory
- YYYY-MM-DD: one-line session summary -> session_YYYY-MM-DD.md
## Obsidian Links
- [[STATE]]
- [[LEARNINGS]]
- [[HANDOFF]]
Update .codex-memory/STATE.json using memory/session-state.schema.json:
{
"sessionState": "ACTIVE",
"currentStage": "PLAN_READY",
"intent": "short user intent",
"classification": {
"productType": "saas",
"domain": "subscriptions",
"complexity": "medium",
"requiredModules": ["auth", "billing", "database"],
"infrastructure": ["docker"]
},
"architecture": {
"pattern": "modular_monolith",
"backend": "selected backend",
"frontend": "selected frontend",
"database": "selected database",
"auth": "selected auth",
"deployment": "selected deployment"
},
"artifacts": ["PRODUCT_BLUEPRINT.md", "BUILD_PLAN.md", "EXECUTION_GRAPH.md"],
"completedModules": [],
"failedValidations": [],
"blockers": [],
"nextAction": "begin modular build"
}
Self-validation
Before final output, verify:
- Route, side-effect, and confirmation requirements match metadata.
- Required artifacts or read-only result are explicit.
- Verification, blockers, and next route are stated.
Rules
- Do not store secrets.
- Prefer concise, resume-friendly notes.
- Update the memory index after creating a new session file.
- Keep
STATE.jsonreloadable and machine-readable. - Use Obsidian-compatible frontmatter, wikilinks, and callouts in
.codex-memory/*.mdonly as additive Markdown; do not put Obsidian-only syntax inSTATE.json. - Keep
PRODUCT_BLUEPRINT.md,BUILD_PLAN.md,EXECUTION_GRAPH.md,TEST_PLAN.md, andQUALITY_GATES.mdas canonical source artifacts; Obsidian notes are regenerated export copies. - Do not use
/session-saveas a substitute for/handoffwhen another session or role must start from a compact transfer artifact. - If
.codex-memory/is not appropriate for the project, ask once and use the project-local convention the user chooses.