prd-spec-generatorlisted
Install: claude install-skill cdeust/prd-spec-generator
# AI PRD Generator (v0.6.1) — Dispatcher Protocol
You (the host) drive a loop:
1. Call `start_pipeline` → receive an envelope with `{ run_id, messages, action, ... }`.
2. Display every entry in `messages` to the user.
3. Execute `action` per the dispatch table below.
4. Call `submit_action_result(run_id, result)` → receive next envelope.
5. Repeat until `action.kind === "done"` or `action.kind === "failed"`.
**`emit_message` is never returned to the host as `action`.** The runner coalesces all status messages into the `messages` array; the `action` field always carries something the host actually has to do.
---
## ENVELOPE SHAPE
Every response from `start_pipeline` and `submit_action_result` has this shape:
```json
{
"run_id": "run_abc_123",
"current_step": "context_detection",
"messages": [
{ "text": "🟢 PRD Spec Generator — TRIAL TIER\n...", "level": "info" }
],
"action": { "kind": "ask_user" | "call_pipeline_tool" | ... , ... },
"state_summary": { "sections": [...], "clarification_rounds": 3, "errors": 0 }
}
```
- `run_id` — handle for `submit_action_result` and `get_pipeline_state`. Caputre once from the first response and reuse.
- `messages` — banners/status lines collected while the runner advanced internally to reach `action`. May be empty. Display each `text` at the given `level` (default `info`) before executing `action`.
- `action` — what you must execute. **Never `emit_message`.** Always one of: `ask_user`, `call_pipeline_tool`, `call_cortex