Repository navigation
Conversation
composer docs writes docs/api/ from src/ with Reflection and the docblocks: one page per public class in one reading-order chain, each with YAML front matter (title, type, fqcn, layer, source, since, order, summary, related ADRs, prev/up/next) and an index.json. composer docs:check, part of verify and a CI job, fails when the committed pages differ from the source. A Node test parses every page with gray-matter and follows the chain. Foundation and Http are published first. See ADR-0028. Co-Authored-By: Claude Sonnet 5.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.
Docs and tooling only: nothing under
src/changes behaviour (two classes gain an@sincetag), so no release is needed.What
composer docsgenerates an API reference intodocs/api/(ADR-0028). Foundation and Http are published first (26 files); the rest follow as their docblocks are reviewed.schema: "wptoolkit-api/1"):title,type,fqcn,namespace,layer,source,since,stability,order,summary,related.adr, andprev/next/up(paths relative to the page, so they are also working links). The field table is in the ADR.docs/api/index.jsonlists every page in order with the same facts; its paths join directly.@throwsand@sincefrom the docblocks; ADRs the code cites become links.@internalclasses and methods, magic methods and implicit interfaces (Stringable,UnitEnum) are left out.Application::VERSION) print as(set at release)so a version bump does not make the reference stale.Why generated
A hand-written reference is the 0.x
API.mdagain. The docblocks already carry the reasoning; this puts them where people and agents read, in an order, with facts a tool can read without parsing prose.Checks
composer docs:check(now part ofcomposer verify) fails if a committed page differs from the source, is missing, or is stale.docs:check, thennpm ci --ignore-scriptsand a Node test that parses every page with gray-matter, checks required fields, unique consecutiveorder, thatprev/next/upresolve from each page, that every relative link exists, thatindex.jsonagrees, and that followingnextfrom the index visits every page.docs:checkpasses. Static analysis caught thatReflectionClass::isReadOnly()does not exist on 8.1 before CI did.Notes
gray-matter4.0.3 (recorded intech-stack.md).npm auditflags it only throughjs-yaml, which@wordpress/envalready brings; it only reads our own generated files.CoreServices,Coexistence,CopyOwner,LibraryTranslationsandToolkitCompatibility, which look like wiring. Whether they are API (or should be@internal) is a decision for the maintainer, not made here.🤖 Generated with Claude Code