feat: generate Go API docs with wfctl#874
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new wfctl docs generate “API mode” that generates Go API reference Markdown plus a versions.json metadata file, including optional registry-driven plugin API docs generation.
Changes:
- Extend
wfctl docs generatewith new flags (--source/--module/--version/--packages/--registry/--subjects/...) and a new API-doc generation code path. - Add Go doc rendering + metadata generation (including plugin registry cloning and trust-boundary checks) under
cmd/wfctl/docs_generate.go. - Add tests and fixtures for API-doc generation and registry-driven plugin docs, and document usage in
docs/WFCTL.md.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/WFCTL.md | Documents new API-doc generation mode, flags, and examples for wfctl docs generate. |
| cmd/wfctl/docs.go | Adds API-doc flags and routes docs generate into API mode when relevant flags are present. |
| cmd/wfctl/docs_generate.go | Implements Go API Markdown + versions.json generation and plugin-registry cloning/rendering. |
| cmd/wfctl/docs_generate_test.go | Adds tests covering help output, workflow package docs generation, and registry plugin docs generation. |
| cmd/wfctl/testdata/docs-registry.json | Adds a minimal registry fixture JSON used by tests/CLI runs. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
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
wfctl docs generateversions.jsonmetadataVerification
GOWORK=off go test ./cmd/wfctl -run TestDocsGenerate -count=1GOWORK=off go run ./cmd/wfctl docs generate --source . --out "$tmpdir" --module github.com/GoCodeAlone/workflow --version v0.75.0 --packages plugin,plugin/sdk,plugin/external/sdkGOWORK=off go test ./cmd/wfctl -count=1GOWORK=off go test ./... -count=1/Users/jon/.codex/plugins/cache/autodev-marketplace/autodev/6.5.0/tests/plan-scope-check.sh --verify-lock /Users/jon/workspace/.autodev/gocodealone-audit/clones/workflow/docs/plans/2026-06-07-workflow-docs-ecosystem.mdPlan: docs/plans/2026-06-07-workflow-docs-ecosystem.md PR2 / Tasks 5-6.