문서: CLI 레퍼런스 자동 생성 + 드리프트 게이트 — clap 정의를 문서의 단일 원천으로#20
Merged
Conversation
- CLI 정의(Cli/Cmd/value_enum)를 lib 타깃(hwp_cli::cli)으로 승격 — 테스트가 clap Command 트리를 introspect할 수 있게 함(main.rs는 파싱·디스패치만). - tests/cli_reference.rs: 명령 트리 → docs/manual/cli-reference.md 결정적 생성. 커밋본과 어긋나면 테스트 실패(= CI 드리프트 게이트), HWP_UPDATE_DOCS=1로 재생성(bless). - 초기 생성본 등재: 14개 명령 전부 — README 수동 표에 누락돼 있던 bookmarks·slots·fill·validate 포함(드리프트 실증 → 자동화 동기). - README: 누락 4개 명령 행 보수 + 자동 생성 레퍼런스 링크 추가. - help 문구의 낡은 마일스톤 표기((M1에서 구현) 등) 제거. 검증: scripts/check.sh 통과, 변조 감지 자가 검증(문서 변조→실패→bless 복원→통과) 확인. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
배경
README의 수동 명령 레퍼런스 표가 실제 CLI와 드리프트됨을 확인했다 — 서브커맨드 14종 중 10종만 등재(
bookmarks·slots·fill·validate누락). 수동 동기화는 실패하는 구조이므로, 문서를 clap 정의에서 자동 생성하고 어긋나면 CI가 실패하는 게이트를 도입한다. (고도화 문서화 1단계 — 이후 mdBook 매뉴얼·계약 문서 승격·CHANGELOG가 후속.)변경
Cli/Cmd/value_enum을crates/hwp-cli/src/cli.rs(lib 타깃hwp_cli::cli)로 이동.main.rs는 파싱·디스패치만 담당(−296줄). 신규 의존성 0.tests/cli_reference.rs가CommandFactory로 명령 트리를 introspect해docs/manual/cli-reference.md를 결정적으로 생성. 커밋본과 다르면 실패(한국어 안내 출력),HWP_UPDATE_DOCS=1 cargo test -p hwp-cli --test cli_reference로 재생성(bless). CRLF 정규화로 Windows 잡 대비. CI 워크플로 수정 불필요 — 일반 테스트로 게이트가 성립.edit --create-bookmark·--create-hyperlink·--set-meta,cat --format html,convert --to odt등)을 즉시 드러냄.(M1에서 구현)등) 제거.검증
scripts/check.sh(fmt+clippy -D warnings+test) 통과.🤖 Generated with Claude Code