From smith
Identifies underspecified areas in feature specs by asking up to 5 targeted clarification questions, logging answers, and updating the spec.
npx claudepluginhub attckdigital/smithThis skill uses the workspace's default tool permissions.
Throughout this action, log significant events to the vault session log. Read the session log path from `.smith/vault/.current-session`. If the file is missing or the vault is not initialized, skip all logging silently.
Identifies underspecified areas in feature specs using a taxonomy of functional, data model, UX, non-functional, integrations, edge cases, and constraints. Asks up to 5 targeted questions and encodes answers back into the spec before planning.
Clarifies feature specifications by scanning for ambiguities in functional scope, data models, UX flows, non-functionals, integrations, edge cases; asks up to 5 targeted questions interactively and encodes answers back into the spec. Activates after /specify or on mentions of clarifying norms.
Conducts multi-round interviews to refine rough SPEC.md into complete, implementation-ready specifications with tasks. Use for new features, requirements refinement, or ideas to actionable specs.
Share bugs, ideas, or general feedback.
Throughout this action, log significant events to the vault session log. Read the session log path from .smith/vault/.current-session. If the file is missing or the vault is not initialized, skip all logging silently.
Append entries using this format:
### [HH:MM:SS] /smith-clarify <event>
**User Request:**
> <verbatim user message that triggered this action>
**Synthesized Input:** <brief summary>
**Outcome:** <what happened>
**Artifacts:** <files modified>
**Systems affected:** <system IDs>
Log at these points:
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Goal: Detect and reduce ambiguity or missing decision points in the active feature specification and record the clarifications directly in the spec file.
Note: This clarification workflow is expected to run (and be completed) BEFORE invoking /smith-plan. If the user explicitly states they are skipping clarification (e.g., exploratory spike), you may proceed, but must warn that downstream rework risk increases.
Execution steps:
Run .specify/scripts/bash/check-prerequisites.sh --json --paths-only from repo root once (combined --json --paths-only mode / -Json -PathsOnly). Parse minimal JSON payload fields:
FEATURE_DIRFEATURE_SPECIMPL_PLAN, TASKS for future chained flows.)/smith-specify or verify feature branch environment.Questions file location: Store the questions file inside the feature spec folder at FEATURE_DIR/questions.md (NOT in a separate specs/questions/ directory). The questions are part of the feature's decision record and should travel with the feature spec. If FEATURE_DIR points to a .specify/systems/<system>/features/<feature>/ path, use that directly. If clarify is run multiple times, append new questions to the existing file with a ### Session YYYY-MM-DD timestamp header rather than overwriting.
1.5. Check for existing unanswered questions. After resolving FEATURE_DIR, check if FEATURE_DIR/questions.md exists. If it does, scan for unanswered questions — lines matching **Answer**: ___ or **Answer:** followed by only whitespace/underscore.
If unanswered questions exist: Skip the spec ambiguity scan (steps 2-3) and enter the Interactive Answer Collection flow below. This handles the case where /smith-new generated a questions.md during the planning phase and the user wants to answer them conversationally.
If no questions.md exists, or all questions are already answered: Proceed with the normal spec ambiguity scan (steps 2-4).
When a questions.md file exists with unanswered questions, walk through each one interactively:
A. Parse questions.md — extract all question blocks. Each block has: question number, topic, context, question text, options table, recommended answer, and current answer status.
B. For each unanswered question, present it one at a time:
Display in this format:
## Question [N] of [Total]: [Topic]
**Context:** [Quote from plan/spec that raises this question]
**Question:** [The specific implementation decision]
**Options:**
| Option | Description | Implications |
|--------|-------------|--------------|
| A | [description] | [pros: ..., cons: ...] |
| B | [description] | [pros: ..., cons: ...] |
| C | [description] | [pros: ..., cons: ...] |
**Recommended:** [Option letter] — [Clear reasoning for why this is the best choice]
Reply with an option letter (e.g., "A"), say "yes" to accept the recommendation,
type "skip" to defer this question, or provide your own custom answer.
C. Process the user's response:
"yes", "recommended", or "rec" → use the recommended answer"A", "B", "C") → use that option's description as the answer"skip" → mark as **Answer:** SKIPPED — needs follow-upD. After each answer, immediately:
questions.md — replace the **Answer**: ___ line for that question with **Answer:** [chosen answer]Saved: Q[N] → [brief answer summary]. ([remaining] questions remaining)E. If the session is interrupted before all questions are answered, the questions.md file reflects the current state — answered questions have their answers filled in, unanswered questions still show **Answer**: ___. The user can resume later by running /smith-clarify again (it will pick up where they left off).
F. After all questions are answered (or the user says "done"):
questions.md header — change **Status**: AWAITING ANSWERS to **Status**: ANSWERED (or PARTIALLY ANSWERED if any were skipped)## Answers Summary
| # | Topic | Answer |
|---|-------|--------|
| Q1 | [topic] | [answer] |
| Q2 | [topic] | [answer] |
| Q3 | [topic] | SKIPPED |
...
## Implementation Decisions section in the spec if answers affect implementation approach/smith-plan to generate the implementation plan."Log all answers to the vault session log per the Vault Logging section above.
After completing the Interactive Answer Collection, skip to step 8 (Report completion).
Load the current spec file. Perform a structured ambiguity & coverage scan using this taxonomy. For each category, mark status: Clear / Partial / Missing. Produce an internal coverage map used for prioritization (do not output raw map unless no questions will be asked).
Functional Scope & Behavior:
Domain & Data Model:
Interaction & UX Flow:
Non-Functional Quality Attributes:
Integration & External Dependencies:
Edge Cases & Failure Handling:
Constraints & Tradeoffs:
Terminology & Consistency:
Completion Signals:
Misc / Placeholders:
For each category with Partial or Missing status, add a candidate question opportunity unless:
Generate (internally) a prioritized queue of candidate clarification questions (maximum 5). Do NOT output them all at once. Apply these constraints:
Sequential questioning loop (interactive):
Present EXACTLY ONE question at a time.
For multiple‑choice questions:
**Recommended:** Option [X] - <reasoning>| Option | Description |
|---|---|
| A | |
| B | |
| C | (add D/E as needed up to 5) |
| Short | Provide a different short answer (<=5 words) (Include only if free-form alternative is appropriate) |
You can reply with the option letter (e.g., "A"), accept the recommendation by saying "yes" or "recommended", or provide your own short answer.For short‑answer style (no meaningful discrete options):
**Suggested:** <your proposed answer> - <brief reasoning>Format: Short answer (<=5 words). You can accept the suggestion by saying "yes" or "suggested", or provide your own answer.After the user answers:
Stop asking further questions when:
Never reveal future queued questions in advance.
If no valid questions exist at start, immediately report no critical ambiguities.
Integration after EACH accepted answer (incremental update approach):
## Clarifications section exists (create it just after the highest-level contextual/overview section per the spec template if missing).### Session YYYY-MM-DD subheading for today.- Q: <question> → A: <final answer>.(formerly referred to as "X") once.Validation (performed after EACH write plus final pass):
## Clarifications, ### Session YYYY-MM-DD.Write the updated spec back to FEATURE_SPEC.
Report completion (after questioning loop ends or early termination):
/smith-plan or run /smith-clarify again later post-plan.Behavior rules:
/smith-specify first (do not create a new spec here).Context for prioritization: $ARGUMENTS