Office: wire the unstick verb's re-scope / split actions (ADR 0008 deferral) #334

Closed
opened 2026-11-05 10:00:42 +00:00 by matou-build-agent · 4 comments

Follow-up from #308 (filed by the standing session under ADR 0174).

With #308 all five Office slices are landed (#306 read-only room, #307 writes, #308 merge, #309 Outbox stacks, #310 clerk brief). Two decide-pane actions remain shown but not wired, a deliberate ADR 0008 deferral ("re-scope / split on unstick … are shown but not wired in this slice — later slices or the PR merge itself"):

  • re-scope — narrow a stuck ticket's scope (edit the body / comment a new charter) and re-arm ready-for-agent.
  • split — carve a stuck ticket into child tickets and re-arm.

Both are unstick-verb actions on an agent-blocked item. They should ride the same guards as the rest of the Office writes (ADR 0008 rules 1–4: viewer token, comment + change, undo window, server re-read / stale-state refusal), and the same off-switch (FLOOR_OFFICE_WRITES). web/office.js ACTION_WIRING already lists them with a null action and OfficeApp.vue paints them disabled; this ticket wires them.

Not urgent — the Office is fully usable without them (the thread + the other verbs cover the stuck-ticket workflow). fleet-tui is vendor-excluded.

Follow-up from #308 (filed by the standing session under ADR 0174). With #308 all five Office slices are landed (#306 read-only room, #307 writes, #308 merge, #309 Outbox stacks, #310 clerk brief). Two decide-pane actions remain **shown but not wired**, a deliberate ADR 0008 deferral ("`re-scope` / `split` on unstick … are shown but not wired in this slice — later slices or the PR merge itself"): - **re-scope** — narrow a stuck ticket's scope (edit the body / comment a new charter) and re-arm `ready-for-agent`. - **split** — carve a stuck ticket into child tickets and re-arm. Both are unstick-verb actions on an `agent-blocked` item. They should ride the same guards as the rest of the Office writes (ADR 0008 rules 1–4: viewer token, comment + change, undo window, server re-read / stale-state refusal), and the same off-switch (`FLOOR_OFFICE_WRITES`). `web/office.js` `ACTION_WIRING` already lists them with a `null` action and `OfficeApp.vue` paints them disabled; this ticket wires them. Not urgent — the Office is fully usable without them (the thread + the other verbs cover the stuck-ticket workflow). `fleet-tui` is vendor-excluded.
Author
Member

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

