[Architect] Refs #204 — adopt dose_variants design (ADR-0001)

Resolves the long-pending dose variant decision before Phase 1 schema work:
- habit.dose_variants[] added (id/label/dose_text/context_tags/condition_tags/is_minimum), no cardinality cap.
- tracker_entry gains variant_id + context_snapshot{location,condition}.
- reflection gains weekly minimum_ratio (hint-only).
- data-model.md: R9 (≤4) retired; new R9 (no cap, UX-side enforcement) + R10 (weekly minimum_ratio hint, no threshold).
- docs/adr/0001-dose-variants.md captures rationale + alternatives.

Why now: Phase 1 (#204) needs the final schema shape before Drift DDL is drawn.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 16:37:35 +09:00
parent 957dd90725
commit bcfc6b2402
5 changed files with 119 additions and 3 deletions

View File

@@ -43,8 +43,37 @@
"type": "integer", "minimum": 1,
"description": "Atomic Habits #5 habit stacking 순서"
},
"min_dose": { "type": "string", "description": "시작 doseo (Tiny Habits)" },
"target_dose": { "type": "string" },
"min_dose": { "type": "string", "description": "시작 dose (Tiny Habits). dose_variants 사용 시 deprecated 가능" },
"target_dose": { "type": "string", "description": "dose_variants 사용 시 deprecated 가능" },
"dose_variants": {
"type": "array",
"description": "상황·컨디션별 도즈 옵션. 개수 제한 없음 (R9 폐기). 매일 체크인 시 context_tags/condition_tags 매칭으로 추천. 최소 1개 항목의 is_minimum=true 권장 (없어도 됨).",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id", "label", "dose_text"],
"properties": {
"id": { "type": "string", "description": "habit 안에서 unique. tracker_entry.variant_id 참조" },
"label": { "type": "string", "description": "사용자가 보는 짧은 이름 (예: '짐-메인', '집-아침')" },
"dose_text": { "type": "string", "description": "실제 도즈 표현 (예: '데드 리프트 60kg 5x5', '푸시업 5회')" },
"context_tags": {
"type": "array",
"items": { "type": "string" },
"description": "장소·상황 태그 (예: ['짐'], ['집','아침'], ['출장'])"
},
"condition_tags": {
"type": "array",
"items": { "type": "string" },
"description": "컨디션 태그 (예: ['좋음'], ['피곤','수면부족'])"
},
"is_minimum": {
"type": "boolean",
"default": false,
"description": "최소 도즈(tiny) 여부. 주간 reflection의 'minimum 비율' 가드 계산에 사용"
}
}
}
},
"started_at": { "$ref": "enums.schema.json#/$defs/DateString" },
"ended_at": { "$ref": "enums.schema.json#/$defs/DateString" },
"tags": { "type": "array", "items": { "type": "string" } },