~aod-plan
Plan stage orchestrator that runs all three Plan sub-steps (spec → project-plan → tasks) in sequence with governance gates. Stops on rejection, continues through approvals. Use this skill when you need to run the full Plan stage, navigate planning sub-steps, or resume after a rejection.
Best use case
~aod-plan is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Plan stage orchestrator that runs all three Plan sub-steps (spec → project-plan → tasks) in sequence with governance gates. Stops on rejection, continues through approvals. Use this skill when you need to run the full Plan stage, navigate planning sub-steps, or resume after a rejection.
Teams using ~aod-plan should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/~aod-plan/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ~aod-plan Compares
| Feature / Agent | ~aod-plan | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Plan stage orchestrator that runs all three Plan sub-steps (spec → project-plan → tasks) in sequence with governance gates. Stops on rejection, continues through approvals. Use this skill when you need to run the full Plan stage, navigate planning sub-steps, or resume after a rejection.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Plan Stage Orchestrator Skill
## Purpose
Orchestrates the full Plan stage by running spec → project-plan → tasks in sequence. After each sub-step completes and its governance review passes (APPROVED), the orchestrator automatically advances to the next sub-step. If any review returns CHANGES_REQUESTED or BLOCKED, the orchestrator stops and reports the rejection so the user can fix and re-run `/aod.plan` to resume.
With 1M context, all three artifacts and their reviews fit comfortably in a single session.
## How It Works
### Step 1: Determine Feature Context
1. Get branch: `git branch --show-current` → extract NNN prefix
2. If on `main` and a PRD exists (e.g., `docs/product/02_PRD/{NNN}-*.md`), **automatically create the feature branch** (`git checkout -b {NNN}-{kebab-name}`) per git workflow rules. Do NOT ask the user — feature branches are mandatory, not optional.
3. **Open Draft PR**: After creating the branch, push it and open a draft PR so work is visible early:
```bash
git commit --allow-empty -m "chore({NNN}): open feature branch"
git push -u origin {NNN}-{kebab-name}
gh pr create --draft \
--title "{NNN}: {Feature Name}" \
--body "Draft PR for feature {NNN}. Opened automatically at plan stage."
```
If `gh` is unavailable, skip silently (graceful degradation). Store the PR number for later use.
4. Derive specs directory: `specs/{NNN}-*/`
5. If no specs directory found, check `.aod/spec.md` as fallback
6. If no feature context found: warn and suggest `/aod.define` first
### Step 2: Read Artifact States
For each artifact (spec.md, plan.md, tasks.md), determine its approval status:
1. **Check file existence** — if file cannot be read (missing, permissions, encoding), treat as "does not exist"
2. **Parse YAML frontmatter** — extract the `triad:` block between `---` delimiters
3. **Extract sign-off status** — read `triad.{role}_signoff.status` for the required reviewers
### Step 3: Evaluate Frontmatter (with error handling)
For each artifact file, apply these rules in order:
1. **File does not exist** → status = `missing`
2. **File exists but has no `---` frontmatter delimiters** → status = `not_approved`, emit: "Note: {file} has no frontmatter. Running {sub-step} for review."
3. **File has frontmatter but no `triad:` key** → status = `not_approved`, emit: "Note: {file} frontmatter missing triad block. Running {sub-step} for review."
4. **`triad:` exists but required sign-off field is null or missing** → status = `not_approved`
5. **Sign-off status is not a recognized value** → status = `not_approved`, emit: "Warning: Unexpected status '{value}' in {file}. Re-running {sub-step}."
6. **YAML parse error** → status = `not_approved`, emit: "Warning: Could not parse frontmatter in {file}. Re-running {sub-step}."
**Recognized approved statuses**: `APPROVED`, `APPROVED_WITH_CONCERNS`, `BLOCKED_OVERRIDDEN`
### Step 3b: Read Governance Tier
Read `.aod/memory/constitution.md` and extract the governance tier:
1. Look for the `## Governance Tiers` section
2. Find the configuration block: `governance:` → `tier:` value
3. Valid values: `light`, `standard`, `full`
4. If not found or invalid: default to `standard`
**Tier affects Step 4 decision table** — specifically the spec PM sign-off check.
### Step 4: Apply Decision Table
**Standard and Full tiers** (default behavior):
| spec.md exists? | spec PM approved? | plan.md exists? | plan dual-approved? | tasks.md exists? | tasks triple-approved? | Action |
|-----------------|-------------------|-----------------|---------------------|------------------|------------------------|--------|
| No | — | — | — | — | — | Invoke `/aod.spec` |
| Yes | No | — | — | — | — | Invoke `/aod.spec` (needs PM sign-off) |
| Yes | Yes | No | — | — | — | Invoke `/aod.project-plan` |
| Yes | Yes | Yes | No | — | — | Invoke `/aod.project-plan` (needs dual sign-off) |
| Yes | Yes | Yes | Yes | No | — | Invoke `/aod.tasks` |
| Yes | Yes | Yes | Yes | Yes | No | Invoke `/aod.tasks` (needs triple sign-off) |
| Yes | Yes | Yes | Yes | Yes | Yes | Report "Plan stage complete" |
**Light tier** (reduced gates):
| spec.md exists? | plan.md exists? | plan dual-approved? | tasks.md exists? | tasks triple-approved? | Action |
|-----------------|-----------------|---------------------|------------------|------------------------|--------|
| No | — | — | — | — | Invoke `/aod.spec` |
| Yes | No | — | — | — | Invoke `/aod.project-plan` (skip PM spec sign-off) |
| Yes | Yes | No | — | — | Invoke `/aod.project-plan` (needs dual sign-off) |
| Yes | Yes | Yes | No | — | Invoke `/aod.tasks` |
| Yes | Yes | Yes | Yes | No | Invoke `/aod.tasks` (needs triple sign-off) |
| Yes | Yes | Yes | Yes | Yes | Report "Plan stage complete" |
In Light tier, when spec.md exists but has no PM sign-off, the router **skips** the PM spec sign-off check and proceeds directly to `/aod.project-plan`. Emit: "Note: Light governance tier — PM spec sign-off skipped."
**Full tier** uses the same table as Standard. The difference between Standard and Full is that Full requires a **separate** PM spec sign-off step (the PM reviews spec.md independently before plan creation). This distinction is enforced within `/aod.spec` itself, not in the router.
**Approval checks per artifact**:
- **spec.md** (Standard/Full): `triad.pm_signoff.status` is approved
- **spec.md** (Light): existence is sufficient — PM sign-off not required
- **plan.md**: `triad.pm_signoff.status` AND `triad.architect_signoff.status` are both approved
- **tasks.md**: `triad.pm_signoff.status` AND `triad.architect_signoff.status` AND `triad.techlead_signoff.status` are all approved
**Invariant**: Triple sign-off on tasks.md is the governance floor for ALL tiers, including Light.
### Step 5: Execute Orchestration Loop
Based on the decision table, determine the **starting sub-step** (the first one that needs work). Then run sub-steps in sequence, advancing automatically on approval.
**Loop logic**:
1. **Invoke the current sub-step** using the Skill tool (`aod.spec`, `aod.project-plan`, or `aod.tasks`)
2. **After the sub-step completes**, check the governance outcome:
- **APPROVED** (or APPROVED_WITH_CONCERNS): Display a brief progress line, then **re-read artifact states** (Step 2) and **re-apply the decision table** (Step 4) to determine the next sub-step. Continue the loop.
- **CHANGES_REQUESTED or BLOCKED**: **Stop the loop.** Display the rejection details and instruct the user to fix the issues, then re-run `/aod.plan` to resume.
3. **If the decision table returns "Plan stage complete"**: Exit the loop and display:
```
PLAN STAGE COMPLETE
All artifacts approved:
- spec.md: PM sign-off ✓
- plan.md: PM + Architect sign-off ✓
- tasks.md: PM + Architect + Team-Lead sign-off ✓
Next: Run /aod.build to start implementation.
```
**Progress display between sub-steps**:
After each approved sub-step, display a brief status line before advancing:
```
✓ spec.md — PM approved. Advancing to project-plan...
```
```
✓ plan.md — PM + Architect approved. Advancing to tasks...
```
**Important**: Re-read artifact states after each sub-step. Do NOT assume the next sub-step — the decision table handles edge cases (e.g., plan.md exists but lost dual approval).
## Edge Cases
### No PRD exists
If the user runs `/aod.plan` but there is no approved PRD for the current feature (no `docs/product/02_PRD/{NNN}-*.md`), warn:
```
No approved PRD found for this feature.
The Plan stage requires a PRD as input. Run /aod.define first to create one,
then return to /aod.plan.
```
### Direct sub-command invocation
The orchestrator does NOT block direct invocation of `/aod.spec`, `/aod.project-plan`, or `/aod.tasks`. Those commands work independently — the orchestrator is a convenience layer, not a gatekeeper.
### Re-run after rejection
If a governance gate rejects (e.g., PM requests changes to spec.md), the user fixes issues and re-runs `/aod.plan`. The orchestrator detects the missing/rejected sign-off and re-invokes the correct sub-step, then continues the loop from there.
### Mid-stage resume
If the user previously completed spec.md and plan.md (both approved) and runs `/aod.plan`, the orchestrator skips directly to `/aod.tasks` — it only runs what's needed.
## Integration
### Reads
- `specs/{NNN}-*/spec.md` — check existence and PM sign-off
- `specs/{NNN}-*/plan.md` — check existence and dual sign-off
- `specs/{NNN}-*/tasks.md` — check existence and triple sign-off
- `docs/product/02_PRD/{NNN}-*.md` — check PRD existence (edge case)
### Invokes (in sequence, advancing on approval)
- `/aod.spec` — when spec needs creation or PM approval
- `/aod.project-plan` — when plan needs creation or dual approval
- `/aod.tasks` — when tasks need creation or triple approval
### Updates
- None (orchestrator reads artifact state, sub-commands write artifacts)
---
## Common Rationalizations
| Rationalization | Reality |
|---|---|
| "I know what's done, I'll skip re-reading state between sub-steps" | Step 5 Loop point 3 mandates re-read after each sub-step — assumed-state advancement misses lost approvals. |
| "This branch is small, I'll commit straight to main" | Step 1 point 2 auto-creates the feature branch on main — bypassing it skips the draft PR opened in point 3. |
| "spec.md exists, the gate must already be green" | Step 4 decision table requires `pm_signoff.status` approved per Step 2 — existence alone routes back to `/aod.spec`. |
| "Light tier means skip triple sign-off on tasks too" | Step 4 invariant (line 100) keeps tasks.md triple sign-off as the floor for ALL tiers, including Light. |
| "Approved with concerns is close enough — I'll fix later" | Step 4 recognized list (line 52) treats it as approved, but the concerns must still be addressed before delivery. |
## Red Flags
- Agent advances past an approved sub-step without re-running Step 4's decision table.
- Agent invokes `/aod.tasks` directly when plan.md lacks dual sign-off per the Step 4 plan row.
- Agent skips the draft PR open in Step 1 point 3 because `gh` "felt slow."
- Agent treats a missing `triad:` block as approved instead of `not_approved` per Step 3 rule 3.
- Agent reports "Plan stage complete" without all three artifacts hitting the Step 4 final row.
- Agent ignores the Light-tier note in Step 4 and re-runs `/aod.spec` for a PM sign-off the tier doesn't require.Related Skills
~aod-project-plan
Validates architecture documentation completeness by checking for technology stack, API specifications, database schema, security architecture, and alignment with feature specification. Use this skill when you need to check if plan.md is complete before implementation, validate architecture documentation, or review technical plans for completeness.
~aod-status
On-demand backlog snapshot and lifecycle stage summary. Regenerates BACKLOG.md from GitHub Issues and displays item counts per stage. Use this skill when you need to check backlog status, view stage counts, regenerate BACKLOG.md, or get a lifecycle overview.
~aod-spec
Validates specification completeness and quality by checking for mandatory sections, [NEEDS CLARIFICATION] markers, testable criteria, and clear scope boundaries. Use this skill when you need to check if spec is complete, validate specifications, review spec.md, or check specification quality. Ensures specifications are ready for architecture and implementation phases.
~aod-score
Re-score an existing idea's ICE rating when circumstances change. Use this skill when you need to re-evaluate ideas, update ICE scores, change idea priority, or re-assess deferred ideas.
~aod-run
Full lifecycle orchestrator that chains all 6 AOD stages (Discover, Define, Plan, Build, Deliver, Document) with disk-persisted state for session resilience and governance gates at every boundary. Use this skill when you need to run the full lifecycle, orchestrate stages, resume orchestration, or check orchestration status.
~aod-kickstart
POC kickstart skill that transforms a project idea into a sequenced consumer guide with 6-10 seed features. Use when a developer invokes /aod.kickstart to generate a consumer guide, when starting a new project and needing a structured backlog plan, or when converting a project idea into seed features for the AOD lifecycle. Three-stage workflow: Idea Intake, Stack Selection, Guide Generation.
~aod-discover
Unified discovery skill with 4 entry points: /aod.discover (full flow: capture + score + validate), /aod.discover --seed (fast-track pre-vetted ideas with auto defaults), /aod.idea (capture + score only), /aod.validate (PM validation for existing idea). Use this skill when you need to capture ideas, run discovery, validate ideas with PM, generate user stories, log feature requests, or add items to the ideas backlog.
~aod-deliver
Structured delivery retrospective for the AOD Lifecycle's Deliver stage. Validates Definition of Done, captures delivery metrics (estimated vs. actual duration), logs surprises, feeds new ideas back into discovery via GitHub Issues, and creates Institutional Knowledge entries. Use this skill when you need to close a feature, run a delivery retrospective, capture lessons learned, or complete the AOD lifecycle.
~aod-define
Internal skill invoked by /aod.define to generate industry-standard PRD content using proven frameworks from Google, Amazon, and Intercom. Do NOT invoke directly — use /aod.define instead, which wraps this skill with Triad governance and sign-offs.
~aod-build
Generate standardized checkpoint reports for multi-phase implementation projects. Use this skill when pausing implementation at strategic milestones (phase completion, user story completion, critical features) to create comprehensive progress reports with task breakdowns, metrics, knowledge base entries, and resume instructions.
~aod-bugfix
One-shot governed bug fix loop: diagnose → plan → implement → verify → document. TRIGGER when: user reports a bug, pastes an error message/stack trace/failing test, or asks to fix a bug. Runs 5 Whys root cause analysis, presents confirmation gate before any code changes, implements fix, verifies with tests, and generates KB entry for review.
~aod-blueprint
Unified project setup and story generation skill that auto-detects new vs existing projects. Three modes: first-run (creates repo, registers project, activates), subsequent-run (skips setup, adds new stories with deduplication), and demo (loads pre-built Hello World stories). Generates ICE-scored, dependency-ordered stories as GitHub Issues and outputs a consumer guide. Use when a developer invokes /aod.blueprint to bootstrap or extend a project.