---
title: "One job, every side"
url: https://services.dev/docs/examples/legal/walk
captured: [legal-patent.txt]
---
# One job, every side

URL: https://services.dev/docs/examples/legal/walk

> One provisional patent matter, from one recording, as each participant sees it. The buyer orders, the applicant consents and answers through her own links, a practitioner signs in their own session, and the owner reads the record.

*legal's words: matter is a job, asset is a subject, review is a task, signer is a member, network is a pool, outcome is a end (examples/legal/brand.ts).*

One matter, one recording, four seats. Each call below was made by the participant it names, with their own credential, and no one acts for anyone else.

## The buyer

A person or their agent orders with the brand's test key. The matter holds $199 and waits on the applicant before anything else happens:

```txt
→ POST /matters {"service":"provisional-patent","invention":["hinge.pdf"],"applicant":{"name":"Ada Lovelace","email":"ada@example.com"},"inventors":[{"name":"Ada Lovelace","email":"ada@example.com"}],"entity_size":"micro","max_usd":199,"key":"walk","metadata":{"sandbox":{"review":"flag_once"}}}
```

```txt title="magic values: metadata.sandbox.review = flag_once, member = mbr_eligible"
← job_7Hq2 · waiting · on party · $199.00 held · consent · ask_7Hq2
```

## The applicant

Ada holds a link no key can use, and needs no account. She consents, then answers the questions the Service asks before the AI drafts:

```txt
→ GET /asks/ask_7Hq2?t=…
```

```txt title="magic values: metadata.sandbox.review = flag_once, member = mbr_eligible"
← 200 ask_7Hq2 · consent · to consent · Ada Lovelace · open · expires 2026-11-01T14:02:11.000Z

# Ada consents, through her own link
→ POST /asks/ask_7Hq2?t=… {}   # Ada Lovelace: consent, to consent
← 200 done

← job_7Hq2 · waiting · on party · $199.00 held · questions · ask_7Hq3

# Ada answers the questions, through her own link
→ POST /asks/ask_7Hq3?t=… {"answer":"It folds flat, and locks open with one hand."}   # Ada Lovelace: questions, to answer
← 200 done

← job_7Hq2 · waiting · on claim · $199.00 held · sign · tsk_7Hq2
```

## The practitioner

The AI drafts the application and the adversarial panel examines it. The examination flags the first draft once, and the AI redrafts. Then the sign step posts a review to the attorneys' Pool. A patent practitioner reads its teaser, then the sheet with the parties' names. They claim it, clear conflicts, read the packet, and sign, affirming each item on the checklist:

```txt
→ GET /reviews/tsk_7Hq2
```

