/stv:specfrom stv
Guides a structured interview to define feature requirements and architecture, producing a spec.md. Mandatory exploration phase maps unknowns before asking questions.
Ships in stv. 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.
None: SKILL.md is the whole skill.
STV Phase 1: Feature interview →
docs/{feature}/spec.mdPRD (what to build) + Architecture (how to build) confirmed in a single pass.
Read ${CLAUDE_PLUGIN_ROOT}/prompts/decision-gate.md and apply it to every decision in this workflow.
Apply this gate to every decision. switching cost < small → autonomous judgment, == small → autonomous decision + report, >= medium → ask the user.
Before diving into the spec interview, establish the WHY in 60 seconds. This prevents direction drift on complex features.
Output a brief Proposal block (inline, not a separate file):
### Proposal
- **Why**: {1-2 sentences — the problem or opportunity that motivates this change}
- **What Changes**: {bullet list of what will be different}
- **Capabilities**: {new or modified capabilities this enables}
- **Impact**: {affected code areas, APIs, dependencies. BREAKING changes flagged}
Rules:
stv:explore firstBefore any interview question is asked, explore. An interview run on an unexplored territory asks the user things the code already answers and misses the questions that matter. Exploration is not preparation for the spec — it is the first act of the spec.
stv:explore (read-only investigation) scoped to the feature. If the harness also provides a quadrant-walk unknowns skill (e.g. an explore-unknowns skill), use it to structure the output; otherwise structure it yourself as the unknowns map below.Sizing: the map always carries all four quadrants. Trivial features (single file, clear pattern) may compress each quadrant to a line — including explicit none or closed by {file} entries — while anything larger gets the full walk. Depth shrinks; quadrants never disappear. Skipping the map entirely is not an option.
Interpret argument:
Explore codebase (Agent:Explore) — extend the Step 0.5 unknowns map, don't restart it:
When an existing spec is detected, decide whether to UPDATE or create NEW:
Is the intent the same problem/goal?
├── YES → Is the scope still manageable?
│ ├── YES → UPDATE existing spec
│ └── NO (scope explosion) → NEW spec (link to original)
└── NO (intent changed) → NEW spec
└── Can original spec be independently "completed"?
├── YES → Complete original, then NEW
└── NO → Deprecate original, start NEW
UPDATE mode: Modify existing spec.md in-place. Record changes in a ## Delta Log section.
NEW mode: Create a new docs/{feature-v2}/spec.md. Reference the original.
Interview via AskUserQuestion. Apply Decision Gate:
Bundle 2-4 related questions into a single AskUserQuestion:
Must cover:
Decision Gate applied:
Must cover:
Decision Gate applied:
DO:
### Auto-Decisions sectionDON'T:
After interview is complete (user confirmed or all dimensions covered):
docs/{feature-name}/spec.md# {Feature Name} — Spec
> STV Spec | Created: {date}
## 1. Overview
### Proposal
- **Why**: {1-2 sentences — the problem or opportunity}
- **What Changes**: {bullet list}
- **Capabilities**: {new/modified capabilities}
- **Impact**: {affected areas, BREAKING if applicable}
{1-2 paragraphs expanding on the above}
## 2. User Stories
- As a {actor}, I want {action}, so that {outcome}
- ...
## 3. Acceptance Criteria
- [ ] {criterion 1}
- [ ] {criterion 2}
- ...
## 4. Scope
### In-Scope
- ...
### Out-of-Scope
- ...
## 5. Architecture
### 5.1 Layer Structure
{Client/UI surface (if any) → Controller → Handler → Service → DB flow overview — name the full round trip, including how the response returns to the client}
### 5.2 Client Surface
{If the feature has a UI/client: entry screens/components, the user actions that fire each API call, and what renders from each response. If the client lives in a separate repo, note it as a CDC boundary. Write `N/A (no client surface)` for pure-backend features.}
### 5.3 API Endpoints
| Method | Path | Handler | Request schema | Response schema | Description |
|--------|------|---------|----------------|-----------------|-------------|
| POST | /api/... | ...Create | {CreateReq} | {CreateResp} | ... |
| GET | /api/... | ...List | N/A | {ListResp} | ... |
| ... | ... | ... | ... | ... | ... |
Request/response schema per endpoint is REQUIRED here (or explicit `N/A` for endpoints with no body) — the trace's Section 2/6 derive from it.
### 5.4 DB Schema
{table/column/FK/index level — the depth the Phase 1 checklist demands; write explicit `N/A (no persistence)` if the feature has none}
### 5.5 Integration Points
{Connection points with existing systems}
## 6. Non-Functional Requirements
- Performance: ...
- Security: ...
- Scalability: ...
## 7. Auto-Decisions
{Content autonomously decided via Decision Gate. Includes tier and rationale}
| Decision | Tier | Rationale |
|----------|------|-----------|
| ... | tiny | ... |
| ... | small | ... |
## 8. Open Questions
{Remaining unresolved items. "None" if empty}
## 9. Delta Log
{Change history when spec is updated. Empty on initial creation.}
## 10. Next Step
→ Proceed with Vertical Trace via `stv:trace`
STV phases (spec → trace → work) are NOT a one-way waterfall. Going back is normal and expected.
When to return to spec from later phases:
stv:trace: discovered a missing scenario or ambiguous requirement → update specstv:work: implementation reveals a spec assumption was wrong → update specstv:verify: gap detected that traces back to a spec error → update specHow to return:
stv:spec with the existing spec pathThis is not failure. This is the Feedback Loop invariant in action.
docs/{feature-name}/spec.mdSkill(skill="stv:trace") or guide user to use stv:trace docs/{feature-name}/spec.mdWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub 2lab-ai/oh-my-claude --plugin stv15 skills in this plugin
/clarifyUse when the user's request is ambiguous — vague asks, polysemous instructions, unclear scope — BEFORE committing to a feature. Two-track loop (one question at a time + parallel codebase exploration) producing a Context Brief that becomes the SSOT for the follow-up work./debugUse when code behaves differently from expectations — 'why does this happen', 'find the bug', 'follow the callstack', symptom reports even without the word debugging. Blackbox methodology: AS-IS/TO-BE confirmation, callstack tracing recorded in a CWD-relative trace file, red-green fix./do-workUse when a trace.md with unfinished scenarios exists and the user wants autonomous implementation — 'continue the work', 'implement the traced feature', or after a bundle was selected. Accepts an explicit bundle contract (trace_path + scenario_ids); scans for ready scenarios only when no contract is given.Other plugins' skills for the same job