Skip to content

Split architecture docs: move pipeline details to ARCHITECTURE.md - #379

Merged
alexkroman merged 11 commits into
mainfrom
claude/sweet-turing-d9y297
Nov 25, 2026
Merged

alexkroman merged 11 commits into
mainfrom
claude/sweet-turing-d9y297

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

What & why

Splits the monolithic AGENTS.md into two focused documents:

  • AGENTS.md (now ~57 lines): Repository map and settled decisions — the "don't reintroduce this" reference for all agents
  • ARCHITECTURE.md (new, ~1207 lines): Deep dives into how each subsystem works — the pipeline, app shell, and design rationale

This mirrors the existing split between CLAUDE.md (Claude-specific tooling) and AGENTS.md (tool-agnostic guidance). Agents now have a clear path: start with AGENTS.md for the map and constraints, then consult ARCHITECTURE.md for implementation details.

Updates all cross-references throughout the repo (.claude/skills/check/SKILL.md, CONTRIBUTING.md, CLAUDE.md, App/Blurt/project.yml, README.md) to point to the new home.

Also adds --lint-only mode to scripts/check.sh and CI's check.yml to support evals-only changes (prompt harnesses, scorers) that can't affect the Swift build — they now skip the ~37-minute macOS jobs and run only linting (ruff + pytest).

How it was tested

  • scripts/check.sh passes (or CI will, if I'm not on a Mac)
  • I read AGENTS.md and this doesn't reintroduce anything deliberately removed
  • Docs updated if behavior changed

A dictation after "(", an opening quote, "@" or "$" was pasted with a
stray space ("Call me ( Maybe"). InsertionSeparator now treats brackets,
typographic opening quotes, guillemets, inverted marks, @ and $ as
openers, and a straight quote or # as one only at the start of a word, so
closing quotes and suffixes like C# keep their separator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1TCdh36y5SEV4RzFsn
…copy

Fixes #341.

- ⌘V and ⌘C were posted on hardcoded kVK_ANSI_V/kVK_ANSI_C. macOS matches a
  ⌘ shortcut by character, so on Dvorak every paste was ⌘K (and the restore
  then took the words back), and on Turkish-F the read-aloud copy fallback
  pasted. Both are now resolved on the current ASCII-capable layout with ⌘
  held (KeyboardLayout, moved to Injection/), falling back to the US key.
  Voice-command chords read the layout with ⌘ held too when they hold it.
- KeyInjector (write, ⌘V, settle, restore) and SelectionCopy (snapshot, ⌘C,
  poll, restore) now take turns on the pasteboard through a FIFO
  PasteboardLock, so a copy can't keep a settling paste's transcript as the
  user's clipboard and a paste's restore can't land under a copy's poll.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1VN3Xe9T3rmTwrjDLC
Making postPaste async put a main-actor layout read between the final
Task.checkCancellation() and the ⌘V, so a cancel landing there no longer
stopped the paste. The key is now read through its own seam
(resolvePasteKey) ahead of the gate, and postPaste is synchronous again,
taking the key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1VN3Xe9T3rmTwrjDLC
…mer AGENTS.md

From the last 30 days of check.yml runs: every red `check` run was a
read-only check (swiftlint, jscpd, design-sync, periphery) surfacing
30-39 minutes in, and an evals-only PR ran the full Swift/iOS matrix.

- check.sh --lint-only: the read-only checks that precede the Swift
  build, then stop. check.yml's new `lint` job runs it so those
  findings turn a PR red in minutes; `check` still runs everything.
- check.yml's `changes` job adds a `swift` output: a change touching
  only docs/ and evals' Python, Markdown and ruff config skips check,
  compile, format-patch, ios-build and ios-sanitizers (lint covers
  ruff and pytest). evals/**/*.json still counts as Swift, since
  PlannerEvalTests reads cases.json. `gate` asserts lint too.
- AGENTS.md: the six reference sections (pipeline through Updates,
  ~105 KB) move to ARCHITECTURE.md, indexed from an "Architecture
  reference" section; the settled-decisions table stays put for
  check-invariants.sh. Cross-file anchors rewritten.
- CLAUDE.md, the check skill and AGENTS.md's web-sandbox notes: run
  --portable before every push, what only CI can check, push once per
  batch of fixes.
- settings.json: pre-allow --lint-only and the standalone checks;
  drop the unused `gh repo *`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1VYJRu47Ton1UnX2oL
@alexkroman
alexkroman enabled auto-merge November 24, 2026 23:03
@alexkroman
alexkroman added this pull request to the merge queue Nov 24, 2026
# Conflicts:
#	AGENTS.md
@alexkroman
alexkroman removed this pull request from the merge queue due to a manual request Nov 25, 2026
@alexkroman
alexkroman added this pull request to the merge queue Nov 25, 2026
`busy()` pressed and lifted on the wall clock with `rig.answer(.busy)`
in between. A lift is a hold once 0.35 s (defaultHoldThreshold) has
passed since the press, and a hold's lift releases. Under the address
sanitizer that gap ran past the threshold, so the test saw
[.press, .release] where a tap sends [.press]. Pin `model.now` the way
the neighbouring timing tests do.

Seen failing ios-sanitizers (address) on #379's merge
queue run, a change that touches no iPhone code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1VYJRu47Ton1UnX2oL

Copy link
Copy Markdown
Collaborator Author

ios-sanitizers (address) failed on c958dd7 in one test: KeyboardModelLatchTests.busy() ("ack busy: the press latches onto the dictation…"). It expected [.press] and got [.press, .release].

It's a timing race in that test, not something this PR caused (the PR touches no iPhone code). busy() calls micDown(), then rig.answer(.busy), then micUp(), all on the real Date() clock. micUp treats a lift as a hold once PressHandshake.defaultHoldThreshold (0.35 s) has passed, and a hold's lift sends a release. Under ASan that gap ran past 0.35 s. The neighbouring timing tests avoid this by pinning model.now = { start }; busy() never did.

The fix is to pin the clock before micDown() in App/BlurtiOS/BlurtiOSTests/KeyboardModelGateTests+Latch.swift:

    let start = Date()
    model.now = { start }
    model.micDown()

It's committed locally as 910adb7, but pushing to claude/sweet-turing-d9y297 is refused with protected branch hook declined, presumably because the branch is locked while the PR is queued or blocked. Once the branch accepts pushes again I'll push it, or anyone with access can apply the three lines above.


Generated by Claude Code

@alexkroman
alexkroman removed this pull request from the merge queue due to a manual request Nov 25, 2026
@alexkroman
alexkroman enabled auto-merge November 25, 2026 00:22
@alexkroman
alexkroman added this pull request to the merge queue Nov 25, 2026
…h the paragraph

#366 adds a sentence to the KeyInjector paragraph of AGENTS.md, which this
PR moves to ARCHITECTURE.md; the sentence goes there, and AGENTS.md stays
slimmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alexkroman
alexkroman removed this pull request from the merge queue due to a manual request Nov 25, 2026
@alexkroman
alexkroman added this pull request to the merge queue Nov 25, 2026
@alexkroman
alexkroman removed this pull request from the merge queue due to a manual request Nov 25, 2026
@alexkroman
alexkroman enabled auto-merge November 25, 2026 01:24
@alexkroman
alexkroman added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 88e2d93 Nov 25, 2026
14 checks passed
@alexkroman
alexkroman deleted the claude/sweet-turing-d9y297 branch November 25, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants