From dev-team
Produces specification artifacts (intent, architecture notes, acceptance criteria) collaboratively with a human to resolve ambiguity before implementation begins. Use when starting a new feature or behavior change.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-team:specsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Role: orchestrator. This command produces specification artifacts and gates
Role: orchestrator. This command produces specification artifacts and gates
progression to /plan — it does not write implementation code, author
per-slice Gherkin scenarios, or begin building.
This skill's value is resolving ambiguity with a human before build begins
(Rec 1, docs/experiments/RECOMMENDATIONS.md). No downstream workflow recovers
information the spec never stated — under vague specs every workflow arm scored
0% on acceptance tests probing an omitted decision. The Ambiguity Resolution
Protocol below is the mechanism: it forces every gap to be either resolved by a
human or documented as inferable before implementation starts.
What this skill is not for: edge-case synthesis. Run to completion, the
full /specs→/plan→/build pipeline's explicit acceptance-criteria
synthesis does not out-perform TDD's failing-test discipline at surfacing
unstated edge cases (25% vs. 33% pooled EDGE pass — Experiment 03, reported in
docs/experiments/02-final-results.md). The two have different failure modes
and both are worth keeping: /specs catches ambiguity a human must resolve;
the build cadence's per-behavior tests catch edge cases the spec implies but
never enumerates.
Before drafting or updating a spec, check whether a spec file already exists for this feature:
<!-- spec-version: --> comment or a **Format:** header field.
version:): surface this to the user — "An existing spec was found but appears to use an older format. Regenerate from scratch, or confirm you want to update in place?" — and wait for explicit direction before proceeding.This prevents silently overwriting a current spec and catches format drift before
the plan phase consumes stale artifacts.
Produce three specification artifacts collaboratively with the human before any implementation begins. The spec describes the change and its goals; it does not define Gherkin scenarios — those are authored per slice during /plan. The consistency gate is a hard stop; do not proceed to planning until it passes.
/plan — do not slice here. Split into separate specs only when the request bundles genuinely unrelated features (see Scope Split Protocol)./plan turns those into per-slice Gherkin scenarios — the single source of truth for expected behavior. No implementation without a scenario; no scenario without an acceptance test.| Artifact | Purpose | Format |
|---|---|---|
| Intent Description | What the change achieves and why | Plain language, 1–3 paragraphs |
| Architecture Specification | Where the change fits and what constraints apply | Structured notes: components, interfaces, dependencies, constraints |
| Acceptance Criteria | Observable outcomes and quality thresholds that define "done" | Measurable criteria with pass/fail conditions |
Observable user behavior is captured as Gherkin in /plan, one scenario set per slice. The spec's job is to make that authoring unambiguous, not to pre-write it.
Every artifact follows the same loop:
Repeat up to 2 iterations before escalating.
| Category | Description |
|---|---|
| Gaps | Missing acceptance criteria, unstated assumptions, undefined behavior |
| Ambiguities | Statements two implementers would interpret differently |
| Conflicts | Contradictions between artifacts or with existing system behavior |
| Scope violations | Spec bundles unrelated features that belong in separate specs |
After critiquing the artifacts but before writing the final acceptance criteria, run this protocol on every gap and ambiguity finding. This is a hard step — it cannot be skipped.
For each gap or ambiguity:
Step A — Attempt inference. Look for a reliable basis: existing codebase behavior, domain conventions, similar precedents in the system, or unambiguous implication from stated requirements.
Step B — Classify the finding.
| Class | Meaning | Action |
|---|---|---|
inferable | A reasonable developer, given the codebase and domain, would make the same choice | Document the inference and its rationale; proceed |
requires-stakeholder-input | The decision depends on product or business intent not evident from context; two reasonable developers would choose differently | Block — ask the human before proceeding |
Step C — Resolve requires-stakeholder-input items. Collect all such items and present them as a single batch to the human before writing acceptance criteria:
"Before writing acceptance criteria, I need clarification on N decisions the spec leaves open: [list]"
Wait for answers. Only then finalize the criteria.
What "inferable" is NOT: a convenient default. Naturalness or simplicity does not make a decision inferable — the test is whether a developer working from context alone would reliably land on the same answer. If in doubt, classify as requires-stakeholder-input.
Record every classification in an ## Ambiguity Log section of the spec file (see Output below). This log is the audit trail that turns "we asked before building" from an assertion into an artifact.
This protocol exists because the most common failure mode of spec synthesis from a vague prompt is writing decisions that look thorough while encoding the same happy-path assumptions a direct implementation would make silently. The log prevents that by making every assumption visible and every gap either resolved by the human or documented as inferable with explicit rationale.
When a critique surfaces a missing-test or coverage gap, classify it so the spec only carries work that delivers signal:
NO_REFACTOR — a meaningful test can be written against the code as it stands. Carry it into the acceptance criteria.REFACTOR_REQUIRED — production code needs a testability change before a meaningful test is possible. Note the change.LOW_VALUE — skip, not defer. A LOW_VALUE finding is never written into the acceptance criteria and is never parked as deferred backlog; deferring it only re-surfaces the same no-signal work later. All three criteria must hold: no branching logic, no observable outcome (the only possible assertion is that a mock was called), and a higher-layer test already covers the path.LOW_VALUE is the one class dropped rather than tracked — the Ambiguity Log records the skip and its rationale, nothing more. It never becomes an acceptance criterion and never reaches /plan as work.
A specification bundles too much when any of these fire:
Note: a single feature that decomposes into several deliverable increments is normal and expected — that decomposition happens in /plan, not here. Only split the spec when the features are independent.
Validate all three artifacts as a set:
inferable (with explicit rationale) or resolved via explicit stakeholder input. No finding is left as an undocumented assumption.Hard stop: do not proceed to planning until every item passes. The ambiguity log item is the most critical: a passing gate with undocumented assumptions produces false confidence.
Three artifacts (Intent, Architecture Specification, Acceptance Criteria) plus a consistency gate pass/fail verdict. Be concise — flag gaps and conflicts; do not narrate the collaboration process.
After the gate passes, persist all three artifacts plus the verdict so downstream commands (/plan, /build, spec-compliance-review) can find the spec — chat-only specs are lost between sessions. Where they're persisted depends on the project's origin and whether it has opted into the issue-first specs convention.
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/git_origin_host.py to classify the origin remote: github / other / none.github, additionally run python3 ${CLAUDE_PLUGIN_ROOT}/scripts/specs_convention_marker.py to classify the project's root CLAUDE.md: marker (contains the issue-first-specs opt-in phrase, e.g. "Specs and plans are GitHub issues here, not files") / no-marker (file exists, phrase absent) / none (no root CLAUDE.md found). If it reports no-marker or none, you MAY still read the root CLAUDE.md yourself and apply judgment for an equivalently-worded-but-differently-phrased declaration of the same convention before concluding "no marker" — but this manual-judgment fallback is deliberately unverified by any automated test, unlike the script's literal-match path (see the script's own module docstring).github origin and a marker found (by the script or by manual judgment) → Persist to GitHub issue (below). No downstream consumer of the shipped plugin is silently switched to this path — it requires both an actual GitHub origin and an explicit, repo-declared opt-in.github origin, none origin, or a github origin with no marker found by either path — → Persist to file (below). This is today's behavior, unchanged.user-login-with-mfa)docs/specs/ if missing.docs/specs/<slug>.md already exists. If yes, ask: overwrite or create a versioned file (<slug>-v2.md)?# Spec: <Feature Name>
## Intent Description
<intent artifact>
## Architecture Specification
<architecture artifact>
## Acceptance Criteria
<acceptance criteria artifact>
## Ambiguity Log
All gap and ambiguity findings from the Ambiguity Resolution Protocol, with their classifications and rationale.
| Decision | Classification | Resolved By | Rationale / Answer |
|----------|---------------|-------------|-------------------|
| <decision text> | `inferable` / `requires-stakeholder-input` | inference / human | <rationale or human's answer> |
## Consistency Gate
- [x/ ] Intent is unambiguous
- [x/ ] Every behavior/goal maps to an acceptance criterion
- [x/ ] Architecture constrains without over-engineering
- [x/ ] Terminology consistent across artifacts
- [x/ ] No contradictions between artifacts
- [x/ ] Every gap/ambiguity finding is logged — inferable with rationale or resolved by human
gh issue list --search "Spec: <Feature Name> in:title" --state open. If this call itself exits non-zero, treat it as a hard failure — never as "zero matches" (that would risk silently creating a duplicate issue) — report the failure and its cause to chat, and fall back to Persist to file above with the already-composed content so the approved spec is never lost.Spec: <Feature Name>.gh issue create --title "Spec: <Feature Name>" --body "<composed body>") or update (gh issue edit <N> --body "<composed body>") per step 3's decision.docs/specs/<slug>.md on this path.After persisting, automatically invoke /plan with the feature description. The plan command discovers the spec artifacts, decomposes the feature into vertical slices, and authors the Gherkin scenarios for each slice. Do not ask first — the approved spec is the trigger.
Key this off which persistence action actually succeeded, not the "Classify where to persist" decision — the GitHub-issue path can itself fall back to file (search failure at step 2, or create/update failure at step 6):
/plan "<feature description>" — /plan discovers docs/specs/** on its own./plan "<feature description>" --spec-issue <issue-url>, passing that issue's URL. Without this, /plan's own Step 1 (which only searches docs/specs/**) would immediately hit its "no specification artifacts found" prompt in the very same run — reintroducing the human interruption this auto-trigger's "do not ask first" contract exists to avoid.npx claudepluginhub bdfinst/agentic-dev-team --plugin dev-teamGenerates structured specifications with demoable units, functional requirements, and proof artifacts for new features. Use when starting a feature to define what to build before coding.
Converts vague feature ideas into written, agreed specifications through structured questioning across nine dimensions. Produces docs/specs/*.md with acceptance criteria for planning, scaffolding, and TDD tools.