Skip to content

docs: add missing JSDoc example sections in _tools/pkgs packages#11804

Merged
kgryte merged 3 commits intodevelopfrom
philipp/drift-_tools-pkgs-2026-04-27
Apr 27, 2026
Merged

docs: add missing JSDoc example sections in _tools/pkgs packages#11804
kgryte merged 3 commits intodevelopfrom
philipp/drift-_tools-pkgs-2026-04-27

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

@Planeshifter Planeshifter commented Apr 27, 2026

Description

This PR adds

  • @example blocks to the depList public function JSDoc in _tools/pkgs/dep-list, bringing it into line with the 92% of _tools/pkgs siblings that document at least one usage example. Examples are lifted directly from the package README: a basic invocation with a package identifier string and an options invocation using dev: true. No behavioral, signature, or test changes.
  • @example blocks to the public namespaceDeps JSDoc in _tools/pkgs/namespace-deps, bringing the package into conformance with the 92% of _tools/pkgs siblings that document at least one usage example. The two examples are lifted directly from the README: a basic namespaceDeps( '@stdlib/assert' ) call and a dev: true options variant. No signatures, behavior, or tests were changed.

Related Issues

None.

Questions

No.

Other

Validation

What was checked:

  • Structural feature extraction across all 25 members (file tree, package.json shape, README section structure, per-subdir file listings).
  • Semantic feature extraction via per-package sub-agents (publicSignature, validationPrologue, errorConstruction, jsdocShape, dependencies).
  • Three-agent drift validation (semantic-review, cross-reference, structural-review). Both dep-list and namespace-deps returned confirmed-drift from the semantic-review and cross-reference agents on the hasExample finding; no test or doc-tooling cascade was identified.

What was deliberately excluded:

  • Intentional design deviations: outliers missing lib/sync.js (dep-list, installed, name2bucket, name2standalone, namespace-deps) — five packages are sync-only or async-only by design, so the async/sync split does not apply. Outliers missing lib/validate.js (name2bucket, name2standalone) similarly take no options object and validate inline. Marked inapplicable by the structural-review agent.
  • Tests-rely-on-deviation / non-mechanical fixes: installed is missing tests entirely, missing directories.test, and lacks a ## Examples heading; correcting any of these cascades into writing tests or example content, which is out of scope for mechanical drift correction.
  • Empty-section README drift: dep-list and namespace-deps have empty <section class="notes"> containers without ### Notes headings. Adding the heading without content would create a different kind of weirdness, and content requires package-specific judgement; dropped.
  • Features without clear majority: publicSignature and validationPrologue vary with each function's input domain across the namespace; no namespace-wide pattern at ≥75%.

Checklist

AI Assistance

  • Yes
  • No

How AI assistance was used:

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored end-to-end by Claude Code as part of an automated cross-package drift detection routine. Three independent validator sub-agents (one Opus semantic review, one Opus cross-reference, one Sonnet structural review) confirmed both dep-list and namespace-deps as mechanical-drift outliers before the change was applied. The example bodies were lifted verbatim from each package's existing README.md. A human maintainer should audit before promoting this PR out of draft.


@stdlib-js/reviewers


Generated by Claude Code

claude added 2 commits April 27, 2026 00:42
Added `@example` blocks to the public `depList` function's JSDoc
(present in 92% of `_tools/pkgs` siblings, 23/25). Examples are
lifted from the package README's existing usage snippets; no
behavioral or signature changes.

https://claude.ai/code/session_018TZhAvyL3P8FYzhGm4G1LH
Added `@example` blocks to the public `namespaceDeps` function's
JSDoc (present in 92% of `_tools/pkgs` siblings, 23/25). Examples
are lifted from the package README's existing usage snippets; no
behavioral or signature changes.

https://claude.ai/code/session_018TZhAvyL3P8FYzhGm4G1LH
@stdlib-bot stdlib-bot added the Tools Issue or pull request related to project tooling. label Apr 27, 2026
…espace-deps}` examples

Renamed the JSDoc `@example` result variable from `deps`/`devDeps`
to `out` so the example does not shadow the module-scope
`var deps = require( './deps.js' );` import. Without this rename,
the example-runner shadowed the internal `deps` function and threw
`deps is not a function` when invoking the public function.

https://claude.ai/code/session_018TZhAvyL3P8FYzhGm4G1LH
@Planeshifter Planeshifter changed the title docs: align outliers in _tools/pkgs with namespace JSDoc convention docs: add missing examples sections in _tools/pkgs packages Apr 27, 2026
@Planeshifter Planeshifter changed the title docs: add missing examples sections in _tools/pkgs packages docs: add missing JSDoc example sections in _tools/pkgs packages Apr 27, 2026
@Planeshifter Planeshifter marked this pull request as ready for review April 27, 2026 03:08
@Planeshifter Planeshifter requested review from a team and kgryte April 27, 2026 03:08
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Apr 27, 2026
@kgryte kgryte added Documentation Improvements, additions, or changes to documentation. and removed Needs Review A pull request which needs code review. labels Apr 27, 2026
@kgryte kgryte merged commit 8d870df into develop Apr 27, 2026
63 checks passed
@kgryte kgryte deleted the philipp/drift-_tools-pkgs-2026-04-27 branch April 27, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements, additions, or changes to documentation. Tools Issue or pull request related to project tooling.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants