agentleFS
Vimalk0703Vimalk0703/shipworthy/skills/documentation/documentation-as-code/SKILL.md

documentation-as-code

Skill6 starsChanged 8 months agoMITView on GitHub

JSDoc/docstrings on exports, README sync, API documentation, architecture decision records, and changelog entries.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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:

    Every project README should have:

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill 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
SKILL.md

Documentation as Code

Principle

Documentation that lives outside the codebase rots. Keep documentation as close to the code as possible, ideally generated from it.

What to Document

Always Document

  • Public API functions (JSDoc/docstrings with params, returns, throws)
  • Module purpose (brief comment at top of file explaining what this module does)
  • Non-obvious business logic (why, not what)
  • Architecture decisions (ADRs in .shipworthy/decisions/)
  • API endpoints (request/response types serve as documentation)
  • Environment variables (what each one does, valid values)

Don't Document

  • Self-explanatory code (getUser(id) doesn't need a docstring saying "gets a user")
  • Implementation details that change frequently
  • Code that should be refactored instead of documented

JSDoc Pattern (TypeScript/JavaScript)

/**
 * Calculate insurance premium based on fleet safety score.
 *
 * @param fleetScore - Safety score from 0-100
 * @param basePremium - Current annual premium in dollars
 * @returns Adjusted premium with discount/surcharge applied
 * @throws {AppError} If fleetScore is outside valid range
 */
export function calculatePremium(fleetScore: number, basePremium: number): number {

README Requirements

Every project README should have:

  1. What — one sentence explaining what this project does
  2. Quick start — how to run it locally (3 commands max)
  3. Architecture — high-level overview (link to architecture.md for details)
  4. Contributing — how to contribute

Architecture Decision Records

For significant decisions, create .shipworthy/decisions/NNN-title.md:

# ADR-NNN: [Decision Title]
## Status: Accepted | Superseded | Deprecated
## Date: YYYY-MM-DD
## Context: [What prompted this decision]
## Decision: [What was decided]
## Consequences: [What this means going forward]

Changelog

Maintain a CHANGELOG.md for user-facing changes:

  • Added — new features
  • Changed — changes in existing functionality
  • Fixed — bug fixes
  • Removed — removed features
  • Security — vulnerability fixes

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.