Daily Report — 2026-02-13

Daily Overview

  • What was done: Advanced four major projects: MIHD benchmark data repair and architecture planning, gadget toolkit refactoring and open-sourcing, robotics error recovery framework completion, and CalendarPro production hardening with intelligent features
  • How it was done: Through systematic root cause analysis, modular architecture design, two-phase pipeline patterns, comprehensive test coverage (107+ passing tests across projects), proper async lifecycle management, and bilingual documentation
  • Impact: MIHD ready for 286 experiments with complete spatial data; gadget supports cross-device workflows and is open-sourced; error recovery benchmark infrastructure complete with proper demo replay; CalendarPro production-ready with auto-learning, personalized energy projection, and thought organization

DCC

  • What was done: MIHD spatial transcriptomics benchmark: data repair (4 failed sections) and complete 7-phase enhancement plan design (normalization/Q-Former/LLaVA MLP/Niche/BatchCorrection/multi-section/config refactoring)
  • How it was done: Extracted missing spatial coordinates from Dataset.zip, fixed frequency filter boundary checks, added mclust→KMeans fallback, fixed GPU monitoring thread; explored codebase (config_manager.py 590 lines, run_benchmark.py 2600 lines) and QueST reference implementation, wrote self-contained plan with exact line numbers
  • Impact: All 11 DLPFC sections now functional with complete spatial data; comprehensive Phase 1-7 blueprint provides detailed roadmap for implementation including precise integration points and dependencies

MacBook

  • What was done: gadget toolkit: refactored daily summary tool to two-phase multi-device architecture (export→merge), integrated ccusage token statistics, initialized Git repository with comprehensive documentation
  • How it was done: Redesigned daily_summary.py with CLI subcommands, added device info collection, designed recoverable JSON log format, used subprocess for token stats; created .gitignore, managed test/ as git submodule, wrote 7 READMEs covering all tools
  • Impact: Daily report tool now supports cross-device collaborative workflows with automatic token usage tracking; gadget repository open-sourced to GitHub with complete documentation improving maintainability

tianhe

  • What was done: Error recovery benchmark: completed v4.1 infrastructure (4/4 validators, video annotations), diagnosed and fixed critical demo replay environment mismatch through 3-layer root cause analysis, condensed documentation from 615 to 101 lines
  • How it was done: Implemented LargeOffsetValidator and StuckValidator with 41 passing tests; added cv2-based frame annotations; identified PickPlace_D0+controller_configs vs bare PickPlace mismatch by loading env_args from HDF5 metadata; systematic code cleanup removing ~190 lines dead code
  • Impact: Scene generation improved 10x (3→30 scenes) with proper EEF proximity (5cm vs 22cm); trigger steps now occur mid-demo when robot approaches objects; documentation became actionable and concise at 1/6th original size

TzJsDesktop

  • What was done: CalendarPro major release: implemented recurring task auto-scheduling system, fixed production bugs (dual-verification mismatch, error swallowing, recurring event modification), completed P0 reliability fixes + P1 intelligence upgrades, built Random Thoughts auto-organization feature, comprehensive documentation updates
  • How it was done: Created RecurringTaskStore with JSONL persistence and PeriodicChecker with asyncio background loop; fixed dual_verify.py to prefer LLM over semantic router; added CalendarServiceError exception propagation; implemented JSON parsing resilience, AI provider 30s timeouts, message queue done callbacks; added learning data auto-collection with energy projection personalization; built thought capture system with idle detection and AI organization
  • Impact: 107/110 tests passing; users now see detailed error messages instead of silent failures; system auto-learns from user behavior to personalize energy predictions; recurring tasks schedule automatically; fleeting thoughts captured and organized into goal hierarchies during idle periods

Comprehensive multi-project development day: fixed MIHD spatial transcriptomics data issues and designed 7-phase enhancement plan; refactored gadget daily report tool to two-phase multi-device architecture and established Git repository; implemented error recovery benchmark validators and fixed critical demo replay environment mismatch; built CalendarPro recurring task auto-scheduling, fixed production bugs, and implemented P0/P1 roadmap with Random Thoughts feature

Tasks

