run-workflow
Orchestrate an approved local ai-workflow from slices through implementation, review, repair, and engineer handoff.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- run-workflow
- description
- Orchestrate an approved local ai-workflow from slices through implementation, review, repair, and engineer handoff.
02 资源文件 6
- 参考文档agents/openai.yaml108 B
- 参考文档references/example-run-summary.md1.6 KB
- 参考文档references/implementation-batching.md4.8 KB
- 参考文档references/review-repair-cycle.md2.5 KB
- 参考文档references/run-summary-template.md4.5 KB
- 参考文档references/worker-prompt-packets.md4.1 KB
03 SKILL.md 正文
Run Workflow
Coordinate an approved local .scratch/<feature-slug>/ workflow across the existing ai-workflow skills. This skill is a local orchestration contract for agents running in capable hosts; it does not replace implement-scope, refactor, review, repair-findings, or pr.
The workflow is vendor-neutral and portable across local Codex, local Claude Code, and future orchestration runtimes. Host-specific sub-agent support is an execution capability, not a required dependency.
Boundaries
This skill never creates commits, branches, pull requests, pull request comments, Jira updates, pushes, workflow transitions, or external workflow side effects. It stops at the local engineer review handoff.
Do not add a terminal CLI, dependencies, host-only scripts, or external automation from this skill contract. Do not turn review or repair-findings into orchestrators.
Required Inputs
Before running workflow mode, confirm:
- One feature root,
.scratch/<feature-slug>/. .scratch/<feature-slug>/execution-plan.mdexists and matches the requested workflow.- One or more approved slice files under
.scratch/<feature-slug>/slices/, either supplied as exact paths or derived from the feature root after validating the execution plan and slice readiness. - Each slice has
Status: ready-for-implementation. - Each slice has
Execution Mode: autonomous. - Each slice has a concrete
Write Boundary,Parallel Safety, andConcurrency Group. - The target checkout is available.
- Dirty-worktree ownership is clear for every implementation and repair boundary.
- The requested change target for review and the PR body is explicit, such as a working-tree diff, staged diff, commit range, branch comparison, or file scope.
Feature-root input is selection input only. If the user supplies only the feature root, derive the approved slice list from the execution plan and ready slice files, then record the exact ordered slice paths in the run summary before implementation starts. Do not auto-sweep every ready slice. Worker dispatch always uses the recorded explicit slice list, and every implement-scope worker receives exactly one explicit slice path.
Reference Files
Load these references before running the corresponding workflow stage:
implementation-batching.mdfor dependency order, write-boundary checks, parallel safety, and concurrency groups.review-repair-cycle.mdfor the default one-pass review and repair flow and explicit post-repair re-review.worker-prompt-packets.mdfor implementation worker, review lane, refactor, repair, and PR body invocation packets.run-summary-template.mdfor the terminal local engineer review handoff.example-run-summary.mdfor a concise run-state and resume example.
If a required reference is missing, stop with BLOCKED before starting that stage.
Capability Discovery
Before serializing implementation in the parent thread, actively discover host sub-agent or multi-agent tooling. A hidden, deferred, unloaded, or undiscovered tool surface is not a valid fallback reason until discovery has been attempted.
If sub-agent support is available, dispatch one implementation worker for every dependency-ready, parallel-safe slice in the current batch. Serialize only for a recorded fallback reason: tooling unavailable after discovery, host policy block, delegation failure, unsafe overlap, dependency order, validation prerequisites, unclear dirty-file ownership, or an explicitly serial slice. Record the discovery mode and any fallback reason in the run summary.
Process
- Confirm workflow mode, feature root, slice selection source, review target, whether a post-repair re-review is explicitly requested, and local output paths.
- Inspect current git state and report tracked modifications plus relevant untracked files.
- Rediscover repo guardrails, validation expectations, nearby skill patterns, and the supplied execution plan.
- Read the execution plan and every supplied or derived slice file fully.
- Validate slice readiness, dependency state, write boundaries, parallel-safety notes, and concurrency groups.
- Record the exact explicit slice list selected for this run before implementation starts.
- Build dependency-ordered implementation batches from the recorded slice list.
- After capability discovery, spawn one fresh-context implementation worker per safe ready slice in the current batch when host sub-agent support is available.
- Instruct every implementation worker to use
implement-scopewith exactly one explicit slice path. - Serialize slices instead of parallelizing when dependencies, write boundaries, validation prerequisites, dirty-worktree ownership, or concurrency groups make overlap unsafe.
- Update run state after each batch with current stage, selected slices, completed batches, blockers, terminal state if any, and next action.
- Collect implementation summaries from
.scratch/<feature-slug>/implementation/. - Run one
refactorpass after all implementation slices complete. Refactor runs once for the complete implemented workflow, not once per slice. - Run review cycle 1 with the existing
reviewcontract and the complete workflow change target. - Prefer one review lane per enabled axis when host sub-agent support is available.
- Use parent-orchestrated review lanes when nested delegation is unavailable: the parent coordinator starts one lane per enabled axis, then supplies those lane results to
reviewasparent-orchestrated-lanes. - If review returns
PASS, skip repair and go to step 21. - If review returns
REPAIR_REQUIRED, run one single-pass, single-agentrepair-findingspass directly from the review summary for automated-repair eligible findings only. - When no post-repair re-review was requested, derive the terminal state from the repair summary: return
PASSonly when every blocking finding is fixed with its focused validation and no human decision or blocker remains; otherwise returnREPAIR_REQUIRED,HUMAN_REQUIRED, orBLOCKEDas supported by the remaining findings. - Run one post-repair review only when the user explicitly requested it. Supply the prior review summary, repair summary, and current change target; use that review's gate status as the terminal state and do not run another repair pass.
- Run
pronce to write.scratch/<feature-slug>/pr-body.mdand present it to the engineer as the local review handoff. This is the only change summary the run produces, andpublish-draft-prreuses it as the PR body. When the terminal state is notPASS, write it only when enough change-target evidence exists, and state the terminal state under Merge Danger and Trace instead of masking it. - Stop on a terminal state and produce or update the local run summary for engineer review.
Review and Repair Loop
The default is one consolidated review and one repair pass over the current workflow change target. Use review-repair-cycle.md for repair eligibility, terminal-state evidence, and explicit post-repair re-review rules.
Repair is single-pass and single-agent for the first version. Do not fan out repair or repair outside automated-repair eligible findings inside the approved repair boundary.
Terminal States
Use these top-level workflow states:
PASS: review found no required repair, validation gap, or human decision blocking local engineer review, or a repair summary confirms every blocking finding was fixed with focused validation and no blocker remains.REPAIR_REQUIRED: automated-repair eligible findings remain after repair or repair was not run.HUMAN_REQUIRED: a product, architecture, security, policy, dependency, scope, authorization, or external-workflow decision is required.BLOCKED: required inputs, checkout access, safe ownership, validation, or host capabilities are missing.
After any terminal state, stop at the local engineer review handoff. Do not proceed to commits, branches, pull requests, pull request comments, Jira updates, pushes, or external workflow actions.
Run State and Resume
Keep .scratch/<feature-slug>/orchestration/run-summary.md current enough that an interrupted local run can be inspected before resuming. At minimum, record run state, current stage, current cycle, selected explicit slice paths, completed implementation batches, blockers, terminal state when reached, and next action.
Resume from the first incomplete stage whose required input artifacts are missing or blocked. Before resuming, re-check git state, dirty-file ownership, slice readiness, and artifact paths. Do not infer new slices from the feature root after implementation has started; use the recorded explicit slice list unless a human supplies and approves a replacement list.
Handoff
At handoff, report:
- Status and terminal state.
- Feature root, slice selection source, and explicit slice paths processed.
- Implementation batches and any serialization decisions.
- Implementation summaries, feature-level refactor summary, review summaries, repair summaries, the
pr-body.mdhandoff, andorchestration/run-summary.mdartifact paths. - Review execution mode:
delegated-lanes,parent-orchestrated-lanes,single-agent-fallback, orblocked. - Validation evidence and commands actually run.
- Repair outcomes, deferred findings, unresolved repair queue, and human-required decisions.
- Confirmation that changes remain uncommitted and external workflow side effects were not performed.
04 同仓库更多 Skills
ui-ux-pro-max
UI/UX design intelligence for web and mobile. Local database with 79 searchable styles (88 catalog entries), 192 color palettes, 74 font pairings, 192 product types, 119 UX guidelines, 105 curated icon entries, 17 GSAP motion presets, and 25 chart types across 22 stacks (React, Next.js, Vue, Nuxt, Svelte, Astro, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, Jetpack Compose, Angular, Laravel, JavaFX, WPF, WinUI, Avalonia, Uno Platform, UWP, Three.js, and HTML/CSS). Use when designing, building, or reviewing UI: pages, components, color schemes, typography, layout, accessibility, animation, or data visualization.
figma-mcp
Implement or compare UI against Figma designs using an available Figma MCP integration. Use for Figma-backed implementation, design-token extraction, or visual-parity gap analysis; Figma MCP access is optional and must already be configured by the user.
improve-codebase-architecture
Find evidence-based, active-change architecture improvements using shared design and domain-modeling guidance. Use when a user wants to reduce architectural friction, deepen a module, or make a current change safer, more testable, and easier to navigate.
domain-modeling
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing GLOSSARY.md or CONTEXT.md, or recording or editing an ADR.
codebase-design
Provide the shared vocabulary and discipline for designing deep modules with clear interfaces and seams. Use when a user wants to design or improve a module, find deepening opportunities, choose a seam, or make code more testable and AI-navigable.
test-coverage-review
MUST invoke to review whether added or updated tests cover code changes in a diff. Checks new logic, branches, error paths, and regression risk, producing a change-to-test matrix. Use requirements-to-tests-traceability for acceptance-criteria mapping and orchestrated-review for bundled reviews.