Generic Doc Runner with PRD Template Standardization Protoype

This commit is contained in:
Brian Madison 2025-06-04 00:27:04 -05:00
parent eec3382bfb
commit bd6b5b75fd
8 changed files with 129 additions and 69 deletions

View File

@ -30,7 +30,8 @@ Example: If above cfg has `agent-root: root/foo/` and `tasks: (agent-root)/tasks
- Description: "Main goal is to help produce or maintain the best possible PRD and represent the end user the product will serve."
- Persona: "pm.md"
- Tasks:
- [Create PRD](create-prd.md)
- [Create Document](tasks#create-doc-from-template):
- [Prd](templates#prd-tmpl)
## Title: Architect

View File

@ -6,24 +6,17 @@
- Enable deeper exploration of ideas through structured elicitation techniques
- Support iterative refinement through multiple analytical perspectives
## Instructions
## Task Instructions
### 1. When to Apply
### 1. Ask for review and Present Action List
Apply this protocol when:
[[LLM: Ask the user to review the {drafted document section, or context or document this protocol was executed from}. In the SAME message, inform them that they can suggest additions, removals, or modifications, OR they can select an action by number from the 'Advanced Reflective, Elicitation & Brainstorming Actions'. Then, present ONLY the numbered list (0-9) of these actions as defined in tasks#advanced-elicitation. Conclude by stating that selecting 9 will proceed to the next section. Await user selection. If an elicitation action (0-8) is chosen, execute it and then re-offer this combined review/elicitation choice. If option 9 is chosen, or if the user provides direct feedback on requirements, proceed accordingly.]]
- Other tasks/templates indicate to use `tasks#advanced-elicitation`
- After presenting a document section that would benefit from refinement
- User requests brainstorming or deeper exploration of content
- Content needs additional validation or alternative perspectives
### 2. Present Action List
**Present ONLY the numbered list (0-9) with this exact format:**
**Present the numbered list (0-9) with this exact format:**
```
Advanced Reflective, Elicitation & Brainstorming Actions
Choose an action (0-9 - 9 to bypass):
**Advanced Reflective, Elicitation & Brainstorming Actions**
Choose an action (0-9 - 9 to bypass - HELP for explanation of these options):
0. Expand or Contract for Audience
1. Explain Reasoning (CoT Step-by-Step)
@ -37,21 +30,21 @@ Choose an action (0-9 - 9 to bypass):
9. Proceed / No Further Actions
```
### 3. Processing Guidelines
### 2. Processing Guidelines
**Do NOT show:**
- The full protocol text with `[[LLM: ...]]` instructions
- Detailed explanations of each option unless executing
- Detailed explanations of each option unless executing or the user asks, when giving the definition you can modify to tie its relevance
- Any internal template markup
**After user selection:**
**After user selection from the list:**
- Execute the chosen action according to the protocol instructions below
- Ask if they want to select another action or proceed with option 9 once complete
- Continue until user selects option 9 or indicates completion
### 4. Action Definitions
## Action Definitions
0. Expand or Contract for Audience
[[LLM: Ask the user whether they want to 'expand' on the content (add more detail, elaborate) or 'contract' it (simplify, clarify, make more concise). Also, ask if there's a specific target audience they have in mind. Once clarified, perform the expansion or contraction from your current role's perspective, tailored to the specified audience if provided.]]
@ -72,7 +65,7 @@ Choose an action (0-9 - 9 to bypass):
[[LLM: Based on your role's expertise, brainstorm potential risks, overlooked edge cases, or unintended consequences related to the current content or proposal.]]
6. Challenge from Critical Perspective (Self or Other Persona)
[[LLM: Adopt a critical perspective on the current content. If the user specifies another role or persona (e.g., 'as a customer', 'as [Another Persona Name]'), critique the content or play devil's advocate from that specified viewpoint. If no other role is specified, play devil's advocate from your own current persona's viewpoint, arguing against the proposal or current content and highlighting weaknesses or counterarguments specific to your concerns.]]
[[LLM: Adopt a critical perspective on the current content. If the user specifies another role or persona (e.g., 'as a customer', 'as [Another Persona Name]'), critique the content or play devil's advocate from that specified viewpoint. If no other role is specified, play devil's advocate from your own current persona's viewpoint, arguing against the proposal or current content and highlighting weaknesses or counterarguments specific to your concerns. This can also randomly include YAGNI when appropriate, such as when trimming the scope of an MVP, the perspective might challenge the need for something to cut MVP scope.]]
7. Explore Diverse Alternatives (ToT-Inspired)
[[LLM: From your role's perspective, first broadly brainstorm a range of diverse approaches or solutions to the current topic. Then, from this wider exploration, select and present 2 distinct alternatives, detailing the pros, cons, and potential implications you foresee for each.]]

View File

@ -0,0 +1,93 @@
# Create Document from Template Task
## Purpose
- Generate documents from any specified template following embedded instructions
- Support multiple document types through template-driven approach
- Enable any persona to create consistent, well-structured documents
## Instructions
### 1. Identify Template and Context
- Determine which template to use (user-provided or list available for selection to user)
- agent-config specific agents will list what docs they have available under this task, for each item consider it a unique task. So if the user had for example:
@{example}
- tasks:
- [Create Document](tasks#create-doc-from-template):
- [Prd](templates#prd-tmpl)
- [Architecture](templates#architecture-tmpl)
@{/example}
you would list `Create Document PRD` and `Create Document Architecture` as tasks the agent could perform.
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document
- Understand the document purpose and target audience
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory
- Follow ALL embedded LLM instructions within the template
- Process template markup according to `templates#template-format` conventions
### 4. Template Processing Rules
**CRITICAL: Never display template markup, LLM instructions, or examples to users**
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process <<REPEAT>> sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them
### 5. Content Generation
- **Incremental Mode**: Present each major section for review before proceeding
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation
If template specifies a checklist:
- Run the appropriate checklist against completed document
- Document completion status for each item
- Address any deficiencies found
- Present validation summary to user
### 7. Final Presentation
- Present clean, formatted content only
- Ensure all sections are complete
- DO NOT truncate or summarize content
- Begin directly with document content (no preamble)
- Include any handoff prompts specified in template
## Key Resources
- **Template Format:** `templates#template-format`
- **Available Templates:** All files in `templates#` directory
- **Checklists:** As specified by template or persona
- **User Preferences:** `data#technical-preferences`
## Important Notes
- This task is template and persona agnostic
- All specific instructions are embedded in templates
- Focus on faithful template execution and clean output
- Template markup is for AI processing only - never expose to users

View File

@ -4,13 +4,13 @@
- Transform inputs into core product definition documents conforming to a PRD template
- Define clear MVP scope focused on essential functionality
- Provide foundation for Architect and AI dev agents
- Provide foundation for Architect and Design Architect to help create technical artifacts which will in turn later draft further details for very junior engineers or simple dev ai agents.
## Instructions
### 1. Review Inputs
Review all provided inputs including project brief, research documents, and user ideas to guide PRD generation.
Review all provided inputs including project brief, research documents, prd template and user ideas to guide PRD generation.
### 2. Determine Interaction Mode
@ -25,7 +25,6 @@ Confirm with the user their preferred interaction style:
- Use the `prd-tmpl` template (or user-specified alternative template)
- Follow all embedded LLM instructions within the template
- Template contains section-specific guidance and examples
- Apply `tasks#advanced-elicitation` protocol where template indicates
### 4. Template Processing Notes
@ -40,22 +39,10 @@ Process all template elements according to `templates#template-format` conventio
- Present only the final, clean content to users
- Replace template variables with actual project-specific content
- Show examples only when they add value, without the markup
- Process all conditional logic internally - show only relevant sections
- For Canvas mode: Update the document with clean, formatted content only
### 6. Advanced Elicitation Techniques Protocol
When the template indicates to apply `tasks#advanced-elicitation` - execute on the task instructions.
### 7. Validate with Checklist
- Run the `pm-checklist` against completed PRD
- Document completion status for each checklist item
- Present summary by section, address any deficiencies
- Generate final checklist report with findings and resolutions
### 8. Prepare Handoffs
### 7. Prepare Handoffs
Based on PRD content, prepare appropriate next-step prompts:
@ -70,6 +57,13 @@ Based on PRD content, prepare appropriate next-step prompts:
- Add Architect prompt in designated template section
- Recommend proceeding directly to Architect
### 8. Validate with Checklist
- Run the `pm-checklist` against completed PRD
- Document completion status for each checklist item
- Present summary by section, address any deficiencies
- Generate final checklist report with findings and resolutions
### 9. Final Presentation
**General Guidelines:**
@ -91,6 +85,5 @@ Based on PRD content, prepare appropriate next-step prompts:
- This task is template-agnostic - users may specify custom templates
- All detailed instructions are embedded in templates, not this task file
- Focus on orchestration and workflow, not content specifics
- Maintain flexibility for different template structures
- **Template markup is for AI processing only - users should never see internal directives**
- Focus on orchestration and workflow
- **Template markup is for AI processing only - users should never see output indicators from templates#template-format**

View File

@ -1,5 +1,7 @@
# {{Project Name}} Product Requirements Document (PRD)
[[LLM: If available, review any provided document or ask if any are optionally available: Project Brief]]
## Goals and Background Context
[[LLM: Populate the 2 child sections based on what we have received from user description or the provided brief. Allow user to review the 2 sections and offer changes before proceeding]]
@ -14,7 +16,7 @@
## Requirements
[[LLM: Draft the list of functional and non functional requirements under the two child sections, and then ask the users to review each one.]]
[[LLM: Draft the list of functional and non functional requirements under the two child sections, and immediately execute tasks#advanced-elicitation display]]
### Functional
@ -26,20 +28,18 @@
[[LLM: Each Requirement will be a bullet markdown and an identifier sequence starting with NFR`.]]
@{example: - NFR1: AWS service usage **must** aim to stay within free-tier limits where feasible.}
[[LLM: Follow the `tasks#advanced-elicitation` protocol letting the user know he can do it for any section thus far. Do not proceed until user selects option 9.]]
^^CONDITION: has_ui^^
## User Interface Design Goals
[[LLM: Capture high-level UI/UX vision to guide Design Architect and inform story creation. Steps:
[[LLM: Capture high-level UI/UX vision to guide Design Architect and to inform story creation. Steps:
1. Pre-fill all subsections with educated guesses based on project context
2. Present the complete rendered section to user
3. Clearly let the user know where assumptions were made
4. Ask targeted questions for unclear/missing elements or areas needing more specification
5. This is NOT detailed UI spec - focus on product vision and user goals
6. After section completion, apply `tasks#advanced-elicitation` protocol]]
6. After section completion, immediately apply `tasks#advanced-elicitation` protocol]]
### Overall UX Vision
@ -104,7 +104,7 @@
## Epics
[[LLM: First, present a high-level list of all epics for user approval, the epic_list. Each epic should have a title and a short (1 sentence) goal statement. This allows the user to review the overall structure before diving into details.
[[LLM: First, present a high-level list of all epics for user approval, the epic_list and immediately execute tasks#advanced-elicitation display. Each epic should have a title and a short (1 sentence) goal statement. This allows the user to review the overall structure before diving into details.
CRITICAL: Epics MUST be logically sequential following agile best practices:
@ -130,7 +130,7 @@ CRITICAL: Epics MUST be logically sequential following agile best practices:
@{/example}
[[LLM: After the epic list is approved, present each `epic_details` with all its stories and acceptance criteria as a complete review unit. Before going to the next epic, apply `tasks#advanced-elicitation` protocol.]]
[[LLM: After the epic list is approved, present each `epic_details` with all its stories and acceptance criteria as a complete review unit and immediately execute tasks#advanced-elicitation display, before moving on to the next epic.]]
<<REPEAT: epic_details>>
@ -187,7 +187,7 @@ so that {{benefit}}.
## Checklist Results Report
[[LLM: This section will be populated if/after running the PM checklist]]
[[LLM: Before running the checklist and drafting the prompts, offer to output the full updated PRD. If outputting it, confirm with the user that you will be proceeding to run the checklist and produce the report. Once the user confirms, execute the `pm-checklist` and populate the results in this section.]]
----- END Checklist START Design Architect `UI/UX Specification Mode` Prompt ------

View File

@ -45,7 +45,7 @@
## PM Prompt
This Project Brief provides the full context for {Project Name}. Please start in 'PRD Generation Mode', review the brief thoroughly to work with the user to create the PRD section by section 1 at a time, asking for any necessary clarification or suggesting improvements as your mode 1 programming allows.
This Project Brief provides the full context for {Project Name}. Please start in 'PRD Generation Mode', review the brief thoroughly to work with the user to create the PRD section by section as the template indicates, asking for any necessary clarification or suggesting improvements as your mode 1 programming allows.
<example_handoff_prompt>
This Project Brief provides the full context for Mealmate. Please start in 'PRD Generation Mode', review the brief thoroughly to work with the user to create the PRD section by section 1 at a time, asking for any necessary clarification or suggesting improvements as your mode 1 programming allows.</example_handoff_prompt>

View File

@ -19,9 +19,6 @@
- "Brain Storming"
- "Deep Research"
- "Project Briefing"
- Interaction Modes:
- "Interactive"
- "YOLO"
- templates:
- [Project Brief Tmpl](templates#project-brief-tmpl)
@ -34,15 +31,11 @@
- checklists:
- [Pm Checklist](checklists#pm-checklist)
- [Change Checklist](checklists#change-checklist)
- templates:
- [Prd Tmpl](templates#prd-tmpl)
- tasks:
- [Create Prd](tasks#create-prd)
- [Create Document](tasks#create-doc-from-template):
- [Prd](templates#prd-tmpl)
- [Correct Course](tasks#correct-course)
- [Create Deep Research Prompt](tasks#create-deep-research-prompt)
- Interaction Modes:
- "Interactive"
- "YOLO"
## Title: Architect
@ -57,9 +50,6 @@
- tasks:
- [Create Architecture](tasks#create-architecture)
- [Create Deep Research Prompt](tasks#create-deep-research-prompt)
- Interaction Modes:
- "Interactive"
- "YOLO"
## Title: Design Architect
@ -76,9 +66,6 @@
- [Create Frontend Architecture](tasks#create-frontend-architecture)
- [Create Ai Frontend Prompt](tasks#create-ai-frontend-prompt)
- [Create UX/UI Spec](tasks#create-uxui-spec)
- Interaction Modes:
- "Interactive"
- "YOLO"
## Title: PO
@ -95,9 +82,6 @@
- [Checklist Run Task](tasks#checklist-run-task)
- [Extracts Epics and shards the Architecture](tasks#doc-sharding-task)
- [Correct Course](tasks#correct-course)
- Interaction Modes:
- "Interactive"
- "YOLO"
## Title: SM
@ -111,6 +95,3 @@
- [Draft a story for dev agent](tasks#story-draft-task)
- templates:
- [Story Tmpl](templates#story-tmpl)
- Interaction Modes:
- "Interactive"
- "YOLO"

View File

@ -1 +0,0 @@
# ./web-build-sample