## §OIP SYSTEM ARTICLE — FILE (5 operations)
A generated article for one OIP shelf. It lists every operation in this API/CLI/MCP/device/model/core subsystem, links each leaf article, and gives the ledger path for proof.

### Read Order
- scan operations
- open a leaf doc
- run via run_now or POST /api/dispatch
- open receipt
- repair/replay if needed

### Operations
- **FILE_GET** — Read a repo file by path via GitHub Contents API. Returns {path,sha,size,content}
  when: you need to file get
  args: path
  doc: https://miscsubjects.com/api/dispatch?key=FILE_GET&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=FILE_GET&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=FILE_GET
- **FILE_PUT** — Write a repo file via GitHub Contents API. Creates or overwrites.
  when: you need to file put
  args: $1 = path (e.g. functions/api/dispatch.js), $2 = file content (raw text), $3 = commit message (optional), $4 = sha (optional, auto-resolved if omitted), $5 = ref (optional, default main)
  doc: https://miscsubjects.com/api/dispatch?key=FILE_PUT&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=FILE_PUT&body=functions%2Fapi%2Fdispatch.js%7Cconst%20X%20%3D%201%3B%7Cfix%20dispatch&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=FILE_PUT
- **FILE_LIST** — List every file in the repo tree
  when: you need to file list
  args: see content
  doc: https://miscsubjects.com/api/dispatch?key=FILE_LIST&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=FILE_LIST&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=FILE_LIST
- **FILE_PATCH** — Patch a repo file — replace one string with another. Safer than FILE_PUT for small edits
  when: you need to file patch
  args: $1 = path (e.g. functions/api/dispatch.js), $2 = old_string, $3 = new_string, $4 = commit message (optional), $5 = ref (optional, default main)
  doc: https://miscsubjects.com/api/dispatch?key=FILE_PATCH&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=FILE_PATCH&body=functions%2Fapi%2Fdispatch.js%7Cconst%20ITER_CAP%20%3D%208%3B%7Cconst%20ITER_CAP%20%3D%2020%3B%7Cbump%20cap&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=FILE_PATCH
- **FILE_CLAIM** — Advisory write-locks so coding agents stop double-editing the same file. KV-backed, TTL auto-expires.
  when: BEFORE editing any repo file: claim it. AFTER finishing: release it. DENIED means another session holds it — read the file fresh and coordin
  args: op(claim|release|check|list) | file path | holder as agent:session | ttl minutes (default 90)
  doc: https://miscsubjects.com/api/dispatch?key=FILE_CLAIM&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=FILE_CLAIM&body=claim%7Cfunctions%2Fapi%2Fdispatch.js%7Cclaude%3Aabc123%7C90&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=FILE_CLAIM

### Troubleshooting
- If a row's example has placeholders, replace only the placeholder values and preserve separators.
- If a call fails, open its receipt and repair it with POST /api/dispatch {key, body, repairs:'inv_ID'}.
- If token scope denies this system, ask the owner for a row:/rows:/pfx: token scoped to the exact operation set.

Back to the tree: https://miscsubjects.com/api/dispatch?map=1&format=markdown