用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/shinpr/codex-workflows --skill recipe-front-design命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | recipe-front-design |
| description | Execute from codebase-scoped analysis to frontend design document creation including UI Spec. |
Context: Dedicated to the frontend design phase.
documentation-criteria -- document quality standardsimplementation-approach -- design convergence and verification strategysubagents-orchestration-guide -- agent coordination and review resolutionllm-friendly-context -- document and review handoffsLoad external-resource-context in Step 4 only when a named external source is required for the current design or verification decision.
Spawn rule: every spawn_agent call uses fork_turns="none" so the subagent receives only the task message and explicitly provided context.
Core Identity: Coordinate frontend design, make workflow decisions from compact specialist materials, and invoke specialists for analysis, authoring, and review.
Execution Plan: Reuse the active execution plan. When the workflow has multiple dependent actions and no plan exists, create one that tracks them through final verification.
Execution Method:
Orchestrator spawns agents and passes structured data between them.
Included in this skill:
Responsibility Boundary: This skill completes with approval of the UI Spec, Design Doc, and its preceding ADR when required. Work planning and beyond are outside scope.
Requirements: $ARGUMENTS
Spawn requirement-analyzer with the original requirements. Treat its request signals, scope evidence, cost evidence, and questions as material; the orchestrator determines requirements, scale, UI scope, and ADR routing.
Spawn codebase-analyzer agent: "Analyze the existing codebase to provide compact decision materials for frontend requirement confirmation, ADR selection, minimal Design Doc creation, and verification. requirement_analysis: [Step 1 scopeEvidence]. requirements: [original user requirements]. layer: frontend. target_paths: [Step 1 scopeEvidence.affectedFiles]. focus_areas: component hierarchy, state management, UI interactions, data fetching."
After codebase-analyzer returns, confirm requirements, determine Structural Scale, and collect candidate ADR decision points:
requirement-convergence. The orchestrator builds and judges its record from the user's wording, using Step 1 scope/cost evidence and Step 2 analysis for trade-offs, questions, and routing decisions. Mark an existing but incomplete or scope-mismatched PRD for update; otherwise mark the carrier as absent.decisionMaterials.candidateDecisionPoints within confirmed scope. Final ADR qualification occurs after UI analysis and UI Spec evidence are available.prdRequired when the scale is Large and the current PRD carrier is absent.Present the frontend design scope to the user:
analysisScope.filesAnalyzed and directly relevant components, routes, or modulesanalysisScope.affectedLayersprdRequired is true and whether the convergence carrier is current, requires update, or is absentlimitations and unresolved risksAsk the user to choose one:
prdRequired is trueprdRequired is true and no PRD will be providedIf prdRequired is true and the user neither provides a PRD path nor explicitly approves proceeding without a PRD, stop. This recipe does not create PRDs.
[STOP -- BLOCKING] Wait for user confirmation before proceeding.
After confirmation, record the final scale and carry the candidate decision points forward for final filtering after UI analysis. When the user's answer changes the scope or PRD carrier, recompute the affected values before proceeding. The Choice and Durability filters supply ADR decision points independently of scale. Use the current PRD path as carrier when available; otherwise use the compact convergence object.
After confirmation, when Step 3 marked an existing PRD for update, spawn prd-creator in update mode with that PRD path and the confirmed convergence object. Review the updated PRD with document-reviewer using its path as target, then resolve findings through Review Resolution. After the review permits approval, present the updated PRD for user approval. Continue with its path as the carrier after approval.
[STOP -- BLOCKING when a PRD was updated] Wait for user approval of the updated PRD.
After scope confirmation, identify whether a current UI or verification decision requires evidence unavailable from the repository, supplied artifacts, or a recorded resource. When it does, run the focused hearing from external-resource-context for that exact axis and persist its access method. Ask the user only when the missing access method controls the design decision. Otherwise record no external-resource dependency and continue.
Use prototype code when the user supplied it or the confirmed UI target references it. Ask for a prototype path only when the UI target cannot otherwise be determined and the answer would change the UI specification. In all other cases set prototype_path to unavailable and continue.
Use the prototype path as an input when one was provided; otherwise set prototype_path to unavailable.
Spawn ui-analyzer agent: "Gather UI facts for frontend design. requirement_analysis: { affectedFiles: [confirmed frontend affected files] }. requirements: [Step 3 confirmed current requirements]. target_paths: [confirmed frontend affected files and directories]. target_components: [frontend target components when known]. ui_spec_path: [path if an existing UI Spec covers this feature]. prototype_path: [path if provided]. externalResourceRefs: [{label, featureIdentifier} selected in Step 4, or []]. Analyze component structure, props patterns, CSS layout, sourced state displays, accessibility, generated artifacts, and candidate write set."
After UI fact gathering completes, create the UI Specification:
needs_revision through Review Resolution with ui-spec-designer, then review the updated UI Spec. Route governing-source contradictions through Orchestrator Escalation Resolution before the user approval stop.[STOP -- BLOCKING] Present UI Spec for user approval. CANNOT proceed until user explicitly approves the UI Spec.
Create appropriate design documents from confirmed scope and decision materials:
Start with codebase analysis candidateDecisionPoints, then add a technical choice from UI analysis or the approved UI Spec when its evidence establishes at least two credible materially distinct options. Apply the Choice filter, then the Durability filter, to the complete candidate set.
When the retained array is non-empty, spawn technical-designer-frontend once with document_to_create: ADRBatch, decision_points: [retained array], confirmed requirements, and decision_materials: [only analysis material that changes the options, lifecycle cost, maintainability, or validity of those points]. Review all returned paths[] in one document-reviewer invocation using doc_type: ADRBatch and targets: [all paths]. Apply Review Resolution to the batch, rerun the batch review when an accepted correction changes a file, then present one ADR-batch approval request.
[STOP -- BLOCKING when ADRs were created] Wait for one user approval of the reviewed ADR batch before creating the Design Doc.
Record every approved ADR file as Accepted when ADRs were created. For Design Doc, spawn technical-designer-frontend with document_to_create: DesignDoc, adr_paths: [accepted ADR paths or []], confirmed requirements, approved UI Spec, and decision_materials: [only analysis material that changes reuse, implementation validity, a selected ADR decision, a preserved contract, or verification]. The confirmed requirements define scope, and selected ADR decisions constrain their relevant technical questions.
Spawn code-verifier agent: "Verify Design Doc against code. doc_type: design-doc. document_path: [document path]. verbose: false."
Apply Review Resolution to every code-verifier discrepancy. Pass only the apply discrepancies to technical-designer-frontend in update mode, rerun code-verifier, and carry the resolved verification summary, declines with reasons, and material limitations after the apply set becomes empty.
Review the Design Doc: Spawn document-reviewer agent: "Review the Design Doc for consistency, completeness, and adopted design validity. doc_type: DesignDoc. review_context: creation. target: [Design Doc path]. requirements_verbatim: [original user requirements]. confirmed_requirement_context: [complete confirmed requirement context from Step 3]. decision_materials: [only analysis material that constrains this design]. verification_resolution: [resolved code-verifier evidence]."
Resolve needs_revision through Review Resolution with technical-designer-frontend, then review the updated Design Doc. Route governing-source contradictions through Orchestrator Escalation Resolution. Reach the user approval stop after review succeeds.
[STOP -- BLOCKING] Present the Design Doc and its recorded trade-offs, then obtain user approval. CANNOT proceed until user explicitly approves the design document.
ENFORCEMENT: Every stop point MUST be respected. Skipping user approval invalidates the entire workflow.
Frontend design phase completed.
基于 SOC 职业分类