Architecture & Strategy

  • Design MIHD 7-phase enhancement plan — Explored codebase and QueST reference, designed Phase 1-7: Config refactoring, normalization integration, UNI2+scGPT experiments, Q-Former/LLaVA MLP fusion, Niche querying, batch correction, multi-section mode. Wrote complete self-contained plan with exact line numbers to mutable-riding-eclipse.md
  • Fix demo replay environment configuration mismatch — Applied 3-layer root cause analysis to identify PickPlace_D0+controller_configs vs bare PickPlace mismatch; loaded env_args from HDF5 metadata; restored proximity thresholds after fix
  • Fix CalendarPro dual-verify intent mismatch — Modified dual_verify.py to prefer LLM intent over semantic router on mismatch, as LLM has full conversation context while SR only matches keywords
  • Add CalendarPro calendar error reporting — Refactored calendar_service.py to raise CalendarServiceError instead of silent failures; updated all handlers (discord_bot, scheduler, api_routes) to catch and display detailed error messages
  • Fix MIHD 4 failed sections data issues — Extracted missing spatial files (tissue_positions_list.csv, scalefactors_json.json, images) from Dataset.zip; fixed frequency filter boundary check; added mclust→KMeans fallback
  • Refactor gadget daily summary to two-phase architecture — Redesigned daily_summary.py with CLI subcommands (export/merge/legacy); added device info collection; designed versioned JSON log format; implemented token usage aggregation
  • Implement CalendarPro recurring task system — Created RecurringTaskStore with JSONL persistence, PeriodicChecker with asyncio background loop (15min interval), added MANAGE_RECURRING/QUERY_RECURRING intents, semantic routing, Discord integration. 18 passing tests.
  • Fix CalendarPro recurring event modification — Modified update_event() to detect recurring instances and strip recurrence/recurringEventId fields before updating, so Google Calendar creates exception for single instance only
  • Create CalendarPro PLANNING.md — Created 330+ line comprehensive planning document with project positioning, module maturity ratings, goal hierarchy, architecture decisions with rationale, P0-P3 roadmap, known gaps
  • CalendarPro P0 reliability fixes — Implemented JSON parsing resilience with 3-stage fallback, AI provider 30s timeouts (asyncio.wait_for + httpx.Timeout), message queue done callbacks, service layer error handling, 56 intent classification boundary tests
  • CalendarPro P1 intelligence upgrades — Implemented learning data auto-collection with backfill_energy_change(), personalized energy projection via personalize_rhythm(), integrated learning into IntelligentScheduler, improved conversation context formatting
  • Implement CalendarPro Random Thoughts feature — Built complete thought collection system: ThoughtStore with JSONL storage, IdleDetector reusing EssentialScheduler, ThoughtOrganizer with background asyncio loop, Discord integration with 3 handler methods, 25 passing tests
  • Write gadget comprehensive documentation — Wrote independent READMEs for 7 tools (summarize/Video/audio/image/papers/git/test), root README with tool overview table, and summarize/tutorial.md quick start guide
  • Fix MuJoCo velocity swap bug — Corrected env_wrapper.py to read cvel[3:] as linear velocity and cvel[:3] as angular velocity (MuJoCo stores [angular, linear])
  • Implement error recovery validators (LargeOffset, Stuck) — Created large_offset.py and stuck.py validators with config sections and 16 unit tests (8 each), completing 4/4 validator suite
  • Condense error recovery CLAUDE.md documentation — Reduced from 615 to 101 lines by eliminating repetition, removing README-appropriate content, consolidating sections, focusing on non-obvious information
  • Enhance visualization with frame annotations — Added cv2-based annotations: phase-colored banners (green/red/orange), semi-transparent info boxes with detection/injection/validation details, frame counter

Implementation & Fixes

  • Initialize gadget Git repository — Created .gitignore, git init, added test/ as submodule pointing to TzJ2006/test.git, committed and pushed to git@github.com:TzJ2006/gadget.git
  • Integrate ccusage token statistics — Added fetch_ccusage() via subprocess calling npx ccusage, parsing JSON output; integrated into all three entry points; rendered Token Usage section in markdown reports
  • Update CalendarPro documentation — Updated CLAUDE.md with 10 previously undocumented systems; expanded README with 4-category usage examples, Discord command reference, learning system documentation; added PowerShell startup scripts
  • 🔄 Error recovery code cleanup — Phase 1 completed: deleted ~190 lines dead code (ReplaySystem, ReplayDriftError, duplicate detect() method); annotated BCPolicy stub. Phases 2-5 interrupted

