원클릭으로
decompose
Decompose a PRD into prioritized, dependency-mapped epics and user stories. Accepts pasted text, file path, or PDF.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Decompose a PRD into prioritized, dependency-mapped epics and user stories. Accepts pasted text, file path, or PDF.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Run AI-specific inversion analysis on a requirement before implementation. Dispatches the `ai-invert-analyst` agent on a separate thread. Use before complex or high-stakes AI tasks that touch prompts, models, RAG, or AI-powered outputs.
Autonomously improve any skill or agent prompt via measure-change-test hill-climbing. Dispatches the `auto-improver` agent on a separate thread. Use when a skill gives inconsistent results, when asked to "improve/optimize/autoresearch" a skill, or when output quality needs iterative tightening.
Capture a reproducible AI performance baseline before changes. Dispatches the `baseline-capturer` agent on a separate thread. Use before any change to a client-facing AI output. Triggered automatically by the Q3 gate in CLAUDE.md.
Generate AI tool configuration for an existing project. Explores the codebase and produces context files, path-scoped pattern rules, landmine rules, and agents for Claude Code and VS Code Copilot. Run once per project.
Inject managed sections into existing CLAUDE.md and AGENTS.md after a North Starr GenAI plugin update without re-bootstrapping. Preserves all project-specific content.
Generate executable pytest test files for AI outputs. Produces assertion-based tests for deterministic AI components (classification, extraction, routing, structured output) that run in CI/CD. Complements /eval-suite which produces statistical evaluation datasets for non-deterministic outputs.
| name | decompose |
| description | Decompose a PRD into prioritized, dependency-mapped epics and user stories. Accepts pasted text, file path, or PDF. |
| argument-hint | <PRD text, file path, or PDF path> |
Break down a Product Requirements Document into structured, prioritized user stories with dependency mapping. Produces a persistent story map that feeds individual stories into the existing /genai-invert → genai-layoutplan pipeline.
Use this when you receive a PRD, spec, or feature brief that is too large for a single /genai-invert analysis — typically anything with multiple workflows, feature areas, or delivery phases.
The user provides PRD content in one of three forms:
Actions:
pages parameter. Read ALL chunks before proceeding; do not start scanning until the full document is loaded. For very large PDFs (60+ pages), note the page count in the scope summary so the user knows the full document was read./assess first: "This looks like a raw requirement, not a PRD. Run /assess to classify the project type and get architecture recommendations before decomposing."/discover first: "This needs more detail before I can decompose it. Run /discover to elicit requirements through structured questions, which will generate a PRD."Do a lightweight scan of the PRD to identify:
Present the user with a scope summary before proceeding:
PRD Scan Results:
─────────────────
Workflows detected: [count] ([list])
Priority scheme: [MoSCoW / Phases / P0-P3 / None detected]
Feature areas: [count]
Estimated epics: [range]
Estimated stories: [range]
Delivery phases: [list if present]
Technical stack: [brief summary if present]
User personas: [count] ([names and roles])
AI Project: [Yes / No]
[If AI Project = Yes:]
AI components: [list specific components: RAG pipeline, LLM generation, embeddings, etc.]
This PRD describes an AI project. The chief-ai-po agent will produce AI-augmented stories
with inverted failure modes, safety stories, and graceful degradation criteria.
[If hard deadlines detected:]
Hard deadlines:
• [date] — [what happens] (e.g., "Nov 2026 — IFR opens applications")
• [date] — [what happens] (e.g., "Feb 2027 — final submission deadline")
These deadlines will be used to sequence story priority.
[If non-development sections detected:]
Skipping non-dev sections: [list — e.g., "Go-to-Market (§5.1-5.4), Pricing (§5.2), Sales Channels (§5.3)"]
These provide context but will NOT become user stories.
[If out-of-scope items detected:]
Out of scope (per PRD): [list — e.g., "Financial fair play, UEFA licensing, player transfers"]
No stories will be created for these items.
Options:
1. chief-ai-po only — AI-augmented stories (recommended for AI-native projects)
2. genai-storymap only — standard stories (no AI-specific analysis)
3. Both — genai-storymap first, then chief-ai-po augments with AI layer
[If AI Project = No:]
The genai-storymap agent will run on a separate thread to decompose this PRD.
Proceed?
Wait for user approval before continuing.
Actions:
.plans/ directory if it doesn't existifr-compliance-platform, user-onboarding-v2).plans/PRD-<name>.md with a header:# PRD: <name>
**Ingested:** <date>
**Source:** <file path or "pasted text">
**Scope:** <one-line summary>
**Priority Scheme:** <MoSCoW / Phases / P0-P3 / Derived>
**AI Project:** <Yes (components: ...) / No>
**Personas:** <list of names and roles>
**Hard Deadlines:** <list of dates and events, or "None detected">
**Non-Dev Sections:** <list of sections skipped, or "None">
---
<full PRD content>
This serves as the input file for the genai-storymap agent and as a permanent record.
Choose the agent based on AI project detection and the user's selection from Step 3.
Context to pass to every agent prompt (append to the decomposition instruction):
Option 1 — chief-ai-po only (AI projects):
Spawn the chief-ai-po agent on a separate thread:
"Decompose
.plans/PRD-<name>.mdinto AI-augmented epics and user stories. Write output to.plans/STORIES-AI-<name>.md. [Append context above.]"
The agent will produce stories with inverted failure modes, 6 mandatory AI safety stories (SA.1-SA.6), human oversight checkpoints, and graceful degradation criteria on every AI-touching story.
Option 2 — genai-storymap only (non-AI projects, or user choice):
Spawn the genai-storymap agent on a separate thread:
"Decompose
.plans/PRD-<name>.mdinto epics and user stories. Write output to.plans/STORIES-<name>.md. [Append context above.]"
The agent will identify epics, decompose into user stories with acceptance criteria, map dependencies, assign priorities, estimate sizes, and flag invert candidates.
Option 3 — Both (genai-storymap then chief-ai-po):
Spawn genai-storymap first. After it completes and writes .plans/STORIES-<name>.md, spawn chief-ai-po:
"Augment
.plans/PRD-<name>.mdwith AI-specific analysis. The base story map is at.plans/STORIES-<name>.md. Write output to.plans/STORIES-AI-<name>.md."
The chief-ai-po agent will read both files and produce an AI-augmented version that cross-references existing stories rather than duplicating them.
IMPORTANT: This step runs on the main thread after the genai-storymap agent returns. You MUST complete this step — do not end the conversation after the agent summary.
Once the agent completes:
.plans/STORIES-<name>.md or .plans/STORIES-AI-<name>.md) and present a summaryPresent this as a single message:
Story Map: <name>
──────────────────
Epics: [count]
Stories: [count]
MUST: [count] stories
SHOULD: [count] stories
COULD: [count] stories
Suggested starting stories (no dependencies):
• S1.1 — <title> [size] [invert candidate?]
• S2.1 — <title> [size] [invert candidate?]
Full story map: .plans/STORIES-<name>.md
If chief-ai-po was used, add these lines to the summary:
AI Analysis:
Pre-mortem risks: [count]
AI safety stories (SA.1-SA.6): 6
Human oversight checkpoints: [count]
Graceful degradation coverage: [count]/[total] stories
Full AI story map: .plans/STORIES-AI-<name>.md
Then ask:
"What would you like to do next?"
- Start the orchestration pipeline — run
/orchestrateto feed stories through the full agent pipeline (TRIAGE → DESIGN → PLAN → BUILD → HARDEN → DELIVER)- Create GitHub Issues — generate a shell script to create issues for all stories
- Pick a single story — run
/ai-inverton one story to start working immediately- Done — review the story map first
Wait for the user's choice.
/orchestrate with the story map path/ai-invert with that story's description + acceptance criteriaPre-flight checks — run these before generating the script:
# 1. Is gh CLI installed?
gh --version
# 2. Is gh authenticated?
gh auth status
# 3. Does this repo have a GitHub remote?
gh repo view --json nameWithOwner -q '.nameWithOwner'
If any check fails, tell the user what's needed:
brew install gh (macOS) or see https://cli.github.comgh auth login — needs a GitHub token with repo scope (issues, labels, milestones)gh repo create or add a remote.If all checks pass, proceed.
Do NOT run gh issue create commands inline — a large PRD can produce 30-50 stories and running them one by one wastes context and is slow. Instead, generate a self-contained shell script the user runs outside Claude.
Generate .plans/create-issues-<name>.sh with the following structure:
#!/usr/bin/env bash
set -euo pipefail
# Generated by /decompose from .plans/STORIES-<name>.md
# Run: chmod +x .plans/create-issues-<name>.sh && .plans/create-issues-<name>.sh
#
# Prerequisites:
# - gh CLI installed (brew install gh)
# - gh authenticated with repo scope (gh auth login)
# - Running from a git repo with a GitHub remote
# ─── Pre-flight ───────────────────────────────────────────
if ! command -v gh &> /dev/null; then
echo "Error: gh CLI not found. Install: brew install gh"
exit 1
fi
if ! gh auth status &> /dev/null; then
echo "Error: gh not authenticated. Run: gh auth login"
exit 1
fi
REPO=$(gh repo view --json nameWithOwner -q '.nameWithOwner')
echo "Creating issues in $REPO..."
echo ""
# ─── Labels ───────────────────────────────────────────────
echo "Creating labels..."
gh label create "priority:must" --color "B60205" --description "Must have — MVP" --force 2>/dev/null || true
gh label create "priority:should" --color "D93F0B" --description "Should have — Phase 2" --force 2>/dev/null || true
gh label create "priority:could" --color "FBCA04" --description "Could have — Phase 3" --force 2>/dev/null || true
gh label create "size:S" --color "C5DEF5" --force 2>/dev/null || true
gh label create "size:M" --color "BFD4F2" --force 2>/dev/null || true
gh label create "size:L" --color "A2C4E0" --force 2>/dev/null || true
# Epic labels (one per epic, each with a distinct color)
gh label create "epic:<epic-slug>" --color "<color>" --force 2>/dev/null || true
# ...repeat for each epic
# ─── Milestones ───────────────────────────────────────────
echo "Creating milestones..."
gh api repos/"$REPO"/milestones -f title="<phase name>" -f description="<description>" -f due_on="<YYYY-MM-DDT00:00:00Z>" 2>/dev/null || true
# ...repeat for each phase
# ─── Issues (dependency order) ────────────────────────────
# Stories with no dependencies are created first.
# Each issue captures its number in a variable so dependent stories can reference it.
echo "Creating issues..."
# --- S1.1: <title> (no dependencies) ---
S1_1=$(gh issue create \
--title "[S1.1] <story title>" \
--label "priority:must,size:M,epic:<epic-slug>" \
--milestone "<phase name>" \
--body "$(cat <<'ISSUE_EOF'
## User Story
> As a <role>, I want <capability> so that <benefit>.
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
## Technical Notes
<notes>
## Metadata
- **Size:** M
- **Invert Candidate:** Yes
- **Story Map:** `.plans/STORIES-<name>.md`
ISSUE_EOF
)" | grep -o '[0-9]*$')
echo " Created #$S1_1 — [S1.1] <title>"
# --- S1.2: <title> (depends on S1.1) ---
S1_2=$(gh issue create \
--title "[S1.2] <story title>" \
--label "priority:must,size:S,epic:<epic-slug>" \
--milestone "<phase name>" \
--body "$(cat <<ISSUE_EOF
## User Story
> As a <role>, I want <capability> so that <benefit>.
## Acceptance Criteria
- [ ] Criterion 1
## Dependencies
Depends on #$S1_1 (S1.1 — <title>)
## Metadata
- **Size:** S
- **Invert Candidate:** No
- **Story Map:** \`.plans/STORIES-<name>.md\`
ISSUE_EOF
)" | grep -o '[0-9]*$')
echo " Created #$S1_2 — [S1.2] <title>"
# ...repeat for ALL stories in dependency order
# ─── Summary ─────────────────────────────────────────────
echo ""
echo "Done! Created <count> issues across <count> epics."
echo "View: gh issue list --label 'epic:<epic-slug>'"
Key rules for the generated script:
S1_1, S3_2) so dependent stories can reference #$S1_1 in their body.cat <<'ISSUE_EOF' (single-quoted delimiter) for stories with no dependencies. Use cat <<ISSUE_EOF (unquoted delimiter) for stories that need variable expansion (#$S1_1).--force and || true so the script can be re-run safely.grep -o '[0-9]*$' on gh issue create output to capture the issue number into a variable.After generating the script, tell the user:
GitHub Issues script generated: .plans/create-issues-<name>.sh
• <count> issues will be created across <count> epics
• <count> labels and <count> milestones will be set up
• Dependencies are wired via issue number references
Review and run:
chmod +x .plans/create-issues-<name>.sh
.plans/create-issues-<name>.sh
genai-storymap agent runs on a separate thread to keep main context clean for large PRDsgh commands inline which would waste context.plans/PRD-<name>.md file preserves the original PRD for traceability — downstream artifacts reference it