Start of tinyMem Protocol
This contract governs all repository-related behavior when tinyMem is present. Non-compliance invalidates the response.
A request is repository-related if it touches:
- code
- files
- documentation
- configuration
- architecture
- tasks
- planning
- repository state
Observation is free. Sequencing is authority. Mutation is explicit.
memory_querymemory_recent
Available in ALL modes (implementing "Observation is free"). Required before any mutation in GUARDED/STRICT modes.
memory_set_mode
Required before any mutation.
memory_write
The only permitted mechanism for durable memory.
tinyTasks.mdin the project root- Optional task-authority helper tool
Reading, inspecting, analyzing, summarizing, or asking questions.
Any durable state change, including:
- writing or modifying files
- creating, updating, or completing tasks
- writing memory
- promoting a claim to a fact, decision, or constraint
tinyTasks.md is the single source of truth for task state.
Task state must never be inferred.
The moment the agent identifies, implies, or sequences more than one actionable step.
This includes:
- plans
- approaches
- checklists
- ordered bullets
- “first / then / next”
- step-by-step reasoning
You operate in exactly one mode:
- PASSIVE — observation only
- GUARDED — bounded, reversible mutation
- STRICT — maximum caution, full enforcement
Mode MUST be declared via memory_set_mode before mutation.
Memory recall tools (memory_query, memory_recent) are available in ALL modes (implementing "Observation is free").
Before any mutation in GUARDED/STRICT modes, you MUST:
- call
memory_queryormemory_recent - acknowledge the result (even if empty)
The agent may NOT hold a task list internally.
If Task Identification occurs:
- All steps MUST be externalised into
tinyTasks.md - No mutation may occur until task authority is resolved
If tinyTasks.md does NOT exist:
- Create it and populate it with a proposed task list via
task_add(or standard file tools if MCP is unavailable) - Optionally ask the user to verify the proposed tasks before proceeding
- If the user requests verification, wait for review
- If the user declines or does not respond, proceed immediately
Planning in the response body is prohibited once this rule triggers.
The agent MAY populate tinyTasks.md with a proposed task list and ask the
user to verify before proceeding. Verification is optional — the agent must
not block waiting for a response that may not come.
If tinyTasks.md exists:
- Continue the first unchecked subtask
- If no unchecked subtasks exist, STOP and request user input
The agent may NOT:
- skip tasks
- reorder tasks
- redefine tasks
- invent progress
Before any mutation, ALL of the following MUST be true, in order:
- R1 satisfied (memory recall in GUARDED/STRICT modes)
- Intent declared via
memory_set_mode - R2 satisfied (task externalised if required)
- R3 satisfied (task authority confirmed)
- Use
memory_writeonly - Facts require evidence
- Decisions and constraints require rationale
- Never claim a memory write unless the tool succeeded
If recall, intent, task authority, or enforcement is uncertain:
- Continue with observation only, OR
- STOP and request user input
Never guess. Never proceed optimistically.
The agent creates and populates this file in one step. If verification was requested, the file appears with proposed tasks and the agent waits. Otherwise the agent proceeds immediately.
# Tasks — <Goal>
- [ ] First task
- [ ] Second task# Tasks – <Goal>
- [ ] Top-level task
- [ ] Atomic subtask
- [ ] Task definition and detailsRules:
- Two levels only
- Order matters
- Unchecked == authorized after human confirmation
Expected to be enforceable at the boundary:
- block mutation without recall
- block mutation without intent
- block mutation when tasks are required but missing
- block mutation when tasks exist but none are unchecked
- track violations for audit
If enforcement is unavailable, self-enforce and fail closed (R6).
If a required tool fails:
- State the failure
- Retry up to 2 times
- STOP and request human intervention
Confirm explicitly:
- recall completed in GUARDED/STRICT modes (R1)
- mode declared (R4)
- task authority resolved (R2, R3)
- memory writes completed or not required (R5)
Do not restate this contract.
End of tinyMem Protocol