F1 Due Date (v0.2.1 dogfood-feedback Track #4) #5

Merged
altair823 merged 7 commits from feat/f1-due-date into main 2026-04-26 02:20:16 +00:00
Owner

요약

로드맵 4번째 항목 — F1 Due Date: 한국어 노트 본문에서 날짜 표현 추출, NoteCard 에 인라인 배지 + 편집 가능. 하이브리드 (규칙 파서 + AI 폴백). migration v2 + pre-migration snapshot 도입 (F6-L1 후속 #4 반영).

결정

결정
매칭 우선순위 규칙 파서 우선 → AI 폴백
모호 표현 (월말, 주말, 퇴근 전) 규칙 medium confidence + iso=null, AI 위임
라벨 슬롯 NoteCard summary 와 tags 사이 인라인 (📅 YYYY-MM-DD)
만료 표시 회색 + 취소선 (라벨만, 본문 무수정)
시각 단위 / 음력 / 반복 미지원 (후속)
Migration v2 non-destructive ALTER (NULL 기본), pre-snapshot 신설

구현 (8 commits)

  • cfd34c3 plan
  • 0bb6c12 migration v2 + pre-migration snapshot + NoteRepository 확장
  • 95ba165 순수 한국어 규칙 파서 (14 규칙) + 26 골든 픽스처
  • 4ee135d AI zod 스키마 + 프롬프트 {{TODAY_KST}} (PROMPT_VERSION 2)
  • adae90e AiWorker 규칙+AI 병합 (rule.iso 우선, AI 폴백) + now() 주입
  • 9ab7086 NoteCard DueDateBadge 컴포넌트 + setDueDate IPC
  • ab68b19 promotion

F6-L1 후속 #4 반영

openDb() 가 마이그레이션 직전 <dbFile>.pre-v<N>.bak 으로 강제 스냅샷 (한 번만, idempotent). v2 마이그레이션 결함 시 회수 가능.

게이트

  • typecheck: 0 errors
  • 단위: 176/176 (132 → +44 신규)
  • e2e: 1/1
  • 스키마 변경: migration v2 (ALTER notes ADD due_date, due_date_edited_by_user)
  • 신규 dependency: 0

다음 항목

로드맵 5번: F2 태그 클릭 — 작은 renderer 변경.

🤖 Generated with Claude Code

## 요약 로드맵 4번째 항목 — **F1 Due Date**: 한국어 노트 본문에서 날짜 표현 추출, NoteCard 에 인라인 배지 + 편집 가능. 하이브리드 (규칙 파서 + AI 폴백). migration v2 + pre-migration snapshot 도입 (F6-L1 후속 #4 반영). ## 결정 | 결정 | 값 | |------|-----| | 매칭 우선순위 | 규칙 파서 우선 → AI 폴백 | | 모호 표현 (월말, 주말, 퇴근 전) | 규칙 medium confidence + iso=null, AI 위임 | | 라벨 슬롯 | NoteCard summary 와 tags 사이 인라인 (`📅 YYYY-MM-DD`) | | 만료 표시 | 회색 + 취소선 (라벨만, 본문 무수정) | | 시각 단위 / 음력 / 반복 | 미지원 (후속) | | Migration v2 | non-destructive ALTER (NULL 기본), pre-snapshot 신설 | ## 구현 (8 commits) - `cfd34c3` plan - `0bb6c12` migration v2 + pre-migration snapshot + NoteRepository 확장 - `95ba165` 순수 한국어 규칙 파서 (14 규칙) + 26 골든 픽스처 - `4ee135d` AI zod 스키마 + 프롬프트 `{{TODAY_KST}}` (PROMPT_VERSION 2) - `adae90e` AiWorker 규칙+AI 병합 (rule.iso 우선, AI 폴백) + `now()` 주입 - `9ab7086` NoteCard `DueDateBadge` 컴포넌트 + setDueDate IPC - `ab68b19` promotion ## F6-L1 후속 #4 반영 `openDb()` 가 마이그레이션 직전 `<dbFile>.pre-v<N>.bak` 으로 강제 스냅샷 (한 번만, idempotent). v2 마이그레이션 결함 시 회수 가능. ## 게이트 - typecheck: 0 errors - 단위: 176/176 (132 → +44 신규) - e2e: 1/1 - 스키마 변경: migration v2 (ALTER notes ADD due_date, due_date_edited_by_user) - 신규 dependency: 0 ## 다음 항목 로드맵 5번: **F2 태그 클릭** — 작은 renderer 변경. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
altair823 added 7 commits 2026-04-26 02:20:09 +00:00
ALTER TABLE notes adds due_date TEXT + due_date_edited_by_user INTEGER.
openDb takes <dbFile>.pre-v<N>.bak before running migrations
(F6-L1 follow-up #4 — preserves recoverable state if migration fails).
NoteRepository: updateAiResult accepts dueDate?, setDueDate +
edited-flag CASE WHEN guard mirroring title/summary pattern.
Note interface gains dueDate + dueDateEditedByUser fields.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Regex + KST math, returns ISO YYYY-MM-DD or null. 14 high-confidence
rules (literal date, N월 N일, MM/DD, N일/주/개월 뒤, 모레/내일/글피/오늘,
다음/이번 주 X요일, 다음 달). Ambiguous tokens (월말, 주말, 퇴근 전,
시각) return iso=null + confidence='medium' so caller (AiWorker)
can defer to AI. 26+ golden fixtures.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AiResponse extends with dueDate: string|null. zod regex
^\d{4}-\d{2}-\d{2}$, follow-up roundtrip check coerces invalid
dates (2026-13-99 etc.) to null. PROMPT_VERSION → 2: prompt now
takes todayKst arg, asks model to extract due_date as ISO or null.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
GenerateInput gains todayKst field. AiWorker computes KST-aligned
date once per job, runs parseDueDate on rawText, calls provider.generate
with todayKst, then merges: rule.iso wins if matched (deterministic),
else AI's due_date, else null. Logs dueDateSource (rule|ai|none) for
debugging. now() injection for testability.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Inline 📅 YYYY-MM-DD badge appears in NoteCard between summary and
tags. Click to edit (HTML date input). Past dates: gray + line-through.
AI label shown when not user-edited (mirrors title/summary AI badge
policy). Empty state shows '📅 마감일 추가' link in gray.

New IPC inbox:setDueDate routes to NoteRepository.setDueDate which
sets due_date_edited_by_user=1 (per slice §1.1 invariant 2 — user
edit blocks future AI overwrite). Preload bridge + InboxApi type
extended.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extracted to own spec with mini-brainstorm decisions captured.
F1 in dogfood-feedback.md marked 🚀 promoted with link.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
altair823 merged commit ab68b19144 into main 2026-04-26 02:20:16 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: altair823-org/inkling#5