Files
life-helper/schema/tracker_entry.schema.json
joungmin bcfc6b2402 [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>
2026-06-11 16:37:35 +09:00

31 lines
1.3 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://life-helper.local/schema/tracker_entry.schema.json",
"title": "Tracker Entry (일일 ○/공백)",
"description": "(habit_id, date) unique. value는 done/blank 2값만 (R5). 일일 운영 30~60초.",
"type": "object",
"required": ["id", "habit_id", "date", "value"],
"additionalProperties": false,
"properties": {
"id": { "type": "string" },
"habit_id": { "type": "string" },
"date": { "$ref": "enums.schema.json#/$defs/DateString" },
"value": { "$ref": "enums.schema.json#/$defs/TrackerValue" },
"logged_at": { "$ref": "enums.schema.json#/$defs/DateTimeString" },
"note": { "type": "string", "maxLength": 200, "description": "선택. 길게 쓰지 말 것" },
"variant_id": {
"type": "string",
"description": "선택된 habit.dose_variants[].id. value=done일 때만 의미 있음. value=blank면 무시."
},
"context_snapshot": {
"type": "object",
"additionalProperties": false,
"description": "체크인 시점 컨텍스트 (variant 추천에 쓰인 입력). 회고·집계용 스냅샷.",
"properties": {
"location": { "type": "string", "description": "예: '짐', '집', '출장'" },
"condition": { "type": "string", "description": "예: '좋음', '보통', '나쁨'" }
}
}
}
}