layout-hillclimbworkflow5
kymostudio/kymostudio
What it does

Hill-climb layout quality to beat mermaid

Best for

Incremental layout algorithm improvements where each fix is validated against baseline + other fixtures (HYBRID gate)

Inputs
  • · kymo flowchart corpus (target fixture)
  • · baseline layout quality scores (kComposite, mComposite)
  • · hypothesis: one kymo-layout code change per round
Outputs
  • · git diff per accepted fix
  • · layout quality scores after each round
  • · final leaderboard (kymo vs mermaid.js)
  • · unified diffs ready for PR
Requires
  • · git worktree (isolation per hypothesis)
  • · wasm-pack (rebuild kymo-mermaid wasm)
  • · benches/layout-algorithms (scoring harness)
  • · pytest, cargo test (HYBRID gate verification)
  • · Chrome browser
Preconditions
  • · Google Chrome at default path (or $CHROME override)
  • · wasm32 target installed; wasm-pack available
  • · benches/layout-algorithms/ npm ci completed
  • · kymo-mermaid wasm built and cached
  • · baseline layout-quality scores computed
Failure modes
  • · quality metric regression on other fixtures
  • · pixel delta vs mermaid.js worsens (visual fidelity loss)
  • · golden layout tests fail (pytest)
  • · cargo test failures in kymo-layout
  • · wasm rebuild fails or mismatches expectations
Trust signals
  • · HYBRID gate: must rise on target AND pass 4 checks (pixel, golden tests, cargo test, no regression on other fixtures)
  • · Worktree isolation: never touches main branch
  • · Baseline/leaderboard published before round 1
  • · EPS slack (0.5 composite units, 0.3 pixel ratio) gates acceptable drift
  • · Max 2 consecutive dry rounds before halt
  • · Proposed diffs for human review (never auto-merges)