agentleFS
KcAnomKcAnom/pi-fairy-tales-chains/skills/feature-ship-spec/SKILL.md

feature-ship-spec

Skill0 starsChanged 4 months agoMITView on GitHub

Phase 1 of 4 in the feature-ship chain — the human-in-the-loop feature delivery pipeline (spec → build → review → ship). Turns a raw feature request into a written spec using a fairy-tales plan-role subagent and renders it as an artifact doc (goals, approach, files to touch, risks, acceptance criteria). This phase starts the durable chain run (state tracked by the chain tool). Trigger whenever the user wants to ship a new feature, start the feature-ship chain, or turn a request into a spec: "feature-ship-spec", "phase 1 of feature-ship", "start feature-ship", "spec this feature", "begin the feature-ship chain", or when the previous phase says run feature-ship-spec next (the final phase says to run it again to start a new session).

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All chain state is managed by the chain tool: authoritative JSON at .pi/fairy-tales/chains/feature-ship/state.json with a human-readable …

    line 27
  2. Very specific:

    Call the chain tool with action: "status", chain: "feature-ship":

    line 41
  3. Very specific:

    If an active run exists, a feature-ship run is already mid-flight (the status shows its current phase — a legacy .feature-ship-state.md …

    line 43
  4. Very specific:

    If the tool reports the chain is locked by another session, abort and tell the user.

    line 48
  5. Very specific:

    If there is no run, or the last run is complete/abandoned, start fresh: action: "start", chain: "feature-ship", task: "<the feature …

    line 50
  6. Very specific:

    If the returned quest is already done (crash-resume case), use its stored result directly.

    line 68
  7. Very specific:

    After extracting what you need into chain state (Step 4), quest action consume with the quest id.

    line 70
  8. Distinctive:

    Ask the planner to produce, concretely:

    line 73
  9. Distinctive:

    Do not write this spec inline yourself — the plan-role pass is the one designing it.

    line 83
  10. Distinctive:

    Call the chain tool:

    line 95
  11. Distinctive:

    After completing this phase, output exactly:

    line 112
  12. Distinctive:

    Do not start the next phase.

    line 117

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

Feature Ship: Spec

Chain version: 2 (durable state contract — see docs/STATE-CONTRACT.md)

Phase 1 of 4: feature-ship-spec → feature-ship-build → feature-ship-review → feature-ship-ship

Overview

Entry point of the feature-ship chain. Takes a raw feature request and turns it into a written spec — goals, approach, files to touch, risks, and acceptance criteria — that the rest of the chain builds, reviews, and ships against.

All chain state is managed by the chain tool: authoritative JSON at .pi/fairy-tales/chains/feature-ship/state.json with a human-readable state.md projection beside it. Never create or edit state files by hand, and never create lock files — the tool locks for you.

Delegates the actual design work to a fairy-tales plan-role pass so the spec is produced by a dedicated planning pass rather than improvised inline, then renders the result with the artifact tool so it's a durable, shareable doc rather than only chat text.

Workflow

Step 1 — Start the run (entry phase)

Call the chain tool with action: "status", chain: "feature-ship":

  • If an active run exists, a feature-ship run is already mid-flight (the status shows its current phase — a legacy .feature-ship-state.md from an older version is imported automatically). Show the user the status and ask whether to resume from the current phase (run that phase's skill) or discard it (action: "abandon") and start over. Do not silently overwrite.
  • If the tool reports the chain is locked by another session, abort and tell the user; a dead session's lock can be cleared with action: "unlock".
  • If there is no run, or the last run is complete/abandoned, start fresh: action: "start", chain: "feature-ship", task: "<the feature request>". Note the runId in the response — it keys this run's quest dedupe keys.

Step 2 — Design the spec via a durable quest

Delegate the design to a fairy-tales plan-role pass. Because spec design can be long-running and must survive a session restart, use the quest tool rather than a bare agent call:

  1. quest action enqueue with role: "plan", the feature request + repo context as a self-contained task, and crucially:
    • dedupeKey: "feature-ship/<runId>/spec/main" — if this phase crashed and is being re-run, the same quest (or its retained result) is returned instead of starting a duplicate design pass;
    • chain: { chain: "feature-ship", runId: "<runId>", phase: "spec" };
    • retainUntilConsumed: true — the result survives history pruning until this phase reads it.
  2. If the returned quest is already done (crash-resume case), use its stored result directly. Otherwise quest action run with its id and collect the result.
  3. After extracting what you need into chain state (Step 4), quest action consume with the quest id.

Ask the planner to produce, concretely:

  • Goals — what the feature must accomplish, in the user's terms.
  • Approach — the technical strategy, at the level of "which modules/layers change and how", not a line-by-line diff.
  • Files to touch — concrete paths, not just areas.
  • Risks — what could break, what's ambiguous, what needs a follow-up decision.
  • Acceptance criteria — a checklist that phase 3 (review) and phase 4 (ship) can verify against mechanically; these must be specific and falsifiable, not "it works".

Do not write this spec inline yourself — the plan-role pass is the one designing it; your job in this phase is to brief it, collect its output, and render it.

Step 3 — Render the spec doc via the artifact tool

Take the planner's output and render it with the artifact tool as a spec document (sections: Goals, Approach, Files to Touch, Risks, Acceptance Criteria). Share the resulting artifact link with the user. The chain state stores the same content so later phases don't depend on the artifact staying reachable.

Step 4 — Complete the phase

Call the chain tool:

action: "complete-phase", chain: "feature-ship", phase: "spec",
summary: "<goals/approach in 2-4 sentences; anything phase 2 must know>",
data: {
  "spec": "<full spec markdown: Goals / Approach / Files to Touch / Risks / Acceptance Criteria>",
  "acceptanceCriteria": ["<criterion 1>", "<criterion 2>", "..."]
},
artifacts: { "specUrl": "<artifact tool URL>", "specQuest": "<quest id>" }

The tool validates this is the current phase, advances the run to build, and rewrites the JSON + markdown projection atomically.

Handoff

After completing this phase, output exactly:

Phase 1 complete. Chain state updated (.pi/fairy-tales/chains/feature-ship/state.json). Run /feature-ship-build to begin Phase 2.

Do not start the next phase. Do not offer to continue. Output only the handoff line and stop.

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.