From benji
Creates a technical specification from research. Use after the research skill to produce spec.md and checklist.md for a decomposed spec unit.
npx claudepluginhub ai-builder-team/ai-builder-plugin-marketplace --plugin benjiThis skill is limited to using the following tools:
Creates a detailed technical specification for one unit of work.
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.
Creates a detailed technical specification for one unit of work.
research skill has created research artifactsLocate Feature + Spec
│
▼
Verify spec-research.md exists
│
▼
Gather Clarifications (upfront)
│
▼
Parallel Draft Sections
│
▼
Assemble Full Spec
│
▼
Coherence Check (spec-coherence-checker)
│
├─ FAIL (2x) → ESCALATE (Andon)
│
▼
Autonomous Validation (or Human Review if interactive)
│
▼
Generate Checklist
│
▼
Checklist Validation (checklist-completeness-validator)
│
├─ FAIL → Fix gaps
│
▼
QC Validation (spec-qc agent)
│
├─ FAIL → Address deltas, re-run QC
│
▼
Commit to main
│
▼
Output: Spec ready for implementation
features/{domain}/{feature}/FEATURE.mdls features/{domain}/{feature}/specs/mkdir -p features/{domain}/{feature}/specs/{NN}-{spec-name}/tmp
The research skill should have already created spec-research.md for ALL specs. Verify it exists:
ls features/{domain}/{feature}/specs/{NN}-{spec-name}/spec-research.md
If missing: Run research skill first. Do not proceed without spec-research.md.
Read the spec-research.md to understand:
Before drafting, identify and resolve any ambiguities:
Example clarification points:
Before drafting, verify:
Use AskUserQuestion for any failures.
Goal: Have all information needed to draft a complete spec. No questions should arise during drafting.
Launch 4 parallel agents in a SINGLE message:
Agent 1: Overview
subagent_type: "general-purpose"
model: "haiku"
run_in_background: true
description: "Draft Overview section"
prompt: "Read {spec-path}/spec-research.md for context.
Draft the Overview section: what is being built and how.
Write to {spec-path}/tmp/overview.md.
Return 'DONE' when complete."
Agent 2: Out Of Scope
subagent_type: "general-purpose"
model: "haiku"
run_in_background: true
description: "Draft Out Of Scope section"
prompt: "Read {spec-path}/spec-research.md for context.
Draft Out Of Scope: numbered items with rationale for each exclusion.
For each Out of Scope item, classify as one of:
- **Descoped:** Not part of this feature (no action needed)
- **Deferred to {spec-name}:** Will be done in named spec (verify spec exists)
- **⚠️ Unassigned:** Needs to be done but no spec owns it yet
Rules:
- Never write 'will be in another spec' without naming the spec
- ⚠️ Unassigned items flag gaps for resolution before finalizing
Write to {spec-path}/tmp/out-of-scope.md.
Return 'DONE' when complete."
Agent 3: Functional Requirements
subagent_type: "general-purpose"
model: "haiku"
run_in_background: true
description: "Draft Requirements section"
prompt: "Read {spec-path}/spec-research.md for context.
Draft Functional Requirements using FR1/FR2/FR3 format.
Each FR MUST include Success Criteria.
Write to {spec-path}/tmp/requirements.md.
Return 'DONE' when complete."
Agent 4: Technical Design
subagent_type: "general-purpose"
model: "haiku"
run_in_background: true
description: "Draft Technical Design section"
prompt: "Read {spec-path}/spec-research.md for context.
Draft Technical Design including:
- Files to Reference
- Files to Create/Modify
- Data Flow
- Edge Cases
Write to {spec-path}/tmp/technical-design.md.
Return 'DONE' when complete."
Wait for all agents using TaskOutput.
After all agents complete, assemble the complete spec.md:
# {Spec Name}
**Status:** Draft
**Created:** {YYYY-MM-DD}
**Last Updated:** {YYYY-MM-DD}
**Owner:** @{github-id}
---
Append sections in order:
tmp/overview.md → appendtmp/out-of-scope.md → appendtmp/requirements.md → appendtmp/technical-design.md → appendWrite complete spec.md to spec folder
Before presenting to the user, validate internal consistency.
subagent_type: "spec-coherence-checker"
description: "Validate spec consistency"
prompt: "Validate internal consistency of the spec at:
- spec.md: {spec-path}/spec.md
Check that FR references, type names, and scope are consistent across all sections."
If PASS:
If FAIL:
If stuck after 2 iterations: Proceed to Step 7 (Autonomous Validation) which handles Andon escalation. Do not escalate separately here.
When running as a sub-agent (dispatched by spec-executor), skip human review if ALL conditions pass:
Auto-Approve Criteria:
If all criteria pass → Proceed directly to Step 8 (Generate Checklist)
When running interactively (user invoked /spec directly):
If autonomous validation fails, ESCALATE - do not proceed:
SPEC BLOCKED
Validation failure: [which check failed]
Details: [specific issue]
Impact: Cannot proceed to implementation without resolution.
Options:
1. Return to research phase to update contracts
2. Clarify with user: [specific question]
3. Proceed with assumption: [state assumption explicitly]
Need decision to proceed.
Escalation Triggers:
After spec approved:
spec.mdspec-research.md Test Plan sectionchecklist.md with:
Important: Phase 1.2 includes mandatory review agent steps. Ensure these are included in every generated checklist.
Before proceeding to QC, validate checklist completeness.
subagent_type: "checklist-completeness-validator"
description: "Validate checklist coverage"
prompt: "Validate checklist completeness at:
- checklist.md: {spec-path}/checklist.md
- spec.md: {spec-path}/spec.md
- spec-research.md: {spec-path}/spec-research.md
Ensure every FR has test and implementation tasks, and Phase 1.2 review section exists."
If PASS:
If FAIL:
If stuck after 2 iterations: Escalate to user - spec or research may need adjustment.
Before committing, spawn the spec-qc agent to validate outputs.
subagent_type: "spec-qc"
description: "Validate spec outputs"
prompt: "Validate the spec at:
- spec.md: {spec-path}/spec.md
- spec-research.md: {spec-path}/spec-research.md
Compare spec against research foundation. Run delta checks and report PASS or FAIL."
If PASS:
If FAIL:
If stuck after 2-3 iterations:
Remove the temporary drafts folder - it has served its purpose:
rm -rf {spec-path}/tmp
FEATURE.md| {YYYY-MM-DD} | [{NN}-{spec-name}](specs/{NN}-{spec-name}/spec.md) | {description} |
git add features/{domain}/{feature}/specs/{NN}-{spec-name}/spec.md
git add features/{domain}/{feature}/specs/{NN}-{spec-name}/checklist.md
git add features/{domain}/{feature}/FEATURE.md
git commit -m "$(cat <<'EOF'
spec({NN}-{spec-name}): add spec and checklist
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Important: Stage specific files, not git add -A.
Confirm with user:
"Spec complete.
Created:
- spec.md: [path] (requirements)
- checklist.md: [path] (tasks for implementation)
- FEATURE.md changelog updated
Next step: Run `implement` skill to build it"