---
id: wiki-2026-0508-habit-formation
title: Habit Formation
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [Habit Loop, Behavior Automation, Habituation]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [psychology, behavior, neuroscience, habits]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
  language: en
  framework: behavioral-psychology
---

# Habit Formation

## 매 한 줄
> **"매 habit = cue → routine → reward 의 basal-ganglia automatization"**. 매 21-day myth 의 false — Lally 2010 의 median 66 days (range 18-254). 매 2026 의 wearables + LLM coaching + JITAI (just-in-time adaptive intervention) 의 active.

## 매 핵심

### 매 habit loop (Duhigg / Wood)
1. **Cue**: 매 trigger — time, place, emotional state, preceding action, people.
2. **Routine**: 매 behavior 자체.
3. **Reward**: 매 reinforcement — neural prediction error.
4. **Craving** (Wood addition): 매 anticipation 의 cue→reward.

### 매 neural substrate
- **Goal-directed**: 매 prefrontal + dorsomedial striatum — early learning.
- **Habitual**: 매 dorsolateral striatum (sensorimotor loop) — automatization.
- **Switch**: 매 overtraining + stable context → habitual takeover.

### 매 formation 의 핵심 levers
- **Implementation intentions** (Gollwitzer): "When X, I will Y" — 매 효과 size large (d ≈ 0.65).
- **Context stability**: 매 same time + place 의 consistency.
- **Friction reduction**: 매 cue salience ↑, 매 obstacle ↓.
- **Temptation bundling** (Milkman): 매 desired + pleasurable 결합.
- **Identity-based**: 매 "I am someone who..." (Clear).

### 매 응용
1. Atomic Habits 의 4 laws (obvious, attractive, easy, satisfying).
2. Health behavior change (exercise, medication adherence).
3. Productivity (deep-work blocks).
4. Habit-stacking (after-X-then-Y).

## 💻 패턴

### Habit tracker (streak + context)
```python
from dataclasses import dataclass, field
from datetime import date, timedelta

@dataclass
class HabitLog:
    name: str
    cue_context: dict           # {time, location, preceding_action}
    completions: list[date] = field(default_factory=list)

    @property
    def streak(self) -> int:
        if not self.completions:
            return 0
        s, today = 1, max(self.completions)
        for i in range(1, len(self.completions)):
            if today - self.completions[-1 - i] == timedelta(days=i):
                s += 1
            else:
                break
        return s
```

### Implementation intention generator
```python
def implementation_intention(goal: str, cue: str, action: str) -> str:
    return f"When {cue}, I will {action} in service of {goal}."

# When I pour my morning coffee, I will do 10 push-ups in service of strength training.
```

### Habit-stacking chain
```python
def stack(anchor: str, new_habit: str, reward: str | None = None) -> dict:
    return {
        "anchor": anchor,
        "new_habit": new_habit,
        "rule": f"After {anchor}, I will {new_habit}.",
        "immediate_reward": reward,
    }
```

### JITAI delivery decision
```python
def jitai_should_deliver(state: dict) -> bool:
    """Deliver intervention only when receptive + context-matched + low burden."""
    return (state["stress"] < 0.7
            and state["cognitive_load"] < 0.6
            and state["context_match"] > 0.8
            and state["recent_interventions_24h"] < 3)
```

### Lally formation curve
```python
import numpy as np

def automaticity(day: int, asymptote: float = 0.95, k: float = 0.04) -> float:
    """Asymptotic automaticity (Lally 2010 fit)."""
    return asymptote * (1 - np.exp(-k * day))
# day 21 → ~0.58, day 66 → ~0.88
```

### Context-cue salience score
```python
def cue_salience(cue: dict, history: list[dict]) -> float:
    """Higher when cue co-occurs with successful routine."""
    matches = [h for h in history if all(h.get(k) == v for k, v in cue.items())]
    if not matches:
        return 0.0
    return sum(h["completed"] for h in matches) / len(matches)
```

## 매 결정 기준
| 상황 | Strategy |
|---|---|
| Brand-new habit | implementation intention + context stability |
| Existing routine + new addition | habit stacking (anchor) |
| High-friction habit | reduce friction first, then add cue |
| Reward-poor habit | temptation bundling |
| Identity-level change | identity-based ("I am the kind of person who...") |
| Relapse prevention | re-stabilize context, restore cue |

**기본값**: 매 implementation intention + same context daily + 60-90 day window. 매 21-day promise X.

## 🔗 Graph
- 부모: [[Operant_Conditioning|Operant Conditioning]]
- 변형: [[Habit Stacking]]
- 응용: [[CBT]]
- Adjacent: [[Basal Ganglia]] · [[Self-Determination Theory]]

## 🤖 LLM 활용
**언제**: 매 implementation intention drafting, 매 habit-stack anchor 의 brainstorm, 매 obstacle anticipation, 매 daily reflection scaffold.
**언제 X**: 매 individual psychological diagnosis (e.g., compulsion vs habit) — 매 clinical professional 필수.

## ❌ 안티패턴
- **21-day promise**: 매 individual variance 무시 — 매 18-254 day range.
- **Willpower 만 의 의존**: 매 ego depletion + decision fatigue — 매 environment design.
- **Multiple new habits 의 동시**: 매 cognitive bandwidth 초과 — 매 1-2 habits 의 sequence.
- **No cue specification**: 매 vague intention ("eat better") — 매 specific cue + action.
- **Punishing missed days excessively**: 매 self-shame spiral — 매 "miss once, never twice" rule.

## 🧪 검증 / 중복
- Verified (Lally et al. 2010 EJSP, Wood "Good Habits, Bad Habits" 2019, Duhigg "Power of Habit", Clear "Atomic Habits", Gollwitzer 1999 meta-analysis).
- 신뢰도 A.

## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — habit loop, Lally curve, JITAI, implementation intentions 추가 |
