feat(#3688): digest v2 — 주소 보존 절 청킹(--sections) + 쪽 범위 연속 창(--pages) (#3608 §6.6 1호) - #3689
Closed
kevin9327 wants to merge 3 commits into
Closed
feat(#3688): digest v2 — 주소 보존 절 청킹(--sections) + 쪽 범위 연속 창(--pages) (#3608 §6.6 1호)#3689kevin9327 wants to merge 3 commits into
kevin9327 wants to merge 3 commits into
Conversation
…--pages)
일괄 덤프식 요약 공급은 쪽·절 주소를 상실해 요약을 원문으로 되짚을 수 없고 분할에
소비자 상태 관리를 요구한다. 조판 엔진 보유를 계약으로 승격:
- --sections: sections:[{title,page,charCount,excerpt}] — 0 기준 글로벌 쪽 주소
단조 비감소 보장, 잔여량 판정(charCount vs excerpt), 구조 부재 시 쪽 폴백을
sectionsMode로 명시. build_structure 하위 트리 수집 — 새 파싱 로직 없음
- --pages a..b: 같은 폭 다음 창을 nextStep이 그대로 받아 적게 안내, 꼬리 조임
- MCP hwp_digest: devel 정식 optionalArgs({when,args})로 배선(자체 메커니즘 폐기)
검증: digest_v2_contract 11건 green, v1 8건 무회귀, cli_json_contract 22건, clippy 0.
실측: 16쪽 실문서 절 15개 주소 청킹 + 연속 창 증적 동봉.
8 tasks
kevin9327
force-pushed
the
pr/task-digest-v2b
branch
from
August 1, 2026 11:44
a9738ba to
2f98d01
Compare
jangster77
self-requested a review
August 1, 2026 14:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
설계 원리 (자립 논증)
일괄 텍스트 덤프 방식의 요약 공급은 ① 쪽·절 주소를 상실해 요약 결과를 원문으로 되짚을 수 없고 ② 대형 문서 분할에 소비자 측 상태 관리를 요구합니다. rhwp 는 조판 엔진을 보유하므로 주소가 계약에 내장된 청크를 공급할 수 있습니다 — 덤프 방식이 원리적으로 도달할 수 없는 지점입니다.
구현
digest --sections—sections:[{title,page,charCount,excerpt}]. page 는 0 기준 글로벌 쪽 주소, 단조 비감소 보장(주소 신뢰성). charCount 대 excerpt 로 잔여량 판정. 구조 없는 문서는 쪽 폴백으로 강등하되sectionsMode:"page"로 강등 사실 명시(판정 가능). 절 본문은 build_structure 하위 트리 수집 — 새 파싱 로직 없음.digest --pages a..b— 범위 발췌 +nextStep이 같은 폭의 다음 창을 그대로 받아 적게 안내("이어서 digest --json --pages 3..4") — 초소형 모델도 상태 관리 없이 대형 문서를 순회합니다. 끝 범위는 마지막 쪽으로 조임(존재하지 않는 쪽을 성공 보고하지 않음).hwp_digest— devel 의 정식 optionalArgs({when,args}) 메커니즘으로 배선, required 는 path 만 유지(플레이북 DoD).실측 증적 — 16쪽 실문서
절 15개(제목·쪽 주소·잔여량) /
--pages 1..2발췌 후 "이어서 3..4" 연속 안내.검증
digest_v2_contract11건 green — 주소 단조·절단·쪽 폴백·연속 창·꼬리 조임·불량 구문 5종 exit 2·stdout 순수성·한 줄 봉투digest_macro_contract8건 무회귀 ·cli_json_contract22건 · clippy 0 · rustfmt cleanmydocs/report/task_m100_3688/closes #3688 · 로드맵 #3608 §6.6 도메인 응용 축 1호