Problems & Solutions

Critical Issues

1. Error recovery robot never approaches objects during demo replay (min distance 0.22m, task requires contact)

Solution: Traced through robosuite source, HDF5 metadata, MuJoCo body mappings to discover: demos recorded with PickPlace_D0+controller_configs but replayed as bare PickPlace. Same actions produce completely different trajectories.

Key Insight: Environment configuration (controller_configs with kp, damping, ramp_ratio) fundamentally changes robot dynamics. Always replay with exact environment metadata from HDF5 dataset—parameter tweaking masks root causes

2. CalendarPro semantic router and LLM disagreed, system always used SR causing incorrect routing (e.g., ’leetcode’ keyword → manage_recurring instead of update)

Solution: Changed dual_verify.py to prefer LLM intent over SR on mismatch. LLM has full conversation context while SR only matches keywords. Logs show ‘→ using LLM intent’ for monitoring.

Key Insight: Keyword-based classifiers fail on ambiguous utterances. When semantic router and LLM disagree, trust the model with more context (LLM), not faster one (SR). SR filters obvious cases, LLM is arbiter.

3. MIHD 4 sections data missing causing pipeline failures (spatial files, frequency filter empty patches, STAIG model collapse)

Solution: Extracted spatial files from Dataset.zip; added boundary checks (min_w/min_h >= 10); added mclust fallback to KMeans with try/except wrapper

Key Insight: Spatial transcriptomics data requires robust fault tolerance: multi-path candidate search, image processing boundary checks, statistical model fallback strategies to handle distribution anomalies

4. gadget original single-step workflow couldn’t support multi-device collaboration (required manual log copying per device)

Solution: Refactored to two-phase: (1) export subcommand for local JSON log creation (no API key needed) with device info; (2) merge subcommand aggregating multiple logs and calling API for final report; kept legacy mode for backwards compatibility

Key Insight: Multi-device workflows need portable intermediate format (versioned JSON log) and clear phase separation (local parse vs remote merge). Key design: device info collection, version support for future expansion, optional per-device summaries to prevent information loss in merge

5. All error detectors failed after adding proximity gating—iterative threshold relaxation (0.05→0.15→0.25→0.30m) produced zero triggers

Solution: Wrote diagnostic script measuring actual EEF-object distances, discovering environment mismatch rather than threshold issue. Root cause was replay configuration, not detector sensitivity.

Key Insight: When all detectors fail, instrument with diagnostic logging to measure ground truth before adjusting thresholds. Symptoms (no triggers) often mask fundamental mismatches (wrong controller dynamics)

6. CalendarPro calendar API errors (403 insufficientPermissions, HttpError) caught with print() and returned None, leaving users confused with generic ‘Failed’ messages

Solution: Created CalendarServiceError exception; refactored all calendar_service methods to raise with detailed context; updated all callers to catch and display user-friendly messages with technical details

Key Insight: Silent error swallowing (print + return None) breaks error contract. Users can’t fix what they can’t see. Always propagate errors with context to presentation layer, then format appropriately

7. CalendarPro AI providers had no timeout handling—network hangs could freeze entire bot indefinitely

Solution: Wrapped all API calls with asyncio.wait_for(timeout=30.0) and added httpx.Timeout(30.0) to client constructors, returning AIResponse with error field on timeout

Key Insight: Timeout protection needs dual-layer defense: asyncio coroutine level (wait_for) and HTTP client level (httpx.Timeout) to catch different failure modes

8. CalendarPro JSON parsing failures when AI returns prose before JSON, multiple blocks, or truncated JSON—causing intent classification crashes

Solution: Implemented _extract_json() with balanced brace counting to extract first complete object; added 3-stage fallback (direct parse → trailing-comma fix → GENERAL intent); removed ValueError raises for logging + fallback

