docs(p9): decompose dogfooding feedback into 20 task specs + reset plan
P9-1~P9-4 머지 후 사용자가 직접 도그푸딩 하며 수집한 16 항목 UX 피드백을 20 개 single-PR 사이즈 task spec 으로 분해. 각 spec 은 frontmatter (depends_on / unblocks / source_feedback), Goal, Allowed deps, Public surface, Behavior contract, Test plan, DoD, Out of scope 절 포함. 추가: - p9-fb-01 ~ 20-*.md: 분해된 task spec 20 개 - p9-dogfooding-feedback.md: master index + 우선순위 + 권장 실행 순서 + spec PR vs impl PR 절 - INDEX.md: p9-fb-01 ~ 20 link 추가 - docs/superpowers/plans/2026-05-02-p9-fb-06-reset-command.md: 첫 후속 작업 (kebab reset 명령) 의 6-task 구현 plan - .gitignore: .worktrees/ 추가 (superpowers worktree skill 용) 피드백 항목 → task spec 매핑은 p9-dogfooding-feedback.md 의 표 참조. 실행 시작 task: p9-fb-06 (reset 명령) — 도그푸딩 막힘 강도 1위. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
61
tasks/p9/p9-fb-07-md-title-fallback.md
Normal file
61
tasks/p9/p9-fb-07-md-title-fallback.md
Normal file
@@ -0,0 +1,61 @@
|
||||
---
|
||||
phase: P9
|
||||
component: kebab-parse-md + kebab-normalize
|
||||
task_id: p9-fb-07
|
||||
title: "Markdown title fallback chain (frontmatter → H1 → H2 → first paragraph → filename)"
|
||||
status: planned
|
||||
depends_on: []
|
||||
unblocks: []
|
||||
contract_source: ../../docs/superpowers/specs/2026-04-27-kebab-final-form-design.md
|
||||
contract_sections: [§3.5 ParsedDoc, §5.5 CanonicalDocument]
|
||||
source_feedback: p9-dogfooding-feedback.md item 5
|
||||
---
|
||||
|
||||
# p9-fb-07 — Title fallback
|
||||
|
||||
## Goal
|
||||
|
||||
frontmatter `title` / 첫 H1 둘 다 없는 markdown 도 의미 있는 title 표시. fallback chain 명시 + parser_version cascade.
|
||||
|
||||
## Allowed dependencies
|
||||
|
||||
- 기존 kebab-parse-md / kebab-normalize. 신규 X.
|
||||
|
||||
## Public surface
|
||||
|
||||
`kebab-normalize::derive_title(parsed: &ParsedDoc, file_stem: &str) -> String` 가 chain 구현. CanonicalDocument.title 채움.
|
||||
|
||||
## Behavior contract
|
||||
|
||||
fallback 우선순위:
|
||||
1. frontmatter `title` (기존)
|
||||
2. 첫 H1 텍스트 (기존)
|
||||
3. 첫 H2 텍스트 (신규)
|
||||
4. 첫 non-empty paragraph 의 첫 80 자 (인용 / list 제외)
|
||||
5. 파일명 (확장자 제외, kebab-case 유지)
|
||||
|
||||
빈 결과 / whitespace 만이면 다음 단계로 진행. 모든 단계 실패 시 (frontmatter only no body file) 파일명. 빈 문자열 반환 금지.
|
||||
|
||||
`parser_version` (현재 `md-frontmatter-v1`) → `md-frontmatter-v2` bump. 기존 doc 은 next ingest 시 재처리 (same `doc_id` recipe → upsert).
|
||||
|
||||
## Test plan
|
||||
|
||||
| kind | description |
|
||||
|------|-------------|
|
||||
| unit | frontmatter title only → 1단계 |
|
||||
| unit | H2 부터 시작 → 3단계 |
|
||||
| unit | 표만 있는 doc → 4단계 (paragraph 없음 → 5단계 filename) |
|
||||
| unit | 한글 H1 → NFC 정규화된 title |
|
||||
| snapshot | corpus 의 python-360-... → "Annotation issues at runtime" |
|
||||
|
||||
## DoD
|
||||
|
||||
- [ ] `cargo test -p kebab-parse-md -p kebab-normalize` 통과
|
||||
- [ ] parser_version 갱신 (`md-frontmatter-v2`)
|
||||
- [ ] HOTFIXES X — bump 은 정상 cascade 동작
|
||||
- [ ] 사용자에게 "title 비어 있던 doc 은 `kebab ingest` 다시 돌리면 채워짐" 안내 (README 또는 changelog)
|
||||
|
||||
## Out of scope
|
||||
|
||||
- PDF / 이미지 doc 의 title fallback (별도 task — 다른 parser)
|
||||
- AI 로 title 추출 (P+)
|
||||
Reference in New Issue
Block a user