Planning documents only: CLAUDE.md rules, README with decisions and architecture, docs/protocol.md transcribed from the Windows source with citations, docs/topo.md, TODO.md milestones and the first-wave feature briefs (bootstrap, packet-codec, cipher-stream), plus tools/guard.sh. Co-Authored-By: Claude Fable 5.1 <[email protected]>
3.3 KiB
3.3 KiB
bootstrap
Goal
Turn the empty repository into a building, testing SwiftPM package with
the three-target layering from README D2, the done gate script and the
.app bundler — and, first of all, establish whether swift build
works on this machine at all. Nothing in later lanes can start until
tools/gates.sh passes on an empty skeleton.
Assumptions
- The SwiftPM breakage is the toolchain, not the manifest. Measured
2026-09-15: Command Line Tools only (
/Library/Developer/CommandLineTools, Swift 6.4, macOS 27.0, no Xcode.app). A trivial manifest fails to link withswift-tools-version5.9 and 6.0 alike;libPackageDescription.dylibexportsPackage.init(… swiftLanguageVersions: [SwiftLanguageMode]? …)while the compiled manifest references[SwiftVersion]?. Purging~/Library/Caches/org.swift.swiftpmdid not help.swiftccompiles and links an AppKit + CryptoKit program fine. The CLT ships Swift Testing but noXCTest.framework. - Installing Xcode.app fixes both. It carries its own SwiftPM and
XCTest. If the user prefers not to, the fallback is a
Makefiledrivingswiftcper target plus Swift Testing (import Testing) run viaswift-testing's console runner — recorded here only if needed. - Minimum macOS 14.
CGPreflightListenEventAccessand friends exist since 10.15; 14 is chosen for Swift 6 concurrency andNWListenermaturity, not for a specific API. - Bundle id
com.luciochen.mwb-mac;LSUIElement = true(menu-bar app, no Dock icon). A self-signed "mwb-mac dev" code-signing certificate is created once by the user via Keychain Access;tools/bundle.shreads its name fromMWB_SIGN_IDENTITYand refuses to sign ad-hoc unlessMWB_ADHOC=1is set explicitly (D5).
Handshakes
Promised
Package.swifttarget namesMWBCore,MWBNet,MWBMac,mwb,MWBCoreTests,MWBNetTestsare frozen; later lanes add files, not targets, without a handshake here.tools/gates.shexit status is the definition of "done" for every lane: 0 means format-clean, warning-free, tests green under the guard.MWBCoreTests/LayeringTests.swiftgrepsSources/MWBCoreforimport (AppKit|CoreGraphics|Network|Cocoa)and fails on any hit (topo.md §1 standing promise).
Consumed
tools/guard.sh(already present; copied from lucisv, header adapted).
Status / TODO
- Report the toolchain state to the user and wait for Xcode.
Xcode 27.0 (27A266a) installed 2026-09-15;
xcode-select -pis/Applications/Xcode.app/Contents/Developer. Package.swift, empty targets with one placeholder type each,Tests/MWBCoreTests/LayeringTests.swift.tools/gates.sh,.swift-format.tools/bundle.sh+Resources/Info.plist.mwb --version,mwb --check-permissions.tools/gates.shgreen; record Swift/Xcode versions in the work log.
Work log
- 2026-09-15 (lead, planning): toolchain probed; findings in Assumptions. No code written.
- 2026-09-15 (lead): after the user installed Xcode 27.0, the same smoke
package (executable importing AppKit + CryptoKit + CommonCrypto, one
XCTest case,
swift-tools-version:6.0) built in 8 s and the test passed underswift test. The Assumptions above stay as the record of why Xcode is a requirement; the fallback Makefile is not needed.