Skip to content

Commit f65d984

Browse files
feat(memory): memory files
1 parent 9933b12 commit f65d984

3 files changed

Lines changed: 215 additions & 0 deletions

File tree

.memory/letter_20260318_0001.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Letter to Myself (Session Handoff)
2+
3+
**Date:** 2026-03-18
4+
5+
## 1. Executive Summary
6+
* **Goal:** Create release 1.2.0 and build production desktop binary
7+
* **Current Status:** Build complete — `.app` and `.dmg` produced. Changes uncommitted.
8+
9+
## 2. The "Done" List (Context Anchor)
10+
* Bumped version to `1.2.0` in `package.json` (line 3) and `src-tauri/Cargo.toml` (line 3)
11+
* Updated `CHANGELOG.md` with `[1.2.0] - 2026-03-18` release section (fixes + iOS build support)
12+
* Installed Rust toolchain via `rustup` (stable 1.94.0, aarch64-apple-darwin)
13+
* Installed `cmake` via Homebrew (required by `whisper-rs-sys`)
14+
* Installed node dependencies via `pnpm install` (332 packages)
15+
* Built Next.js frontend (`pnpm build` → static export to `./out`)
16+
* Built Tauri production binary (`pnpm tauri build` → release bundle)
17+
- `src-tauri/target/release/bundle/macos/Aurus Voice Intelligence.app`
18+
- `src-tauri/target/release/bundle/dmg/Aurus Voice Intelligence_1.2.0_aarch64.dmg`
19+
20+
## 3. The "Pain" Log (CRITICAL)
21+
* **Tried:** `pnpm tauri build` without cmake installed
22+
* **Failed:** `whisper-rs-sys v0.13.1` build script failed — cmake not found
23+
* **Workaround:** `brew install cmake` resolved it
24+
* **Tried:** `pnpm build` without node_modules
25+
* **Failed:** `next: command not found`
26+
* **Workaround:** `pnpm install` first (node_modules was missing)
27+
* **Tried:** Using `pnpm` directly
28+
* **Failed:** `command not found: pnpm`
29+
* **Workaround:** `corepack enable && corepack prepare pnpm@latest --activate` using node@22 from homebrew
30+
31+
## 4. Active Variable State
32+
* PATH needs: `$HOME/.cargo/bin:/opt/homebrew/bin:/opt/homebrew/opt/node@22/bin`
33+
* Rust: stable 1.94.0 (aarch64-apple-darwin)
34+
* pnpm: v10.32.1 (via corepack)
35+
* node: v22 (homebrew)
36+
* Version files updated but **not yet committed or tagged**
37+
38+
## 5. Immediate Next Steps
39+
1. [ ] Commit the version bump (package.json, Cargo.toml, CHANGELOG.md)
40+
2. [ ] Create git tag `v1.2.0`
41+
3. [ ] Investigate "Failed to create deck" error — not found in this repo, may be from a different project
42+
4. [ ] Optionally push tag and create GitHub release with the `.dmg` artifact

