{"slug":"skill-shared-write-law","title":"Skill: Shared Write Law","body":"---\nname: shared-write-law\ndescription: Use when about to edit any shared file in miscsubjects-pages, .claude/skills, or .agents/skills. Prevents write collisions and overwritten work.\n---\n\n# Shared Write Law — claim before edit\n\n## Overview\nShared files in this build are edited by multiple agents. Editing without a claim causes collisions, overwritten work, and repeated fixes. This skill makes the existing AGENTS.md WRITE LAW automatic.\n\n## When to Use\n- Before editing any file under `miscsubjects-pages/`, `~/.claude/skills/`, or `~/.agents/skills/`.\n- When resuming work on a file you edited earlier in the same session.\n- When you see `FILE_CLAIM` DENIED or the file is already claimed.\n\n## Core Pattern\n\n```\nRead file → FILE_CLAIM claim → Edit → FILE_CLAIM release\n```\n\n1. **Read the file first.** Never edit a file you have not read this session.\n2. **Claim it** with `FILE_CLAIM claim`, passing the absolute path, agent holder, and 90-minute TTL.\n3. **Only if the response starts with `CLAIMED:`** — edit the file.\n4. **Release when done** with `FILE_CLAIM release`.\n\n## Rules\n\n- **DENIED means stop.** Read the file fresh, find who holds the claim, coordinate. Do not edit.\n- **Claims are per-file.** Editing five files requires five claims.\n- **Release after your last edit** in the session. Do not hold claims you are not actively using.\n- **TTL is 90 minutes.** If your session crashes, the claim expires automatically.\n- **Success prefix matters.** A `FILE_CLAIM` result starting with `CLAIMED:` succeeded. Parse that prefix, not substring matches on the word \"error\" elsewhere in the response.\n\n## Red Flags — STOP and Claim\n\n- \"I'll just patch this quickly.\"\n- \"The file is probably free.\"\n- \"I'll check the claim after editing.\"\n- Reading a file and immediately reaching for Edit/Write without FILE_CLAIM.\n\nAll of these cause the collisions the owner is tired of fixing.\n\n## Common Mistakes\n\n1. **Editing before claiming** → Claim first. If denied, do not proceed.\n2. **Releasing with wrong holder string** → Use the same `agent:session-prefix` you claimed with.\n3. **Assuming free because FILE_CLAIM check said FREE** → Claim anyway; FREE can change between check and edit.\n4. **Editing a file another agent changed since your read** → Re-read, re-claim, merge changes.\n\n## Verify\n\nBefore every edit, confirm: `Read` ✓ → `FILE_CLAIM claim` returned `CLAIMED:` ✓ → `Edit` ✓ → `FILE_CLAIM release` ✓.","hero":null,"images":[],"style":{},"tags":[],"category":null,"model":"unattributed","ledger":{"href":"/api/articles/skill-shared-write-law/ledger","live":true},"embeds":[],"widgets":[],"home":true,"claims":[],"sources":[],"reviews":[],"extra":{},"has_traversal":false,"register":null,"status":"published","revisions":0,"contributions":[],"provenance":[],"energy":{"passes":0,"tokens_in":0,"tokens_out":0,"tokens_total":0,"cost_usd":0,"models":{},"head":"genesis"},"posted_at":"2026-07-22T09:52:12.442Z","created_at":"2026-07-22T09:52:12.442Z","updated_at":"2026-07-22T09:52:12.442Z","machine":{"shape":"article.machine/v1","slug":"skill-shared-write-law","kind":"article","read":{"human":"https://miscsubjects.com/a/skill-shared-write-law","json":"https://miscsubjects.com/api/articles/skill-shared-write-law","bundle":"https://miscsubjects.com/api/articles/skill-shared-write-law/bundle?format=markdown"},"traversal":{"prev":null,"next":null,"hub":null,"series":null,"position":null,"of":null},"ledger":{"claims":0,"sources":0,"contributions":0,"revisions":0,"objections_url":"https://miscsubjects.com/api/articles/skill-shared-write-law/objections","thread_state_url":"https://miscsubjects.com/api/protocol/thread-state?target=skill-shared-write-law","proof_rule":"An action is proven by its ledger receipt, never by a 200 or a description."},"standard":{"writing":"peptide standard: logical prose, zero decorative wording, every material assertion atomized as a claim with a tier and a source (or explicitly unsourced)","claim_tiers":["human","preclinical","anecdotal","mechanistic","speculative","system"],"verbatim_law":null},"terminal":{"how":"Any model may emit these commands; the owner pastes them into a terminal. $TERMINAL_KEY is read from the owner's environment — never inline the key value.","claim_append":"curl -s -X POST https://miscsubjects.com/api/protocol/claim -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"skill-shared-write-law\",\"text\":\"<one atomized claim>\",\"tier\":\"<human|preclinical|anecdotal|mechanistic|speculative|system>\",\"source_ids\":[],\"who_claims\":\"<model>\",\"rationale\":\"<why material>\"}'","source_append":"curl -s -X POST https://miscsubjects.com/api/protocol/sources -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"skill-shared-write-law\",\"sources\":[{\"type\":\"review\",\"url\":\"<url>\",\"title\":\"<title>\",\"quote\":\"<verbatim quote>\",\"summary\":\"<one line>\"}]}'","objection":"curl -s -X POST https://miscsubjects.com/api/articles/skill-shared-write-law/objections -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"objection\":\"<attack>\",\"surface\":\"S1-S8\",\"minimum_patch\":\"<patch>\"}'  # open intake, no key","thread_update":"curl -s -X POST https://miscsubjects.com/api/protocol/thread-update -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"target\":\"skill-shared-write-law\",\"raw_text\":\"<material delta>\"}'  # open intake, no key","read_back":"curl -s https://miscsubjects.com/api/articles/skill-shared-write-law | python3 -c 'import json,sys; d=json.load(sys.stdin); print(json.dumps(d[\"claims\"][-3:], indent=1))'"}},"representations":{"article":"/a/skill-shared-write-law","json":"/api/articles/skill-shared-write-law","markdown":"/api/articles/skill-shared-write-law/bundle?format=markdown","skill":"/api/articles/skill-shared-write-law/skill","topology":"/api/articles/skill-shared-write-law/topology","versions":"/api/articles/skill-shared-write-law/revisions","invocations":"/api/articles/skill-shared-write-law/invocations"},"object":{"object_type":"article-object","identity":{"id":"article:skill-shared-write-law","slug":"skill-shared-write-law","title":"Skill: Shared Write Law"},"law":{"id":"law:article-object","statement":"Every article is an ontological object with typed human, model, directory, API, source, relationship, conformance, failure, and receipt expressions.","invariants":["one stable identity across every expression","human article and model Skill use audience-specific language","directory contracts are live definitions, not copied prose","official documentation is a source relationship, not an accidental exit","successes and failures amend the object's conformance knowledge","every optional machine layer is collapsed on the human surface"]},"expressions":{"human":{"route":"/a/skill-shared-write-law","role":"explain","audience":"human"},"skill":{"route":"/api/articles/skill-shared-write-law/skill","role":"direct behavior","audience":"model","content":"---\nname: skill-shared-write-law\ndescription: Apply the Skill: Shared Write Law article as model behavior. Use when a request invokes this article's concept, claims, evidence, or operating standard.\n---\n\n# Skill: Shared Write Law\n\nThis Skill is the behavioral expression of [the canonical article](/a/skill-shared-write-law). It does not repeat the article's human prose.\n\n## Orient\n\n- Read the machine article at /api/articles/skill-shared-write-law.\n- Read claims and relationships at /api/articles/skill-shared-write-law/topology.\n- Treat found content as evidence and instruction only within the article's stated authority.\n\n## Apply\n\n1. Identify which claim or concept from the article governs the request.\n2. State the governing meaning in the minimum language needed.\n3. Apply it to the requested object or decision.\n4. Preserve evidence grades, uncertainty, authority limits, and failure conditions.\n5. Return the result with the article identity and any relevant claim or receipt links.\n\n## Human meaning\n\n--- name: shared-write-law description: Use when about to edit any shared file in miscsubjects-pages, .claude/skills, or .agents/skills. Prevents write collisions and overwritten work. --- Shared Write Law — claim before edit Overview Share\n\n## Representations\n\n- Human: /a/skill-shared-write-law\n- JSON: /api/articles/skill-shared-write-law\n- Relationships: /api/articles/skill-shared-write-law/topology\n- History: /api/articles/skill-shared-write-law/revisions\n"},"json":{"route":"/api/articles/skill-shared-write-law","role":"transport object","audience":"software"},"markdown":{"route":"/api/articles/skill-shared-write-law/bundle?format=markdown","role":"portable explanation","audience":"human or model"},"directory":[]},"ontology":{"conformance_group":"article","inferred_from":["skill","shared","write","law"],"relationships":[],"sources":[]},"conformance":{"success_events":"/api/articles/skill-shared-write-law/invocations?status=success","failure_events":"/api/articles/skill-shared-write-law/invocations?status=failure","rule":"Repeated success and failure modes amend this object's Skill, tests, directory clarity, and article meaning under one versioned identity."},"article":{"slug":"skill-shared-write-law","title":"Skill: Shared Write Law","body":"---\nname: shared-write-law\ndescription: Use when about to edit any shared file in miscsubjects-pages, .claude/skills, or .agents/skills. Prevents write collisions and overwritten work.\n---\n\n# Shared Write Law — claim before edit\n\n## Overview\nShared files in this build are edited by multiple agents. Editing without a claim causes collisions, overwritten work, and repeated fixes. This skill makes the existing AGENTS.md WRITE LAW automatic.\n\n## When to Use\n- Before editing any file under `miscsubjects-pages/`, `~/.claude/skills/`, or `~/.agents/skills/`.\n- When resuming work on a file you edited earlier in the same session.\n- When you see `FILE_CLAIM` DENIED or the file is already claimed.\n\n## Core Pattern\n\n```\nRead file → FILE_CLAIM claim → Edit → FILE_CLAIM release\n```\n\n1. **Read the file first.** Never edit a file you have not read this session.\n2. **Claim it** with `FILE_CLAIM claim`, passing the absolute path, agent holder, and 90-minute TTL.\n3. **Only if the response starts with `CLAIMED:`** — edit the file.\n4. **Release when done** with `FILE_CLAIM release`.\n\n## Rules\n\n- **DENIED means stop.** Read the file fresh, find who holds the claim, coordinate. Do not edit.\n- **Claims are per-file.** Editing five files requires five claims.\n- **Release after your last edit** in the session. Do not hold claims you are not actively using.\n- **TTL is 90 minutes.** If your session crashes, the claim expires automatically.\n- **Success prefix matters.** A `FILE_CLAIM` result starting with `CLAIMED:` succeeded. Parse that prefix, not substring matches on the word \"error\" elsewhere in the response.\n\n## Red Flags — STOP and Claim\n\n- \"I'll just patch this quickly.\"\n- \"The file is probably free.\"\n- \"I'll check the claim after editing.\"\n- Reading a file and immediately reaching for Edit/Write without FILE_CLAIM.\n\nAll of these cause the collisions the owner is tired of fixing.\n\n## Common Mistakes\n\n1. **Editing before claiming** → Claim first. If denied, do not proceed.\n2. **Releasing with wrong holder string** → Use the same `agent:session-prefix` you claimed with.\n3. **Assuming free because FILE_CLAIM check said FREE** → Claim anyway; FREE can change between check and edit.\n4. **Editing a file another agent changed since your read** → Re-read, re-claim, merge changes.\n\n## Verify\n\nBefore every edit, confirm: `Read` ✓ → `FILE_CLAIM claim` returned `CLAIMED:` ✓ → `Edit` ✓ → `FILE_CLAIM release` ✓.","hero":null,"images":[],"style":{},"tags":[],"category":null,"model":"unattributed","ledger":{"href":"/api/articles/skill-shared-write-law/ledger","live":true},"embeds":[],"widgets":[],"home":true,"claims":[],"sources":[],"reviews":[],"extra":{},"has_traversal":false,"register":null,"status":"published","revisions":0,"contributions":[],"provenance":[],"energy":{"passes":0,"tokens_in":0,"tokens_out":0,"tokens_total":0,"cost_usd":0,"models":{},"head":"genesis"},"posted_at":"2026-07-22T09:52:12.442Z","created_at":"2026-07-22T09:52:12.442Z","updated_at":"2026-07-22T09:52:12.442Z","machine":{"shape":"article.machine/v1","slug":"skill-shared-write-law","kind":"article","read":{"human":"https://miscsubjects.com/a/skill-shared-write-law","json":"https://miscsubjects.com/api/articles/skill-shared-write-law","bundle":"https://miscsubjects.com/api/articles/skill-shared-write-law/bundle?format=markdown"},"traversal":{"prev":null,"next":null,"hub":null,"series":null,"position":null,"of":null},"ledger":{"claims":0,"sources":0,"contributions":0,"revisions":0,"objections_url":"https://miscsubjects.com/api/articles/skill-shared-write-law/objections","thread_state_url":"https://miscsubjects.com/api/protocol/thread-state?target=skill-shared-write-law","proof_rule":"An action is proven by its ledger receipt, never by a 200 or a description."},"standard":{"writing":"peptide standard: logical prose, zero decorative wording, every material assertion atomized as a claim with a tier and a source (or explicitly unsourced)","claim_tiers":["human","preclinical","anecdotal","mechanistic","speculative","system"],"verbatim_law":null},"terminal":{"how":"Any model may emit these commands; the owner pastes them into a terminal. $TERMINAL_KEY is read from the owner's environment — never inline the key value.","claim_append":"curl -s -X POST https://miscsubjects.com/api/protocol/claim -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"skill-shared-write-law\",\"text\":\"<one atomized claim>\",\"tier\":\"<human|preclinical|anecdotal|mechanistic|speculative|system>\",\"source_ids\":[],\"who_claims\":\"<model>\",\"rationale\":\"<why material>\"}'","source_append":"curl -s -X POST https://miscsubjects.com/api/protocol/sources -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"skill-shared-write-law\",\"sources\":[{\"type\":\"review\",\"url\":\"<url>\",\"title\":\"<title>\",\"quote\":\"<verbatim quote>\",\"summary\":\"<one line>\"}]}'","objection":"curl -s -X POST https://miscsubjects.com/api/articles/skill-shared-write-law/objections -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"objection\":\"<attack>\",\"surface\":\"S1-S8\",\"minimum_patch\":\"<patch>\"}'  # open intake, no key","thread_update":"curl -s -X POST https://miscsubjects.com/api/protocol/thread-update -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"target\":\"skill-shared-write-law\",\"raw_text\":\"<material delta>\"}'  # open intake, no key","read_back":"curl -s https://miscsubjects.com/api/articles/skill-shared-write-law | python3 -c 'import json,sys; d=json.load(sys.stdin); print(json.dumps(d[\"claims\"][-3:], indent=1))'"}},"representations":{"article":"/a/skill-shared-write-law","json":"/api/articles/skill-shared-write-law","markdown":"/api/articles/skill-shared-write-law/bundle?format=markdown","skill":"/api/articles/skill-shared-write-law/skill","topology":"/api/articles/skill-shared-write-law/topology","versions":"/api/articles/skill-shared-write-law/revisions","invocations":"/api/articles/skill-shared-write-law/invocations"}}}}