agentleFS
assisjpassisjp/specflow/skills/engineering/to-spec/SKILL.md

to-spec

Skill17 starsChanged 4 months agoMITView on GitHub

Turn the current conversation — ideally the decision log from a grill session — into a spec (a PRD) and publish it to the project's issue tracker, or to a local file if there is none. No interview; this is pure synthesis of what has already been decided. Use when the user says "write the spec", "turn this into a spec", or after grilling has reached shared understanding.

105 other projects use a version of this, 76 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-ts-deep-modules, writing-beats and 10 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.
  • loulanyueSkill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 17 projects that use this

  • RoentekSkill

    writing-beats

    Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.

    Also in 22 projects that use this

  • RoentekSkill

    writing-fragments

    Writing, explore — mine raw fragments, no structure yet.

    Also in 20 projects that use this

  • qwlabsSkill

    claude-handoff

    Hand the current conversation off to a fresh background agent that picks up the work immediately.

    Also in 16 projects that use this

  • qhuang20Skill

    migrate-to-shoehorn

    Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

    Also in 19 projects that use this

  • AnasX7Skill

    scaffold-exercises

    Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.

    Also in 19 projects that use this

  • +2 more from Roentek

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 96 edited versions we read keep these.

  • 4

    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:

    If a grill decision log exists in the conversation, it is your primary source: every decision in the spec should trace back to a log entry …

    line 11
  2. Distinctive:

    Check with the user that these seams match their expectations before writing the spec.

    line 23
  3. Distinctive:

    Write the spec using the template below, then publish it.

    line 27
  4. Distinctive:

    If you cannot tell which the project uses, ask — it is a one-line decision, not an interview.

    line 32

“Common” is measured: kept by at least 6 in 10 of the 96 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

To Spec

Take the current conversation and codebase understanding and produce a spec. Do not interview the user — that is grill's job, and it should already have happened. This skill only synthesises what is already decided.

If a grill decision log exists in the conversation, it is your primary source: every decision in the spec should trace back to a log entry or to something the user explicitly said. Do not invent requirements the grilling did not settle.

Process

1. Understand the code

Explore the repo to understand its current state, if you have not already. Use the project's domain glossary (CONTEXT.md) vocabulary throughout the spec, and respect any ADRs in the area you are touching. If a term in the conversation conflicts with the glossary, resolve it before writing — a spec that uses words loosely produces code that does the wrong thing precisely.

2. Sketch the test seams

Sketch the seams at which the feature will be tested. Prefer existing seams to new ones, and prefer the highest seam possible — the fewer seams across the codebase, the better, and the ideal is one. If a new seam is needed, propose it at the highest point you can.

Check with the user that these seams match their expectations before writing the spec. This is the one place to pause — everything else is synthesis.

3. Write and publish

Write the spec using the template below, then publish it. Where it goes depends on what the project has:

  • A real issue tracker (GitHub, Linear, …) — publish as one issue. On GitHub use gh issue create. Apply a ready-for-agent label if the project uses one.
  • No tracker — write it to docs/specs/<feature-slug>.md and commit it. A spec is durable, not scratch: spec-execution reads it in a later session, the second-failure rule assumes it survives, and a fresh clone must still find it. Never write a spec to .scratch/ — that directory is ephemeral and git-ignored (ADR 0002, 0006).

If you cannot tell which the project uses, ask — it is a one-line decision, not an interview.

Clearing a returned marker (the second-failure gate's exit). If you are republishing a spec that a previous spec-execution sent back as defective — the source carries a returned label, or a Returned: spec-defect line — this rewrite heals it, and the rewritten spec is the same entity, not a new one (ADR 0008). So republish to the same source and clear the marker: remove the returned label and add a brief "rewritten" comment (tracker), or delete the Returned: line (local). spec-execution sets that marker; the republisher clears it. You clear it for a spec (the source to-spec owns); a marked ticket is cleared by to-tickets, the source it owns (ADR 0006/0008) — do not clear across the ownership line. Clearing is the only thing that lets the gate release. Do not open a new issue for the rewrite — that would strip the blocking edges of every ticket pointing at the old one.

<spec-template>

Problem Statement

The problem the user faces, from the user's perspective.

Solution

The solution to that problem, from the user's perspective.

User Stories

A long, numbered list of user stories, each in the form:

  1. As an <actor>, I want <capability>, so that <benefit>.

Cover every aspect of the feature. Be extensive — a thin story list is a spec that will grow surprises during implementation.

Implementation Decisions

The decisions that were actually made — trace each to the grill decision log where possible:

  • Modules built or modified, and the interfaces that change
  • Architectural decisions and technical clarifications
  • Schema changes and API contracts
  • Specific interactions

Do not include file paths or code snippets — they go stale fast. Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (a state machine, reducer, schema, or type shape), inline just the decision-rich part and note it came from a prototype.

Testing Decisions

  • What makes a good test here: exercise external behaviour, not implementation details
  • Which modules will be tested
  • Prior art — similar tests already in the codebase

Out of Scope

What this spec deliberately does not cover. Pull straight from the "out of scope" items the grilling surfaced.

Further Notes

Anything else worth recording.

</spec-template>

Traceability

Before you publish, re-read the spec and check every claim traces to a decision, a user statement, or a codebase fact. Anything that traces to none of those is invented — cut it or turn it into an open question for the user. A spec's job is to encode what was decided, not to quietly decide more.

Then weigh what the open questions cost. One that merely records context — a rough edge, a thing to watch — is legitimate; note it and publish. One that leaves a user story with no verifiable acceptance criterion is different: the spec does not say what to build there, so that story cannot be implemented or tested, and recording it honestly in Further Notes does not make it publishable. Say so plainly instead of shipping it and calling the spec ready — the next step is grill to settle the decision, not spec-execution. Publish anyway and the execution run discovers it at step 2 and hands the spec straight back, which is the most expensive possible way to learn something you already knew when you wrote it.

Hand off to the right next step

You are the only one who can judge the size of what you just wrote, so say it: after publishing, state whether the spec fits one reviewable PR. If it does, the next step is spec-execution. If it plainly does not — several endpoints, a long story list, work that lands in stages — the next step is to-tickets, and naming spec-execution instead costs the user a whole round before it refuses and proposes the cut. A completion names its next step, exactly as a refusal names its exit.

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.