recipe-front-build
GitHub前端构建编排技能,负责解析工作流计划并自主执行前端任务文件。通过子代理协调交付物生产,严格执行执行、分支判断、质量修复及提交循环,确保前端代码质量与流程自动化。
触发场景
安装
npx skills add shinpr/claude-code-workflows --skill recipe-front-build -g -y
SKILL.md
Frontmatter
{
"name": "recipe-front-build",
"description": "Execute materialized frontend task files in autonomous execution mode",
"disable-model-invocation": true
}
Execute Skill: llm-friendly-context before writing Agent prompts, handoffs, or generated artifacts. Execute Skill: subagents-orchestration-guide before making workflow decisions, invoking agents, or resolving findings.
Orchestrator Definition
Core Identity: "I am an orchestrator." (see subagents-orchestration-guide skill)
Local authority gate: Make this recipe's workflow decisions and validate each returned result directly; delegate semantic deliverable production to the named specialist.
Review Resolution Gate [MANDATORY]: Resolve every actionable deliverable-review finding through subagents-orchestration-guide Review Resolution before correction or progression; include declined IDs with governing reasons and evidence in the final user report.
Before the first finding disposition, read references/review-resolution.md from the loaded subagents-orchestration-guide skill.
Execution Protocol:
- Invoke named specialists for deliverable production — pass deliverable paths between them and validate their results (see subagents-orchestration-guide "Orchestrator Execution Boundary")
- Follow the 4-step task cycle exactly: execute → branch on executor result → quality-fix → commit
- Enter autonomous mode when user provides execution instruction with existing task files — this IS the batch approval
- Scope: Complete when all tasks are committed or escalation occurs
CRITICAL: Run quality-fixer-frontend before every commit.
Work plan: $ARGUMENTS
Pre-execution Prerequisites
Work Plan Resolution
Before any task processing, locate the work plan. Resolution rule:
- List task files in
docs/plans/tasks/matching the single-layer pattern{plan-name}-task-*.md. Layer-aware fullstack tasks ({plan-name}-backend-task-*.md/{plan-name}-frontend-task-*.md) are excluded here so a stale fullstack run does not redirect this recipe to the wrong work plan - For each matched file, extract the
{plan-name}prefix as the segment that appears before-task- - When at least one task file matches, the work plan is
docs/plans/{plan-name}.mdfor the prefix that has the most recent task-file mtime; ties broken by the lexicographically last{plan-name} - When no task file matches the restricted pattern, the work plan is the most-recent-mtime non-template
.mdindocs/plans/
Consumed Task Set
Compute the Consumed Task Set for this run — the exact files this recipe owns, executes, and later deletes. Use the same restricted pattern as Work Plan Resolution:
- List task files in
docs/plans/tasks/matching the single-layer pattern{plan-name}-task-*.mdfor the{plan-name}resolved by Work Plan Resolution. Layer-aware fullstack tasks are excluded
Every subsequent reference to "task files" in this recipe — Task Generation Decision Flow, Task Execution Cycle iteration, and Final Cleanup — uses this set, not the unrestricted docs/plans/tasks/*.md glob.
Task Generation Decision Flow
Analyze the Consumed Task Set and determine the action required:
| State | Criteria | Next Action |
|---|---|---|
| Tasks exist | Consumed Task Set is non-empty | User's execution instruction serves as batch approval → Enter autonomous execution immediately |
| No tasks + plan exists | Consumed Task Set is empty but the resolved work plan exists | Confirm with user → run task-decomposer |
| Neither exists + Design Doc exists | No plan, no Consumed Task Set, but docs/design/*.md exists |
Invoke work-planner to create a work plan, then run document-reviewer (dev-workflows-fullstack:document-reviewer, doc_type: WorkPlan). Run Review Resolution through its correction re-review, escalation, and convergence transitions, using work-planner for rerouted corrections; then present the resolved plan for batch approval before task materialization |
| Neither exists | No plan, no Consumed Task Set, no Design Doc | Report missing prerequisites to user and stop |
Task Materialization Phase (Conditional)
When the Consumed Task Set is empty:
1. User Confirmation
No task files in the Consumed Task Set.
Work plan: docs/plans/[plan-name].md
Generate tasks from the work plan? (y/n):
2. Task Materialization (if approved)
Invoke task-decomposer using Agent tool:
subagent_type: "dev-workflows-fullstack:task-decomposer"description: "Materialize work plan tasks"prompt: "Read work plan at docs/plans/[plan-name].md and output individual single-commit task files in docs/plans/tasks/."
3. Verify Generation
Recompute the Consumed Task Set using the same restricted pattern from the Consumed Task Set section above. Confirm it is now non-empty. If it is still empty, escalate to the user — task-decomposer either failed silently or produced files that don't match the expected pattern.
Flow: Task generation → Consumed Task Set recompute → Autonomous execution (in this order)
Pre-execution Checklist
- Confirmed Consumed Task Set is non-empty (computed in the Consumed Task Set section above)
- Identified task execution order within the Consumed Task Set (dependencies)
- Environment check: Can I execute per-task commit cycle?
- If commit capability unavailable → Escalate before autonomous mode
- Other environments (tests, quality tools) → Subagents will escalate
Task Execution Cycle (4-Step Cycle)
MANDATORY EXECUTION CYCLE: execute → branch on executor result → quality-fix → commit
Before the loop, register "Execute consumed task set", "Run post-implementation verification", "Clean up consumed task files", and "Report completion" once with TaskCreate; mark and advance the active phase with TaskUpdate.
For EACH task in the Consumed Task Set, YOU MUST:
- EXECUTE: invoke Agent tool (subagent_type: "dev-workflows-fullstack:task-executor-frontend") → Record the current HEAD as
diffBase, pass the task file path in the prompt, and receive the structured response - BRANCH ON EXECUTOR RESULT:
status: "escalation_needed"or"blocked"→ STOP and escalate to userrequiresTestReviewistrue→ Invoke integration-test-reviewer withdiffBase, changed integration/E2E paths,taskFile, prompt-only claims, andmutationEvidenceapproved→ Proceed to step 3blocked→ STOP and escalate to userneeds_revision→ Run the Review Resolution Gate through its correction re-review, escalation, and convergence transitions; return to step 1 for rerouted corrections and proceed to step 3 only at convergence
readyForQualityCheck: true→ Proceed to step 3
- QUALITY-FIX: Invoke quality-fixer-frontend with
task_file, upstreammutationEvidence, andqualityCommandwhen available (caller first, otherwise current task)stub_detected→ Return to step 1 withincompleteImplementations[]detailsblocked→ STOP and escalate to userapproved→ Proceed to step 4
- COMMIT: Execute git commit after quality-fixer-frontend returns
approved
CRITICAL: Parse every sub-agent response for status fields. Execute the matching branch in the 4-step cycle. Proceed to next task only after quality-fixer-frontend returns approved.
Scope Boundary for Subagents
Append the following block to every subagent prompt invoked from this recipe:
Scope boundary for subagents:
Operate within the task scope and referenced files in the prompt.
Use loaded skills to execute that scope.
Escalate when the required fix or investigation falls outside that scope.
Verify task files exist per Pre-execution Checklist, then enter autonomous execution mode. When requirement changes are detected during execution, escalate to the user with the change summary before continuing.
Post-Implementation Verification (After All Tasks Complete)
Resolve the Work Plan's readable Design Doc; missing input blocks verification.
Emit these Agent calls in one assistant message, then await both:
- code-verifier (subagent_type: "dev-workflows-fullstack:code-verifier") → resolved
doc_type,document_path, andcode_pathsfromgit diff --name-only main...HEAD - security-reviewer (subagent_type: "dev-workflows-fullstack:security-reviewer") → the same typed
governingDocumentsandimplementationFiles
Apply subagents-orchestration-guide's Post-Implementation Verification pass/fail and fix/re-run rules with the frontend executor and quality-fixer. Present the unified report; proceed to Final Cleanup after both pass.
Final Cleanup
Before the completion report, delete the implementation task files this recipe consumed. Their work is committed; docs/plans/ is ephemeral working state and is not retained between recipe runs:
- Delete every file in the Consumed Task Set
- Preserve the work plan itself (
docs/plans/{plan-name}.md) — the user decides whether to delete it after final review
If task files cannot be deleted (filesystem error), report the failure but do not block the completion report.
Completion Report Contract
Final report must include:
- Task materialization status
- Implemented task count
- Quality check result
- Commit count
- Cleanup result
- Declined actionable findings with ID, governing reason, and evidence
- Escalation or blocking summary, if any
版本历史
-
51b7dbc
当前 2026-08-05 01:45
新增强制性的审查决议门控,要求在执行修正前通过子代理解决所有可操作的审查发现;简化规划逻辑并收敛审查流程。
-
d439b50
2026-07-31 02:52
重构以集中化工作流任务边界,对齐编排周期契约与最终验证器并发逻辑,最小化提示词并完善工作流提示合同审查。
-
56ab6c1
2026-07-19 22:43
重构:改进提示词执行指导
- 66e3b29 2026-07-05 11:59