Key Insight: Production AI systems need graceful degradation—never crash on malformed output, always provide safe fallback intent

9. Plan document insufficient self-containment—user rejected ExitPlanMode multiple times requesting ‘write every word of your plan inside the plan file’

Solution: Rewrote plan with complete self-containment: added User Decision Record, Code Snapshot with exact line numbers, QueST Reference Code details, full implementation code with ‘Insert after line X’ positions for each Phase

Key Insight: Plan Mode documents must be completely self-contained for future session recovery. User rejection signals insufficient detail—need all exploration results (exact locations, line numbers, function signatures, existing code) written into plan, not relying on external context

10. MuJoCo velocity swap causing false instability triggers (angular velocity misread as linear)

Solution: Swapped array slicing: linvel = cvel[3:], angvel = cvel[:3] to match MuJoCo’s [angular(3), linear(3)] layout

Key Insight: Documentation mismatch: code comment claimed [linear, angular] but MuJoCo stores [angular, linear]. Always verify against source documentation, not inline comments

11. Error recovery CLAUDE.md was 615 lines with heavy repetition between sections, plus content belonging in README files

Solution: Rewrote focusing on: (1) non-obvious information (server constraints, common pitfalls); (2) consolidated commands into single block; (3) removed easily discoverable content (file trees, method signatures); (4) kept only architecture requiring multi-file reading

Key Insight: Documentation for AI agents should focus on what can’t be discovered through tools, not comprehensive reference. Conciseness improves usability—101 lines vs 615 lines with better clarity

12. CalendarPro updating recurring events modified entire series instead of single instance, despite search using singleEvents=True

Solution: Modified update_event() to detect recurring instances (has recurringEventId) and strip recurrence/recurringEventId before calling API. Google Calendar creates exception for that instance only.

Key Insight: Google Calendar API implicit behavior: singleEvents=True in search gives instance IDs, but update/delete need explicit field removal to avoid series-wide changes. Always test recurring operations on test calendars

13. CalendarPro asyncio.create_task() for message queues had no exception callback—tasks could silently die with full queues, user messages never processed

Solution: Added done_callback=_on_queue_task_done to all create_task calls; implemented cleanup handler logging exceptions and removing dead tasks; added close() method for shutdown

Key Insight: Asyncio background tasks are ‘fire and forget’ by default—always add done callbacks for monitoring/cleanup, especially long-lived tasks

General Issues

14. Manual token usage querying was tedious—users wanted automatic daily statistics

Solution: Integrated ccusage via subprocess calling npx ccusage@latest daily –json, parsing output; auto-collection in all three entry points; rendered Token Usage section with total table + model details; merge aggregates across devices

Key Insight: Automate data collection by leveraging existing tools rather than reimplementing. Design considerations: subprocess fault tolerance (silent skip if unavailable), multi-device aggregation strategy (sum tokens/costs, merge model details), readable presentation (tables > lists)

15. MIHD GPU peak statistics always zero (ResourceMonitor never called update_peak_stats())

Solution: Refactored ResourceMonitor: start_monitoring() launches daemon thread sampling every second, stop_monitoring() terminates thread and samples final peaks, added threading.Event lifecycle control

Key Insight: Monitoring peak statistics requires continuous sampling during operation, not just start/stop snapshots. Background daemon threads are standard solution but need proper lifecycle management to avoid resource leaks

16. gadget test/ directory was nested git repo with own remote, causing nested repo conflicts on git add

Solution: Used git submodule: moved test to backup, ran ‘git submodule add git@github.com:TzJ2006/test.git test’ cloning to correct commit, deleted backup, .gitmodules auto-records config

Key Insight: Git submodules are standard for nested repos with independent remotes. Key points: submodule records commit hash not branch; clone requires ‘git submodule update –init –recursive’; updating needs cd into submodule, git pull, then commit hash change

17. CalendarPro start.bat couldn’t detect conda environment (cmd doesn’t support ‘conda activate’ without conda init, CONDA_PREFIX unavailable in new cmd windows)

Solution: Created start.ps1 with native PowerShell conda support; PowerShell runs ‘conda activate calendarpro’ directly. Updated start.bat to delegate to PowerShell with -ExecutionPolicy Bypass; added PID tracking and stop.ps1

