This file should help you / the agent to focus on the work and understand the purpose of this project.
You must maintain a "memory bank" in the .memory-bank/ directory. This is your source of truth.
- before starting any task
- read
product-context.mdto understand the goal - read
active-context.mdto see the current focus - read
system-architecture.mdto ensure patterns are followed
- during the task
- if you make architectural changes, you MUST update the system-architecture.md immediately
- after completing the task/session
- add to the
progress.mdwhat was accomplished, use## <current timestamp, YYYY-MM-DD HH:MM format>as header, insert immediately below the# Journalheader. - IMPORTANT: Execute
date '+%Y-%m-%d %H:%M'in terminal to get accurate timestamp instead of guessing - update
active-context.mdwith the next logical steps for the next session - summarize these updates to the user
.memory-bank/progress.md with current timestamp
[ ] Update .memory-bank/active-context.md if focus/architecture changed
[ ] Confirm to user that memory bank has been updated
If you skip this checklist, the session is INCOMPLETE.
If developer suggest to pick up the next todo item, check the 'Next Steps (unsorted)' section in .memory-bank/active-context.md file and recommend top 3 of best items to pick up.
The create_file tool has a known bug where it can silently duplicate/corrupt file content (e.g. duplicated package declarations, garbled lines). The terminal heredoc approach also mangles long multi-line strings with special characters.
Mandatory workflow for creating new files:
- Always verify after creating a file. Immediately after using
create_file, runhead -5 <file>in the terminal to confirm the first lines are correct — specifically check there is only ONEpackagedeclaration. - If corruption is detected: delete the file with
rm, then recreate it. Do NOT try to edit a corrupted file in-place. - For Go files specifically: after creation, run
go build ./path/to/package/...to confirm compilation before moving on. - Never assume
create_filesucceeded. Always verify. The cost of checking is near-zero; the cost of building on a corrupted file is high.