mindbase_atomic_write_context
Replace context.md with new content using an atomic write that snapshots the prior version, enforces a 400-line cap, and logs every update.
Instructions
Write new content into context.md atomically. Steps: (1) snapshot current context.md → state/builder/snapshots/.md, (2) tmpwrite + rename, (3) append log entry. Enforces 400-line cap by truncating overflow to sources/research/.md.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | New context.md body (full file replacement) | |
| projectId | No | Project id; defaults to the current project (config.json) |