Merge main into multiclient: combine the multi-client chat fan-out with main's chat tool-work, notifications, status palette and docs-fold changes

No conflicts: main's chat-surface work (the in-flight tool work in ChatFormat,
ChatStore and ChatTranscript, run notifications, the status palette) sits in
different hunks from this branch's fan-out edits, and main did not touch
docs/cli.md. Checks re-run on the merged tree: gofmt -l . (clean), go build ./...,
go vet ./..., go test -count=1 ./... (all packages pass; the focused multi-client
tests fan-out, per-session serialisation, first-answer-wins, pending replay and
resync pass), and the Android unit tests
(gradle --offline --no-daemon :app:testDebugUnitTest, BUILD SUCCESSFUL, 598 tests,
0 failures).
This commit is contained in:
2026-10-18 00:09:17 +01:00
44 changed files with 2073 additions and 229 deletions
@@ -228,6 +228,15 @@ State this pre-commit checklist in the prompt:
note.
5. Commit with a concise message naming the run's change and report the commit hash;
never push, tag, rebase or amend.
6. Ensure the item's per-item documentation note (`docs/notes/<slug>.md`, written when
the change makes a shared document stale) is staged with the change. Never edit a
shared document (a README or topic doc, or a packaged skill reference) here: a single
documentation writer folds notes later (`references/orchestration.md`). An item that
staled no shared document has no note and needs no step 6.
This list is the canonical checklist. The bundled starters `task`, `three-stage` and
`docs-fold` each repeat it in their committer prompt because a template is embedded and
published on its own; keep those copies in sync with this list.
Merging is the operator's or a lane's job, not the committer's: it commits locally
and stops (`references/orchestration.md`, `references/lanes.md`). The server does
@@ -55,9 +55,11 @@ Every brief has:
output it must report, plus the screenshots the reviewer must read. Say plainly:
"report the exact commands and their observed results. Do not claim a check you
did not run."
5. **Where it belongs** — the packaged templates, the repository's guidelines (README
and topic docs) and the packaged skill references the change is expected to touch,
so the committer can check and update them before it commits.
5. **Documentation note** — where the change makes shared documentation stale, the item
records that in its own per-item note `docs/notes/<slug>.md`: what it changed and
which shared document (a README or topic doc, or a packaged skill reference) is now
stale and what should change there. The item writes only its note; it must not edit a
shared document. See "Single documentation writer" below.
6. **The hard constraints block** (below).
7. **Publishing rules** (`references/delivery.md`).
@@ -81,7 +83,8 @@ dependencies; do not restart, rebuild or reconfigure the Pipelines or OpenCode
server, the installer, the ntfy service or any other service - runs and lanes are
active; never install on the operator's physical device; keep geometry and values
from their single existing sources rather than new literals; commit locally only,
never push; <the item's publishing rules>.
never push; record a documentation note in `docs/notes/<slug>.md` rather than editing
a shared document; <the item's publishing rules>.
```
Requirements must be concrete and checkable. Name files, functions, commands, and
@@ -106,12 +109,36 @@ Adapt the scope and publishing lines per item; keep the rest.
- **Keep values from single sources** — geometry, tokens, sizes and constants come
from the source that already owns them, not from new literals.
- **Commit locally only, never push** — the committer stage commits, no other stage.
- **Reflect the change where it belongs** — before committing, the committer checks
that the change is reflected in the packaged templates, the repository's guidelines
(README and topic docs) and the packaged skill references, updates anything stale,
and states in the commit body what it checked or that nothing needed updating.
- **Record stale documentation; do not rewrite it** — before committing, the committer
ensures the item's `docs/notes/<slug>.md` note, when the change makes a shared document
stale, is staged with the change, and states in the commit body what it checked. The
committer never edits a shared document (a README or topic doc, or a packaged skill
reference) itself; the single documentation writer folds notes later.
- **Publish rules** — WIP artefact naming and LAN URLs per `references/delivery.md`.
## Single documentation writer
Shared documentation — the repository's READMEs and topic docs (for this repository
`android/README.md` and `docs/cli.md`) and the packaged skill references in
`internal/author/skill/references/` — has exactly one writer, never an item. Each item
that makes one of these stale leaves a note at `docs/notes/<slug>.md` (item 5 above).
The note's filename is unique per item, so two items never write the same file and
never conflict on prose.
The writer is the manual-only `docs-fold` pipeline, bundled as the starter
`examples/docs-fold.md`. Its `fold` stage reads every note under `docs/notes/`, folds
each into the shared document it names, and deletes the consumed notes in its own
commit; an empty `docs/notes/` is a success no-op with no empty commit. It is never
scheduled and is never part of a per-item workflow.
The operator triggers it deliberately:
```sh
pipelines new "Docs fold" --template docs-fold --no-open
pipelines submit <draft.md>
pipelines run "Docs fold"
```
## Pipeline choice
- Use a pipeline that keeps **implementer + reviewer + ui_reviewer + committer** for
@@ -123,10 +150,11 @@ Adapt the scope and publishing lines per item; keep the rest.
`skipped` with a reason when the change has no rendered surface. Never accept a UI
change approved without the images.
- The committer is the only stage that commits, and it stages only the run's changed
files. Before committing it checks that the change is reflected in the packaged
templates, the repository's guidelines (README and topic docs) and the packaged
skill references, updates anything stale, and states in the commit body what it
checked or that nothing needed updating. It must also select `input.server_changed_files`
files. Before committing it ensures the item's `docs/notes/<slug>.md` note, when the
change makes a shared document stale, is staged with the change, and states in the
commit body what it checked; it never edits a shared document (a README or topic doc,
or a packaged skill reference) itself, because a single documentation writer folds
notes later. It must also select `input.server_changed_files`
(the runner's captured evidence, `references/control.md`) alongside the implementer's
declared `changed_files` and stage their union: an implementer's declared list can be
incomplete, and a captured path it omitted is still this run's change. Its prompt carries
+2 -1
View File
@@ -2,6 +2,7 @@ package server
import (
"context"
"git.a-wan.net/alan/pipelines/examples"
"git.a-wan.net/alan/pipelines/internal/pipeline"
"git.a-wan.net/alan/pipelines/internal/protocol"
"github.com/coder/websocket"
@@ -44,7 +45,7 @@ func TestTemplatesDoNotSeedDatabaseAndCreateOnlyPreservesExisting(t *testing.T)
if err := wsjson.Read(ctx, conn, &response); err != nil {
t.Fatal(err)
}
if response.Type != protocol.Templates || len(response.Templates) != 4 {
if response.Type != protocol.Templates || len(response.Templates) != len(examples.Catalog()) {
t.Fatal("missing catalog", response.Type, len(response.Templates))
}
items, err := store.List(ctx)