Key Insight: Windows batch files have poor conda integration. PowerShell is better choice for conda workflows on Windows. Always test environment activation in fresh shells, not inherited conda sessions

18. CalendarPro mock patching failed because generate_with_fallback imported locally inside methods, not at module level

Solution: Changed patch target from ‘src.thoughts.thought_organizer.generate_with_fallback’ to ‘src.ai.provider_selector.generate_with_fallback’ to patch at source module

Key Insight: When mocking, patch where function is defined, not where imported—local imports create new references bypassing module-level patches

19. CalendarPro pytest async tests failed with ‘coroutine never awaited’ warnings after creating test_thoughts.py

Solution: Installed pytest-asyncio package which auto-detects async test functions and runs them in event loop

Key Insight: pytest doesn’t natively support async tests—need pytest-asyncio plugin already in pyproject.toml dependencies

Human vs AI Approaches

Strategic Level

Root cause analysis methodology for demo replay

Role Approach
Human Systematic 3-layer analysis: (1) identified environment config mismatch by comparing recording vs replay code; (2) identified secondary issues (initialization vibration, no proximity gate); (3) recognized previous threshold widening as symptom masking
AI Would likely have continued tweaking proximity thresholds and detector parameters, treating symptoms rather than finding root configuration mismatch

Difference Analysis: Human applied structured root cause analysis (compare recording vs replay environments), while AI would incrementally adjust parameters. Human recognized threshold widening as masking real problem; AI would accept it as solution

Plan document detail requirements

Role Approach
Human Rejected ExitPlanMode multiple times, explicitly demanded ‘write every word of your plan inside the plan file’—emphasizing complete self-containment with all exact line numbers and code snippets
AI Initially wrote high-level steps and file checklist, assuming exact line numbers and code could be found during implementation

Difference Analysis: Human emphasized future session recovery capability—plan must be fully executable without current context. AI underestimated self-containment importance, requiring multiple iterations to understand expectation (plan = complete implementation manual, not brief task list)

Suspecting EEF distance calculation error when robot never approaches objects

Role Approach
Human Immediately questioned distance measurement methodology when told robot never closer than 0.22m, asking ‘how is this calculated?’ and suspecting measurement bug
AI Initially accepted 0.22m as ground truth, focused on threshold adjustment (0.05→0.15→0.25→0.30m) rather than validating measurement itself

Difference Analysis: Human’s domain expertise (pick-and-place requires contact) triggered skepticism about measurements. AI treated symptoms (adjust thresholds) not questioning measurement validity until redirected

Bug diagnosis from production logs

Role Approach
Human Read startup logs, immediately spotted SR/LLM mismatch (’leetcode’ classified as manage_recurring) and calendar 403 errors being swallowed, diagnosed root causes without prompting
AI Didn’t proactively analyze logs. Required human to point out specific issues before investigating

Difference Analysis: Human performed domain-aware log analysis (understood intent classification semantics and error propagation patterns). AI only reacted to explicit instructions

MIHD enhancement plan implementation strategy and technical choices

Role Approach
Human Chose ‘Phase 1→7 full sequential implementation’ (not partial), Q-Former loop-based version first (no batch optimization), batch correction requires simultaneous multi-section analysis (not single-section only)
AI Provided 3 options (full/partial/specific Phases), inquired about performance optimization (Q-Former batching) and functionality scope (single vs joint mode) for each technical decision point

Difference Analysis: Human favored completeness and progressive optimization (validate loop version first, then consider batching), while AI offered options weighing performance. Human’s joint-mode decision showed understanding of batch correction use cases (single-section doesn’t need correction)

Documentation philosophy for AI agents

Role Approach
Human Documentation should focus on non-obvious information: server constraints, architectural patterns requiring multi-file understanding, common pitfalls. Eliminate discoverable information (file trees, method signatures) and repetition
AI AI typically creates comprehensive reference documentation with full file trees, detailed API signatures, troubleshooting sections, and redundant content across sections

Difference Analysis: Human recognized AI agents can discover structure via tools and don’t need reference material—they need contextual guidance. AI defaults to comprehensive documentation suitable for human developers

