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>
29 lines
1.5 KiB
JSON
29 lines
1.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://life-helper.local/schema/reflection.schema.json",
|
|
"title": "Reflection (주/월/6주 회고)",
|
|
"description": "자유 텍스트 회고. 주간 또는 phase 종료 시점에 작성.",
|
|
"type": "object",
|
|
"required": ["id", "user_id", "scope", "period_start", "period_end"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"user_id": { "type": "string" },
|
|
"scope": { "type": "string", "enum": ["weekly", "monthly", "phase_end"] },
|
|
"period_start": { "$ref": "enums.schema.json#/$defs/DateString" },
|
|
"period_end": { "$ref": "enums.schema.json#/$defs/DateString" },
|
|
"phase_id": { "type": ["string", "null"] },
|
|
"kept": { "type": "string", "description": "잘 유지된 것 (Atomic Habits 4법칙 관점)" },
|
|
"missed": { "type": "string", "description": "결석/lapse 패턴 — 자책 아닌 데이터 처리" },
|
|
"adjust": { "type": "string", "description": "다음 주기에 바꿀 것 1개만" },
|
|
"identity_note": { "type": "string", "description": "L3 정체성 변화 감각 (옵션)" },
|
|
"minimum_ratio": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 1,
|
|
"description": "scope=weekly에 한해 집계. 해당 기간 done 체크인 중 is_minimum=true variant 비율. application layer 계산. UI: 'tiny가 자주 고정' 감지 hint 용 (강제 X)."
|
|
},
|
|
"created_at": { "$ref": "enums.schema.json#/$defs/DateTimeString" }
|
|
}
|
|
}
|