Adopt the user's development rule: one lane at a time, no test suites
CLAUDE.md gains a 'How this project is developed' section: strictly serial Dev (Opus 5) -> QA (Sonnet 5, code quality) -> lead inspection; commit along the way without requiring every commit to compile; the user is the tester. docs/loop.md, docs/topo.md and TODO.md are rewritten to a serial lane order with no test-writing items; the test targets are removed and tools/gates.sh is lint + layering grep + build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
1 parent
671b3dfa61
commit
87aeee6f93
15 files changed
+391
-617
No files matched your search
@@ -28,8 +28,7 @@ One paragraph: what this lane delivers, why it exists, and which
|
||||
|
||||
## Status / TODO
|
||||
|
||||
- [ ] `<file>`: item
|
||||
- [ ] `Tests/<target>/<file>`: item
|
||||
- [ ] `<file>`: the Windows behaviour ported, with its citation
|
||||
- [ ] `docs/protocol.md`: citations verified / marks flipped
|
||||
|
||||
## Work log
|
||||
|
||||
@@ -63,7 +63,10 @@ works on this machine at all. Nothing in later lanes can start until
|
||||
missing) backed by `MWBMac/Permissions.swift` (preflight only).
|
||||
- [x] `tools/lane.sh` worktree helper; `docs/loop.md` procedure;
|
||||
`docs/features/TEMPLATE.md`.
|
||||
- [x] `tools/gates.sh` green: 3 XCTest cases, 0 warnings, lint clean.
|
||||
- [x] `tools/gates.sh` green (lint, layering grep, build). The three
|
||||
XCTest cases from the first cut were removed the same day when the
|
||||
user set the no-test-suites rule; the layering check moved into
|
||||
`gates.sh` as a grep.
|
||||
- [ ] Not done, deliberately: no CI workflow. The lucisv Gitea runner
|
||||
exists on this Mac (`verilogrustformatter/tools/RELEASING.md`), but
|
||||
a CI that runs `swift test` for a project that will soon post
|
||||
|
||||
@@ -20,15 +20,14 @@ point; there is no "better" cipher choice to make here.
|
||||
- **PBKDF2 goes through `CCKeyDerivationPBKDF`** with
|
||||
`kCCPRFHmacAlgSHA512`, 100 000 rounds, 32 bytes. Password bytes are
|
||||
UTF-8 of the key string — `Rfc2898DeriveBytes.Pbkdf2(string, …)` uses
|
||||
UTF-8 (documented .NET behaviour). Pinned by a Python
|
||||
`hashlib.pbkdf2_hmac('sha512', …)` vector.
|
||||
UTF-8 (documented .NET behaviour).
|
||||
- **The magic hash truncates each UTF-16 code unit to a byte**
|
||||
(`(byte)st[i]`, `Encryption.cs:184`) and hashes a fixed 32-byte
|
||||
buffer; keys longer than 32 characters contribute only their first 32.
|
||||
The `<< 23` overlap is reproduced with `UInt32` wrapping arithmetic in
|
||||
the same order as the C# expression.
|
||||
- **Salt and IV are fresh per direction and never reused**; Windows
|
||||
tests pin uniqueness (`EncryptionTests.cs:59-68`) and so do ours.
|
||||
- **Salt and IV are fresh per direction and never reused**
|
||||
(`EncryptionTests.cs:59-68` documents the Windows expectation).
|
||||
- **The sacrificial block is part of the cipher type's contract**: the
|
||||
writer emits it right after the header, the reader discards the first
|
||||
16 plaintext bytes. Callers never see it (topo.md handshake 2).
|
||||
@@ -53,7 +52,7 @@ public struct CipherReader {
|
||||
}
|
||||
```
|
||||
|
||||
`RandomBytes` is injectable so tests can pin whole streams.
|
||||
`RandomBytes` is injectable so the lead can reproduce a stream by hand when checking against a Windows capture.
|
||||
|
||||
### Consumed
|
||||
|
||||
@@ -61,15 +60,12 @@ public struct CipherReader {
|
||||
|
||||
## Status / TODO
|
||||
|
||||
- [ ] `Sources/MWBCore/MagicHash.swift` + `Tests/MWBCoreTests/MagicHashTests.swift`
|
||||
with `Tests/Fixtures/magic_reference.py` (run once; vector committed).
|
||||
- [ ] `Sources/MWBCore/CipherStream.swift`: key derivation, writer, reader.
|
||||
- [ ] `Tests/MWBCoreTests/CipherStreamTests.swift`: PBKDF2 vector;
|
||||
round-trip; byte-at-a-time reader equals all-at-once; unique
|
||||
header per instance; wrong key ⇒ garbage without throwing;
|
||||
descriptions omit secrets.
|
||||
- [ ] Note in `docs/perf/README.md`: PBKDF2 at 100 000 rounds SHA-512
|
||||
costs ~N ms per connection open (measure; it is per direction).
|
||||
- [ ] `Sources/MWBCore/MagicHash.swift`: `magicNumber(for:)` per §2.1,
|
||||
every step cited to `Encryption.cs:173-200`.
|
||||
- [ ] `Sources/MWBCore/CipherStream.swift`: PBKDF2 key derivation,
|
||||
`CipherWriter`, `CipherReader` (header, sacrificial block,
|
||||
streaming CBC), cited to `Encryption.cs` and `Common.cs:1528-1558`.
|
||||
- [ ] `docs/perf/README.md`: note the PBKDF2 cost per connection open.
|
||||
|
||||
## Work log
|
||||
|
||||
|
||||
@@ -19,9 +19,8 @@ crypto.
|
||||
`ProcessReceivedDataEx` does, so a decoded packet's bytes 1–3 are
|
||||
always 0 and re-sealing is deterministic.
|
||||
- **The checksum covers bytes 2..31 only, even on 64-byte packets.** We
|
||||
reproduce this, and pin it with a test that corrupts byte 40 of a
|
||||
64-byte packet and asserts it is *not* detected — the encryption
|
||||
layer, not the checksum, is what protects the name half.
|
||||
reproduce this; the encryption layer, not the checksum, is what
|
||||
protects the name half. Say so in a comment at the checksum loop.
|
||||
- **Unknown type values decode as `.unknown(UInt8)`** rather than
|
||||
throwing, so a newer Windows build cannot desynchronise our framing.
|
||||
Size for an unknown value follows the big/small rule (`0x80` bit ⇒ 64,
|
||||
@@ -66,16 +65,10 @@ same change and session codes against the README.
|
||||
## Status / TODO
|
||||
|
||||
- [ ] `Sources/MWBCore/Packet.swift`: `PackageType` (every value in
|
||||
protocol §1.2), `isBig`, `Packet` with union views.
|
||||
- [ ] `Sources/MWBCore/Framing.swift`: `seal` / `open` per §1.3.
|
||||
- [ ] `Tests/MWBCoreTests/PacketTests.swift`: offsets pinned per field,
|
||||
big/small over all 256 values, name padding/trim, non-ASCII refused.
|
||||
- [ ] `Tests/MWBCoreTests/FramingTests.swift`: hand-assembled golden
|
||||
bytes for Handshake / Mouse / Keyboard / Matrix(slot 4, both
|
||||
flags) / ClipboardText chunk; round-trip property test; bytes
|
||||
2..31 corruption detected; byte 40 corruption *not* detected.
|
||||
- [ ] `docs/protocol.md`: add any offset or rule learned; keep
|
||||
`[transcribed]` marks until interop-vectors.
|
||||
protocol §1.2, cited), `isBig`, `Packet` with the union views.
|
||||
- [ ] `Sources/MWBCore/Framing.swift`: `seal` / `open` per §1.3, each
|
||||
constant cited to `SocketStuff.cs`.
|
||||
- [ ] `docs/protocol.md`: add any offset or rule learned while porting.
|
||||
|
||||
## Work log
|
||||
|
||||
|
||||
+112
-102
@@ -3,51 +3,50 @@
|
||||
**Purpose.** How a lane goes from a brief to a merged commit, who does
|
||||
what, and the literal prompts the lead dispatches. `CLAUDE.md` states
|
||||
the rules; this file is the procedure. The lead follows it verbatim so
|
||||
that 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.
|
||||
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.
|
||||
|
||||
## 0. Roles
|
||||
|
||||
| role | model | owns | never |
|
||||
|---|---|---|---|
|
||||
| **Lead** | Fable 5.1 (this session) | trunk (`main`), wave planning, briefs, dispatch, the self-inspect review, merges, commits, pushes, `docs/topo.md` | writes lane code (bootstrap was the one exception); trusts a report it has not checked |
|
||||
| **Dev** | Opus | one lane in one worktree: code, tests, README Work log, ticks in Status/TODO and `TODO.md` | commits; touches files outside the brief's list; asks for permissions |
|
||||
| **QA** | Sonnet | the same worktree after Dev: verification, attack tests, README QA log, a verdict | redesigns; edits anything but tests, the QA log and small unambiguous fixes it records |
|
||||
| **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 |
|
||||
| **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 |
|
||||
|
||||
"Self inspect" is the lead's review: the lead reads the diff with its own
|
||||
eyes and runs the gates itself before writing the Review section. A
|
||||
green QA verdict is evidence, not a decision.
|
||||
"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.
|
||||
|
||||
## 1. Lifecycle of a lane
|
||||
## 1. Lifecycle of a lane (strictly serial)
|
||||
|
||||
1. **Pick the wave.** `docs/topo.md` §3 says which two lanes may run
|
||||
together. Anything not in that table runs alone.
|
||||
2. **Write the brief** on `main`: `docs/features/<name>/README.md` with
|
||||
1. **Write the brief** on `main`: `docs/features/<name>/README.md` with
|
||||
Goal, Assumptions, Handshakes and a Status/TODO whose items name
|
||||
their files (template: `docs/features/TEMPLATE.md`). The file list
|
||||
*is* the merge contract. Commit as `brief: <name>`.
|
||||
3. **Open the lane**: `tools/lane.sh new <name>` → worktree at
|
||||
`../mwb-lanes/<name>` on branch `lane/<name>`.
|
||||
4. **Dispatch Dev** with the prompt in §3, `cwd` = the worktree. Dev
|
||||
finishes only when `tools/gates.sh` is green in the worktree.
|
||||
5. **Dispatch QA** with the prompt in §4, same worktree. Verdict is
|
||||
`PASS` or `REWORK` with file:line findings.
|
||||
6. **On REWORK**, dispatch Dev again with the QA log as input. At most
|
||||
their files (template: `docs/features/TEMPLATE.md`). Commit as
|
||||
`brief: <name>`.
|
||||
2. **Open the lane**: `tools/lane.sh new <name>` → worktree at
|
||||
`../mwb-lanes/<name>` on branch `lane/<name>`. (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
|
||||
deferred, and `tools/gates.sh` is green on the final commit.
|
||||
4. **Dispatch QA** (§4), same worktree. 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 the brief and restarts the lane.
|
||||
7. **Self-inspect** (§5). Write the Review section. If review finds a
|
||||
defect, it goes back to step 4 as a rework with the review text as
|
||||
the finding.
|
||||
8. **Merge**: on `main`, `git merge --no-ff lane/<name>`, run
|
||||
`tools/gates.sh` on the merged tree, update `docs/topo.md` for any
|
||||
edge the lane added or amended, tick the wave line in `TODO.md`,
|
||||
commit, push, `tools/lane.sh done <name>`, delete the branch.
|
||||
9. **Log the wave** in §8 of this file: dates, rework count, what the
|
||||
brief got wrong.
|
||||
|
||||
Two lanes in flight follow the same steps independently. Their merges
|
||||
are sequential; the second lane's merge re-runs gates on a trunk that
|
||||
already contains the first.
|
||||
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/<name>`, 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 <name>`, delete the branch.
|
||||
8. **Log the lane** in §8: dates, rework count, what the brief got wrong.
|
||||
9. Only now write the next brief.
|
||||
|
||||
## 2. What a brief must contain
|
||||
|
||||
@@ -57,10 +56,11 @@ already contains the first.
|
||||
make. If the lead cannot write this section, the lane is not ready.
|
||||
- **Handshakes / Promised**: the public API sketched in Swift, marked
|
||||
"may change during the lane; README updated in the same change".
|
||||
- **Handshakes / Consumed**: which other lanes' APIs it uses, by README
|
||||
reference, never by reading their source for undocumented behaviour.
|
||||
- **Handshakes / Consumed**: which earlier lanes' APIs it uses, by
|
||||
README reference.
|
||||
- **Status / TODO**: 4–8 checkbox items, each naming the file(s) it
|
||||
touches. The union of those files is the ownership list.
|
||||
touches and the Windows behaviour it ports. The union of those files
|
||||
is the ownership list.
|
||||
- **Citations**: every fact from the Windows source as
|
||||
`App/<path>.cs:<line>`, matching `docs/protocol.md`.
|
||||
|
||||
@@ -73,19 +73,25 @@ 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
|
||||
set of files you may create or edit, plus: docs/features/<name>/README.md
|
||||
(Assumptions, Handshakes, Status/TODO, Work log), TODO.md (tick your own
|
||||
lines only), docs/protocol.md (append citations you verified, in your
|
||||
lane's own subsection), docs/perf/README.md (append measurements).
|
||||
lines only) and docs/protocol.md (append citations you verified, in your
|
||||
lane's own subsection).
|
||||
|
||||
Rules that end a lane if broken: CLAUDE.md invariants 1–5; no git commit;
|
||||
no file outside the list — write a Handshake request in your README and
|
||||
stop that item instead; every test run through tools/guard.sh; never set
|
||||
MWB_ALLOW_INPUT_TESTS.
|
||||
This is a port: read the Windows source at
|
||||
/Users/guoliangchen/repo/PowerToys/src/modules/MouseWithoutBorders/App/
|
||||
for every behaviour you implement and cite the line in a comment next
|
||||
to each constant and each non-obvious rule. Port behaviour, not shape.
|
||||
|
||||
Done means: every Status/TODO item ticked or explicitly marked "not done,
|
||||
deliberately: <why>"; tools/gates.sh exits 0 in this worktree; the Work
|
||||
log has a dated entry with decisions and deviations; any API change is
|
||||
reflected in Handshakes. Report: what you built, what you deviated from,
|
||||
open handshake requests, and the gates.sh tail.
|
||||
Do not write test suites — the user tests the app. Commit as you go with
|
||||
small, clearly named commits; a commit need not compile. Do not push.
|
||||
Rules that end a lane if broken: CLAUDE.md invariants 1–5; no file
|
||||
outside the list — write a Handshake request in your README and stop
|
||||
that item instead; never post input events or touch the real pasteboard.
|
||||
|
||||
Done means: every Status/TODO item ticked or marked "not done,
|
||||
deliberately: <why>"; tools/gates.sh exits 0 on your last commit; the
|
||||
Work log has a dated entry with decisions and deviations; any API change
|
||||
is reflected in Handshakes. Report: what you ported, what you deviated
|
||||
from, open handshake requests, and the gates.sh tail.
|
||||
```
|
||||
|
||||
## 4. QA prompt (dispatch verbatim)
|
||||
@@ -96,78 +102,82 @@ You are QA for lane `<name>` of mwb-mac, in worktree <absolute path>
|
||||
docs/features/<name>/README.md (all sections), then the diff:
|
||||
git diff main...HEAD.
|
||||
|
||||
Verify, do not redesign. In order: (1) run tools/gates.sh yourself;
|
||||
(2) check each Status/TODO tick against the code and tests — a tick with
|
||||
no test is a finding; (3) check every protocol claim in the code against
|
||||
docs/protocol.md and, where cited, the Windows source at
|
||||
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;
|
||||
(2) for each Status/TODO tick, find the code that implements it and
|
||||
compare against the Windows source at
|
||||
/Users/guoliangchen/repo/PowerToys/src/modules/MouseWithoutBorders/App/
|
||||
— a mismatch is a finding with both file:line references; (4) try to
|
||||
break it: malformed bytes, boundary sizes, wrong key, empty/oversized
|
||||
input, concurrency where the API is Sendable; add the attack as a test in
|
||||
the lane's test files; (5) check CLAUDE.md file/function size limits and
|
||||
the layering test; (6) confirm nothing logs key material.
|
||||
— a behaviour the Windows version has that the port silently lacks, or
|
||||
a constant/offset/rule that differs from docs/protocol.md, is a finding
|
||||
with both file:line references; (3) read every changed file top to
|
||||
bottom for readability: CLAUDE.md size limits, layering, naming, force
|
||||
unwraps, dead code, comments that cite nothing; (4) confirm nothing logs
|
||||
key material and nothing acts on a packet before framing + decrypt.
|
||||
|
||||
You may fix only typos and missing assertions, and must note each fix in
|
||||
the QA log. Everything else is a finding: file:line, reproduction, and
|
||||
what you expected. Write a dated QA log entry ending with a verdict line
|
||||
`Verdict: PASS` or `Verdict: REWORK` and the findings list. Never set
|
||||
MWB_ALLOW_INPUT_TESTS; every test run goes through tools/guard.sh.
|
||||
Report the verdict and the findings.
|
||||
You may fix only typos and trivially wrong comments, committing each
|
||||
with a message starting `qa:` and noting it in the QA log. Everything
|
||||
else is a finding: file:line, what the Windows source does, what the
|
||||
port does. Write a dated QA log entry ending with `Verdict: PASS` or
|
||||
`Verdict: REWORK` and the findings list. Commit the README. Report the
|
||||
verdict and the findings.
|
||||
```
|
||||
|
||||
## 5. Lead self-inspect checklist
|
||||
## 5. Lead inspection checklist
|
||||
|
||||
Run in the worktree, by the lead, before writing Review:
|
||||
|
||||
- [ ] `tools/gates.sh` green, run by me.
|
||||
- [ ] `git diff main...HEAD --stat`: only files in the brief's list (plus
|
||||
the shared-by-nature files, in the lane's own sections).
|
||||
- [ ] `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
|
||||
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.
|
||||
- [ ] Invariant 1: golden bytes come from a fixture or a hand assembly
|
||||
in the test, never from the encoder under test.
|
||||
- [ ] Invariant 2: no code path acts on a packet before framing + decrypt
|
||||
succeed; no `print`/`Logger` call includes key, salt, IV or keystrokes.
|
||||
- [ ] Completeness: walk the Windows feature's behaviours (the brief's
|
||||
Status/TODO plus the cited source) and confirm each is present or
|
||||
deliberately deferred with a reason.
|
||||
- [ ] Invariant 2: no code path acts on a packet before framing +
|
||||
decrypt succeed; no log line includes key, salt, IV or keystrokes.
|
||||
- [ ] Invariants 3–5 where the lane touches `MWBMac`.
|
||||
- [ ] File sizes under 600 production lines; functions under 50 unless
|
||||
commented; no `!`, `try!`, `fatalError` in `Sources/`.
|
||||
- [ ] Handshakes section matches the code's public API; any change is
|
||||
also in the Work log.
|
||||
- [ ] The QA log's findings are each resolved in the Work log or
|
||||
explicitly deferred with a TODO line.
|
||||
- [ ] `TODO.md` ticks are only this lane's lines.
|
||||
- [ ] Size limits; no `!`, `try!`, `fatalError` in `Sources/`.
|
||||
- [ ] Handshakes match the code's public API; changes are in the Work log.
|
||||
- [ ] Each QA finding is resolved in the Work log or deferred with a
|
||||
TODO line.
|
||||
|
||||
Write `## Review` with the date, verdict (merge / rework), and what to
|
||||
carry into the next brief. The Review section is the only place the lead
|
||||
writes in a lane's README.
|
||||
carry into the next brief.
|
||||
|
||||
## 6. Wave schedule
|
||||
## 6. Lane order
|
||||
|
||||
| wave | lanes | gate to start | status |
|
||||
|---|---|---|---|
|
||||
| 0 | bootstrap | — | merged 2026-09-15 (lead, solo) |
|
||||
| 1 | packet-codec ‖ cipher-stream | wave 0 merged | briefs written; not dispatched |
|
||||
| 2 | session ‖ matrix-edge | wave 1 merged | briefs to write |
|
||||
| 3 | control-channel ‖ event-tap | wave 2 merged | briefs to write |
|
||||
| 4 | input-inject ‖ screens-cursor | wave 3 merged; screens-cursor README published first (topo handshake 6) | |
|
||||
| 5 | clipboard-inband ‖ menubar-app | wave 4 merged | |
|
||||
| 6 | clipboard-bulk ‖ interop-vectors | wave 5 merged; interop-vectors needs a Windows machine (§7) | |
|
||||
| 7 | end-to-end, then soak | wave 6 merged; needs real devices and `MWB_ALLOW_INPUT_TESTS=1` with the user present | |
|
||||
Strictly one at a time, in this order (from `docs/topo.md` §3):
|
||||
|
||||
| # | lane | status |
|
||||
|---|---|---|
|
||||
| 0 | bootstrap | merged 2026-09-15 (lead, solo) |
|
||||
| 1 | packet-codec | brief written |
|
||||
| 2 | cipher-stream | brief written |
|
||||
| 3 | session | |
|
||||
| 4 | matrix-edge | |
|
||||
| 5 | control-channel | |
|
||||
| 6 | event-tap | |
|
||||
| 7 | screens-cursor | |
|
||||
| 8 | input-inject | |
|
||||
| 9 | menubar-app | — first user-testable milestone: two Macs, or Mac ↔ Windows, mouse and keyboard |
|
||||
| 10 | clipboard-inband | |
|
||||
| 11 | clipboard-bulk | |
|
||||
| 12 | end-to-end polish | driven by the user's testing findings |
|
||||
|
||||
## 7. Escalations — things only the user can do
|
||||
|
||||
- **Grant permissions** (Accessibility, Input Monitoring) to
|
||||
`dist/mwb.app` in System Settings, and create the self-signed
|
||||
`MWB_SIGN_IDENTITY` once (`tools/bundle.sh` header).
|
||||
- **Provide a Windows machine** with PowerToys for `interop-vectors`
|
||||
(or a packet capture of a Windows↔Windows session plus its key).
|
||||
- **Be present** for any run with `MWB_ALLOW_INPUT_TESTS=1`; the lead
|
||||
says so in the report before dispatching such a step.
|
||||
- **Approve pushes** of anything beyond the merge of a reviewed lane.
|
||||
- **Test the app.** After lane 9 and after every lane thereafter the
|
||||
lead hands the user a `dist/mwb.app` and a short checklist of what
|
||||
changed; findings come back as TODO lines for the next lane.
|
||||
- **Provide a Windows machine** with PowerToys for real interop checks.
|
||||
|
||||
## 8. Wave log
|
||||
## 8. Lane log
|
||||
|
||||
- **2026-09-15, wave 0 (bootstrap)** — done by the lead alone at the
|
||||
user's request. No Dev/QA round. What the brief got wrong: nothing
|
||||
yet; the toolchain assumption (Xcode required) held. `swift-format`
|
||||
is not on `PATH` — the gate calls it through `xcrun`.
|
||||
- **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
|
||||
instruction at the top of this file; loop rewritten to match.
|
||||
+38
-28
@@ -2,10 +2,9 @@
|
||||
|
||||
**Purpose.** The map an agent reads before touching anything: which
|
||||
targets depend on which, which features consume which, and where the two
|
||||
graphs meet. It exists to make parallel multi-agent development safe —
|
||||
every edge below is an interface somebody can break. An absent edge is
|
||||
only a candidate for independent work: confirm imports, shared files and
|
||||
open handshakes before assigning ownership.
|
||||
graphs meet. It exists so each lane starts only after everything it
|
||||
consumes is merged, and so the lead knows which interfaces a lane can
|
||||
break — every edge below is one.
|
||||
|
||||
Sources of truth this document is derived from (and defers to on
|
||||
conflict): `Package.swift`, each `docs/features/<name>/README.md`
|
||||
@@ -83,16 +82,13 @@ lead's; a lane needing a change there files a Handshake request.
|
||||
|
||||
## 2. Feature dependency graph
|
||||
|
||||
### 2.1 Milestone order (sequencing, `─▶`)
|
||||
### 2.1 Lane order (sequencing, `─▶`)
|
||||
|
||||
```
|
||||
bootstrap ─▶ { packet-codec ‖ cipher-stream }
|
||||
─▶ { session ‖ matrix-edge }
|
||||
─▶ { control-channel ‖ event-tap }
|
||||
─▶ { input-inject ‖ screens-cursor }
|
||||
─▶ { clipboard-inband ‖ menubar-app }
|
||||
─▶ { clipboard-bulk ‖ interop-vectors }
|
||||
─▶ end-to-end ─▶ soak
|
||||
bootstrap ─▶ packet-codec ─▶ cipher-stream ─▶ session ─▶ matrix-edge
|
||||
─▶ control-channel ─▶ event-tap ─▶ screens-cursor ─▶ input-inject
|
||||
─▶ menubar-app (first user-testable build)
|
||||
─▶ clipboard-inband ─▶ clipboard-bulk ─▶ end-to-end polish
|
||||
```
|
||||
|
||||
### 2.2 Consumption edges (`──▶`)
|
||||
@@ -109,13 +105,14 @@ bootstrap ─▶ { packet-codec ‖ cipher-stream }
|
||||
| clipboard-inband | packet-codec | 64-byte chunk packets |
|
||||
| clipboard-bulk | cipher-stream, packet-codec, clipboard-inband | stream layout, `DATA`, header/text format |
|
||||
| menubar-app | every `MWBCore` type, control-channel, event-tap, screens-cursor | wiring |
|
||||
| interop-vectors | packet-codec, cipher-stream, clipboard-inband | fixtures are tests for these |
|
||||
| end-to-end | all | |
|
||||
|
||||
### 2.3 Handshakes (`◀──▶`) — all open at planning time
|
||||
|
||||
Numbered so lanes can cite them. A lane that needs one not listed here
|
||||
files it in its README and flags it in its report; the lead adds it.
|
||||
Numbered so lanes can cite them. With serial lanes a handshake is simply
|
||||
"the earlier lane publishes, the later lane consumes as published"; the
|
||||
list still matters because it names the APIs the lead checks at
|
||||
inspection.
|
||||
|
||||
1. **packet-codec ◀──▶ session**: the `Packet` API shape (value type
|
||||
with typed union views, `Data` in/out). packet-codec proposes in its
|
||||
@@ -141,19 +138,32 @@ files it in its README and flags it in its report; the lead adds it.
|
||||
8. **menubar-app ◀──▶ everyone**: `Settings` is the one struct passed
|
||||
down; lanes read fields, never the file.
|
||||
|
||||
## 3. Which pairs may run in parallel
|
||||
## 3. Lane order
|
||||
|
||||
Proven independent by disjoint files **and** no edge above:
|
||||
Lanes run **one at a time** (CLAUDE.md, the user's standing
|
||||
instruction), so this section is an order, not a parallelism proof. The
|
||||
order follows the consumption edges in §2.2: nothing is started before
|
||||
everything it consumes is merged.
|
||||
|
||||
| wave | lane A | lane B | shared files |
|
||||
|---|---|---|---|
|
||||
| 1 | packet-codec | cipher-stream | none (both create their own files; `Package.swift` untouched) |
|
||||
| 2 | session | matrix-edge | none; both consume packet-codec read-only |
|
||||
| 3 | control-channel | event-tap | none; different targets |
|
||||
| 4 | input-inject | screens-cursor | **edge 6** — screens-cursor publishes its API in its README first; input-inject codes against the README. Acceptable only because the API is two rectangles. |
|
||||
| 5 | clipboard-inband | menubar-app | `Settings.swift` is menubar-app's; clipboard reads `ShareClipboard` via a constructor parameter, not the struct |
|
||||
| 6 | clipboard-bulk | interop-vectors | `Tests/Fixtures/` is interop-vectors'; bulk adds tests under `Tests/MWBNetTests/` only |
|
||||
| # | lane | consumes (must be merged first) |
|
||||
|---|---|---|
|
||||
| 1 | packet-codec | bootstrap |
|
||||
| 2 | cipher-stream | bootstrap |
|
||||
| 3 | session | packet-codec, cipher-stream |
|
||||
| 4 | matrix-edge | packet-codec |
|
||||
| 5 | control-channel | session, cipher-stream, packet-codec |
|
||||
| 6 | event-tap | matrix-edge |
|
||||
| 7 | screens-cursor | matrix-edge |
|
||||
| 8 | input-inject | event-tap (KeyMap), matrix-edge, screens-cursor |
|
||||
| 9 | menubar-app | all of the above — the first build the user can test |
|
||||
| 10 | clipboard-inband | packet-codec, menubar-app (Settings) |
|
||||
| 11 | clipboard-bulk | cipher-stream, packet-codec, clipboard-inband |
|
||||
| 12 | end-to-end polish | everything; driven by the user's testing |
|
||||
|
||||
Anything not in this table runs serially. `TODO.md`, `docs/protocol.md`
|
||||
and `docs/perf/README.md` are shared-by-nature: append in your own
|
||||
section only.
|
||||
`interop-vectors` is no longer a lane: there are no test suites. If a
|
||||
Windows machine becomes available, the lead verifies protocol facts by
|
||||
hand against a capture and flips `[transcribed]` marks in
|
||||
`docs/protocol.md`.
|
||||
|
||||
`TODO.md`, `docs/protocol.md` and `docs/perf/README.md` are
|
||||
shared-by-nature: append in your own section only.
|
||||
Reference in new issue
Block a user