docs/superpowers/plans/2026-04-25-logi-kickoff.md
Read this file from a fresh Claude Code session to take over implementation. Everything you need is below or referenced by absolute path. Do not read the prior conversation — it is not needed.
refactor/logi-consolidation (already created, head = 0bca526 "docs(plan): logi module consolidation 6-step implementation plan").0bca526. Only an unrelated .gitignore line is stashed (stash@{0}: On master: unrelated gitignore: scheduled_tasks.lock) — leave it stashed for now.docs/superpowers/specs/2026-04-25-logi-module-consolidation-design.md (commit 79f7090).docs/superpowers/plans/2026-04-25-logi-module-consolidation.md (commit 0bca526). 30+ tasks, each with 4–7 atomic steps including write-test, run-fail, implement, run-pass, commit.Use the superpowers:subagent-driven-development skill. The user has explicitly chosen this option and confirmed:
Agent tool with subagent_type: "general-purpose". The implementer reads/writes/edits files, runs xcodebuild, runs tests, makes commits.codex CLI (NOT Claude subagents). The user's ~/.codex/config.toml defaults to model = "gpt-5.5" + model_reasoning_effort = "xhigh" — these are honored automatically when you invoke codex exec with no -m flag. Use --dangerously-bypass-approvals-and-sandbox --skip-git-repo-check to skip prompts. The user's max plan has effectively unlimited tokens — do not optimize for token consumption.
refactor/logi-consolidation. After Step 5 lands and final review passes, ask the user whether to merge or open a PR.LOGI_REAL_DEVICE=1. When you reach those, ask the user to confirm the device is connected, then run LOGI_REAL_DEVICE=1 xcodebuild ... -testPlan DebugWithDevice ....UserDefaults["logitechFeatureCache"] literal MUST NOT change across rename."HIDDebug.FeaturesControls.v3" autosaveName MUST NOT change.NotificationCenter.post calls capped at exactly two: rawButtonEvent (always) + buttonEventRelay (recording or unconsumed).LogiCenter.externalBridge is strong, non-optional, never weak.LogiDeviceSession.handleInputReport accepts UnsafeBufferPointer<UInt8>, not [UInt8] (Step 0).precondition(Thread.isMainThread)).internal. Only the small public surface escapes (see acceptance §11).xcodebuild -scheme Debug -configuration Debug -destination 'platform=macOS' build — note that the user's project uses scheme Debug (NOT -target Mos; that fails). This is documented in their memory.xcodebuild -scheme Debug -destination 'platform=macOS' testxcodebuild -scheme Debug -destination 'platform=macOS' test -only-testing:MosTests/<ClassName>LOGI_REAL_DEVICE=1 xcodebuild -scheme Debug -testPlan DebugWithDevice -destination 'platform=macOS' test (the DebugWithDevice xctestplan is created in Step 3 Task 3.14).For each task in the plan (in order, Step 0 → Step 5):
docs/superpowers/plans/2026-04-25-logi-module-consolidation.md. Identify which spec sections (§N.M) it references; copy those sections in too.Agent tool (subagent_type: "general-purpose"):
~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.7/skills/subagent-driven-development/implementer-prompt.md./Users/caldis/Code/Mos.refactor/logi-consolidation. Verify after dispatch by git log --oneline -3 on that branch.codex exec --dangerously-bypass-approvals-and-sandbox --skip-git-repo-check "$(cat <<'PROMPT'
Review commit <SHA> against Task <N> of docs/superpowers/plans/2026-04-25-logi-module-consolidation.md and the relevant spec sections in docs/superpowers/specs/2026-04-25-logi-module-consolidation-design.md.
Focus exclusively on: did the implementer build exactly what plan + spec require? Missing requirements? Extra/unrequested work? Misinterpretations?
Output format:
✅ Spec compliant — proceed to code quality review.
OR
❌ Issues found:
- severity: file:line — concrete description
Be terse. Do not propose alternatives.
PROMPT
)" 2>&1 | tee /tmp/codex_task<N>_spec.txt
codex exec --dangerously-bypass-approvals-and-sandbox --skip-git-repo-check "$(cat <<'PROMPT'
Code quality review on commit <SHA> for Task <N>.
Check: each file has one clear responsibility; well-defined interfaces; tests verify behavior not mocks; no overbuilt features; existing patterns followed; no needless abstraction; no broken main-thread invariants; matches file structure declared in the plan.
Output:
Strengths: <bullets>
Issues:
Critical: <bullets or "none">
Important: <bullets or "none">
Minor: <bullets or "none">
Assessment: <Approved | Needs fixes>
Be terse.
PROMPT
)" 2>&1 | tee /tmp/codex_task<N>_quality.txt
Read these from the plan; do NOT re-derive. Total ~30 tasks:
Logitech* → Logi* and ScrollCore method rename + canary tests + CID directory tests.LogiCenter facade + LogiNoOpBridge + facade migration of all external call sites.UsageRegistry + LogiUsageBootstrap + 5 panel migrations + delete syncDivertWithBindings + KeyRecorder migration + Tier 3a baseline test.LogiExternalBridge + LogiIntegrationBridge + dispatchButtonEvent rewrite + Toast bridge + Tier 2/3 tests.ConflictDetector 5-state + Self-Test Wizard + CI lint + boundary enforcement test.End-of-Step Codex review (× 2 rounds at the step boundary, in addition to per-task) is recommended for Steps 3 and 4 because they have the largest semantic surface. The plan already includes "Step N Codex review × 2" as the final task within each step.
The plan's "Final acceptance check" section enumerates:
./scripts/lint-logi-boundary.sh passes.Debug.xctestplan all green.DebugWithDevice.xctestplan all green with device.UserDefaults["logitechFeatureCache"] still loads.Logitech* references outside Mos/Logi/ and Mos/Integration/.After acceptance, hand back to the user for merge / PR decision.
origin/master.origin/refactor/logi-consolidation without asking.Ask the user. Spec/plan are detailed — most ambiguity is resolvable by re-reading the relevant section. If a section seems contradictory, surface it before implementing.