agentleFS
junhjangjunhjang/claude-harness/.claude/skills/new-doc/SKILL.md

new-doc

Skill0 starsChanged 6 months agoMITView on GitHub

Scaffold a new documentation file (PRD / RFC / ADR / SPEC / TDD / AUDIT / POSTMORTEM / README) with the canonical frontmatter and section skeleton from docs/harness/doc-pattern.md.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Pre-check: If the target file already exists, STOP.

    line 32
  2. Very specific:

    Generate body: Use the section template for that type from docs/harness/doc-pattern.md §4.

    line 45
  3. Very specific:

    Write the file: Create parent directories as needed (mkdir -p).

    line 47
  4. Distinctive:

    Backfilling an RFC: after the decision is made — that is revisionism.

    line 62

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Scaffold a new documentation file following the doc-pattern matrix in docs/harness/doc-pattern.md. Read that file first if you have not already — it is the source of truth for all doc-type structure rules; this skill only operationalizes it.

Argument format: /new-doc <type> <topic>

  • <type>: one of PRD, RFC, ADR, SPEC, TDD, AUDIT, POSTMORTEM, README (case-insensitive).
  • <topic>: short slug. Used for both the file path and (often) the doc title.

Steps when invoked

  1. Parse args. Normalize <type> to uppercase. If the type is not one of the eight, list the valid types and stop.
  2. Determine path. Apply these defaults; ask the user if any rule is ambiguous in the current context. Default paths shown below; consuming repos may configure different conventions (e.g., docs/adr/ for ADRs). The skill writes to the path your project has set up.

    TypeDefault path
    PRDdocs/harness/components/<topic>/PRD.md
    RFCdocs/harness/components/<topic>/RFC.md
    ADRdocs/decisions/<YYYY-MM-DD>-NNN-<topic-slug>.md
    SPECdocs/harness/components/<topic>/SPEC.md
    TDDdocs/harness/components/<topic>/TDD.md
    AUDIT.claude/audits/<YYYY-MM-DD>-<topic>.md
    POSTMORTEMdocs/postmortems/<YYYY-MM-DD>-<topic>.md
    READMEIf <topic> names a directory, use <topic>/README.md. Else ask.

    For ADR specifically: scan docs/decisions/ for existing files, take the highest NNN, increment by one. Use today's UTC date.

  3. Pre-check. If the target file already exists, STOP. Report the path and ask whether the user wants to overwrite (default: no).
  4. Generate frontmatter. Apply this template, filling in fields:
    ---
    type: <TYPE>
    status: draft
    owner: <git config user.email or 'unowned'>
    last-reviewed: <YYYY-MM-DD>
    ---
    For ADR, also include empty supersedes: and superseded-by: keys.
  5. Generate body. Use the section template for that type from docs/harness/doc-pattern.md §4. Write the section headers with one-line placeholder beneath each — body text is for the user to fill in.
  6. Write the file. Create parent directories as needed (mkdir -p).
  7. Report.
    • Echo the created path.
    • Show the first ~10 lines so the user can verify frontmatter.
    • State next-step reminders, applicable to the type:
      • All: "Add an index line to CLAUDE.md (Principle 7 — Index Discipline)."
      • ADR: "If this supersedes an earlier ADR, set supersedes: here and update the older ADR's superseded-by:."
      • SPEC: "If the output of this spec is consumed by automation, plan an AUDIT trigger."
      • POSTMORTEM: "Link from any related ticket / incident, then schedule the action items."

Anti-patterns to avoid

  • Creating a doc with no frontmatter — frontmatter is required per doc-pattern.md §3.
  • Accepting a <type> not in the canonical eight — push back and refer the user to doc-pattern.md §1.
  • Backfilling an RFC after the decision is made — that is revisionism. Tell the user to write an ADR instead and link the prior context informally.
  • Creating a POSTMORTEM speculatively — only after an actual incident.
  • Silently overwriting an existing file. Always pre-check.

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.