feat: CLI help parser for docs extraction (#44)#48
Merged
Conversation
New crate for documentation extraction from source code. First module is the CLI help parser that extracts structured command data (flags, subcommands, descriptions, defaults, required/optional) from clap v4 --help output. Parses recursively through subcommand trees. Closes #44 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sidebar generator produces navigation tree JSONL from parsed CLI commands with editorial pages first, command groups second. Reference MDX generator produces one page per command with frontmatter, flag tables, usage blocks, and editorial slot markers for customer-authored content. 12 new tests (5 sidebar, 7 reference MDX), 19 total in veneer-docs. Closes #45, closes #46 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generates getting-started, architecture, and concept MDX pages with editorial slot markers. Never overwrites existing files to preserve customer-authored content. Concept pages auto-generated from detected command groups. 6 new tests, 25 total in veneer-docs. Closes #47 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…43) New `veneer extract` command that takes a project path and binary, then generates complete MDX documentation: reference pages with flag tables, editorial skeleton pages, and a sidebar JSONL navigation file. Tested against legion: produces 63 pages (56 reference + 7 editorial) from 30+ commands and subcommands in under 1 second. Fix: use binary filename not full path as root command name. Closes #43 Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
veneer-docscrate for documentation extraction and generation--helpoutputkanban create)Test plan
cargo clippy -- -D warningscleancargo fmt -- --checkcleancargo testpassesResolves #44
🤖 Generated with Claude Code