agentleFS
Gusen1453Gusen1453/creed/skills/write-spec/SKILL.md

write-spec

Skill3 starsChanged 2 months agoMITView on GitHub

Use after design alignment (grill), or when the user asks for a design/spec/PRD doc, or when locking scope before an implementation plan, or when handing work off to someone who was not in the design discussion.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use audit-choices, close-spec and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • dzhngSkill

    audit-choices

    Audit the choices an implementing agent made, not its diff — a pure decision audit that traces the session's history into a choices ledger, changes no code, and never blocks an unsupervised run. Working code still embeds architecture the user never chose; surface it because future work inherits it. Use when the user wants to review the decisions the AI made on their behalf, before merging or committing AI-implemented work, when integrating a delegated subagent's pass, or when a fix "works" but might be a point fix.

    Also in 3 projects that use this

  • dzhngSkill

    close-spec

    When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).

    Also in 3 projects that use this

  • LucasMatuszewskiSkill

    audit-agents

    Audit and maintain agent configuration files (.claude/agents, AGENTS.md, CLAUDE.md, agent-memory). Checks for duplicates, outdated info, naming conflicts, wrong technical facts, and files over 200 lines. Fixes all issues and commits.

    Also in 3 projects that use this

  • Halcyon666Skill

    write-skills

    Creates high-quality Agent Skills (SKILL.md files) that follow the open Agent Skills specification. Use when asked to create a skill, write a SKILL.md, package agent instructions, build a reusable capability, or turn a workflow into a shareable skill. Produces spec-compliant, concise, well-structured skills optimized for agent discovery and execution.

    Also in 3 projects that use this

  • isLinXuSkill

    eval-skills

    AI Agent Skill unit testing framework. A framework-agnostic toolkit for discovering, scaffolding, selecting, evaluating, and reporting on AI skills. Use this skill to assess skill quality before production, compare candidate skills on the same benchmark, enforce quality gates in CI/CD, and generate human-readable evaluation reports.

    Also in 3 projects that use this

  • +6 more from dzhng

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 8

    Distinctive

    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:

    After grill approval, before write-plan

    line 22
  2. Distinctive:

    Write for one reader who is both the engineer and a daily user of what they build:

    line 39
  3. Distinctive:

    Prefer "what the user sees + the mechanism that delivers it" over "the system should have pluggable…"

    line 43
  4. Distinctive:

    No TBD / "it depends" left as product decisions

    line 153
  5. Distinctive:

    No contradictions between scenarios and acceptance

    line 154
  6. Distinctive:

    No implementation plan leaked (paths, RED/GREEN, commits)

    line 155
  7. Distinctive:

    Every In-scope item maps to at least one scenario

    line 157
  8. Distinctive:

    No new boundary → write-plan

    line 189

“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “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

Write Spec

Output language: answer and write artifacts in the user's own language (match their messages, not the repo's history).

Overview

Turn an approved design into a durable product spec that a new teammate (or future you) can understand without the meeting recording.

Spec = what & why. Plan = how & in what order. Do not mix them.

REQUIRED UPSTREAM: grill (or an already-approved design the user points at). Do not invent product decisions while writing the spec.

Announce: "Using write-spec to …"

When to Use

  • After grill approval, before write-plan
  • User asks for a design doc / spec / PRD-lite
  • Handing work to another person or agent who was not in the grill

When NOT to use: pure bugfix with known fix; one-line change with no product ambiguity; user already has an approved written spec and only wants write-plan.

The Iron Law

A SPEC NO NEWCOMER CAN ACT FROM IS THEATER.
Write in plain language. Drive with user-visible scenarios.
Every "should" must become a concrete case someone can demo or test.
No file paths, TDD steps, or commit lists — those belong in write-plan.

Voice: builder who lives in their own product

Write for one reader who is both the engineer and a daily user of what they build:

  • Pair value with mechanism — say what the experience feels like and name the tech choice behind it, so they keep control of both product and code
  • Lead with perceivable upside / downside / cost, but never drop the mechanism into vague "user speak"
  • Prefer "what the user sees + the mechanism that delivers it" over "the system should have pluggable…"
  • Name the trade-off you chose and what you explicitly skip this round
  • Scenarios carry the product story (§2); "How we'll build it" (§7) carries the precise tech — keep them distinct, keep both honest

Spec vs Plan (do not blur)

Spec (write-spec)Plan (write-plan)
QuestionWhat should the product do, and why?Which files, in what order, how do we verify?
ReaderProduct owner, new hire, future youImplementer / coding agent
ContentScenarios, scope, trade-offs, acceptancePaths, interfaces, RED→GREEN→commit
Bad smellFile lists, "Task 3", pytest commands"Maybe we should also support X" undecided

Workflow

  1. Confirm source — approved grill summary or user-supplied design; unresolved decisions → back to grill; if explore produced a fact checklist, fold it into §0 Current state
  2. Pick path — default docs/creed/specs/YYYY-MM-DD-<topic>-design.md (user path overrides)
  3. Write the spec — use the template below; scale length to complexity
  4. Self-review — checklist at bottom
  5. User gate — ask them to skim before planning
  6. Hand off — if the slice adds modules / ports / IO edges → solid (Gate); else → write-plan → tdd

Spec template (required sections)

# <Feature> Spec

**Status:** Draft | Approved
**Date:** YYYY-MM-DD
**Owner:** <who decides product calls>
**Issue:** #<N>   ← only when this session already has an issue number; omit the line otherwise

## 0. Current state (from explore) — refactor/legacy only

When explore produced a fact checklist (the task modified existing code), open the
spec with it so a newcomer doesn't re-read the repo. Skip this section for greenfield.

- **Anchors:** <methods/classes/tables read, current behavior>
- **Assertion check:** <user's claims → ✓/✗ with evidence>
- **Conflicts:** <constraint vs repo reality, resolved by the decisions below>

## 1. One-liner (board slide)

<One sentence: who gets what benefit, and the main cost/risk we accept.>

## 2. User scenarios (source of truth)

### Happy path
- **Who:** …
- **When:** …
- **Does:** …
- **Sees:** …

### Failure / edge
- **Who:** …
- **When:** … (timeout, empty, permission, conflict, …)
- **Sees / system does:** …

(Add more scenarios until a newcomer can role-play the feature.)

## 3. Scope

**In:**
- …

**Out (this round):**
- … — why skipped: …

## 4. Decision log (mentoring)

| Decision | Chose | Rejected | Why (user/business impact) |
|----------|-------|----------|----------------------------|
| … | A | B | Users get …; we accept … |

## 5. Acceptance (demo / test language)

- [ ] Scenario: … → observable result …
- [ ] Scenario: … → observable result …

## 6. Constraints

- Platforms / versions / naming / perf floors (quantify if it matters to users)

## 7. How we'll build it (short)

<2–5 sentences: main components and boundaries. No task list.>

## 8. Open risks

- … → mitigation / accept

Writing rules

  1. Scenario before mechanism — if you cannot write a Who/When/Does/Sees case, you do not understand the requirement yet → grill
  2. Replace adjectives with cases — "flexible / polished / high-performance" → concrete limits and outcomes
  3. User-perceivable trade-offs — when comparing options in the decision log, state what the user gains or loses, then the engineering cost
  4. Mentoring value — decision log + Out-of-scope are mandatory; they teach judgment, not just the happy path
  5. One shippable slice — if the doc covers two independent products, split into two specs

Bad → good

Bad (obscure / unteachable)Good (user-visible / teachable)
Support pluggable auth middlewareLogged-out user hits Export → login → return and auto-continue export
Improve resilienceNetwork fail on Complete → status unchanged + retry message; no half-done state
Flexible batch importMax 500 rows; row 3 bad → reject whole batch and point at row 3

Self-review (before user review)

  1. No TBD / "it depends" left as product decisions
  2. No contradictions between scenarios and acceptance
  3. No implementation plan leaked (paths, RED/GREEN, commits)
  4. A new hire could explain the feature from §0–§5 alone
  5. Every In-scope item maps to at least one scenario

Rationalization Table

ExcuseReality
"We'll put file paths in the spec so plan is shorter"Spec stays stable; plan churns. Keep them apart.
"Architecture diagram is enough"Diagrams don't teach when the user sees an error.
"Too simple for scenarios"Tiny features hide the worst assumptions. One happy + one failure case still required.
"Decision log is bureaucracy"Without it, the next person re-litigates the same choice.
"Board language dumbs it down"Clear upside/cost is leadership, not dumbing down.

Checklist

  • Upstream design approved (grill or equivalent)
  • Spec file written from template
  • Scenarios + In/Out + decision log + acceptance present
  • User reviewed (or explicitly waived)
  • Ready for solid (if new boundaries) or write-plan

Hand-off

Transition gate — before the spec is passed to the next stage, ask the user (one AskUserQuestion; never auto-advance):

A) Recommended: Proceed → solid (new boundaries) / write-plan
B) Review first — run **review** on this spec (`references/spec.md`; upstream = approved grill design), then return to this gate
C) Adjust — revise the spec, then return to this gate
D) Something else (I will type it)
  • New modules / ports / IO edges → solid (Gate)
  • No new boundary → write-plan
  • Product still open → grill (do not plan)

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.