--- name: planf3 description: Create a detailed HTML-first engineering implementation plan from a user request and save it to the specs/ directory. Use whenever the user wants to plan, spec, or design new work — "plan this", "write a spec for", "create a plan for", "/plan". Produces a self-contained .html plan with purpose/problem/solution, relevant files, phased implementation with status-checked tasks and validation loops, embedded AI images, and updatable metadata. Also builds/updates existing plans. --- > **Provenance:** ported from [disler/planf3](https://github.com/disler/planf3) (Mythos-class planning meta-skill). Adapted for ZCode (Claude Code-only frontmatter stripped; macOS `open -a` browser commands replaced with cross-platform equivalents). > **Dependencies:** `uv` (runs image scripts — required only for embedded image generation), `OPENAI_API_KEY` (gpt-image-2 — required only for images; planning works without it). > **Windows compatibility:** Planning workflows run natively. Image generation runs via `uv` (installed). Browser open uses `start`/`open` auto-detected per platform. # Plan F3 ## Purpose Create a detailed, **HTML-first** implementation plan based on the `USER_PROMPT` variable. The plan is authored as a single self-contained `.html` page so it can be opened in a browser, embed focused images with a synced visual identity, and be created/updated/consumed by the agent trifecta (engineer, team, AI agents). Analyze the request, think through the implementation approach, follow the `## Instructions`, and work through the `## Workflow` to produce the plan from the `## Plan Template`. ## Variables USER_PROMPT: $1 QUESTIONABLE: $2 - default false PLAN_OUTPUT_DIRECTORY: `specs/` PLAN_FILE: `PLAN_OUTPUT_DIRECTORY/.html` IMAGES_OUTPUT_DIR: `PLAN_OUTPUT_DIRECTORY//` AI_DOCS: `AI_DOCS/` APP_DOCS: `APP_DOCS/` IDE: `code` BROWSER_OPEN: cross-platform — use `start ""` on Windows (cmd), `open` on macOS, `xdg-open` on Linux. The command to open PLAN_FILE in the default browser: `start "" "PLAN_FILE"` (win) / `open "PLAN_FILE"` (mac) / `xdg-open "PLAN_FILE"` (linux). Detect platform from the environment rather than hardcoding one. ## Instructions - IMPORTANT: If no `USER_PROMPT` is provided, stop and ask the user to provide it - Carefully analyze the user's requirements provided in the `USER_PROMPT` variable - Think deeply (ultrathink) about the best approach to implement the requested functionality or solve the problem - Explore the codebase to understand existing patterns, documentation, previous specs and architecture - The plan is **HTML-first**: produce a single self-contained `.html` document from the `## Plan Template` below - The template uses `{{PLACEHOLDER}}` variables — replace EVERY `{{...}}` with real content. Do not leave any `{{}}` token in the final file - Blocks marked with `` are repeatable: duplicate them as many times as the plan needs (e.g. one block per phase, task, file, or Q&A entry) and delete the comment markers - Keep the document self-contained: all CSS lives in the single `