[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-93459":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":8,"pushedAt":8,"updatedAt":22,"readmeContent":23,"aiSummary":8,"trendingCount":14,"starSnapshotCount":14,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},93459,"Holo","JustinGamer191\u002FHolo","JustinGamer191",null,"Swift",414,61,1,4,0,26,145,197,89.38,false,"main",[],"2026-07-22 04:02:09","# Holo\n\nHolo is an experimental native macOS utility that turns the desk immediately around a MacBook into four assignable tap zones. It listens through the selected Mac microphone, extracts acoustic features from short impulse windows, classifies the zone locally, and runs the action assigned to that zone.\n\nThe topology is intentionally four broad zones:\n\n```text\n                  Display side\nLeft Rear      ┌─────────────┐      Right Rear\n               │   MacBook   │\nLeft Front     └─────────────┘      Right Front\n                  Trackpad side\n```\n\nHolo is a research prototype. Automated DSP tests pass, but useful accuracy still has to be measured on each real MacBook, desk, room, and laptop position. No physical accuracy claim is made without a saved 60-tap evaluation from that setup.\n\nThe requirement-by-requirement evidence ledger is in [ACCEPTANCE.md](ACCEPTANCE.md).\n\n## What is implemented\n\n- Four fixed zones: rear and front zones on each side of the MacBook.\n- Explicitly armed calibration: ten accepted examples spread across each zone, 40 total, with clear retry guidance for weak, noisy, or clipped taps.\n- A calibration-consistency check that identifies and can redo the weakest zone before saving.\n- Adaptive streaming onset detection, sustained-sound rejection, and fixed 90 ms analysis windows.\n- Passive tap acoustics, an optional active acoustic probe, and a hybrid mode.\n- Robust feature normalization, a regularized linear zone model backed by nearest-example novelty checks, ambiguity rejection, out-of-distribution rejection, and optional negative examples.\n- Per-profile actions: visual only, play a sound, copy or speak text, open a website, run a Shortcut, open an application or item, execute a shell command, or capture a screenshot. New zones default to visual-only until the user assigns a side effect.\n- Guided 60-tap held-out evaluation with per-zone accuracy, latency, rejected-tap counts, and a confusion matrix.\n- Saved evaluation history is restored after relaunch and scoped to the desk profile that produced it.\n- Signal diagnostics, labeled feature capture, approach comparison, JSON\u002FCSV reports, and opt-in raw debug WAV capture.\n- Sandboxed, local persistence. Raw audio is discarded by default.\n- Core Audio route validation requires the built-in microphone for every mode and the built-in speakers for Active or Hybrid sensing.\n\n## Requirements\n\n- macOS 14 or later.\n- Xcode 26 is recommended for the current project. The app uses Liquid Glass button styles on macOS 26 and native bordered controls on older supported systems.\n- [XcodeGen](https:\u002F\u002Fgithub.com\u002Fyonaskolb\u002FXcodeGen) to regenerate `Holo.xcodeproj` from `project.yml`.\n- A MacBook with its built-in microphone selected. External inputs are rejected rather than silently changing the calibrated signal path.\n- Active and Hybrid sensing additionally require MacBook Speakers as the selected output. Passive sensing does not emit a probe.\n\n## Build\n\nGenerate the Xcode project after changing `project.yml`:\n\n```sh\nxcodegen generate\n```\n\nThen open `Holo.xcodeproj`, select the `Holo` scheme, and run it on My Mac. A new install requests microphone permission when calibration begins or when the user explicitly presses Resume; it does not prompt merely because the window opened.\n\nUse Xcode's normal **Sign to Run Locally** build when launching Holo. `CODE_SIGNING_ALLOWED=NO` is only for non-GUI verification; its stripped bundle lacks the audio-input entitlement and should not be launched. An ad-hoc local build may still need consent again after its binary changes; selecting an Apple Development team gives macOS a stable signing identity across rebuilds. Within one build, Holo coalesces concurrent microphone starts and authorization requests, and its bundle prohibits duplicate app instances.\n\nA non-signing command-line build is useful for CI or local verification:\n\n```sh\nxcodebuild \\\n  -project Holo.xcodeproj \\\n  -scheme Holo \\\n  -configuration Debug \\\n  -derivedDataPath \u002Ftmp\u002FHoloDerived \\\n  CODE_SIGNING_ALLOWED=NO \\\n  build\n```\n\n## Calibration\n\n1. Put the MacBook where it will remain during use. Moving or rotating it changes the acoustic path and invalidates the profile.\n2. Open Calibration and describe the desk, surface, and MacBook position.\n3. Keep Passive tap acoustics selected unless Diagnostics has compared the approaches on this exact setup.\n4. Begin calibration. Holo prepares and arms the highlighted zone automatically.\n5. Wait for Preparing to change to Listening, then make ten natural taps with a short pause between them. Spread the taps around the highlighted area instead of repeating one exact point.\n6. Weak, masked, or clipped taps are not added; Holo explains whether to tap more firmly, wait for quiet, or use a lighter touch.\n7. The zone disarms after ten accepted samples. Move to the next highlighted zone during the short transition; Holo arms it automatically. Sounds made during the transition are ignored. If listening is paused, use the visible Arm control after resuming.\n8. Use Undo for the latest sample or Redo Zone if a set was inconsistent.\n9. Review the leave-one-out calibration agreement. If it is weak, redo the identified zone before saving.\n10. Save the 40-sample profile and assign its four actions.\n\nTalking, typing, touching the laptop, and room noise can be collected as negative examples after the four zones are complete. Talking is recommended: speak normally for a few seconds and Holo records only speech peaks that get past the impact gate. Negative examples intentionally do not have to pass the clean-tap quality gate. Only their feature vectors are persisted unless raw debug recording is separately enabled.\n\nProfiles from the obsolete six-zone and nine-zone topologies are intentionally ignored. Recalibrate rather than trying to reinterpret old samples as new physical zones.\n\nWhile calibration, an accuracy test, or a sensing comparison is active, unrelated sidebar destinations and profile switching are disabled. Cancel or finish the guided capture first. Pausing the microphone disarms every pending capture, including rejection training. Changing profiles never turns a paused microphone back on; explicitly starting a guided capture does resume it.\n\n## Assigning actions\n\nActions contains exactly four rows grouped by side. Changes save to the selected profile as they are made, and each configured action has an inline Test button.\n\n- Visual only highlights the accepted zone without a side effect.\n- Play sound uses an available macOS system sound.\n- Copy text writes the configured text to the pasteboard.\n- Speak text uses the local speech synthesizer.\n- Open website accepts HTTP or HTTPS addresses.\n- Run Shortcut opens the named Shortcut through the system Shortcuts URL scheme.\n- Open or focus app stores an app-scoped security bookmark for the application selected by the user.\n- Open file or folder stores an app-scoped security bookmark for a user-selected item.\n- Run shell command executes the configured command through `\u002Fbin\u002Fzsh` with Holo's sandbox permissions.\n- Screenshot to clipboard captures the full display without saving a file.\n- Select screenshot to clipboard invokes the standard interactive area-selection tool.\n\nActions run only for an accepted classification while Desk is selected. Calibration, profile editing, diagnostics, accuracy reports, and the Actions editor suppress automatic side effects; the editor's inline Test button remains explicit. Rejected, ambiguous, weak, clipped, or out-of-distribution events do not trigger an action. Shell commands run automatically once assigned, so commands should be safe to repeat and should not depend on an interactive terminal. macOS may request access when an action first opens a protected item or captures the screen. A Shortcut is the recommended way to compose multi-step workflows such as opening Claude and beginning a user-defined voice flow.\n\n## Supported surfaces\n\nThe practical target is a stable, rigid desk where taps create repeatable resonances: solid wood, engineered wood, laminate, and similarly rigid tops are the best candidates. Glass, metal, hollow-core, very large, mechanically coupled, or heavily damped desks are experimental and require their own measured profile. Soft mats, moving laptop stands, and desks that shift under normal use are not supported assumptions.\n\nSupport is determined by a completed accuracy test on the exact setup, not by material name alone. No desk material is declared supported globally.\n\n## Evaluation\n\nEvaluation is separate from calibration and uses new taps. It guides fifteen taps per zone, 60 total. Each zone must be armed, preventing movement and interface sounds from being counted before the user is ready. A detected event made while armed is included even if the classifier rejects it; rejected taps therefore count as incorrect. Response latency runs from the audio tap buffer's monotonic `AVAudioTime` host timestamp through feature extraction, the main-thread handoff, and classification.\n\nThe prototype acceptance targets are:\n\n- At least 80% overall accuracy over a balanced 60-tap session.\n- Median response latency below 200 ms.\n- No crashes or unbounded memory growth during a 30-minute run.\n\nThe app saves each completed evaluation as JSON and CSV. Reports include per-zone accuracy, the four-by-four confusion matrix, a rejected column, confidence, and response latency. The newest saved report for the selected profile is restored after relaunch; reports from another desk are never shown as the current result. Reports from an obsolete topology are skipped. If either file cannot be saved, the screen identifies the result as memory-only. Invalid host-clock timestamps are exported as `INVALID` and prevent the latency target from passing. Calibration cross-validation is shown only as a diagnostic; it is not a substitute for held-out evaluation.\n\n## Sensing approaches\n\nPassive tap acoustics is the default and does not play sound. The feature extractor combines temporal shape, frequency bands, log-mel\u002FMFCC-style coefficients, and any spatial differences exposed by the selected input channels.\n\nActive acoustic probe emits a low-amplitude 15.5–21 kHz chirp every 120 ms and adds response-correlation features. Hybrid combines both feature sets. Laptop speakers, microphones, sample rates, hearing ranges, and desk geometry vary, so the probe may be filtered, ineffective, or faintly audible. It is never assumed to outperform passive sensing.\n\nBefore capture starts, Holo reads the default Core Audio input\u002Foutput transport types. The built-in microphone is mandatory; Active and Hybrid also require built-in speaker output. A route change that violates this policy stops capture and the probe immediately.\n\nThe bottom status bar explicitly says when the speaker probe is active.\n\nOnset detection begins with a 0.75-second room-learning period, then adapts its noise floor while requiring a short, high-contrast onset. A second gate reviews the complete 90 ms candidate and rejects events whose effective duration, late energy, and weak early concentration clearly resemble sustained speech. Rejected sustained events also update the adaptive floor during their refractory period, preventing conversation from repeatedly re-arming capture. A separate low-pass path keeps the high-frequency probe from triggering its own capture. Accepted windows retain the untouched full-band channels for active-response feature extraction.\n\nDiagnostics can collect three taps per zone for each approach—36 samples total—and compare leave-one-out accuracy and DSP processing latency. Every set is explicitly armed. The highest measured score becomes the suggested strategy for the next calibration, but the result is bound to the desk profile on which it was measured and cannot silently influence another profile.\n\n## Architecture\n\n```text\nAVAudioEngine input\n  → adaptive impulse detector\n  → 90 ms multichannel window\n  → full-event impact \u002F sustained-sound gate\n  → passive \u002F active feature extraction\n  → regularized zone model + nearest-example rejection gates\n  → accepted four-zone decision\n  → local action dispatcher\n```\n\n- `Sources\u002FHoloCore` contains the guided capture protocols, detector, FFT and feature extraction, classifier, persistence models, diagnostics, evaluation reporting, and WAV writer. It has no SwiftUI dependency.\n- `Sources\u002FHoloApp` contains audio capture, app state, local action dispatch, and the native SwiftUI interface.\n- `Sources\u002FHoloSoak` is a non-GUI synthetic DSP stress runner.\n- `Sources\u002FHoloRouteCheck` is a non-GUI check of the current Core Audio input\u002Foutput transport policy.\n- `Tests\u002FHoloCoreTests` covers guided session totals and ordering, guided-capture quality gates, adaptive room-noise rejection, microphone-request coalescing, the chunked detector-to-classifier pipeline, injected active-probe recovery, shared-spectrum analysis, hardware-route policy, validated local-action planning, negative and ambiguity rejection, evaluation history, strict profile persistence, WAV output, and the exact four-zone topology.\n\nEach detected window uses one shared power spectrum for classification, active-response bands, and diagnostics rather than repeating the same FFT. Capture generations discard observations queued by an audio route or strategy that has already been stopped.\n\nThe interface rationale and source research are in [DESIGN.md](DESIGN.md). The central rule is that system materials and Liquid Glass support navigation and controls; they are not decoration for content. The desk map uses two continuous two-zone rails instead of four floating cards. The UI deliberately avoids neon gradients, bento metric cards, excessive rounded containers, filler metrics, and continuous ornamental motion.\n\n## Privacy and storage\n\nAudio processing happens on the Mac. Holo does not upload audio, features, profiles, or reports. An assigned website or application action can of course open that external destination.\n\nBy default:\n\n- The detector retains only enough in-memory audio for pre-roll and one 90 ms analysis window.\n- Raw windows are discarded after feature extraction.\n- Profiles store feature vectors and classifier parameters, not recordings.\n- Debug recording starts disabled on every launch.\n\nHolo uses one application window because there is one microphone engine and one guided-session state. Closing that window terminates Holo, preventing microphone capture from continuing without its in-app activity indicator.\n\nWhen Retain 90 ms debug recordings is enabled in Diagnostics, each detected window is saved locally as a float WAV until the user deletes it. The UI shows a persistent red privacy warning while retention is enabled. If captures remain after a relaunch, an orange saved-audio indicator and the delete control remain visible even though new audio is being discarded.\n\nApplication Support contains:\n\n```text\nHolo\u002FProfiles\u002F                 feature-only profile JSON\nHolo\u002FEvaluations\u002F              JSON and CSV evaluation reports\nHolo\u002Fapproach-comparison.json  latest sensing comparison\nHolo\u002FDebugCaptures\u002F            opt-in raw WAV windows only\n```\n\nBecause the app is sandboxed, these paths live inside Holo's app container in normal signed builds.\n\n## Automated verification\n\nMost recent automated check on macOS 26.5.2:\n\n- Debug and Release app builds: passed with no source warnings.\n- Static analyzer: passed.\n- Unit tests: 68 passed, 0 failed, 0 skipped.\n- Accelerated mixed four-zone synthetic soak at the production confidence threshold: 5,000 events in 0.8 seconds; 4,500\u002F4,500 zone taps correct and 500\u002F500 weak, noisy, clipped, schema-mismatched, or out-of-distribution challenges rejected; zero false accepts; RSS 6.7 → 7.0 MB (+0.3 MB).\n- Earlier all-positive 30-minute synthetic wall-clock soak: 17,186 events; 17,186 correct, 0 rejected, 0 wrong; RSS 6.7 → 6.4 MB (−0.3 MB). This predates the current four-zone topology and is retained only as historical stability evidence.\n- Read-only route check: MacBook Pro Microphone and MacBook Pro Speakers both reported as built-in; Passive, Active, and Hybrid ready.\n\nRun the unit suite with:\n\n```sh\nxcodebuild \\\n  -project Holo.xcodeproj \\\n  -scheme Holo \\\n  -configuration Debug \\\n  -derivedDataPath \u002Ftmp\u002FHoloDerived \\\n  CODE_SIGNING_ALLOWED=NO \\\n  test\n```\n\nBuild and run the synthetic soak without opening the GUI:\n\n```sh\nxcodebuild \\\n  -project Holo.xcodeproj \\\n  -scheme HoloSoak \\\n  -configuration Release \\\n  -derivedDataPath \u002Ftmp\u002FHoloSoakDerived \\\n  CODE_SIGNING_ALLOWED=NO \\\n  build\n\nDYLD_FRAMEWORK_PATH=\u002Ftmp\u002FHoloSoakDerived\u002FBuild\u002FProducts\u002FRelease \\\n  \u002Ftmp\u002FHoloSoakDerived\u002FBuild\u002FProducts\u002FRelease\u002FHoloSoak --duration 1800\n```\n\nThe synthetic runner exercises feature extraction, classification, rejection gates, finite-value checks, and resident-memory behavior. It does not exercise AVAudioEngine, microphone permissions, real room noise, physical desk variability, or action dispatch.\n\nCheck the current built-in hardware routes without opening Holo or requesting microphone access:\n\n```sh\nxcodebuild \\\n  -project Holo.xcodeproj \\\n  -scheme HoloRouteCheck \\\n  -configuration Debug \\\n  -derivedDataPath \u002Ftmp\u002FHoloRouteDerived \\\n  CODE_SIGNING_ALLOWED=NO \\\n  build\n\nDYLD_FRAMEWORK_PATH=\u002Ftmp\u002FHoloRouteDerived\u002FBuild\u002FProducts\u002FDebug \\\n  \u002Ftmp\u002FHoloRouteDerived\u002FBuild\u002FProducts\u002FDebug\u002FHoloRouteCheck\n```\n\n## Known limitations\n\n- A profile is specific to one MacBook, surface, room arrangement, and laptop position. Holo rejects external input devices because they change the sensing path.\n- Built-in microphone APIs may expose one aggregate channel rather than independent physical array elements.\n- Soft, unstable, very large, heavily damped, or noisy surfaces may not produce separable zones.\n- Short consonants, typing, laptop touches, dropped objects, and nearby impacts can resemble taps. The sustained-sound gate and profile-specific negatives reduce false positives but cannot guarantee none.\n- Calibration quality depends on consistent natural taps. The UI prevents unarmed sounds from being added, but it cannot know whether the user tapped the intended physical location.\n- The active probe is experimental and can be filtered or audible on some hardware.\n- The 80% and 200 ms targets must still be demonstrated with a real held-out session for each target setup.\n- Automated stress results do not replace a 30-minute live microphone and action-dispatch run on the target Mac.\n\n## Before claiming the prototype is validated\n\nFor every supported Mac\u002Fdesk combination:\n\n1. Run Diagnostics in a representative quiet and noisy environment.\n2. Calibrate all four zones with the final MacBook position.\n3. Run a new balanced 60-tap evaluation and retain its JSON\u002FCSV report.\n4. Confirm at least 80% overall accuracy and median response below 200 ms.\n5. Run the live app for 30 minutes with representative taps, conversation, typing, laptop touches, and background noise while monitoring crashes, false triggers, and memory.\n\nUntil those physical checks are complete, Holo should be described as functional experimental software—not a proven acoustic input device.\n",2,"2026-07-19 02:30:03","CREATED_QUERY"]