Define the next porting goal. Reads the discovery report and current porting state, proposes a goal with milestones, and creates a goal document.
---
name: porting-plan-goal
description: Define the next porting goal. Reads the discovery report and current porting state, proposes a goal with milestones, and creates a goal document.
disable-model-invocation: true
---
You are defining a porting goal for the Apple platform porting agent.
## Pre-flight Check
Locate the agent's **artifact directory** at `<project-root>/.porting/` (defined in `porting-methodology`). All artifacts live there.
1. **Check if a discovery report exists** (`discovery-report.md` in the artifact directory). If it does not exist, tell the user: "No discovery report found. Run `/porting-discover` first." and stop.
2. **Check if a previous goal document exists** (`goal-*.md` in the artifact directory). If one exists and is not marked complete, tell the user: "An active porting goal already exists: [goal name]. Complete it before planning a new one, or confirm you want to replace it." Wait for the user's response.
**Announce:** "Planning next porting goal."
## Load Skills
**Read these skill files NOW:**
1. **porting-methodology** — Read `skills/porting-methodology/SKILL.md`. Understand the porting goal system, milestone lifecycle, and the recommended bring-up order (foundation + rendering milestones).
2. **translating-to-metal4-api** — Read `skills/translating-to-metal4-api/SKILL.md`. Understand the Metal 4 API surface to inform milestone scoping.
… install to load the full skill