Layered Project Memory
This skill creates and maintains structured markdown memory files at project start, then reuses them during planning and execution.
Runtime Rules
- Confirm the project root. If unclear, ask the user.
- If
.plan-memory/does not exist, run bootstrap script.
python3 scripts/bootstrap_plan_memory.py --root . --project-name "<project-name>"
- Read core memory files:
.plan-memory/README.md.plan-memory/product/requirements.md.plan-memory/backend/requirements.md.plan-memory/frontend/requirements.md.plan-memory/shared/constraints.md
- Store new information in the most relevant layer file, not in a single aggregate file.
- Before final plan output, update
.plan-memory/README.mdsummary index.
Use Cases
- New project intake with requirements capture
- Splitting work by backend/frontend scope
- Long-running refactor/integration work requiring persistent context
스크립트 동작
Default directory tree
.plan-memory/
README.md
product/requirements.md
product/acceptance-criteria.md
backend/requirements.md
backend/api-contracts.md
backend/data-model.md
frontend/requirements.md
frontend/ux-flow.md
frontend/state-management.md
shared/constraints.md
shared/glossary.md
execution/current-plan.md
execution/open-questions.md
Key Rules
- Existing files are preserved by default; do not overwrite unless
--forceis passed. - For edits, ask for user confirmation before deleting/replacing existing docs.
- For new projects, fill
execution/current-plan.mdandproduct/acceptance-criteria.mdfirst.
Maintenance Rules
- Keep backend and frontend assumptions separate.
- Put cross-cutting rules (security/performance/compliance) in
shared/constraints.md. - Keep the summary index in
README.mdin sync with added layers/files. - End each planning pass by writing plan/risk/acceptance updates into
execution/current-plan.md.
스크립트 위치
/Users/kdb/.codex/skills/plan-memory-hierarchy/scripts/bootstrap_plan_memory.py
Failure Handling
- Stop and ask for confirmation if root is unclear.
- On filesystem errors, report exact failed path and error message.