{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://life-helper.local/schema/if_then_rule.schema.json", "title": "If-Then Rule (Implementation Intention)", "description": "Gollwitzer If-Then. habit당 ≤ 3개 권장. then_action에 회피 키워드 감지 시 warning (R7).", "type": "object", "required": ["id", "habit_id", "if_condition", "then_action"], "additionalProperties": false, "properties": { "id": { "type": "string" }, "habit_id": { "type": "string" }, "if_condition": { "type": "string", "description": "if 절. 시간/맥락/감정/직전 행동 기반 (예: 'If 22시 평일에 충동 나면')" }, "then_action": { "type": "string", "description": "then 절. 긍정 행동 (예: 'then 거실에서 산책 5분 + 차가운 물 한 잔')" }, "trigger_type": { "type": "string", "enum": ["time", "location", "emotion", "preceding_action", "urge"] }, "priority": { "type": "integer", "minimum": 1, "maximum": 3, "default": 1 }, "created_at": { "$ref": "enums.schema.json#/$defs/DateTimeString" } } }