agentleFS
gonimargonimar/claude-web-studio/skills/product-spec/SKILL.md

product-spec

Skill4 starsChanged 46 days agoMITView on GitHub

Authors the product specification (goals, users, scope, NFRs, risks, MVP acceptance) section by section with the user. Produces docs/specs/product-spec.md. Required before feature specs.

12 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

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

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Stack: When the stack is not configured, suggest /setup-stack before or after this skill (not blocking).

    line 18
  2. Very specific:

    No clear product: When there is no concept brief and the user cannot say what the product is and for whom, stop before any section: suggest …

    line 19
  3. Very specific:

    After the "write" answer: touch .claude/.write-consent (rule 7 — the consent-guard hook checks the marker), then write.

    line 45
  4. Distinctive:

    When HEAD is a story branch, name it and offer: switch to the default branch and commit there (Recommended — a pipeline-wide document) · …

    line 51

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

Product Spec

Reply in the project conversation language (CLAUDE.md → Language); code, identifiers, paths and commit messages stay in English.

Template: .claude/docs/templates/product-spec.md (sections 1–10). Section by section: questions → section draft → edits → next. The file is written once at the end (or per section, the user's choice), always after "May I write?". In the commands below, <hooks> is .claude/hooks/ in copy mode and ${CLAUDE_PLUGIN_ROOT}/hooks/ in plugin mode.

Phase 1: Context

  1. Read docs/specs/concept-brief.md (if any), technical-preferences.md, production/roadmap.md and production/stage.txt.
  2. Stack. When the stack is not configured, suggest /setup-stack before or after this skill (not blocking).
  3. No clear product. When there is no concept brief and the user cannot say what the product is and for whom, stop before any section: suggest /brainstorm and write nothing.
  4. Pick the mode.
    • Retrofit mode — stage build or later, with code and a deployment that already exist. The spec documents what runs, not what is planned. Sources are CLAUDE.md, the roadmap, the deployed configuration and the code. Phase 2 becomes one pass: draft all sections from those sources, show the draft as a whole, and ask questions only where the facts are silent (goals, audience, out-of-scope). The Phase 3 review verifies claims against the repository: a claimed fact the repository contradicts is BLOCKING.
    • New spec — every other case: Phase 2 as written.

Phase 2: Sections 1–10

For each section, in template order:

  1. Ask 1–3 AskUserQuestions.
  2. Draft the section and ask "like this?"; apply the edits.
  3. Section-specific rules:
    • §4 Scope: insist on In / Later / Out. Every Out item has a reason; a feature the user places out of scope is recorded under Out with that reason, never dropped.
    • §6 Non-functional requirements: propose the studio defaults (CWV, WCAG 2.2 AA, OWASP baseline); the user confirms. §6 always answers localisation, SEO and product analytics explicitly — n/a — reason is an answer, silence is not. Analytics events map to the §2 metrics when there are any.

Phase 3: Review

  1. Mode: --review, else production/review-mode.txt, else lean.
    • full: technical-director (feasibility, stack risks) and security-lead (data, jurisdiction) in parallel via Task, each with a verdict PASS/CONCERNS/FAIL and reasons.
    • lean: technical-director only if there are non-trivial NFRs or integrations.
    • solo: no review.
  2. CONCERNS/FAIL: show the findings and propose edits. Never advance the stage automatically.
  3. Re-review the edits. The edits go back to the same verifier (same contract, a short answer to one question: "do the findings still stand?"). The document's verdict is the verdict of the last review, not the first one with a list of fixes claimed against it: a spec rewritten "according to all eight comments" has been checked by nobody. When the user chooses to skip the second review, say so plainly and record the verdict as FAIL (edits unverified).
  4. The skill verdict follows the last review's. PASS → APPROVED. CONCERNS → APPROVED with the concerns listed in the verdict line, or NEEDS REVISION when a concern is on §1–3 (goals, users, scope — a concern there changes what every later section is about). FAIL, including FAIL (edits unverified), → NEEDS REVISION, the qualifier carried over. No review ran (solo, or lean with nothing to review) → APPROVED, and the verdict line says "no review".
  5. Open items reach production/findings.md. For every BLOCKING and HIGH item of the verdict, one AskUserQuestion: record it in production/findings.md (template findings.md; id ARCH-NNN, severity, area/feature, the decision needed) (Recommended) · story stubs — through /feature-spec F-NNN for the first feature the item touches (a hand-off: this skill does not run it; the stories come from /create-stories once that spec has acceptance criteria, and /create-stories blocks without a feature spec with criteria — the closing question names /feature-spec F-NNN when this option was chosen) · keep it in the spec only. Write the row only after the "record" answer; that answer is the write consent, so touch .claude/.write-consent first (rule 7). Record the gate before asking — <hooks>session-state.sh set Gate "/product-spec Phase 3: record ARCH-NNN?" — and clear it after the answer (<hooks>session-state.sh set Gate "—"). A BLOCKING that is neither recorded nor turned into a story is named as such in the verdict line: /create-stories, /sprint-plan and /help read production/findings.md, and nobody reads §8 of the spec for open decisions.

Phase 4: Write

  1. Render the draft (or the diff) in the chat.
  2. "May I write docs/specs/product-spec.md?" — one AskUserQuestion: write (Recommended) · show the draft/diff first · not now.
  3. After the "write" answer: touch .claude/.write-consent (rule 7 — the consent-guard hook checks the marker), then write.
  4. Stage. Propose production/stage.txt = specification only when the current stage is earlier than specification in the catalog. On a project already in build/operate the stage is never proposed backwards.

Phase 5: Commit (documents lane)

Right after the write, one commit gate (rule 7 (4), .claude/docs/git-workflow.md § Documents): one AskUserQuestion offering docs: product spec, staging exactly the written files — docs/specs/product-spec.md, the production/findings.md rows recorded in Phase 3 and production/stage.txt when it changed; a spec written per section gets one gate, after the last section. Record the gate before asking — <hooks>session-state.sh set Gate "/product-spec Phase 5: commit?" — and clear it after the answer (<hooks>session-state.sh set Gate "—").

  • On the default branch when no story work is in progress.
  • When HEAD is a story branch, name it and offer: switch to the default branch and commit there (Recommended — a pipeline-wide document) · commit here (the document belongs to this story) · leave uncommitted.
  • Code, configs, workflows and scripts never ride the docs: commit.

Nothing is committed without the answer.

Verdict: APPROVED | NEEDS REVISION. Next step — one AskUserQuestion: /feature-spec for the Must features (Recommended) · /game-concept (game) · revise the spec. When Phase 3 step 5 chose story stubs for an item, the first option reads /feature-spec F-NNN for that feature (Recommended) and says that /create-stories follows once the spec has acceptance criteria — it blocks without them.

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.