AGENT SKILL

ui-harness

暂无简介

License 许可
MIT
最近更新
2026-11-15
Stars
★ 51
Forks
9

02 资源文件 2

03 SKILL.md 正文

UI harness — drive, observe and QA the app without a mouse

Every user-visible surface (panel, layer, tab, popup, demo flow) is reachable from a fresh launch by environment hooks alone — zero clicks.

A missing surface hook is a Should-fix. QUANTICK_<SURFACE>_AUTOSTART=1 defaults off and reuses the manual toggle path.

Hooks

Grep references/hook-registry.md (one row per hook) for the surface you need; read it whole only for an inventory or coverage audit:

grep -i 'heatmap\|book' .claude/skills/ui-harness/references/hook-registry.md

Guards require declare_hooks! and docs/ui-harness/hook-prose.md. Edit prose only; regenerate with cargo run -p quantick-app --features harness -- --dump-hook-registry. Declared in locates hooks; app/launch_hooks.rs documents launch order.

Hooks require a harness feature. --features harness enables all four families (scenario-, control-, drawing-, quick-range-harness). Default builds read only operator config captured by crates/app/src/launch.rs. Unregistered QUANTICK_* logs UNKNOWN_HOOK and disables session saving (SAVES OFF in the status line).

Adding one — a new surface gets its hook in the same commit: read the var, call the manual toggle's function, default off; add the name to that module's crate::hooks::declare_hooks![…] and a row to hook-prose.md; regenerate. Read ownership:

  • a hook the window owns (menu opened, pointer parked, demo staged, history page asked, a frame budget) → crates/app/src/harness.rs: one Harness field, one Harness::capture line, one accessor named for its purpose;
  • a floating surface's hook → that surface's module under crates/app/src/surfaces/, as an apply_env_hook the registry calls (size.rs fails one added to the trunk);
  • stateless setters and control/tab/replay/workspace clusters stay in app/launch_hooks.rs; stateful hooks needing only their own parsed value belong in their owner.

main captures declared names once; owners use crate::hooks::captured::var, never std::env::var.

Extend an existing hook with a defaulting struct field (DrawingsDemo, FrvpDemo, DrawingDraft), never a new enum variant.

Launch and capture

Raw captures stay outside Git; results and artifact links go in the PR.

  1. Own target dir with free space: CARGO_TARGET_DIR=D:\quantick-agent-target, to avoid locking the user's exe. First check Get-PSDrive -PSProvider FileSystem for space; ENOSPC resembles a compile error.
  2. Fresh exe, proven: run cargo build -p quantick-app --features harness before capture; compare LastWriteTime to the last edit. Tests do not rebuild it.
  3. Launch with PowerShell Start-Process, hooks set, RUST_LOG=quantick=info, stderr logged. Bash background jobs produce white captures.
  4. Capture by PID, never window title: tools/capture_window.ps1 (PrintWindow, PW_RENDERFULLCONTENT) filtered to your PID.
  5. Gate on health: APP_HEALTH_SUMMARY every 2 s. fps≈59 / frame_avg≈16.7 is real; fps≈19 / frame_avg≈52 / frame_cpu≈3 is an occluded or idle desktop — wait for fps ≥ 50 and recapture. A blank capture is environment; run a main control build before blaming the change.
  6. Verify by pixel where the eye is fooled (counting marks, dash signatures, colours, frame diffs) — e.g. System.Drawing; readable_min_radius in config/bubbles.toml is the "too small" reference.
  7. Be a guest: minimized window or an active mouse (GetLastInputInfo idle ≈ 0) means stop and keep your evidence. No SendInput. Never bind a second MT5 listener on port 9100 — QUANTICK_CONFIG with another listen_addr. Close every instance you opened.

Ask the app, then look