Ruling: enhancement + ready-for-agent. This is a two-way door: the wiring is revertible by a later commit, the re-armed tickets/children can be re-closed, and the behaviour is provable by the existing offline Office test suite (the pure decide-pane model test plus the write server's unit + end-to-end tests, all against the fake tracker — no network, no timers). It is not a one-way door: re-scope/split perform routine tracker writes (a comment + a label re-arm + child-issue creation) under the viewer's token and the ADR 0008 guards; they do not cross the human-merge / landing door that escalated the merge slice (#308) to ready-for-session, and fleet-tui is not a protected path (not a prompt skeleton, not the .sandcastle/ self-copy, not .forgejo/). The child-ticket UX for split is itself a two-way door I'm ruling open for the implementing agent to shape from the existing free-text "write your own" precedent.


Agent Brief

Category: enhancement
Summary: Wire the unstick verb's re-scope and split decide-pane actions — the ADR 0008 deferral left shown-but-disabled after the merge slice (#308).

Current behavior:
In the Office decide pane the unstick verb offers retry, re-scope, split, close. retry is wired — it re-arms ready-for-agent and drops agent-blocked. re-scope and split are listed in the decide-pane action-wiring map with a null server action, so the pure button model marks them not-live and the Office component paints them permanently disabled. The write server's action set has no handler for either.

Desired behavior:

  • re-scope — on an agent-blocked item, the operator records a new charter (a free-text charter that is posted as a comment and/or applied to the body) and the ticket is re-armed ready-for-agent with agent-blocked removed — the same label transition as retry, but carrying the mandatory new-scope text. The recorded office-action comment states the new charter so the next agent follows it as the recorded ruling (mirror retry's comment shape).
  • split — on an agent-blocked item, the operator carves the stuck ticket into child tickets and the parent is re-armed. Each child is created as a new tracker issue linked to the parent via Forgejo's native dependencies (so the DAG the workers respect is intact), points at the parent's context, and the parent gets an office-action comment naming the children created.

Both must ride ADR 0008 rules 1–4 exactly as the landed writes do: the viewer's own token under sign-in; comment-first then the unit change; the queued undo window; and the flush-time re-read guard — both are unstick actions, so each is actionable only while agent-blocked still stands on the fresh re-read. Both must be hidden by the FLOOR_OFFICE_WRITES=off switch, and neither is live unless writes are on and the action is wired (the existing live contract on the decide buttons).

Key interfaces:

  • The decide-pane action-wiring map — map re-scope and split to their server actions (replace the two nulls) so the button model lights them when writes are on.
  • The write server's action set / payload validator / comment renderer / unit-applier — add both actions: the validator rejects a re-scope with no charter text and a split with no child specs; the renderer emits an office-action-marked record for each; re-scope's unit-applier does the same label swap as unstick plus the charter comment/body edit; split creates the children + dependencies + re-arms the parent.
  • The flush-time re-read guard — treat re-scope and split like unstick (require agent-blocked on the fresh read).
  • The Office decide-pane component — stop painting these two permanently disabled; bind them to the same live flag and provide the operator input (charter text for re-scope; the child-ticket spec input for split), reusing the existing free-text "write your own" input pattern.

Acceptance criteria:

  • With writes on, re-scope and split render LIVE on an agent-blocked unstick item; with FLOOR_OFFICE_WRITES=off neither is enabled (the existing "no enabled buttons" clause).
  • re-scope posts an office-action comment carrying the new charter and transitions the ticket agent-blocked → ready-for-agent.
  • split creates the specified child issues with parent↔child dependencies, records them in an office-action comment, and re-arms the parent.
  • Both honour the undo window and the flush-time re-read refusal — a ticket that left the Outbox meanwhile is refused and recorded, never silently dropped.
  • The Office write unit tests and the server end-to-end test cover both new actions against the fake tracker (offline, no network/timers), matching how retry/merge are tested.

Out of scope:

  • The merge verb and any landing-pr / PR-merge behaviour (landed in #308).
  • Any change to the viewer-token / sign-in posture (ADR 0008 rule 1 stays as-is).
  • Vendoring or consumer propagation — fleet-tui is vendor-excluded; this change does not ripple.
> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** **Ruling:** `enhancement` + `ready-for-agent`. This is a **two-way door**: the wiring is revertible by a later commit, the re-armed tickets/children can be re-closed, and the behaviour is provable by the existing offline Office test suite (the pure decide-pane model test plus the write server's unit + end-to-end tests, all against the fake tracker — no network, no timers). It is **not** a one-way door: `re-scope`/`split` perform routine tracker writes (a comment + a label re-arm + child-issue creation) under the viewer's token and the ADR 0008 guards; they do **not** cross the human-merge / landing door that escalated the merge slice (#308) to `ready-for-session`, and `fleet-tui` is not a protected path (not a prompt skeleton, not the `.sandcastle/` self-copy, not `.forgejo/`). The child-ticket UX for `split` is itself a two-way door I'm ruling open for the implementing agent to shape from the existing free-text "write your own" precedent. --- ## Agent Brief **Category:** enhancement **Summary:** Wire the unstick verb's `re-scope` and `split` decide-pane actions — the ADR 0008 deferral left shown-but-disabled after the merge slice (#308). **Current behavior:** In the Office decide pane the unstick verb offers `retry`, `re-scope`, `split`, `close`. `retry` is wired — it re-arms `ready-for-agent` and drops `agent-blocked`. `re-scope` and `split` are listed in the decide-pane action-wiring map with a `null` server action, so the pure button model marks them not-live and the Office component paints them permanently disabled. The write server's action set has no handler for either. **Desired behavior:** - **re-scope** — on an `agent-blocked` item, the operator records a new charter (a free-text charter that is posted as a comment and/or applied to the body) and the ticket is re-armed `ready-for-agent` with `agent-blocked` removed — the same label transition as `retry`, but carrying the mandatory new-scope text. The recorded `office-action` comment states the new charter so the next agent follows it as the recorded ruling (mirror `retry`'s comment shape). - **split** — on an `agent-blocked` item, the operator carves the stuck ticket into child tickets and the parent is re-armed. Each child is created as a new tracker issue linked to the parent via Forgejo's native dependencies (so the DAG the workers respect is intact), points at the parent's context, and the parent gets an `office-action` comment naming the children created. Both must ride **ADR 0008 rules 1–4** exactly as the landed writes do: the viewer's own token under sign-in; comment-first then the unit change; the queued undo window; and the flush-time re-read guard — both are unstick actions, so each is actionable only while `agent-blocked` still stands on the fresh re-read. Both must be hidden by the `FLOOR_OFFICE_WRITES=off` switch, and neither is live unless writes are on **and** the action is wired (the existing `live` contract on the decide buttons). **Key interfaces:** - The decide-pane **action-wiring map** — map `re-scope` and `split` to their server actions (replace the two `null`s) so the button model lights them when writes are on. - The write server's **action set / payload validator / comment renderer / unit-applier** — add both actions: the validator rejects a `re-scope` with no charter text and a `split` with no child specs; the renderer emits an `office-action`-marked record for each; `re-scope`'s unit-applier does the same label swap as `unstick` plus the charter comment/body edit; `split` creates the children + dependencies + re-arms the parent. - The **flush-time re-read guard** — treat `re-scope` and `split` like `unstick` (require `agent-blocked` on the fresh read). - The **Office decide-pane component** — stop painting these two permanently disabled; bind them to the same `live` flag and provide the operator input (charter text for `re-scope`; the child-ticket spec input for `split`), reusing the existing free-text "write your own" input pattern. **Acceptance criteria:** - [ ] With writes on, `re-scope` and `split` render LIVE on an `agent-blocked` unstick item; with `FLOOR_OFFICE_WRITES=off` neither is enabled (the existing "no enabled buttons" clause). - [ ] `re-scope` posts an `office-action` comment carrying the new charter and transitions the ticket `agent-blocked` → `ready-for-agent`. - [ ] `split` creates the specified child issues with parent↔child dependencies, records them in an `office-action` comment, and re-arms the parent. - [ ] Both honour the undo window and the flush-time re-read refusal — a ticket that left the Outbox meanwhile is refused and recorded, never silently dropped. - [ ] The Office write unit tests and the server end-to-end test cover both new actions against the fake tracker (offline, no network/timers), matching how `retry`/`merge` are tested. **Out of scope:** - The merge verb and any `landing-pr` / PR-merge behaviour (landed in #308). - Any change to the viewer-token / sign-in posture (ADR 0008 rule 1 stays as-is). - Vendoring or consumer propagation — `fleet-tui` is vendor-excluded; this change does not ripple.
Author
Member

swarm-claim host=matou-dev-server-01 run=26377
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=26377 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

⏩ independent reviewer for #334 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #334 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>
Author
Member

close-report for #334 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261105-104416-4319e1 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 334,
  "status": "success",
  "commits": [
    "2e6fa5e824b6d1ad9226331355d958b40155e407"
  ],
  "changed_files": [
    "STATUS.md",
    "docs/journal/2026-11-05-334.md",
    "fleet-tui/floor/server/office-writes.js",
    "fleet-tui/floor/server/office-writes.test.js",
    "fleet-tui/floor/server/office.test.js",
    "fleet-tui/floor/server/server.js",
    "fleet-tui/floor/server/server.test.js",
    "fleet-tui/floor/web/office.js",
    "fleet-tui/floor/web/src/components/OfficeApp.vue",
    "fleet-tui/floor/web/src/composables/useOfficeWrites.js",
    "fleet-tui/floor/web/src/office.test.js",
    "fleet-tui/floor/web/src/test-utils.js"
  ],
  "tests": [
    {
      "command": "node --test server/*.test.js (in fleet-tui/floor)",
      "exit_code": 0
    },
    {
      "command": "bash tests/floor-server-test.sh",
      "exit_code": 0
    },
    {
      "command": "for t in tests/*.sh onboarding/tests/*.sh; do bash $t; done (full offline suite)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "With writes on, re-scope and split render LIVE on an agent-blocked unstick item; with FLOOR_OFFICE_WRITES=off neither is enabled": "web/office.js ACTION_WIRING maps both actions (the two nulls removed) so decideButtons('unstick', true) lights every button (server/office.test.js); OfficeApp.vue binds them to liveBtn; web/src/office.test.js '#334' describe proves LIVE with writes on and disabled with writes off",
    "re-scope posts an office-action comment carrying the new charter and transitions agent-blocked -> ready-for-agent": "office-writes.js renderActionComment('re-scope') + applyUnit (now covers re-scope) do the retry label swap; proven in office-writes.test.js (re-scope flush) and server.test.js end-to-end (charter comment + add ready-for-agent + remove agent-blocked)",
    "split creates the specified child issues with parent<->child dependencies, records them in an office-action comment, and re-arms the parent": "office-writes.js flushSplit + server.js createIssue/addDependency; proven in office-writes.test.js (armed children, parent->child deps [10,201],[10,202], naming comment, re-arm) and server.test.js end-to-end (owner/repo/index dependency triple, #201/#202 named, parent agent-blocked removed)",
    "Both honour the undo window and the flush-time re-read refusal; a ticket that left the Outbox is refused and recorded": "stillActionable treats re-scope/split like unstick (agent-blocked must still stand); office-writes.test.js proves the re-scope stale refusal and the split stale refusal (nothing created) + failed-create refusal; undo window is the shared enqueue path",
    "The Office write unit tests and the server end-to-end test cover both new actions against the fake tracker (offline, no network/timers)": "office-writes.test.js units + server/server.test.js end-to-end re-scope/split test, both against the fake tracker; node --test server/*.test.js green (210)"
  },
  "summary": "Wired the Office unstick verb's re-scope and split decide-pane actions under the ADR 0008 guards, with offline unit + end-to-end coverage.",
  "blockers": []
}
**close-report** for #334 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261105-104416-4319e1` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 334, "status": "success", "commits": [ "2e6fa5e824b6d1ad9226331355d958b40155e407" ], "changed_files": [ "STATUS.md", "docs/journal/2026-11-05-334.md", "fleet-tui/floor/server/office-writes.js", "fleet-tui/floor/server/office-writes.test.js", "fleet-tui/floor/server/office.test.js", "fleet-tui/floor/server/server.js", "fleet-tui/floor/server/server.test.js", "fleet-tui/floor/web/office.js", "fleet-tui/floor/web/src/components/OfficeApp.vue", "fleet-tui/floor/web/src/composables/useOfficeWrites.js", "fleet-tui/floor/web/src/office.test.js", "fleet-tui/floor/web/src/test-utils.js" ], "tests": [ { "command": "node --test server/*.test.js (in fleet-tui/floor)", "exit_code": 0 }, { "command": "bash tests/floor-server-test.sh", "exit_code": 0 }, { "command": "for t in tests/*.sh onboarding/tests/*.sh; do bash $t; done (full offline suite)", "exit_code": 0 } ], "criteria": { "With writes on, re-scope and split render LIVE on an agent-blocked unstick item; with FLOOR_OFFICE_WRITES=off neither is enabled": "web/office.js ACTION_WIRING maps both actions (the two nulls removed) so decideButtons('unstick', true) lights every button (server/office.test.js); OfficeApp.vue binds them to liveBtn; web/src/office.test.js '#334' describe proves LIVE with writes on and disabled with writes off", "re-scope posts an office-action comment carrying the new charter and transitions agent-blocked -> ready-for-agent": "office-writes.js renderActionComment('re-scope') + applyUnit (now covers re-scope) do the retry label swap; proven in office-writes.test.js (re-scope flush) and server.test.js end-to-end (charter comment + add ready-for-agent + remove agent-blocked)", "split creates the specified child issues with parent<->child dependencies, records them in an office-action comment, and re-arms the parent": "office-writes.js flushSplit + server.js createIssue/addDependency; proven in office-writes.test.js (armed children, parent->child deps [10,201],[10,202], naming comment, re-arm) and server.test.js end-to-end (owner/repo/index dependency triple, #201/#202 named, parent agent-blocked removed)", "Both honour the undo window and the flush-time re-read refusal; a ticket that left the Outbox is refused and recorded": "stillActionable treats re-scope/split like unstick (agent-blocked must still stand); office-writes.test.js proves the re-scope stale refusal and the split stale refusal (nothing created) + failed-create refusal; undo window is the shared enqueue path", "The Office write unit tests and the server end-to-end test cover both new actions against the fake tracker (offline, no network/timers)": "office-writes.test.js units + server/server.test.js end-to-end re-scope/split test, both against the fake tracker; node --test server/*.test.js green (210)" }, "summary": "Wired the Office unstick verb's re-scope and split decide-pane actions under the ADR 0008 guards, with offline unit + end-to-end coverage.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#334
No description provided.