[Architect] Refs #204 — apply OQ decisions: diet_pattern (19th), ADR-0002 normalize dose_variants
- OQ-1: dose_variants 정규화 결정을 ADR-0002 로 승격 (ADR-0001 = 왜, ADR-0002 = 어떻게). - OQ-3: nutrition diet 패턴 5개를 별도 diet_pattern 카탈로그(19번째 SoT)로 분리. · 02-catalog §8 신규, 인덱스 IDX_diet_patterns_evidence / IDX_diet_patterns_kfit. · 05-seed: diet_patterns.json (5행) 추가, 로딩 순서 끝에 배치. · 04-migrations: v1 테이블 합계 = Catalog 8 + User 11 + 부속 1 + meta_kv = 21. - README §2/§3/§6/§11 갱신: 18→19 SoT, AC-2 에 diet_pattern=5 검증 추가. - README §12 OQ → Resolved Open Questions 표 (OQ-1~OQ-8 결정 결과). - habit_dose_variant → habit_dose_variants 표기 통일. - fn-weekly-minimum-ratio, 03-drift-schema-user 의 ADR-0002 cross-link. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
"methodology": "./methodology.schema.json",
|
||||
"frame_pattern": "./frame_pattern.schema.json",
|
||||
"reward_menu_item": "./reward_menu_item.schema.json",
|
||||
"reference": "./reference.schema.json"
|
||||
"reference": "./reference.schema.json",
|
||||
"diet_pattern": "./diet_pattern.schema.json"
|
||||
},
|
||||
"user_data": {
|
||||
"user": "./user.schema.json",
|
||||
@@ -38,7 +39,9 @@
|
||||
{ "id": "R5", "rule": "tracker_entry.value ∈ {done, blank} 2값만", "enforced_in": "tracker_entry.schema.json (enum)" },
|
||||
{ "id": "R6", "rule": "phase.duration_weeks = 6 default, 6주 중간 anchor 변경 warning", "enforced_in": "application layer" },
|
||||
{ "id": "R7", "rule": "if_then_rule.then_action 회피 키워드 감지 시 warning", "enforced_in": "client-side linter" },
|
||||
{ "id": "R8", "rule": "habit 일일 운영 ≤ 2분 (UX 제약)", "enforced_in": "UI design (not in schema)" }
|
||||
{ "id": "R8", "rule": "habit 일일 운영 ≤ 2분 (UX 제약)", "enforced_in": "UI design (not in schema)" },
|
||||
{ "id": "R9", "rule": "habit.dose_variants[] 개수 제한 없음. 체크인 UX는 장소 1탭 + 컨디션 1탭 → 추천 흐름으로 R8 유지", "enforced_in": "application + UI", "source": "docs/adr/0001-dose-variants.md" },
|
||||
{ "id": "R10", "rule": "reflection.scope='weekly'은 minimum_ratio 표시 (강제 임계값 X — hint 용도)", "enforced_in": "application calculation", "source": "docs/adr/0001-dose-variants.md" }
|
||||
],
|
||||
"id_format": {
|
||||
"scheme": "ULID with type prefix",
|
||||
|
||||
60
schema/diet_pattern.schema.json
Normal file
60
schema/diet_pattern.schema.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://life-helper.local/schema/diet_pattern.schema.json",
|
||||
"title": "Diet Pattern (식이 패턴 — 의견 분열 영역의 합리적 선택지)",
|
||||
"description": "nutrition/diet-protocols.md §2의 식이 패턴 5개. category='diet'인 protocol(원칙)과 분리된 카탈로그 — 단일 정답 없음, 사용자 체질·취향·문화에 맞춰 *조합* 대상. 만들기 습관으로 채택 시 habit.type='build'로 운영.",
|
||||
"type": "object",
|
||||
"required": ["id", "name", "core", "evidence_strength"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "예: mediterranean, low_carb_keto, tre_if, plant_based, k_diet"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "사용자에게 보이는 이름 (예: '지중해 식단', '한식 기반')"
|
||||
},
|
||||
"core": {
|
||||
"type": "string",
|
||||
"description": "핵심 한 줄 정의"
|
||||
},
|
||||
"strengths": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"weaknesses": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"evidence_strength": {
|
||||
"type": "string",
|
||||
"enum": ["strong", "moderate", "mixed", "weak"],
|
||||
"description": "RCT/메타분석 강도. PREDIMED 같은 large RCT = strong"
|
||||
},
|
||||
"korean_context_fit": {
|
||||
"type": "string",
|
||||
"enum": ["high", "medium", "low"],
|
||||
"description": "한국 식문화·접근성 친화도"
|
||||
},
|
||||
"starter_levers": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "처음 시도할 때의 진입 동작 3개 이하 (k_diet의 '첫 끼 단백질 +30g' 같은)"
|
||||
},
|
||||
"medical_warning": {
|
||||
"type": "string",
|
||||
"description": "특히 주의가 필요한 사용자군 (예: 저탄수→당뇨 약물 복용자 저혈당)"
|
||||
},
|
||||
"linked_protocol_ids": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "이 패턴과 연결되는 protocol(category='diet') id 목록. 예: tre_if는 huberman §1.5 참조"
|
||||
},
|
||||
"reference_ids": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "DOI/URL 참조 id (reference 테이블)"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user