Reports: TODO/DONE format instead of checkboxes, much broader reportability bar

Format: '** TODO <title>' unread, '** DONE <title>' read -- tick deletes
DONE entries at the start of its next run (previously [X]). This only
changes the Reports heading's own keyword; :chat: entries and Close
diwan session stay checkbox-based, unaffected.

Reportability: reversed last turn's narrow 'only real findings' bar.
The report is now explicitly meant to be the one place Marc checks for
everything new or needing attention -- so triage moves, new dispatches,
session closures, and inline answers are reportable again, alongside
findings/ambiguities/problems and anywhere a note was left for Marc to
read (even one the agent already marked [X] itself -- that's not the
same as Marc having seen it). Only two exclusions remain: a run where
nothing happened at all, and a bare nudge (no information yet on
whether anything came of it).

No code changes -- this is PROTOCOL.md/TICK.md/DO.md/DESIGN.md only.
Also cleaned up one stale 'did nothing' entry in diwan-dev-notes'
diwan.org that violated the rule even under the old wording.
This commit is contained in:
marc committed 2026-11-09 23:08:42 +01:00
1 parent 43215d6e0a
commit 19e6ae3a59
4 files changed
+18 -18

No files matched your search

+2 -2
View File
@@ -62,8 +62,8 @@ Note what's *not* here: `last_tick_commit` is deliberately **not** updated by th
**Agent half** (`TICK.md`), five steps, each its own commit:
1. Triage `inbox.org` only (other files changing is someone else's edit): events → `esdeveniments.org`, tasks → wherever they actually belong, `:diwan:` items get moved but not acted on yet, new topics only get a new file when nothing existing fits.
2. Tag consistency: any `:session:`/`:chat:` heading without a `:diwan:` tag on itself or an ancestor gets `:diwan:` added directly to it. Then resolve `:chat:` ownership: chats under a `:session:` ancestor are left for that heading's own session; orphan chats get answered inline if trivial, or escalated (see step 3's three-way decision) if not.
3. Handle every `:diwan:`-tagged heading without an open `:session:`: trivial ones get answered inline, no tag beyond `:diwan:` ever assigned. Non-trivial ones split two ways — self-contained within the heading's own subtree gets a `:session:` tag and `diwan do <file>:<line> --diwan-id <slug>` run *by the tick agent itself* (the tick agent is the only thing that ever originates a fresh `DIWAN_ID`); inherently cross-cutting work (spans multiple files/headings, can't be parallelized — archiving, bulk cleanup, moving things between files) is done by the tick agent *directly*, right there, no session at all, possibly spread across several tick runs if it needs Marc's input first. The same handling applies to any open item under `diwan.org`'s `Tasks` heading — diwan's own self-maintenance backlog, no tag needed there since the location already signals it (see PROTOCOL.md's `diwan.org` section). Already-open sessions (`:session:` tag + `DIWAN_ID` present, `Close diwan session` still `[ ]`) get their subtree's content left alone as always, but are checked for a nudge: if any commit in this tick's change range *not* authored by the diwan git identity touched a line inside that subtree (a hand-authored heading edit, a new unread `:chat:` entry, anything Marc did), the tick agent re-runs `diwan do <file>:<line> --diwan-id <id>` on the existing ID — a continuation dispatch into the session's own tab/agent, not a fresh one — purely to wake it up; no nudge at all if nothing hand-authored touched the subtree. This is the only mechanism that gets a change Marc makes to an active heading in front of its own idle agent — nothing watches the file otherwise. A session whose `Close diwan session` is already `[X]` gets retired for real: the tick agent looks up its `DIWAN_ID`'s herdr tab and actually closes it (`herdr tab close`), then removes the `:session:` tag from the heading — the `DIWAN_ID` property itself is left in place as a historical record. None of dispatch, nudge, or closure get a Reports entry on their own; see step 4.
4. Delete any already-`[X]` Reports subheadings first, then — only for things that actually clear the "real information" bar, not routine mechanical steps like a bare dispatch or a session closure Marc asked for — write one short, titled, checkbox subheading per reportable thing this run did into `diwan.org`'s Reports log (not one paragraph for the whole run), each with the title itself linking to the one heading it's about (plain text if there isn't one) and a 1-2 line signed body. Zero new entries is a normal outcome.
3. Handle every `:diwan:`-tagged heading without an open `:session:`: trivial ones get answered inline, no tag beyond `:diwan:` ever assigned. Non-trivial ones split two ways — self-contained within the heading's own subtree gets a `:session:` tag and `diwan do <file>:<line> --diwan-id <slug>` run *by the tick agent itself* (the tick agent is the only thing that ever originates a fresh `DIWAN_ID`); inherently cross-cutting work (spans multiple files/headings, can't be parallelized — archiving, bulk cleanup, moving things between files) is done by the tick agent *directly*, right there, no session at all, possibly spread across several tick runs if it needs Marc's input first. The same handling applies to any open item under `diwan.org`'s `Tasks` heading — diwan's own self-maintenance backlog, no tag needed there since the location already signals it (see PROTOCOL.md's `diwan.org` section). Already-open sessions (`:session:` tag + `DIWAN_ID` present, `Close diwan session` still `[ ]`) get their subtree's content left alone as always, but are checked for a nudge: if any commit in this tick's change range *not* authored by the diwan git identity touched a line inside that subtree (a hand-authored heading edit, a new unread `:chat:` entry, anything Marc did), the tick agent re-runs `diwan do <file>:<line> --diwan-id <id>` on the existing ID — a continuation dispatch into the session's own tab/agent, not a fresh one — purely to wake it up; no nudge at all if nothing hand-authored touched the subtree. This is the only mechanism that gets a change Marc makes to an active heading in front of its own idle agent — nothing watches the file otherwise. A session whose `Close diwan session` is already `[X]` gets retired for real: the tick agent looks up its `DIWAN_ID`'s herdr tab and actually closes it (`herdr tab close`), then removes the `:session:` tag from the heading — the `DIWAN_ID` property itself is left in place as a historical record. Dispatch and closure both get a Reports entry (new/changed state Marc hasn't seen); a bare nudge does not, not because it's unimportant but because there's no information yet on whether it did anything — see step 4.
4. Delete any already-`DONE` Reports subheadings first, then write one short, titled `TODO` subheading per reportable thing this run did into `diwan.org`'s Reports log (not one paragraph for the whole run) — the bar is deliberately broad (items moved, dispatches, closures, inline answers, findings, notes left for Marc to read), excluding only a run where nothing happened at all and a bare nudge (no information yet on whether it did anything) — each with the title itself linking to the one heading it's about (plain text if there isn't one) and a 1-2 line signed body.
5. Only if 1–4 all succeeded: update `state.json.last_tick_commit` to current `HEAD` and commit under the diwan identity.
**Verified live** (2026-11-08, herdr 0.9.5 + Claude Code, before both the 2026-11-09 tool/content split and the pi-only harness switch): dispatched for real, ran to completion with zero permission prompts, correctly left two already-open `:session:`-tagged sessions untouched (back when `:session:` was still spelled `:diwan:`, before the tag rename — see "Known gaps" for what's unverified post-rename), correctly found nothing to triage, wrote a proper signed report, and updated `state.json` correctly. A second immediate `diwan tick` correctly no-op'd. **Not yet re-verified with a real dispatched agent** against the current state of things (post-split two-repo layout, `pi` as the sole harness) — path resolution and `pi`'s own startup have each been tested separately (see below and "Known gaps"), but not yet together through a full live tick run. Do that before trusting it for real.