Document

From stefvw93/weft · View interactive version

Document is an AI agent skill from the GitHub repository stefvw93/weft. Step 8 of the Weft TDD workflow. Use after /review-step is clean: full documentation sweep of everything touched, JSDoc on changed exports, specs.md sync, docs/ pages, package READMEs, example readme.md files. Prose docs are written by the weft-docs-author agent; JSDoc and specs.md sync by the main

How to use this skill

Skill file

/document: Documentation sweep (TDD step 8)

Bring all documentation touched by the change up to date. Commits are blocked until this step completes.

When to run

Scope: everything touched by the change

  1. JSDoc on all new/changed exported functions, types, and values (created in /mock; verify present and accurate now). Self-evident exports get exactly one line; doc blocks ≤ 3 lines for typical functions; no @example unless usage isn't inferable from the signature/name; no em-dashes. Omit @type annotations; describe non-obvious parameters; annotate Effect Schemas when not self-explanatory.
  2. specs.md sync: the spec must reflect final behavior. If implementation legitimately changed details (via the pause rule), the spec already says so; verify. Acceptance criteria, skip records, and edge cases must match reality.
  3. docs/ pages and package READMEs: update or create when the public API surface of a package changed. docs/ follows the Diátaxis framework (tutorial/, how-to/, reference/, explanation/). Each page fits exactly one mode; the weft-docs-author agent carries the placement rules.
  4. Example readme.md for every touched examples/* package. Must contain the required sections: Overview, Problem, Solution, How It Works, When to Use.

Authorship split

Procedure

  1. Inventory the diff: list changed exports, packages with public-API changes, touched examples.
  2. Main thread: verify/complete JSDoc; sync specs.md.
  3. Spawn weft-docs-author for the prose targets from the inventory; review its output against the source (no invented APIs, no JSX-isms, required readme sections present).
  4. Run vp run check: formats and lints the JSDoc and markdown. Must be green.
  5. Create a branch, commit, open a PR. Never push to main.

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.