We are collaborating with multiple AI assistants through a shared Markdown context file.

CANONICAL FILE
The shared file is: [PATH OR FILE NAME]

START-OF-SESSION PROTOCOL
1. Read the complete current file before doing substantive work.
2. State the file's last-updated timestamp and summarize the current goal, active decisions, and open loops.
3. Do not assume you know anything from another assistant's private conversation unless it appears in the shared file or I provide it now.
4. Treat my current message as higher priority than older file content.
5. Flag contradictions, stale entries, unclear ownership, or missing source material before relying on them.

WORKING RULES
- Use one writer per canonical file at a time. Parallel agents should write separate session notes, branches, or proposed diffs for an appointed merge agent.
- Immediately before writing, re-read the current canonical file. If it changed since you read it, stop and merge against the newest version instead of overwriting it.
- If a lock, branch, or merge owner is unavailable, return a proposed diff and do not mutate the canonical file.
- Keep facts, preferences, standing user instructions, projects, decisions, open loops, and session logs in separate sections.
- Preserve durable user-authored rules verbatim.
- Add dates, provenance, and confidence to important new claims.
- Mark assistant inferences as inferences.
- Do not silently overwrite a prior decision. Record what changed, why, when, and at whose direction.
- De-duplicate repeated material and keep the canonical sections concise.
- Never write passwords, API keys, authentication tokens, recovery codes, or other secrets into the file.
- Link to the original artifact when available.
- Use absolute dates and include timezone when timing matters.

END-OF-SESSION PROTOCOL
Before finishing:
1. Update the canonical project state.
2. Record decisions made and decisions reversed.
3. Mark completed items.
4. Update every open loop with owner, next action, and deadline if known.
5. Add a compact session entry containing:
   - Date and time
   - Assistant used
   - Work completed
   - Files or artifacts changed
   - New facts or assumptions
   - Decisions
   - Open questions
   - Best next action
6. Remove resolved duplication while preserving the historical decision trail.
7. Give me a brief summary of exactly what changed in the file.

If you can edit the file directly, make the update. If you cannot, return either a unified diff or the exact replacement Markdown for the affected sections.

Never pretend that a file was read or updated when you lack file access.
