/clubmed-product:specfrom Club Med — Product
Turn a PRD into developer-ready specs (enriched user stories). Reads the PRD sources (docs/prd/) and cross-references DRD design files (docs/drd/) — or any analysis document, generating a requirement id scheme when the source has none — to produce structured markdown specs in docs/specs/<prd-slug>/ with an index.md manifest, each spec sized for an AI developer to implement in under 2 hours. Every spec carries a §8 Data Contract — API endpoints resolved live through the clubmed_api MCP (which must be connected) plus the Directus CMS translation keys the feature needs — and a §9 of standard Gherkin acceptance tests traceable to FUNC/BR/ERR. Each generated spec is validated by a deterministic script. Use this skill when the user says "/spec", "generate specs", "create specs from PRD", "spec from PRD", "découper en specs", "générer des specs", or names a PRD to turn into developer specs (e.g. "PRD01", "le PRD des activités").
Ships in Club Med — Product. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
You transform a PRD into one or more detailed, developer-ready specs. The specs are "super user stories" — rich enough for an AI developer to work completely autonomously, and structured so a human can review them fast.
Each spec includes a live-resolved §8 Data Contract: rather than inferring API endpoints, you resolve them against the real product API through the clubmed_api MCP and document them with evidence, a confidence level per entry, ranked "Points to clarify", and a Developer Handoff for anything you cannot confirm.
Two things the MCP serves — and what belongs in a spec:
Directus is the editorial CMS. It is not served by the MCP and appears in exactly one place in a spec: the §8 CMS Keys table, listing the translation keys the feature needs (label text grounded in the DRD Content Contract, key name proposed).
Golden rules:
{DOCS_ROOT} first (Step 1.0) — the docs tree may live in a sibling repo, not under the cwd. Every path in the pipeline hangs off {DOCS_ROOT}, never a bare relative path.{DOCS_ROOT}/prd/ and {DOCS_ROOT}/drd/ are read-only. {DOCS_ROOT}/specs/ is output-only: everything you create goes to {DOCS_ROOT}/specs/<prd-slug>/ (the specs + the index.md manifest), one folder per PRD.🟢 high / 🟡 medium / 🔴 low) plus an evidence string — never a fabricated percentage.YOUR_API_KEY / process.env.*); example values are synthetic — never copy a real value from a live MCP response that could be customer data (booking ids, emails, names, account-bound prices).You answer in the user's language, and you write the spec in the user's language. The user writes to you in French → the specs are French. In English → the specs are English. This is decided once, at the start, and holds for every step, every section and every generated file. (The PRD's own language is only a hint when the user's is ambiguous — it never overrides it.)
Everything a human reads is translated, with no exception carved out for "technical-sounding" terms: section titles ("UI Contract" → "Contrat UI", "Data Contract" → "Contrat de données", "User Story" → "Récit utilisateur", "Feature Flag" → "Indicateur de fonctionnalité"), sub-section labels, table headers, prose, and the acceptance-test wording. The English forms used throughout these instructions are the canonical reference, not the output.
Machine tokens are never translated — tools read them, people don't:
| Never translate | Why |
|---|---|
Anchors <!-- dc:clarify -->, <!-- dc:index -->, <!-- dc:handoff -->, <!-- at:tests --> | the validator finds §8/§9 sub-sections by these — that is exactly what lets the visible labels be translated |
Gherkin tags @nominal-passing, @edge, @FUNC-001, @BR-007, @ERR-002 | parsed by the validator and downstream tooling |
Frontmatter keys and enum values (confidence: high, data_contract_sources: [api, directus]) | schema, not prose |
| Identifiers: endpoint paths, response field paths, operation ids, CMS key names, code | they are the contract itself |
Gherkin keywords are prose-side: they follow the spec's language through Gherkin's own
localization (# language: fr + Fonctionnalité/Scénario/Étant donné/Quand/Alors/Et), see
references/acceptance-tests-template.md.
The skill runs as an ordered pipeline. Each step has a dedicated file under steps/ with the full instructions. Read the step file before running that step — do not skip it, and do not run a later step before an earlier one.
| Step | Purpose | Full instructions |
|---|---|---|
| 0 | Hard gate — the clubmed_api MCP must respond to a liveness probe, else stop and print the connect message | steps/step-0-mcp-gate.md |
| 1 | Resolve {DOCS_ROOT}; identify the PRD and its slug; ask the author's name once — 🙋 asks the user if either is ambiguous | steps/step-1-identify-prd.md |
| 2 | Read & understand the PRD deeply; Explore subagent digests the supporting material | steps/step-2-read-prd.md |
| 3 | Find & read the relevant DRDs (Figma, screenshots, Content Contract, Data Sources) — parallel subagents when several | steps/step-3-drds.md |
| 4 | Propose the spec breakdown with a mechanical id-coverage gate, raise blocking questions one at a time — 🙋 waits for user confirmation | steps/step-4-breakdown.md |
| 5 | Compose the spec body §1–§7 and a §9 draft — parked in the scratchpad, not written to docs yet | steps/step-5-compose-body.md |
| 6 | Resolve §8 live via the MCP (once, by data family), finalize §9 with the harvested API error cases, then write each file (§1–§9, single Write) + the index.md manifest — 🙋 asks before touching an existing folder | steps/step-6-data-contract.md |
| 7 | Validate (deterministic script) + independent reviewer subagent; confirm the feature flag — 🙋 asks the user | steps/step-7-validate.md |
🙋 marks a step that talks to the user. Step 4 is the true gate — nothing is composed until the breakdown is confirmed.
Shared references (read when a step points to them):
references/data-contract-template.md — the §8 structure (labels render in the spec's language).references/acceptance-tests-template.md — the §9 standard-Gherkin structure, scenario types, and trace tags.references/confidence-rubric.md — the three confidence buckets and the evidence each requires.scripts/validate_specs.py — the deterministic output validator run in Step 7.Subagents (via Task). Four phases delegate to subagents; the main agent stays the single writer of the specs.
{DOCS_ROOT}/specs/ for loosely-referenced supporting material and returns a structured, cited digest (read-only; no invariant at risk).search_openapi / scenario calls out of the main context and returns only distilled endpoint blocks. This is why MCP resolution never overflows the main agent.User interactions and the file Write (Step 6.8) always stay on the main agent — never delegate a question or the resolve-once §8 assembly to a subagent.
The spec carries two confidences, surfaced together in §2 under their canonical labels:
source confidence (PRD/DRD) (confidence) rates the quality of the input material, and
data-contract confidence (data_contract_confidence) rates the §8 resolution. They move
independently — so a §8 doubt echoed into §2 counts for data_contract_confidence only and must
not drag confidence down. Their rules live in steps/step-5-compose-body.md (sources) and
references/confidence-rubric.md (§8).
Only the cases no step file owns. Everything about DRDs is in Step 3, the breakdown in Step 4, §8 in Step 6.
MCP not connected: stop at Step 0 with the actionable message. Never generate a spec with a guessed §8.
One DRD covers multiple specs: extract only the relevant parts of the DRD for each spec. Don't dump the entire DRD into each spec.
Ambiguous scope between two PRDs: surface it in §2 Attention points as an ❓ Open question in each affected spec, naming the other PRD.
PRD already contains a feature flag name: use it directly, no need to propose one or ask.
A need spans both families: a slot card needs a price (API) and a label (editorial) — resolve each part in its own source and list both.
An endpoint inferred from the PRD/DRD: treat it as a hypothesis to confirm or replace against the API — never ship it unverified.
references/acceptance-tests-template.md (opens in a new tab)references/confidence-rubric.md (opens in a new tab)references/data-contract-template.md (opens in a new tab)scripts/validate_specs.py (opens in a new tab)steps/step-0-mcp-gate.md (opens in a new tab)steps/step-1-identify-prd.md (opens in a new tab)steps/step-2-read-prd.md (opens in a new tab)steps/step-3-drds.md (opens in a new tab)steps/step-4-breakdown.md (opens in a new tab)steps/step-5-compose-body.md (opens in a new tab)steps/step-6-data-contract.md (opens in a new tab)steps/step-7-validate.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub clubmediterranee/ai-core --plugin clubmed-productOther plugins' skills for the same job