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:
lucioandClaude Fable 5.1 committed 2026-09-15 23:55:41 -07:00
1 parent 671b3dfa61
commit 87aeee6f93
15 files changed
+391 -617

No files matched your search

+15 -22
View File
@@ -1,32 +1,25 @@
#!/usr/bin/env bash
# The definition of "done" for every lane (CLAUDE.md, Swift standards):
# The definition of "done" for a lane's final commit (CLAUDE.md, Swift
# standards). No test suites by the user's instruction — the user tests.
# 1. swift-format lint --strict is clean
# 2. swift build with warnings as errors is clean
# 3. swift test is green, under the runaway guard
# Exit 0 only if all three pass. Run from anywhere; operates on the repo
# that contains this script (so it works inside a lane worktree).
#
# Usage: tools/gates.sh [--no-test]
# 2. MWBCore imports only Foundation / CommonCrypto / CryptoKit (README D2)
# 3. swift build with warnings as errors is clean
# Exit 0 only if all pass. Operates on the repo containing this script,
# so it works inside a lane worktree.
set -euo pipefail
root=$(cd "$(dirname "$0")/.." && pwd)
cd "$root"
run_tests=1
[ "${1:-}" = "--no-test" ] && run_tests=0
echo "== gate 1/3: swift-format lint --strict"
xcrun swift-format lint --strict --recursive Sources Tests Package.swift
xcrun swift-format lint --strict --recursive Sources Package.swift
echo "== gate 2/3: swift build -Xswiftc -warnings-as-errors"
swift build -Xswiftc -warnings-as-errors 2>&1 | grep -v '^\[' || true
# grep swallows the exit status; re-check with a cheap incremental build.
swift build -Xswiftc -warnings-as-errors >/dev/null
if [ "$run_tests" = 1 ]; then
echo "== gate 3/3: swift test (guarded: 8 GB / 15 min)"
# pipefail is set, so a guard kill or a failing test fails this line.
tools/guard.sh -m 8 -t 900 -- swift test 2>&1 | grep -E "Executed|error:|failed|passed after" | tail -20
else
echo "== gate 3/3: skipped (--no-test)"
echo "== gate 2/3: MWBCore layering"
if grep -rnE '^\s*import (AppKit|Cocoa|CoreGraphics|Carbon|SwiftUI|Network|IOKit|ApplicationServices)\b' Sources/MWBCore; then
echo "gates: MWBCore may import only Foundation, CommonCrypto and CryptoKit (README D2)" >&2
exit 1
fi
echo "== gate 3/3: swift build -Xswiftc -warnings-as-errors"
swift build -Xswiftc -warnings-as-errors 2>&1 | grep -v '^\[' || true
swift build -Xswiftc -warnings-as-errors >/dev/null
echo "== gates: all green"