CalendarPro implementation planning and task decomposition

Role Approach
Human Provided extremely detailed plans with exact file paths, method signatures, code examples, integration points, and rationale—minimizing ambiguity
AI Followed plans systematically, creating TodoWrite tasks, executing in dependency order, but occasionally needed trial-and-error for edge cases not covered in plan (e.g., mock patching paths)

Difference Analysis: Human front-loaded architectural thinking and anticipated integration challenges, while AI excelled at systematic execution but needed iterative discovery for uncovered edge cases

Two-phase export/merge workflow for multi-device summarization

Role Approach
Human Immediately recognized need for per-device export → centralized merge due to physical device separation and manual file transfer
AI Initially proposed single-phase solution running on all devices simultaneously, missing practical constraint of offline device coordination

Difference Analysis: Human anticipated operational constraints (manual file copying, async device usage) that AI overlooked when designing pipeline. User’s domain knowledge of actual usage pattern drove architectural decision

Autonomous agent usage for codebase exploration

Role Approach
Human Explicitly launched 3 parallel Explore agents to comprehensively understand CalendarPro’s vision, intelligence layer, and extensibility before writing planning doc
AI Would typically read key files sequentially and synthesize understanding incrementally—human’s approach was more thorough and parallel

Difference Analysis: Human recognized value of comprehensive upfront exploration using specialized agents before committing to document structure—more strategic than AI’s typical incremental approach

AI Limitations

Critical Limitations

  • Initially misdiagnosed visualization problem as ‘missing frames’ when real issue was ‘missing causal context’—failed to grasp that error injection needs temporal narrative (demo replay → trigger → injection)
  • Failed to independently identify demo replay root cause—required explicit human analysis showing PickPlace_D0+controller_configs vs bare PickPlace mismatch. Would have continued parameter tweaking rather than questioning fundamental environment configuration
  • Didn’t proactively analyze production logs to identify bugs. Required human to diagnose issues (SR/LLM mismatch, error swallowing) before implementing fixes
  • Failed to understand ‘self-contained plan’ concept initially—required multiple ExitPlanMode rejections before realizing need to write all exploration results (exact line numbers, code snippets, file summaries) into plan file rather than relying on external context
  • Attempted to exit plan mode autonomously without explicit user confirmation—failed to recognize that comprehensive 3-agent exploration output deserved human review before implementation

General Limitations

  • Repeatedly failed SSH command construction (6+ times) by omitting ‘cd’ to project directory despite explicit user corrections—failed to update working mental model of cluster filesystem structure
  • Modified MIHD GPU monitoring code without running verification tests first. Although fix was correct (background thread sampling), lacked actual runtime validation of modified code
  • Attempted cmd.exe conda workarounds before recognizing platform limitation. Needed human to suggest PowerShell as proper solution
  • When mocking in tests, initially patched at wrong module level (local import path instead of source module), requiring trial-and-error correction through test execution

Learnings

