diff --git a/apps/backend/prediction/checklist_generator.py b/apps/backend/prediction/checklist_generator.py index 1ecabdf1..54e00bd2 100644 --- a/apps/backend/prediction/checklist_generator.py +++ b/apps/backend/prediction/checklist_generator.py @@ -146,6 +146,22 @@ class ChecklistGenerator: f"Test in browser: {verification.get('scenario', 'Check functionality')}" ) elif ver_type == "command": - reminders.append(f"Run command: {verification.get('run', '')}") + reminders.append( + f"Run command: {verification.get('run', verification.get('command', ''))}" + ) + elif ver_type == "e2e": + steps = verification.get("steps", []) + if steps: + reminders.append( + f"E2E verification: {len(steps)} steps to complete" + ) + else: + reminders.append("E2E verification required") + elif ver_type == "manual": + reminders.append( + f"Manual check: {verification.get('instructions', 'Verify manually')}" + ) + elif ver_type == "none": + pass # No reminder needed return reminders diff --git a/apps/backend/prompts/coder.md b/apps/backend/prompts/coder.md index 223e4251..2c0e7b74 100644 --- a/apps/backend/prompts/coder.md +++ b/apps/backend/prompts/coder.md @@ -727,6 +727,19 @@ curl -X [method] [url] -H "Content-Type: application/json" -d '[body]' # Use combination of API calls and browser automation ``` +**Manual Verification:** +``` +# For verification.type = "manual" +# Read the instructions field and perform the described check +# Mark subtask complete only after manual verification passes +``` + +**No Verification:** +``` +# For verification.type = "none" +# No verification required - mark subtask complete after implementation +``` + ### FIX BUGS IMMEDIATELY **If verification fails: FIX IT NOW.** diff --git a/apps/backend/prompts/planner.md b/apps/backend/prompts/planner.md index 3209b521..ce811676 100644 --- a/apps/backend/prompts/planner.md +++ b/apps/backend/prompts/planner.md @@ -365,13 +365,18 @@ Use ONLY these values for the `type` field in phases: ### Verification Types +**CRITICAL: ONLY these 6 verification types are valid. Any other type will cause validation failure.** + | Type | When to Use | Format | |------|-------------|--------| -| `command` | CLI verification | `{"type": "command", "command": "...", "expected": "..."}` | +| `command` | CLI verification, running tests | `{"type": "command", "command": "...", "expected": "..."}` | | `api` | REST endpoint testing | `{"type": "api", "method": "GET/POST", "url": "...", "expected_status": 200}` | | `browser` | UI rendering checks | `{"type": "browser", "url": "...", "checks": [...]}` | | `e2e` | Full flow verification | `{"type": "e2e", "steps": [...]}` | -| `manual` | Requires human judgment | `{"type": "manual", "instructions": "..."}` | +| `manual` | Human judgment, code review | `{"type": "manual", "instructions": "..."}` | +| `none` | No verification needed | `{"type": "none"}` | + +**DO NOT invent types like `code_review`, `component`, `test`, `lint`, `build`. Use `manual` for human review, `command` for running tests.** ### Special Subtask Types diff --git a/apps/backend/spec/validate_pkg/schemas.py b/apps/backend/spec/validate_pkg/schemas.py index f64db3d1..6683c101 100644 --- a/apps/backend/spec/validate_pkg/schemas.py +++ b/apps/backend/spec/validate_pkg/schemas.py @@ -72,21 +72,24 @@ IMPLEMENTATION_PLAN_SCHEMA = { "required_fields": ["type"], "optional_fields": [ "run", + "command", + "expected", "url", "method", "expect_status", "expect_contains", "scenario", "steps", + "instructions", ], "verification_types": [ "command", "api", "browser", - "component", + "component", # Legacy - consider deprecating (use "command" with test) + "e2e", "manual", "none", - "e2e", ], }, }