.memory/letter_20260517_0001.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Letter to Myself (Session Handoff)
2+
3+
**Date:** 2026-05-17
4+
5+
## 1. Executive Summary
6+
* **Goal:** Autonomous crash-stability audit of Aurus (Sub-Project B in the brainstormed roadmap) — full-stack, parallel persona-lens, TDD fixes, iOS lookahead.
7+
* **Current Status:** **Complete.** 20+ commits shipped, smoke checklist deferred to user for hands-on verification. User was shopping; they should pull and run `pnpm tauri dev` to walk through `docs/superpowers/audits/2026-05-17/smoke.md`.
8+
9+
## 2. The "Done" List (Context Anchor)
10+
11+
### Brainstorm + Plan
12+
* `docs/superpowers/specs/2026-05-17-crash-stability-audit-design.md` — full design, sections approved
13+
* `docs/superpowers/plans/2026-05-17-crash-stability-audit.md` — phased plan with TDD per finding
14+
15+
### Audit (Phase 1+2)
16+
* 5 lens-agents dispatched in parallel, **read-only** (Nemesis, Aletheia, Ipcha, Athena, Metis) → 57 raw findings in `docs/superpowers/audits/2026-05-17/raw/*.md`
17+
* Cael judge consolidated → `docs/superpowers/audits/2026-05-17/findings.md` (7C, 11H, 18M, 7L = 43 canonical)
18+
* Triage rule: C1+C2 are iOS-only architectural → deferred to Sub-Project A as nyxCore Action Points
19+
20+
### Test Foundation (Phase 3)
21+
* `proptest = "1"` in `src-tauri/Cargo.toml` dev-deps
22+
* 8 property tests in `audio.rs::tests`: resampler/VAD/mono never panic on adversarial input; energy stays finite + ≥0 even with NaN/Inf (L1 fixed inline as a side effect)
23+
* 4 negative tests in `transcription.rs::tests`: deeply-nested JSON / truncated / wrong-shape never panic
24+
25+
### Critical+High Fixes (Phase 4 — 16 commits)
26+
* **C3** `8cc0e10``RecordingGuard` RAII + `catch_unwind` in spawned audio thread, `.expect``?`
27+
* **C4** `7ade5c1` — first-run `has_api_keys` probe + amber banner with focus-rechecking
28+
* **C5** `7bbfcda``agents::classify_api_error(StatusCode)` for 401/402/429/408/504/5xx; 6 agent files migrated
29+
* **C6** `561d397``AUDIO_CHUNKS_SEEN` counter + 3s watchdog emitting `mic-permission-denied`
30+
* **C7** `0c86545` — Rust emits classified `deepgram-disconnected` event; frontend `useTauriEvents` drives exponential-backoff reconnect (250 ms→8 s, 5 attempts)
31+
* **H1** `f28bdfb` — webrtc mutex `.expect("poisoned")``.unwrap_or_else(|p| p.into_inner())` × 5 callbacks
32+
* **H2** `9e12a59` — extracted `creator_handshake()` + accept-loop with MAX_PAIRING_ATTEMPTS=16
33+
* **H3** `bea4f80``wait_for_capture_end` supervisor + `stream_healthy` flag set by error callback
34+
* **H4** `45dd99b``CONSECUTIVE_AUDIO_DROPS` counter; emit `transcription-degraded` at threshold 3
35+
* **H5** `a34622c``toggle_window` (Rust) + `useEscapeKey` (frontend) both call `stop_recording` before hide
36+
* **H6** `fdd1afb``GlobalListeners` wraps `useTauriEvents` + `useAudioForwarding` in root `layout.tsx`
37+
* **H7** `0d4f195` + `11ec01f``append_with_cap()` for Rust `RECORDING_BUFFER` (30 min cap) + 50k-char transcript cap in Zustand
38+
* **H8** `040b338``.unwrap_or("")``.ok_or(...)?`; `#[serde(default)]` on `ActionItem` fields
39+
* **H9** `f300b40` — new `app/components/ErrorBoundary.tsx` wired into layout
40+
* **H10** `6a105e2``WebSocketConfig::max_message_size = Some(64 * 1024)` via `connect_async_with_config`
41+
* **H11** `3e91497` — new `SyncDocument::approximate_state_bytes()`; transport.rs enforces 20 MiB peer budget
42+
43+
### Drive-by Fixes
44+
* Pre-existing `v1.2.0` version bump from prior session committed (`59c266e`)
45+
* 5 pre-existing clippy warnings cleaned (path-statement, needless `return`, missing `Default` impl)
46+
47+
### nyxCore Backlog (Phase 5)
48+
* 26 action points created on project `9dea4fc7-a2e8-4f1b-b30c-2aef7532a772` — all tagged with title-prefix `[C1|C2|M*|L*]` and reference `audit-2026-05-17` in the description
49+
50+
### Test results at session close
51+
* `cargo test`**97/97** green
52+
* `cargo clippy --tests -- -D warnings` → clean
53+
* `pnpm tsc --noEmit` → only pre-existing `__tests__/agents.test.ts` `unknown` type errors (not introduced)
54+
55+
## 3. The "Pain" Log (CRITICAL)
56+
57+
* **Tried:** Cael judge agent writing `findings.md` directly via Write tool.
58+
**Failed:** Harness blocked the write despite explicit instruction.
59+
**Workaround:** Cael returned full content inline; main session wrote the file from its hands. Lesson: sub-agents writing critical artifacts should be considered advisory — main session must always be ready to persist.
60+
61+
* **Tried:** `connect_async_with_config(request, Some(ws_config), false)` per docs.
62+
**Failed:** `async_tungstenite::tokio::connect_async_with_config` has only 2 args, not 3.
63+
**Workaround:** Dropped the `disable_nagle` param. Lesson: async-tungstenite signature differs from upstream tungstenite — always verify against `cargo doc` or rust-docs.
64+
65+
* **Tried:** Initial H2 refactor that tried to reuse `update_rx: mpsc::Receiver` across multiple SPAKE2 attempts by recreating the channel inside the loop.
66+
**Failed:** `update_rx` is consumed by handle_creator_connection on Err too; recreating the rx breaks the wiring to the externally-held `TransportHandle::update_tx`.
67+
**Workaround:** Split into `creator_handshake()` (handshake-only, retryable) + `run_creator_session()` (post-handshake, consumes rx exactly once). Lesson: when a moved value must survive multiple fallible attempts, the function boundary must move with it — refactor the function, don't try to clone/recreate the value.
68+
69+
* **Tried:** `assert!(DEEPGRAM_MAX_FRAME_BYTES >= 4 * 1024, "msg")` in a `#[test]`.
70+
**Failed:** clippy `-D warnings` flagged `assertions_on_constants`.
71+
**Workaround:** Use `const _: () = assert!(DEEPGRAM_MAX_FRAME_BYTES >= 4 * 1024)` for compile-time guard. Lesson: clippy considers runtime asserts on consts dead code; use const-eval asserts.
72+
73+
* **Tried:** Running `cargo` commands from repo root.
74+
**Failed:** `error: could not find Cargo.toml` repeatedly.
75+
**Workaround:** Always `cd /Users/oli/Projects/aurus-voiceintelligence/src-tauri && cargo ...`. Lesson: this is a Rust crate nested under the JS root, not a workspace.
76+
77+
## 4. Active Variable State
78+
79+
* nyxCore project id for Aurus: `9dea4fc7-a2e8-4f1b-b30c-2aef7532a772`
80+
* All 26 action points tagged via the title prefix and `audit-2026-05-17` reference in description
81+
* MCP supports filter by description, not by tags — use `nyxcore_search` with `query="audit-2026-05-17"` to retrieve
82+
* Version still at 1.2.0 (not bumped despite the hardening — user's call when to bump → 1.3.0 with the [Unreleased] section now full)
83+
* Working tree: only `.claude/settings.local.json` (system-managed) and `.memory/` modifications
84+
85+
## 5. Immediate Next Steps
86+
87+
1. [ ] User runs `pnpm tauri dev` and walks through `docs/superpowers/audits/2026-05-17/smoke.md`
88+
2. [ ] Tag a release once smoke is green: `git tag v1.3.0` + `gh release create v1.3.0` using the `[Unreleased]` CHANGELOG section. Move [Unreleased][1.3.0] - 2026-05-17.
89+
3. [ ] Pick the next Aurus sub-project from the brainstorm decomposition:
90+
- **A** iOS-App lauffähig (Tauri Mobile target — picks up C1+C2, M9, plus the actual iOS audio path)
91+
- **C** Sprechererkennung im Stream (Deepgram `diarize=true` — fast win, demo-friendly)
92+
- **D+E** Settings UI for Persona/nyxCore tokens + Persona-tuned outputs (highest user-visible value)
93+
- **F** Todo output refinement (small, polish-tier)
94+
4. [ ] If a follow-up audit is desired before sub-project A: re-run Phase 1 only against `src-tauri/src/platform/audio/mobile.rs` once it exists (currently a NotSupported stub).
95+
5. [ ] Consider dispatching a Nemesis review pass against the 16 fixes — I skipped per-fix Nemesis review due to token budget. The fixes are solid but a dedicated red-team pass would harden them further.

.memory/letter_20260517_0002.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Letter to Myself (Session Handoff #2)
2+
3+
**Date:** 2026-05-17 — extension to letter_20260517_0001
4+
5+
## 1. Executive Summary
6+
* **Goal:** After Sub-Project B (Crash-Stability) shipped, user said "continue with the rest, nyxcore mcp und personas weiterhin nutzen" — i.e. ship C, D, E, F autonomously.
7+
* **Current Status:** **All four sub-projects complete.** Tag is still v1.2.0; the `[Unreleased]` CHANGELOG section now lists 6 sub-projects worth of work. Disk space is tight — see Pain Log.
8+
9+
## 2. The "Done" List (Context Anchor)
10+
11+
### Sub-Project C — Speaker Diarization (`c013eae`)
12+
- Deepgram WS URL now includes `diarize=true`.
13+
- `transcription.rs`: new `DeepgramWord` struct (#[serde(default)] all fields, backward-compatible). `TranscriptWord` + `TranscriptEvent.speaker` exposed to frontend. Pure helper `dominant_speaker(&[DeepgramWord]) -> Option<u32>`.
14+
- Frontend: `useTauriEvents` passes speaker through; `voiceStore.transcriptSegments` records `{ text, speaker }` per final segment (capped 500). `TranscriptDisplay` renders speaker chips with stable 8-color hue palette when 2+ speakers detected; flat view otherwise.
15+
16+
### Sub-Project D — Token Slots (`a6c28e4`)
17+
- `VALID_KEY_TYPES` extended: `nyxcore_axiom`, `persona_studio` (added later: `nyxcore_base_url`).
18+
- Settings page UI: two new entries via the existing API_KEYS array pattern.
19+
20+
### Sub-Project E — Persona + Axiom Integration (`9c5a086` + `3d80f4c`)
21+
- New module `src-tauri/src/nyxcore/`:
22+
- `client.rs`: shared `OnceCell<reqwest::Client>` with 5s connect / 30s total timeout (M6 fix carried inline for this module). `base_url()` reads optional `nyxcore_base_url` from keychain, defaults to `http://localhost:3000`.
23+
- `persona.rs`: `list_personas` (GET /api/v1/persona/list) + `apply_persona_tone(text, persona_id, circle_id)` (POST /api/v1/persona/chat).
24+
- `axiom.rs`: `axiom_search(query, project_id, limit)` (POST /api/v1/rag/search), limit clamped [1, 50].
25+
- All three commands registered in `lib.rs::invoke_handler!`.
26+
- Frontend: `app/lib/personaPreference.ts` (localStorage), `app/components/PersonaSelector.tsx` (lazy-loaded picker), wired into Settings.
27+
28+
### Sub-Project F — Action Items Refinement (`4437ffd`)
29+
- `ActionItem` gains `category` + `rationale` (both Option<String>, `#[serde(default)]`).
30+
- System prompt rewritten: requires concrete ISO dates in `due_date`, enumerated category, one-sentence rationale.
31+
- Rust helpers: `normalize_priority` (urgent/critical/p0/p1 → high; trivial/p3/p4 → low; else medium) and `normalize_category` with whole-word match + ordered buckets ("decide on framework" → decision, not work — the "framework"-contains-"work" trap).
32+
- TS mirror in `app/lib/actionItemCategory.ts` with `CATEGORY_ORDER` / `CATEGORY_LABEL` / `CATEGORY_ACCENT` / `PRIORITY_RANK` tables.
33+
- `AgentResults`: new `ActionItemGroups` component renders categorised sections (with colored accent borders + counts) when 2+ categories present; flat fallback for single-category sessions. Each row shows rationale italicised.
34+
35+
### Test results at session close
36+
- `cargo test`**121/121** green (up from 97 after Sub-Project B)
37+
- `cargo clippy --tests -- -D warnings` → clean
38+
- `pnpm tsc --noEmit` → only pre-existing `__tests__/agents.test.ts` `unknown`-type errors
39+
40+
## 3. The "Pain" Log (CRITICAL)
41+
42+
* **Tried:** Pure substring match in `normalize_category` ("decide on framework" → "framework" contains "work" → returned "work").
43+
**Failed:** Test `normalize_category_maps_synonyms_to_buckets` flagged it.
44+
**Workaround:** Switched to whole-word matching via `split(|c: char| !c.is_ascii_alphanumeric())` + ordered bucket checks with most-distinctive buckets first. Lesson: when building string-to-bucket classifiers, ALWAYS pre-test with conflict cases (substrings that contain shorter keywords).
45+
46+
* **Tried:** Iterating `Map.values()` directly with `for…of` in TypeScript.
47+
**Failed:** `--downlevelIteration` not enabled, target below ES2015.
48+
**Workaround:** `Array.from(buckets.values()).forEach(...)` instead. Lesson: this repo's tsconfig is conservative; prefer `Array.from(map.values())` over direct iteration unless you've checked.
49+
50+
* **Tried:** Re-exporting `ActionItemCategory` from `actionItemCategory.ts` without an explicit `export type {...}`.
51+
**Failed:** TS2459 — "declares locally but not exported".
52+
**Workaround:** Added `export type { ActionItemCategory };` line. Lesson: `import type` re-exports need explicit `export type`.
53+
54+
* **Tried:** Continuing audit work with target/ at 9.9 GB and 235 MiB free on disk.
55+
**Failed:** `cargo clippy` couldn't write `.rmeta` files ("No space left on device").
56+
**Workaround:** `cargo clean --release` freed 1.8 GiB (debug profile preserved for fast incremental). After cleanup: 2.1 GiB free. Lesson: monitor disk every ~5 commits during long sessions; `cargo clean --release` is safe and recovers space without breaking incremental builds.
57+
58+
## 4. Active Variable State
59+
60+
* nyxCore base URL default: `http://localhost:3000` (the sibling `nyxcore-systems` Next.js dev server). User can override via keychain `nyxcore_base_url` slot.
61+
* Persona Studio + Axiom auth headers: both `Authorization: Bearer <token>`.
62+
* Persona Studio token format prefix: `nyx_pa_…`.
63+
* `nyxcore_systems` API endpoints found:
64+
- `GET /api/v1/persona/list`
65+
- `POST /api/v1/persona/chat` (messages + circleId OR personaId)
66+
- `POST /api/v1/rag/search` (query + optional projectId + limit clamped [1,50])
67+
* Selected persona stored in `localStorage` keys: `aurus.persona.selectedId`, `aurus.persona.selectedCircleId`. Broadcasts `aurus:persona-changed` CustomEvent on update.
68+
69+
## 5. Immediate Next Steps
70+
71+
1. [ ] User runs the smoke checklist from `docs/superpowers/audits/2026-05-17/smoke.md` PLUS test-drives the new sub-projects:
72+
- Settings → add Persona Studio token (any local `nyx_pa_…`) → click "Load personas" → pick one.
73+
- Record with 2+ speakers → verify speaker chips appear in `TranscriptDisplay`.
74+
- Click Action Items → verify category groups + rationale appear under each task.
75+
2. [ ] If green: tag `v1.3.0` and create the GitHub release using the now-very-rich `[Unreleased]` CHANGELOG section. Move `[Unreleased]``[1.3.0] - 2026-05-17`.
76+
3. [ ] **Next sub-project candidate**: **A — iOS-Build (Tauri Mobile)**. Picks up C1, C2, M9 deferred items plus the actual mobile audio path. This is the meta-goal from the brief ("iphone app / macos app zur täglichen benutzung").
77+
4. [ ] Wire `apply_persona_tone` into the UI: a small "Apply persona voice" button next to ActionItemsResult summary that re-renders the tasks through the selected persona's voice. (Currently the command exists but no UI surface invokes it.)
78+
5. [ ] Optionally: wire `axiom_search` into Mental Mirror so the "Letter to My Future Self" pulls related knowledge chunks from the user's own corpus. Powerful but invasive — keep behind a settings toggle.

0 commit comments

Comments
 (0)