코드 결함 1건 + 문서 정확성 nit 3건. 사용자 동작에 영향 있는 건 (1)
번만, 나머지는 문서 정정.
(1) _LazyLlmService._delegate sticky cache 수정 (main.dart)
- 기존: 첫 호출 시점에 잡힌 delegate (Mock vs Gemma) 가 앱 재시작까지
유지 — 옵트인 OFF 상태에서 첫 suggestFrame 호출 → Mock 잡힘 → 사용자
옵트인 ON + 다운로드 완료 후에도 같은 Mock 만 반환 (사용자는 AI 가
켜진 줄 알고 mock 응답 받음).
- 수정: 매 _resolve() 호출마다 checkAvailability 재평가. 캐시는
(Gemma↔Mock 종류) + (Gemma 의 modelPath) 모두 일치할 때만 재사용 →
state 변화 시 자동 교체. flutter_gemma installModel 자체가
idempotent 라 반복 resolve 비용 무시 가능.
(2) reference doc nit 3건 — 04-QA round 2 가 08-Documenter 로 인계한
nit 를 Reviewer 가 직접 정정:
- L184: "device_info_plus 로 systemFeatures / totalMem 조회" → 실
구현은 MethodChannel `life_helper/device_caps`. device_info_plus
는 deps 에 있지만 4GB 임계 측정엔 미사용 (isLowRamDevice 는 ~1GB).
- L186: F1 후속 이슈 번호 "#222 등" → "#219 별도 이슈".
- L191: follow-up 매핑 — 임의 "#219 ProGuard rules 정제" 항목 제거.
Planner OOS 기준 #219=F1 unload, #220=F2 purge, #221=AC10 corpus,
#222=production keystore 로 정정.
검증: flutter analyze 무이슈, flutter test 88/88 통과.
Refs #218
QA round 1 (commit 9a9eb2a) FAIL 시 누락된 두 AC 보강.
AC-6: device_info_plus 만으론 4GB 임계 측정 불가 (isLowRamDevice 는
~1GB 기준). MethodChannel `life_helper/device_caps` 신설 + MainActivity.kt
에서 ActivityManager.MemoryInfo.totalMem 노출. data/ai/device_capabilities.dart
는 DeviceCapabilities abstract + PlatformDeviceCapabilities + 4 GiB
임계. deviceMeetsAiRamProvider (FutureProvider<bool>, fail-closed).
SettingsScreen 토글 disabled + "RAM 부족" 안내 (RAM < 4GB).
AC-10: docs/reference/215-ai-frame-suggest.md 의 OQ-1/placeholder
6곳을 실 구현 표현으로 갱신. §8 알려진 제약 = AC-6 device gate +
AC-7 실 단말 E2E + F1 unload + #221 corpus 평가. §9 다음 단계 =
#219~#222 follow-up 목록. 신규 테스트 합계 41 / 전체 88 통과.
테스트: device_capabilities_test.dart 7 신규 (kAiMinRamBytes 동등,
null/0/3.9GB/4GB-1/4GB/8GB 경계). flutter analyze 무이슈, 전체 88 통과
(71 기존 + 10 gemma + 7 RAM gate).
Architect 설계서 §4 의 "RAM 4GB 차단 = AC-9 재활용" 문구는 사실 #215
미구현 사항이라 본 라운드에서 신규 추가했음을 README 에 명기.
Refs #218
- docs/reference/215-ai-frame-suggest.md — v0.2.0 모듈/함수/Riverpod/meta_kv 사양
- docs/guides/ai-help-onboarding.md — AI 도움 켜기/끄기 사용자 가이드
- docs/design/215-gemma-frame-suggest/{README,fn-suggest_frame,fn-model_lifecycle}
상태 Draft → Approved, 추적성 헤더에 실제 구현 파일/테스트 경로 + 레퍼런스/가이드 cross-link
- docs/README.md — 현재 발행된 문서 인덱스 섹션 추가
Refs #215
- ADR-0003: on-device LLM Gemma 4 E2B Q4_0 + flutter_gemma 도입 결정.
5개 대안(클라우드/정적확장/Llama/E4B/APK번들) 기각 사유 명시.
- docs/design/215-gemma-frame-suggest/: 설계서 게이트 통과 산출물.
README.md (12 섹션 전부 + AC10 + OQ6 + 함수 15개) +
fn-suggest_frame.md (suggestFrame/buildFewShotPrompt/parseFrameCandidates) +
fn-model_lifecycle.md (LlmService/GemmaLlmService/ModelLifecycle).
- graceful degradation 전면: AI 실패 시 throw 없이 빈 리스트 + 수동 입력 유지.
- LlmService 추상화로 도메인 ↔ flutter_gemma 경계 분리 (테스트 가능성).
Refs #215
Existing life-helper already has the Redmine project (id=12), 8 persona
categories, and Gitea remote, so this commit applies only the local-side
pieces of the cloud-handson convention:
- .claude/settings.json (safe-but-maximal permissions: allow-all + deny dangerous)
- .claude/agents/ (8 persona subagents: planner/architect/designer/developer/reviewer/qa/release/documenter)
- .claude/workflows/persona-pipeline.js
- CLAUDE.md (Design-First hard gate)
- docs/ skeleton (Diátaxis + ADR + design templates + QUEUE-PROTOCOL)
- scripts/enqueue.sh
- .env.example
.gitignore: switched .claude/ blanket-ignore to .claude/settings.local.json
so the new settings/agents/workflows actually commit. .env and nutrition/ stay ignored.
Existing root SoT files (huberman-protocols.md, habit-*.md, data-model.md,
schema/) are untouched.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>