--- name: GudaSpec: Implementation description: Execute approved OpenSpec changes via multi-model collaboration with Codex/Gemini. category: GudaSpec tags: [openspec, implementation, multi-model, codex, gemini] --- **Guardrails** - If the project is detected to lack `./openspec/` dir, prompt the user to initialize the project using `/gudaspec:init`. - Never apply external model prototypes directly—all Codex/Gemini outputs serve as reference only and must be rewritten into readable, maintainable, production-grade code. - Keep changes tightly scoped to the requested outcome; enforce side-effect review before applying any modification. - Minimize documentation—avoid unnecessary comments; prefer self-explanatory code. **Steps** 1. Run `openspec view` to inspect current project status and review `Active Changes`; Use `AskUserQuestions` tool ask the user to confirm which proposal ID they want to implement and wait for explicit confirmation before proceeding. 2. Run `/opsx:apply ` and then follow it. 3. When performing a specific coding task, refer to the code prototype provided by an effective model: - **Route A: Gemini Kernel** — `mcp__gemini__gemini` tool for frontend/UI/styling tasks (CSS, React, Vue, HTML, component design). - **Route B: Codex Kernel** — `mcp__codex__codex` tool for backend/logic/algorithm tasks (API, data processing, business logic, debugging). - **Mandatory constraint**: When communicating with Codex/Gemini, the prompt **must explicitly require** returning a `Unified Diff Patch` only; external models are strictly forbidden from making any real file modifications. 4. Upon receiving the diff patch from Codex/Gemini, **NEVER apply it directly**; rewrite the prototype by removing redundancy, ensuring clear naming and simple structure, aligning with project style, and eliminating unnecessary comments. 5. For each completed task, conduct multi-model reviews using Codex`mcp__codex__codex` / Gemini`mcp__gemini__gemini`, requiring iterative reviews until receiving dual-model **LGTM approval**. 6. MUST follow the `/opsx:apply `.