feat: docs generator and Docs Sync workflow for docs.piyaz.ai#128
Merged
Conversation
ulascanzorer
previously approved these changes
Jun 16, 2026
ulascanzorer
previously approved these changes
Jun 16, 2026
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
Task Reference: [PYZ-63] — Set up docs.piyaz.ai
Adds the generator that produces the docs.piyaz.ai reference content from this repo's source of truth, the workflow that keeps the (private)
piyaz-docsrepo in sync, and the schema extraction that lets the docs generator and the MCP server share one source of truth.Schema extraction (behavior-preserving)
DESCRIPTIONS, andLIMITSout ofcreate-server.ts/tool-handlers.tsinto a standalonelib/mcp/schemas.tswith no data-layer imports, so both the MCP server and the generator consume them. The move is byte-identical — every schema field,.describe()string, and limit verbatim; MCP server runtime unchanged.TOOLScatalog (name/title/description/inputSchema/discriminator) the generator renders from.Docs generator —
scripts/generate-docs.ts(bun run docs:gen)z.toJSONSchema): a values table labeled by each tool's discriminator (Actions for action tools, Depths forpiyaz_context, Types forpiyaz_analyze) plus a parameters table with types, required flags, and descriptions.conventions/artifacts/lifecycle/resilience) into MDX, fence-aware: prose em/en-dashes are normalized and MDX-hostile</{are escaped, while fenced code blocks and inline code spans (including indented fences) are left verbatim.meta.json(tools and reference) for sidebar ordering. Frontmatter titles are quoted;--outwith no value falls back instead of crashing.Docs Sync workflow —
.github/workflows/docs-sync.ymlmaintouching the schema / handler / plugin / generator sources (incl.lib/graph/identifier.ts, which shapes generated tool-param docs), regenerates and opens a PR against the privateFrkAk/piyaz-docsrepo viaDOCS_REPO_TOKEN.persist-credentials: false(the token never sits indocs-repo/.git/configwhile the generator and the third-party action run), token is step-scoped, repo-guarded (if: github.repository == 'FrkAk/piyaz'), andpush/workflow_dispatchonly (nopull_request_target).PR template
docs.piyaz.ai.Type of change
Testing
bun test tests/scripts tests/plugins tests/apipasses (142 tests)bun run typecheck,bun run lint, andbun run format:checkpassbun run check:pluginsreports in syncbun run docs:genregenerates cleanly; verified output — discriminator-labeled value sections, per-foldermeta.json, and fence-aware reference escaping that is a clean no-op on current content (zero entities introduced; indented fences left raw)Notes for reviewer
lib/mcp/schemas.tsextraction is behavior-preserving — verified field-by-field;tests/pluginsandtests/apicover the unchanged MCP server.docs-sync.ymlneeds aDOCS_REPO_TOKENsecret (fine-grained PAT: Contents + Pull requests read/write onpiyaz-docs) and "Allow GitHub Actions to create pull requests" enabled onpiyaz-docsbefore it can open sync PRs.piyaz-docsto delete by hand (documented in the generator header).references/artifacts.mdand its three platform mirrors wrap banned-word examples in backticks so generated docs pass the docs style lint (check:pluginsstays green). The cleaner fix — exempt generated pages in the docs-repo lint, then revert the backticks — lives inpiyaz-docs.Docs impact
docs.piyaz.aivia the Docs Sync workflow.