Key Learnings

  • Environment configuration (controller_configs) fundamentally changes robot dynamics in robosuite. Always extract and use exact env_name + env_kwargs from HDF5 dataset metadata when replaying demos
  • Error injection visualization requires 3-phase narrative: (1) replay demo actions leading to trigger, (2) show detection trigger moment, (3) inject error and show consequences. Static snapshot restoration loses ‘why inject now?’ context
  • Robotic simulation replay fidelity requires exact environment configuration matching including controller parameters (OSC_POSE, kp, damping, ramp_ratio), not just task name. Demo metadata (env_args in HDF5) must be loaded to recreate identical dynamics
  • Never swallow errors silently (print + return None). Always propagate with context to presentation layer. Users can’t fix what they can’t see
  • Multi-device workflow two-phase pattern: local export (no API) + remote merge (needs API). Key elements: versioned intermediate format (JSON log), device info collection, optional per-device summaries
  • Plan Mode goal is generating completely self-contained implementation manuals, needing all exploration results (exact code locations, line numbers, function signatures, existing snippets), not brief task lists
  • Systematic root cause analysis beats incremental parameter tweaking. When detection fails, compare recording vs replay environment configuration systematically before adjusting thresholds. Parameter widening often masks fundamental mismatches
  • When dual classifiers disagree (semantic router vs LLM), trust the one with more context (LLM). Keyword matching fails on ambiguous utterances
  • Timeout protection requires dual-layer defense: asyncio.wait_for() for coroutine-level timeouts + httpx.Timeout() for connection-level timeouts—different failure modes require different protection mechanisms
  • Production AI systems must never crash on malformed AI output—implement 3-stage fallback (direct parse → repair → safe default) with comprehensive logging at each stage
  • When implementing new features in established codebase, studying existing analogous patterns (ThoughtOrganizer → PeriodicChecker) ensures architectural consistency and reduces integration friction
  • Spatial transcriptomics data fault tolerance design: multi-path candidate search (main_dir and Dataset/DLPFC), image processing boundary checks, statistical model fallback strategies (mclust → KMeans)
  • MuJoCo cvel stores [angular(3), linear(3)], not [linear(3), angular(3)]. Always verify binary data layouts against primary documentation, not inline comments
  • Documentation for AI agents should focus on non-obvious information and architectural patterns requiring multi-file understanding, not comprehensive reference material. AI agents can discover file structure and method signatures through tools—they need contextual guidance on pitfalls and constraints
  • Google Calendar API recurring events: singleEvents=True gives instance IDs, but update/delete need explicit field stripping (recurrence, recurringEventId) to avoid series-wide changes
  • Comprehensive planning documents (like PLANNING.md with maturity ratings, roadmap priorities, architecture rationale) provide strategic foundation for incremental development
  • Asyncio background tasks need explicit lifecycle management: create_task + done_callback for monitoring, close() method for cleanup, proper exception logging to prevent silent failures
  • CalendarPro architecture pattern: JSONL append-only for fast writes (thoughts.jsonl, intent_mismatches.jsonl), JSON for mutable state, reuse existing data sources (DEFAULT_MEALS/DEFAULT_SLEEP) as single source of truth
  • Comprehensive upfront exploration (using parallel Explore agents) before writing architectural documents produces better results than incremental discovery—strategic thinking pays off
  • Two-phase pipelines (export → merge) are natural patterns for multi-device workflows with manual data transfer. Per-device exports enable incremental processing and async device usage
  • Lazy imports (import statements inside methods) useful for breaking circular dependencies, but require special test handling: mock the consuming module’s namespace, not original module

Practical Learnings

  • Automate data collection by leveraging existing tools (ccusage) not reimplementing. Design considerations: subprocess fault tolerance (silent skip on failure), multi-device aggregation strategy (sum/merge), readable presentation (tables > lists)
  • Git submodule use cases and management: suitable for independent-remote subprojects, records commit hash not branch, clone needs –recursive, updates require cd + git pull + commit hash change
  • Monitoring peak statistics requires continuous sampling during operation (background thread), not just start/stop snapshots. Need proper thread lifecycle management (Event mechanism) to avoid resource leaks
  • Windows conda workflows require PowerShell, not cmd.exe. Batch files lack proper conda integration. Always test environment activation in fresh shells
  • When mocking in pytest, always patch at source module where function is defined, not where it’s imported—local imports create new references bypassing module-level patches
  • Cluster filesystem semantics: shared storage means identical paths across nodes, but SSH sessions default to home directory—always cd explicitly in remote commands

Conversation Summaries

MIHD

✅ Data repair and 7-phase enhancement plan design 2026-02-13 | claude_code Fixed 4 failed DLPFC sections (extracted spatial files from Dataset.zip, fixed frequency filter boundary checks, added mclust→KMeans fallback, fixed GPU monitoring with background thread). Deep exploration of codebase (config_manager.py 590 lines, run_benchmark.py 2600 lines) and QueST reference implementation. Designed comprehensive Phase 1-7 plan: Config refactoring, normalization integration, UNI2+scGPT experiments, Q-Former/LLaVA MLP fusion, Niche querying (QueST GIN encoder), batch correction (adversarial training), multi-section joint mode. Wrote completely self-contained plan document with exact line numbers, full code, and 13-file change manifest to mutable-riding-eclipse.md. All 11 sections now functional, ready for ~286 experiments.

