← Back to Command Center
memory
Workflow Protocol

/memory

Write a memory document to .tmp/SESSION_MEMORY.md for context handoff. This file will be your ONLY context when resuming work.

If .tmp/SESSION_MEMORY.md Already Exists

  1. Read it first
  2. Preserve still-relevant sections
  3. Mark updated sections with [UPDATED: YYYY-MM-DD]
  4. Move obsolete content to "## Archive" section at bottom
  5. Delete archive entries older than 2 weeks

Required Sections

Line budgets (approximate, ~500 total):


1. Project Overview (~10 lines)

What is this codebase? Tech stack? Absolute path to project root?

2. Architecture (~20 lines)

3. Completed Work (~50 lines, table format)

| Feature | Files Modified | Key Details |
|---------|----------------|-------------|
| Example | `path/to/file.py` | Brief description |

4. In-Progress/Blocked (~20 lines)

What's partially done? What's blocking?

5. Pending Work (~20 lines, prioritized)

What remains? Reference ticket files if they exist:

  1. @.v2_features/tickets/TICKET-001.md - High priority description
  2. Lower priority items...

6. Critical Knowledge (~150 lines)

Non-obvious discoveries that save re-investigation. Use severity markers:

Severity Levels:

Categories:

Example format:

🔴 CRITICAL - S3 Customer ID Mismatch
The customer ID in session IDs (e.g., 000000000001002914) is PADDED.
The customer ID in AppLog CustId field (e.g., 1002914) is STRIPPED.
S3 paths use the STRIPPED version. Always get CustId from AppLog metadata.
File: backend/app/clients/audio_storage.py:57-78

7. Test Data (~30 lines)

Include timestamps - test data expires!

[As of YYYY-MM-DD]
Session IDs that work:
- <id> - has audio + applog data
- <id> - has applog only

Credentials file: backend/local.env (not committed)

Sample API calls:
curl -X GET "http://localhost:8000/api/..." -H "..."

8. Quick Start (~20 lines)

Exact commands to run from project root:

# Backend
cd <path>
source .venv/bin/activate
uvicorn app.main:app --reload --port 8000

# Frontend
cd <path>
npm run dev

# Verify working
curl http://localhost:8000/health

9. Git State (~15 lines)

Branch: <current branch>
Last commit: <hash> <message>
Uncommitted changes: <yes/no, brief description>
Remote sync: <ahead/behind/synced>

10. Related Memory Files (~15 lines)

Link to other context files:

11. Resume Instructions (~25 lines)

First actions for next session:

1. READ FIRST:
   - <specific file to load for context>
   - <another critical file>

2. VERIFY STATE:
   - <command to check backend running>
   - <command to check frontend running>

3. CONTINUE FROM:
   - Task: <specific next task>
   - File: <file:line to start at>
   - Next step: <concrete action>

12. User Preferences (~25 lines)

Patterns established in this session:

Commits: Conventional commits (feat/fix/chore/docs/test)
Testing: Manual verification before commit
Python: snake_case, type hints, Pydantic models
TypeScript: camelCase, functional components, MUI
Error handling: <pattern used>
Logging: <pattern used>
Other: <any preferences expressed>

13. Lessons Learned (~20 lines)

Process improvements, debugging strategies, or workflow tweaks to carry forward.


What NOT to Include


Self-Verification Checklist

Before finalizing, verify:


Archive

[Move obsolete sections here with date. Delete after 2 weeks.]