---
title: "Docket watch"
url: https://services.dev/docs/examples/legal/docket-watch
captured: [legal-check.txt, legal-docket-watch.txt]
---
# Docket watch

URL: https://services.dev/docs/examples/legal/docket-watch

> A subscription on a patent family, $12 a month. Every Monday the AI checks the docket, a watcher acknowledges a date in its last week, and an office action on the family routes to Trademark response at that Service's own price.

*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).*

A patent family keeps its dates long after the filing. Docket Watch keeps them: a subscription on the family, $12 a month, which `provisional-patent.ts` names as the family's steward. Its `on` key routes two things, a schedule that checks the docket every Monday and an event that sends an office action to its own Service.

```bash
cat services/docket-watch.ts
```

```txt title="magic values: none"
import { Service } from 'services.dev'
import { attorneys } from '../pools/attorneys.ts'
import rules from '../rules.ts'
import trademarkResponse from './trademark-response.ts'

// A subscription on the patent family, $12 a month. Every Monday the AI checks the docket, and inside
// the last week before a date on the family, the watcher acknowledges it too. An office action routes to its own Service.
export default Service({
  name: 'Docket Watch',
  description: 'A docket watched every week, and an office action routed to its response.',
  input: { matter: 'text: an application or file number' },
  output: { status: 'text', next_due: 'date' },
  rules,
  subject: { kind: 'patent family', key: 'matter' },
  roles: { watcher: { pool: attorneys, pay: { usd: 4, on: 'act' } } },
  on: { schedule: { check: 'every monday' }, event: { 'office_action.issued': trademarkResponse } },
  deliver: { check: 'ai', ack: { by: 'watcher', when: job => job.clocks.inside('7d') } },
  price: { usd: 12, every: 'month' },
})
```

`check` reads it back. A watcher, a patent attorney or agent from the Pool, acknowledges a date for $4 an act:

```bash
npx services.dev check
```

```txt title="magic values: none"
services/docket-watch.ts · 10 lines · $12 per month, charged at the start of each month.
  roles   watcher · patent attorney or agent · * · from attorneys · $4 an act
  steps   check · ai → ack · patent watcher → review · ai · adversarial
  subject patent family · keyed by matter
  ledger  +$12.00 · AI $0.84 (example) · watcher $4.00 · coverage $4.00 · you $3.16
  margin  at least $1.60 when the first watcher does ack ($12.00 − $4.00 watcher − $2.40 AI cap − $4.00 coverage) · $0.00 at the ladder's cap, the lower of 50% and what the floor leaves
```

The rules table marks `ack` open: acknowledging a date is a delivery act, and the response is its own Service. Like every row, it's illustrative, and [law.org.ai](https://law.org.ai) sets out positions like it.

```bash
cat rules.ts
```

```txt title="magic values: none"
    'docket-watch': {
      ack: { open: true, position: 'Acknowledging a date on the docket is a delivery act; the response is its own Service.' },
```

## One order starts it

The subscription names both routes, and its next Monday:

```txt
→ POST /matters {"service":"docket-watch","matter":"63/000,001","max_usd":12,"key":"watch"}
```

```txt title="magic values: none"
← sbn_7Hq2 · docket-watch · active · cycle 1 · 2026-10-25 → 2026-11-25 · $12.00 per month
  schedule    check → docket-watch · next 2026-10-26
  event       office_action.issued → trademark-response
```

## Every Monday

On a test clock moved eight days, each Monday mints a check, included in the month. `ack` runs only inside the last week before a date on the family, and no Service in this folder puts a date there yet, so it's skipped:

```txt
→ POST /test_clocks/default/advance {"to":"8d"}
```

```txt title="magic values: none"
  2026-10-26  sbn_7Hq2  schedule check → job_7Hq2 docket-watch · $0.00
  2026-11-02  sbn_7Hq2  schedule check → job_7Hq3 docket-watch · $0.00
→ GET /owner/matters/job_7Hq2
← job_7Hq2 · accepted · $0
  record  check · ai | ack · skipped | review · ai · pass
```

## An office action

The docketing system posts an office action on the family. The watch includes no response, so the event offers Trademark response at its $349, and `next` is the order to place, keyed to the event:

```txt
→ POST /events {"type":"office_action.issued","id":"OA-97123456-1","data":{"matter":"63/000,001","serial":"97123456","action":"office-action.pdf","issued":"2026-10-30","client":{"name":"Ada Lovelace","email":"ada@example.com"}}}
```

```txt title="magic values: none"
← subscription.minted · event office_action.issued → trademark-response offered at $349.00
  next    order trademark-response {"serial":"97123456","action":"office-action.pdf","issued":"2026-10-30","client":{"name":"Ada Lovelace","email":"ada@example.com"},"max_usd":349,"key":"sbn_7Hq2:event office_action.issued:OA-97123456-1","subscription":"sbn_7Hq2"}
```

The buyer places it. The charge is held, the matter joins the patent family from the subscription, and the subscription lists what it minted:

```txt
→ POST /trademark-response {…the next's arguments}
```

```txt title="magic values: none"
← job_7Hq4 · waiting · on party · $349.00 held · from sbn_7Hq2 · on sbj_7Hq2

← sbn_7Hq2 · docket-watch · active · cycle 1 · 2026-10-25 → 2026-11-25 · $12.00 per month
  schedule    check → docket-watch · next 2026-11-09
  event       office_action.issued → trademark-response
  minted      2026-10-26  schedule check → job_7Hq2 docket-watch · $0.00
  minted      2026-11-02  schedule check → job_7Hq3 docket-watch · $0.00
  minted      2026-11-02  event office_action.issued → trademark-response offered at $349.00
```

[Trademark response](https://services.dev/docs/examples/legal/trademark-response.md) answers it from there. [Schedules and triggers](https://services.dev/docs/service/subscriptions.md) covers `on`, and [Every month](https://services.dev/docs/grow/subscription.md) builds one from scratch.

---

- Up: [The legal example](https://services.dev/docs/examples/legal.md)
- Previous: [Trademark response](https://services.dev/docs/examples/legal/trademark-response.md)
- Next: [When the attorney declines](https://services.dev/docs/examples/legal/decline.md)
