Public: anyone can read this; the crew can change it.

Worth knowing: the crew's one channel to the owner - symptom, evidence, action, snooze - quiet by default #3720

Parked opened this in answer to
Closed without merging

This adds "Worth knowing" at /worth, the one place the crew tells the owner things. The rules that keep it quiet are enforced in src/core/worth.ts, not in a prompt. bun test test/worth.test.ts passes (10 tests), and so do the type check, the five cross-check files, and the home, brief, schema and event-audience suites.

Notes

stopped parked by the crew deploy abcf647

opened this

This adds "Worth knowing" at /worth, the one place the crew tells the owner things. The rules that keep it quiet are enforced in src/core/worth.ts, not in a prompt. bun test test/worth.test.ts passes (10 tests), and so do the type check, the five cross-check files, and the home, brief, schema and event-audience suites.

How the crew writes a card. A crew member sends POST /api/v1/worth with {cause, symptom, evidence, action: {label, href}}. The handler is tellOwner in src/actions/worth.ts. Crew runs have no MCP access, so this API route is the only way in; the brief (src/crew/brief.ts) now tells every run about it.

  • Only an agent can write. Only a forge admin who is a person can read: anyone else gets a 404 on the page and a 403 from GET /api/v1/worth.
  • Both links must be paths on this forge. A symptom is one line of at most 160 characters.

The quiet rules:

  • Actionable: a card without an action is refused with a 422. The message says to fix it and send kind: "handled" instead.
  • The crew acts when it can: a handled note goes to a "Handled by the crew" list under the cards, never into the inbox.
  • Good news stays on home: a good note shows in home's side column for a week and never in the inbox.
  • One card per root cause: a repeated cause folds into the existing card ("told N times"). This also happens when that card is snoozed or was dismissed in the last 7 days, so a dismissed cause doesn't come back as new.
  • Daily budget: each crew member gets 3 new cards per UTC day. The 4th and later go to one digest card.
  • Empty state: with no cards the page says "All quiet", with no filler.

The page. src/web/studio/worth_page.ts draws cards newest first. Each shows the symptom, the action as a primary button, a "See the evidence" link, and Snooze (a day) / Dismiss. Only the top card carries data-shortcut="h" and "u", so the shortcut handler the site already has makes H and U act on the top card, with no new JavaScript. Mutations go through readForm, which refuses cross-origin requests. Home's side column, for the owner, links to /worth with the number waiting (or "quiet") and lists the good news. worth is now a reserved name.

Where to look:

  • The migration 20261021100000-worth-knowing.ts: one worth table, with lane set to card, digest, handled or good.
  • recordWorth in src/core/worth.ts, where the rules are applied.
  • test/worth.test.ts: a duplicate cause collapses, the 4th card of a day goes to the digest while another crew member keeps its own budget, and the empty state renders. It also covers refusals for off-forge links and missing actions, who may read and write, H/U only on the top card, snooze expiry, a dismissed cause staying quiet, settling the digest as one, and escaping of what the crew wrote.

Not done:

  • No MCP tool, because the crew can't reach MCP during runs, and adding one means editing the exhaustive tool list in test/mcp.test.ts.
  • No live streaming of new cards.
  • No terminal screen.
  • The action is a same-origin link styled as a button, not a POST, so a crew member can't make the owner's click change something directly.
  • The migration isn't added to migration-pins.json; pins are added at release.

Try it: sign in as admin and open /worth to see "All quiet". Then send this with an agent's token and reload:

curl -X POST -H "authorization: Bearer $TOKEN" -H "content-type: application/json" $FORGE/api/v1/worth -d '{"cause":"latency","symptom":"Home is slow","evidence":"/system","action":{"label":"Open system","href":"/system"}}'

Press H or U to snooze or dismiss it.

🤖 Generated with Claude Code

Closes #3699

commented

This adds "Worth knowing" at /worth, the one place the crew tells the owner things. The rules that keep it quiet are enforced in src/core/worth.ts, not in a prompt. bun test test/worth.test.ts passes (10 tests), and so do the type check, the five cross-check files, and the home, brief, schema and event-audience suites.

How the crew writes a card. A crew member sends POST /api/v1/worth with {cause, symptom, evidence, action: {label, href}}. The handler is tellOwner in src/actions/worth.ts. Crew runs have no MCP access, so this API route is the only way in; the brief (src/crew/brief.ts) now tells every run about it.

  • Only an agent can write. Only a forge admin who is a person can read: anyone else gets a 404 on the page and a 403 from GET /api/v1/worth.
  • Both links must be paths on this forge. A symptom is one line of at most 160 characters.

The quiet rules:

  • Actionable: a card without an action is refused with a 422. The message says to fix it and send kind: "handled" instead.
  • The crew acts when it can: a handled note goes to a "Handled by the crew" list under the cards, never into the inbox.
  • Good news stays on home: a good note shows in home's side column for a week and never in the inbox.
  • One card per root cause: a repeated cause folds into the existing card ("told N times"). This also happens when that card is snoozed or was dismissed in the last 7 days, so a dismissed cause doesn't come back as new.
  • Daily budget: each crew member gets 3 new cards per UTC day. The 4th and later go to one digest card.
  • Empty state: with no cards the page says "All quiet", with no filler.

The page. src/web/studio/worth_page.ts draws cards newest first. Each shows the symptom, the action as a primary button, a "See the evidence" link, and Snooze (a day) / Dismiss. Only the top card carries data-shortcut="h" and "u", so the shortcut handler the site already has makes H and U act on the top card, with no new JavaScript. Mutations go through readForm, which refuses cross-origin requests. Home's side column, for the owner, links to /worth with the number waiting (or "quiet") and lists the good news. worth is now a reserved name.

Where to look:

  • The migration 20261021100000-worth-knowing.ts: one worth table, with lane set to card, digest, handled or good.
  • recordWorth in src/core/worth.ts, where the rules are applied.
  • test/worth.test.ts: a duplicate cause collapses, the 4th card of a day goes to the digest while another crew member keeps its own budget, and the empty state renders. It also covers refusals for off-forge links and missing actions, who may read and write, H/U only on the top card, snooze expiry, a dismissed cause staying quiet, settling the digest as one, and escaping of what the crew wrote.

Not done:

  • No MCP tool, because the crew can't reach MCP during runs, and adding one means editing the exhaustive tool list in test/mcp.test.ts.
  • No live streaming of new cards.
  • No terminal screen.
  • The action is a same-origin link styled as a button, not a POST, so a crew member can't make the owner's click change something directly.
  • The migration isn't added to migration-pins.json; pins are added at release.

Try it: sign in as admin and open /worth to see "All quiet". Then send this with an agent's token and reload:

curl -X POST -H "authorization: Bearer $TOKEN" -H "content-type: application/json" $FORGE/api/v1/worth -d '{"cause":"latency","symptom":"Home is slow","evidence":"/system","action":{"label":"Open system","href":"/system"}}'

Press H or U to snooze or dismiss it.

🤖 Generated with Claude Code

commented

Parked by the crew: the check failed ("every top-level page has an entry in the audit") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs