Shared Workflow Generation
"Parallel workflow generation – one sub-agent per agent, no write conflicts."
When to Use This Skill
Use when:
- Running PRD Starter wizard Phase 11
- Generating workflow documentation for all agents
Use proactively:
- After all agents, skills, and files have been generated
- Before displaying final summary to user
Quick Start
<examples> Example 1: Launch all workflow generators ``` # Detect enabled agents from prd.json # Launch parallel sub-agents: Task("workflow-generator", { agent_name: "pm", output: "pm-coordinator.md" }) Task("workflow-generator", { agent_name: "developer", output: "developer.md" }) Task("workflow-generator", { agent_name: "qa", output: "qa.md" }) Task("devcycle-generator", { output: "development-cycle.md" }) ```Example 2: Verify outputs
ls docs/workflows/
# Expected: pm-coordinator.md, developer.md, qa.md, development-cycle.md
Example 3: Generate index
# Agent Workflows Index
- **[Development Cycle](./development-cycle.md)**
- **[PM Coordinator](./pm-coordinator.md)**
- **[Developer](./developer.md)**
- **[QA Validator](./qa.md)**
</examples>
Parallel Execution Strategy
Each workflow document generated by separate sub-agent:
┌─────────────────────────────────────────────────────┐
│ WORKFLOW GENERATION ORCHESTRATOR │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ pm │ │ developer│ │ qa │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │pm-coord.md│ │developer.md│ │ qa.md │ │
│ └─────────┘ └─────────┘ └─────────┘ │
│ │
│ ┌─────────┐ │
│ │devcycle │ │
│ └────┬────┘ │
│ ▼ │
│ ┌─────────┐ │
│ │dev-cycle.md│ │
│ └─────────┘ │
└─────────────────────────────────────────────────────┘
Your Process
1. Detect Enabled Agents
Read prd.json.agents for enabled agents.
2. Create Output Directory
mkdir -p docs/workflows
3. Launch Parallel Sub-Agents
Send ALL Task invocations in a single message:
Task("workflow-generator", {
agent_name: "pm",
output_file: "pm-coordinator.md",
source_file: "agents/pm/AGENT.md"
})
Task("workflow-generator", {
agent_name: "developer",
output_file: "developer.md",
source_file: "agents/developer/AGENT.md"
})
// ... one for each enabled agent
Task("devcycle-generator", {
output_file: "development-cycle.md"
})
4. Wait for Completion
Each sub-agent confirms: Generated workflow documentation: {filename}
5. Verify Outputs
Expected files:
pm-coordinator.mddeveloper.mdtechartist.mdqa.mdgamedesigner.mddevelopment-cycle.md
6. Generate Index
Create docs/workflows/index.md with links to all workflows.
Agent Mapping
| Agent | Type | Output File | Source File |
|-------|------|-------------|-------------|
| PM | coordinator | pm-coordinator.md | agents/pm/AGENT.md |
| Developer | worker | developer.md | agents/developer/AGENT.md |
| Tech Artist | worker | techartist.md | agents/techartist/AGENT.md |
| QA | worker | qa.md | agents/qa/AGENT.md |
| Game Designer | worker | gamedesigner.md | agents/gamedesigner/AGENT.md |
| - | orchestration | development-cycle.md | (from docs) |
Error Handling
If sub-agent fails:
- Note the error
- Continue with other agents
- Report summary of succeeded/failed
- Offer retry for failed workflows
Success Criteria
- All enabled agent workflow files created
development-cycle.mdcreated- YAML frontmatter valid in all files
- Index file created with links
微信扫一扫