plugins/exploration-cycle-plugin/skills/subagent-driven-prototyping/SKILL.md
Builds a prototype component by component, self-reviewing each component against the Discovery Plan before moving to the next. Invoked by prototype-builder after the layout direction is confirmed. Trigger phrases: "build the prototype", "let's build it", "start building". Also invoked by prototype-builder-agent after visual-companion confirms layout.
npx skillsauth add richfrem/agent-plugins-skills subagent-driven-prototypingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Architectural patterns adapted from obra/superpowers (MIT)
Before doing anything else, silently check for exploration/exploration-dashboard.md.
If the file EXISTS: Read it silently and check the **Status:** line.
**Status:** Complete → the prior session has ended. Proceed with this skill's
standalone flow as normal."It looks like you have an active Exploration Session in progress. Let me take you back to your session dashboard so we can keep your progress on track." Return to the orchestrator. Use the Skill tool:
skill: "exploration-workflow". After invoking it, stop generating output from this skill — do not continue below.
If the file does NOT exist: Proceed with this skill's standalone flow as normal.
If dispatched by exploration-workflow, the Discovery Plan and layout direction have
already been approved by the SME. The Required Inputs Check below is a verification
step only — do not re-present these artifacts for re-approval. Proceed directly to
Component Decomposition once inputs are confirmed present.
Required: The
orba/superpowersplugin must be installed.
This skill invokes superpowers execution discipline skills during the build loop.
Before building, check if a worktree/feature branch was set up by the orchestrator.
If not, and the session type is brownfield or greenfield, invoke
superpowers:using-git-worktrees now to create one.
Read the **Dispatch Strategy:** field from the dashboard. Use it to determine how to
dispatch component implementation:
copilot-cli: Use copilot-cli-agent skill. Simple components → gpt-5-mini (free).
Complex/multi-file components → claude-sonnet-4-6 (batch into one dense request —
charged per request, not per token).claude-subagents: Use the Agent tool. Mechanical components → model: "haiku".
Complex components → model: "sonnet".direct: Build each component directly in this session.After each component is built, invoke superpowers:requesting-code-review twice:
For copilot-cli and claude-subagents dispatch: use a separate sub-agent for each review.
For direct mode: self-review both stages before proceeding.
Even prototypes must be verified against the Discovery Plan — the prototype is the evidence that exploration captured the right thing. Unverified prototypes lead to flawed handoffs and wrong specs.
For code-producing sessions, invoke superpowers:test-driven-development for each
component: write a failing test that verifies a Discovery Plan requirement → verify
failure → implement → refactor.
After all components are built, invoke superpowers:finishing-a-development-branch:
verify tests pass, then present merge/PR options to the SME.
Before doing anything else, verify the following:
.md file in exploration/discovery-plans/. If missing, stop and report what needs to happen first.[~] (skipped), layout-direction.md will not exist, and that is correct. Proceed without it, using the Discovery Plan's success criteria to guide visual decisions. Only if Phase 2 was enabled ([x] or [ ]) is exploration/captures/layout-direction.md required.Read exploration/exploration-dashboard.md and check the **Session Type:** field:
exploration/prototype/. Follow the standard Build Loop below.exploration/prototype/components/ as .md files for tracking.⚠️ HARD CONSTRAINT — read before touching any file.
Before entering the Build Loop, check the Discovery Plan's Intervention Type field:
If Agent Plugin Mode is detected:
Redirect the build path away from exploration/prototype/.
Build to plugins/[plugin-name]/ at the project root — NOT exploration/prototype/.
Announce: "Since we're building an Agent Plugin, I'll scaffold it into plugins/[plugin-name]/ using the standard plugin structure."
MUST use the ecosystem scaffolding tools — no raw mkdir, no hand-crafted markdown.
You are prohibited from creating plugin directories or skill files with raw bash commands (mkdir, manual file writes).
Instead, invoke the .agents/skills/create-plugin and .agents/skills/create-skill skills from the local agent-scaffolders plugin:
Skill: create-plugin
Skill: create-skill
These enforce eval harnesses, directory templates, frontmatter standards, and plugin.json registration. Bypassing them produces non-compliant plugins that will fail audit.
After the create-plugin scaffold is complete, ensure every generated skill and agent is wired into .claude-plugin/plugin.json. See the plugin.json Binding Check in the Assembly section below.
After all components are built, run: /agent-scaffolders:audit-plugin to verify structural compliance before marking Phase 3 complete.
If NOT Agent Plugin Mode: Follow the standard Greenfield or Brownfield build path below.
Based on the Discovery Plan and layout direction (if available), identify 3–6 logical components. Use plain-language names the SME will understand (e.g., "top navigation bar", "summary panel", "request form", "approval confirmation screen") — not technical terms.
Announce:
"I'll put this together in [N] parts. I'll check each one before moving to the next to make sure it matches our plan."
List the components by name so the SME knows what is being built.
For Brownfield sessions, also announce:
"I'll build these directly into your existing codebase, matching the patterns I see in [framework/stack]."
For each component, in order:
exploration/prototype/components/[descriptive-name].[ext].md summary to exploration/prototype/components/[descriptive-name].md documenting what was built and where.COMPLETE — component matches the plan and is readyBLOCKED — something is preventing completion (missing data, contradictory requirements, etc.)NEEDS_CONTEXT — a specific question must be answered before the component can be finishedCOMPLETE.Report each completed component to the user:
"Done — [component name] is done."
After all components reach COMPLETE status:
Greenfield:
exploration/prototype/index.html (or an equivalent entry point that links all components together)exploration/prototype/README.md with run instructions in plain languageBrownfield:
exploration/prototype/README.md documenting:
Agent Plugin Mode — plugin.json Binding Check (MANDATORY before completion):
.claude-plugin/plugin.json in the built plugin directory.skills/, verify its entry appears in the skills list in plugin.json.agents/, verify its entry appears in the agents list in plugin.json.commands/, verify its entry appears in the commands list in plugin.json.hooks/, verify its entry appears in the hooks list in plugin.json.plugin.json: Add it now. Do NOT wait for the SME to notice.plugin.json. ✅" or list any additions made.This check is non-optional. A plugin with unregistered components is a broken plugin.
Announce: "Your prototype is ready — Phase 3 is complete."
If operating within an active Exploration Session (i.e., exploration/exploration-dashboard.md
exists and **Status:** is not Complete):
"Your prototype is ready for review. Please click the index.html link above to test it." "Once you approve the layout and logic, you must push us to the next phase to generate your formal User Stories and API Specs." "Please reply with exactly: 'Return to dashboard and start Phase 4 Handoff'"
After the user provides the confirmation phrase, output this machine-readable block:
## HANDOFF_BLOCK
PHASE: 3
STATUS: COMPLETE
OUTPUT: exploration/prototype/index.html
SESSION_TYPE: [Greenfield / Brownfield / Agent Plugin]
COMPONENTS_BUILT: [count]
WORKTREE: [branch name if worktree was created, or "none"]
If operating standalone (no dashboard file, or **Status:** Complete), the skill is complete.
Report back to prototype-builder: all components are built, the entry point is at
exploration/prototype/index.html, and the prototype is ready for the SME walkthrough.
superpowers:using-git-worktrees was already called by the orchestrator, calling it again creates a nested worktree. Check if a worktree branch already exists before invoking the setup skill..md tracking files go to exploration/prototype/components/. If the session is later revisited, these stale .md files may describe code that has since been refactored. Mark tracking files with the build date.direct mode the self-review is supposed to run twice (plan alignment + quality). In practice only one pass is done. Explicitly label and separate the two review purposes when self-reviewing.Throughout this skill, always use plain language in user-facing text:
tools
Ingests repository files into the ChromaDB vector store. Builds or updates the vector index from a manifest or directory scan using ingest.py. Use when new files need to be indexed or the vector store is out of date. <example> user: "Index these new plugin files into the vector database" assistant: "I'll use vector-db-ingest to add them to the vector store." </example> <example> user: "The vector store is missing recent files -- update it" assistant: "I'll use vector-db-ingest to re-index the changes." </example>
data-ai
Removes stale and orphaned chunks from the ChromaDB vector store for files that have been deleted or renamed. Use after files are removed or moved to keep the vector index in sync with the filesystem. <example> user: "Clean up the vector store after I deleted some files" assistant: "I'll use vector-db-cleanup to remove orphaned chunks." </example> <example> user: "The vector database has chunks for files that no longer exist" assistant: "I'll run vector-db-cleanup to prune them." </example>
testing
Audit Vector DB coverage -- compares the live filesystem manifest against the ChromaDB index to identify coverage gaps.
development
3-Phase Knowledge Search strategy for the RLM Factory ecosystem. Auto-invoked when tasks involve finding code, documentation, or architecture context in the repository. Enforces the optimal search order: RLM Summary Scan (O(1)) -> Vector DB Semantic Search -> Grep/Exact Match. Never skip phases.