一键导入
planforge-step3-execute-slice
Pipeline Step 3 — Execute a hardened plan slice-by-slice with validation gates, re-anchoring, and rollback protocol.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Pipeline Step 3 — Execute a hardened plan slice-by-slice with validation gates, re-anchoring, and rollback protocol.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run a comprehensive code review across architecture, security, testing, naming, and patterns. Invokes relevant reviewer agents in sequence. Use before merging features or at the end of a phase. With --quorum, dispatches multi-model analysis for higher confidence.
Audit UI components for WCAG 2.2 compliance, semantic HTML, ARIA labels, keyboard navigation, color contrast, and responsive design.
Audit API endpoints for backward compatibility, versioning, OpenAPI compliance, pagination, rate limiting, and RFC 9457 error responses.
Review code for architecture violations: layer separation, sync-over-async, missing CancellationToken, improper DI. Use for PR reviews or code audits.
Fix a bug using TDD: reproduce with a failing test first, then implement the fix, then verify. Prevents regressions.
Review CI/CD pipelines for best practices: environment promotion, secrets management, rollback strategies, build caching, and deployment safety.
| name | planforge-step3-execute-slice |
| description | Pipeline Step 3 — Execute a hardened plan slice-by-slice with validation gates, re-anchoring, and rollback protocol. |
| metadata | {"author":"plan-forge","source":".github/prompts/step3-execute-slice.prompt.md"} |
Pipeline: Step 3 of 5 (Session 2 — Execution)
When: After plan is hardened (Step 2), in a new agent session
Model suggestion: Any model / Codex / Copilot Auto (10% token savings) — execution is mechanical; Codex is fast and focused
Next Step:step4-completeness-sweep.prompt.md
Replace <YOUR-HARDENED-PLAN> with your hardened plan filename.
Read these files first:
Now act as an EXECUTION AGENT (see the Execution Agent Prompt in the runbook).
<investigate_before_coding> Before writing code that depends on an existing file, read that file first. Never assume a method signature, type name, or import path — verify it by opening the file. If the plan references a file you haven't loaded, load it before coding against it. </investigate_before_coding>
<implementation_discipline> Only make changes specified in the current slice. Do not add features, refactor existing code, add abstractions, or create helpers beyond what the slice requires. Do not add error handling for scenarios that cannot occur within this slice's scope. Do not add docstrings, comments, or type annotations to code you did not change. The right amount of complexity is the minimum needed for the current slice. </implementation_discipline>
Execute the hardened plan one slice at a time, starting with Slice 1.
Before starting Slice 1, run a Pre-Execution Traceability Check:
Before each slice, load its Context Files (including .github/instructions/*.instructions.md guardrails). When scaffolding new entities/services/tests, use the matching prompt template from .github/prompts/. Follow the validation loop exactly. Commit after each passed slice. If any gate fails or any ambiguity arises, pause and ask for clarification.
Re-anchor after each slice using the lightweight check (4 yes/no questions). Do a full re-anchor every 3rd slice or when a lightweight check flags a concern.
For [parallel-safe] slices:
After ALL slices pass, run the COMPLETENESS SWEEP (Section 6.1).
Follow the Rollback Protocol (Runbook Section 10):
| Strategy | When to Use |
|---|---|
git stash | Quick save — preserves work for review |
git checkout -- . | Discard changes for single slice |
| Branch-per-slice | Safest — recommended for high-risk phases |
SESSION RESUME CHECKLIST:
1. Run `git status` — confirm working tree is clean (all prior slices committed)
2. Run `git log --oneline -5` — verify last committed slice number
3. Read the hardened plan's Scope Contract and Stop Conditions
4. Confirm the plan file has not been amended since last session
(check for ## Amendments section — if new amendments exist, read them first)
5. Identify the next unexecuted slice and load its Context Files
6. State: "Resuming from Slice N. Prior slices 1–(N-1) are committed."
forge_sweep to scan for TODO/FIXME markers before moving to the next sliceforge_diff with the plan file to verify all changes are within scopeforge_smith to check if the environment is healthyThese tools are available as MCP function calls if
.vscode/mcp.jsonor.claude/mcp.jsonis configured. Otherwise, use the equivalent CLI commands (pforge sweep,pforge diff,pforge smith).
search_thoughts("<slice topic>", project: "TimeTracker", created_by: "copilot-vscode", type: "decision") — load prior decisions, patterns, and implementation lessons relevant to the current slicecapture_thought("Slice N: <key decision or outcome>", project: "TimeTracker", created_by: "copilot-vscode", source: "plan-forge-step-3-slice-N", type: "decision") — persist decisions made during executioncapture_thoughts([...lessons], project: "TimeTracker", created_by: "copilot-vscode", source: "plan-forge-step-4-sweep", type: "convention") — batch capture patterns, conventions, and lessons discovered