137 lines
3.9 KiB
Markdown
137 lines
3.9 KiB
Markdown
# stage planner
|
|
|
|
```output
|
|
{ capture_matrix, startup_command, readiness_check, fixture_plan, artifact_directory, recapture_count: 0, max_recaptures }
|
|
Preserve the repository and requested routes, sizes, and states.
|
|
```
|
|
|
|
```prompt
|
|
Extract routes, viewports, requested states, and artifact directory from the user's
|
|
runtime prompt; return blocked for essential missing requirements. Infer repository
|
|
context from the workspace. Initialize recapture_count=0 and max_recaptures=2
|
|
unless a lower budget is requested, preserving these fields in your output.
|
|
Inspect the app and define a capture matrix covering the requested dashboard
|
|
routes, desktop/mobile viewports, and loading, empty, error, or populated states.
|
|
Identify local startup and readiness commands. Use reproducible synthetic fixtures
|
|
and authorized test accounts; never expose production or personal data. Return
|
|
blocked if the requested states cannot be set up safely.
|
|
```
|
|
|
|
```edges
|
|
success -> prepare_app
|
|
blocked -> #failure
|
|
error -> #failure
|
|
```
|
|
|
|
```configs
|
|
provider=opencode-go
|
|
model=deepseek-v4.1-flash
|
|
retries=0
|
|
```
|
|
|
|
# stage prepare_app
|
|
|
|
```output
|
|
{ app_url, readiness_evidence, fixture_manifest, owned_process_ids, capture_matrix, artifact_directory }
|
|
Preserve recapture_count and max_recaptures.
|
|
```
|
|
|
|
```prompt
|
|
Prepare synthetic fixtures and start the app locally. Wait for the documented
|
|
readiness check and record its actual result. Track only processes started by this
|
|
pipeline for later cleanup. Avoid changing production services or overwriting user
|
|
data. If setup fails, stop owned processes before returning error. Hand off a real
|
|
working URL, not an assumed one.
|
|
```
|
|
|
|
```edges
|
|
success -> capture
|
|
error -> #failure
|
|
```
|
|
|
|
```configs
|
|
provider=opencode-go
|
|
model=deepseek-v4.1-flash
|
|
retries=0
|
|
```
|
|
|
|
# stage capture
|
|
|
|
```output
|
|
{ screenshots, capture_manifest, browser_errors, owned_process_ids, recapture_count, max_recaptures }
|
|
Each manifest entry includes route, viewport, state, capture time, and local file path.
|
|
```
|
|
|
|
```prompt
|
|
Use the project's browser automation to visit each requested route and viewport.
|
|
Wait for deterministic state-specific selectors and fonts; do not hide real failures.
|
|
Capture actual screenshots and collect console/network errors. On a retake, increment
|
|
recapture_count; return exhausted after the budget, stopping owned app processes.
|
|
On tool failure, also stop owned processes before returning error. Never substitute
|
|
mock images for captures or leak credentials into artifacts.
|
|
```
|
|
|
|
```edges
|
|
success -> inspector
|
|
exhausted -> #failure
|
|
error -> #failure
|
|
```
|
|
|
|
```configs
|
|
provider=opencode-go
|
|
model=deepseek-v4.1-flash
|
|
retries=0
|
|
```
|
|
|
|
# stage inspector
|
|
|
|
```output
|
|
{ visual_findings, coverage_report, feedback?, approved_artifacts, owned_process_ids }
|
|
Preserve the capture inputs and recapture budget for a retake.
|
|
```
|
|
|
|
```prompt
|
|
Open and inspect the captured files. Check coverage, clipping, overlap, responsive
|
|
layout, legibility, fixture consistency, and browser errors. Return retake only for
|
|
a capture/setup problem that another capture can correct. Return app_defect for a
|
|
real product issue rather than repeatedly photographing it; stop owned processes
|
|
before app_defect or error. Return success only with complete inspected artifacts.
|
|
```
|
|
|
|
```edges
|
|
success -> package_report
|
|
retake -> capture
|
|
app_defect -> #failure
|
|
error -> #failure
|
|
```
|
|
|
|
```configs
|
|
provider=opencode-go
|
|
model=deepseek-v4.1-flash
|
|
retries=0
|
|
```
|
|
|
|
# stage package_report
|
|
|
|
```output
|
|
{ report_path, screenshot_paths, coverage_report, cleanup_results }
|
|
```
|
|
|
|
```prompt
|
|
Write a local Markdown gallery linking the actual screenshots with route, viewport,
|
|
state, and findings. Verify each artifact exists. Stop only app processes owned by
|
|
this pipeline and record cleanup results, including on errors. Return success only
|
|
if the gallery, captures, and cleanup are complete. Do not publish externally.
|
|
```
|
|
|
|
```edges
|
|
success -> #success
|
|
error -> #failure
|
|
```
|
|
|
|
```configs
|
|
provider=opencode-go
|
|
model=deepseek-v4.1-flash
|
|
retries=0
|
|
```
|