feat(cli): add clidoc OpenCLI docgen and CI validation - #58
Merged
Merged
Conversation
Add a `docgen` command (JSON/YAML/Markdown) and the hidden `__opencli` discovery subcommand to the hdrify CLI using @clidoc/core and @clidoc/yargs, derived from the existing yargs command tree. CI now generates the spec and validates it with bhouston/clidoc-action. Closes #57
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
docgencommand tohdrify(JSON default,--format markdown/yaml) and the hidden__openclidiscovery subcommand, both built from@clidoc/coreand@clidoc/yargs, deriving the OpenCLI document from the real yargs command tree (convert,info,reference) rather than hand-maintained metadata.packages/cli/opencli.json, gitignored) and validates it withbhouston/clidoc-action@v1, so a spec-breaking change to the CLI fails the build.Closes #57
Test plan
hdrify docgen --output cli.jsonandhdrify __opencliproduce identical, valid OpenCLI documents (checked withclidoc validate)pnpm buildpnpm tscpnpm lintpnpm test --coverage(floors met: 89.22/72.29/93.92/89.78 stmts/branches/fns/lines)pnpm release:checkpnpm sizepnpm audit --audit-level=high(124 findings, identical tomain; pre-existing)hdrify convert/info/reference/--helpbehavior unchanged