Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

JSDoc

$ jsdoc Community Low Risk
JSDoc · Design & Docs · Apache-2.0 · macos / linux / windows

JSDoc parses JavaScript source comments to generate static HTML API documentation sites (-d ./out). For agents, the standout flag is -X (--explain), which dumps all parsed doclets as a structured JSON array directly to stdout without writing any HTML files.

FCRS-1.0 Score
81 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g jsdoc
CLI vs MCP Decision CLI Only

Extracting structured JSDoc AST doclets via jsdoc -X or building local HTML docs runs directly on source files without MCP.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

-X (--explain) emits structured JSON doclets cleanly to stdout and -c/-d/-r work headlessly without prompts.

  • -X / --explain prints parsed doclets as JSON to stdout
  • Deterministic headless execution with -c and -d
Trust & Safety 22 / 25

-X mode is strictly read-only; HTML generation writes into -d (or ./out by default) locally.

  • -X performs zero filesystem writes
Setup & Portability 13 / 15

Cross-platform Node package via npm install -g jsdoc or npx jsdoc.

  • Standard npm / npx installation
Utility & Efficiency 11 / 15

Mature standard for plain JavaScript JSDoc extraction, though TypeScript codebases typically favor TypeDoc or API Extractor.

  • Focused on JavaScript; TypeScript requires plugins or TypeDoc
Maintenance & Lineage 7 / 10

Long-standing Apache-2.0 project (jsdoc/jsdoc) in low-churn maintenance.

  • Stable jsdoc/jsdoc repository
Docs & Verifiability 8 / 10

Well-documented CLI flags and tag reference at jsdoc.app.

  • Official documentation at jsdoc.app/about-commandline

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; operates strictly on local JavaScript source and jsdoc.json configs.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free, offline, and Apache-2.0 open-source.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# JSDoc Agent Rules
- Use `jsdoc -X` (`--explain`) when inspecting doc comments or symbol metadata—it emits JSON to stdout without writing `./out`.
- Always pass `-d <dir>` explicitly when generating HTML so docs do not land in the default `./out` folder unexpectedly.

Agent-Ready Command Recipes

Safe Read-Only Queries

Dump parsed JSDoc doclets as JSON without writing HTML
jsdoc -X -r src/

Parses src/ recursively and prints all documented symbols as a JSON array to stdout with zero disk writes.

Controlled Writes & Previews

Build static HTML API documentation to a target directory
jsdoc -c jsdoc.json -d docs/api -r src/

Generates HTML API docs using jsdoc.json into docs/api.

Strengths for Agents

  • + jsdoc -X (--explain) dumps structured JSON symbol/doclet metadata directly to stdout with zero writes.
  • + Standard, dependency-light JavaScript API doc generator.
  • + Zero-install execution via npx jsdoc.

Caveats & Pitfalls

  • ! Omitting -X and -d writes HTML artifacts into ./out in the current directory.
  • ! Designed primarily for JavaScript rather than native TypeScript syntax.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI