* docs(superpowers): local-first LLM routing design spec
Flip default chat-turn provider from Anthropic to local Ollama with
reactive escalation to Opus on detectable failure. Per-turn escalation
budget, clean-restart UX with visible badge.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs(superpowers): local-first LLM routing implementation plan
10-task plan with TDD steps, exact file paths, and code blocks for each
step. Self-reviewed for spec coverage and type consistency. Ready for
subagent-driven execution.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
* docs(superpowers): brainstorm/spec for multi-runner expansion on Grogu
Brainstorm-phase design for scaling Grogu from 1 to 3 self-hosted CI
runners. Covers components, precondition (PR #189 must land first),
sequential registration sequence, acceptance validation, failure
modes + mitigations, rollback, and explicit out-of-scope items.
Acceptance bar (minimum): green develop CI with >=3 SPM jobs in
flight simultaneously. Warm cache + runner-health monitoring are
explicit follow-ups.
Path follows the superpowers:brainstorming skill convention:
docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md.
Refs #180#182#186#188
* docs(superpowers): implementation plan for multi-runner Grogu expansion
Bite-sized task breakdown for the multi-runner spec at
docs/superpowers/specs/2026-05-13-multi-runner-grogu-design.md.
Five tasks, each task several 2-5 minute steps with concrete commands
and expected output:
1. Verify PR #189 (age-filter) is on develop — precondition gate
2. Register Grogu-jarvis-2 (verify pre-stage, token, config,
install service, verify online)
3. Register Grogu-jarvis-3 (same sequence)
4. Acceptance — rerun PR #185 CI, observe >=3 SPM jobs concurrent
5. Update CLAUDE.md runner inventory + open PR
Self-review pass: every spec component covered, no placeholders,
type-name consistency verified across tasks.
Refs #180#188
Triage report for the 5 Dependabot PRs (4 SAFE-MERGE / 1 NEEDS-INVESTIGATION), the 2 moderate CVEs (vite + esbuild path traversal — root cause is vitest@2 → vite@5.4.21 → esbuild@0.21.5 transitive chain; existing PR #145 alone does NOT close them; surgical fix is pnpm.overrides), and the 6 stashes (5 DROP + 1 PRESERVE-AS-BRANCH for Voice Log v1.1 + 1 POP-TO-LANE-G). Methodology: each Dependabot PR was tested in an isolated tmp worktree; no main repo HEAD mutations.
Adds a note at the top declaring GitHub Issues as the live tracker.
Replaces the Pending Work bullet list with a crosswalk to issue numbers.
Narrative paragraphs (session-handoff history) preserved unchanged.
Refs #4..#63
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
All open work has migrated to GitHub Issues. This file is replaced by a
crosswalk from former sections to issue numbers. Historical content is
preserved in git history (see docs/TODO.md at commit 8d94c1c or earlier).
Refs #4..#63
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Context-budget hand-off. Round 1 (model split) shipped in 8d0a959. The
'NOT FAKED — 100% real only' ethos is preserved as the load-bearing
design constraint for both deferred rounds.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Carry-forward bug B-02 (live evidence 2026-05-07): conversation
continuity broken — "yes" / "why 4.5?" lose prior turn context because
AgentOrchestrator.process(_:) built [system, user(input.userText)]
with no history fetch.
Tactical patch outside the M-0..M-7 migration sequence, per
JARVIS-API-MIGRATION-PLAN.md §3 and UQ-2 (option B). Lands on develop
directly. M-4 (Memory surface) will reframe this path against the new
API contract but the user-visible bug closes today.
Substrate gap discovered + addressed in-scope. The `turns` table was
unwritten (schema present at MemorySchema.swift, FTS5 trigger ready,
read API at MemoryStore.recentTurnsForSession, but no INSERT site
anywhere in the codebase). The migration plan assumed turn writes
existed; they did not. Patch adds the missing writer plus the read
side wiring.
Changes:
- packages/Memory/Sources/Memory/MemoryQueries.swift
+ turnInsertSQL — single-row INSERT into turns
- packages/Memory/Sources/Memory/MemoryStore.swift
+ appendTurn(sessionId:role:content:source:createdAt:)
Single-row INSERT; FTS5 trigger mirrors content into turns_fts
automatically. T-06-05-03: function MUST NOT log content.
- packages/AgentCore/Sources/AgentOrchestrator/AgentOrchestrator.swift
+ PriorTurn struct + SessionHistoryLookup typealias
+ emptySessionHistoryLookup default (preserves pre-B-02 test setups)
+ sessionHistoryLookup ctor parameter
Replaces the [system, user] messages-array build with prior-history
hydration: system + chronological prior user/assistant rows + current
user. Lookup throws -> warning log + empty history (matches D-3
PriorFactsLookup resilience contract).
- App/AppDelegate.swift
+ sessionHistoryLookup closure: recentTurnsForSession(limit: 10),
reverse DESC -> chronological, filter to user/assistant only, return
[PriorTurn]
+ extends existing turnContent flush closure with appendTurn calls
(rides on memory-extraction drain path; assistant row offset +1 ms
so DESC + id-tiebreaker preserves user->assistant order)
Tests:
- packages/AgentCore/Tests/AgentOrchestratorTests/HistoryThreadingRegressionTests.swift
HT-1: third turn includes prior user/assistant pairs in chronological
order. 3/3 PASS.
HT-2: empty-history default produces [system, user] (pre-B-02
baseline preserved).
HT-3: three-turn happy path emits zero LLMProviderError
.streamTruncatedFinal events. Pins R-006 / Phase E gate behavior:
patch grows messages array, not finalSystem, so
CacheHints.eligibleForSystemPrompt(finalSystem) is unchanged.
- packages/Memory/Tests/MemoryTests/MemoryStoreAppendTurnTests.swift
AT-1: appendTurn round-trips via recentTurnsForSession.
AT-2: user/assistant pair reverses to chronological.
AT-3: session_id scoping isolates rows.
AT-4: turns_fts trigger fires on append.
All env-gated on JARVIS_VEC0_STUB_PATH per existing MemoryStore-test
convention; skip cleanly without vec0.dylib.
Verification:
- check-app-builds.sh PASS.
- Boundary gates sampled (check-no-leftover-stubs, applescript-confirm,
corpus-secrets, bus-protocol-version, single-memory-mutated-emit,
single-writer-hudstate) PASS.
- AgentCore affected-subset (Submit/Retry/TextEnd2End/CapRecovery/
HistoryThreading) 26/26 PASS, 0 failures.
- Memory full suite 92 run, 23 skipped (env-gated), 0 failures.
Degradation contract: when MemoryStore is nil (dormant memory — vec0
or Ollama unavailable), turn persistence is also dormant; the
appendTurn call is guarded by memoryStore != nil. When D-5/D-6 close
and memory comes up live, persistence activates without further code
changes.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
After two days of fix → test green → relaunch → still broken loop, the
verification gate (executor self-reports + boundary gates) cannot detect
substrate failures. Today's substrate fixes (B-01a / B-01b — tool catalog
enumeration + dispatch routing) shipped and live-verified, but live testing
surfaced B-02..B-08: history threading, camera click, voice input, TTS
output, chat scroll, voice menu, model-name paraphrase. Stop-loss decision:
pivot to API-first architecture.
This commit packages the session-end state for clean handoff:
- .planning/architecture/HANDOFF-2026-05-07.md — primary handoff doc.
Specifies the 6-agent design swarm (inventory → architect → 3 critics in
parallel → synthesis → test contract + migration in parallel) that the
next session dispatches. Goal: JARVIS-API-DESIGN.md v1.0 +
test contract + migration plan, implementation-ready by midnight.
- docs/SESSION-STATE.md — updated with 2026-05-07 session-end state and a
▶ Next Session pointer to the handoff. Earlier 2026-05-04 entry preserved
below the line.
- docs/TODO.md — top-of-file pivot directive + B-01 closures + B-02..B-08
carry-forward + Phase 10 status + housekeeping loose ends.
Branch: develop @ 1b7fb81 (B-01b dispatch routing fix). Tree clean.
Substrate alive for tool calls; remaining bugs deferred to fix against
the new API contract once locked.
Update docs/SESSION-STATE.md and docs/TODO.md to reflect closure of
the audit-2026-05-04 P0/P1/P2 stragglers + P3-18 grep gate. Adds
inline `[x] (commit_sha)` entries for the three new commits
(57847f2 / f9cd25d / 2d9a25a) under a new "Audit-2026-05-04 P0-P2
closure" section in TODO.md. Bumps SESSION-STATE.md HEAD pointer
6e249ee → 2d9a25a, adds a per-commit summary block above the
existing Track B-6 entry, and refreshes the test/gate counts.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
D-1..D-4 closed in code: installMemory cascade fix (75a10be), MCP
SearchMemoryTool + ForgetFactTool registration (707c45b), priorFacts
wiring + MemoryStore.recentActiveFacts (51750c1), end-to-end
remember-Brutus regression with fakes (c3bd0a5).
D-5 (build-sqlite-with-extensions.sh) and D-6 (fetch-sqlite-vec.sh)
landed as documented skeletons (6e249ee) — both scripts mode 755 and
exit 1 with clear "TODO: fill in pins" until the user pins SQLite
version + amalgamation SHA256 (D-5) or sqlite-vec release tag + SHA256
(D-6). They capture the steps so the user can pick this up cleanly
without re-deriving the build commands.
D-7 (ollama pull nomic-embed-text + qwen2.5-coder:32b) remains deferred
to user environment work; cannot be automated from the executor.
Test stack: Memory 86 → 87 (+1 RememberBrutusEndToEnd; D-3 added 2 new
tests grouped under existing `MemoryExtractionOrchestratorTests`). All
6 boundary gates pass; App build clean.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
SESSION-STATE.md + TODO.md updated with the six Track C commits and
final test counts:
- Vision: 56 → 72 XCTest (+16 across C-1..C-6; 2 of those skip without
JARVIS_REAL_CAMERA=1 + Camera TCC).
- HUD vitest: 94 → 97 (+3 CameraButton.test.tsx).
- AgentCore 215/215, Voice 84 (testI3 unchanged), Replay 33/33,
Bus 58/58 — all unchanged.
- Six boundary gates PASS, app builds clean.
Track D (memory) is the next session's pickup point. Track C-4 took
the explicit-missing path for the T2 sidecar; real vllm-mlx wiring
(binary bundling + codesigning + feature-flag plumbing) is deferred.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Four-item cleanup batch landed on develop today:
- ad93dac BLOCKER-INT-1 (real bus gateway)
- 6f6617e F-A2-01 (stale bus world assertion)
- 08125a4 tests-audit cleanup (5 tautologies)
- 5cd46c9 F2 linter (check-no-leftover-stubs.sh)
SESSION-STATE: status header bumped to 5cd46c9 with 4 commits ahead of
origin (push pending). Four new bullets in "What Was Done This Session"
covering each fix with one-line summaries. Pending Work section drops
the BLOCKER-INT-1 + F-A2-01 carry-forward items. Test stack section
notes Bus 58/58 (F-A2-01 closed), the new boundary gate, and flags the
pre-existing Shell-test compile failure as unrelated baseline.
TODO: BLOCKER-INT-1, F-A2-01, test-pyramid tautologies, and F2 linter
all flipped to `[x]` with their commit SHAs. Phase F1 (top-level
IntegrationTests target) remains open as the structural fix.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- SESSION-STATE: bump to c7f9ece; add B-6 entry summarizing the VAD
interceptor, hangover semantics, anti-pattern callouts, and the four
new VADGatedSessionTests.
- TODO: mark B-6 done; update Track B header from "B-1..5 done" to
"B-1..6 done"; B-7 remains the only open Track B item.
- Voice test count bumped 80 → 84.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Track B-5 (VoiceController chunkPump + voice-loop e2e proof) merged
in 61aed20. Voice tracks B-1..B-5 are now closed end-to-end. Two
follow-ups carry forward into the next track:
* B-6 — VAD-gated session end. Silero `.speechEnd` isn't wired to
`endSTTSession` yet, so only `pttUp` currently closes the chunk
continuation. Needed for the hands-free "Hey Jarvis" loop.
* B-7 — RingBuffer multi-consumer fan-out. WakeWordDAG +
AudioLevelEmitter + the new chunk pump all drain the same SPSC
ring; each advances the read pointer so they steal samples from
each other. A BufferBroadcaster at the AudioGraph tap is the
right fix.
Test stack reflects the +3 VoiceLoopE2ETests landed this session
(80 total Voice tests, was 77).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Track B-4 (audio graph wiring + LiveSpeechAnalyzerBridge SpeechAnalyzer
implementation) merged in e9c0a34. The pickup point shifts to B-5: a
voice-loop e2e test feeding a known WAV through the audio graph and
asserting the STT result lands on the orchestrator. Surfaced a B-5
prerequisite while wiring B-4 — VoiceController.startSTTSession()
creates sttChunkCont but no producer feeds it, so the now-functional
SpeechAnalyzer wiring will see zero chunks until that path is built.
Also flagged the deterministic TTSInterruptTests.testI3 timeout
(10s vs 80ms target) as a pre-existing failure that pre-dates Track
B-4 — not blocking but worth triage.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Captures end-of-session state at ee7f6d2 (Track A + Track B-1..3
landed). SESSION-STATE.md is the resume point — what was done,
where we left off, what to pick up next. TODO.md is the live
triage list across Track B remaining items, Track C (vision),
Track D (memory), and cross-cutting items.
Both files live under docs/ per the local--session-end skill
contract; SESSION-STATE.md kept under 100 lines as a resume
point, not a journal.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>