**Follow:** `_common.guardrails.md`
Generates user and system flow artifacts from PRD while writing large files to disk and keeping terminal output minimal.
/plugin marketplace add KreativReason/merged-end-to-end-ai-dpp---e2e-cli/plugin install kreativreason-e2e-pipeline@kreativreason-marketplaceFollow: _common.guardrails.md
Transform the PRD into comprehensive user flows and system interaction diagrams while keeping terminal/chat output minimal. All large artifacts are written to disk in shards. Final flow size is unlimited; only the chat output is kept small.
prd_path: Path to validated PRD JSON filedocs/voiceflow-ai-prd.json (or docs/prd.json - primary input)app/models.py (provides FlowModel for validation)docs/adr.json (if exists, for architectural decisions)docs/
flows/
user/ # one file per user flow
FLOW-001.json
FLOW-002.json
...
system/ # one file per system flow
SFLOW-001.json
...
integrations.json
assumptions.json
index.json # small manifest for navigation (chat-safe)
final_flow.json # optional merged artifact (unlimited size)
validation_report.json
Analyze the PRD (and ADRs if present) to produce:
FlowModel from app/models.py../docs/flows/user/FLOW-XXX.json.FLOW-001, FLOW-002, …STEP-001, STEP-002, …WROTE ./docs/flows/user/FLOW-XXX.json./docs/flows/system/SFLOW-XXX.json.WROTE ./docs/flows/system/SFLOW-XXX.json./docs/flows/integrations.json and ./docs/flows/assumptions.json. Print only file paths../docs/flows/index.json with:
artifact_type: "flow_index"user/, system/, final_flow.json{id, path, sha256, bytes} for each shardWROTE ./docs/flows/index.json./docs/flows/final_flow.json by merging all shards into the target schema under:
{
"artifact_type": "flow",
"status": "complete",
"validation": "unknown",
"approval_required": true,
"approvers": ["Cynthia","Hassan"],
"next_phase": "erd_design",
"data": {
"project_name": "...",
"version": "...",
"created_at": "ISO-8601",
"user_flows": [...],
"system_flows": [...],
"integrations": [...],
"assumptions": [...]
}
}
WROTE ./docs/flows/final_flow.jsonFlowModel../docs/flows/validation_report.json with passed|failed and any errors.VALIDATION: passed (or failed) and the path to the report.FlowModel in app/models.pyFLOW-001, FLOW-002, etc. (never regenerate)STEP-001, STEP-002, etc.feature_id and story_ids reference valid PRD entriesconditionsWROTE ./docs/flows/user/FLOW-003.jsonWROTE ./docs/flows/system/SFLOW-002.jsonWROTE ./docs/flows/index.jsonVALIDATION: passed • report ./docs/flows/validation_report.jsonAt completion, respond with this compact JSON (≤ 1k tokens). Do not inline large content:
{
"artifact_type": "flow_manifest",
"status": "complete",
"validation": "<passed|failed>",
"approval_required": true,
"approvers": ["Cynthia","Hassan"],
"next_phase": "erd_design",
"index_path": "docs/flows/index.json",
"final_path": "docs/flows/final_flow.json",
"validation_report_path": "docs/flows/validation_report.json",
"counts": { "user_flows": <n>, "system_flows": <m> }
}
{
"artifact_type": "flow",
"status": "complete",
"validation": "passed",
"approval_required": true,
"approvers": ["Cynthia", "Hassan"],
"next_phase": "erd_design",
"data": {
"project_name": "string",
"version": "string",
"created_at": "ISO-8601",
"user_flows": [
{
"id": "FLOW-001",
"name": "string",
"description": "string",
"feature_id": "FR-001",
"story_ids": ["ST-001"],
"actor": "user|admin|system",
"trigger": "string",
"steps": [
{
"id": "STEP-001",
"sequence": 1,
"action": "string",
"actor": "user|system",
"inputs": [],
"outputs": [],
"conditions": [],
"next_steps": ["STEP-002"]
}
],
"success_criteria": ["string"],
"error_handling": []
}
],
"system_flows": [
{
"id": "SFLOW-001",
"name": "string",
"description": "string",
"components": ["api", "database", "cache"],
"steps": [],
"data_flow": [],
"error_handling": []
}
],
"integrations": [],
"assumptions": []
}
}
On validation failure, write:
{
"error": {
"code": "FLOW_VALIDATION_FAILED",
"message": "Flow does not match required schema",
"details": ["Invalid feature_id reference: FR-999"],
"artifact": "flow",
"remediation": "Fix feature references and regenerate flows"
}
}
to ./docs/flows/validation_report.json, and print only:
VALIDATION: failed • report ./docs/flows/validation_report.json
Use @agents/Flow.agent.md
prd_path: @docs/voiceflow-ai-prd.json
After successful completion, this agent requires approval from:
Do not proceed to ERD design until explicit human approval is received.
To keep chat output conservative, you can export:
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=8000
This doesn't limit the artifact size on disk—only how much the model attempts to print to the terminal.
You are an elite AI agent architect specializing in crafting high-performance agent configurations. Your expertise lies in translating user requirements into precisely-tuned agent specifications that maximize effectiveness and reliability.