agentleFS
gohypergiantgohypergiant/agent-skills/skills/accelint-ts-documentation/AGENTS.md

agent-skills / accelint-ts-documentation

AGENTS.md25 starsChanged 54 days agoApache-2.0View on GitHub

Comprehensive guide for auditing and improving JavaScript/TypeScript documentation. Covers JSDoc standards, comment markers, and code comment quality. Each section includes one-line summaries here, with links to detailed examples in the references/ folder. This structure minimizes context usage while providing complete implementation guidance when needed. Exported (Public API): - ✅ Always comprehensive documentation (no exceptions) - Required: description, @param, @returns, @template, @throws, @example Internal Code: - ✅ Document what's not obvious - Required: description, @param (for non-obvious), @returns (unless void/obvious), @template…

We split this AGENTS.md into the rules it gives an agent

8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All functions need: description, @param, @template (if generic), @returns (unless void).

    line 37
  2. Distinctive:

    All types/interfaces need: description, @template (if generic).

    line 41
  3. Distinctive:

    All classes need: description, @template (if generic).

    line 45
  4. Distinctive:

    All constants need: description.

    line 49
  5. Distinctive:

    Use dot notation to document destructured parameters (e.g., props.children, config.timeout).

    line 53
  6. Distinctive:

    Use TODO, FIXME, HACK, NOTE, REVIEW, PERF, DEBUG, REMARK with context and ownership.

    line 65
  7. Distinctive:

    Always remove: commented-out code, edit history, comments restating obvious code.

    line 69
  8. Distinctive:

    Always keep: marker comments, linter directives, business logic explanations, docblocks.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Code Documentation Audit

Abstract

Comprehensive guide for auditing and improving JavaScript/TypeScript documentation. Covers JSDoc standards, comment markers, and code comment quality. Each section includes one-line summaries here, with links to detailed examples in the references/ folder.


How to Use This Guide

  1. Start here: Scan the rule summaries to identify documentation issues
  2. Load references as needed: Click through to detailed examples only when implementing
  3. Progressive loading: Each reference file is self-contained with ❌/✅ examples

This structure minimizes context usage while providing complete implementation guidance when needed.


Quick Reference

When to Document

Exported (Public API):

  • ✅ Always comprehensive documentation (no exceptions)
  • Required: description, @param, @returns, @template, @throws, @example

Internal Code:

  • ✅ Document what's not obvious
  • Required: description, @param (for non-obvious), @returns (unless void/obvious), @template
  • Optional: @example, @throws

JSDoc Standards

Functions

All functions need: description, @param, @template (if generic), @returns (unless void). Exported functions also need @throws and @example. View detailed examples

Types and Interfaces

All types/interfaces need: description, @template (if generic). Exported types also need property descriptions. View detailed examples

Classes

All classes need: description, @template (if generic). Exported classes also need @example. View detailed examples

Constants

All constants need: description. Exported constants should include units/constraints if applicable. View detailed examples

Object Parameters

Use dot notation to document destructured parameters (e.g., props.children, config.timeout). View detailed examples

Code Fence Requirement

All @example tags MUST use code fences with language identifier (typescript, javascript, tsx, jsx). View detailed examples


Comment Quality

Comment Markers

Use TODO, FIXME, HACK, NOTE, REVIEW, PERF, DEBUG, REMARK with context and ownership. View detailed examples

Comments to Remove

Always remove: commented-out code, edit history, comments restating obvious code. View detailed examples

Comments to Preserve

Always keep: marker comments, linter directives, business logic explanations, docblocks. View detailed examples

Comment Placement

Move end-of-line comments to their own line above the code (improves readability). View detailed examples


Common Anti-Patterns

NEVER do these:

  • ❌ @example without code fences (won't render properly)
  • ❌ Over-document internal utilities (noise vs signal)
  • ❌ Leave commented-out code (git preserves history)
  • ❌ Document HOW instead of WHAT/WHY
  • ❌ Use @returns for void functions
  • ❌ Add TODO without context ("fix this" is useless)

See SKILL.md for detailed anti-pattern examples with corrections.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.