plugins/dev/skills/phase-plan/SKILL.md
Decompose a completed PRD or oversized requirements artifact into durable delivery phases.
npx skillsauth add rp1-run/rp1 phase-planInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
YOU ARE A PURE ORCHESTRATOR. Spawn phase-planner, parse its JSON response, track workflow state, and register the generated artifact. Do not write or edit planning artifacts yourself.
Command Contract: /phase-plan <source> [--afk]
Use the pre-resolved projectRoot, kbRoot, and workRoot values from the generated Workflow Bootstrap section. Do not hardcode .rp1/work/ or .rp1/context/ paths.
SOURCE is the user-provided planning source path or identifier. It must resolve to either:
{workRoot}/prds/*.md{workRoot}/features/*/requirements.mdUPDATE_CONTEXT is optional revision guidance for refreshing an existing phase plan.
This workflow is single-pass. It does not emit waiting_for_user for source ambiguity. If SOURCE is ambiguous, the planner must return terminal status="error" JSON so the user can rerun /phase-plan with an explicit source path.
stateDiagram-v2
[*] --> analyze
analyze --> publish : plan_ready
publish --> completed : published
analyze --> failed : error
publish --> failed : error
completed --> [*]
failed --> [*]
First emit (entering analyze) includes --name:
rp1 agent-tools emit \
--workflow phase-plan \
--type status_change \
--run-id {RUN_ID} \
--step analyze \
--name "Phase Plan: {source summary}" \
--data '{"status": "running"}'
Subsequent transitions omit --name:
rp1 agent-tools emit \
--workflow phase-plan \
--type status_change \
--run-id {RUN_ID} \
--step {STATE} \
--data '{"status": "running"}'
Terminal states:
rp1 agent-tools emit \
--workflow phase-plan \
--type status_change \
--run-id {RUN_ID} \
--step {STATE} \
--data '{"status": "completed"}'
On failure:
rp1 agent-tools emit \
--workflow phase-plan \
--type status_change \
--run-id {RUN_ID} \
--step failed \
--data '{"status": "failed"}'
Emit the analyze state, then invoke the planner:
{% dispatch_agent "rp1-dev:phase-planner" %} SOURCE={SOURCE}, UPDATE_CONTEXT={UPDATE_CONTEXT}, AFK_MODE={AFK}, KB_ROOT={kbRoot}, WORK_ROOT={workRoot}, RUN_ID={RUN_ID} {% enddispatch_agent %}
Parse the JSON response. Accept only this completion contract:
{
"status": "success",
"source_kind": "prd | feature-requirements",
"source_path": ".rp1/work/...",
"source_relative_path": "prds/... | features/.../requirements.md",
"artifact_path": ".rp1/work/...",
"artifact_relative_path": "prds/... | features/.../phase-plan.md",
"phase_count": 2,
"phase_ids": ["P1", "P2"],
"afk_decisions": []
}
If the agent returns status=error, omits any required field, or references files outside the source artifact and the source-adjacent phase plan, emit failed and stop.
For status="error" responses, treat this as a terminal workflow result, not an interactive pause. Surface the planner's message. If the response includes candidate_paths, list them and tell the user to rerun /phase-plan with one explicit source path.
After a valid success response, transition to publish:
rp1 agent-tools emit \
--workflow phase-plan \
--type status_change \
--run-id {RUN_ID} \
--step publish \
--data '{"status": "running"}'
Register the generated phase plan so Arcade and downstream workflows can discover it:
rp1 agent-tools emit \
--workflow phase-plan \
--type artifact_registered \
--run-id {RUN_ID} \
--step publish \
--data '{"path": "{artifact_relative_path}", "source": "{source_relative_path}", "sourceKind": "{source_kind}", "storageRoot": "work_dir"}'
Do not register the source artifact update separately. File watching handles backlink freshness on the source document.
Emit the terminal status:
rp1 agent-tools emit \
--workflow phase-plan \
--type status_change \
--run-id {RUN_ID} \
--step completed \
--data '{"status": "completed"}'
Output:
## Phase Plan Complete
**Source**: {source_path}
**Phase Plan**: {artifact_path}
**Source Kind**: {source_kind}
**Phases**: {phase_ids joined by ", "}
When the planner returns status="error", output:
## Phase Plan Failed
**Reason**: {message}
**Candidates**:
- {candidate_paths[0]}
- {candidate_paths[1]}
**Next**: Re-run `/phase-plan` with one explicit source path from the list above.
Omit the Candidates block when candidate_paths is absent or empty.
/phase-plan is explicit. Do not trigger it automatically from unrelated workflows.tracker.md or milestone-*.md artifacts for new work.artifact_registered before the publish step.data-ai
Capture session context as a structured, frontmatter-rich markdown note under .rp1/work/notes/ with auto-maintained index and log.
tools
Plan and execute splitting a large PR or branch into a reviewable stacked PR sequence.
development
Write maximally terse agent prompts from scratch. Use when creating new agent specs, command prompts, or instruction sets. Teaches structure-first composition with compression-by-default patterns. Extended with constitutional governance, epistemic stance selection, and a six-stage prompt pipeline.
development
Interactive speedrun loop for small, low-risk changes. Delegates each request to a general sub-agent. Redirects larger work to /build-fast or /build.