epic-04/06: restructure SKILL.md as orchestrator with subagent delegation - #29
epic-04/06: restructure SKILL.md as orchestrator with subagent delegation#29mtalvi wants to merge 7 commits into
Conversation
Define the YAML structure for .rhoai-qs/pipeline/discovery-spec.yaml, the interview plan contract between initial input analysis and PRD generation. Includes spec_version header, acceptance criteria (all user-approved), validation rules, and a concrete example. Co-authored-by: Cursor <cursoragent@cursor.com>
Discovery runs in the factory repo where multiple quickstart ideas may coexist. Use .rhoai-qs/<slug>/pipeline/ instead of .rhoai-qs/pipeline/ so specs don't overwrite each other. Added exception note to pipeline-convention.md. Co-authored-by: Cursor <cursoragent@cursor.com>
Five concern areas the agent reasons about organically during PRD generation: scope creep, technology bias, GPU assumptions, completeness without over-specification, and user voice fidelity. Follows the concern-area format from docs/foundation/reasoning-guardrails-template.md. Co-authored-by: Cursor <cursoragent@cursor.com>
Rewrite discovery SKILL.md from a flat skill into an orchestrator with 8 workflow phases, subagent delegation via file-path passing, and spec-as-contract integration. Preserves all domain content (interview questions, requirement mapping, issue destinations, gap analysis mode) while delegating document parsing and backlog matching to subagents. Co-authored-by: Cursor <cursoragent@cursor.com>
Point SKILL.md gap analysis mode at references/gap-analysis-template.md instead of output-templates.md, following the split in the 01 branch. Co-authored-by: Cursor <cursoragent@cursor.com>
List references/gap-analysis-template.md in the main agent reads table so the document inventory is complete after the split. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
eef719c to
b6caafa
Compare
YosiElias
left a comment
There was a problem hiding this comment.
Thanks @mtalvi !
I've left a few comments, but besides that, it looks great! 🚀
Just a small question - do you happen to remember the token usage for this run, including the sub-agents? I think we should start tracking it so we keep agents in their context window "sweet spot".
| - [ ] 6. Write PRD to data/prds/<slug>.md | ||
| - [ ] 7. Confirm with user before rh-qs-architect | ||
| ``` | ||
| ### Phase 7: PRD Validation and Refinement |
There was a problem hiding this comment.
I really like that you performed validation before writing the PRD, that's great and will save tokens.
I highly recommend splitting this validation into a sub-agent since the main agent is already biased in this phase. Of course, the sub-agent will not be allowed to change the draft, but only make recommendations to the main agent - this way, we ensure changes are made with a broader perspective (main agent) and reviews are done from a clean context (sub-agent).
| **Gap questions (always ask when relevant):** | ||
| **Gap questions (ask when relevant to the idea):** | ||
|
|
||
| - Will this need RAG? |
There was a problem hiding this comment.
This one feels like a specific question rather than a general gap.
Also, just a suggestion, but maybe we could give the agent a bit more freedom to choose its own questions in this gap part (like a "grill-me" style)? We could just instruct it to ask whenever something is unclear rather than specific questions. WDYT?
| |------|------| | ||
| | [reasoning-guardrails.md](./reasoning-guardrails.md) | Phase 7 — PRD validation and refinement | | ||
| | [spec-template.md](./spec-template.md) | Phase 4 — generating the discovery spec | | ||
| | [output-templates.md](./output-templates.md) | Phase 8 — writing the final PRD | |
There was a problem hiding this comment.
prd-structurer subagent also read this file
| ## Trigger | ||
| ## Goal | ||
|
|
||
| Produce a validated Product Requirements Document (PRD) at `data/prds/<slug>.md` that is ready for handoff to `rh-qs-architect`. The PRD captures the user's quickstart idea with enough detail for architectural design without pre-deciding implementation choices. |
Related Ticket:
APPENG-5568
Summary
Rewrites
rh-qs-discovery/SKILL.mdfrom a flat instruction file into a phased orchestrator that delegates focused work to subagents and references all supporting documents created in PRs 01-05.What changed
The original SKILL.md was a single flat document with interview questions, requirement mappings, and a simple 7-step workflow checklist. The rewrite restructures it into an 8-phase orchestrator:
Key design decisions
Test plan
name,description,argument-hint,allowed-toolsreasoning-guardrails.md,spec-template.md,output-templates.md,references/gap-analysis-template.md,subagents/prd-structurer-prompt.md,subagents/backlog-matcher-prompt.mdreferences/gap-analysis-template.md(notoutput-templates.md)rh-qs-discovery/exceptgh-backlog-readerscript path