```txt title="magic values: metadata.sandbox.review = flag_once, member = mbr_eligible"
← 200 tsk_7Hq2 · open · practitioner · sign · * · $150.00 · 60 min · $150.00 an hour · due 2026-10-30 14:02
→ GET /reviews/tsk_7Hq2/sheet
← 200 {"parties":[{"as":"applicant","name":"Ada Lovelace"},{"as":"inventors","name":"Ada Lovelace"}],"kind":"Provisional Patent Application","clear":["I checked conflicts across my full book, including my firm"]}
→ POST /reviews/tsk_7Hq2/claim · POST /reviews/tsk_7Hq2/clear {"attest":["I checked conflicts across my full book, including my firm"]}
← 200 claimed · 200 cleared
→ GET /reviews/tsk_7Hq2/packet
← 200
{
  "summary": "Provisional Patent Application: A provisional application, drafted, examined, filed. Done so far: consent, questions, draft, examine. Yours: sign.",
  "input": {
    "invention": [
      {
        "url": "data:text/plain,The%20hinge.pdf.",
        "name": "hinge.pdf"
      }
    ]
  },
  "artifacts": [
    {
      "path": "draft/application.pdf",
      "sha256": "sha256:417c317be6a999b5b53d6deb8483d0b36ba6b3ca0211b4555934a6f90d2a5221",
      "versions": 2,
      "url": "http://localhost:8787/matters/job_7Hq2/files/417c317be6a999b5b53d6deb8483d0b36ba6b3ca0211b4555934a6f90d2a5221",
      "diff": [
        "+ ",
        "+ Revised for:",
        "+ - examine: Simulated: eligibility found a problem in draft."
      ]
    },
    {
      "path": "draft/exam.pdf",
      "sha256": "sha256:b72f9fb762d07755a213a7a426b2578754cc62b94f0ee0603a2a600d0a737d28",
      "versions": 2,
      "url": "http://localhost:8787/matters/job_7Hq2/files/b72f9fb762d07755a213a7a426b2578754cc62b94f0ee0603a2a600d0a737d28",
      "diff": [
        "+ ",
        "+ Revised for:",
        "+ - examine: Simulated: eligibility found a problem in draft."
      ]
    }
  ],
  "answers": [
    {
      "step": "questions",
      "answer": "It folds flat, and locks open with one hand."
    }
  ],
  "reviews": [
    "examine · flagged",
    "examine · pass"
  ],
  "record": "consent · applicant · consent | questions · applicant · answer | draft · ai | examine · ai · adversarial · 4 lenses · flagged | draft · ai · redo | examine · ai · adversarial · 4 lenses · pass",
  "checklist": [
    "the claims read on the disclosure",
    "every inventor is named",
    "a reasonable inquiry was made"
  ],
  "stamps": true,
  "hash": "sha256:b7d7371699d7a9159fef85465d677aa2acf3095b3fcd695845cca4d39ea1cd78"
}

→ POST /reviews/tsk_7Hq2/attest {"checklist":["the claims read on the disclosure","every inventor is named","a reasonable inquiry was made"]}   # as mbr_eligible
← 200 tsk_7Hq2 · done · practitioner · sign · * · $150.00 · attested · 60 min · $150.00 an hour · due 2026-10-30 14:02
  14:02 · step.committed · sign · person · patent attorney · * · mbr_eligible
  14:02 · pay.accrued · mbr_eligible · attest · $150.00
```

The packet opens on what they sign: each file the AI wrote, by hash, with both versions and what changed. They read the drafted application beside Ada's disclosure, and their signature binds the packet's hash.

## The buyer, again

The brand files with the office, and the office's receipt releases the charge. The buyer reads a delivered matter, its three outputs, each file citing the disclosure it rests on, and the patent family it opened:

```txt
→ GET /matters/job_7Hq2   # the buyer
```

```txt title="magic values: metadata.sandbox.review = flag_once, member = mbr_eligible"
← job_7Hq2 · delivered · $199.00 charged · subject sbj_7Hq2
  output  application application.pdf · from hinge.pdf
  output  exam exam.pdf · from hinge.pdf
  output  application_number rcp_7Hq2
```

## The owner

The owner console reads what no buyer can: the whole record, the ledger with the practitioner's pay, and every event in order.

```txt
→ GET /owner/matters/job_7Hq2   # the owner console
```

```txt title="magic values: metadata.sandbox.review = flag_once, member = mbr_eligible"
← job_7Hq2 · delivered · $199.00 charged
  record  consent · applicant · consent | questions · applicant · answer | draft · ai | examine · ai · adversarial · 4 lenses · flagged | draft · ai · redo | examine · ai · adversarial · 4 lenses · pass | sign · person · patent attorney · * · mbr_eligible | file · USPTO · accepted · rcp_7Hq2
  ledger  +$199.00 · AI $4.20 · practitioner $150.00 (rail brand) · you $44.80
  events  matter.ordered · charge.held · ask.opened · matter.paused · consent.given · ask.done · step.proposed · step.committed · ask.opened · matter.paused · ask.done · step.proposed · step.committed · decision.made · step.proposed · step.committed · decision.made · decision.made · decision.made · decision.made · review.done · step.proposed · step.committed · decision.made · step.proposed · step.committed · decision.made · decision.made · decision.made · decision.made · review.done · step.proposed · step.committed · matter.paused · review.posted · review.offered · review.claimed · matter.paused · step.proposed · step.committed · pay.accrued · submission.sent · receipt.accepted · step.proposed · step.committed · charge.collected · matter.delivered
```

[The customer portal](https://services.dev/docs/examples/legal/customer-portal.md) and [the delivery portal](https://services.dev/docs/examples/legal/delivery-portal.md) show the same matter as screens.

---

- Up: [The legal example](https://services.dev/docs/examples/legal.md)
- Previous: [Build it](https://services.dev/docs/examples/legal/build.md)
- Next: [Every branch](https://services.dev/docs/examples/legal/branches.md)
