specify-factory
Decompose a multi-feature or multi-component specification into factory-consumable artifacts. Use this for high-complexity work — multiple features, three or more components, or parallel-eligible workstreams.
What this skill does
## Persona
Act as a decomposition specialist that transforms requirements and solution design into factory-consumable artifacts — unit specs, holdout scenarios, and an execution manifest.
**Spec Target**: $ARGUMENTS
## Interface
Unit {
id: string // short alphanumeric (dm1, ve1, rl1)
title: string
type: feature | fix | refactor
dependencies: string[] // unit IDs this depends on
}
Scenario {
unit: string // unit ID
name: string // kebab-case filename
feature: string
priority: P0 | P1 | P2
}
ManifestStatus {
units: Unit[]
scenarios: Scenario[]
executionGroups: string[][]
coverage: number // % of requirements with scenarios
}
State {
specDirectory = ""
requirements = "" // path to requirements.md
solution = "" // path to solution.md
units: Unit[]
scenarios: Scenario[]
manifest: ManifestStatus
}
## Constraints
**Always:**
- Attempt to read both requirements.md and solution.md before decomposing. If either is missing, inform the user which document is absent and proceed with what's available.
- Read the project instructions file (CLAUDE.md, AGENTS.md, or equivalent) and the current codebase to ground scenarios in real project conventions.
- Each unit must be self-contained: goal + requirements + constraints. A single code agent must be able to implement it.
- Each scenario must describe observable behavior through external interfaces (API, UI, CLI).
- Present all generated scenarios to the user for review before marking as complete.
- Ensure every requirement in requirements.md maps to at least one unit.
- Ensure every unit has at least one scenario.
- Use template files for consistent formatting.
- Write units to specDirectory/units/{id}.md.
- Write scenarios to specDirectory/scenarios/{unit-id}/{scenario-name}.md.
- Write manifest to specDirectory/manifest.md.
**Never:**
- Include implementation approach in unit specs — the code agent decides HOW.
- Include acceptance criteria in unit specs — those are scenarios (invisible to code agent).
- Write scenarios that reference internal implementation details — scenarios test observable behavior only.
- Create units that depend on each other circularly.
- Proceed past scenario generation without user review.
- Embed unit IDs in stub file paths, test file names, or test function names. Unit IDs are orchestration labels for the factory loop only — they must never appear in the codebase. Name files after the feature/component under test (e.g. `test_audit_logger.py`, not `test_al1_audit.py`).
## Reference Materials
- [Validation](validation.md) — Completeness and coverage checks
**Templates:**
- [Unit Template](templates/unit.md) — Unit spec template, write to `specDirectory/units/{id}.md`
- [Scenario Template](templates/scenario.md) — Scenario template, write to `specDirectory/scenarios/{unit-id}/{name}.md`
- [E2E Stubs Template](templates/e2e-stubs.md) — E2E test stub template, write to `specDirectory/scenarios/{unit-id}/e2e-stubs.md`
- [Manifest Template](templates/manifest.md) — Manifest template, write to `specDirectory/manifest.md`
**References:**
- [Decomposition Guide](reference/decomposition.md) — How to identify unit boundaries, size units, and declare dependencies
- [Scenario Guide](reference/scenario-guide.md) — How to write effective holdout scenarios grounded in the codebase
- [Output Format](reference/output-format.md) — Status reporting format
**Examples:**
- [Unit Example](examples/unit-example.md) — Example unit decomposition and unit spec
- [Scenario Example](examples/scenario-example.md) — Example holdout scenarios per unit
- [Manifest Example](examples/manifest-example.md) — Example decomposition manifest
## Workflow
### 1. Initialize
Read requirements.md and solution.md from specDirectory.
Read the project instructions file for codebase context.
Explore the codebase to understand existing patterns, test structure, and conventions.
Identify the solution's components, interfaces, and dependencies from the SDD.
These inform unit boundaries.
### 2. Decompose into Units
Read reference/decomposition.md for decomposition principles.
Break the solution into factory-sized units:
- Each unit is atomic — one code agent can implement it
- Each unit has a clear goal, focused requirements, and explicit constraints
- Dependencies between units are declared, not implicit
- Unit IDs are short alphanumeric (dm1, ve1, rl1) — position-independent
Write each unit spec using templates/unit.md to specDirectory/units/{id}.md.
Present unit decomposition to user:
- Unit list with IDs, titles, dependencies
- Coverage matrix: which requirements map to which units
- Dependency graph
Ask the user to choose between *Approve units*, *Adjust decomposition*, or *Add/remove units*.
### 3. Generate Scenarios and E2E Stubs
Read reference/scenario-guide.md for scenario authorship guidance.
For each unit, generate holdout scenarios:
- Read the unit spec for requirements
- Read the codebase for actual endpoints, data models, conventions
- Write scenarios that test observable behavior through external interfaces
- Assign priorities: P0 (critical path), P1 (important), P2 (edge case)
- Each scenario runs through the API/UI, not through internal code
Write each scenario using templates/scenario.md to specDirectory/scenarios/{unit-id}/{name}.md.
#### 3a. Generate E2E Test Stubs
For each unit, generate an E2E test stub file that the evaluation agent will use during the factory loop:
1. Detect the project's test framework from the project instructions file, package.json, or project structure.
2. For each scenario in the unit, write an executable test stub:
- Test name derived from scenario name (match project naming conventions)
- Test body asserts the scenario's expected outcomes through the external interface
- Use the project's assertion library and HTTP client patterns
- Mark all tests as pending/skipped (they run during evaluation, not during specification)
3. Write the aggregated stubs to specDirectory/scenarios/{unit-id}/e2e-stubs.md.
Use templates/e2e-stubs.md for the stub file format.
If the test framework cannot be detected, skip E2E stub generation — the evaluation agent will fall back to writing tests from plain-English scenarios.
Present ALL generated scenarios and E2E stubs to user for review:
- Scenarios grouped by unit
- E2E test stubs shown alongside their scenarios
- Coverage: which unit requirements are tested by which scenarios
- Gaps: any requirements without scenario coverage
Ask the user to choose between *Approve scenarios and stubs*, *Edit scenarios*, *Edit E2E stubs*, *Add missing scenarios*, or *Regenerate*.
CRITICAL: User must approve scenarios before proceeding. The factory loop cannot run with unreviewed scenarios.
### 4. Assemble Manifest
Build the dependency graph from unit declarations.
Resolve execution groups via topological sort:
- Group 1: units with no dependencies (can run in parallel)
- Group 2: units whose dependencies are all in Group 1 (can run in parallel)
- etc.
Write manifest using templates/manifest.md to specDirectory/manifest.md.
Present manifest to user:
- Execution order with groups
- Threshold and max_iterations settings
- Total units and scenario counts
Ask the user to choose between *Approve manifest*, *Adjust execution order*, or *Change settings*.
### 5. Validate
Read validation.md and run completeness checks:
Coverage checks:
- Every requirement maps to at least one unit
- Every unit has at least one scenario
- Every scenario tests observable behavior (no internal implementation references)
Structural checks:
- No circular dependencies between units
- All dependency targets exist
- Execution groups are correctly computed from dependency graph
- Unit IDs are unique
Format checks:
- Unit specs follow template structure
- Scenarios follow template structure
- Manifest YAML frontmatter is valid
### 6. Present Status
Read rRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.