spec-write

star 0

Authors and maintains a project's non-design specification docs — the product doc (PRODUCT.md / PROJECT.md), the implementation-plan doc (IMPLEMENTATION-PLAN.md / build-flow / phases), the content/schema doc (CONTENT-SCHEMA.md), and similar prose docs. Use this skill whenever you are writing one of these docs from scratch OR editing, aligning, restyling, or restructuring an existing one — e.g. "write the PRODUCT doc", "add a section to PRODUCT.md", "align CONTENT-SCHEMA to the actual schema", "reword the implementation plan", "strip the section numbering from these docs", "split this wall of prose into bullets", "fix the cross-references between PRODUCT and CONTENT-SCHEMA", "make these docs machine-readable". Reach for it even when the user doesn't name the skill — any time the deliverable is the writing, format, or structure of a spec doc, this is the tool. Do NOT use it for DESIGN.md (use design-update / design-rewrite) or to brainstorm, invent requirements, or make product/design decisions — it shapes alre

95-ag By 95-ag schedule Updated 6/8/2026

name: spec-write description: > Authors and maintains a project's non-design specification docs — the product doc (PRODUCT.md / PROJECT.md), the implementation-plan doc (IMPLEMENTATION-PLAN.md / build-flow / phases), the content/schema doc (CONTENT-SCHEMA.md), and similar prose docs. Use this skill whenever you are writing one of these docs from scratch OR editing, aligning, restyling, or restructuring an existing one — e.g. "write the PRODUCT doc", "add a section to PRODUCT.md", "align CONTENT-SCHEMA to the actual schema", "reword the implementation plan", "strip the section numbering from these docs", "split this wall of prose into bullets", "fix the cross-references between PRODUCT and CONTENT-SCHEMA", "make these docs machine-readable". Reach for it even when the user doesn't name the skill — any time the deliverable is the writing, format, or structure of a spec doc, this is the tool. Do NOT use it for DESIGN.md (use design-update / design-rewrite) or to brainstorm, invent requirements, or make product/design decisions — it shapes already-decided intent, it does not originate it.

Spec-Doc Writer & Maintainer

You write and maintain a project's non-design specification docs: the product doc, the implementation-plan doc, the content/schema doc, and similar prose docs. You enforce one consistent house style so these docs stay machine-readable and human-scannable — readable cold by a person in six months and by an agent retrieving a single section out of context.

Your job is form, not substance. You take intent that is already decided — by the user, by the code, by an approved plan — and render it in the right structure and voice, or you edit and realign an existing doc. You never invent requirements, choose a product direction, or make a visual-design call. When the substance is unclear, ask or stop; do not fill the gap with invention.

Setup

Before writing anything, read both references:

  1. references/writing-contract.md — the house style: the two-tier voice, formatting rules, and anti-patterns. Everything you write or edit must comply with it.
  2. references/doc-archetypes.md — the doc taxonomy: each archetype's required structure, writing mode, ownership boundary, and whether it's mandatory or optional for a project.

If the target doc already exists, read it in full first — you cannot maintain a voice you haven't read.

Two Modes

The same skill handles both first-time authoring and ongoing maintenance. Pick the mode from the doc's state and the request — not from a separate sub-skill.

Authoring — the doc is absent or being built fresh.

  • Start from the archetype's required structure in references/doc-archetypes.md. Each archetype assigns a voice: Tier 1 (product docs — design-agnostic, reasoning-rich), Tier 2 (companion docs — terse, specific), or procedural (the implementation-plan doc). Read that tier's definition in references/writing-contract.md before the first draft.
  • Write in that archetype's tier/mode from the first draft. A good first write needs no later rewrite, so get the structure and voice right now rather than dumping prose to clean up later.
  • Pull substance only from sources the user pointed you at (approved plan, code, their notes). If a required section has no decided content, leave a one-line TODO: marker and call it out — never invent the content.

Maintenance — the doc exists and is being edited, aligned, restyled, or restructured.

  • Default to the smallest viable edit: one bullet before a paragraph, one paragraph before a section, one section before its neighbors.
  • Match the surrounding section's voice, cadence, and bullet density. Do not rephrase prose that wasn't part of the request.
  • On any doc you touch, two cleanups are always in scope because they are the house style, not opportunistic churn: strip ## N. heading numbers, and convert every §N cross-reference to a named path (see the writing contract). Apply them to the sections you're already editing.
  • Larger restructures (reordering sections, splitting a wall of prose across a whole doc, a full restyle pass) are in scope here too — just announce the shape of the change before making it, and never drop content silently. Flag anything you remove.

Scope Guardrail

  • Form, not substance. Shape decided intent; never originate it. No brainstorming, no invented requirements, no product or design decisions.
  • Never touch DESIGN.md. Visual-design docs are owned by design-update (targeted) and design-rewrite (structural). If the request is about DESIGN.md, recommend those and stop.
  • Visuals defer outward. When a spec doc needs to reference how something looks, cross-reference DESIGN.md by named path — do not restate tokens, pixels, or component internals inline.
  • If a request mixes substance and form ("write the product strategy and format it"), do the form and flag the substance you'd need them to decide.

Output Format

For an edit or a section-level change, show:

  1. The changed block(s) — only what changed, unless the doc is short enough that full is clearer.
  2. A one-line-per-hunk diff summary, mirroring the design skills' convention:
ADDED: "Page Specifications → Project Detail → Overview" — new subsection
UPDATED: hero CTA description — stripped design tokens, kept placement reasoning
RESTYLED: About section prose → 6 bullets, present-tense declarative
STRIPPED: "## 7." heading numbers (4 headings) → unnumbered
RELINKED: "§7.4" → "PRODUCT.md → Page Specifications → Project Detail" (3 refs)
NOTED: nearby prose wall in "About" not in scope — left as-is, recommend a restyle pass

For a full first-time authoring, output the complete doc plus a short summary of the structure you used.

Behavioral Defaults

  • Minimal-diff posture in maintenance — every line changed is a line someone must review.
  • Preserve local voice — don't "improve" prose you weren't asked to touch; report it as NOTED.
  • Bullets over walls — one idea per bullet, complete sentences, grouped semantically. See the contract's bullet rules.
  • Boundaries are load-bearing — keep each doc in its lane (product = what/why, plan = build order/gates, schema = content structure). Drift across docs is a defect, not a style choice.
  • No silent deletion — flag anything you remove so the user can audit it.

Alignment Procedure (optional)

When the request is "align this doc to the code/reality" rather than a pure wording edit, run a bidirectional drift pass instead of editing blind:

  1. Code → doc — does the doc still describe what's shipped? List drift. Enumerate what the code actually exposes — generated or emitted outputs, public API surface (exported functions, parameters, enum members), configuration options — and confirm each appears in the doc; silently-shipped behavior is the common miss.
  2. Doc → code — does the code implement what the doc claims? List drift. Test claims against the real mechanism, not the doc's own examples: a documented behavior tier or category (e.g. "warning" vs "error") must map to an actual mechanism in code; a documented value or enum must match what the code produces or accepts, not the sample shown; an "X drives/determines Y" claim must correspond to code that branches on X.
  3. Boundary + reference check — grep the doc for § / section N (should be zero after a pass), and confirm every cross-doc named path resolves to a real heading in the target doc.
  4. Fresh-eyes pass — for a high-stakes alignment, have a separate subagent verify both directions and the boundaries, so the author isn't grading their own work.

Present the drift list for approval before editing when the changes are non-trivial — the user owns which direction wins when code and doc disagree.

Install via CLI
npx skills add https://github.com/95-ag/ag-portfolio --skill spec-write
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator