autospec-clarify
Skill144 starsChanged 2 months agoMITView on GitHub
Identify underspecified areas in YAML spec and encode clarifications back into the spec.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- autospec-analyzeSkill
- autospec-checklistSkill
- autospec-constitutionSkill
- autospec-implementSkill
- autospec-planSkill
- autospec-specifySkill
- autospec-tasksSkill
- autospec-worktree-setupSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 18 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
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
- Distinctive: line 93
Only include questions whose answers materially impact architecture, data modeling, task decomposition, test design, UX behavior, …
- Distinctive: line 94
Ensure category coverage balance: attempt to cover the highest impact unresolved categories first
- Very specific: line 113
After the table: You can reply with the option letter (e.g., "A"), accept the recommendation by saying "yes" or "recommended", or provide …
- Distinctive: line 118
After the user answers:
- Distinctive: line 119
If the user replies with "yes", "recommended", or "suggested", use your previously stated recommendation/suggestion as the answer
- Distinctive: line 121
If ambiguous, ask for a quick disambiguation
- Distinctive: line 123
All critical ambiguities resolved early, OR
- Distinctive: line 126
Never reveal future queued questions in advance
- Distinctive: line 127
If no valid questions exist at start, immediately report no critical ambiguities
- Distinctive: line 132
Add clarification entry in this format:
- Distinctive: line 149
If the clarification invalidates an earlier ambiguous statement, replace that statement
- Distinctive: line 152
Keep each inserted clarification minimal and testable
- Distinctive: line 154
Validate the artifact: after each write:
- Distinctive: line 158
If validation fails: fix schema errors (missing required fields, invalid types) and retry
- Distinctive: line 159
If validation passes: proceed
- Very specific: line 170
If any Outstanding or Deferred remain, recommend whether to proceed to $autospec-plan or run $autospec-clarify again
- Distinctive: line 176
If no meaningful ambiguities found, respond: "No critical ambiguities detected worth formal clarification." and suggest proceeding
- Very specific: line 177
If spec file missing, instruct user to run $autospec-specify first
- Distinctive: line 178
Never exceed 5 total asked questions (clarification retries for a single question do not count as new questions)
- Distinctive: line 179
Avoid speculative tech stack questions unless the absence blocks functional clarity
- Distinctive: line 181
If quota reached with unresolved high-impact categories remaining, explicitly flag them under Deferred with rationale
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
autospec-clarify
This Agent Skill is generated from autospec.clarify. When the user invokes "$autospec-clarify" or "/autospec.clarify", load and follow these instructions directly. Treat the text after the skill or command name as "$ARGUMENTS". Do not route back through "autospec clarify"; this skill is the prompt for the stage.
Project specs directory: ./specs
User Input
$ARGUMENTSYou MUST consider the user input before proceeding (if not empty).
Outline
Goal: Detect and reduce ambiguity or missing decision points in the active feature specification and record the clarifications directly in the spec.yaml file.
Note: This clarification workflow should run BEFORE $autospec-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.
Pre-computed Context
The following paths have been pre-computed and are available for use:
- FEATURE_DIR:
{{.FeatureDir}} - FEATURE_SPEC:
{{.FeatureSpec}}
Load and analyze the spec file at
{{.FeatureSpec}}. Perform a structured ambiguity & coverage scan using this taxonomy. For each category, mark status: Clear / Partial / Missing.Functional Scope & Behavior:
- Core user goals & success criteria
- Explicit out-of-scope declarations
- User roles / personas differentiation
Domain & Data Model:
- Entities, attributes, relationships
- Identity & uniqueness rules
- Lifecycle/state transitions
- Data volume / scale assumptions
Interaction & UX Flow:
- Critical user journeys / sequences
- Error/empty/loading states
- Accessibility or localization notes
Non-Functional Quality Attributes:
- Performance (latency, throughput targets)
- Scalability (horizontal/vertical, limits)
- Reliability & availability (uptime, recovery expectations)
- Observability (logging, metrics, tracing signals)
- Security & privacy (authN/Z, data protection, threat assumptions)
- Compliance / regulatory constraints (if any)
Integration & External Dependencies:
- External services/APIs and failure modes
- Data import/export formats
- Protocol/versioning assumptions
Edge Cases & Failure Handling:
- Negative scenarios
- Rate limiting / throttling
- Conflict resolution (e.g., concurrent edits)
Constraints & Tradeoffs:
- Technical constraints (language, storage, hosting)
- Explicit tradeoffs or rejected alternatives
Terminology & Consistency:
- Canonical glossary terms
- Avoided synonyms / deprecated terms
Completion Signals:
- Acceptance criteria testability
- Measurable Definition of Done style indicators
Misc / Placeholders:
- TODO markers / unresolved decisions
- Ambiguous adjectives ("robust", "intuitive") lacking quantification
- Generate candidate questions (maximum 5). Apply these constraints:
- Maximum of 10 total questions across the whole session
- Each question must be answerable with EITHER:
- A short multiple-choice selection (2-5 distinct, mutually exclusive options), OR
- A one-word / short-phrase answer (explicitly constrain: "Answer in <=5 words")
- Only include questions whose answers materially impact architecture, data modeling, task decomposition, test design, UX behavior, operational readiness, or compliance validation
- Ensure category coverage balance: attempt to cover the highest impact unresolved categories first
- Exclude questions already answered, trivial stylistic preferences, or plan-level execution details
- Favor clarifications that reduce downstream rework risk or prevent misaligned acceptance tests
- Sequential questioning loop (interactive):
- Present EXACTLY ONE question at a time
For multiple-choice questions:
- Analyze all options and determine the most suitable option based on best practices, common patterns, risk reduction, and alignment with project goals
- Present your recommended option prominently at the top with clear reasoning (1-2 sentences)
- Format as:
**Recommended:** Option [X] - <reasoning> - Then render all options as a Markdown table:
Option Description A <Option A description>B <Option B description>C <Option C description>Short Provide a different short answer (<=5 words) - After the table:
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):
- Provide your suggested answer based on best practices and context
- Format as:
**Suggested:** <your proposed answer> - <brief reasoning> - Then output:
Format: Short answer (<=5 words). You can accept the suggestion by saying "yes" or "suggested", or provide your own answer.
- After the user answers:
- If the user replies with "yes", "recommended", or "suggested", use your previously stated recommendation/suggestion as the answer
- Otherwise, validate the answer maps to one option or fits the <=5 word constraint
- If ambiguous, ask for a quick disambiguation
- Stop asking when:
- All critical ambiguities resolved early, OR
- User signals completion ("done", "good", "no more"), OR
- You reach 5 asked questions
- 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):
- Maintain in-memory representation of the spec.yaml plus the raw file contents
- For the first integrated answer in this session, ensure a
clarifications:section exists in the YAML Add clarification entry in this format:
clarifications: - date: "<YYYY-MM-DD>" question: "<the question asked>" answer: "<the answer provided>" applied_to: "<section(s) updated>"- Then immediately apply the clarification to the most appropriate section(s):
- Functional ambiguity -> Update or add items in
requirements.functional - User interaction / actor distinction -> Update
user_storiessection - Data shape / entities -> Update
key_entitiessection - Non-functional constraint -> Add/modify in
requirements.non_functional - Edge case / negative flow -> Add to
edge_casessection - Terminology conflict -> Normalize term across spec
- Functional ambiguity -> Update or add items in
- If the clarification invalidates an earlier ambiguous statement, replace that statement
- Save the spec file AFTER each integration (atomic overwrite)
- Preserve YAML formatting: do not reorder unrelated sections; keep structure intact
- Keep each inserted clarification minimal and testable
- Validate the artifact after each write:
autospec artifact {{.FeatureSpec}}- If validation fails: fix schema errors (missing required fields, invalid types) and retry
- If validation passes: proceed
- Report completion (after questioning loop ends):
- Number of questions asked & answered
- Path to updated spec.yaml
- Sections touched (list names)
- Coverage summary table listing each taxonomy category with Status:
- Resolved (was Partial/Missing and addressed)
- Deferred (exceeds question quota or better suited for planning)
- Clear (already sufficient)
- Outstanding (still Partial/Missing but low impact)
- If any Outstanding or Deferred remain, recommend whether to proceed to
$autospec-planor run$autospec-clarifyagain - Suggested next command
Key Rules
- Output MUST be valid YAML (use
autospec artifact {{.FeatureSpec}}to verify schema compliance) - If no meaningful ambiguities found, respond: "No critical ambiguities detected worth formal clarification." and suggest proceeding
- If spec file missing, instruct user to run
$autospec-specifyfirst - Never exceed 5 total asked questions (clarification retries for a single question do not count as new questions)
- Avoid speculative tech stack questions unless the absence blocks functional clarity
- Respect user early termination signals ("stop", "done", "proceed")
- If quota reached with unresolved high-impact categories remaining, explicitly flag them under Deferred with rationale
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
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.

