Skip to content

The workbench: every note in one checkout, each branch built from its own files - #60

Open
lmoresi wants to merge 2 commits into
mainfrom
docs/workbench
Open

lmoresi wants to merge 2 commits into
mainfrom
docs/workbench

Conversation

@lmoresi

@lmoresi lmoresi commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Writing several notes at once meant a worktree per note, nineteen of them by October, each wanting its own editor window; several sessions sharing one checkout was worse, since one switching branch moved every session's files. This keeps every note in progress side by side in one checkout and builds each note's branch from its own directory.

  • scripts/note.py (pixi run note ...):
    • init makes a checkout the workbench, a local branch that is never pushed.
    • save <slug> commits a note's directory, plus its own classification.yml and acknowledgements.yml entries, onto note/<slug> without checking it out. Other notes' files never go in.
    • pull <number|branch> brings in a pull request, a contributor's fork included, or a branch a hub session pushed.
    • sync merges main and whatever has been pushed to a tracked branch.
    • list says what each branch needs.
    • The two registers merge entry by entry, so notes that add their entries side by side don't conflict; a merge stops only when two branches change one note's entry differently. A contribution branch that touches only the note (figures from the machine with the runs, say) is carried into the note's next save with its authorship intact.
  • scripts/workbench_guard.py, wired in through .claude/settings.json, refuses checkout, switch, stash, reset, restore, clean, rebase, pull and commit -a in Claude Code sessions, and only when the checkout is the workbench.
  • CLAUDE.md and the "Writing a note" section of CONTRIBUTING.md describe the workbench and how to contribute from anywhere else (a hub session, another machine): a note/<slug> branch and a pull request, as before.

Tested against a throwaway origin with 53 checks, then rehearsed on a clone of this repository by pulling all twelve open notes and pull requests. The laptop checkout has run as the workbench since 2026-10-26.

The one open choice is fork_destination(): where save --push sends a commit made on a contributor's fork PR. It stops with a message until that is decided.

🤖 Generated with Claude Code

https://claude.ai/code/session_011S876ckjYqqth1aPyojrhh

lmoresi and others added 2 commits October 26, 2026 14:12
… own files

scripts/note.py keeps all notes in progress side by side on a local branch,
workbench, and commits each note's directory onto its own branch without
checking it out, so several sessions and one editor can work in a single
checkout. pull brings in a pull request (a contributor's fork too) or a branch
a hub session pushed; sync merges main and anything pushed to a tracked
branch. classification.yml and acknowledgements.yml merge entry by entry, so
notes adding their entries side by side do not conflict.
scripts/workbench_guard.py and .claude/settings.json refuse the git commands
that would move every session's files, and only on the workbench. CLAUDE.md
and CONTRIBUTING.md say how to work on the workbench and from anywhere else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011S876ckjYqqth1aPyojrhh
A save carries the workbench's copy of every path the branch owns, and a
note's branch owned any file it had ever changed. 2026-022 had edited
WRITING-PLAN.md, so saving it carried #24's edits to that file too, and
carried #24 itself as a contribution, since #24 edits nothing else. Now a
branch with an article in it owns only articles/ paths unless others are
named; and any branch leaves out a file outside articles/ that another
tracked branch also edits, saying so, unless that file is named.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011S876ckjYqqth1aPyojrhh

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant