ak-plan
Create, validate or review implementation plans with acceptance criteria and executable phases; cook implements them.
SKILL.md.claude/skills/ak-plan/SKILL.md
GitHubPlan (ak-plan)
Create structured, verifiable implementation plans with phased execution roadmaps, architecture diagrams, and testing strategies.
Plan Location & Invariants
- Location: All plans live under
plans/<timestamp>-<descriptive-slug>/. - Primary Files:
plan.md(index/summary) andphase-NN-<name>.md(execution details). - HTML Artifact: When
--htmlis passed,plan.htmlis the authoritative user-facing plan deliverable. - Task Hydration: Phases hydrate into project task management unless
--no-tasksis specified.
Mode & Subcommand Routing
| Mode / Subcommand | Flag / Argument | Purpose | Reference |
|---|---|---|---|
| Auto-Detect | (none) | Analyzes task complexity and chooses appropriate mode | references/workflow-modes.md |
| Fast | --fast |
0 research; direct analysis and rapid plan creation | references/workflow-modes.md |
| Hard | --hard |
Deep research, codebase scouting, red-team review, validation | references/workflow-modes.md |
| Deep | --deep |
Multi-phase exploration for complex/large-scale migrations | references/workflow-modes.md |
| Parallel | --parallel |
Generates parallel-executable phases with strict file ownership | references/workflow-modes.md |
| Two Approaches | --two |
Compares two distinct architectural approaches with trade-offs | references/workflow-modes.md |
| Debate | --debate |
Persona debate before selecting the optimal strategy | references/workflow-modes.md |
| Ultra | --ultra |
Best-of-5 verifier pass; strongest-model selection | ../ak-brainstorm/references/ultra-verifier-mode.md |
| Validate | validate <path> |
Runs critical questions validation gate on a plan | references/validate-workflow.md |
| Red-Team | red-team <path> |
4-persona adversarial review (Assumptions, Failure, Scope, Security) | references/red-team-workflow.md |
| Archive | archive [slug] |
Finalizes and archives closed/completed plans | references/archive-workflow.md |
Flag Modifiers
--html: Outputs a self-contained, interactive editorial HTML plan (plan.html). Follows the shared contract in../ak-preview/references/html-skill-composition.md(activatesak-frontend-designthenak-diagram). Seereferences/html-output.md.--ak-render: Opt-in (implies--html): compileplan.htmlfromplan.page.yamlwith the pinned AK Render CLI instead of hand-writing it (also selected by a project.ak-render/directory). See../ak-preview/references/ak-render-route.md.--github: Creates/updates a GitHub issue with plan summary and links. Seereferences/github-wiki-publish.md.--wiki: Publishes reviewed plan to AgentWiki. Seereferences/github-wiki-publish.md.--advice: Runs underkongmingadvisory supervision and formats the output plan for handover to lower-capability executor models (Sonnet, Gemini Flash). Decomposes every phase into step-by-step tasks with explicit success criteria, marks verification steps with mechanical pass conditions, and embeds a Failure Protocol that stops and escalates tokongmingon verification failure. Seereferences/advice-handover-plan.mdfor the artifact contract and../ak-brainstorm/references/advisory-supervision.mdfor supervisor identity and model routing.--tdd: Enforces test-first design, test matrix, and verification commands in every phase.--no-tasks: Skips hydrating phases into task management.--yagni: Actively challenges and eliminates any scope not strictly necessary for the stated outcome (seereferences/scope-challenge.md).--skip-journal: Skips session journal entry generation during plan archive.- Visual Kill Switches:
--no-antv,--no-diagram-design,--no-editorial-visualsdisable specific editorial visual layers (seereferences/html-output.md).
Mode Exclusivity
The mode flags — --fast, --hard, --deep, --parallel, --two, --debate, --ultra, and this skill's own --auto (mode-detection, distinct from /ak-cook's auto-approve --auto) — are mutually exclusive; Mode Detection is a single-choice step. Passing two is a hard stop naming both flags and the reason, never a silent override. --auto conflicts with every other mode flag since it is itself a mode-selection flag; --debate is explicit opt-in only and is never auto-selected.
Planning pipeline
Resolve mutually exclusive modes and modifiers before reading their references. Reuse the accepted outcome, constraints, non-goals and acceptance criteria. Load only the selected route; fast plans do not automatically run debate, HTML or publishing. Plan files remain execution authority; HTML is the requested presentation, not a replacement for phase state.
- Intake & Scope Challenge: Inspect context, parse flags, evaluate scope (see
references/scope-challenge.md). - Research & Scout (Hard/Deep/Two): Spawn researchers and scout codebase paths (see
references/research-phase.md,references/codebase-understanding.md). - Plan Drafting: Architect solutions and author phased roadmap files (see
references/solution-design.md,references/plan-organization.md, and the Extension trace below). - Red-Team Gate (when selected mode requires it): Execute 4-persona review; resolve all blockers (see
references/red-team-workflow.md). - Validation Gate: Run critical question framework; verify file ownership and test commands (see
references/validate-workflow.md). - Whole-Plan Sweep: Verify links, frontmatter, and invariants across all phase files.
- HTML Artifact (if
--html): Activateak-frontend-design$\rightarrow$ak-diagram$\rightarrow$ compileplan.html(seereferences/html-output.md). - Hydrate Tasks: Sync phases to live task management (unless
--no-tasks, seereferences/task-management.md). - GitHub / Wiki (if
--github/--wiki): Post issue update and publish to AgentWiki (seereferences/github-wiki-publish.md). - Handoff: Report plan path, summary, and next execution step (
/ak-cook). - Journal: Run
/ak-journalto write a concise technical journal entry on completion. See the shared "Journal step — opt-out" block below.
Extension trace
During Plan Drafting, when the plan creates or changes a boundary that evidenced variants share, trace one credible next variant (provider, runtime, tenant, workflow, or policy) through the proposed boundaries: name the contract that stays stable, the pieces that must change, and how the plan proves that claim. A material risk becomes an ordinary task or acceptance check in the owning phase, never a new mode, phase, or speculative scaffolding such as a registry, factory, plugin system, or config layer with no second real case. Keep one real case concrete and reversible unless the user requested the seam; then plan it as requested and record its cost. Variants with different capabilities share the stable contract behind a capability-aware boundary. A local fix or a plan with no meaningful variation skips the trace and records nothing.
Journal step — opt-out
Skip the automatic /ak-journal step when either applies:
- The invocation includes the
--skip-journalflag, OR ak config prefs resolve --json | jq -r 'if .prefs.journal.auto == false then "false" else "true" end'returnsfalse. If the command errors or prints anything other than the exact stringfalse, treat astrue(default) — corrupt or missing config never suppresses the automatic journal.
Precedence: flag > project config > user config > default (true). When skipped, print one line: journal skipped by --skip-journal (flag) or journal skipped by preference (config). Explicit /ak-journal and ak journal create are unaffected.
References Index
references/html-output.md— HTML plan format, visual layout, and diagram embeddingreferences/github-wiki-publish.md— GitHub issue and AgentWiki publishing contractsreferences/output-standards.md— YAML frontmatter, phase schemas, and quality standardsreferences/plan-organization.md— directory layout and phase decompositionreferences/workflow-modes.md— detailed mode specifications (--fast, --hard, --deep, --parallel, --two)references/red-team-workflow.md— red-team personas and critique resolutionreferences/validate-workflow.md— validation questions and verification criteriareferences/cli-integration.md— CLI scaffolding, active plan state detection, mandatory read pass, and phase templatereferences/planning-rules.md— Core planning rules, mode exclusivity, and file ownership invariantsreferences/post-plan-handoff.md— Mandatory post-plan handoff protocolreferences/advice-handover-plan.md— Handover plan contract for downstream executor models under --advice