npx agentspec-cli install 7f03f3ef-14ab-479e-bfa4-cc2c01193f30 --framework ClaudeCode→ .claude/skills/spec/SKILL.md
# Specification Interview ## Purpose Prevent wrong assumptions and context loss across compactions by building a comprehensive, persistent specification through structured interviewing. ## When to Use - Starting a new project (no SPEC.md exists) - After compaction when resuming substantial work - User explicitly invokes /spec - Requirements are ambiguous and substantial work is requested - User says "interview me" or asks to clarify architecture ## Process ### 1. Read Existing State If SPEC.md exists, read it first to understand current state. If project CLAUDE.md exists, read that too. ### 2. Interview Protocol Use AskUserQuestion tool to ask detailed, non-obvious questions about: **Architecture & Design** - Core data structures and their representations (vectors, tensors, matrices - ask for concrete shapes) - Performance constraints and optimization parameters - What tradeoffs are acceptable vs. non-negotiable - System boundaries and interfaces **Scope & Requirements** - What is explicitly OUT of scope (as important as what's in) - What does "done" look like - concrete success criteria - Edge cases that matter vs. ones to ignore - Dependencies on external systems or libraries **Implementation Strategy** - Preferred patterns or anti-patterns for this codebase - What existing code/approaches to preserve vs. rewrite - Scaling considerations (batch sizes, parallelism, memory) - Testing strategy and validation approach **Unknowns & Risks** - What needs to be measured/benchmarked rather than assumed - Technical risks or uncertainties - What would cause this project to fail ### 3. Question Style - Ask non-obvious questions - skip anything derivable from code - Use concrete examples: "If batch_size=1024, does each element represent X or Y?" - Challenge assumptions: "You said X, but that conflicts with Y - which takes priority?" - Offer adversarial interpretations to surface hidden requirements - Ask about visual/spatial representations when relevant (ASCII diagrams welcome) ### 4. Iterative Refinement - Continue interviewing until the user signals completion - After each round, summarize understanding and ask for corrections - Identify remaining ambiguities explicitly ### 5. Write Specification Write to ./SPEC.md at project root with structure: ```markdown # Project: [Name] ## Objective [1-2 sentence core goal] ## Success Criteria - [ ] Concrete measurable outcome 1 - [ ] Concrete measurable outcome 2 ## Architecture ### Core Data Structures [Concrete representations with example shapes/values] ### System Boundaries [What's in scope, what interfaces with external systems] ## Constraints & Tradeoffs ### Non-negotiable - [Hard requirements] ### Acceptable Tradeoffs - [What can be sacrificed for what] ### Out of Scope - [Explicitly excluded] ## Implementation Strategy ### Optimization Parameters [Batch sizes, memory limits, performance targets - MEASURED not guessed] ### Preferred Patterns [How to structure code in this project] ### Anti-patterns [What to avoid] ## Open Questions [Things that still need measurement or decision] ## Reference Examples [ASCII diagrams, example tensors, concrete values] ``` ## Rules - Never guess numerical values - mark as "TBD: needs benchmarking" - Spec can be large (1000+ lines) - comprehensiveness beats brevity - Update spec incrementally as project evolves - After writing spec, remind user to review and correct
Built on the Agent Skills standard
spec-driven-development
Creates specs before coding. Use when starting a new project, feature, or significant change and no specification exists yet. Use when drafting a PRD or requirements document with objectives and scope, or when requirements are unclear, ambiguous, or only exist as a vague idea. Use when a single requirement spans several independently testable capabilities and needs decomposing into a capability map of modules before specifying.
by AgentHub Crawler
Role: Spec-Driven Developer (SDDA)
You are an expert software engineer acting as a **Spec-Driven Developer Agent**. Your goal is not just to "write code," but to **transform structured specifications into executable implementations**. You operate in a strict "Spec-to-Code" mode where specific Markdown files define your constraints, objectives, and architectural boundaries.
by AgentHub Crawler
project-spec
Create a project spec for AI agents to work from autonomously.
Sign in to leave a comment.
by AgentHub Crawler