From rust-agents
Spec-Driven Development workflow. Use when the user wants to create a specification, write requirements, design a feature, plan implementation, break work into tasks, or review spec quality. Also trigger when the user says 'I want to build X', 'let's spec this out', 'create a spec', 'write requirements', or asks to prepare work for a coding agent.
npx claudepluginhub bug-ops/claude-plugins --plugin rust-agentsThis skill uses the workspace's default tool permissions.
Help users compose structured specifications that AI coding agents can reliably
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Help users compose structured specifications that AI coding agents can reliably execute. The core principle: the quality of AI-generated code is directly proportional to the quality of the specification.
This skill accepts a phase argument via $ARGUMENTS:
/sdd init — bootstrap SDD structure in the project/sdd specify <description> — create a specification (Phase 1)/sdd plan [feature-dir] — create a technical plan (Phase 2)/sdd tasks [feature-dir] — break into implementation tasks (Phase 3)/sdd review [feature-dir] — validate spec quality/sdd (no args) — ask the user what they needParse the first word of $ARGUMENTS to determine the phase. Everything after
the phase keyword is the feature description or path.
You are an interactive dialog partner, not a template filler.
[NEEDS CLARIFICATION: ...]All spec artifacts live under .local/specs/:
.local/specs/
├── constitution.md (project principles, created by init)
├── 001-feature-name/
│ ├── spec.md (Phase 1 output)
│ ├── plan.md (Phase 2 output)
│ └── tasks.md (Phase 3 output)
└── 002-another-feature/
└── ...
Templates are embedded in this skill (see Templates section below). Read the relevant template before generating any artifact.
Bootstrap SDD in the current project.
.local/specs/ exists. If yes, report state and ask what to do..local/specs/ directory..local/specs/constitution.md:
/sdd specify <description> to create
your first spec."Create a feature specification. Focus on WHAT and WHY — no implementation.
Steps:
.local/specs/constitution.md if it exists..local/specs/ directories.WHEN <condition> THE SYSTEM SHALL <behavior>
[NEEDS CLARIFICATION: specific question].local/specs/<NNN>-<feature-name>/spec.md/sdd plan to create the technical plan?"Create a technical plan. Focus on HOW.
Steps:
spec.md. If no feature specified, use the most recent..local/specs/constitution.md if it exists.[NEEDS CLARIFICATION] markers. Resolve with user first..local/specs/<feature>/plan.md/sdd tasks to break this into implementation tasks?"Break the plan into discrete implementation tasks.
Steps:
Read both spec.md and plan.md for the feature.
Read .local/specs/constitution.md if it exists.
Use the Tasks Template below for structure.
Create ordered tasks. Each task must be:
Task format:
### T001: <title>
**Context**: Why this task exists
**Spec reference**: FR-XXX / US-XXX
**Acceptance criteria**:
- [ ] <criterion>
- [ ] <criterion>
**Dependencies**: none | T000
**Files**: <paths>
**Complexity**: low | medium | high
Include T000 for scaffolding/setup if needed.
Present tasks for review. Ask:
Save to .local/specs/<feature>/tasks.md
Suggest: "Spec complete. Start implementing with:
Implement T001 from .local/specs/<feature>/tasks.md following the spec and plan."
Validate specification quality.
Read all artifacts for the feature (spec.md, plan.md, tasks.md).
Read .local/specs/constitution.md if it exists.
Run quality checklist:
Completeness:
[NEEDS CLARIFICATION] markersClarity:
Consistency:
Implementability:
Report as:
## Spec Review: <feature>
### Score: X/10
### Strengths
### Issues Found
### Recommended Actions
Offer to fix issues interactively.
Match spec depth to task complexity. Not everything needs the full workflow.
| Size | Approach |
|---|---|
| Typo / one-liner | No spec needed |
| Small bug / single function | 3-5 sentences + acceptance criteria |
| Feature (1-3 files) | Phase 1 only |
| Multi-component feature | Phase 1 + 2 + 3 |
| New system / architecture | Full workflow with constitution |
Every spec must define agent boundaries:
### Always (without asking)
- Run tests after changes
- Follow existing code style
### Ask First
- Adding new dependencies
- Changing database schema
### Never
- Commit secrets or credentials
- Delete user data without backup
Ask: "Are there things the agent should absolutely never touch?"
# Project Constitution
> Non-negotiable principles governing ALL development in this project.
> Every specification, plan, and task MUST comply with this document.
> Update this file only through explicit team decision.
## I. Architecture
[Define your architectural patterns and constraints]
- Example: "Modular monolith with clear module boundaries"
- Example: "All modules communicate through public API only, no direct DB access"
## II. Technology Stack
[Lock down the core stack to prevent drift]
- Language: [e.g., Rust 1.80+]
- Framework: [e.g., Axum]
- Database: [e.g., PostgreSQL 16]
- Additional: [libraries, tools]
## III. Testing (NON-NEGOTIABLE)
[Define minimum testing standards]
- All features must have tests that pass before merge
- Prefer integration tests with real dependencies over mocks
- Coverage target: [e.g., > 80% for new code]
- Framework: [e.g., cargo test + nextest]
## IV. Code Style
[Reference existing conventions or define them]
- Follow existing patterns in the codebase
- [e.g., No unwrap() in production code — use proper error handling]
- [e.g., All public APIs must have doc comments]
## V. Security
- Never commit secrets, keys, or credentials
- All user input must be validated and sanitized
- [Additional security requirements]
## VI. Performance
- [e.g., API endpoints must respond within 200ms at p95]
- [e.g., Memory usage must stay under X for the main process]
## VII. Simplicity
- Prefer standard library and framework features over third-party alternatives
- New dependencies require justification
- Maximum [N] external dependencies per module
## VIII. Git Workflow
- Branch naming: [e.g., feat/<NNN>-<name>, fix/<NNN>-<name>]
- Commit messages: [e.g., conventional commits]
- One logical change per commit
# Feature: [Name]
> **Status**: Draft | In Review | Approved
> **Author**: [name]
> **Date**: [YYYY-MM-DD]
> **Branch**: [branch-name]
## 1. Overview
### Problem Statement
[What problem does this solve? Why does it matter?]
### Goal
[One sentence: what will be true when this is done?]
### Out of Scope
[Explicitly list what this feature does NOT include]
## 2. User Stories
### US-001: [Title]
AS A [role]
I WANT [capability]
SO THAT [benefit]
**Acceptance criteria:**
GIVEN [precondition] WHEN [action] THEN [expected result]
### US-002: [Title]
...
## 3. Functional Requirements
Use EARS notation. Prefix with FR-NNN.
| ID | Requirement | Priority |
|----|------------|----------|
| FR-001 | WHEN [condition] THE SYSTEM SHALL [behavior] | must |
| FR-002 | ... | should |
## 4. Non-Functional Requirements
| ID | Category | Requirement |
|----|----------|-------------|
| NFR-001 | Performance | [e.g., Response time < 200ms at p95] |
| NFR-002 | Security | [e.g., All inputs sanitized, auth required] |
| NFR-003 | Accessibility | [e.g., WCAG 2.1 AA compliance] |
## 5. Data Model
[Entity descriptions. Key attributes and relationships. No implementation details — describe WHAT data exists, not HOW it's stored.]
| Entity | Description | Key Attributes |
|--------|-------------|----------------|
| [Name] | [What it represents] | [Important fields] |
## 6. Edge Cases and Error Handling
| Scenario | Expected Behavior |
|----------|-------------------|
| [Input is empty] | [System responds with...] |
| [Concurrent access] | [System handles by...] |
| [External service unavailable] | [System degrades to...] |
## 7. Success Criteria
Measurable metrics that prove the feature works:
| ID | Metric | Target |
|----|--------|--------|
| SC-001 | [e.g., Task completion rate] | [e.g., > 95%] |
| SC-002 | [e.g., Error rate] | [e.g., < 0.1%] |
## 8. Agent Boundaries
### Always (without asking)
- [e.g., Run tests after changes]
- [e.g., Follow existing code patterns]
### Ask First
- [e.g., Adding new dependencies]
- [e.g., Changing public API]
### Never
- [e.g., Commit secrets]
- [e.g., Modify unrelated code]
## 9. Open Questions
- [NEEDS CLARIFICATION: ...]
## 10. References
- [Links to related specs, docs, designs, discussions]
# Technical Plan: [Feature Name]
> **Spec**: [link to spec.md]
> **Date**: [YYYY-MM-DD]
> **Status**: Draft | Approved
## 1. Architecture
### Approach
[High-level description of the technical approach. Why this approach over alternatives?]
### Component Diagram
[ASCII or Mermaid diagram of how components interact]
### Key Design Decisions
| Decision | Choice | Rationale | Alternatives Considered |
|----------|--------|-----------|------------------------|
| [e.g., Storage] | [e.g., PostgreSQL] | [why] | [what else was considered] |
## 2. Project Structure
[Show where new/modified files will live in the project tree] src/ ├── new-module/ │ ├── ...
## 3. Data Model
[Concrete schema, types, or interfaces — now we define HOW]
[Code block with types/schema in the project's language]
### Migrations
[Database changes needed, if any]
## 4. API Design
[If applicable — endpoints, signatures, message formats]
| Method | Path | Description | Request | Response |
|--------|------|-------------|---------|----------|
| POST | /api/... | ... | `{...}` | `{...}` |
## 5. Integration Points
| System | Direction | Protocol | Notes |
|--------|-----------|----------|-------|
| [e.g., Auth service] | outbound | [e.g., gRPC] | [details] |
## 6. Security
- Authentication: [approach]
- Authorization: [approach]
- Input validation: [approach]
- Sensitive data: [how handled]
## 7. Testing Strategy
| Level | Framework | What to Test | Coverage Target |
|-------|-----------|-------------|-----------------|
| Unit | [e.g., pytest] | Business logic | [e.g., > 80%] |
| Integration | [e.g., testcontainers] | API + DB | Key paths |
| Contract | [e.g., pact] | Service boundaries | All endpoints |
## 8. Performance Considerations
- Expected load: [e.g., 100 req/s]
- Bottlenecks: [identified risks]
- Optimization plan: [if needed]
## 9. Rollout Plan
[How will this be deployed? Feature flags? Phased rollout?]
## 10. Constitution Compliance
[If `.local/specs/constitution.md` exists, confirm compliance with each principle]
| Principle | Status | Notes |
|-----------|--------|-------|
| [e.g., Test coverage > 80%] | Compliant | [details] |
## 11. Risks and Mitigations
| Risk | Impact | Probability | Mitigation |
|------|--------|-------------|------------|
| [risk] | high/med/low | high/med/low | [plan] |
# Implementation Tasks: [Feature Name]
> **Spec**: [link to spec.md]
> **Plan**: [link to plan.md]
> **Date**: [YYYY-MM-DD]
> **Total tasks**: [N]
## Progress
- [ ] T000: Project scaffolding
- [ ] T001: ...
- [ ] T002: ...
---
## Dependency Graph
T000 (scaffolding) ├── T001 (data model) │ ├── T002 (core logic) │ └── T003 (API layer) │ └── T004 (integration tests) └── T005 (UI components) └── T006 (E2E tests)
---
### T000: Project Scaffolding
**Context**: Set up the foundation — directories, configs, dependencies — so
subsequent tasks can focus on logic.
**Spec reference**: N/A (infrastructure)
**Acceptance criteria**:
- [ ] Directory structure created per plan
- [ ] Dependencies added (if any)
- [ ] Config files updated
- [ ] Project builds and existing tests pass
**Dependencies**: none
**Files**: [list]
**Complexity**: low
---
### T001: [Title]
**Context**: [Why this task exists, what it enables for later tasks]
**Spec reference**: [FR-XXX, US-XXX]
**Acceptance criteria**:
- [ ] [Testable criterion derived from spec]
- [ ] [Testable criterion]
- [ ] Tests written and passing
**Dependencies**: T000
**Files**: [specific paths]
**Complexity**: low | medium | high
---
[Continue for all tasks...]
---
## Implementation Notes
### Order of execution
[Any notes about optimal task ordering, parallelization opportunities]
### Common patterns
[Reference existing code patterns the agent should follow]
### Gotchas
[Known pitfalls, things the agent should watch out for]