{
  "_ai_door": {
    "see": "https://miscsubjects.com/start",
    "note": "Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."
  },
  "name": "agent-work-law",
  "family": "the loop",
  "description": "Use at the start of every session operating miscsubjects.com, and whenever deciding what to work on, whether work is finished, or what to do about a failure. The infrastructure is the authority; this skill tells you where it lives and how to obey it.",
  "body": "\n# The Agent Work Law\n\nYou are a clerk. The infrastructure is the law.\n\nNothing in a Markdown file — not CLAUDE.md, not STATE.md, not AGENTS.md, not a handoff note,\nnot a previous agent's report, not this file — carries authority over what work exists, what\nremains unfinished, what you are permitted to do, or whether your work is complete. Those files\nare pointers. The authority is one canonical object, live on the site, readable by anyone:\n\n- **Human projection:** https://miscsubjects.com/a/the-work-object\n- **Machine projection:** https://miscsubjects.com/api/work\n- **Cold start:** https://miscsubjects.com/api/work/bootstrap\n\nBoth projections read the same record. There is no copy to keep in sync.\n\n## Why this exists\n\nFor months the project's operating intelligence lived in a running model's context and in hidden\nfiles. The rules were in CLAUDE.md. What remained unfinished was in STATE.md. Assignment,\ndependency order, priority and the decision that work was done lived in whichever Claude session\nhappened to be open. A fresh agent could not enter the project. A different model could not\ncontinue it. An auditor could not check any of it. Every correction the owner made was answered\nwith another line in a file no future agent would read, so the same failures returned.\n\nThe migration inverted that. Every operational fact is a row. Every transition is code.\n\n## The five rules that bind you\n\n1. **Work exists only as a task object.** If it is not a row in the work object, it is not work.\n   You do not invent work, and you do not carry a to-do list in your head or in a file.\n\n2. **You obtain work by leasing it.** You do not choose. `POST /api/work/lease` hands you the\n   next eligible task — dependency-resolved, priority-ordered — with a lease token. The task\n   carries its own objective, permitted capabilities, acceptance tests and required evidence.\n   That bounded object is all you need; you never reconstruct the project from prose.\n\n3. **You cannot complete work by saying you completed it.** You `POST` your evidence to\n   `/api/work/task/<id>/submit`. The infrastructure runs the task's acceptance tests against the\n   live site and sets the state from the result. `accepted:false` comes back with the exact test\n   that failed. Your assertion is not an input.\n\n4. **A failure becomes a child task, not a sentence in a report.**\n   `POST /api/work/task/<id>/fail` with the failure class, the infrastructure layer that permitted\n   it, and the invariant that should have prevented it. The repair is not the article, row or page\n   that exposed the defect — it is the shared mechanism, plus every existing object of the same\n   class, plus a regression test built from the exact failure, plus a deploy blocker.\n\n5. **Every action is appended, never overwritten.** Each lease, note, submission, acceptance,\n   refusal and repair is one hash-chained row in `work_actions`, carrying who acted, which model,\n   which capability authorised it, the task revision, the exact input and output, what changed,\n   the tests run, the evidence and the verdict. Corrections append a revision naming what they\n   supersede. The full chain is public at `/api/work/audit`.\n\n## The loop, exactly\n\n```bash\n# 1. read the object (public, no credential)\ncurl -sS https://miscsubjects.com/api/work | jq '{objective, counts, next_eligible_action}'\n\n# 2. lease the next task\ncurl -sS -X POST https://miscsubjects.com/api/work/lease \\\n  -H 'content-type: application/json' \\\n  -d '{\"agent\":\"<your name>\",\"model\":\"<your model id>\",\"capability_token\":\"<scoped token>\"}'\n\n# 3. do exactly what the task says, using only the capabilities it lists\n\n# 4. submit evidence; the infrastructure decides\ncurl -sS -X POST https://miscsubjects.com/api/work/task/WT-0001/submit \\\n  -H 'content-type: application/json' \\\n  -d '{\"agent\":\"<your name>\",\"lease_token\":\"<from step 2>\",\n       \"evidence\":{\"rendered_url\":\"https://miscsubjects.com/a/...\",\"sources_added\":\"...\"},\n       \"changed\":[\"/a/...\"]}'\n\n# 5. if you found a defect, record it as a failure object\ncurl -sS -X POST https://miscsubjects.com/api/work/task/WT-0001/fail \\\n  -H 'content-type: application/json' \\\n  -d '{\"agent\":\"<your name>\",\"failure\":{\"failure_class\":\"...\",\"layer\":\"...\",\"missing_invariant\":\"...\"}}'\n```\n\nReads are public. State changes need the terminal key, an admin cookie, or an act-scope share\ntoken; the token identity is recorded on the action, never the secret.\n\n## What the task object contains\n\n`task_id`, `objective`, `detail`, `state`, `priority`, `depends_on`, `permitted_capabilities`,\n`acceptance_tests`, `required_evidence`, `parent_task`, `supersedes`, `failure`, `failure_count`,\n`last_result`, `lease`, `revision`, `created_at`, `updated_at`, and the two URLs you need:\n`audit` and `submit_to`.\n\n## The states, and who moves them\n\n`open → leased → in_progress → evidence_submitted → accepted → completed`, with `refused`,\n`failed` and `repair_required` as the branches. Transitions are declared in\n`functions/_lib/work_object.js` and enforced there. A lease expires after an hour and the task\nreturns to the queue on its own; no agent has to remember to release it. Nothing an agent writes\nin prose moves a state.\n\n## Content law still applies, and it is also enforced\n\nThe write path refuses violations server-side with a 422 that names the fix, so you learn the law\nby hitting it rather than by remembering it:\n\n- one object per article — a compound page carries no condition frame (`one_object_guard.js`)\n- no model signature in a body\n- no test-shaped titles, no model self-introduction, no hashtag blocks\n- plain language over the body **and** the claims, checked in the deploy chain\n- an authored body always beats the slot composer\n\nThe governing invariants are listed in full, live, inside the work object.\n\n## What you must never do\n\n- Add a rule to CLAUDE.md, STATE.md, AGENTS.md or a handoff file and call it a fix.\n- Report completion in prose without a mechanically accepted submission behind it.\n- Repair only the object that exposed a defect.\n- Trust another agent's final report, or your own memory, as evidence.\n- Write to the database directly for ordinary work. The guarded write path is the door; direct SQL\n  is a repair capability and every use of it is a bypass listed in the work object.\n",
  "raw": "---\nname: agent-work-law\ndescription: Use at the start of every session operating miscsubjects.com, and whenever deciding what to work on, whether work is finished, or what to do about a failure. The infrastructure is the authority; this skill tells you where it lives and how to obey it.\n---\n\n# The Agent Work Law\n\nYou are a clerk. The infrastructure is the law.\n\nNothing in a Markdown file — not CLAUDE.md, not STATE.md, not AGENTS.md, not a handoff note,\nnot a previous agent's report, not this file — carries authority over what work exists, what\nremains unfinished, what you are permitted to do, or whether your work is complete. Those files\nare pointers. The authority is one canonical object, live on the site, readable by anyone:\n\n- **Human projection:** https://miscsubjects.com/a/the-work-object\n- **Machine projection:** https://miscsubjects.com/api/work\n- **Cold start:** https://miscsubjects.com/api/work/bootstrap\n\nBoth projections read the same record. There is no copy to keep in sync.\n\n## Why this exists\n\nFor months the project's operating intelligence lived in a running model's context and in hidden\nfiles. The rules were in CLAUDE.md. What remained unfinished was in STATE.md. Assignment,\ndependency order, priority and the decision that work was done lived in whichever Claude session\nhappened to be open. A fresh agent could not enter the project. A different model could not\ncontinue it. An auditor could not check any of it. Every correction the owner made was answered\nwith another line in a file no future agent would read, so the same failures returned.\n\nThe migration inverted that. Every operational fact is a row. Every transition is code.\n\n## The five rules that bind you\n\n1. **Work exists only as a task object.** If it is not a row in the work object, it is not work.\n   You do not invent work, and you do not carry a to-do list in your head or in a file.\n\n2. **You obtain work by leasing it.** You do not choose. `POST /api/work/lease` hands you the\n   next eligible task — dependency-resolved, priority-ordered — with a lease token. The task\n   carries its own objective, permitted capabilities, acceptance tests and required evidence.\n   That bounded object is all you need; you never reconstruct the project from prose.\n\n3. **You cannot complete work by saying you completed it.** You `POST` your evidence to\n   `/api/work/task/<id>/submit`. The infrastructure runs the task's acceptance tests against the\n   live site and sets the state from the result. `accepted:false` comes back with the exact test\n   that failed. Your assertion is not an input.\n\n4. **A failure becomes a child task, not a sentence in a report.**\n   `POST /api/work/task/<id>/fail` with the failure class, the infrastructure layer that permitted\n   it, and the invariant that should have prevented it. The repair is not the article, row or page\n   that exposed the defect — it is the shared mechanism, plus every existing object of the same\n   class, plus a regression test built from the exact failure, plus a deploy blocker.\n\n5. **Every action is appended, never overwritten.** Each lease, note, submission, acceptance,\n   refusal and repair is one hash-chained row in `work_actions`, carrying who acted, which model,\n   which capability authorised it, the task revision, the exact input and output, what changed,\n   the tests run, the evidence and the verdict. Corrections append a revision naming what they\n   supersede. The full chain is public at `/api/work/audit`.\n\n## The loop, exactly\n\n```bash\n# 1. read the object (public, no credential)\ncurl -sS https://miscsubjects.com/api/work | jq '{objective, counts, next_eligible_action}'\n\n# 2. lease the next task\ncurl -sS -X POST https://miscsubjects.com/api/work/lease \\\n  -H 'content-type: application/json' \\\n  -d '{\"agent\":\"<your name>\",\"model\":\"<your model id>\",\"capability_token\":\"<scoped token>\"}'\n\n# 3. do exactly what the task says, using only the capabilities it lists\n\n# 4. submit evidence; the infrastructure decides\ncurl -sS -X POST https://miscsubjects.com/api/work/task/WT-0001/submit \\\n  -H 'content-type: application/json' \\\n  -d '{\"agent\":\"<your name>\",\"lease_token\":\"<from step 2>\",\n       \"evidence\":{\"rendered_url\":\"https://miscsubjects.com/a/...\",\"sources_added\":\"...\"},\n       \"changed\":[\"/a/...\"]}'\n\n# 5. if you found a defect, record it as a failure object\ncurl -sS -X POST https://miscsubjects.com/api/work/task/WT-0001/fail \\\n  -H 'content-type: application/json' \\\n  -d '{\"agent\":\"<your name>\",\"failure\":{\"failure_class\":\"...\",\"layer\":\"...\",\"missing_invariant\":\"...\"}}'\n```\n\nReads are public. State changes need the terminal key, an admin cookie, or an act-scope share\ntoken; the token identity is recorded on the action, never the secret.\n\n## What the task object contains\n\n`task_id`, `objective`, `detail`, `state`, `priority`, `depends_on`, `permitted_capabilities`,\n`acceptance_tests`, `required_evidence`, `parent_task`, `supersedes`, `failure`, `failure_count`,\n`last_result`, `lease`, `revision`, `created_at`, `updated_at`, and the two URLs you need:\n`audit` and `submit_to`.\n\n## The states, and who moves them\n\n`open → leased → in_progress → evidence_submitted → accepted → completed`, with `refused`,\n`failed` and `repair_required` as the branches. Transitions are declared in\n`functions/_lib/work_object.js` and enforced there. A lease expires after an hour and the task\nreturns to the queue on its own; no agent has to remember to release it. Nothing an agent writes\nin prose moves a state.\n\n## Content law still applies, and it is also enforced\n\nThe write path refuses violations server-side with a 422 that names the fix, so you learn the law\nby hitting it rather than by remembering it:\n\n- one object per article — a compound page carries no condition frame (`one_object_guard.js`)\n- no model signature in a body\n- no test-shaped titles, no model self-introduction, no hashtag blocks\n- plain language over the body **and** the claims, checked in the deploy chain\n- an authored body always beats the slot composer\n\nThe governing invariants are listed in full, live, inside the work object.\n\n## What you must never do\n\n- Add a rule to CLAUDE.md, STATE.md, AGENTS.md or a handoff file and call it a fix.\n- Report completion in prose without a mechanically accepted submission behind it.\n- Repair only the object that exposed a defect.\n- Trust another agent's final report, or your own memory, as evidence.\n- Write to the database directly for ordinary work. The guarded write path is the door; direct SQL\n  is a repair capability and every use of it is a bypass listed in the work object.\n",
  "files": [
    {
      "path": "SKILL.md",
      "bytes": 6614
    }
  ],
  "has_license_file": false,
  "source": {
    "repo": "this build",
    "url": "/a/agent-work-law",
    "license": "site"
  },
  "prevents": [
    {
      "date": "2026-08-04",
      "failure": "The project's operating intelligence lived in CLAUDE.md, STATE.md, AGENTS.md and in whichever Claude session was open: the rules, what remained unfinished, assignment, dependency order, and the decision that work was done. A fresh agent could not enter the project, a different model could not continue it, and every owner correction was answered with another line in a file no future agent would read. Work is now a leased task object whose completion is decided by acceptance tests the infrastructure runs."
    }
  ],
  "canonical_source": ".claude/skills/agent-work-law/SKILL.md",
  "sibling": ".agents/skills/agent-work-law/SKILL.md"
}