Files
pipelines/docs/notes/docs-fold-single-writer.md
T
alan a3f571d672 docs: make docs-fold the single writer of shared documentation
Every item wrote the shared, append-only docs (android/README.md, docs/cli.md and
the packaged skill references), so every merge conflicted on prose. Keep the duty
to notice stale docs; move the writing to one deliberate place.

- Per-item note, not a shared edit. An item that makes a shared document stale
  writes docs/notes/<slug>.md - unique per item, so two items never touch the same
  file - and commits that note with its change. It never edits a README, topic doc
  or packaged skill reference itself.
- One writer. The manual-only docs-fold pipeline, bundled as the fifth starter
  examples/docs-fold.md, folds every note under docs/notes/ into the shared
  document it names and deletes the consumed notes in its own commit; an empty
  notes directory is a success no-op. Operator trigger:
  pipelines new "Docs fold" --template docs-fold --no-open; pipelines submit
  <draft.md>; pipelines run "Docs fold".
- Implemented where the convention lives: orchestration.md (brief item 5, the
  hard-constraint bullet, a "Single documentation writer" section and the
  "Pipeline choice" committer bullet), the canonical committer checklist in
  format.md (new step 6), the committer prompts in examples/task.md and
  examples/three-stage.md, the new examples/docs-fold.md with its catalog and
  README entries, and the repository guideline AGENTS.md. Test-expectation counts
  (examples/catalog_test.go, internal/server/templates_test.go,
  scripts/smoke-first-install.py) follow the fifth starter.

Reflected where it belongs: the packaged templates (examples/task.md,
examples/three-stage.md, the new examples/docs-fold.md), the packaged skill
references (orchestration.md, format.md) and the repo guideline AGENTS.md all carry
the new convention. No new reference file was added, so install.go's managed
inventory is unchanged. The shared descriptive docs were deliberately not
rewritten: this change makes README.md:191, docs/cli.md:170 and
internal/author/skill/references/operations.md:13 name four starters where there are
now five. Those stay as they are - correcting them now is exactly the per-item
shared edit this change removes - and the stale-doc note
docs/notes/docs-fold-single-writer.md records each one for the docs-fold writer to
fold. Nothing else needed updating. No new dependency; no Android, Gradle, server,
installer, Docker or published-definition change; no definition published over the
running pipelines.

Evidence: go test -count=1 ./... passed; go build ./... and go vet on the touched
packages clean; ./internal/author/... covers embedding, reference links, the managed
inventory and install/upgrade/protection; ./examples/... validates the fifth starter
and its manual-only, committer-terminated graph; ./internal/server/... covers the
served catalog. Not run: the docs-fold writer against the shared docs (nothing to
fold yet); no install or deploy.

(cherry picked from commit f29656cf084d7eee2e033f2a37a9d231d7acaaf0)
2026-10-17 23:59:59 +01:00

41 lines
2.2 KiB
Markdown

# docs-fold single documentation writer
## What this item changed
Per-item workflows no longer edit shared documentation themselves. The convention now
lives in `internal/author/skill/references/orchestration.md` (brief item 5, the
hard-constraint bullet, "Single documentation writer", and the "Pipeline choice"
committer bullet), the canonical committer checklist in
`internal/author/skill/references/format.md` (step 6), the bundled committer prompts in
`examples/task.md` and `examples/three-stage.md`, and the repository guideline
`AGENTS.md`.
The chosen mechanism is a **per-item note file** at `docs/notes/<slug>.md`: when a
change makes a shared document stale, the item records what changed and what should
change there, commits that note with its own change, and never edits a shared document.
The chosen **single writer** is the manual-only `docs-fold` pipeline, added as a fifth
bundled starter at `examples/docs-fold.md` and listed in `examples/catalog.go` and
`examples/README.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.
## Shared documents this change makes stale
Adding the fifth starter (`docs-fold`) makes the following documents' starter counts
wrong. They were deliberately **not** edited by this item; the `docs-fold` writer should
correct them when it next folds notes.
- `README.md:191` — "To skip authoring, use **:templates**, choose one of the four
generic starters," should read "five generic starters".
- `docs/cli.md:170` — "Use `:templates` for four simple, manual-only starters: task,
review, research, and plan/implement/review." should say five starters and name
`docs-fold` (fold accumulated documentation notes, then commit locally).
- `internal/author/skill/references/operations.md:13` — "Four optional generic starters
are task, review, research and three-stage;" should read "Five optional generic
starters are task, review, research, three-stage and docs-fold;".
## Do not change
- `docs/first-version-testing.md:148` and the dated records in
`docs/installation-verification.md` describe a past fixture run at the time it ran;
they are dated evidence, not current counts, and stay as they are.