agentleFS
yourhoneypomelo-cellyourhoneypomelo-cell/agent-workspace-template/.agents/skills/spec-workflow/SKILL.md

spec-workflow

Skill2 starsChanged 8 days agoMITView on GitHub

Turn user requests into requirements, decisions, tasks and verified features. Use when the user asks for a new capability, changes or drops one, or when a request is too large for one task.

10 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

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

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add the requirement with an acceptance command or an observable result, in the same turn the user stated it.

    line 20
  2. Very specific:

    If the detail exceeds two lines, copy .agents/template/spec/ to docs/specs/<slug>/, fill requirements.md and set the requirement's Detail …

    line 23
  3. Very specific:

    Add the feature with status planned, naming the requirement and tasks.

    line 31
  4. Very specific:

    When all tasks are done: ws set F<n> --set status=shipped.

    line 33
  5. Distinctive:

    Write these into the task Scope or the spec before editing code.

    line 37
  6. Very specific:

    Run the task's acceptance once before the first edit.

    line 47
  7. Distinctive:

    Keep what must outlive the feature, such as reading data it already wrote, as a requirement with its own acceptance.

    line 74
  8. Distinctive:

    Put the enumeration in the spec or a report and name its path in the feature's Reason.

    line 77
  9. Distinctive:

    Write current, expected and unchanged behavior as separate lines.

    line 81
  10. Distinctive:

    Write a test that fails on the current code for the reported reason, and run it.

    line 83
  11. Distinctive:

    Search for the same pattern elsewhere.

    line 85
  12. Distinctive:

    Never narrow the input range or loosen an assertion to make a test pass, and never add a second test to route around a failing one.

    line 93

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

Specification workflow

Requests become requirements, requirements become tasks, verified tasks ship features.

user request -> requirement (R) -> tasks (T) -> code + tests -> ws verify --done -> feature (F) shipped
                     |                 |
              open question (Q)   decision (D)

New capability

  1. Restate the request in one sentence and confirm it with the user if it is ambiguous. Unclear points become questions: ws add question --set question=....
  2. Add the requirement with an acceptance command or an observable result, in the same turn the user stated it. Do not wait until every detail is settled: record the confirmed part now and put only the open details in the Idea pool.
  3. If the detail exceeds two lines, copy .agents/template/spec/ to docs/specs/<slug>/, fill requirements.md and set the requirement's Detail to docs/specs/<slug>/requirements.md.
  4. Record design choices and rejected options with ws add decision.
  5. Split the work into tasks of a few hours each, each with its own acceptance command. Name in the Scope the paths the task changes, new:<path> for a file it creates and each outside system it touches as resource:<name>, for example services/unpaywall/ new:tests/test_proxy.py resource:vps/unpaywall. Parallel sessions claim tasks by these, and a task with no path in its Scope, or with tree:, blocks every other session.
  6. Add the feature with status planned, naming the requirement and tasks.
  7. Implement one task, run ws verify T<n> --done -- <command>, repeat.
  8. When all tasks are done: ws set F<n> --set status=shipped.

Before changing behavior

Write these into the task Scope or the spec before editing code. Each answers a question the next session would otherwise ask again:

ItemWhat to write
ImpactThe callers and consumers of what changes, and the command that listed them (grep -rn "fetch_pdf" services/)
KeepBehavior next to the change that must not move, with the test that covers it; with no such test, add one first and see it pass on the unchanged code
ChangeThe behavior that changes, as current and expected
PremiseWhat the change relies on, checked: a route that exists may have no caller, a table may have no writer

Run the task's acceptance once before the first edit. A failure that was already there is the baseline: record it in recovery_notes, so it is not blamed on the change.

Questions

A question that changes what the user sees, or needs their authority, stays open and blocks the work it affects. A question about internals is deferred: the work goes on with a stated default, and the brief shows it so nobody asks again.

ws add question --set "question=Cache size limit?" --set "context=T4 needs a number"
ws set Q3 --set status=deferred --set "answer=default: 500 MB until the user decides"

Changed request

  • Small change, same acceptance: edit the requirement text with ws set. The log keeps the old text.
  • Different acceptance or scope: set the old requirement to replaced with a reason, add a new one and point affected tasks at it.
  • Dropped: set the requirement to removed, the feature to removed and open tasks to dropped, each with a reason.

Retiring a feature

  1. Enumerate everything that uses it: callers, tests, configuration, documents, scheduled jobs and stored data. Write each command and its range, then one line per hit: removed, kept and why, or moved to another task. "Same as above" is not an answer.
  2. Keep what must outlive the feature, such as reading data it already wrote, as a requirement with its own acceptance.
  3. Set the feature to removed or replaced with the reason and the replacement, then delete code. Put the enumeration in the spec or a report and name its path in the feature's Reason.

Fixing a bug

  1. Write current, expected and unchanged behavior as separate lines. Ask the user when the symptom, the trigger or the expected result is missing.
  2. Write a test that fails on the current code for the reported reason, and run it. If it passes, stop: the bug is gone, the cause is wrong, or the test misses it.
  3. Search for the same pattern elsewhere. Write the search command and what you did with each hit.
  4. Fix, then run the same tests again.

A one-line fix inside an existing requirement reuses that requirement and its task or test.

Tests that prove something

  • Mock only external services. A mock of the code under test proves nothing.
  • Never narrow the input range or loosen an assertion to make a test pass, and never add a second test to route around a failing one.
  • Cover the boundary that breaks: 0, empty, null, equal values, the day boundary. Shape test data on real samples, so two sides that share a wrong assumption do not both pass.
  • A check of behavior names its output: check: python ops/probe.py expect "HTTP 200".

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.