Files
Lumotia/docs/brief/appendix-latency-memory.md
Jake 26c7307607
Some checks failed
check / cargo check (macos-latest) (push) Has been cancelled
check / cargo check (ubuntu-22.04) (push) Has been cancelled
check / cargo check (windows-latest) (push) Has been cancelled
check / svelte build + lint (push) Has been cancelled
agent: lumotia-rebrand — docs, scripts, root config, residuals
Phase 9 of the rebrand cascade. Sweep covers everything the Phase 8
frontend pass deliberately skipped: docs/, root markdown, scripts,
Cargo.toml descriptions, code comments that survived earlier
word-boundary sed, plus a handful of identifiers caught on the final
verify pass.

transcription-app changes:
- README.md, HANDOVER.md, KNOWN-ISSUES.md, run.sh — magnotia/Magnotia
  -> lumotia/Lumotia.
- docs/ — sweep across all subdirs except docs/handovers/ (preserved
  as immutable audit trail). Includes architecture-map references
  to magnotia_core::*, magnotia_storage::*, etc. now pointing at
  lumotia_*; dev-setup.md tracing output examples (lumotia_startup
  target); brief/ + superpowers/ + issues/ + whisper-ecosystem/ +
  audit/.
- Cargo.toml descriptions on 9 crates (core, audio, cloud-providers,
  hotkey, llm, mcp, plus referenced others).
- crates/core/src/{error,hardware,recommendation,paths}.rs +
  crates/audio/src/wav.rs + crates/llm/src/model_manager.rs +
  crates/cloud-providers/src/keystore.rs + crates/mcp/src/lib.rs —
  doc comments and a model-manager user-agent string.
- Caught on final pass: BroadcastChannel("magnotia_task_sync") -> ...
  ("lumotia_task_sync"); magnotia_locale i18n localStorage key
  renamed + migration shim added; CSS keyframe names
  magnotiaPulse / magnotiaBar / magnotiaFade renamed in the design-
  system kit; magnotia_viewer_item / magnotia_viewer_mode handoff
  keys renamed in HistoryPage + viewer/+page.svelte; src/assets/
  wordmark.svg text.
- src-tauri/src/lib.rs comment cleanup ("magnotia era" was sed'd
  to "lumotia era" earlier — restored).

Preserved (intentional):
- crates/core/src/paths.rs — keeps "magnotia" / "Magnotia" / ".magnotia"
  legacy detection strings in legacy_and_target_paths() so the
  migration shim can still find user data from the magnotia era.
- src/lib/stores/{page,focusTimer}.svelte.ts + src/lib/i18n/index.ts
  — migration call sites reference the legacy magnotia keys
  deliberately.
- docs/handovers/ — historical audit trail.

cargo build --workspace passes. npm run check: 0 errors / 0 warnings
(3958 files). cargo test --workspace: 339 pass / 0 fail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 12:38:03 +01:00

29 lines
4.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- Source: Lumotia Master Brief — Appendix A4: Latency, Working Memory Decay, and Software Architecture -->
## A4. Latency, Working Memory Decay, and Software Architecture
**Core finding:** 7581% of ADHD cases show measurable working memory deficits (d = 1.632.03). Every millisecond of interface latency disproportionately taxes ADHD working memory. Local-first architecture is a cognitive accessibility requirement, not a technical preference.
**Working memory deficits in ADHD:**
- **Kofler et al. 2020** (*Neuropsychology*): 172 children, bifactor modelling. **Very large magnitude central executive WM deficits: d = 1.632.03**, affecting **7581% of ADHD cases**. These deficits "determined consistent difficulties in anticipating, planning, enacting, and maintaining goal-directed actions."
- **Weigard & Huang-Pollock 2017** (*Clinical Psychological Science*): Applied the Time-Based Resource-Sharing (TBRS) model to ADHD. Children with ADHD experienced **higher cognitive load than controls in identical task conditions** because slower processing speed leaves less time for WM refreshing. Every millisecond of additional processing demand disproportionately taxes ADHD working memory.
- **Barrouillet, Bernardin & Camos 2004** (*Journal of Experimental Psychology: General*): The TBRS model — WM recall is a **negative linear function of cognitive load**, where cognitive load equals the proportion of time the attentional bottleneck is occupied by processing rather than refreshing memory traces.
**HCI response time thresholds:**
- **Miller 1968** (*AFIPS Conference*) and **Nielsen 1993** (*Usability Engineering*): Delays beyond **100ms** break direct manipulation feel. Beyond **1 second**: flow of thought disrupted. Beyond **10 seconds**: complete attentional disengagement. These are neurotypical baselines — effective thresholds for ADHD users are almost certainly shorter given reduced WM capacity.
- **Card, Moran & Newell 1983** (*The Psychology of HCI*): Expert users completed tasks **3040% faster** with sub-second response systems vs. 2-second systems — a penalty amplified in ADHD populations with elevated switch costs.
**ADHD-specific latency vulnerability:**
- **Barack et al. 2024** (*Proceedings of the Royal Society B*): Pre-registered foraging study, **457 participants**. Those screening positive for ADHD **departed resource patches significantly sooner** — their exploration/exploitation trade-off is biased toward exploration. Every loading delay creates an artificial "depleting patch" that triggers the ADHD exploration impulse, manifesting as tab-switching, app-switching, and task abandonment.
- **Ardalani et al. 2020** (*Psychological Research*): Inattentive traits predict higher switch costs under working memory load — each navigation step imposes a disproportionate cognitive tax.
- **Madore et al. 2020** (*Nature*): Pre-encoding attentional lapses directly predict memory failure. Software that minimises attention-capturing events (loading screens, error states) directly supports better memory encoding.
**Applied studies (from earlier research):**
- **127 ADHD knowledge workers study (KLM + EEG):** 4.7 seconds cognitive overhead per app switch. 11.3 seconds context-reconstruction latency. Tools with >90-second setup increase cognitive load by 2.3x.
- **NIH study of 247 ADHD adults (8-week baseline):** Zero-friction AI tools achieved 3147% reduction in task-switching latency, 58% reduction in off-task interruptions, 42% increase in on-time completion.
**Local-first as cognitive ergonomics:**
- **Kleppmann et al. 2019** (*ACM Onward! '19*): Seven ideals of local-first software. Ideal #1 — "No spinners: your work at your fingertips." Primary copy of data on the user's device means read/write operations at local disk speed (sub-millisecond), not network speed (50500+ ms). Synchronisation happens asynchronously in background.
**Implication for Lumotia:** Local-first architecture keeps all interactions within Miller's 100ms direct-manipulation threshold, preventing the WM decay → exploration bias → task abandonment cascade. The 90-second setup threshold is a hard design constraint. Voice capture must work in under 3 seconds from app open.