spec-review
Stage 1 spec compliance review. Triggers: /review stage 1. Verifies implementation matches design specification — functional completeness, TDD compliance, and test coverage. Do NOT use for code quality checks — use quality-review instead. Do NOT use for debugging.
What this skill does
# Spec Review Skill
## Overview
Stage 1 of two-stage review: Verify implementation matches specification and follows TDD.
For a complete worked example, see `references/worked-example.md`.
> **MANDATORY:** Before accepting any rationalization for approving without full verification, consult `references/rationalization-refutation.md`. Every common excuse is catalogued with a counter-argument and the correct action.
## Triggers
Activate this skill when:
- User runs `/exarchos:review` command (first stage)
- Task implementation is complete
- Need to verify spec compliance before quality review
- Subagent reports task completion
## Execution Context
This skill runs in a SUBAGENT spawned by the orchestrator, not inline.
The orchestrator provides:
- State file path (preferred) OR design/plan paths
- Diff output from `exarchos_orchestrate({ action: "review_diff" })` (context-efficient)
- Task ID being reviewed
The subagent:
- Reads state file to get artifact paths
- Uses diff output instead of reading full files
- Runs verification commands
- Generates report
- Returns verdict to orchestrator
### Data Handoff Protocol
The **orchestrator** is responsible for generating the diff before dispatching the spec-review subagent. The subagent does NOT generate its own diff.
**Orchestrator responsibilities:**
1. Generate diff: `exarchos_orchestrate({ action: "review_diff", worktreePath: "<worktree-path>", baseBranch: "main" })`
2. Pass diff content in the subagent dispatch prompt
3. Include state file path for artifact resolution
**Subagent responsibilities:**
1. Receive diff content from dispatch prompt (do NOT re-generate)
2. Read state file for design/plan artifact paths
3. Run verification commands against the working tree
4. Return structured JSON verdict
### Context-Efficient Input
Instead of per-worktree diffs, receive an integrated diff from the
integration branch (e.g., `feature/integration-branch`) against main:
```bash
# Generate integrated diff for review
git diff main...integration > /tmp/combined-diff.patch
# Alternative: use review-diff script against integration branch via orchestrate
# exarchos_orchestrate({ action: "review_diff", worktreePath: "<worktree-path>", baseBranch: "main" })
```
This provides the complete picture of all changes across all tasks and reduces context consumption by 80-90%.
### Pre-Review Schema Discovery
Before evaluating, query the review strategy runbook to determine the appropriate evaluation approach:
- **Evaluation strategy:** `exarchos_orchestrate({ action: "runbook", id: "review-strategy" })` to determine the review approach based on diff scope, prior fix cycles, and review stage.
## Review Scope
### Review Scope: Combined Changes
After delegation completes, spec review examines:
- The **complete integrated diff** (main...feature/integration branch)
- All changes across all tasks in one view
- The full picture of combined functionality
This enables catching:
- Cross-task interface mismatches
- Bugs not visible in isolation
- Combined behavior vs specification
**Spec Review focuses on:**
- Functional completeness
- TDD compliance
- Specification alignment
- Test coverage
**Does NOT cover (that's Quality Review):**
- Code style
- SOLID principles
- Performance optimization
- Error handling elegance
## Review Checklist
For the full checklist with verification commands, tables, and report template, see `references/review-checklist.md`.
**Verification:**
```bash
npm run test:run
npm run test:coverage
npm run typecheck
```
```typescript
exarchos_orchestrate({
action: "check_tdd_compliance",
featureId: "<featureId>",
taskId: "<taskId>",
branch: "<branch>"
})
```
## Fix Loop
If review FAILS:
1. Create fix task with specific issues
2. Dispatch to implementer (same or new)
3. Re-review after fixes
4. Repeat until PASS
```typescript
// Return to implementer
Task({
model: "opus",
description: "Fix spec review issues",
prompt: `
# Fix Required: Spec Review Failed
## Issues to Fix
1. Missing rate limiting implementation
- Add rate limiter middleware
- Test: RateLimiter_ExceedsLimit_Returns429
2. Email validation incomplete
- Add MX record check
- Test: ValidateEmail_InvalidDomain_ReturnsError
## Success Criteria
- All tests pass
- Coverage >80%
- All issues resolved
`
})
```
## Required Output Format
The subagent MUST return results as structured JSON. The orchestrator parses this JSON to populate state. Any other format is an error.
```json
{
"verdict": "pass | fail | blocked",
"summary": "1-2 sentence summary",
"issues": [
{
"severity": "HIGH | MEDIUM | LOW",
"category": "spec | tdd | coverage",
"file": "path/to/file",
"line": 123,
"description": "Issue description",
"required_fix": "What must change"
}
],
"test_results": {
"passed": 0,
"failed": 0,
"coverage_percent": 0
}
}
```
## Anti-Patterns
| Don't | Do Instead |
|-------|------------|
| Skip to quality review | Complete spec review first |
| Accept incomplete work | Return for fixes |
| Review code style here | Save for quality review |
| Approve without tests | Require test coverage |
| Let scope creep pass | Flag over-engineering |
## Cross-Task Integration Issues
If an issue spans multiple tasks:
1. Classify as "cross-task integration"
2. Create fix task specifying ALL affected tasks
3. Dispatch fix to implementer with context from all affected tasks
4. Mark original tasks as blocked until cross-task fix completes
## State Management
### On Review Complete
**Pass:**
```
action: "update", featureId: "<id>", updates: {
"reviews": { "spec-review": { "status": "pass", "summary": "...", "issues": [] } }
}
```
**Fail:**
```
action: "update", featureId: "<id>", updates: {
"reviews": { "spec-review": { "status": "fail", "summary": "...", "issues": [{ "severity": "...", "file": "...", "description": "..." }] } }
}
```
> **Important:** The review value MUST be an object with a `status` field (e.g., `{ "status": "pass" }`), not a flat string (e.g., `"pass"`). The `all-reviews-passed` guard silently ignores non-object entries. Accepted statuses: `pass`, `passed`, `approved`, `fixes-applied`.
### Phase Transitions and Guards
For the full transition table, consult `@skills/workflow-state/references/phase-transitions.md`.
**Quick reference:**
- `review` → `synthesize` requires guard `all-reviews-passed` — all `reviews.{name}.status` must be passing
- `review` → `delegate` requires guard `any-review-failed` — triggers fix cycle when any review fails
### Schema Discovery
Use `exarchos_workflow({ action: "describe", actions: ["update", "init"] })` for
parameter schemas and `exarchos_workflow({ action: "describe", playbook: "feature" })`
for phase transitions, guards, and playbook guidance. Use
`exarchos_orchestrate({ action: "describe", actions: ["check_tdd_compliance", "check_static_analysis"] })`
for orchestrate action schemas.
## Transition
All transitions happen **immediately** without user confirmation:
### Pre-Chain Validation (MANDATORY)
Before invoking quality-review:
1. Verify `reviews["spec-review"].status === "pass"` in workflow state (all tasks passed)
2. If not: "Spec review did not pass, cannot proceed to quality review"
> **Guard shape:** The `all-reviews-passed` guard requires `reviews["spec-review"]` to be an object with a `status` field set to a passing value (`pass`, `passed`, `approved`, `fixes-applied`). Flat strings like `reviews: { "spec-review": "pass" }` are silently ignored and will block the `review → synthesize` transition.
### If PASS:
1. Record results — the reviews value MUST be an object with a `status` field, not a flat string:
```
exarchos_workflow({ action: "update", featureId: "<id>", updates: {
reviews: { "spec-review": { status: "pass", summary: "...", issues: [] } }
}})
```
2. Output: "Spec review passed. Auto-continuing to quality review..."
3. Orchestrator dispatches qualitRelated 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.