agentleFS
KoshuxKoshux/agentic-sdlc-scaffold/.claude/skills/create-spec-prompt/SKILL.md

create-spec-prompt

Skill0 starsChanged 4 months agoMITView on GitHub

Generate a per-spec implementation prompt file (.claude/prompts/implement-spec-NNN.prompt.md) from an existing spec. Use when the operator says "create a prompt for SPEC-NNN". Reads the spec, extracts phases and infrastructure, writes the prompt file.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    Write .claude/prompts/implement-spec-<NNN>.prompt.md using the template below.

    line 33

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

Create Spec Prompt

Generate .claude/prompts/implement-spec-<NNN>.prompt.md for the given spec.

Prerequisite — Stage 2.5. The spec must carry a recorded spec-review pass under its header. Generating an implementation prompt from an unreviewed spec bakes design errors and reinvented infrastructure into the implementation. No Stage 2.5 record → run the spec-review skill first, then come back.

Canonical spec structure

The authoritative section list is docs/templates/SPEC-TEMPLATE.md — the single source of truth shared with the feature-plan generator. Locate every section by its heading text, never by a hardcoded number. Section numbering can drift across spec eras; heading text is stable, so this skill keeps working on older specs.

Steps

  1. Find and read docs/specs/SPEC-<NNN>-*.md.
  2. Extract (each located by heading text):
    • Header block — title, feature branch, depends-on / iteration-of, risk level.
    • Problem Statement — 2–3 sentences on the gap.
    • Implementation Phases — phase names + step summaries.
    • Test Plan — test commands + required Docker services (look for a "Containers required" line).
    • Acceptance Criteria — so scope bullets can cite the AC IDs they satisfy.
  3. Write .claude/prompts/implement-spec-<NNN>.prompt.md using the template below.
  4. Report the file created and flag any spec section you could not find.

Authoring rules

  • Required sections only — gate status, scope, data-sync (production snapshot) decision, infrastructure preflight, test commands, handoff boundaries, rule/skill references. Nothing else.
  • Never duplicate rules. Link to .claude/rules/*.md and docs/*.md; do not copy their content into the prompt. Duplicated policy text drifts.
  • Handoff boundary must be explicit: browser verification and merge stay with the operator; the agent pushes the branch and stops.
  • Model the output on the most recent prompt in .claude/prompts/. A worked example ships with this scaffold at docs/examples/implement-spec-001.prompt.md.

Output template

---
description: Implement SPEC-NNN — <Title>
---

# Implement SPEC-NNN: <Title>

Use the `implement-spec` skill for execution.

**Spec:** `docs/specs/SPEC-NNN-<short-name>.md`
**Feature branch:** `feature/spec-NNN-<short-name>`
**Depends on:** <from the spec header, or "None">

## Context

<2–3 sentences from the spec's Problem Statement — the gap and why it matters>

## SDLC Gate

This prompt starts at Stage 3 (Branch). Stages 1 (Journey), 2 (Spec), and 2.5 (Spec
review) are complete and recorded in the spec.

Before any code:
1. `git fetch origin && git checkout main && git pull origin main`
2. `git checkout -b feature/spec-NNN-<short-name>`
3. Create `IMPLEMENTATION_<YYYY-MM-DD_HH-MM>.md` with objective, branch, and plan

Do not merge to `main`. See `.claude/rules/00-core-workflow.md` and `docs/sdlc.md`.

## Scope

<Phase headings and step bullets from the spec's Implementation Phases section — be
specific; include migration commands, or state "no migration" when the spec has no
schema change; cite the AC IDs each phase satisfies>

## Rules

- Full SDLC applies: branch from main, implementation log first, containers before
  tests. See `.claude/rules/00-core-workflow.md`.
- Parallelise only when the spec decomposes into genuinely independent units — the
  `implement-spec` skill adopts the `orchestrate` protocol itself; no manual call
  needed. See `docs/parallelisation.md`.
- Anti-cyclic-loop rule applies: read failures fully, fix setup before code. See
  `.claude/rules/testing.md`.
- Browser verification: Chrome DevTools MCP **is** usable when the `chrome-devtools`
  MCP server is connected — use the `browser-verify` skill; otherwise record as
  pending operator review. Final sign-off + merge stay with the operator.
- Do not merge. Push to the feature branch and stop.

## Data sync (production snapshot)

<Required / Not required / Decide at implement time> — data-sensitive verification may
need a fresh production snapshot; the `implement-spec` skill re-surfaces this decision
before browser/e2e verification.

## Infrastructure required for tests

<Services from the spec's Test Plan "Containers required" line>

```bash
docker compose up -d <services> && docker compose ps
```

$ARGUMENTS

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.