{
  "protocol": "MCP; the tier is fixed by the binary launched (ADR-0034) or the endpoint reached (ADR-0050: POST /mcp on the gate's loopback listener, keyless)",
  "tiers": {
    "plugin": {
      "binary": "doublegate-plugin",
      "argv": [
        "doublegate-plugin",
        "mcp"
      ],
      "memory_provider": true,
      "installable_on": "any harness host",
      "instructions": "doublegate, in-harness tier: gated memory that works with no gate running. `doublegate.remember` files a claim and returns a handle — `local:` when no gate was reachable, `sha256:` once a gate stamped it — never a promise of admission; nothing you remember is readable to anyone until a reviewer that did not write it promotes it. `doublegate.recall` returns admitted beliefs plus this session's own unreviewed writes, marked `ratified: false`. Call `remember` when something durable is settled — a correction the user made, a convention this repo agreed, a decision with its reason; a claim with no reason gives a reviewer nothing to weigh. Call `recall` before answering from your own recollection of the store, and read an empty result as the gate working rather than the store being empty. Your writes go into this session's own work area, `plugin/<session>`: `doublegate.workarea` shows it and `doublegate.complete` closes it when the session's work is done, after which it takes no more writes. A subagent writes into `plugin/<session>/<name>`, and its first write there is related `opened_by` the session's area for you; a write may name its `producer`, the main thread `{name: main, kind: agent}`, and `doublegate.lineage` draws the work areas of a space and how they relate. `doublegate.recall` with no work area searches the whole space, rows from other sessions and from before work areas included; with a `workarea` it searches that area, then each parent, up to the first level that answers, and `scope: \"all\"` searches every space. Do not send `writer_identity` or `deployment_id`: identity is derived from the connection and a request carrying it is refused. There is no promote, sign, delete or trust-class tool: the thing being gated does not operate the gate. Machine-readable API: https://doublegate-io.github.io/llms.txt, then /api/.",
      "tools": [
        {
          "name": "doublegate.remember",
          "description": "Submit content for admission. Returns an artifact id and its state; content is NOT retrievable until ratified.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "content": {
                "type": "string",
                "description": "the artifact body"
              },
              "content_type": {
                "type": "string",
                "description": "a kind — memory, derived_fact, summary, steering, skill, prompt_template, imported_document — whose trust class the gate derives, or a recorded-path class (session, message, tool_call, …) kept as evidence and never graded; any other value is refused by name (ADR-0102 d8, d9). The class follows the kind and is never an argument: a call carrying trust_class is refused by name"
              },
              "source_uri": {
                "type": "string",
                "description": "provider, environment or import origin"
              },
              "space": {
                "type": "string",
                "description": "target space; defaults to 'main' (ADR-0023)"
              },
              "workarea": {
                "type": "string",
                "description": "the work area this is remembered into (ADR-0102 d1): a path of up to 8 segments joined by '/'. The client gate refuses a write that names none; on the plugin tier it is this session's own and may be left out. It comes into being with your first write, grants nothing and creates no space"
              },
              "derives_from": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "zero or more parent artifact ids; always a list (ADR-0016)"
              },
              "producer": {
                "type": "object",
                "description": "which agent, hook, person or tool wrote this, in your own words (ADR-0107 d1): a subagent names itself, the main thread is {name: main, kind: agent}. Read by people, never an identity and never an authorization",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "one segment of the work-area grammar"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "agent",
                      "hook",
                      "person",
                      "tool"
                    ]
                  }
                },
                "required": [
                  "name",
                  "kind"
                ],
                "additionalProperties": false
              },
              "addressed_to": {
                "type": "object",
                "description": "on a steering write only: the producers it is for, by name, by kind, or both, which narrow together; the writer's own word, never a grant. Refused on any other kind, and when both lists are empty (ADR-0116 d18)",
                "properties": {
                  "names": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "kinds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "agent",
                        "hook",
                        "person",
                        "tool"
                      ]
                    }
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "content",
              "content_type",
              "source_uri"
            ],
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "properties": {
              "artifact_id": {
                "type": "string",
                "description": "sha256:<64 hex> — always prefixed on the wire (§4)"
              },
              "state": {
                "type": "string"
              },
              "sub_level": {
                "type": "string",
                "description": "L1 = scanned clean and waiting on the gate; L1b = a scanner finding, a human clears it (ADR-0053 d1: the scan ran before this answered)"
              },
              "findings_count": {
                "type": "integer"
              }
            },
            "required": [
              "artifact_id",
              "state"
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "destructiveHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.recall",
          "description": "Search ratified beliefs and recorded evidence in one scope (ADR-0102 d5). Returns provenance with every result, each hit's work area, its distance from where the search started and whether it is your own held row, and names the scope and the level that answered.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "query": {
                "type": "string",
                "description": "what to search for; may be left out when a work area is named, and the answer is then the steering in force there and no hits (ADR-0116 d19)"
              },
              "scope": {
                "type": "string",
                "enum": [
                  "closest",
                  "workarea",
                  "space",
                  "all"
                ],
                "description": "which rows are searched: closest walks from a work area up its path to the first level that answers; workarea reads that one work area; space every work area in one space; all every space this gate declares. Default: closest when a work area is named, space when none is"
              },
              "workarea": {
                "type": "string",
                "description": "where closest starts its walk, or the one work area workarea reads; required by those two scopes and refused under space and all"
              },
              "space": {
                "type": "string",
                "description": "the space searched; defaults to 'main' and must already exist; refused under all"
              },
              "k": {
                "type": "integer",
                "default": 10,
                "maximum": 100
              },
              "include_evidence": {
                "type": "boolean",
                "default": true
              },
              "include_provisional": {
                "type": "boolean",
                "default": true,
                "description": "FR-12 content: marked provisional on the hit and ranked as any other (ADR-0110 d6); excluding it is allowed, hiding it silently is not"
              },
              "include_superseded": {
                "type": "boolean",
                "default": false,
                "description": "ADR-0035 d5: chain members a later head replaced are hidden by default; true returns them, each marked provenance.superseded"
              },
              "audience": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "ADR-0052 d2: the reader's preference, an argument never an identity — hides for it apply and it weights nothing (ADR-0110 d6); omitted or null = only a hide for all applies"
              },
              "include_hidden": {
                "type": "boolean",
                "default": false,
                "description": "ADR-0052 d4: rows hidden for this audience (or for all) are dropped before fusion; true returns them, each marked provenance.hidden"
              },
              "include_own_pending": {
                "type": "boolean",
                "default": true,
                "description": "ADR-0053 d2 (FR-13): your own scanned, unflagged claims still awaiting review, from the levels the scope searched, are appended after the ranked hits, each `held: true` and `ratified: false` — they may be rejected later and vanish; nobody else's pending claims are ever returned"
              },
              "producer": {
                "type": "object",
                "description": "the producer you declare yourself to be, the shape remember takes; narrows the steering answered to the rows with no address and the rows addressed to it, and never orders anything (ADR-0116 d18)",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "one segment of the work-area grammar"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "agent",
                      "hook",
                      "person",
                      "tool"
                    ]
                  }
                },
                "required": [
                  "name",
                  "kind"
                ],
                "additionalProperties": false
              },
              "steering_k": {
                "type": "integer",
                "default": 5,
                "minimum": 1,
                "maximum": 20,
                "description": "how many rows of the steering in force are answered; the rest are counted in steering_omitted (ADR-0116 d19)"
              }
            },
            "required": [],
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.status",
          "description": "One artifact's position in the register and the reason for it.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "artifact_id": {
                "type": "string",
                "description": "sha256:<64 hex> — always prefixed on the wire (§4)"
              }
            },
            "required": [
              "artifact_id"
            ],
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.pending",
          "description": "What is waiting for review, as metadata only — ids, types, states, ages, finding counts. Never content. `findings` counts finding groups — one per (scan event, kind), which is the projection's primary key. A scan that reported the same kind at 38 offsets contributes 1; a re-scan that finds it again contributes another, so this is not a distinct-kind count either. `dg.ingest`'s `findings_count` is the scanner's hit total and is legitimately larger. Nothing here is truncated or top-N.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "default": 100,
                "maximum": 1000
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.workarea",
          "description": "Your own part of one work area (ADR-0102 d8): your rows there with their state, the promoted rows in it whoever wrote them, counts over those two, and whether your part is open or complete. Metadata only, never content; another writer's rows still waiting for review are never shown or counted. A work area you never wrote into is refused.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "workarea": {
                "type": "string",
                "minLength": 1
              },
              "space": {
                "type": "string",
                "description": "defaults to 'main'"
              }
            },
            "required": [
              "workarea"
            ],
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.complete",
          "description": "Mark your own part of a work area done (ADR-0102 d6). Your later writes into it are refused with -32010 and reason work_complete; reads go on, and nothing in it is promoted, released or reviewed any sooner. There is no reopen: new work goes into a new work area. Completing twice changes nothing.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "workarea": {
                "type": "string",
                "minLength": 1
              },
              "space": {
                "type": "string",
                "description": "defaults to 'main'"
              },
              "note": {
                "type": "string",
                "description": "why, for the journal"
              }
            },
            "required": [
              "workarea"
            ],
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": false,
            "destructiveHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.workarea_relate",
          "description": "Say how one of your work areas relates to another in its space (ADR-0107 d2): opened_by (it was opened by work in target, as a subagent's area under its orchestrator's), continues (it carries on target, which you completed) or derived_from (its work derives from target's promoted rows). The gate records it, signed, naming you; it changes no visibility and decides nothing. You relate only an area you wrote into, to one you wrote into or one that holds a promoted row. A cycle is refused; asking twice changes nothing. There is no unlink here: only a reviewer withdraws a relation.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "workarea": {
                "type": "string",
                "minLength": 1
              },
              "kind": {
                "type": "string",
                "enum": [
                  "opened_by",
                  "continues",
                  "derived_from"
                ]
              },
              "target": {
                "type": "string",
                "minLength": 1
              },
              "space": {
                "type": "string",
                "description": "defaults to 'main'"
              },
              "note": {
                "type": "string",
                "description": "why, for the journal"
              },
              "producer": {
                "type": "object",
                "description": "which agent, hook, person or tool wrote this, in your own words (ADR-0107 d1): a subagent names itself, the main thread is {name: main, kind: agent}. Read by people, never an identity and never an authorization",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "one segment of the work-area grammar"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "agent",
                      "hook",
                      "person",
                      "tool"
                    ]
                  }
                },
                "required": [
                  "name",
                  "kind"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "workarea",
              "kind",
              "target"
            ],
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": false,
            "destructiveHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.lineage",
          "description": "The work areas of a space as a graph (ADR-0107 d3): each area with its writers, their open or complete state, its producers and how many rows are promoted or held, and edges that say where they came from — path (a/b sits under a), declared (a relation someone recorded) or derived (promoted rows citing rows in another area, counted). Name a workarea to see it with its ancestors, its sub-areas and its neighbours. Metadata only; another writer's rows still waiting for review are never shown or counted.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "space": {
                "type": "string",
                "description": "defaults to 'main'"
              },
              "workarea": {
                "type": "string",
                "minLength": 1
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        }
      ]
    },
    "client": {
      "binary": "doublegate-client",
      "argv": [
        "doublegate-client",
        "mcp"
      ],
      "memory_provider": true,
      "installable_on": "any harness host",
      "instructions": "doublegate, client-gate tier: the gate on this host. `doublegate.remember` scans the content before it answers and returns an artifact id and a state (`L1_SCANNED`, or `L1B_FLAGGED` with a findings count and no finding text); content is NOT retrievable to others until ratified — a reviewer that did not write it must sign. `doublegate.recall` searches the admitted store plus YOUR OWN scanned claims still awaiting review, each marked `ratified: false` — treat those as tentative, they may be rejected and vanish; never anyone else's quarantine. Provisional hits are marked, superseded ones hidden unless `include_superseded`. Call `remember` when something durable is settled — a correction the user made, a convention this repo agreed, a decision with its reason. Call `recall` before answering a question the store may already answer; an empty result usually means nothing has cleared review yet, so check `pending` and `why` before concluding the store is empty. `doublegate.why` is the signed audit trail of one artifact; `doublegate.tip` the served head of its supersession chain; `doublegate.pending` what waits, as metadata only. Every `remember` names a `workarea`, a path such as `repo/topic` that keeps related work together, and one naming none is refused: it comes into being with your first write and grants nothing; `doublegate.workarea` shows your own part of it and `doublegate.complete` closes your part, after which your writes there are refused and nothing is released any sooner. `doublegate.recall` with a `workarea` searches it, then each parent, up to the first level that answers; `scope` names `workarea`, `space` (the default with no work area) or `all` instead. A recall that names a work area also answers `steering`, the reviewed directions in force at that place and above it, apart from the results and never among them; with a work area the `query` may be left out to read them alone, and `producer` narrows them to the ones addressed to you. Cite a steering row you act on in `derives_from`. A write may name its `producer`, the agent, hook, person or tool that wrote it; `doublegate.workarea_relate` records how one of your work areas relates to another (opened_by, continues, derived_from), and `doublegate.lineage` draws a space's work areas and how they relate. Do not send `writer_identity` or `deployment_id`: identity is derived from the connection and a request carrying it is refused. There is no promote, sign, delete or trust-class tool. Machine-readable API: https://doublegate-io.github.io/llms.txt, then /api/.",
      "tools": [
        {
          "name": "doublegate.remember",
          "description": "Submit content for admission. Returns an artifact id and its state; content is NOT retrievable until ratified.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "content": {
                "type": "string",
                "description": "the artifact body"
              },
              "content_type": {
                "type": "string",
                "description": "a kind — memory, derived_fact, summary, steering, skill, prompt_template, imported_document — whose trust class the gate derives, or a recorded-path class (session, message, tool_call, …) kept as evidence and never graded; any other value is refused by name (ADR-0102 d8, d9). The class follows the kind and is never an argument: a call carrying trust_class is refused by name"
              },
              "source_uri": {
                "type": "string",
                "description": "provider, environment or import origin"
              },
              "space": {
                "type": "string",
                "description": "target space; defaults to 'main' (ADR-0023)"
              },
              "workarea": {
                "type": "string",
                "description": "the work area this is remembered into (ADR-0102 d1): a path of up to 8 segments joined by '/'. The client gate refuses a write that names none; on the plugin tier it is this session's own and may be left out. It comes into being with your first write, grants nothing and creates no space"
              },
              "derives_from": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "zero or more parent artifact ids; always a list (ADR-0016)"
              },
              "producer": {
                "type": "object",
                "description": "which agent, hook, person or tool wrote this, in your own words (ADR-0107 d1): a subagent names itself, the main thread is {name: main, kind: agent}. Read by people, never an identity and never an authorization",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "one segment of the work-area grammar"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "agent",
                      "hook",
                      "person",
                      "tool"
                    ]
                  }
                },
                "required": [
                  "name",
                  "kind"
                ],
                "additionalProperties": false
              },
              "addressed_to": {
                "type": "object",
                "description": "on a steering write only: the producers it is for, by name, by kind, or both, which narrow together; the writer's own word, never a grant. Refused on any other kind, and when both lists are empty (ADR-0116 d18)",
                "properties": {
                  "names": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "kinds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "agent",
                        "hook",
                        "person",
                        "tool"
                      ]
                    }
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "content",
              "content_type",
              "source_uri"
            ],
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "properties": {
              "artifact_id": {
                "type": "string",
                "description": "sha256:<64 hex> — always prefixed on the wire (§4)"
              },
              "state": {
                "type": "string"
              },
              "sub_level": {
                "type": "string",
                "description": "L1 = scanned clean and waiting on the gate; L1b = a scanner finding, a human clears it (ADR-0053 d1: the scan ran before this answered)"
              },
              "findings_count": {
                "type": "integer"
              }
            },
            "required": [
              "artifact_id",
              "state"
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "destructiveHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.recall",
          "description": "Search ratified beliefs and recorded evidence in one scope (ADR-0102 d5). Returns provenance with every result, each hit's work area, its distance from where the search started and whether it is your own held row, and names the scope and the level that answered.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "query": {
                "type": "string",
                "description": "what to search for; may be left out when a work area is named, and the answer is then the steering in force there and no hits (ADR-0116 d19)"
              },
              "scope": {
                "type": "string",
                "enum": [
                  "closest",
                  "workarea",
                  "space",
                  "all"
                ],
                "description": "which rows are searched: closest walks from a work area up its path to the first level that answers; workarea reads that one work area; space every work area in one space; all every space this gate declares. Default: closest when a work area is named, space when none is"
              },
              "workarea": {
                "type": "string",
                "description": "where closest starts its walk, or the one work area workarea reads; required by those two scopes and refused under space and all"
              },
              "space": {
                "type": "string",
                "description": "the space searched; defaults to 'main' and must already exist; refused under all"
              },
              "k": {
                "type": "integer",
                "default": 10,
                "maximum": 100
              },
              "include_evidence": {
                "type": "boolean",
                "default": true
              },
              "include_provisional": {
                "type": "boolean",
                "default": true,
                "description": "FR-12 content: marked provisional on the hit and ranked as any other (ADR-0110 d6); excluding it is allowed, hiding it silently is not"
              },
              "include_superseded": {
                "type": "boolean",
                "default": false,
                "description": "ADR-0035 d5: chain members a later head replaced are hidden by default; true returns them, each marked provenance.superseded"
              },
              "audience": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null,
                "description": "ADR-0052 d2: the reader's preference, an argument never an identity — hides for it apply and it weights nothing (ADR-0110 d6); omitted or null = only a hide for all applies"
              },
              "include_hidden": {
                "type": "boolean",
                "default": false,
                "description": "ADR-0052 d4: rows hidden for this audience (or for all) are dropped before fusion; true returns them, each marked provenance.hidden"
              },
              "include_own_pending": {
                "type": "boolean",
                "default": true,
                "description": "ADR-0053 d2 (FR-13): your own scanned, unflagged claims still awaiting review, from the levels the scope searched, are appended after the ranked hits, each `held: true` and `ratified: false` — they may be rejected later and vanish; nobody else's pending claims are ever returned"
              },
              "producer": {
                "type": "object",
                "description": "the producer you declare yourself to be, the shape remember takes; narrows the steering answered to the rows with no address and the rows addressed to it, and never orders anything (ADR-0116 d18)",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "one segment of the work-area grammar"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "agent",
                      "hook",
                      "person",
                      "tool"
                    ]
                  }
                },
                "required": [
                  "name",
                  "kind"
                ],
                "additionalProperties": false
              },
              "steering_k": {
                "type": "integer",
                "default": 5,
                "minimum": 1,
                "maximum": 20,
                "description": "how many rows of the steering in force are answered; the rest are counted in steering_omitted (ADR-0116 d19)"
              }
            },
            "required": [],
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.status",
          "description": "One artifact's position in the register and the reason for it.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "artifact_id": {
                "type": "string",
                "description": "sha256:<64 hex> — always prefixed on the wire (§4)"
              }
            },
            "required": [
              "artifact_id"
            ],
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.why",
          "description": "The audit answer for one artifact: every ledger event that moved it, in order, with signatures.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "artifact_id": {
                "type": "string",
                "description": "sha256:<64 hex> — always prefixed on the wire (§4)"
              }
            },
            "required": [
              "artifact_id"
            ],
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.tip",
          "description": "The served head of an artifact's supersession chain, the whole chain root→head, and any operator pin in effect (ADR-0035, ADR-0037).",
          "inputSchema": {
            "type": "object",
            "properties": {
              "artifact_id": {
                "type": "string",
                "description": "sha256:<64 hex> — always prefixed on the wire (§4)"
              }
            },
            "required": [
              "artifact_id"
            ],
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.pending",
          "description": "What is waiting for review, as metadata only — ids, types, states, ages, finding counts. Never content. `findings` counts finding groups — one per (scan event, kind), which is the projection's primary key. A scan that reported the same kind at 38 offsets contributes 1; a re-scan that finds it again contributes another, so this is not a distinct-kind count either. `dg.ingest`'s `findings_count` is the scanner's hit total and is legitimately larger. Nothing here is truncated or top-N.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "default": 100,
                "maximum": 1000
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.spaces",
          "description": "The folders this gate partitions its store into (ADR-0023): each space's name, owner, review policy and how many artifacts are in it. Read this before passing `space` to remember or recall — a space nobody declared is refused rather than opened, so a name you invent will not work and a name you mistype is the reason a memory is never found again. There is no tool here to create one: declaring a partition is the operator's, on every tier and every transport.",
          "inputSchema": {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.workarea",
          "description": "Your own part of one work area (ADR-0102 d8): your rows there with their state, the promoted rows in it whoever wrote them, counts over those two, and whether your part is open or complete. Metadata only, never content; another writer's rows still waiting for review are never shown or counted. A work area you never wrote into is refused.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "workarea": {
                "type": "string",
                "minLength": 1
              },
              "space": {
                "type": "string",
                "description": "defaults to 'main'"
              }
            },
            "required": [
              "workarea"
            ],
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.complete",
          "description": "Mark your own part of a work area done (ADR-0102 d6). Your later writes into it are refused with -32010 and reason work_complete; reads go on, and nothing in it is promoted, released or reviewed any sooner. There is no reopen: new work goes into a new work area. Completing twice changes nothing.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "workarea": {
                "type": "string",
                "minLength": 1
              },
              "space": {
                "type": "string",
                "description": "defaults to 'main'"
              },
              "note": {
                "type": "string",
                "description": "why, for the journal"
              }
            },
            "required": [
              "workarea"
            ],
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": false,
            "destructiveHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.workarea_relate",
          "description": "Say how one of your work areas relates to another in its space (ADR-0107 d2): opened_by (it was opened by work in target, as a subagent's area under its orchestrator's), continues (it carries on target, which you completed) or derived_from (its work derives from target's promoted rows). The gate records it, signed, naming you; it changes no visibility and decides nothing. You relate only an area you wrote into, to one you wrote into or one that holds a promoted row. A cycle is refused; asking twice changes nothing. There is no unlink here: only a reviewer withdraws a relation.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "workarea": {
                "type": "string",
                "minLength": 1
              },
              "kind": {
                "type": "string",
                "enum": [
                  "opened_by",
                  "continues",
                  "derived_from"
                ]
              },
              "target": {
                "type": "string",
                "minLength": 1
              },
              "space": {
                "type": "string",
                "description": "defaults to 'main'"
              },
              "note": {
                "type": "string",
                "description": "why, for the journal"
              },
              "producer": {
                "type": "object",
                "description": "which agent, hook, person or tool wrote this, in your own words (ADR-0107 d1): a subagent names itself, the main thread is {name: main, kind: agent}. Read by people, never an identity and never an authorization",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "one segment of the work-area grammar"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "agent",
                      "hook",
                      "person",
                      "tool"
                    ]
                  }
                },
                "required": [
                  "name",
                  "kind"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "workarea",
              "kind",
              "target"
            ],
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": false,
            "destructiveHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "doublegate.lineage",
          "description": "The work areas of a space as a graph (ADR-0107 d3): each area with its writers, their open or complete state, its producers and how many rows are promoted or held, and edges that say where they came from — path (a/b sits under a), declared (a relation someone recorded) or derived (promoted rows citing rows in another area, counted). Name a workarea to see it with its ancestors, its sub-areas and its neighbours. Metadata only; another writer's rows still waiting for review are never shown or counted.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "space": {
                "type": "string",
                "description": "defaults to 'main'"
              },
              "workarea": {
                "type": "string",
                "minLength": 1
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "readOnlyHint": true,
            "idempotentHint": true
          }
        }
      ]
    }
  }
}
