feat(warden): add repo-local public-export-example-coverage rule#713
Merged
graphite-app[bot] merged 1 commit intoJun 9, 2026
Conversation
Contributor
Author
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jun 9, 2026
528d048 to
03e2b0d
Compare
40a5bea to
142b3f4
Compare
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Merge activity
|
## Summary Graduates public-API example coverage into a repo-local Warden rule (TRL-943), replacing `scripts/check-public-api-examples.ts`. - New `public-export-example-coverage` rule in `packages/warden` (scope `repo-local`, alongside `warden-export-symmetry`/`warden-rules-use-ast`): inventories non-type-only named re-exports on the five public surface package barrels and requires a leading `@example` TSDoc on each exported declaration. Built on the shared `ast.ts` helpers (no TS compiler dependency), anchored to this repo via the rule module's on-disk location so it stays silent in consumer repos. - Severity: missing `@example` on a `minimumExports` entry → error; other inventoried exports → warn; minimum export absent from the barrel, star/non-relative re-exports on a target barrel, unreadable resolved source → error. - `publicExportExampleCoverageTrail` wrapper + full registry symmetry; 15 new tests including a real-repo baseline over all five barrels. - The policy table stays in the rule module with a TSDoc note: `wardenConfigSchema` has no per-rule config channel today, so configured-not-hard-coded is deferred to a config-channel design. - Removes the root script + its test and drops `docs:api-examples` from the `check` pipeline — the warden run (`trails:check`) now owns this coverage (verified end-to-end by stripping an `@example` and watching the rule fail the warden run). - Warden guides regenerated (rule count 63); changeset: `@ontrails/warden` minor. Linear: TRL-943 ## Verification - `bun test packages/warden` (1082 pass), package typecheck/lint clean - End-to-end: removed `@example` from `packages/cli/src/output.ts` → warden run fails with the new rule's diagnostic; restored byte-exact - `bun run warden:agents:check`, `warden:skills:check`, `plugin:metadata:check`, `bun run check`/`build`/`test`/`publish:check`/`wayfinder:dogfood` green at the stack tip
142b3f4 to
bb5a219
Compare
03e2b0d to
5be032c
Compare
Base automatically changed from
trl-942-graduate-scaffold-version-sync-into-the-create-surface
to
main
June 9, 2026 20:30
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
Graduates public-API example coverage into a repo-local Warden rule (TRL-943), replacing
scripts/check-public-api-examples.ts.public-export-example-coveragerule inpackages/warden(scoperepo-local, alongsidewarden-export-symmetry/warden-rules-use-ast): inventories non-type-only named re-exports on the five public surface package barrels and requires a leading@exampleTSDoc on each exported declaration. Built on the sharedast.tshelpers (no TS compiler dependency), anchored to this repo via the rule module's on-disk location so it stays silent in consumer repos.@exampleon aminimumExportsentry → error; other inventoried exports → warn; minimum export absent from the barrel, star/non-relative re-exports on a target barrel, unreadable resolved source → error.publicExportExampleCoverageTrailwrapper + full registry symmetry; 15 new tests including a real-repo baseline over all five barrels.wardenConfigSchemahas no per-rule config channel today, so configured-not-hard-coded is deferred to a config-channel design.docs:api-examplesfrom thecheckpipeline — the warden run (trails:check) now owns this coverage (verified end-to-end by stripping an@exampleand watching the rule fail the warden run).@ontrails/wardenminor.Linear: TRL-943
Verification
bun test packages/warden(1082 pass), package typecheck/lint clean@examplefrompackages/cli/src/output.ts→ warden run fails with the new rule's diagnostic; restored byte-exactbun run warden:agents:check,warden:skills:check,plugin:metadata:check,bun run check/build/test/publish:check/wayfinder:dogfoodgreen at the stack tip