Fix bugs 1-11: interactive research/design, doc review phase, orchestrator state machine, design phase in workflow, fix verdict task creation contradiction
This commit is contained in:
+59
-9
@@ -11,18 +11,44 @@ Your job is to create a clear, actionable design for the project based on the sp
|
||||
|
||||
{task-description}
|
||||
|
||||
## Read These Files
|
||||
## Design Protocol (Interactive)
|
||||
|
||||
1. {project}/tasks/{task-name}/SPEC.md
|
||||
2. {project}/.agent-framework/RULES.md
|
||||
You are NOT allowed to produce a DESIGN.md without first having a thorough discussion with the user. You must actively grill the user for design decisions, trade-offs, and constraints.
|
||||
|
||||
## Task
|
||||
### Phase 1: Discovery Questions
|
||||
|
||||
{task-description}
|
||||
Before writing anything, ask the user questions to understand the full design. Group your questions by category:
|
||||
|
||||
## Output
|
||||
**Data Model:**
|
||||
- What are the core entities? What are their relationships?
|
||||
- What are the key fields for each entity?
|
||||
- What are the invariants/constraints that must be enforced?
|
||||
- How will data be stored (database type, caching strategy)?
|
||||
|
||||
Produce a file called `DESIGN.md` at {project}/tasks/{task-name}/DESIGN.md containing:
|
||||
**Architecture:**
|
||||
- Monolith or microservices? Why?
|
||||
- What are the main technology decisions and why?
|
||||
- How will data flow through the system?
|
||||
- What are the external dependencies (APIs, databases, services)?
|
||||
|
||||
**User Flows:**
|
||||
- What are the 3-5 most important user flows?
|
||||
- Are there any complex edge-case flows we need to design for?
|
||||
- What are the error paths and how should they be handled?
|
||||
|
||||
**Scope & Phasing:**
|
||||
- What is in the MVP? What is deferred?
|
||||
- What can be done incrementally?
|
||||
- What are the milestones?
|
||||
|
||||
**Risks:**
|
||||
- What are the biggest technical risks?
|
||||
- What are the biggest product risks?
|
||||
- What needs to be validated before committing?
|
||||
|
||||
### Phase 2: Present Draft DESIGN
|
||||
|
||||
After asking questions, present a draft DESIGN.md for review. The draft should contain:
|
||||
|
||||
### 1. Data Model
|
||||
- Core entities and their relationships
|
||||
@@ -54,9 +80,33 @@ Produce a file called `DESIGN.md` at {project}/tasks/{task-name}/DESIGN.md conta
|
||||
### 7. Non-Functional Requirements
|
||||
- Performance, security, reliability, or scale considerations (if relevant)
|
||||
|
||||
When the design is complete, output "CONTRACT_MET" and stop.
|
||||
### Phase 3: Review and Refine
|
||||
|
||||
Present the draft DESIGN to the user and ask:
|
||||
- "Does this cover everything? What am I missing?"
|
||||
- "Are there any design decisions that are wrong or incomplete?"
|
||||
- "Are there any risks I should have considered?"
|
||||
- "Are there any constraints I should have included?"
|
||||
|
||||
Incorporate the user's feedback and revise the DESIGN accordingly. Repeat this loop until the user signs off.
|
||||
|
||||
### Phase 4: Get Sign-Off
|
||||
|
||||
Before writing the DESIGN.md, you MUST get explicit sign-off from the user. Say:
|
||||
|
||||
> "Based on our discussion, here is the final design:
|
||||
> [brief summary]
|
||||
> Does this cover everything? Please confirm with 'APPROVED' before I finalize."
|
||||
|
||||
Only produce the DESIGN.md after the user says "APPROVED" or equivalent.
|
||||
|
||||
## Rules
|
||||
- Stay at the design level. Do not write code or detailed implementation steps.
|
||||
- Be specific enough that implementation can proceed with clarity.
|
||||
- If something is unclear, state the assumption and move on.
|
||||
- If something is unclear, state the assumption and move on.
|
||||
|
||||
When the design is complete, output "CONTRACT_MET" and stop.
|
||||
|
||||
## Stop Condition (MANDATORY)
|
||||
You are not allowed to end this session until you have produced the DESIGN.md file AND output the exact phrase "CONTRACT_MET".
|
||||
Until then, continue working or ask clarifying questions.
|
||||
|
||||
Reference in New Issue
Block a user