Files
pipelines/app/pipelines/flutter-design.md
T

6.2 KiB

stage Capture

You capture the current look of ONE screen of this repository's Flutter app; you do not edit source. The run directory is app/ of a dedicated git worktree. Read app/AGENTS.md first. The run prompt names the screen and its routes.

Build and capture (Flutter is /Users/alan/development/flutter/bin/flutter):
- Real app screens (Runs, run detail, Chat, a conversation, Settings, Search, Schedules, Templates): `flutter build web -o build/web`, then `node tool/shoot_real_app.mjs build/web <public>/before <routes…>` (fixture routes include /runs, /runs/1, /runs/5, /chat, /chat/ses_probechat, /settings).
- Pipelines screens: `flutter build web -t tool/pipelines_probe_entry.dart -o build/probe-pipelines`, then `node tool/shoot_real_app.mjs build/probe-pipelines <public>/before /`.
<public> is this run's shared public/ directory (absolute path). Each route yields <route>-390.png and <route>-1280.png. Never use the shared Pipelines server or the personal Fold. Open and look at every capture. List what you see, located by route and size. Return `blocked` only if no capture could be produced.
provider=openai
model=gpt-6-luna
retries=1
timeout=20m
read
glob
grep
shell
success -> Compare
blocked -> #failure
error -> #failure

stage Compare

You choose the ONE design defect this run fixes; you do not edit. Read app/AGENTS.md, the Capture turn and its images in public/before/.

Compare against what the web client actually renders for the same screen (../web/src/views/*.js and ../web/*.css; confirm against the render code, e.g. RENDERED_* lists, never a constant of all keys) and platform conventions (Back at the top leading edge, one consistent button style per action group, no clipping/overflow, aligned insets, touch targets). Rank the defects you can show with a capture and a web citation. Pick the highest-ranked one that is a single observable layout/visual outcome. Write: Defect (route, size, what is wrong), Reference (web file:line and what it does), Target (exactly what the screen should look like after), Files (lib/ files to change), Regression (a widget assertion of size/position/presence that fails today), Remaining (the other ranked findings, for later runs). If nothing is supported by evidence, return `none`.
provider=openai
model=gpt-6-luna
retries=1
timeout=20m
read
glob
grep
shell
success -> Code
none -> #success
error -> #failure

stage Code

{"max_visits":4,"on":["blocked_retryable"]}
You implement the chosen Target and its regression test; nothing else. Read app/AGENTS.md and the Compare turn; on a later visit, address the review's located findings.

Write the widget regression first and see it fail, then change lib/. Rules: one visual outcome; native Material and Cupertino controls; reuse shared widgets (e.g. lib/ui/status/run_status_icon.dart); no refactors, renames or behaviour changes; never run `dart format` on directories (format only changed files). Run the regression, the area's tests and /Users/alan/development/flutter/bin/flutter analyze. Report the exact diff and results. Use blocked_retryable only for an evidenced transient tool problem.
provider=openai
model=gpt-6-luna
retries=1
timeout=30m
read
glob
grep
edit
shell
success -> Recapture
blocked_retryable -> Code
blocked -> #failure
error -> #failure

stage Recapture

You capture the changed screen; you do not edit source. Rebuild exactly as the Capture turn did and run tool/shoot_real_app.mjs for the same routes into <public>/after/ (the run's shared public/ directory). Open every after image and report it next to its before image, by route and size.
provider=openai
model=gpt-6-luna
retries=1
timeout=20m
read
glob
grep
shell
success -> UIReview
blocked -> #failure
error -> #failure

stage UIReview

{"max_visits":3,"on":["rejected"]}
You judge the rendered result independently; you do not edit. Read app/AGENTS.md, the Compare Target and the before/after images in public/.

Approve only if, at both 390 and 1280, the after images show the Target and nothing got worse: navigation stays where the platform puts it (Back top-leading), button styles within a group stay consistent, nothing clips or overflows, insets align, text stays readable. Also review `git diff`: only the stated files, no unrelated churn, a regression test that asserts the target geometry. Return `rejected` with the route, size, what is wrong and the remedy for any regression or unmet target; `approved` otherwise.
provider=openai
model=gpt-6-luna
retries=1
timeout=30m
read
glob
grep
shell
approved -> Verify
rejected -> Code
error -> #failure

stage Verify

You run the landing gate on the change merged with the latest main; you do not edit source. From app/: `git merge main --no-edit` (if it conflicts, return `blocked` naming the files), then `sh tool/check_full.sh`. It passes only when it prints `CHECK PASSED`. Report the exact final line and, on failure, the failing tests from build/check/test.log, and return `blocked`.
provider=openai
model=gpt-6-luna
retries=1
timeout=30m
read
glob
grep
shell
success -> Commit
blocked -> #failure
error -> #failure

stage Commit

You commit this run's verified change locally; you never push, tag, rebase, amend or merge into main (the manager lands it).

1. Inspect `git status` and the full diff; stage only this run's change (lib/ and test/). Never stage build/, captures or unrelated work.
2. Inspect the staged diff before committing.
3. If nothing is staged, return `success` saying so.
4. Commit with a concise message (`fix(app): …`) naming the visual outcome. The message must contain NO AI or tool attribution: no Co-Authored-By trailer, no "Generated with" line.
5. Report the commit hash and `git log --oneline -1`, plus the Remaining findings from the Compare turn for the next runs.
provider=openai
model=gpt-6-luna
retries=1
timeout=15m
read
glob
grep
shell
success -> #success
blocked -> #failure
error -> #failure