بنقرة واحدة
clean-room
Port a feature from an external git repo into the current project. Clones the repo to a temp folder, drafts a proposal from analysis, then brainstorms and refines the proposal to match the user's choices.
القائمة
Port a feature from an external git repo into the current project. Clones the repo to a temp folder, drafts a proposal from analysis, then brainstorms and refines the proposal to match the user's choices.
Implement tasks from OpenSpec change or conversation plan. Use when the user wants to start implementing, continue implementation, or work through tasks.
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
Autonomous pipeline — assesses work complexity, then runs the appropriate pipeline (Full/Verified/Light) without stopping.
Execute maintenance work directly. Brief mini-plan, then carry out the change.
Shared explore/plan mode behavior for all planning commands (feat, fix, chore, refactor, perf, docs, test, ci, docker). Provides the stance, continuous verification, fluid workflow, subagent protocols, OpenSpec awareness, and guardrails.
Execute UI/UX work directly (refine UI, optimize, fix UX). Reads or bootstraps the project's UI DNA before any change.
| name | clean-room |
| description | Port a feature from an external git repo into the current project. Clones the repo to a temp folder, drafts a proposal from analysis, then brainstorms and refines the proposal to match the user's choices. |
You are planning a clean-room port: lifting a feature from an external git repo into the user's current project. This command runs a draft-first flow — a dedicated subagent analyzes the temp clone AND drafts the complete OpenSpec change upfront, then you handle the brainstorm yourself (under explore-skill stance) by reading the draft and the user's project directly, refining the artifacts in place.
BEFORE PROCEEDING: You MUST use the Skill tool to invoke "explore" unless the caller context explicitly says shared explore mode has already been loaded. Load it once, after Phase 2 completes, so the brainstorm in Phase 3 uses the shared explore behavior (stance, verification, workflow, OpenSpec awareness, guardrails). Do NOT delegate the brainstorm to the Explore subagent — you handle it inline. The explore skill provides the stance; the Explore subagent is not used in this command.
rm -rf one-liner at the end. The user decides when to delete.Parse the user request for:
If a local path was given, skip the clone and treat that path as the source. Otherwise:
mkdir -p /tmp/clean-room
git clone --depth=50 <url> /tmp/clean-room/<repo-slug>-<timestamp>
Deepen the clone (git fetch --unshallow or fetch a specific ref) only if the feature hint points at history older than the shallow window.
Record:
LICENSE, package manifest) — for your go/no-go decision only; do not pass origin identifiers (URL, SHA, fork name) into Phase 2 or any artifactConfirm license compatibility against the user's project license now. Mismatches are a blocker — raise them before Phase 2. The license string itself stays out of the eventual artifacts; only your decision propagates ("proceed" / "abort").
Delegate to the osf-clean-room subagent (Agent tool, subagent_type: "osf-clean-room"). Subagents have no conversation history, so the brief must be fully self-contained. The brief is deliberately minimal to keep origin identifiers out of artifacts:
temp-path — absolute path from Phase 1feature-hint — the user's verbatim descriptionuser-project-root — absolute path to the user's current projectlicense-note — license string + your compatibility decision (the subagent uses this for its own go/no-go gate; it does NOT write it into artifacts)Do NOT pass a source repo URL, commit SHA, fork name, or any other origin identifier in the brief — the subagent must not embed those in its output.
The subagent produces:
This is a draft. Do not treat it as final. Its job is to give the brainstorm a concrete starting point so the user reviews real text instead of imagining the port from scratch.
You handle this phase inline under the explore-skill stance loaded at the top of this command. Do not delegate to the Explore subagent — the draft already encodes the behavior, so your job is to read it, understand the user's project, and refine in place while the explore skill governs how you brainstorm.
Step-by-step:
Read the draft artifacts directly. Read every file in openspec/changes/<name>/ — proposal, design, tasks, and any spec files the subagent produced. Get the full picture before saying anything.
Understand the user's project. Use the codebase-retrieval MCP tool (mcp__auggie__codebase-retrieval) with directory_path set to the workspace root. Ask it focused questions derived from the draft:
openspec list --json for in-flight changes that could conflict.Brainstorm with the user. Present the draft in your own words — capability, behavioral surfaces, test scenarios captured, open questions — alongside what you learned about their project. Lead with the gaps and decisions, not a recap. Walk through these clean-room concerns and lock each one:
Use ASCII diagrams when they help (data flow, placement, dependency graph). Ask clarifying questions when the codebase-retrieval results or the user's preference would change the draft.
Refine the artifacts in place. For every decision locked above, edit the corresponding section of the draft (proposal / design / tasks / specs) so the artifacts reflect the user's choice. Use Edit for targeted changes. When the user picks B over A, the draft text for A is replaced — not annotated.
Hard rules while refining:
Finalize. When all open questions are resolved and the artifacts match the locked choices, remove the "Draft — pending brainstorm review" marker from the proposal. Re-run openspec status --change "<name>" and confirm every artifact is done.
At the end, print:
Temp clone: /tmp/clean-room/<repo-slug>-<timestamp>
Remove when done: rm -rf /tmp/clean-room/<repo-slug>-<timestamp>
Do not run the removal yourself.
The following is the user's request: