npx claudepluginhub metasaver/metasaver-marketplace --plugin core-claude-pluginWant just this command?
Then install: npx claudepluginhub u/[userId]/[slug]
Build features with TDD workflow using sequential-thinking and full agent chain
Build Command
Execute builds through sequential-thinking planning and complete agent chain workflow.
Use when: You know what you want to build. For exploration/planning, use /architect instead.
Entry Handling
When /build is invoked, ALWAYS proceed to Phase 1 regardless of prompt content.
Phase 1: Planning (Sequential Thinking)
Use: sequential-thinking MCP tool
Plan the approach using sequential-thinking MCP tool:
- Analyze the prompt to understand scope and requirements
- Identify target repositories and reference patterns
- Outline high-level implementation strategy
- Note potential risks and dependencies
This creates the mental model for the full workflow.
Phase 2: Analysis
Follow: /skill analysis-phase
Spawn scope-check agent to identify target and reference repositories. Use scope-check agent results directly. Proceed with identified targets immediately.
Output: scope: { targets[], references[] }
Phase 3: Requirements
Follow: /skill requirements-phase
EA uses AskUserQuestion until 100% understanding, then creates PRD:
Enterprise Architect (EA) → AskUserQuestion loop until fully understood
→ Creates PRD (prd-creation skill)
→ Reviewer → validates PRD (document-validation)
→ (fix if needed, loop back to EA)
→ Business Analyst (BA) → extracts epics and story outlines
Skills used internally:
/skill prd-creation(EA creates PRD)/skill document-validation(Reviewer validates)
Output: PRD + Epics + Story outlines (NO HITL - continues to Design)
Enforcement Gate (MANDATORY):
- Call
checkPhaseRequirements(projectFolder, 3)from/skill state-management - Verify
prd.mdexists in project folder - Spawn reviewer agent for PRD validation
- On FAIL: Loop back to EA for PRD creation/fixes
- On PASS: Continue to Phase 4 (Design)
Phase 4: Design
Follow: /skill design-phase
Agents use AskUserQuestion for any clarifications, then create all docs:
Architect → annotates PRD with implementation details
→ BA → creates story outlines
→ PM → creates execution plan (execution-plan-creation)
→ Reviewer → validates execution plan (document-validation)
→ (fix if needed, loop back to PM)
→ BA → fills story details (user-story-creation)
→ Architect → adds Architecture sections
→ Reviewer → validates stories (document-validation)
→ (fix if needed, loop back to BA)
Skills used internally:
/skill execution-plan-creation(PM creates plan)/skill user-story-creation(BA fills stories)/skill document-validation(Reviewer validates)
Output: Execution plan + Complete user stories (NO HITL - continues to Approval)
Enforcement Gate - Execution Plan (MANDATORY):
- Call
checkPhaseRequirements(projectFolder, 5)from/skill state-management - Verify
execution-plan.mdexists in project folder - Spawn reviewer agent for plan validation
- On FAIL: Loop back to PM for execution plan creation/fixes
- On PASS: Continue to story creation
Enforcement Gate - User Stories (MANDATORY):
- Call
checkPhaseRequirements(projectFolder, 6)from/skill state-management - Verify
user-stories/folder is populated (at least 1 file) - Spawn reviewer agent for stories validation
- On FAIL: Loop back to BA for story creation/fixes
- On PASS: Continue to Phase 5 (HITL Approval)
Phase 5: HITL Approval
Follow: /skill hitl-approval
SINGLE approval gate for all documentation:
Present to user:
- PRD summary (from Phase 3)
- Execution plan summary (waves, dependencies)
- User stories summary (count, complexity)
Use AskUserQuestion:
- APPROVE → Continue to Execution
- REJECT → Collect feedback, return to appropriate phase (Requirements or Design)
Phase 6: Execution
Follow: /skill execution-phase
TDD-paired wave-based execution:
- Load execution plan (waves with dependencies)
- For each wave:
- Update workflow state
- Run
/compactto free context - Spawn tester agent (writes tests from AC)
- Spawn implementation agent (passes tests)
- Production verification (tests pass, AC marked)
- Waves execute continuously with state persistence
Wave Checkpoint Flow:
- Wave N agents complete their stories
- Quick log -
/skill workflow-postmortem mode=log(30 seconds max) - Compact context - Run
/compactto manage context window - Proceed to Wave N+1
Phase 7: Validation
Follow: /skill validation-phase
- Verify all acceptance criteria marked complete
- Run build/lint/test (pnpm build, pnpm lint, pnpm test)
- Run code quality checks scaled by change size
On failure: Return to Execution for fixes.
Phase 8: Standards Audit
Follow: /skill structure-check, /skill dry-check
Three checks (PARALLEL):
- Structure Check: Validate files in correct locations per domain
- DRY Check: Scan new code against shared libraries
- Config Audit: For modified config files, spawn appropriate config agents from
agents/config/in audit mode
On failure: Return to Execution for fixes, re-run Validation, re-run Standards Audit, loop until pass.
Phase 9: Final Workflow Postmortem
Follow: /skill workflow-postmortem mode=summary
Run /skill workflow-postmortem mode=summary to generate final summary. This reads the accumulated wave logs from docs/epics/{project}/post-mortem.md and presents a summary to the user.
Output: Summary of issues logged across waves (count by category, patterns identified).
Phase 10: Report
Follow: /skill report-phase
BA + PM produce final build report with:
- Summary of changes
- Files modified
- Tests added
- Standards audit results
- Workflow postmortem
- Next steps
Examples
/build "add logging to service"
→ Planning → Analysis → Requirements (EA asks questions → PRD → Reviewer) → Design (Architect → BA → PM → Reviewer) → HITL (approve all docs) → Execution → Validation → Standards Audit → Postmortem → Report
/build "refactor auth module"
→ Planning → Analysis → Requirements → Design → HITL → Execution (waves) → Validation → Standards Audit → Postmortem → Report
/build "multi-tenant SaaS"
→ Planning → Analysis → Requirements → Design → HITL → Wave1 → Wave2 → ... → Validation → Standards Audit → Summary → Report
# Wave checkpoint flow (no HITL between waves):
Wave1: Task(spawn tester) → Task(spawn coder) → /skill workflow-postmortem mode=log → /compact
Wave2: Task(spawn tester) → Task(spawn coder) → /skill workflow-postmortem mode=log → /compact
End: /skill workflow-postmortem mode=summary → Report
# Spawning agents with Task tool:
Task: subagent_type="core-claude-plugin:generic:tester" prompt="Execute /skill tdd-execution for story X"
→ (tester creates test file)
Task: subagent_type="core-claude-plugin:generic:coder" prompt="Implement against tests from story X"
→ (coder implements feature)
Enforcement
- Frame all instructions positively. State what to do.
- ALWAYS run sequential-thinking MCP tool first to plan approach.
- ALWAYS run full workflow: Planning → Analysis → Requirements → Design → HITL → Execution → Validation → Standards Audit → Postmortem → Report
- Requirements phase: EA uses AskUserQuestion until fully understood, then creates PRD → Reviewer validates → BA extracts stories (NO HITL)
- Design phase: Architect → BA → PM → Reviewer validates all docs (NO HITL - continues to single HITL gate)
- SINGLE HITL GATE: After all docs created (PRD, execution plan, stories), present summary and get approval
- TDD execution: ALWAYS run tester BEFORE coder per story.
- ALWAYS use Task tool to spawn tester agent first, then coder agent for implementation work.
- ALWAYS spawn agents for implementation - the orchestrator tracks progress while agents write code.
- Standards Audit: ALWAYS run AFTER Validation passes.
- ALWAYS run build/lint/test after execution.
- WAVE CHECKPOINT TIMING: ALWAYS run
/skill workflow-postmortem mode=logBEFORE compact at each wave checkpoint. - POSTMORTEM LOG ACCUMULATION: Each wave log appends to
docs/epics/{project}/post-mortem.md. - ALWAYS run
/skill workflow-postmortem mode=summaryAFTER Standards Audit, BEFORE Report. - ALWAYS produce final report with workflow postmortem section.
- When files modified, spawn agent:
subagent_type="general-purpose"with prompt "Execute /skill repomix-cache-refresh" - Use AskUserQuestion tool for clarifications during Requirements and Design phases.
- Use
/architectcommand for innovation or vibe check workflows. - Git operations are outside workflow scope. Changes remain uncommitted for user to handle.
- PHASE GATE - PRD: ALWAYS call
checkPhaseRequirements(projectFolder, 3)after Requirements phase. Verifyprd.mdexists before continuing to Design. - PHASE GATE - EXECUTION PLAN: ALWAYS call
checkPhaseRequirements(projectFolder, 5)after execution plan creation. Verifyexecution-plan.mdexists before story creation. - PHASE GATE - USER STORIES: ALWAYS call
checkPhaseRequirements(projectFolder, 6)after story creation. Verifyuser-stories/folder is populated before HITL Approval. - GATE FAILURE HANDLING: On gate failure, loop back to the producing agent (EA for PRD, PM for plan, BA for stories) and retry until artifact exists.
- GATE VALIDATION: Use
/skill state-managementfor allcheckPhaseRequirementscalls.
Other plugins with /build
/buildPackage generated wiki pages into a VitePress site with dark theme, dark-mode Mermaid diagrams, and click-to-zoom
/buildBuild static documentation site for deployment. Validates docs first, auto-fixes issues, auto-setup on first run. Outputs production-ready HTML/CSS/JS.