Save PRD artifacts to epic directory after approval. Creates docs/epics/in-progress/{prefix}-{name}/ with prd.md, user-stories/, execution-plan.md, innovations-selected.md, and architecture-notes.md. Use when persisting approved PRD from /architect command.
/plugin marketplace add metasaver/metasaver-marketplace/plugin install core-claude-plugin@metasaver-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
ROOT AGENT ONLY - Runs only from root Claude Code agent after HITL approval.
Purpose: Persist approved PRD artifacts to epic directory Trigger: After hitl-approval phase completes in /architect workflow Input: PRD content, user stories, execution plan, innovations, architecture notes Output: Complete epic directory ready for /build execution
1. Detect project prefix
git remote get-url origin| Remote Contains | Prefix |
|---|---|
| metasaver-marketplace | msm |
| multi-mono | mum |
| rugby-crm / commithub | chc |
| metasaver-com | msc |
2. Auto-increment epic number
docs/epics/in-progress/docs/epics/completed/docs/epics/backlog/{prefix}NNN-* pattern007)0013. Create epic directory
docs/epics/in-progress/{prefix}-{kebab-case-name}/docs/epics/in-progress/msm-user-authentication-api/docs/epics/in-progress/ parent exists{epic-dir}/
├── prd.md
├── user-stories/
├── execution-plan.md
├── innovations-selected.md # Optional - only if innovations selected
└── architecture-notes.md
4. Save prd.md
{epic-dir}/prd.md5. Save user-stories/ directory
{epic-dir}/user-stories/ subdirectory{PROJECT}-{EPIC}-{NNN}-{slug}.md (e.g., msm-auth-001-user-login.md)6. Save execution-plan.md
{epic-dir}/execution-plan.md7. Save innovations-selected.md (conditional)
{epic-dir}/innovations-selected.md8. Save architecture-notes.md
{epic-dir}/architecture-notes.md9. Output final instruction
Run /build {absolute-path}/prd.mdRun /build /home/user/repo/docs/epics/in-progress/msm-user-auth/prd.mdfunction getNextEpicNumber(prefix):
folders = listDirectories("docs/epics/in-progress/")
folders += listDirectories("docs/epics/completed/")
folders += listDirectories("docs/epics/backlog/")
existingNumbers = []
for folder in folders:
if folder matches pattern "{prefix}(\d{3})-.*":
existingNumbers.append(extractNumber(folder))
if existingNumbers is empty:
return "001"
maxNumber = max(existingNumbers)
return zeroPad(maxNumber + 1, 3)
docs/epics/in-progress/{prefix}-{name}/)user-stories/ subdirectoryprd.mdUS-{NNN}-{slug}.md fileexecution-plan.mdinnovations-selected.md (if applicable)architecture-notes.md| Input PRD Title | Project | Generated Directory Name |
|---|---|---|
| "User Authentication API" | metasaver-mktpl | docs/epics/in-progress/msm-user-authentication-api/ |
| "Dashboard Feature" | multi-mono | docs/epics/in-progress/mum-dashboard-feature/ |
| "Stripe Integration Setup" | rugby-crm | docs/epics/in-progress/chc-stripe-integration-setup/ |
Rules:
| Story ID | Story Title | Generated Filename |
|---|---|---|
| msm-auth-001 | "User Authentication" | msm-auth-001-user-authentication.md |
| msm-auth-002 | "Token Service" | msm-auth-002-token-service.md |
| chb-dash-015 | "Dashboard Widgets API" | chb-dash-015-dashboard-widgets.md |
Rules:
If directory with epic number exists:
If prefix detection fails:
If parent doesn't exist:
docs/epics/in-progress/ directory firstIf write fails:
Called by:
/architect command (Phase 7: Output)Calls:
Next step: User executes /build {prd-path}
Input:
PRD Title: "User Authentication API"
Project: metasaver-marketplace (detected from git remote)
Stories: 5 enriched stories with architecture notes
Execution Plan: 3 waves, 5 TDD pairs
Innovations: 2 selected (passwordless auth, MFA)
Architecture Notes: Multi-mono findings, Context7 validation
Save PRD Phase (this skill):
1. Detect prefix: "msm" (from git remote containing "metasaver-marketplace")
2. Scan docs/epics/in-progress/, docs/epics/completed/, docs/epics/backlog/
3. Create directory: docs/epics/in-progress/msm-user-authentication-api/
4. Write prd.md (all sections)
5. Write user-stories/:
- msm-auth-001-auth-schema.md
- msm-auth-002-auth-service.md
- msm-auth-003-token-service.md
- msm-auth-004-login-endpoint.md
- msm-auth-005-logout-endpoint.md
6. Write execution-plan.md (3 waves, dependencies)
7. Write innovations-selected.md (passwordless, MFA)
8. Write architecture-notes.md (multi-mono, patterns)
9. Output: "Run /build /home/user/repo/docs/epics/in-progress/msm-user-authentication-api/prd.md"
Result:
docs/epics/in-progress/msm-user-authentication-api/
├── prd.md
├── user-stories/
│ ├── msm-auth-001-auth-schema.md
│ ├── msm-auth-002-auth-service.md
│ ├── msm-auth-003-token-service.md
│ ├── msm-auth-004-login-endpoint.md
│ └── msm-auth-005-logout-endpoint.md
├── execution-plan.md
├── innovations-selected.md
└── architecture-notes.md