一键导入
execute-steps
Use when a skill needs step tracking, progress visibility, and resume support within a single phase. Called by skills, not directly by users.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when a skill needs step tracking, progress visibility, and resume support within a single phase. Called by skills, not directly by users.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when breaking down a project phase into stories with acceptance criteria, creating ADRs, or planning infrastructure work. Triggers on /plan, story breakdown, detailed plan, architecture doc.
Use when generating, editing, or merging Low-Level Design (LLD) documents at `docs/lld/<component>.md` or `docs/shield/<feature>/lld-<component>.md`. Triggers on /lld command (Path A) and on /plan TRD-driven authoring (Path B, M2 plan). Owns the backend and infra templates, atomic write, provenance stamp, and §14 Changelog convention.
Use when authoring a new PRD or upgrading a lean PRD to standard. Walks user through 20-section problem-first scaffold (or 10-section lean), pre-populates from prior /research transcript if present, defers Terminologies (§2) until after the rest is drafted (auto-fills from research glossary + scan of body), invokes shield:story-coverage between Sections 6 and 8 and shield:milestone-coverage between Sections 8 and 15, prompts for story Type (new/enhancement/existing), supports custom team templates via .shield.json. Triggers on /prd, write a PRD, author a PRD.
Use when the user invokes /backlog or asks to capture, view, promote, or remove an idea from the project backlog at docs/shield/backlog.json. Triggers on /backlog add|view|remove|promote and on agent-side "capture this as a backlog entry" calls during research/PRD/plan/implement flows.
Use when a plan, architecture doc, or execution plan exists and needs expert review before implementation. Produces a scored analysis with a P0-gated verdict and an enhanced plan. Triggers on /plan-review, review my plan, document review.
Use when a PRD exists (file, paste, URL) and needs gap analysis. Dispatches PM, agile-coach, tech-lead, DX, cost reviewer agents in parallel against a 13-dimension rubric; produces scored summary with severity-tiered gaps and P0-gated verdict. Triggers on /prd-review, review my PRD, PRD gap analysis.
| name | execute-steps |
| description | Use when a skill needs step tracking, progress visibility, and resume support within a single phase. Called by skills, not directly by users. |
Thin step-tracking utility for individual Shield skills. Each skill defines a fixed skeleton of mandatory steps, then drives shield/scripts/steps_store.py to register them and update status. The script writes steps.json to the exact path the session-start hook reads, so an interrupted run can be offered for resume.
This is NOT a cross-phase orchestrator. Each skill calls the script independently for its own work.
Never hand-write steps.json with the Write tool. Always go through steps_store.py — it computes the correct path and the correct schema. Hand-writing puts the file where the hook can't find it.
Run with uv run shield/scripts/steps_store.py <cmd>. The script resolves the path itself — pass no path.
| Lifecycle Hook | Command |
|---|---|
| Startup | read first → if it returns an incomplete doc, offer resume or fresh; then init --skill <name> --feature <slug> --steps-json '<json array>' |
| Before step | start <id> |
| After step | complete <id> [--output <path>] — or fail <id> → stop |
| All done | clear |
The --steps-json array holds the skeleton — each step is {"id": N, "action": "...", "mandatory": true}. Conditional steps add "mandatory": false; init defaults status to pending and mandatory to true. See --help for all flags.
steps_store.py resolves it to ${SHIELD_HOME:-~/.shield}/projects/<project>/steps.json, where <project> comes from the nearest .shield.json. This is the path the session-start hook reads. You do not compute or type this path — the script does.
On resume, the session-start hook shows: Incomplete: research phase (step 2/5 — Research agents). Run the skill command to resume. The skill then runs read and asks: "Resume from step 2 or start fresh?"
"mandatory": false) evaluate their condition at startup and are omitted from the init skeleton if not met| Mistake | Fix |
|---|---|
Hand-writing steps.json with the Write tool | Always use steps_store.py — it owns the path and schema |
Typing the path yourself (e.g. ~/.shield/shield/<project>/) | Never type the path — the script resolves it. The literal shield/<project> form is wrong; the hook reads projects/<project> |
| Skipping mandatory steps because "the context is clear enough" | Mandatory steps always run — conditions only apply to non-mandatory steps |
Not running read before init | Always check first — an interrupted run should be offered for resume |
Leaving steps.json after all steps complete | Run clear on completion — stale state causes false resume prompts |
| Treating execute-steps as the entry point | Skills are the entry point — this script is a utility they call, not an orchestrator |
| Relying on steps.json for loop iteration tracking | steps.json tracks coarse workflow position. For loops (e.g., per-AC), use the domain artifact (plan.json) as the per-item source of truth |