/jgs-goal-spec:goal-specfrom jgs-goal-spec
Turn a goal (or a goal + draft spec) into a complete, detailed engineering specification by defining all eight spec sections and asking gap-filling clarifying questions grounded in the user's stated goal. Use when you say "spec this goal", "write a spec for X", "define the specification", "flesh out the spec", or have a goal that needs to become an implementable design. Pairs with goal-formatter (upstream) and spec-review (downstream). Model-agnostic.
Ships in jgs-goal-spec. 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.
Convert a goal into a complete engineering specification. The goal-formatter answers "what does done look like?"; this skill answers "what exactly are we building, and how?" — by defining every section of the spec and asking the user gap-filling questions wherever the goal leaves a section under-determined.
This is the middle skill in a three-skill chain:
goal-formatter → goal-spec → spec-review
(goal + draft (THIS: full (autonomous
spec, optional) defined spec multi-discipline
via Q&A) hardening loop)
Each skill is independently invocable. The handoff works because all three use the same 8-section engineering spec template (defined below — this skill owns it).
Trigger phrases:
Best for:
spec-reviewThis is the shared contract across goal-formatter (draft-spec mode), goal-spec, and spec-review. All three MUST use these exact section names so handoffs line up with no orphaned or renamed sections.
# Specification: <title>
## 1. Problem & Context
What problem this solves, why now, and the background a reader needs. Tie back to the
originating goal: one line stating the goal this spec satisfies.
## 2. Scope
- **In scope:** explicit list of what this spec covers.
- **Out of scope:** explicit list of what it deliberately excludes (prevents scope creep).
## 3. Requirements
- **Functional (FR1, FR2, …):** what the system MUST do, numbered for traceability.
- **Non-functional (NFR1, NFR2, …):** performance, security, reliability, usability,
maintainability targets — each measurable where possible.
## 4. Constraints
Hard limits the design must respect: tech stack, platforms, compatibility, regulatory,
budget, timeline, "must not change" baselines. Distinct from requirements — these bound
the solution space rather than describe behaviour.
## 5. Design Approach
The proposed solution shape: components, data flow, key interfaces, major decisions and
their rationale. Note alternatives considered and why rejected, where it matters.
## 6. Success Criteria
Observable, binary done/not-done conditions. Each criterion maps to a requirement and to a
verification step. (Inherits the goal's success criteria; refines them to spec granularity.)
## 7. Risks & Mitigations
What could go wrong (technical, integration, dependency, adoption) and the planned
mitigation or contingency for each.
## 8. Open Questions
Anything still undecided. Every item here is either (a) resolved via a clarifying question
to the user, or (b) explicitly flagged as deferred with an owner/trigger for resolution.
A copy-pasteable version of this template lives at
references/spec-template.md in this skill's directory.
Fill every section from the goal + repo context. Where the goal supplies an answer, use it.
Where it doesn't, mark the section with an explicit [GAP: …] placeholder describing what's
missing — do NOT silently invent. Collect every [GAP: …] into the Open Questions section.
For each [GAP], decide: can I resolve it from the goal/repo, or must I ask the user?
Ask the user via AskUserQuestion when the gap is a genuine decision only they can make
(scope boundary, priority, target numbers, tech choice, acceptable trade-off). Rules:
AskUserQuestion call.Resolve yourself (no question) when the goal or repo already implies the answer, or a conventional default clearly applies — record it as a stated assumption in the relevant section.
Run the Spec Self-Review Rubric (below) against the draft. Fix any FAIL (max 2 rounds), then present. This mirrors goal-formatter's step-3 gate — a spec that ships with hidden gaps fails downstream in spec-review or in implementation.
After presenting the spec, tell the user they can run spec-review to harden it through an
autonomous multi-discipline review loop. Don't auto-invoke it — let the user choose.
The spec is written so any model or agent can implement from it without your context:
Run against every drafted spec in step 5 before presenting. Each row PASS/FAIL. Any FAIL → revise (max 2 rounds), then present with explicit flags for anything still failing.
| # | Check | PASS looks like | FAIL looks like |
|---|---|---|---|
| 1 | All 8 sections present | Every template section has real content | A section missing or left as a heading |
| 2 | Requirements numbered & testable | Each FR/NFR is atomic, numbered, and verifiable | Vague blobs, unnumbered, untestable |
| 3 | Scope both ways | In-scope AND out-of-scope explicitly listed | Only in-scope, or open-ended |
| 4 | Constraints distinct from requirements | Constraints bound the solution; requirements describe behaviour | The two conflated or constraints absent |
| 5 | Design maps to requirements | Every FR is satisfied by something in Design Approach | Requirements with no design, or design for nothing |
| 6 | Success criteria measurable & mapped | Each criterion is binary, has a NUMERIC threshold (or an objective observation), AND names the verification method + sample size where physical | "Works well", adjectives, or a criterion with no stated test method |
| 7 | Grounded in repo reality | Paths, versions, counts verified, not guessed | Invented specifics |
| 8 | No silent gaps | Every gap is either resolved or listed in Open Questions | A [GAP] left buried in a section |
| 9 | Risks have mitigations | Each named risk has a mitigation/contingency | Risks listed with no response |
| 10 | Self-consistent | Sections 1, 3, 5, 6 describe the same system; a value (number/part/term) appears identically everywhere it is referenced | Sections contradict each other; the same fact stated two different ways |
| 11 | Every NFR/safety target is testable | Each performance, safety, or regulatory target is a number/range a test can pass/fail | A safety or perf target stated as an adjective, or with no acceptance test |
| 12 | No unstated assumptions | Any value the skill filled by default (not user-given) is explicitly labelled as an assumption | A specific value asserted as fact when it was actually a guess |
Revision discipline: fix the specific failing row; re-score only after editing. If two rounds can't clear a row, present the spec with that row flagged as a residual risk.
You say:
"Spec this goal" — and paste a goal-formatter goal about adding a rate limiter to the public API.
The skill:
[GAP].AskUserQuestion, grounded in the goal: "To satisfy your goal of protecting the
public API without harming legit users, which limiting strategy?" → token-bucket (Recommended)
/ fixed-window / sliding-log, with trade-offs.spec-review to harden this autonomously?"spec-review to drive it through autonomous multi-discipline hardening to convergence.goal-formatter: produces the goal (and optionally a draft spec) this skill
completes. If the user only has a rough idea, point them there first.spec-review: takes the spec this skill produces and hardens it through an
autonomous roundtable of engineering-discipline reviewers until it converges (no
CRITICAL/MAJOR findings). Self-contained — no dependency on any other skill.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jgsystemsconsulting/jgs-goal-spec --plugin jgs-goal-spec3 skills in this plugin
/goal-formatterConvert verbal task descriptions into structured, testable goals. Use when you say "write me a goal", "create a goal for X", or want to frame work as a measurable objective. Analyzes repo state (git history, technical debt, memory, code) to synthesize clear goals with success criteria, verification methods, and test coverage outlines, then SELF-REVIEWS the draft against a quality rubric and revises before presenting. Optionally also emits a draft engineering specification alongside the goal (spec mode) for handoff to the goal-spec and spec-review skills. Model-agnostic: works with any LLM or agent framework./spec-reviewAutonomously harden an engineering specification through a roundtable of independent engineering-discipline reviewers (architecture, security, test/QA, operations, product). Each reviewer is a real subagent thinking independently; the orchestrator collects findings, revises the spec itself, and loops until convergence (no CRITICAL or MAJOR findings) with NO user checkpoints. Use when you say "review this spec", "harden this spec", "spec review", "run the roundtable on this spec", or want a spec battle-tested before implementation. Self-contained, with no dependency on any other skill.