leerness 1.9.37 → 1.9.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,79 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.39 — 2026-05-19
4
+
5
+ **AI 하네스 엔지니어링 6단계 워크플로 자동 유도 + drift 자동 회복**.
6
+
7
+ 사용자 우려: "프로젝트가 복잡해지고 길어질 때 leerness를 점점 참조하지 않는다" — 1.9.37/38 drift 감지에 이어, 이번엔 **매 세션 시작 시 워크플로 자체를 자동 안내**하는 능동형 메커니즘 추가.
8
+
9
+ ### Added — A. 세션 워크플로 정책
10
+
11
+ - **`.harness/session-workflow.md`** 신규 — AI 하네스 엔지니어링 6단계 가이드:
12
+ 1. **요청 분석** (handoff + drift check)
13
+ 2. **계획 수립** (plan add / TodoWrite + reuse-map)
14
+ 3. **업무 분배** (agents list/recommend, 작업유형별 sub-agent 매핑)
15
+ 4. **sub-agent 작업** (파일 경로 격리, mtime 검증 의무, 자체 테스트)
16
+ 5. **종합 검증** (contract verify + verify-claim --run-tests + review --persona)
17
+ 6. **세션 마감** (session close + audit --fix + usage stats)
18
+ - **`handoff` 출력 끝에 6단계 가이드 자동 표시** — 매 세션 시작 시 메인 에이전트가 잊지 않도록.
19
+ - **AGENTS.md / CLAUDE.md 템플릿 업그레이드** — "⭐ 매 세션 첫 행동: session-workflow.md 먼저 읽기" 항목 최상단 추가, Mandatory read order 1번 위치.
20
+ - 스킵: `--no-workflow-guide` 또는 `LEERNESS_NO_WORKFLOW_GUIDE=1`.
21
+
22
+ ### Added — B. drift 자동 회복
23
+
24
+ - **`leerness drift check --auto-fix`** — critical (≥100) 시 자동으로 `session close` 실행 + 재검증.
25
+ - 회복 성공 시 usage-stats의 `drift.autoResolved` 카운터 누적
26
+ - 실패 시 수동 실행 안내
27
+ - **`leerness handoff --auto-recover`** — handoff 진입 시 severe drift 감지하면 inline 자동 회복.
28
+ - sevStale (≥3일) 시에만 발동 (안전)
29
+
30
+ ### 정책
31
+ - ✅ `--auto-fix`/`--auto-recover`는 **명시적 플래그** 필요 (기본 동작은 알림만 유지)
32
+ - ✅ 워크플로 가이드는 매 handoff 출력에 표시 → 메인 에이전트가 매 세션 6단계 인지
33
+ - ✅ AGENTS/CLAUDE 템플릿 통합 → AI 에이전트가 세션 시작 시 자동 읽음
34
+
35
+ ### 실측
36
+ - 워크플로 가이드 정상 표시 (handoff 끝에 6 단계 + .harness/session-workflow.md 링크)
37
+ - session-workflow.md init 시 자동 생성 (6단계 + 사용 명령 + anti-pattern 명시)
38
+ - AGENTS/CLAUDE에 session-workflow.md 참조 자동 inject
39
+
40
+ ### e2e: 178/178 PASS (1.9.38 174 + 신규 4)
41
+
42
+ ## 1.9.38 — 2026-05-18
43
+
44
+ **drift 자동 reminder + 사용 통계 + TodoWrite 임포트 + drift 임계 학습**.
45
+
46
+ 1.9.37의 drift detection을 더 능동적으로 만든 라운드. 메인 에이전트가 leerness를 "잊는" 시나리오를 4가지 채널로 보완.
47
+
48
+ ### Added
49
+
50
+ - **(A) `.harness/agent-reminders.md` 자동 생성** — drift 5일 이상(severe) 시 handoff 진입부에서 자동 생성. 메인 에이전트가 다음 라운드 시작 시 이 파일을 읽고 session close를 잊지 않도록.
51
+ - drift 회복 시 (handoff/session close) 파일 자동 청소
52
+ - **(B) `leerness usage stats`** 신규 명령 — `.harness/cache/usage-stats.json`에 명령별 누적 카운터 + drift 통계. `--json` 출력 지원.
53
+ - 매 명령 호출 시 자동 누적 (`_bumpUsage`)
54
+ - 통계 출력: 호출 수 상위 30 + drift critical 발견/skip/자동 해소 카운트
55
+ - **(C) `leerness task sync --from <todo.json>`** 신규 명령 — TodoWrite JSON을 leerness progress-tracker로 import. completed → done, in_progress → in-progress, pending → planned 매핑.
56
+ - 같은 content가 이미 있으면 status만 update, 없으면 신규 task 생성
57
+ - `--json` 출력 지원
58
+ - **(D) drift 임계 학습** — `--no-drift-check` 누적 ≥5회 시 stale 임계 2일 → 4일로 자동 완화 (false alarm 감소).
59
+ - usage-stats.json의 `drift.skipped` 카운터로 추적
60
+ - 학습된 임계 활성 시 handoff 출력에 "(학습: skip N회 누적 → 임계 N일 완화)" 안내
61
+
62
+ ### 실측
63
+ - 실 워크스페이스에서 4 기능 모두 작동 확인:
64
+ - A: 5일 stale 시뮬 → agent-reminders.md 자동 생성 (drift critical 메시지)
65
+ - B: status/handoff/task 명령 자동 카운트
66
+ - C: 2건 TodoWrite JSON → 2건 progress-tracker import
67
+ - D: --no-drift-check 5회 누적 → drift.skipped=5 기록
68
+
69
+ ### e2e: 174/174 PASS (1.9.37 170 + 신규 4)
70
+
71
+ ### 정책
72
+ - ✅ 자동 reminder는 *파일 생성*만 — 메인 에이전트 자동 실행 강제 X
73
+ - ✅ usage stats는 read-only 추적, destructive 동작 X
74
+ - ✅ task sync는 idempotent (같은 content는 update만)
75
+ - ✅ drift 학습은 사용자 친화 (자주 끄면 덜 짖게)
76
+
3
77
  ## 1.9.37 — 2026-05-18
4
78
 
5
79
  **메인 에이전트의 "leerness 점점 안 쓰는" drift 현상 자동 감지·경고**.