skills/dev-clarify/SKILL.md
Asks targeted clarification questions based on codebase exploration findings.
npx skillsauth add edwinhu/workflows dev-clarifyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Announce: "I'm using dev-clarify (Phase 3) to resolve ambiguities."
Iteration topology: one-shot (conversational)
Before starting this phase, check remaining context:
| Level | Remaining | Action | |-------|-----------|--------| | Normal | >35% | Proceed | | Warning | 25-35% | Finish the current step, then invoke dev-handoff | | Critical | ≤25% | Invoke dev-handoff immediately — resume fresh |
At Warning/Critical: Read ${CLAUDE_SKILL_DIR}/../../skills/dev-handoff/SKILL.md and follow its instructions.
Ask targeted questions based on what exploration revealed. Prerequisite: Exploration phase complete, key files read.
<EXTREMELY-IMPORTANT> ## The Iron Law of ClarificationASK BEFORE DESIGNING. This is not negotiable.
After exploration, you now know:
Use this knowledge to ask informed questions about:
If you catch yourself about to design without resolving ambiguities, STOP. </EXTREMELY-IMPORTANT>
After updating .planning/SPEC.md with all clarified requirements, IMMEDIATELY invoke:
Read ${CLAUDE_SKILL_DIR}/../../skills/dev-design/SKILL.md and follow its instructions.
DO NOT:
The workflow phases are SEQUENTIAL. Complete clarify → immediately start design.
| DO | DON'T | |----|-------| | Ask questions based on exploration | Ask vague/generic questions | | Reference specific code patterns found | Repeat questions from brainstorm | | Clarify integration points | Propose approaches (that's design) | | Resolve edge cases | Make assumptions | | Update SPEC.md with answers | Skip to implementation |
Clarify answers: WHAT EXACTLY should happen in specific scenarios Design answers: HOW to build it (next phase)
Before asking questions, review:
Common areas needing clarification after exploration:
Integration Points:
Edge Cases:
Scope Boundaries:
Behavior Choices:
file.ts:23 and Pattern B in other.ts:45. Which should we follow?"Smart Discuss (autonomous-chaining requirement): batch ALL open ambiguities into ONE AskUserQuestion call — never ask sequentially across turns. Sequential asks stall autonomous/overnight runs at every question. See Smart-Discuss: Batch Ambiguities below for the batch/don't-batch rule.
Present questions with context from exploration:
AskUserQuestion(questions=[{
"question": "The auth middleware at src/middleware/auth.ts:78 validates tokens synchronously. The new endpoint needs user data. Should we: validate synchronously (faster, simpler) or fetch fresh user data (slower, always current)?",
"header": "Auth pattern",
"options": [
{"label": "Sync validation (Recommended)", "description": "Faster, uses cached token claims, matches existing patterns"},
{"label": "Fresh fetch", "description": "Slower, always current, needed if user data changes frequently"}
],
"multiSelect": false
}])
Key principles:
When multiple ambiguities are discovered during exploration, batch them into ONE AskUserQuestion call instead of asking sequentially:
Sequential (slow — 5 round-trips):
Batched (fast — 1 round-trip):
AskUserQuestion(questions=[
{"question": "API style?", "options": [{"label": "REST"}, {"label": "GraphQL"}]},
{"question": "Auth mechanism?", "options": [{"label": "JWT"}, {"label": "Session-based"}]},
{"question": "Pagination?", "options": [{"label": "Yes, cursor-based"}, {"label": "Yes, offset"}, {"label": "Not needed"}]}
], multiSelect=false)
When to batch: After reading exploration findings, if 3+ questions arise, batch them. Present all ambiguities at once with options and pros/cons for each.
When NOT to batch: If a question's answer changes what other questions to ask (dependent questions), ask the blocking question first, then batch the rest.
After each answer, update .planning/SPEC.md:
## Clarified Requirements
### Auth Pattern
- Decision: Sync validation
- Rationale: Matches existing patterns, user data changes infrequently
- Reference: src/middleware/auth.ts:78
### Edge Case: Expired Token
- Decision: Return 401, let client refresh
- Rationale: Consistent with other endpoints
Before proceeding to design, ensure testing strategy is clear:
AskUserQuestion(questions=[{
"question": "No test infrastructure was found. How should we verify this feature works?",
"header": "Testing",
"options": [
{"label": "Add pytest/jest as Task 0 (Recommended)", "description": "Set up test framework before implementing feature"},
{"label": "Add E2E tests with Playwright", "description": "Browser automation to test user interactions"},
{"label": "Add E2E tests with ydotool", "description": "Desktop automation for native apps"},
{"label": "Other (describe in chat)", "description": "Propose alternative testing approach"}
],
"multiSelect": false
}])
"Manual testing" is NOT an acceptable answer. If user insists on manual testing:
Do NOT proceed to design without a clear automated testing strategy. </EXTREMELY-IMPORTANT>
After user chooses testing approach, clarify specifics:
AskUserQuestion(questions=[{
"question": "What's the FIRST test you want to see fail?",
"header": "First Test",
"options": [
{"label": "Happy path - feature works correctly", "description": "Test the main success scenario"},
{"label": "Error case - feature handles bad input", "description": "Test error handling"},
{"label": "Edge case - specific boundary condition", "description": "Test a known edge case"},
{"label": "Integration - feature works with existing code", "description": "Test system integration"}
],
"multiSelect": false
}])
Why this matters: Defining the first test BEFORE implementation is the essence of TDD.
Based on code path discovery from exploration, clarify the exact workflow:
AskUserQuestion(questions=[{
"question": "Let me confirm the user workflow the test must replicate:",
"header": "Workflow",
"options": [
{"label": "Confirm workflow", "description": "[State the discovered workflow, e.g., 'highlight → click panel → see status']"},
{"label": "Modify workflow", "description": "The workflow is different - let me describe it"},
{"label": "Add steps", "description": "The workflow has additional steps I should know"}
],
"multiSelect": false
}])
Then verify the test approach matches:
AskUserQuestion(questions=[{
"question": "The test must use [discovered protocol, e.g., WebSocket]. Is this correct?",
"header": "Protocol",
"options": [
{"label": "Yes, use [protocol]", "description": "Test must use the same protocol as production"},
{"label": "No, different protocol", "description": "Explain the correct protocol"}
],
"multiSelect": false
}])
After clarifying workflow and protocol, verify:
[ ] Test workflow matches user workflow exactly
[ ] Test uses same protocol as production
[ ] Test interacts with same UI elements user sees
[ ] Test verifies same output user verifies
[ ] Testing skill is appropriate for this workflow
If any of these don't match, the test will be FAKE. Clarify now.
Before proceeding to design, verify the testing strategy passes real-test enforcement. See references/constraints/real-test-enforcement.md for what constitutes a REAL vs FAKE test.
If the test approach doesn't match what you discovered, STOP and clarify. </EXTREMELY-IMPORTANT>
Clarification complete when:
.planning/SPEC.md updated with final requirementsCheckpoint type: human-verify
Run the canonical 5-step gate before chaining to dev-design — the sub-checks below are its READ/VERIFY content:
1. IDENTIFY: `.planning/SPEC.md` exists and was updated with resolved ambiguities.
2. RUN: Read(".planning/SPEC.md").
3. READ: inspect the Testing Strategy + REAL Test Definition sections (the three gate checks below).
4. VERIFY: every box in all three gate checks is checked; no TBD / placeholder values remain.
5. CLAIM: only if 1-4 hold, chain to dev-design.
If any sub-check box is unchecked → do NOT proceed; resolve it first.
Checkpoint type: decision (user chooses testing approach — cannot auto-advance)
Before proceeding to design, verify in SPEC.md:
[ ] Testing approach documented (unit/integration/E2E)
[ ] Test framework specified (pytest/jest/playwright/etc.)
[ ] First test described (what will fail first)
[ ] Test command documented (how to run tests)
If any box is unchecked → STOP. Do not proceed to design.
Before proceeding to design, verify REAL test criteria:
[ ] User workflow confirmed and documented
[ ] Protocol/transport verified (same as production)
[ ] UI elements to test identified
[ ] Testing skill specified (dev-test-electron/playwright/etc.)
[ ] Test approach matches discovered code paths
If any box is unchecked → You WILL write fake tests. Clarify now.
See references/constraints/real-test-enforcement.md for detection tables and the Iron Law of REAL Tests.
Ask yourself:
If ANY answer is "no" or "not sure" → STOP. Clarify before design.
This is the last checkpoint before implementation planning. Fake tests caught here save hours of wasted implementation.
Phase summary (append to LEARNINGS.md):
## Phase: Clarify
---
phase: clarify
status: completed
implements: [] # clarification refines requirements; implements no IDs
requires: [SPEC.md, codebase-map]
provides: [clarified-requirements, testing-strategy-validated]
affects: [.planning/SPEC.md] # may update SPEC.md with resolved ambiguities
questions-resolved:
- [one-liner per clarification]
---
REQUIRED SUB-SKILL: After completing clarification, IMMEDIATELY invoke:
Read ${CLAUDE_SKILL_DIR}/../../skills/dev-design/SKILL.md and follow its instructions.
development
Build the meeting-level proxy-voting × ownership panel on the WRDS SGE grid — ISS N-PX fund votes reduced to (item × block) direction cells, joined to institutional and mutual-fund ownership. Use when working with risk.voteanalysis_npx, N-PX fund-level votes, ISS→CRSP fund linking, index/passive/active voting blocks, or a proxy-voting panel that needs ownership attached.
development
Use when "CRSP CIZ", "CRSP v2", "CRSP flat file format 2.0", "crsp.dsf_v2 / msf_v2", "StkDlySecurityData", "StkMthSecurityData", "StkSecurityInfoHist", "stocknames_v2", "DlyRet / MthRet / DlyPrc / MthPrc", "SHRCD or EXCHCD equivalent in new CRSP", "SIZ to CIZ migration", "CRSP data after 2024", "CRSP delisting returns", "CRSP cumulative adjustment factors", "CRSP index INDNO / INDFAM", or any CRSP stock/index query where the legacy SIZ column names no longer exist.
development
Use when linking or deduping datasets by entity name rather than a shared key — 'fuzzy match', 'fuzzy name matching', 'entity resolution', 'record linkage', 'match company/person names', 'dedupe entity names', 'name-based join', 'bridge identifiers' (CIK ↔ permno ↔ gvkey ↔ wficn ↔ EIN ↔ personid), or any use of char n-gram TF-IDF, cosine similarity on names, `sparse_dot_topn`, or RapidFuzz at scale.
development
Use when building a publication-quality table in Python — 'regression table', 'results table', 'summary statistics table', 'etable', 'coefplot', 'great_tables', 'GT', 'gt table', 'format a table for the paper', 'export table to LaTeX/HTML', significance stars, spanners, or column formatting for a table headed into a paper, slide deck, or notebook.