一键导入
gwt-plan-spec
Use when a SPEC exists and the next task is to generate or refresh implementation planning artifacts such as plan.md and tasks.md.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when a SPEC exists and the next task is to generate or refresh implementation planning artifacts such as plan.md and tasks.md.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | gwt-plan-spec |
| description | Use when a SPEC exists and the next task is to generate or refresh implementation planning artifacts such as plan.md and tasks.md. |
Unified planning skill that translates a clarified spec.md into implementation-ready
artifacts through four sequential phases: technical context, architecture design,
task decomposition, and quality gate.
Covers planning, task decomposition, and pre-implementation quality-gate work
behind the visible gwt-plan-spec entrypoint.
Before executing any gwtd ... command from this skill or its references,
resolve GWT_BIN first: executable GWT_BIN_PATH, then command -v gwtd,
then $GWT_PROJECT_ROOT/target/debug/gwtd or ./target/debug/gwtd. Run the
command as "$GWT_BIN" ...; if none exists, stop with an actionable
gwtd not found error.
gwt-plan-spec SPEC-<id> — full pipeline from spec.md to quality gategwt-plan-spec without a SPEC — produce a plan.md and tasks.md in the
current working context (no spec.md required, skip traceability checks)SPEC-1935 FR-014q routes Stop through skill-plan-spec-stop-check, which reads
.gwt/skill-state/plan-spec.json and blocks Stop while the skill is active.
Register the skill lifecycle explicitly with the exit CLI:
plan.start with params.spec:<n> at the beginning of the skill invocation (params.spec:0 for lightweight mode)plan.phase with params.spec:<n> (or params.spec:0 for lightweight mode) and
params.label:"plan-draft"|"tasks-draft"|"quality-gate" at each internal milestone (logging only; does not affect blocking)plan.complete with params.spec:<n> (or params.spec:0 for lightweight mode) once the quality gate verdict is CLEAR and planning artifacts are writtenplan.abort with params.spec:<n> (or params.spec:0 for lightweight mode) and params.reason when planning cannot proceed (e.g. spec gap discovered mid-planning)The Stop-block handler honours Claude Code / Codex's built-in
stop_hook_active flag, so forced continuation is capped at one per Stop
cycle and the skill will never infinitely loop even if the exit CLI is
skipped.
spec.md has critical [NEEDS CLARIFICATION] markers, use gwt-discussion first.gwt-discussion to create it first.spec.md from the target SPEC directory (or a user-provided description in lightweight mode).gwt/memory/constitution.mdAll artifacts are written to the SPEC's GitHub Issue sections:
plan.md — architecture, phases, constitution checkresearch.md — unknowns, tradeoff decisions, external findingsdata-model.md — entities, shapes, lifecycle, invariantsquickstart.md — minimum validation flow for reviewers and implementerscontracts/* — interface or schema contracts (only when needed)tasks.md — executable work items with test-first orderingUse the current user's language for generated artifact text, quality-gate reports, and any user-facing planning summaries unless the artifact already has an established language that must be preserved.
Establish the implementation landscape before designing.
Load source artifacts. Read spec.md and .gwt/memory/constitution.md.
Refuse to continue only when spec.md is missing or a user decision still blocks planning.
Run Board active-claim preflight. Once the target SPEC number is known,
read the current Board with JSON operation board.show.
claim entries from another session that mention the same
owner (#<N> or SPEC-<N>) or the planning phase being refreshed.claim with a Boundary: line naming the
sections/files owned by this session before editing.SPEC-1935 plan refresh, when gwt-plan-spec starts for SPEC-1935, then
the preflight reports the claim and requires user confirmation before
plan, tasks, or related artifacts are edited.Identify affected scope. List files, modules, services, and external constraints that the work touches. Record assumptions explicitly.
Run the constitution check. Evaluate the work against every rule in
.gwt/memory/constitution.md. If a rule is violated, either redesign or record the
justification in Complexity Tracking.
Answer the Required Plan Gates from the constitution:
Design the solution using Software Design Document methodology before decomposing tasks.
See
references/sdd-design.mdfor full methodology.
Component design. Identify new and modified components, their responsibilities, and ownership boundaries. Keep the design minimal — no unnecessary abstractions.
Interface contracts. Define public APIs, message formats, and protocol boundaries
between components. Write stable contracts to contracts/* when interfaces cross
module or crate boundaries.
Data model. Document entities, their shapes, lifecycle states, and invariants.
Write to data-model.md.
Sequence descriptions. Describe key interaction flows in plain text — which component calls what, in what order, with what data. No diagram syntax required; clarity and completeness matter.
Produce supporting artifacts.
research.md: unknowns, tradeoff decisions, external findingsquickstart.md: minimum validation flow for reviewers and implementersWrite plan.md. Structure:
Turn the architecture and plan into executable work items.
See
references/task-decomposition.mdfor full rules.
Lay out phase order. Canonical ordering:
US1, US2, ...) — story-specific implementationGenerate test-first tasks. For each user story:
Add implementation tasks. Each task must include:
T-NNN format[P] marker when parallelizable (only when write scopes do not overlap)Validate traceability.
Write tasks.md.
Final readiness check before implementation. This is a pre-implementation gate only — it does not certify that implementation is complete.
See
references/quality-gate.mdfor full check definitions.
[NEEDS CLARIFICATION] markers remain## <Analysis Report in the current user's language>: SPEC-<id>
Status: CLEAR | AUTO-FIXABLE | NEEDS-DECISION
Blocking items:
- A1. <artifact gap>
- A2. <traceability gap>
Next:
- gwt-build-spec (on CLEAR)
- self-repair and rerun (on AUTO-FIXABLE)
- ask user for decision (on NEEDS-DECISION)
Decision rule:
gwt-build-specBoundary: CLEAR means artifacts are ready for execution. It does not mean the SPEC is
complete — completion requires post-implementation reconciliation in gwt-build-spec.
On CLEAR verdict, suggest proceeding to gwt-build-spec for implementation.
When invoked without a SPEC:
.gwt/memory/constitution.md is not foundplan.md and tasks.md in the current directoryUse gwtd JSON operations for artifact persistence:
# Read spec section
"$GWT_BIN" <<'JSON'
{"schema_version":1,"operation":"issue.spec.section","params":{"number":123,"section":"spec"}}
JSON
# Write plan section
"$GWT_BIN" <<'JSON'
{"schema_version":1,"operation":"issue.spec.edit","params":{"number":123,"section":"plan","body":"<plan markdown>"}}
JSON
# Write tasks section
"$GWT_BIN" <<'JSON'
{"schema_version":1,"operation":"issue.spec.edit","params":{"number":123,"section":"tasks","body":"<tasks markdown>"}}
JSON
# List all SPEC Issues
"$GWT_BIN" <<'JSON'
{"schema_version":1,"operation":"issue.spec.list","params":{}}
JSON
Use when execution should start from a GitHub Issue, gwt-spec Issue, or approved standalone task through one build/test/verify loop.
Use when implementation should proceed from an approved SPEC or approved standalone task, and the work should run through the build/test/verify loop.
Use when the user wants to create, inspect, update, or unblock a pull request and expects one visible entrypoint for the PR lifecycle.
Use when implementation needs verification before completion or before opening a PR. Defines a project-agnostic Generic Verification Contract: classify changed surfaces, autodetect the project's test runners from manifests (Cargo.toml / package.json / pyproject.toml / go.mod / ProjectSettings / *.sln / etc.), run the appropriate unit / integration / E2E / visual tests for the project, emit an evidence bundle that lists exactly which tests were executed, then hand off to the user with a 4-step 導線 (build → launch → navigate → observe) and check items before declaring Overall: PASS. Triggers: 'verify', 'run tests', 'pre-PR check', 'gwt-verify'.
Use when an idea, spec question, or implementation gap needs investigation and discussion before deciding how work should proceed.
Use when the user wants to resolve an existing GitHub Issue by number or URL, especially when the workflow should continue through a direct fix unless a SPEC is needed.