wire-core: close lane; lanes now run directly on main, no worktrees

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
lucioandClaude Fable 5.1 committed 2026-09-16 00:21:29 -07:00
1 parent 1ed49d145e
commit be7c4e934b
5 files changed
+38 -72

No files matched your search

+4 -4
View File
@@ -11,10 +11,10 @@ checked out at `/Users/guoliangchen/repo/PowerToys/src/modules/MouseWithoutBorde
## How this project is developed (the user's standing instruction) ## How this project is developed (the user's standing instruction)
- **One dev loop at a time.** Never two lanes in flight. A lane is - **One dev loop at a time, directly in this repository.** Never two
Dev → QA → lead inspection, then the next lane starts. No worktrees lanes in flight, never a worktree: Dev, QA and the lead all work in
are needed for parallelism; a lane works on a branch or directly on `/Users/guoliangchen/repo/mac_without_borders` on `main`. A lane is
`main` as `docs/loop.md` says. Dev → QA → lead inspection, then the next lane starts.
- **Roles are fixed**: one Dev (Opus 5) ports the feature; one QA - **Roles are fixed**: one Dev (Opus 5) ports the feature; one QA
(Sonnet 5) reviews the *code quality and completeness of the port*; (Sonnet 5) reviews the *code quality and completeness of the port*;
then the lead (Fable 5.1) inspects. The lead plans and reviews; it then the lead (Fable 5.1) inspects. The lead plans and reviews; it
-5
View File
@@ -68,7 +68,6 @@ tools/
guard.sh runaway guard for long-running commands guard.sh runaway guard for long-running commands
bundle.sh SPM binary → mwb.app with Info.plist + codesign bundle.sh SPM binary → mwb.app with Info.plist + codesign
gates.sh lint + MWBCore layering grep + build-with-warnings-as-errors, the "done" check gates.sh lint + MWBCore layering grep + build-with-warnings-as-errors, the "done" check
lane.sh one worktree per lane
``` ```
### Windows concept → macOS mapping ### Windows concept → macOS mapping
@@ -131,10 +130,6 @@ tools/gates.sh # xcrun swift-format lint, MWBCore layering
MWB_SIGN_IDENTITY="mwb-mac dev" tools/bundle.sh # release build → dist/mwb.app, signed MWB_SIGN_IDENTITY="mwb-mac dev" tools/bundle.sh # release build → dist/mwb.app, signed
``` ```
```bash
tools/lane.sh new packet-codec # worktree ../mwb-lanes/packet-codec on branch lane/packet-codec
```
`swift-format` ships inside the Xcode toolchain, not on `PATH`; the `swift-format` ships inside the Xcode toolchain, not on `PATH`; the
scripts call it via `xcrun`. The lint config is `.swift-format` scripts call it via `xcrun`. The lint config is `.swift-format`
(110 columns, force-unwrap and force-try are lint errors). (110 columns, force-unwrap and force-try are lint errors).
+1 -1
View File
@@ -13,7 +13,7 @@ ones in §Out of scope.
## 0. bootstrap — done 2026-09-15 ## 0. bootstrap — done 2026-09-15
- [x] SwiftPM skeleton, `tools/gates.sh`, `tools/bundle.sh`, `tools/lane.sh`, - [x] SwiftPM skeleton, `tools/gates.sh`, `tools/bundle.sh`,
`mwb --version` / `--check-permissions`, `docs/loop.md`. `mwb --version` / `--check-permissions`, `docs/loop.md`.
## 1. wire-core (core) — `Sources/MWBCore/Packet.swift`, `Framing.swift`, `MagicHash.swift`, `CipherStream.swift` ## 1. wire-core (core) — `Sources/MWBCore/Packet.swift`, `Framing.swift`, `MagicHash.swift`, `CipherStream.swift`
+33 -28
View File
@@ -6,18 +6,19 @@ the rules; this file is the procedure. The lead follows it verbatim so
every lane leaves the same trail: a feature README with Work log, QA every lane leaves the same trail: a feature README with Work log, QA
log and Review filled in, ticked TODO lines, and a `--no-ff` merge. log and Review filled in, ticked TODO lines, and a `--no-ff` merge.
**Standing instruction from the user (2026-09-15):** one lane at a time; **Standing instruction from the user (2026-09-15/16):** one lane at a
Dev commits as it goes and need not keep every commit compiling; QA time, **directly on `main` in this repository — no worktrees, no lane
reviews code quality and completeness of the port, not tests; nobody branches**; Dev commits as it goes and need not keep every commit
writes test suites — the user tests the app at the end. compiling; QA reviews code quality and completeness of the port, not
tests; nobody writes test suites — the user tests the app at the end.
## 0. Roles ## 0. Roles
| role | model | owns | never | | role | model | owns | never |
|---|---|---|---| |---|---|---|---|
| **Lead** | Fable 5.1 (this session) | `main`, briefs, dispatch, inspection, merges, pushes, `docs/topo.md` | writes lane code (bootstrap was the one exception); trusts a report it has not read against the diff | | **Lead** | Fable 5.1 (this session) | `main`, briefs, dispatch, inspection, merges, pushes, `docs/topo.md` | writes lane code (bootstrap was the one exception); trusts a report it has not read against the diff |
| **Dev** | Opus 5 | one lane on branch `lane/<name>`: the port, the README Work log, ticks in Status/TODO and `TODO.md`, small frequent commits | pushes; touches files outside the brief; writes test suites; asks for permissions | | **Dev** | Opus 5 | one lane on `main`: the port, the README Work log, ticks in Status/TODO and `TODO.md`, small frequent commits | pushes; touches files outside the brief; writes test suites; asks for permissions |
| **QA** | Sonnet 5 | the same branch after Dev: a code-quality and completeness review, the README QA log, a verdict | redesigns; writes tests; edits beyond small unambiguous fixes it records | | **QA** | Sonnet 5 | the same tree after Dev: a code-quality and completeness review, the README QA log, a verdict | redesigns; writes tests; edits beyond small unambiguous fixes it records |
"Inspect" is the lead's review: the lead reads the diff with its own "Inspect" is the lead's review: the lead reads the diff with its own
eyes and runs `tools/gates.sh` before writing the Review section. eyes and runs `tools/gates.sh` before writing the Review section.
@@ -28,23 +29,22 @@ eyes and runs `tools/gates.sh` before writing the Review section.
Goal, Assumptions, Handshakes and a Status/TODO whose items name Goal, Assumptions, Handshakes and a Status/TODO whose items name
their files (template: `docs/features/TEMPLATE.md`). Commit as their files (template: `docs/features/TEMPLATE.md`). Commit as
`brief: <name>`. `brief: <name>`.
2. **Open the lane**: `tools/lane.sh new <name>` → worktree at 2. **Note the start commit**: `git rev-parse HEAD` — the lane's diff is
`../mwb-lanes/<name>` on branch `lane/<name>`. (One worktree, so everything after it. No branch, no worktree.
`main` stays clean for the lead to write the next brief.) 3. **Dispatch Dev** (§3) in the repository. Dev commits to `main` as it
3. **Dispatch Dev** (§3), `cwd` = the worktree. Dev commits as it goes goes and finishes when every Status/TODO item is ticked or explicitly
and finishes when every Status/TODO item is ticked or explicitly
deferred, and `tools/gates.sh` is green on the final commit. deferred, and `tools/gates.sh` is green on the final commit.
4. **Dispatch QA** (§4), same worktree. Verdict `PASS` or `REWORK`. 4. **Dispatch QA** (§4), same tree, diff = `git diff <start>..HEAD`.
Verdict `PASS` or `REWORK`.
5. **On REWORK**, dispatch Dev again with the QA log as input. At most 5. **On REWORK**, dispatch Dev again with the QA log as input. At most
two rework rounds; a third means the brief was wrong — the lead two rework rounds; a third means the brief was wrong — the lead
rewrites it. rewrites it.
6. **Inspect** (§5). Write the Review section (the lead commits that on 6. **Inspect** (§5). Write and commit the Review section. A defect
the lane branch). A defect found here goes back to step 3 as a found here goes back to step 3 as a rework with the review text as
rework with the review text as the finding. the finding.
7. **Merge**: on `main`, `git merge --no-ff lane/<name>`, run 7. **Close**: run `tools/gates.sh`, update `docs/topo.md` for any edge
`tools/gates.sh`, update `docs/topo.md` for any edge the lane added the lane added or amended, tick the lane line in `TODO.md`, commit
or amended, tick the lane line in `TODO.md`, commit, push, `<name>: close lane`, push.
`tools/lane.sh done <name>`, delete the branch.
8. **Log the lane** in §8: dates, rework count, what the brief got wrong. 8. **Log the lane** in §8: dates, rework count, what the brief got wrong.
9. Only now write the next brief. 9. Only now write the next brief.
@@ -67,8 +67,8 @@ eyes and runs `tools/gates.sh` before writing the Review section.
## 3. Dev prompt (dispatch verbatim, fill the brackets) ## 3. Dev prompt (dispatch verbatim, fill the brackets)
``` ```
You are the Dev for lane `<name>` of mwb-mac. Work only in this worktree: You are the Dev for lane `<name>` of mwb-mac. Work in the repository
<absolute worktree path> (branch lane/<name>). Read, in order: CLAUDE.md, /Users/guoliangchen/repo/mac_without_borders on main. Read, in order: CLAUDE.md,
README.md, docs/protocol.md, docs/topo.md, docs/features/<name>/README.md. README.md, docs/protocol.md, docs/topo.md, docs/features/<name>/README.md.
The README's Status/TODO is your task list and its file list is the only The README's Status/TODO is your task list and its file list is the only
set of files you may create or edit, plus: docs/features/<name>/README.md set of files you may create or edit, plus: docs/features/<name>/README.md
@@ -97,10 +97,10 @@ from, open handshake requests, and the gates.sh tail.
## 4. QA prompt (dispatch verbatim) ## 4. QA prompt (dispatch verbatim)
``` ```
You are QA for lane `<name>` of mwb-mac, in worktree <absolute path> You are QA for lane `<name>` of mwb-mac, in the repository
(branch lane/<name>). Dev is finished. Read CLAUDE.md, docs/protocol.md, /Users/guoliangchen/repo/mac_without_borders on main. Dev is finished.
docs/features/<name>/README.md (all sections), then the diff: Read CLAUDE.md, docs/protocol.md, docs/features/<name>/README.md (all
git diff main...HEAD. sections), then the diff: git diff <start commit>..HEAD.
You review code quality and completeness of the port. You do not write You review code quality and completeness of the port. You do not write
tests and you do not redesign. In order: (1) run tools/gates.sh; tests and you do not redesign. In order: (1) run tools/gates.sh;
@@ -124,10 +124,10 @@ verdict and the findings.
## 5. Lead inspection checklist ## 5. Lead inspection checklist
Run in the worktree, by the lead, before writing Review: Run in the repository, by the lead, before writing Review:
- [ ] `tools/gates.sh` green on the lane's last commit, run by me. - [ ] `tools/gates.sh` green on the lane's last commit, run by me.
- [ ] `git diff main...HEAD --stat`: only files in the brief's list plus - [ ] `git diff <start>..HEAD --stat`: only files in the brief's list plus
the shared-by-nature files, in the lane's own sections. the shared-by-nature files, in the lane's own sections.
- [ ] Read the whole diff. Every protocol constant traces to a - [ ] Read the whole diff. Every protocol constant traces to a
`docs/protocol.md` line; every offset matches §1.1. `docs/protocol.md` line; every offset matches §1.1.
@@ -152,7 +152,7 @@ Strictly one at a time, in this order (mirrors `TODO.md`):
| # | lane | status | | # | lane | status |
|---|---|---| |---|---|---|
| 0 | bootstrap | merged 2026-09-15 (lead, solo) | | 0 | bootstrap | merged 2026-09-15 (lead, solo) |
| 1 | wire-core | brief written | | 1 | wire-core | merged 2026-09-16 (worktree; the last lane to use one) |
| 2 | session-matrix | | | 2 | session-matrix | |
| 3 | control-channel | | | 3 | control-channel | |
| 4 | input-capture | | | 4 | input-capture | |
@@ -174,6 +174,11 @@ Strictly one at a time, in this order (mirrors `TODO.md`):
## 8. Lane log ## 8. Lane log
- **2026-09-16, lane 1 (wire-core)** — Dev (Opus) one pass, QA (Sonnet)
PASS with one doc typo fixed, lead merge. Brief held. Findings the
dev surfaced for later lanes are in `docs/protocol.md` §10.1. Mid-lane
the user ruled out worktrees; this procedure now runs on `main`.
- **2026-09-15, lane 0 (bootstrap)** — done by the lead alone at the - **2026-09-15, lane 0 (bootstrap)** — done by the lead alone at the
user's request. `swift-format` is not on `PATH`; the gate calls it user's request. `swift-format` is not on `PATH`; the gate calls it
through `xcrun`. Later the same day the user set the standing through `xcrun`. Later the same day the user set the standing
-34
View File
@@ -1,34 +0,0 @@
#!/usr/bin/env bash
# Lane worktrees for the Dev → QA → lead loop (docs/loop.md).
#
# tools/lane.sh new <feature> create ../mwb-lanes/<feature> on branch lane/<feature> from main
# tools/lane.sh list show live lanes
# tools/lane.sh done <feature> remove the worktree (branch is kept until the lead deletes it)
#
# One worktree per lane, never two agents in one tree (CLAUDE.md,
# Parallel lanes). The lead merges lane/<feature> into main with --no-ff
# after QA verdict and review, then runs `done`.
set -euo pipefail
root=$(cd "$(dirname "$0")/.." && pwd)
lanes="$(dirname "$root")/mwb-lanes"
cmd="${1:-}"; name="${2:-}"
case "$cmd" in
new)
[ -n "$name" ] || { echo "usage: $0 new <feature>" >&2; exit 2; }
[ -d "$root/docs/features/$name" ] || { echo "no docs/features/$name — write the brief first (docs/loop.md §2)" >&2; exit 2; }
mkdir -p "$lanes"
git -C "$root" worktree add -b "lane/$name" "$lanes/$name" main
echo "lane ready: $lanes/$name (branch lane/$name)"
;;
list)
git -C "$root" worktree list
;;
done)
[ -n "$name" ] || { echo "usage: $0 done <feature>" >&2; exit 2; }
git -C "$root" worktree remove "$lanes/$name"
echo "removed $lanes/$name; branch lane/$name kept"
;;
*)
echo "usage: $0 new <feature> | list | done <feature>" >&2; exit 2 ;;
esac