Prefer structured answers when available; screenshots assess clipping, font, composition and readability. Launch --features harness with QUANTICK_CONTROL_ACCESS=1 and the scopes, then use quantick_get_scene (controls by name, selected, the coded reason one cannot be operated), quantick_get_diagnostics (frame and tape numbers), and quantick_capture_evidence with screenshot (scene, health, market and image at one revision, with control_regions per control). For the manual client, PowerShell stdin trap and bundle fields, read references/control-plane.md.

QA

  1. Scope — every affected surface, including splitters moved by dock tabs or popups covering tape; include uncertain surfaces.
  2. State matrix — each surface: default open (BTC dense tape preset); hook-enabled; popup/menu over live data; empty session/fills/depth; dense replay/book; narrow (~1000 px) and normal windows; disabled states with visible reasons. Prefer replay (QUANTICK_REPLAY_*, WINJ26 sessions) for reproducibility and config/bubbles.toml presets, never bare defaults.
  3. Read scene, then captures — answer each check; rendering alone is no verdict:
    • Integrity — nothing clipped, overlapping or off-window; splitters and neighbours intact.
    • Readability — text at the app's own readable size; contrast on the dark canvas; no truncated numbers (1234… on a price fails).
    • Occlusion — nothing covers live price, tape or forming bar.
    • State honesty — explain disabled/empty states; label inferred data.
    • Motion — two captures ~1.2 s apart in one PowerShell call: flow advanced, no layout jump, the live region never frozen.
    • Consistency — the existing chip/button language; no one-off widget.
    • Performance — dense data: fps ≥ ~59, no change-induced APP_SLOW_FRAMES bursts. After ruling out occlusion, feature fps in the 50s against ~59 on main (same hooks and tape) is FAIL.
    • Scene/image disagreement is FAIL; identify the credible half.
  4. Report one verdict per surface × state, most severe first. FAIL: screenshot path, one-sentence defect, crop/coordinates and scene control ID where available. PASS: screenshot path and any structured reading (scene entry, diagnostics figure, evidence ID); without evidence, not run. BLOCKED: what was unobservable and what was validated; never PASS. PR: verdicts, surfaces, IDs, measurements and optional artifact link. Never put raw evidence under .claude/evidence/ or docs/workflow/evidence/. Fix FAILs and re-run only failed cells. Keep a before/after pair outside Git only if another reviewer needs it. Finish when every cell is PASS or an accepted defect recorded in the PR body.

04 同仓库更多 Skills

milocaetano
milocaetano/quantick

trader-ux-review

Review a feature or flow through the eyes of the traders who use quantick — fixed personas, order-flow-specific heuristics, and trader-severity ratings. Answers "can a trader actually operate with this?", not "does it render?" (that is ui-harness's QA pass). Use for any change a trader touches mid-session — panels, popups, hotkeys, trading actions, chart interactions — or when the user asks for a UX review.

★ 51
milocaetano
milocaetano/quantick

ship

Verify and deliver a Quantick branch through independent reviews and green CI. Prepare main PRs for the user; merge only into an explicitly authorized campaign branch.

★ 51
milocaetano
milocaetano/quantick

quantick-score

Score Quantick for sustainable growth, scalability and AI readiness; use ai-review for diffs.

★ 51
milocaetano
milocaetano/quantick

outside-score

Score Quantick as an outside architect would, apart from quantick-score, and show where they disagree.

★ 51
milocaetano
milocaetano/quantick

new-extension

Recipe for adding a new capability to quantick as an additive package — a new feed, bar type, indicator, chart layer, panel or crate that docks via a port instead of surgery on existing code. Use when a goal adds a capability, when scaffolding a new module, or when deciding where a new feature should live. Turns arch-review's docking test from a review gate into a build recipe.

★ 51
milocaetano
milocaetano/quantick

mission

Define and enforce a tiered Quantick mission with a source-based ledger, acceptance criteria, applicable gates and delivery evidence. Use for /mission or a session goal. Campaign children return control to their coordinator.

★ 51