From be7c4e934bedf1d8551978f27e9ae3bae41480a8 Mon Sep 17 00:00:00 2001 From: Guoliang Chen Date: Wed, 16 Sep 2026 00:21:29 -0700 Subject: [PATCH] wire-core: close lane; lanes now run directly on main, no worktrees Co-Authored-By: Claude Fable 5.1 --- CLAUDE.md | 8 +++---- README.md | 5 ----- TODO.md | 2 +- docs/loop.md | 61 ++++++++++++++++++++++++++++----------------------- tools/lane.sh | 34 ---------------------------- 5 files changed, 38 insertions(+), 72 deletions(-) delete mode 100755 tools/lane.sh diff --git a/CLAUDE.md b/CLAUDE.md index adc3a0b..4f181df 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,10 +11,10 @@ checked out at `/Users/guoliangchen/repo/PowerToys/src/modules/MouseWithoutBorde ## How this project is developed (the user's standing instruction) -- **One dev loop at a time.** Never two lanes in flight. A lane is - Dev → QA → lead inspection, then the next lane starts. No worktrees - are needed for parallelism; a lane works on a branch or directly on - `main` as `docs/loop.md` says. +- **One dev loop at a time, directly in this repository.** Never two + lanes in flight, never a worktree: Dev, QA and the lead all work in + `/Users/guoliangchen/repo/mac_without_borders` on `main`. A lane is + Dev → QA → lead inspection, then the next lane starts. - **Roles are fixed**: one Dev (Opus 5) ports the feature; one QA (Sonnet 5) reviews the *code quality and completeness of the port*; then the lead (Fable 5.1) inspects. The lead plans and reviews; it diff --git a/README.md b/README.md index 4aa857f..c37ab28 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,6 @@ tools/ guard.sh runaway guard for long-running commands bundle.sh SPM binary → mwb.app with Info.plist + codesign gates.sh lint + MWBCore layering grep + build-with-warnings-as-errors, the "done" check - lane.sh one worktree per lane ``` ### 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 ``` -```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 scripts call it via `xcrun`. The lint config is `.swift-format` (110 columns, force-unwrap and force-try are lint errors). diff --git a/TODO.md b/TODO.md index c6c3dff..00831f4 100644 --- a/TODO.md +++ b/TODO.md @@ -13,7 +13,7 @@ ones in §Out of scope. ## 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`. ## 1. wire-core (core) — `Sources/MWBCore/Packet.swift`, `Framing.swift`, `MagicHash.swift`, `CipherStream.swift` diff --git a/docs/loop.md b/docs/loop.md index b39b411..7d9ce2a 100644 --- a/docs/loop.md +++ b/docs/loop.md @@ -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 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; -Dev commits as it goes and need not keep every commit compiling; QA -reviews code quality and completeness of the port, not tests; nobody -writes test suites — the user tests the app at the end. +**Standing instruction from the user (2026-09-15/16):** one lane at a +time, **directly on `main` in this repository — no worktrees, no lane +branches**; Dev commits as it goes and need not keep every commit +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 | 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 | -| **Dev** | Opus 5 | one lane on branch `lane/`: 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 | +| **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 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 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 their files (template: `docs/features/TEMPLATE.md`). Commit as `brief: `. -2. **Open the lane**: `tools/lane.sh new ` → worktree at - `../mwb-lanes/` on branch `lane/`. (One worktree, so - `main` stays clean for the lead to write the next brief.) -3. **Dispatch Dev** (§3), `cwd` = the worktree. Dev commits as it goes - and finishes when every Status/TODO item is ticked or explicitly +2. **Note the start commit**: `git rev-parse HEAD` — the lane's diff is + everything after it. No branch, no worktree. +3. **Dispatch Dev** (§3) in the repository. Dev commits to `main` as it + goes and finishes when every Status/TODO item is ticked or explicitly 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 ..HEAD`. + Verdict `PASS` or `REWORK`. 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 rewrites it. -6. **Inspect** (§5). Write the Review section (the lead commits that on - the lane branch). A defect found here goes back to step 3 as a - rework with the review text as the finding. -7. **Merge**: on `main`, `git merge --no-ff lane/`, run - `tools/gates.sh`, update `docs/topo.md` for any edge the lane added - or amended, tick the lane line in `TODO.md`, commit, push, - `tools/lane.sh done `, delete the branch. +6. **Inspect** (§5). Write and commit the Review section. A defect + found here goes back to step 3 as a rework with the review text as + the finding. +7. **Close**: run `tools/gates.sh`, update `docs/topo.md` for any edge + the lane added or amended, tick the lane line in `TODO.md`, commit + `: close lane`, push. 8. **Log the lane** in §8: dates, rework count, what the brief got wrong. 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) ``` -You are the Dev for lane `` of mwb-mac. Work only in this worktree: - (branch lane/). Read, in order: CLAUDE.md, +You are the Dev for lane `` of mwb-mac. Work in the repository +/Users/guoliangchen/repo/mac_without_borders on main. Read, in order: CLAUDE.md, README.md, docs/protocol.md, docs/topo.md, docs/features//README.md. 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//README.md @@ -97,10 +97,10 @@ from, open handshake requests, and the gates.sh tail. ## 4. QA prompt (dispatch verbatim) ``` -You are QA for lane `` of mwb-mac, in worktree -(branch lane/). Dev is finished. Read CLAUDE.md, docs/protocol.md, -docs/features//README.md (all sections), then the diff: -git diff main...HEAD. +You are QA for lane `` of mwb-mac, in the repository +/Users/guoliangchen/repo/mac_without_borders on main. Dev is finished. +Read CLAUDE.md, docs/protocol.md, docs/features//README.md (all +sections), then the diff: git diff ..HEAD. 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; @@ -124,10 +124,10 @@ verdict and the findings. ## 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. -- [ ] `git diff main...HEAD --stat`: only files in the brief's list plus +- [ ] `git diff ..HEAD --stat`: only files in the brief's list plus the shared-by-nature files, in the lane's own sections. - [ ] Read the whole diff. Every protocol constant traces to a `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 | |---|---|---| | 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 | | | 3 | control-channel | | | 4 | input-capture | | @@ -174,6 +174,11 @@ Strictly one at a time, in this order (mirrors `TODO.md`): ## 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 user's request. `swift-format` is not on `PATH`; the gate calls it through `xcrun`. Later the same day the user set the standing diff --git a/tools/lane.sh b/tools/lane.sh deleted file mode 100755 index 5a97619..0000000 --- a/tools/lane.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# Lane worktrees for the Dev → QA → lead loop (docs/loop.md). -# -# tools/lane.sh new create ../mwb-lanes/ on branch lane/ from main -# tools/lane.sh list show live lanes -# tools/lane.sh done 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/ 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 " >&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 " >&2; exit 2; } - git -C "$root" worktree remove "$lanes/$name" - echo "removed $lanes/$name; branch lane/$name kept" - ;; - *) - echo "usage: $0 new | list | done " >&2; exit 2 ;; -esac