gadget

✅ Daily summary tool refactoring and Git repository initialization 2026-02-13 | claude_code Refactored daily_summary.py to two-phase architecture: export subcommand (local JSON log with device info, optional per-device summary, no API needed), merge subcommand (aggregate multi-device logs + API call for final report), legacy mode for backwards compatibility. Integrated ccusage token statistics via subprocess (npx ccusage@latest), rendering Token Usage section in reports. Initialized Git repository: created .gitignore, added test/ as git submodule (TzJ2006/test.git commit 1dc527c), pushed to git@github.com:TzJ2006/gadget.git. Wrote comprehensive documentation: 7 independent READMEs (summarize/Video/audio/image/papers/git/test), root README with tool overview, and summarize/tutorial.md. Supports cross-device workflows with automatic token tracking, now open-sourced with complete docs.

error_recovery_benchmark

✅ v4.1 infrastructure completion and demo replay bug fix 2026-02-13 | claude_code Completed v4.1 infrastructure: implemented LargeOffsetValidator and StuckValidator (S5.1, S5.2) with 16 unit tests, enhanced visualization with cv2-based frame annotations (phase-colored banners, info boxes, frame counter), updated documentation to 4/4 validators. Attempted GPU cluster smoke test but encountered SSH path issues. Fixed critical bug through 3-layer root cause analysis: demos recorded with PickPlace_D0+controller_configs (OSC_POSE, kp=150) but replayed as bare PickPlace causing trajectory mismatch. Modified generate_scenes.py and visualize_scene.py to load env_args from HDF5 metadata, restored proximity thresholds. Result: scene generation improved 10x (3→30 scenes), EEF proximity improved from 22cm to 5cm, trigger steps now mid-demo (52-121) when robot approaches objects. Condensed CLAUDE.md from 615 to 101 lines by eliminating repetition and focusing on non-obvious information. Code cleanup: deleted ~190 lines dead code (ReplaySystem, duplicate detect() method). 41 tests passing, infrastructure complete.

CalendarPro

✅ Recurring tasks, production bug fixes, P0/P1 improvements, Random Thoughts feature 2026-02-13 | claude_code Major release spanning multiple sessions: (1) Implemented recurring task auto-scheduling system (RecurringTaskStore with JSONL, PeriodicChecker with 15min asyncio background loop, MANAGE_RECURRING/QUERY_RECURRING intents, semantic routing, Discord integration, 18 tests). (2) Fixed production bugs: dual_verify.py to prefer LLM over semantic router on mismatch; added CalendarServiceError exception propagation throughout calendar_service; fixed recurring event modification to affect single instances only by stripping recurrence fields; created PowerShell startup scripts for proper Windows conda support. (3) Created comprehensive PLANNING.md (330+ lines) documenting architecture, module maturity, goal hierarchy, P0-P3 roadmap. (4) Implemented P0 reliability fixes: JSON parsing resilience with 3-stage fallback, AI provider 30s timeouts (asyncio.wait_for + httpx.Timeout), message queue done callbacks, service layer error handling, 56 intent classification boundary tests. (5) Implemented P1 intelligence upgrades: learning data auto-collection with backfill_energy_change(), personalized energy projection via personalize_rhythm(), integrated learning into IntelligentScheduler, improved conversation context formatting. (6) Built Random Thoughts feature: ThoughtStore with JSONL, IdleDetector reusing EssentialScheduler, ThoughtOrganizer with background loop for AI-powered organization during idle periods, Discord integration, 25 tests. (7) Updated documentation: CLAUDE.md with 10 undocumented systems, expanded README with 4-category examples and learning system docs. Final status: 107/110 tests passing (3 pre-existing browser failures), production-ready with auto-learning, personalized energy projection, recurring task scheduling, and thought organization.

Token Usage

AI Usage · 2026-02-13 Claude Code + Codex
Total cost
$34.78
Total tokens
96M
Output tokens
74K
Cache read
91.2%
Cost split Claude Code $29 · Codex $6
Token character Cache reads 91.2% · Active 8.8%

Most token volume came from cache reads; Claude Code drove nearly all cost.