agentpath 0.0.0-stage → 0.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/LICENSE.md +105 -0
  2. package/README.md +101 -2
  3. package/THIRD_PARTY_NOTICES +12 -0
  4. package/apps/demo-site/dist/site.js +92 -0
  5. package/apps/studio/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  6. package/apps/studio/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  7. package/apps/studio/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  8. package/apps/studio/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  9. package/apps/studio/dist/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
  10. package/apps/studio/dist/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
  11. package/apps/studio/dist/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
  12. package/apps/studio/dist/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
  13. package/apps/studio/dist/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
  14. package/apps/studio/dist/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
  15. package/apps/studio/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  16. package/apps/studio/dist/assets/index-DH4wJPHm.js +67 -0
  17. package/apps/studio/dist/assets/index-DrnNh2ip.css +1 -0
  18. package/apps/studio/dist/index.html +14 -0
  19. package/audit.md +173 -0
  20. package/autonomous-mode.md +104 -0
  21. package/ci.md +118 -0
  22. package/coding-agents.md +143 -0
  23. package/concepts.md +145 -0
  24. package/contracts.md +356 -0
  25. package/examples/tasks/ambiguous.json +98 -0
  26. package/examples/tasks/assertion-failure.json +98 -0
  27. package/examples/tasks/broken.json +98 -0
  28. package/examples/tasks/fixed.json +98 -0
  29. package/examples/tasks/recovery.json +19 -0
  30. package/images/compare-recovery-desktop.jpg +0 -0
  31. package/images/compare-variants-desktop.jpg +0 -0
  32. package/images/overview-desktop.jpg +0 -0
  33. package/images/run-autonomous-passed-desktop.jpg +0 -0
  34. package/images/run-failed-desktop.jpg +0 -0
  35. package/images/run-failed-mobile.jpg +0 -0
  36. package/images/run-missing-artifact-desktop.jpg +0 -0
  37. package/images/task-editor-laptop.jpg +0 -0
  38. package/installation.md +102 -0
  39. package/ledger.md +62 -0
  40. package/licenses/-fontsource-variable-geist-mono.txt +93 -0
  41. package/licenses/-fontsource-variable-geist.txt +93 -0
  42. package/licenses/lucide-react.txt +43 -0
  43. package/licenses/react-dom.txt +21 -0
  44. package/licenses/react.txt +21 -0
  45. package/licenses/scheduler.txt +21 -0
  46. package/licenses/tailwindcss.txt +21 -0
  47. package/licenses/zod.txt +21 -0
  48. package/package.json +165 -4
  49. package/packages/cli/bin/agentpath.js +39 -0
  50. package/packages/cli/dist/audit-rerun.js +384 -0
  51. package/packages/cli/dist/audit.js +387 -0
  52. package/packages/cli/dist/change-summaries.js +87 -0
  53. package/packages/cli/dist/ci-report.js +88 -0
  54. package/packages/cli/dist/demo.js +88 -0
  55. package/packages/cli/dist/doctor.js +265 -0
  56. package/packages/cli/dist/explain.js +89 -0
  57. package/packages/cli/dist/git.js +7 -0
  58. package/packages/cli/dist/inspect.js +118 -0
  59. package/packages/cli/dist/ledger.js +509 -0
  60. package/packages/cli/dist/local.js +102 -0
  61. package/packages/cli/dist/main.js +708 -0
  62. package/packages/cli/dist/mcp.js +231 -0
  63. package/packages/cli/dist/paths.js +6 -0
  64. package/packages/cli/dist/playwright-fixture.js +185 -0
  65. package/packages/cli/dist/playwright-reporter.js +49 -0
  66. package/packages/cli/dist/tasks.js +37 -0
  67. package/packages/cli/dist/test-source.js +283 -0
  68. package/packages/cli/dist/watch.js +96 -0
  69. package/packages/contracts/dist/agent-settings.js +18 -0
  70. package/packages/contracts/dist/agent.js +175 -0
  71. package/packages/contracts/dist/audit.js +115 -0
  72. package/packages/contracts/dist/guidance.js +339 -0
  73. package/packages/contracts/dist/index.js +14 -0
  74. package/packages/contracts/dist/inspect.js +63 -0
  75. package/packages/contracts/dist/ledger.js +80 -0
  76. package/packages/contracts/dist/local.js +171 -0
  77. package/packages/contracts/dist/outcomes.js +94 -0
  78. package/packages/contracts/dist/platform.js +105 -0
  79. package/packages/contracts/dist/playwright-live.js +76 -0
  80. package/packages/contracts/dist/policy.js +93 -0
  81. package/packages/contracts/dist/run.js +178 -0
  82. package/packages/contracts/dist/task-issues.js +39 -0
  83. package/packages/contracts/dist/task.js +185 -0
  84. package/packages/contracts/dist/watch.js +57 -0
  85. package/packages/core/dist/action-feedback.js +103 -0
  86. package/packages/core/dist/actions.js +160 -0
  87. package/packages/core/dist/agent-loop.js +122 -0
  88. package/packages/core/dist/artifacts.js +156 -0
  89. package/packages/core/dist/assertions.js +120 -0
  90. package/packages/core/dist/autonomous.js +1 -0
  91. package/packages/core/dist/browser.js +196 -0
  92. package/packages/core/dist/compare.js +141 -0
  93. package/packages/core/dist/control-state.js +62 -0
  94. package/packages/core/dist/diagnostics.js +134 -0
  95. package/packages/core/dist/evidence-diff.js +93 -0
  96. package/packages/core/dist/evidence.js +203 -0
  97. package/packages/core/dist/index.js +22 -0
  98. package/packages/core/dist/inspect.js +257 -0
  99. package/packages/core/dist/integrity.js +176 -0
  100. package/packages/core/dist/liveness.js +114 -0
  101. package/packages/core/dist/local-files.js +61 -0
  102. package/packages/core/dist/locators.js +214 -0
  103. package/packages/core/dist/model-provider.js +88 -0
  104. package/packages/core/dist/observation.js +257 -0
  105. package/packages/core/dist/playwright-live.js +519 -0
  106. package/packages/core/dist/playwright-results.js +543 -0
  107. package/packages/core/dist/policy.js +182 -0
  108. package/packages/core/dist/privacy.js +93 -0
  109. package/packages/core/dist/recovery.js +54 -0
  110. package/packages/core/dist/retention.js +204 -0
  111. package/packages/core/dist/run-index.js +177 -0
  112. package/packages/core/dist/run-plan.js +28 -0
  113. package/packages/core/dist/run-repository.js +518 -0
  114. package/packages/core/dist/runner.js +913 -0
  115. package/packages/core/dist/storage.js +63 -0
  116. package/packages/core/dist/task-fingerprint.js +36 -0
  117. package/packages/core/dist/test-change-rerun.js +84 -0
  118. package/packages/core/dist/test-changes.js +896 -0
  119. package/packages/core/dist/timing.js +41 -0
  120. package/packages/core/dist/watch.js +165 -0
  121. package/packages/server/dist/index.js +265 -0
  122. package/packages/server/dist/task-store.js +103 -0
  123. package/quickstart.md +85 -0
  124. package/security.md +136 -0
  125. package/try-on-your-repo.md +54 -0
  126. package/understanding-results.md +159 -0
  127. package/writing-tasks.md +196 -0
@@ -0,0 +1 @@
1
+ @font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal-BgDaEnEv.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2)format("woff2-variations");unicode-range:U+2000-2001,U+2004-2008,U+200A,U+23B8-23BD,U+2500-259F}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:"Geist Variable", system-ui, sans-serif;--font-mono:"Geist Mono Variable", ui-monospace, monospace;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.fixed{position:fixed}.relative{position:relative}.block{display:block}.hidden{display:none}.inline{display:inline}.table{display:table}.lowercase{text-transform:lowercase}.filter{filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}}:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#0a0b0d;--bg-rail:#0d0e11;--surface:#121418;--surface-raised:#181a1f;--surface-sunken:#0c0d10;--surface-hover:#1d2026;--overlay:#040507d1;--border:#24272e;--border-strong:#31353e;--border-subtle:#1b1d22;--border-control:#636874;--border-control-hover:#7a7f8b;--text:#ececef;--text-secondary:#b4b8c1;--text-muted:#8d929c;--accent:#a796ff;--accent-hover:#bcafff;--accent-text:#c3b8ff;--accent-subtle:#a796ff1a;--accent-border:#a796ff57;--on-accent:#15102c;--focus:#c9bfff;--success:#5cd69a;--success-subtle:#5cd69a17;--success-border:#5cd69a4d;--danger:#ff8585;--danger-subtle:#ff707017;--danger-border:#ff707057;--warning:#f1b862;--warning-subtle:#f1b86217;--warning-border:#f1b86252;--info:#86b9ff;--info-subtle:#86b9ff17;--info-border:#86b9ff4d;--neutral-subtle:#b4b8c112;--neutral-border:#31353e;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--space-8:32px;--space-10:40px;--space-12:48px;--radius-1:4px;--radius-2:6px;--radius-3:8px;--radius-4:12px;--text-1:12px;--text-2:13px;--text-3:14px;--text-4:16px;--text-5:20px;--text-6:26px;--text-7:32px;--shadow-overlay:0 24px 80px #0000008c, 0 0 0 1px var(--border-strong);--shadow-sticky:0 1px 0 var(--border);--rail-width:236px;--content-max:1400px}html{background:var(--bg);scroll-padding-top:64px}body{color:var(--text);background:var(--bg);font:var(--text-3)/1.55 var(--font-sans);-webkit-font-smoothing:antialiased;font-feature-settings:"ss01", "cv11";margin:0}*{min-width:0}a,button,summary,label{touch-action:manipulation}button,summary,select,[role=radio]{cursor:pointer}button:disabled,button[aria-disabled=true],select:disabled,input:disabled{opacity:.5;cursor:not-allowed}:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:var(--radius-1)}a{color:inherit;text-decoration:none}h1,h2,h3,h4,p,figure{margin:0}h1{font-size:var(--text-7);letter-spacing:-.032em;font-weight:640;line-height:1.15}h2{font-size:var(--text-4);letter-spacing:-.012em;font-weight:620;line-height:1.35}h3{font-size:var(--text-3);font-weight:600;line-height:1.4}h4{font-size:var(--text-2);color:var(--text-secondary);font-weight:600}p{overflow-wrap:anywhere}code,kbd,.mono{font-family:var(--font-mono);font-size:.92em}ul,ol{padding-left:var(--space-5);margin:0}.muted{color:var(--text-muted)}.secondary{color:var(--text-secondary)}.danger-text{color:var(--danger)!important}.visually-hidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;overflow:hidden;position:absolute!important}.stack{gap:var(--space-4);align-content:start;display:grid}.stack-sm{gap:var(--space-2);align-content:start;display:grid}.row{align-items:center;gap:var(--space-2);flex-wrap:wrap;display:flex}.spread{justify-content:space-between;align-items:center;gap:var(--space-3);flex-wrap:wrap;display:flex}.small{font-size:var(--text-1)}.lead{font-size:var(--text-4);color:var(--text);line-height:1.5}.prose{max-width:72ch;color:var(--text-secondary)}.prose strong{color:var(--text);font-weight:600}.chip-code{border:1px solid var(--border-strong);border-radius:var(--radius-1);background:var(--surface-sunken);max-width:100%;color:var(--text);font:500 var(--text-1)/1.6 var(--font-mono);overflow-wrap:anywhere;padding:1px 6px;display:inline-block}.id{font:var(--text-1)/1.5 var(--font-mono);color:var(--text-muted);overflow-wrap:anywhere}.shell{grid-template-columns:var(--rail-width) minmax(0, 1fr);min-height:100dvh;display:grid;position:relative}.shell:before{content:"";width:var(--rail-width);background:var(--bg-rail);border-right:1px solid var(--border-subtle);position:absolute;inset:0 auto 0 0}.sidebar{gap:var(--space-6);height:100dvh;padding:var(--space-5) var(--space-3) var(--space-4);background:var(--bg-rail);border-right:1px solid var(--border-subtle);flex-direction:column;display:flex;position:sticky;top:0}.brand{align-items:center;gap:var(--space-3);padding:var(--space-1) var(--space-2);font-size:var(--text-4);letter-spacing:-.025em;font-weight:650;display:flex}.brand-mark{border-radius:var(--radius-3);width:30px;height:30px;color:var(--on-accent);background:var(--accent);place-items:center;display:grid}.brand small{color:var(--text-muted);font:500 var(--text-1)/1.2 var(--font-sans);letter-spacing:0;margin-top:2px;display:block}.nav{gap:2px;display:grid}.nav-label{padding:0 var(--space-3) var(--space-2);color:var(--text-muted);font-size:var(--text-1);font-weight:550}.nav a{align-items:center;gap:var(--space-3);padding:7px var(--space-3);border-radius:var(--radius-2);color:var(--text-secondary);font-size:var(--text-3);white-space:nowrap;font-weight:520;display:flex}.nav a svg{color:var(--text-muted);flex:none}.nav a:hover{background:var(--surface-hover);color:var(--text)}.nav a[aria-current]{background:var(--surface-raised);color:var(--text);box-shadow:inset 0 0 0 1px var(--border)}.nav a[aria-current] svg{color:var(--accent)}.nav-hint{color:var(--text-muted);font-size:var(--text-1);font-weight:450;display:block}.sidebar-status{gap:var(--space-2);padding:var(--space-3);border:1px solid var(--border-subtle);border-radius:var(--radius-3);background:var(--surface);font-size:var(--text-1);color:var(--text-secondary);margin-top:auto;display:grid}.sidebar-status div{align-items:center;gap:var(--space-2);display:flex}.dot{background:var(--text-muted);border-radius:50%;flex:none;width:8px;height:8px}.dot.ok{background:var(--success)}.dot.bad{background:var(--danger)}.dot.busy{background:var(--info);box-shadow:0 0 0 3px var(--info-subtle)}.workspace{min-width:0}.topbar{z-index:20;justify-content:space-between;align-items:center;gap:var(--space-4);height:52px;padding:0 var(--space-8);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--border-subtle);background:#0a0b0de0;display:flex;position:sticky;top:0}.breadcrumbs{align-items:center;gap:var(--space-2);color:var(--text-muted);font-size:var(--text-2);min-width:0;display:flex}.breadcrumbs a:hover{color:var(--text)}.breadcrumbs [aria-current]{color:var(--text-secondary);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.topbar-actions{align-items:center;gap:var(--space-2);display:flex}.activity{align-items:center;gap:var(--space-2);color:var(--text-secondary);font-size:var(--text-1);display:inline-flex}main{gap:var(--space-6);width:min(100%, var(--content-max));padding:var(--space-8) var(--space-8) var(--space-12);align-content:start;margin:0 auto;display:grid}main:focus{outline:none}main:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}.skip-link{left:var(--space-3);z-index:50;padding:var(--space-2) var(--space-3);border-radius:var(--radius-2);background:var(--accent);color:var(--on-accent);font-weight:600;position:absolute;top:-48px}.skip-link:focus{top:var(--space-3)}.page-header{justify-content:space-between;align-items:flex-end;gap:var(--space-4) var(--space-6);flex-wrap:wrap;display:flex}.page-header>div:first-child{gap:var(--space-2);flex:420px;min-width:min(100%,320px);display:grid}.page-header h1{overflow-wrap:anywhere}.page-header p{color:var(--text-secondary);max-width:70ch}.eyebrow{color:var(--text-muted);font-size:var(--text-2);align-items:center;gap:var(--space-2);flex-wrap:wrap;font-weight:520;display:flex}.header-actions{align-items:center;gap:var(--space-2);flex-wrap:wrap;display:flex}.meta-row{align-items:center;gap:var(--space-2) var(--space-4);color:var(--text-secondary);font-size:var(--text-2);flex-wrap:wrap;display:flex}.meta-row>span{align-items:center;gap:6px;display:inline-flex}.meta-row svg{color:var(--text-muted)}.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-4);min-width:0}.panel-head{justify-content:space-between;align-items:flex-start;gap:var(--space-3);padding:var(--space-4) var(--space-5);display:flex}.panel-head p{color:var(--text-muted);font-size:var(--text-2);margin-top:2px}.panel-head+.panel-body{padding-top:0}.panel-body{padding:var(--space-4) var(--space-5) var(--space-5);gap:var(--space-4);align-content:start;display:grid}.panel-body.flush{padding:0}.panel-foot{padding:var(--space-3) var(--space-5);border-top:1px solid var(--border-subtle);color:var(--text-muted);font-size:var(--text-2);justify-content:space-between;align-items:center;gap:var(--space-3);flex-wrap:wrap;display:flex}.section-title{align-items:center;gap:var(--space-2);display:flex}.section-title svg{color:var(--text-muted)}.divider{background:var(--border-subtle);border:0;height:1px;margin:0}.grid-2{gap:var(--space-4);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.grid-3{gap:var(--space-4);grid-template-columns:repeat(3,minmax(0,1fr));display:grid}.button,.icon-button{min-height:32px;padding:0 var(--space-3);border:1px solid var(--border-strong);border-radius:var(--radius-2);background:var(--surface-raised);color:var(--text);font:550 var(--text-2)/1 var(--font-sans);white-space:nowrap;justify-content:center;align-items:center;gap:6px;transition:background-color .12s,border-color .12s,color .12s;display:inline-flex}.button:hover:not(:disabled),.icon-button:hover:not(:disabled){background:var(--surface-hover);border-color:#40444e}.button.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.button.primary:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover)}.button.ghost{color:var(--text-secondary);background:0 0;border-color:#0000}.button.ghost:hover:not(:disabled){background:var(--surface-hover);color:var(--text);border-color:#0000}.button.danger{color:var(--danger);border-color:var(--danger-border);background:var(--danger-subtle)}.button.compact{min-height:28px;font-size:var(--text-1);padding:0 10px}.button.large{min-height:38px;padding:0 var(--space-4);font-size:var(--text-3)}.icon-button{width:32px;padding:0}.text-link{color:var(--accent-text);font-size:var(--text-2);text-align:left;background:0 0;border:0;align-items:center;gap:4px;padding:0;font-weight:530;display:inline-flex}.text-link:hover{color:var(--accent-hover);text-underline-offset:3px;text-decoration:underline}.item-link{color:var(--text);font-weight:580}.item-link:hover{color:var(--accent-hover)}.item-link svg{color:var(--text-muted);vertical-align:-2px;margin-left:6px;display:inline}.file-button{position:relative;overflow:hidden}.file-button input{opacity:0;cursor:pointer;width:100%;position:absolute;inset:0}.file-button:focus-within{outline:2px solid var(--focus);outline-offset:2px}.status,.outcome,.badge{white-space:nowrap;border:1px solid var(--neutral-border);font:550 var(--text-1)/1.55 var(--font-sans);color:var(--text-secondary);background:var(--neutral-subtle);border-radius:999px;align-items:center;gap:5px;padding:1px 8px 1px 7px;display:inline-flex}.status svg,.outcome svg,.badge svg{flex:none}.status.passed,.outcome-good,.badge.good{color:var(--success);background:var(--success-subtle);border-color:var(--success-border)}.status.failed,.outcome-bad,.badge.bad{color:var(--danger);background:var(--danger-subtle);border-color:var(--danger-border)}.status.running,.badge.info{color:var(--info);background:var(--info-subtle);border-color:var(--info-border)}.status.cancelled,.status.incomplete,.status.unreadable,.status.stale,.status.abandoned,.outcome-warn,.badge.warn{color:var(--warning);background:var(--warning-subtle);border-color:var(--warning-border)}.badge.accent{color:var(--accent-text);background:var(--accent-subtle);border-color:var(--accent-border)}.badge.plain{border-radius:var(--radius-1);font-family:var(--font-mono);font-weight:500}.status.running svg{animation:1.6s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.status.running svg{animation:none}*{scroll-behavior:auto!important;transition:none!important}}.notice{align-items:flex-start;gap:var(--space-3);padding:var(--space-3) var(--space-4);border:1px solid var(--info-border);border-radius:var(--radius-3);background:var(--info-subtle);color:var(--text);white-space:pre-line;font-size:var(--text-2);display:flex}.notice>svg{color:var(--info);flex:none;margin-top:2px}.notice>div{gap:var(--space-2);flex:1;justify-items:start;display:grid}.notice.error{border-color:var(--danger-border);background:var(--danger-subtle)}.notice.error>svg{color:var(--danger)}.notice.warning{border-color:var(--warning-border);background:var(--warning-subtle)}.notice.warning>svg{color:var(--warning)}.notice .button{margin-top:2px}.empty{text-align:center;justify-content:center;align-items:center;gap:var(--space-2);min-height:140px;padding:var(--space-6) var(--space-5);color:var(--text-muted);flex-direction:column;display:flex}.empty>svg{color:var(--text-muted)}.empty strong{color:var(--text);font-weight:600;font-size:var(--text-3)}.empty p{max-width:52ch;font-size:var(--text-2)}.empty .button{margin-top:var(--space-2)}.empty.inline{min-height:0;padding:var(--space-5);border:1px dashed var(--border-strong);border-radius:var(--radius-3)}.table-scroll{overflow-x:auto}.data-table{border-collapse:collapse;text-align:left;width:100%;font-size:var(--text-2)}.data-table th,.data-table td{padding:10px var(--space-5);border-top:1px solid var(--border-subtle);vertical-align:middle}.data-table thead th{color:var(--text-muted);font-size:var(--text-1);white-space:nowrap;padding-top:var(--space-2);padding-bottom:var(--space-2);border-top:0;font-weight:550}.data-table tbody tr{transition:background-color .1s}.data-table tbody tr:hover{background:#ffffff05}.data-table td small,.data-table th small{color:var(--text-muted);font-size:var(--text-1);margin-top:2px;font-weight:450;display:block}.data-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.data-table .actions{text-align:right;white-space:nowrap}.data-table .when,.panel-head .text-link{white-space:nowrap}.cell-title{gap:2px;display:grid}.field-grid{gap:var(--space-4);grid-template-columns:repeat(2,minmax(0,1fr));width:100%;display:grid}.field-grid .span-2{grid-column:1/-1}.field{color:var(--text);font-size:var(--text-2);align-content:start;gap:6px;font-weight:550;display:grid}.field-hint{color:var(--text-muted);font-size:var(--text-1);font-weight:450;line-height:1.45}.field :is(input,select,textarea),.input{width:100%;color:var(--text);border:1px solid var(--border-control);border-radius:var(--radius-2);background:var(--surface-sunken);font:450 var(--text-2)/1.45 var(--font-sans);padding:7px 10px;transition:border-color .12s}.field :is(input,select,textarea):hover{border-color:var(--border-control-hover)}.field :is(input,select,textarea):focus-visible{outline:2px solid var(--focus);outline-offset:0;border-color:#0000}.field select{appearance:auto}.field textarea{resize:vertical;min-height:72px}.field .json-source{min-height:460px;font:var(--text-2)/1.55 var(--font-mono);tab-size:2}.field input[type=number]{font-variant-numeric:tabular-nums}.checkbox{align-items:center;gap:var(--space-2);font-size:var(--text-2);color:var(--text);font-weight:450;display:inline-flex}.checkbox input{accent-color:var(--accent);width:16px;height:16px}.field-error{color:var(--danger);font-size:var(--text-1);margin-top:4px;font-weight:500}.field [aria-invalid=true]{border-color:var(--danger)!important}.field-with-error{align-content:start;gap:0;display:grid}.checkbox-group{border:1px solid var(--border);border-radius:var(--radius-3);padding:var(--space-2) var(--space-3) var(--space-3);gap:var(--space-2) var(--space-4);flex-wrap:wrap;margin:0;display:flex}.checkbox-group legend{color:var(--text-secondary);font-size:var(--text-1);padding:0 4px;font-weight:550}.checkbox-group small{flex-basis:100%}.segmented{border:1px solid var(--border);border-radius:var(--radius-3);background:var(--surface-sunken);align-items:center;gap:2px;padding:2px;display:inline-flex}.segmented button{border-radius:var(--radius-2);min-height:28px;padding:0 var(--space-3);color:var(--text-secondary);font:550 var(--text-2)/1 var(--font-sans);background:0 0;border:0}.segmented button:hover{color:var(--text)}.segmented button[aria-pressed=true]{color:var(--text);background:var(--surface-hover);box-shadow:inset 0 0 0 1px var(--border-strong)}.choice-group{gap:var(--space-3);border:0;grid-template-columns:repeat(2,minmax(0,1fr));margin:0;padding:0;display:grid}.choice-group legend{font-size:var(--text-2);margin-bottom:6px;padding:0;font-weight:550}.choice{padding:var(--space-3) var(--space-4) var(--space-3) 40px;border:1px solid var(--border-strong);border-radius:var(--radius-3);background:var(--surface-sunken);cursor:pointer;font-size:var(--text-2);gap:4px;display:grid;position:relative}.choice input{accent-color:var(--accent);width:16px;height:16px;position:absolute;top:15px;left:14px}.choice strong{font-weight:600}.choice span{color:var(--text-muted);font-size:var(--text-1);line-height:1.45}.choice:has(input:checked){border-color:var(--accent-border);background:var(--accent-subtle)}.choice:has(input:focus-visible){outline:2px solid var(--focus);outline-offset:2px}.kv{gap:var(--space-2);margin:0;display:grid}.kv>div{gap:var(--space-3);grid-template-columns:minmax(96px,148px) minmax(0,1fr);align-items:baseline;display:grid}.kv dt{color:var(--text-muted);font-size:var(--text-2)}.kv dd{overflow-wrap:anywhere;font-size:var(--text-2);margin:0}details.disclosure{border-top:1px solid var(--border-subtle)}details.disclosure>summary,.disclosure-toggle{align-items:center;gap:var(--space-2);padding:var(--space-3) 0;color:var(--text-secondary);font-size:var(--text-2);text-align:left;background:0 0;border:0;width:100%;font-weight:550;list-style:none;display:flex}details.disclosure>summary::-webkit-details-marker{display:none}details.disclosure>summary:before,.disclosure-toggle:before{content:"";border-bottom:1.5px solid;border-right:1.5px solid;flex:none;width:6px;height:6px;margin:0 4px 0 2px;transition:transform .15s;transform:rotate(-45deg)}details.disclosure[open]>summary:before,.disclosure-toggle[aria-expanded=true]:before{transform:rotate(45deg)}details.disclosure>summary:hover,.disclosure-toggle:hover{color:var(--text)}details.disclosure>:not(summary){padding-bottom:var(--space-3)}summary{color:var(--accent-text);font-size:var(--text-2)}details:not(.disclosure)>summary{width:fit-content}.intro{gap:var(--space-8);padding:var(--space-6);grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);align-items:start;display:grid}.intro h2{font-size:var(--text-5);letter-spacing:-.02em}.intro .prose{margin-top:var(--space-2)}.how-it-works{gap:var(--space-3);counter-reset:how;margin:0;padding:0;list-style:none;display:grid}.how-it-works li{gap:2px var(--space-3);font-size:var(--text-2);color:var(--text-secondary);grid-template-columns:28px minmax(0,1fr);display:grid}.how-it-works li:before{counter-increment:how;content:counter(how);border:1px solid var(--border-strong);width:24px;height:24px;color:var(--text-secondary);font:600 var(--text-1)/1 var(--font-mono);border-radius:50%;grid-row:span 2;place-items:center;display:grid}.how-it-works strong{color:var(--text);font-weight:600}.guide{margin:0;padding:0;list-style:none;display:grid}.guide>li{gap:var(--space-1) var(--space-3);padding:var(--space-4) var(--space-5);border-top:1px solid var(--border-subtle);grid-template-columns:32px minmax(0,1fr) auto;align-items:center;display:grid}.guide-index{border:1px solid var(--border-strong);width:26px;height:26px;color:var(--text-secondary);font:600 var(--text-1)/1 var(--font-mono);border-radius:50%;place-items:center;display:grid}.guide-index.ready{border-color:var(--accent-border);color:var(--accent-text);background:var(--accent-subtle)}.guide strong{font-weight:600;font-size:var(--text-3)}.guide p{color:var(--text-muted);font-size:var(--text-2)}.readiness{gap:var(--space-2) var(--space-5);padding:var(--space-3) var(--space-5);font-size:var(--text-2);color:var(--text-secondary);flex-wrap:wrap;display:flex}.readiness>span{align-items:center;gap:var(--space-2);display:inline-flex}.overview-grid{gap:var(--space-6);grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;display:grid}.command{align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--border-strong);border-radius:var(--radius-2);background:var(--surface-sunken);font:500 var(--text-2)/1.4 var(--font-mono);overflow-wrap:anywhere;width:fit-content;max-width:100%;display:flex}.command:before{content:"$";color:var(--text-muted)}.toolbar{align-items:center;gap:var(--space-2);padding:var(--space-3) var(--space-4);flex-wrap:wrap;display:flex}.run-filters{gap:var(--space-3);padding:var(--space-4) var(--space-5);border-bottom:1px solid var(--border-subtle);grid-template-columns:repeat(4,minmax(0,1fr));display:grid}.compact-field{min-width:0}.pagination-status{font-size:var(--text-2)}.summary-card{gap:0;display:grid;overflow:hidden}.summary-card>.summary-main{gap:var(--space-4);padding:var(--space-5) var(--space-6) var(--space-6);display:grid}.summary-card.tone-bad{border-color:var(--danger-border)}.summary-card.tone-good{border-color:var(--success-border)}.summary-card.tone-warn{border-color:var(--warning-border)}.summary-kicker{align-items:center;gap:var(--space-2);color:var(--text-secondary);font-size:var(--text-2);flex-wrap:wrap;display:flex}.summary-kicker h2{font-size:var(--text-2);color:var(--text-secondary);letter-spacing:0;align-items:center;gap:6px;font-weight:600;display:inline-flex}.tone-bad .summary-kicker h2 svg{color:var(--danger)}.tone-good .summary-kicker h2 svg{color:var(--success)}.tone-warn .summary-kicker h2 svg{color:var(--warning)}.headline{font-size:var(--text-6);letter-spacing:-.025em;color:var(--text);max-width:46ch;font-weight:620;line-height:1.22}.headline-sub{color:var(--text-secondary);font-size:var(--text-3);max-width:80ch}.expect-observe{gap:var(--space-3);grid-template-columns:repeat(2,minmax(0,1fr));margin:0;display:grid}.expect-observe>div{border:1px solid var(--border);border-radius:var(--radius-3);padding:var(--space-3) var(--space-4);background:var(--surface-sunken);align-content:start;gap:4px;display:grid}.expect-observe dt{font-size:var(--text-1);color:var(--text-muted);align-items:center;gap:6px;font-weight:600;display:flex}.expect-observe dd{font-size:var(--text-3);overflow-wrap:anywhere;margin:0}.expect-observe .observed{border-color:var(--danger-border)}.expect-observe .observed dt{color:var(--danger)}.diagnosis-meta{gap:var(--space-2);display:grid}.verdict-strip{border-top:1px solid var(--border);background:#ffffff03;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));margin:0;display:grid}.verdict-strip>div{padding:var(--space-4) var(--space-5);border-left:1px solid var(--border-subtle);align-content:start;gap:6px;display:grid}.verdict-strip>div:first-child{border-left:0}.verdict-strip dt{color:var(--text-muted);font-size:var(--text-1);font-weight:550}.verdict-strip dd{justify-items:start;gap:6px;margin:0;display:grid}.verdict-strip small{color:var(--text-muted);font-size:var(--text-1);line-height:1.45}.verdict-strip .secondary-verdict dt{color:var(--text-muted)}.run-layout{gap:var(--space-5);grid-template-columns:minmax(260px,340px) minmax(0,1fr);align-items:start;display:grid}.timeline{overscroll-behavior:contain;max-height:calc(100dvh - 84px);position:sticky;top:68px;overflow:auto}.timeline .panel-head{background:var(--surface);z-index:1;border-bottom:1px solid var(--border-subtle);padding-bottom:var(--space-3);position:sticky;top:0}.failure-jump{margin-top:var(--space-2);color:var(--danger)}.failure-jump:hover{color:#ffb0b0}.timeline-group{padding:var(--space-3) var(--space-2) var(--space-2)}.timeline-group+.timeline-group{border-top:1px solid var(--border-subtle)}.timeline-group h3{color:var(--text-muted);font-size:var(--text-1);padding:0 var(--space-3) var(--space-2);justify-content:space-between;gap:var(--space-2);font-weight:600;display:flex}.timeline-group>p{padding:0 var(--space-3) var(--space-2);font-size:var(--text-1)}.timeline-item{align-items:start;gap:var(--space-2);width:100%;padding:7px var(--space-3) 7px var(--space-2);border-radius:var(--radius-2);text-align:left;color:var(--text);background:0 0;border:1px solid #0000;grid-template-columns:26px minmax(0,1fr) auto;display:grid;position:relative}.timeline-item:hover{background:var(--surface-hover)}.timeline-item[aria-pressed=true]{background:var(--surface-raised);border-color:var(--border-strong)}.timeline-item[aria-pressed=true]:before{content:"";background:var(--accent);border-radius:2px;width:2px;position:absolute;top:6px;bottom:6px;left:-1px}.timeline-item.is-failed{background:var(--danger-subtle)}.timeline-item.is-failed[aria-pressed=true]{border-color:var(--danger-border)}.timeline-item.is-failed[aria-pressed=true]:before{background:var(--danger)}.timeline-item.not-run{color:var(--text-muted)}.step-number{color:var(--text-muted);font:500 var(--text-1)/1.7 var(--font-mono);text-align:right}.timeline-body{gap:1px;display:grid}.timeline-body strong{font-weight:520;font-size:var(--text-2);overflow-wrap:anywhere;line-height:1.4}.timeline-body small{color:var(--text-muted);font:var(--text-1)/1.4 var(--font-mono)}.timeline-item .status{margin-top:1px}.evidence-column{gap:var(--space-5);align-content:start;min-width:0;display:grid}.operation-card:focus{outline:none}.operation-card:focus-visible{outline:2px solid var(--focus);outline-offset:2px}.operation-head{justify-content:space-between;align-items:flex-start;gap:var(--space-3);padding:var(--space-5) var(--space-5) 0;display:flex}.operation-head h2{font-size:var(--text-5);letter-spacing:-.018em;overflow-wrap:anywhere}.step-nav{gap:4px;display:flex}.evidence-pair{gap:var(--space-4);grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);align-items:start;display:grid}.evidence-slot{gap:var(--space-2);align-content:start;min-width:0;display:grid}.evidence-slot>header{justify-content:space-between;align-items:center;gap:var(--space-2);flex-wrap:wrap;display:flex}.evidence-slot>header h3{align-items:center;gap:6px;display:inline-flex}.evidence-slot>header h3 svg{color:var(--text-muted)}.evidence-note{color:var(--text-muted);font-size:var(--text-1);line-height:1.5}.artifact-label{color:var(--text-muted);font:var(--text-1)/1.5 var(--font-mono);overflow-wrap:anywhere}.screenshot{border:1px solid var(--border-strong);border-radius:var(--radius-3);background:var(--surface-sunken);cursor:zoom-in;width:100%;padding:0;display:block;position:relative;overflow:hidden}.screenshot img{object-fit:contain;object-position:top center;background:#fff;width:100%;height:auto;max-height:520px;display:block}.screenshot:hover{border-color:#4a4e58}.screenshot-action{gap:var(--space-1);text-align:start;background:0 0;border:0;width:100%;padding:0;display:grid}.screenshot-enlarge{min-height:24px;color:var(--accent-text);font-size:var(--text-1);justify-self:end;align-items:center;gap:4px;display:flex}.screenshot-action:hover .screenshot-enlarge{text-decoration:underline}.evidence-empty{padding:var(--space-4);border:1px dashed var(--border-strong);border-radius:var(--radius-3);background:var(--surface-sunken);font-size:var(--text-2);justify-items:start;gap:4px;display:grid}.evidence-empty strong{align-items:center;gap:6px;font-weight:600;display:inline-flex}.evidence-empty.warn strong{color:var(--warning)}.evidence-empty.bad strong{color:var(--danger)}.evidence-empty p{color:var(--text-muted);font-size:var(--text-1)}.ax-toolbar{justify-content:space-between;align-items:center;gap:var(--space-2);font-size:var(--text-1);color:var(--text-muted);flex-wrap:wrap;display:flex}.ax-list{border:1px solid var(--border);border-radius:var(--radius-3);background:var(--surface-sunken);width:100%;max-height:340px;display:grid;overflow:auto}.ax-list>div{gap:var(--space-2);padding:5px var(--space-3);border-bottom:1px solid var(--border-subtle);font-size:var(--text-1);overflow-wrap:anywhere;grid-template-columns:minmax(88px,.55fr) minmax(0,1fr);display:grid}.ax-list>div:last-child{border-bottom:0}.ax-list code{color:var(--accent-text);font-size:var(--text-1)}.ax-list .ax-match{background:var(--accent-subtle)}.ax-list .ax-empty-name span{color:var(--warning)}.ax-list .ax-withheld span{color:var(--text-muted);font-style:italic}.capture-states{border:1px solid var(--border-subtle);border-radius:var(--radius-3);gap:0;margin:0;padding:0;list-style:none;display:grid;overflow:hidden}.capture-states li{gap:2px var(--space-3);padding:7px var(--space-3);font-size:var(--text-1);border-top:1px solid var(--border-subtle);grid-template-columns:minmax(150px,auto) 1fr;display:grid}.capture-states li:first-child{border-top:0}.capture-states strong{color:var(--text-secondary);font-weight:550}.capture-states code{color:var(--text-muted);grid-column:2;font-size:11.5px}.capture-states .capture-captured span{color:var(--success)}.capture-states .capture-capture-failed span,.capture-states .capture-missing-or-invalid span{color:var(--danger)}.capture-states .capture-privacy-suppressed span{color:var(--warning)}.integrity{gap:var(--space-2);font-size:var(--text-2);display:grid}.integrity-issues{gap:4px;padding:0;list-style:none;display:grid}.artifact-list{overflow-wrap:anywhere;font-size:var(--text-2);gap:6px;padding:0;list-style:none;display:grid}.artifact-list a{color:var(--accent-text)}.artifact-list a:hover{text-decoration:underline}.tech-grid{gap:var(--space-5) var(--space-8);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.tech-grid>section{gap:var(--space-2);align-content:start;display:grid}.tech-grid h3{font-size:var(--text-2);color:var(--text-secondary)}.fingerprint{font:var(--text-1)/1.5 var(--font-mono);color:var(--text-secondary);overflow-wrap:anywhere}.decision-list{margin:0;padding:0;list-style:none;display:grid}.decision-list>li{padding:var(--space-3) 0;border-top:1px solid var(--border-subtle);font-size:var(--text-2);gap:4px;display:grid}.decision-list>li:first-child{border-top:0}.decision-list p{font-size:var(--text-1)}.decision-list pre{white-space:pre-wrap;font:var(--text-1)/1.5 var(--font-mono);background:var(--surface-sunken);border:1px solid var(--border);border-radius:var(--radius-2);padding:var(--space-2) var(--space-3);margin:0}.decision-list ul{font-size:var(--text-1);color:var(--text-secondary);margin-top:4px}.policy-blocked{color:var(--warning)}.policy-permitted,.policy-changed{color:var(--danger)}.agent-facts{gap:var(--space-3);grid-template-columns:repeat(auto-fit,minmax(170px,1fr));margin:0;display:grid}.agent-facts>div{gap:2px;display:grid}.agent-facts dt{font-size:var(--text-1);color:var(--text-muted)}.agent-facts dd{font-size:var(--text-2);overflow-wrap:anywhere;margin:0}.policy-explanation{padding-left:var(--space-5);font-size:var(--text-2);color:var(--text-secondary);gap:6px;margin:0;display:grid}.rule-list{gap:var(--space-2);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.rule-list li{padding:3px var(--space-2);border:1px solid var(--border);border-radius:var(--radius-2);font-size:var(--text-1);color:var(--text-secondary);background:var(--surface-sunken);align-items:center;gap:6px;display:inline-flex}.lightbox{width:auto;max-width:min(96vw,1600px);max-height:94dvh;color:var(--text);background:0 0;border:0;margin:auto;padding:0}.lightbox::backdrop{background:var(--overlay)}.lightbox-frame{gap:var(--space-3);padding:var(--space-4);border-radius:var(--radius-4);background:var(--surface);box-shadow:var(--shadow-overlay);display:grid}.lightbox-frame img{object-fit:contain;border-radius:var(--radius-2);background:#fff;width:auto;max-width:calc(96vw - 32px);height:auto;max-height:calc(94dvh - 110px);display:block}.compare-picker{gap:var(--space-3);grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end;display:grid}.swap{margin-bottom:1px}.mode-explainer{gap:var(--space-3);font-size:var(--text-1);color:var(--text-muted);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.mode-explainer strong{color:var(--text-secondary);font-weight:600}.run-pair{grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr);align-items:stretch;display:grid}.run-side{gap:var(--space-2);padding:var(--space-5);align-content:start;display:grid}.run-side .side-label{font-size:var(--text-1);color:var(--text-muted);letter-spacing:.02em;font-weight:600}.run-side h3{font-size:var(--text-4);overflow-wrap:anywhere}.pair-arrow{color:var(--text-muted);border-left:1px solid var(--border-subtle);border-right:1px solid var(--border-subtle);place-items:center;display:grid}.verification-panel{gap:var(--space-3);padding:var(--space-5) var(--space-6);border-radius:inherit;display:grid}.verification-panel.verified-recovery{background:linear-gradient(180deg, var(--success-subtle), transparent 80%)}.verification-panel.regression{background:linear-gradient(180deg, var(--danger-subtle), transparent 80%)}.verification-panel.observed-improvement,.verification-panel.inconclusive,.verification-panel.different-definitions{background:linear-gradient(180deg, var(--warning-subtle), transparent 80%)}.verification-heading{gap:4px;display:grid}.verification-heading h2{font-size:var(--text-6);letter-spacing:-.025em;line-height:1.2}.verification-heading .eyebrow{font-size:var(--text-1)}.verdict-meaning{gap:var(--space-3);font-size:var(--text-1);color:var(--text-muted);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.verdict-meaning>div{padding:var(--space-3);border:1px solid var(--border-subtle);border-radius:var(--radius-3)}.verdict-meaning>div.is-current{border-color:var(--border-strong);background:var(--surface-raised);color:var(--text-secondary)}.verdict-meaning strong{color:var(--text);font-size:var(--text-2);margin-bottom:2px;display:block}.contract-summary{font-size:var(--text-2);gap:6px;display:grid}.fingerprint-grid{gap:var(--space-3);grid-template-columns:repeat(2,minmax(0,1fr));margin:0;display:grid}.fingerprint-grid dt{color:var(--text-muted);font-size:var(--text-1);margin-bottom:2px}.fingerprint-grid dd{overflow-wrap:anywhere;color:var(--text-secondary);font:var(--text-1)/1.5 var(--font-mono);margin:0}.divergence{justify-content:space-between;align-items:center;gap:var(--space-3);flex-wrap:wrap;display:flex}.divergence-text{gap:2px;display:grid}.divergence-text strong{font-size:var(--text-4);font-weight:600}.delta-strip{border-top:1px solid var(--border-subtle);grid-template-columns:repeat(3,minmax(0,1fr));display:grid}.delta-strip>div{padding:var(--space-3) var(--space-5);border-left:1px solid var(--border-subtle);align-content:start;gap:6px;display:grid}.delta-strip>div:first-child{border-left:0}.delta-strip .eyebrow{font-size:var(--text-1)}.delta-strip .transition{font-size:var(--text-2);flex-wrap:wrap;align-items:center;gap:6px;display:flex}.delta-strip svg{color:var(--text-muted)}.small-mono{font:var(--text-1)/1.5 var(--font-mono)}.compare-table th[scope=row]{font-weight:500}.compare-table tr.selected{background:var(--accent-subtle)!important}.compare-table tr.has-difference td:first-child,.compare-table tr.has-difference th:first-child{box-shadow:inset 2px 0 0 var(--warning)}.compare-table tr.selected th:first-child{box-shadow:inset 2px 0 0 var(--accent)}.comparison-operation{gap:4px;display:grid}.comparison-operation div{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.comparison-operation div small{margin:0}.data-table .diff{color:var(--warning);font-weight:550}.evidence-grid{gap:var(--space-5);grid-template-columns:repeat(2,minmax(0,1fr));width:100%;display:grid}.evidence-grid>div{gap:var(--space-2);align-content:start;min-width:0;display:grid}.evidence-grid h3{align-items:center;gap:var(--space-2);display:flex}.evidence-diff-table td{overflow-wrap:anywhere;max-width:280px}.evidence-changed{background:var(--warning-subtle)}.evidence-changed:hover{background:#f1b8621f!important}.source-link{color:var(--accent-text);font-size:var(--text-1);margin-bottom:6px;display:block}.source-link:hover{text-decoration:underline}.source-link code{color:var(--text-muted);font-size:11.5px;display:block}.outcome-grid{gap:var(--space-3);grid-template-columns:repeat(auto-fit,minmax(190px,1fr));margin:0;display:grid}.outcome-grid>div{border:1px solid var(--border);border-radius:var(--radius-3);padding:var(--space-3);align-content:start;gap:6px;display:grid}.outcome-grid dt{color:var(--text-muted);font-size:var(--text-1)}.outcome-grid dd{justify-items:start;gap:4px;margin:0;display:grid}.outcome-grid small{color:var(--text-muted)}.editor-layout{gap:var(--space-6);grid-template-columns:minmax(0,1fr) 280px;align-items:start;display:grid}.editor-main{gap:var(--space-5);min-width:0;display:grid}.editor-aside{gap:var(--space-4);display:grid;position:sticky;top:68px}.editor-section{gap:var(--space-4);padding:var(--space-5);justify-items:stretch;display:grid}.editor-section>.section-head,.section-head{justify-content:space-between;align-items:flex-start;gap:var(--space-3);display:flex}.section-head p{font-size:var(--text-2);color:var(--text-muted);margin-top:2px}.section-index{background:var(--surface-raised);border:1px solid var(--border-strong);width:22px;height:22px;color:var(--text-secondary);font:600 var(--text-1)/1 var(--font-mono);margin-right:var(--space-2);border-radius:50%;flex:none;place-items:center;display:inline-grid}.operation-editor{align-items:end;gap:var(--space-3);width:100%;padding:var(--space-3) var(--space-4) var(--space-4);border:1px solid var(--border);border-radius:var(--radius-3);background:var(--surface-sunken);grid-template-columns:minmax(0,1fr) auto;margin:0;display:grid}.operation-editor legend{color:var(--text-secondary);font:600 var(--text-1)/1 var(--font-sans);padding:0 6px}.row-end{gap:4px;display:flex}.row-start{gap:var(--space-2);flex-wrap:wrap;display:flex}.editor-toolbar{justify-content:space-between;align-items:center;gap:var(--space-3);flex-wrap:wrap;display:flex}.dirty-indicator{color:var(--warning);font-size:var(--text-1);align-items:center;gap:6px;font-weight:550;display:inline-flex}.dirty-indicator:before{content:"";background:var(--warning);border-radius:50%;width:7px;height:7px}.advanced-summary{font-size:var(--text-1);color:var(--text-secondary);gap:6px;margin:0;padding:0;list-style:none;display:grid}.advanced-summary li{justify-content:space-between;gap:var(--space-3);display:flex}.advanced-summary li span:last-child{color:var(--text);text-align:right}.advanced-toggle{justify-content:space-between;align-items:center;gap:var(--space-3);padding:var(--space-4) var(--space-5);flex-wrap:wrap;display:flex}.error-summary ul{margin:6px 0 0;padding-left:18px}.error-summary button{color:var(--danger);text-align:left;font:inherit;background:0 0;border:0;padding:0;text-decoration:underline}.why-card{padding:var(--space-4);font-size:var(--text-2);color:var(--text-secondary);gap:var(--space-2);display:grid}.why-card h3{color:var(--text);align-items:center;gap:6px;display:flex}.why-card h3 svg{color:var(--accent)}@media (width<=1180px){.editor-layout{grid-template-columns:1fr}.editor-aside{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));position:static}.evidence-pair{grid-template-columns:1fr}.intro{gap:var(--space-5);grid-template-columns:1fr}}@media (width<=1024px){:root{--rail-width:200px}main{padding:var(--space-6) var(--space-5) var(--space-10)}.topbar{padding:0 var(--space-5)}.run-layout{grid-template-columns:1fr}.timeline{max-height:none;position:static}.overview-grid{grid-template-columns:1fr}.run-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.tech-grid{grid-template-columns:1fr}}@media (width<=760px){.shell{display:block}.shell:before{display:none}.sidebar{z-index:30;align-items:center;gap:var(--space-3);height:auto;padding:var(--space-2) var(--space-4);border-right:0;border-bottom:1px solid var(--border-subtle);flex-direction:row;position:sticky;top:0}.brand{font-size:var(--text-3);flex:none;padding:0}.brand>span:last-child,.brand small,.nav-label,.sidebar-status,.nav-hint{display:none}.brand-mark{width:26px;height:26px}.nav{scrollbar-width:none;flex:1;gap:2px;display:flex;overflow-x:auto}.nav a{padding:6px var(--space-2);font-size:var(--text-2);flex:none;gap:6px}.nav a:focus-visible{outline-offset:-2px}.topbar{height:44px;padding:0 var(--space-4);position:static}main{padding:var(--space-5) var(--space-4) var(--space-10);gap:var(--space-5)}h1{font-size:var(--text-6)}.headline,.verification-heading h2{font-size:var(--text-5)}.verification-panel{padding:var(--space-4)}.field-grid,.operation-editor,.evidence-grid,.grid-2,.grid-3,.expect-observe,.choice-group,.fingerprint-grid,.verdict-meaning,.mode-explainer,.run-filters,.compare-picker{grid-template-columns:1fr}.swap{justify-self:start}.run-pair{grid-template-columns:1fr}.pair-arrow{border-top:1px solid var(--border-subtle);border-bottom:1px solid var(--border-subtle);border:0;justify-self:center;width:32px;height:32px;padding:4px;transform:rotate(90deg)}.delta-strip{grid-template-columns:1fr}.delta-strip>div{border-left:0;border-top:1px solid var(--border-subtle)}.delta-strip>div:first-child{border-top:0}.verdict-strip>div{border-left:0;border-top:1px solid var(--border-subtle)}.verdict-strip>div:first-child{border-top:0}.data-table th,.data-table td{padding-inline:var(--space-3)}.hide-narrow{display:none}.summary-card>.summary-main{padding:var(--space-4)}.panel-head,.panel-body{padding-inline:var(--space-4)}.guide>li{padding:var(--space-4);grid-template-columns:28px minmax(0,1fr)}.guide>li>:last-child{grid-column:2;justify-self:start}.capture-states li{grid-template-columns:1fr}.capture-states code{grid-column:1}.kv>div{grid-template-columns:1fr;gap:2px}.operation-head{padding:var(--space-4) var(--space-4) 0}}@media (width>=761px){.show-narrow{display:none}}@media (width<=480px){.nav a svg{display:none}}@media (forced-colors:active){:focus-visible{outline-color:highlight}.nav a[aria-current=page],.segmented button[aria-pressed=true],.timeline-item[aria-pressed=true]{border:1px solid highlight}.skip-link:focus{color:linktext;border:1px solid}.screenshot-enlarge{color:linktext}.lightbox-frame{border:1px solid canvastext}}.plain-list{margin:0 0 4px;padding-left:1.1em}q.page-text{quotes:"“" "”";border-radius:var(--radius-1);background:var(--surface-sunken);border:1px solid var(--border-subtle);color:var(--text);font:var(--text-2)/1.6 var(--font-mono);overflow-wrap:anywhere;padding:1px 6px;display:inline}.guidance{gap:var(--space-3);margin-top:var(--space-4);padding:var(--space-4);border:1px solid var(--accent-border);border-radius:var(--radius-3);background:linear-gradient(180deg, var(--accent-subtle), transparent 70%);display:grid}.guidance h3{font-size:var(--text-3);letter-spacing:-.01em;font-weight:600}.guidance .findings{gap:var(--space-2);display:grid}.guidance .findings li{gap:var(--space-2);font-size:var(--text-2);color:var(--text-secondary);grid-template-columns:auto minmax(0,1fr);align-items:baseline;line-height:1.55;display:grid}.guidance .findings li>:first-child{text-transform:uppercase;letter-spacing:.04em;justify-content:center;min-width:44px;font-size:11px}.guidance .patches{gap:var(--space-2);display:grid}.guidance .patches li{gap:4px var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--border);border-radius:var(--radius-2);background:var(--surface-sunken);grid-template-columns:minmax(0,1fr) auto;align-items:center;display:grid}.guidance .patches li>div{grid-column:1/-1}code.patch{font:var(--text-1)/1.6 var(--font-mono);color:var(--accent-text);overflow-wrap:anywhere;white-space:pre-wrap}@media (width<=720px){.guidance .patches li{grid-template-columns:minmax(0,1fr)}}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta name="color-scheme" content="dark" />
7
+ <title>AgentPath Studio</title>
8
+ <script type="module" crossorigin src="/assets/index-DH4wJPHm.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-DrnNh2ip.css">
10
+ </head>
11
+ <body>
12
+ <div id="root"></div>
13
+ </body>
14
+ </html>
package/audit.md ADDED
@@ -0,0 +1,173 @@
1
+ # Auditing test changes (`agentpath audit`)
2
+
3
+ Coding agents and test healers now change end-to-end tests on their own. Most of those changes are right: a renamed button, a slower page. Some hide a real bug in the product instead. A test is skipped, an assertion is dropped, or the expected text is changed to whatever the broken page now shows. `agentpath audit` lists the Playwright test changes between two commits that a reviewer should look at before merging.
4
+
5
+ ```sh
6
+ agentpath audit --base origin/main # HEAD against the main branch
7
+ agentpath audit --base v1.2.0 --head my-branch e2e/ # only tests under e2e/
8
+ agentpath audit --base origin/main --json # one JSON object (schema below)
9
+ agentpath audit --base origin/main --fail-on-weakening # exit 1 on a weakened test, 3 on anything unread
10
+ agentpath audit --base origin/main --rerun --fail-on-change-needed # rerun the old tests on this build (see below)
11
+ agentpath audit --base origin/main --summary "$GITHUB_STEP_SUMMARY" # also write a Markdown summary for CI (docs/ci.md)
12
+ ```
13
+
14
+ ## What fails the gate
15
+
16
+ In CI, run `agentpath audit --base origin/main --rerun --fail-on-change-needed e2e` (the [CI recipe](ci.md)). It ends with a `Gate (exit N):` line that names the rule that decided, and `--summary` puts the same line in the job summary.
17
+
18
+ | The pull request | Exit | Why |
19
+ |---|---|---|
20
+ | Weakens a test (skip, fixme, a removed assertion or step, a try/catch, `.first()` …), and the old test fails on the new build | **1** | The weakening was needed to pass: it may hide a failure. |
21
+ | Changes a test in another way (a locator, an expected value, an added step), the old test fails on the new build, and its failure points to the site (a server error, a missing resource, a field that lost its label) | **1** | The change follows a broken page. |
22
+ | Adds `test.only` | **1** | It stops every other test in the run. |
23
+ | Weakens a test, but the old test still passes on the new build | 0 | The weakening was not needed; it is listed for review. |
24
+ | Changes a test, and the evidence points to the test or to neither side | 0 | A correct update looks like this. So does a page typo or a wrong value adopted by the test: see **Direction** under [Rerunning the old tests](#rerunning-the-old-tests---rerun). |
25
+ | Any test file or test could not be read, a weakened test's rerun was inconclusive, or the rerun ran out of time | **3** | Not decided: the gate fails closed. |
26
+
27
+ Exit 2 is a usage error. A reviewer who accepts a weakening on purpose (a feature removed with its test) merges past exit 1.
28
+
29
+ ## What it reads, and what it does not
30
+
31
+ - **Without `--rerun` it reads test source only, from git.**
32
+ - Only `git rev-parse`, `git diff` and `git cat-file` are called, as read-only commands with argument lists and no shell. External diff and text conversion drivers are turned off.
33
+ - Nothing in the repository is executed, no browser starts, and nothing is changed.
34
+ - **Which commits:** changes are counted from the merge base of `--base` and `--head`, where the head branch left the base, as a pull request shows them. A test added on the base branch afterwards is not reported as removed. A shallow clone without the merge base is a usage error (exit 2); fetch the full history first.
35
+ - **Test files:** names ending in `.spec.` or `.test.` with the extension `ts`, `mts`, `cts`, `js`, `mjs` or `cjs`, plus every such file under the paths given.
36
+ - **Another runner's tests.** A file named as a test that imports another test runner (`vitest`, `jest`, `@jest/globals`, `mocha`, `node:test`, `ava`, `uvu`, `bun:test`) and no Playwright module is listed under `otherRunner`, not read, and never fails a gate. This is decided at base and at head wherever the file exists, so an import added in the pull request itself cannot take a Playwright test out of an existing file's gate. A file the pull request adds has only its head side, so a new test added already skipped in a file that imports another runner is listed here, not gated. Unit tests that use a runner's globals without importing it are still read as tests: **pass your Playwright directory** (`agentpath audit --base origin/main e2e`) so that a pull request changing only unit tests is not reported, and the recipe in [CI](ci.md) does so.
37
+ - **Paths given.** Each must name a file at the merge base or at `--head` (`.` is the repository root), or the command exits 2: a misspelled suite would otherwise pass with nothing read. Test files changed outside the paths (other runners' left out) are listed under `outsidePaths`, in the text and in `--summary`, never read or gated. With several Playwright suites, give each one's directory.
38
+ - **Configurations at both commits.** `testMatch` scopes come from the merge base and from `--head`, so a pull request that deletes or narrows a configuration together with its tests still has those tests read.
39
+ - **Custom `testMatch`.** A file a configuration's `testMatch` selects is a test file too. Audit reads string globs as Playwright does (a `**/` in front, case ignored), from a fixed grammar: literal names, `/`, `*`, `**`, `?` and one level of `{a,b}`. A regular expression literal is read only when it ends in a fixed file name (`/.*\.e2e\.tsx?/`); repository text never becomes a regular expression. The configuration is read as text at the merge base and at `--head`, never run, and its literal `testDir` (or its own directory) bounds what it selects. Audit still reads every file named `.spec.` or `.test.`, even where a `testMatch` leaves it out, so that a change there is never hidden. A `testMatch` inside a project whose own `testDir` is computed is bounded by the configuration's directory instead, so it can name more files than Playwright runs: a `/.*\.js/` there names every `.js` file below the configuration. Those are read as tests; a file with no tests in it changes nothing in the report.
40
+ - **A `testMatch` audit cannot apply** (a variable, a character class, a regular expression that is not a fixed ending): every changed source file below that configuration that is not otherwise a test is reported as not read. With `--fail-on-weakening` or `--fail-on-change-needed` the command then exits 3, instead of passing tests it never saw. A `testMatch` whose globs all end in a `.spec.` or `.test.` name cannot select other names, so it adds nothing to that list.
41
+ - **From source alone it cannot say whether a change hid a bug.** That needs the old test rerun against the new build: see [Rerunning the old tests](#rerunning-the-old-tests---rerun).
42
+ - **Not examined:** changed files near the tests that are not tests themselves, test files in JSX (`.tsx`, `.jsx`), and any changed `playwright.config.*`. Weakening can live there too: retries, ignored tests, page objects, fixtures. Such files are listed, never read.
43
+ - **Fails closed:** a file it cannot read (unbalanced brackets or strings, over 1 MiB) or a test whose title is not a literal (outside the [parameterised case](#how-tests-and-assertions-are-paired)) is reported as unreadable, never guessed. With `--fail-on-weakening`, anything unread makes the command exit 3, even if nothing weakened was found.
44
+ - **Untrusted text:** titles, locator names and expected values are quoted from the repository. Control, format and line-separator characters in them become spaces, so quoted text cannot add lines to the report or reach the terminal as escape codes. The arguments of `fill`, `type`, `pressSequentially` and `press` are never shown.
45
+ - **Limits:** at most 2000 test files are read and 5000 listed, with 2000 tests per file and 500 findings per test. Anything past a limit is counted as not read, so `--fail-on-weakening` exits 3.
46
+
47
+ ## How tests and assertions are paired
48
+
49
+ - **Tests:** keyed by their `describe` path and title. Hooks (`beforeEach`, `afterEach`, `beforeAll`, `afterAll`) are keyed as `[beforeEach 1]` and so on, by position within their `describe`.
50
+ - **Renamed tests:** a test whose title changed is paired with its old version only when the two bodies are token-for-token identical. Otherwise it is reported as one test removed and one added.
51
+ - **Parameterised tests:** a test whose title is built when the tests run (`` test(`opens ${name}`, …) `` in a loop, or any test inside such a `describe`) stands for one test per parameter. It is keyed by its title's source text and compared only when all of these hold; otherwise it stays unread, as before:
52
+ - every unread title in the file is one of these;
53
+ - everything in the file outside the compared test bodies is identical at base and head: the parameter lists, the title expressions, declaration modifiers such as `.skip`, other code and imports;
54
+ - each title's source text appears once in the file on each side;
55
+ - no file near the tests changed that audit does not examine, and no file the test file imports directly by a relative path changed anywhere in the comparison (either could hold the parameter list).
56
+
57
+ So a pull request that shortens a parameter list, or skips such a test on its declaration, still exits 3 with `--fail-on-weakening`. A weakened parameterised test is never rerun, because its line may stand for several tests: `--rerun` reports it as inconclusive. Not checked: a parameter list reached through a path alias (`@/fixtures`), a package, or an import of an import.
58
+ - **Assertions:** an `expect` is keyed by its subject and matcher. Base and head assertions are aligned in order by that key (longest common subsequence).
59
+ - If the key changed, as when a text check is swapped for a URL check, that is one assertion removed and one added.
60
+ - A trailing object literal is read as options (`{ timeout }`) and left out of the expected value, except in generic matchers that take no options (`toEqual`, `toMatchObject`, `toBe`, `toContain` and the like), where it is the expected value.
61
+ - **Actions:** keyed by their receiver and method, and aligned the same way. A call on an array or buffer (`Array(5).fill(x)`, `new Uint8Array(4).fill(0)`, `[a, b].fill(c)`) and a call inside an assertion's expected value are not steps.
62
+ - **Known limits:**
63
+ - An assertion or step moved into a loop or a helper function reads as removed. The new one in the loop is listed as added, and a changed helper file is listed as not examined. On a development suite, two commits that moved assertions into a loop and into a helper were flagged as weakening this way.
64
+ - A switch between `expect` and `expect.poll` is not reported.
65
+ - A title joined from strings (`"opens " + name`) reads as the literal it starts with, and a `describe` titled by a bare variable (`test.describe(role, …)`) reads as no `describe` at all, so a loop around either is not treated as parameterised: a shorter parameter list there is not reported.
66
+ - Otherwise an action is recognised by its method name, so a call such as `rows.fill(value)` on an array held in a variable reads as a `fill` step.
67
+
68
+ ## Kinds of change
69
+
70
+ This table was fixed before any measurement of the command. A later change to it is documented as such. One change was made before the command was built: `assertion-soft` moved from "Weakens" to "Changes", because a failed soft assertion still fails the test.
71
+
72
+ | Effect | Kind | Meaning |
73
+ |---|---|---|
74
+ | Weakens | `skip-added` | `test.skip(title, …)`, `test.describe.skip`, or an unconditional `test.skip()` in the body or a hook. |
75
+ | Weakens | `fixme-added` | The same forms for `fixme`. This includes the bare `test.fixme()` that Playwright's healer agent writes. |
76
+ | Weakens | `conditional-skip-added` | `test.skip(condition, …)` or `test.fixme(condition, …)` added, or a `test.skip()` or `test.fixme()` call inside an `if`, `else`, `try` or `catch` branch. |
77
+ | Weakens | `fail-added` | `test.fail` added: the test now passes when it fails. |
78
+ | Weakens | `only-added` | `.only` added: other tests in the run stop running. |
79
+ | Weakens | `test-removed` | A test that has no paired test at head. |
80
+ | Weakens | `assertion-removed` | An assertion with no aligned assertion at head. |
81
+ | Weakens | `assertion-made-conditional` | The assertion now sits inside an `if`, `else`, `try` or `catch`, or after a `.catch(`. |
82
+ | Weakens | `first-added` | `.first()`, `.last()` or `.nth()` added. It can hide a duplicated element. |
83
+ | Weakens | `action-removed` | A step (`click`, `fill`, `goto` and so on) with no aligned step at head. |
84
+ | Weakens | `target-message-key` | A locator that finds an element by name or text (`getByRole`, `getByLabel`, `getByText`, `getByPlaceholder`, `getByAltText`, `getByTitle`) now asks for a name shaped like an untranslated message key (`shop.save_for_later`), where it asked for a readable one. Only direct string literals count: the first argument, or the value of `name:`. A key passed to a lookup such as `t("nav.save")` does not. Added after the table was fixed; see below. Always listed with `target-changed`. |
85
+ | Changes | `expected-changed` | The same assertion with a different expected value. |
86
+ | Changes | `negation-changed` | `.not` added or removed. |
87
+ | Changes | `assertion-soft` | `expect.soft` where the assertion was hard. The test still fails, but later steps keep running. |
88
+ | Changes | `target-changed` | A locator literal (role, name, label, text, test id, selector) removed and another added. |
89
+ | Changes | `timeout-raised` | A larger `timeout`, `test.setTimeout` or `waitForTimeout`, or `test.slow()` added. |
90
+ | Changes | `action-added` | A step with no aligned step at base. |
91
+ | Neutral | `test-added`, `assertion-added` | Listed for completeness. |
92
+
93
+ **`target-message-key` was added on 5 December 2026, after this table was fixed.** A rerun of our own fixture showed a head test adopting the untranslated key a broken build showed, and `--fail-on-change-needed` passed it. The key shape is the one explain uses: lowercase dotted segments with an underscore, a third segment or a last segment of five letters or more, so `index.html` is not one. On six development suites, none of 1,827 literal locator names had that shape (counted by `scripts/lab/key-shape-count.mjs` with the shipped reading; stored in the repository's `docs/evaluations/data/key-shape-count.json`). That is a development-set count, not a measured false-positive rate. Test ids and CSS selectors are not read for it, and neither are expected text values.
94
+
95
+ A new test is listed as weakened only when it is added already skipped, fixme'd, expected to fail, or marked `only`. This rule was added after a first look at a large open-source end-to-end suite, where new tests skipped on one browser were common, so that suite is a development set.
96
+
97
+ "Weakens" means the change can let a test pass that would otherwise fail. It does not mean the change is wrong. Updating a locator after a real rename is a "Changes" kind, and it is also how a broken label can be hidden. Telling those apart is the browser half's job.
98
+
99
+ ## Rerunning the old tests (`--rerun`)
100
+
101
+ `--rerun` runs the old version of each changed test against the new build, beside the new version. It says whether the change is needed for the test to pass on this build. A change that is needed may be a correct update or may hide a regression. The rerun cannot tell which, but it narrows what a reviewer must read, and explain's engine says where the old failure's evidence points.
102
+
103
+ **What it runs.** It runs the project's own Playwright, configuration, web server and tests in this checkout, exactly as `npx playwright test` would. AgentPath adds no egress boundary or sandbox. Use it only where you would run those tests, such as the CI job that already runs them. Without `--rerun`, nothing is run.
104
+
105
+ **Before it starts**, it requires:
106
+ - the checkout is at `--head`, with no changes to tracked files (exit 2 otherwise);
107
+ - no copy left by an earlier rerun is present (exit 2, naming it).
108
+
109
+ **How it runs:**
110
+ - Each base file with a flagged test (any "Weakens" or "Changes" kind) is written beside the original as `agentpath-base-<8 hex>-<name>`. The whole original name stays its ending, so a `testMatch` that selects by an ending (`*.spec.ts`, `*e2e.spec.ts`, `/.*\.e2e\.ts/`) selects the copy too. A `testMatch` that names one exact file (`'**/e2e.spec.ts'`) does not: the old version of such a file cannot run, its tests are inconclusive, and `--fail-on-change-needed` exits 3. Copies named as earlier versions wrote them (`<name>.agentpath-base-<8 hex>.spec.<ext>`) are still recognised as stale. Its relative imports therefore resolve to the head's helpers, and the default `testMatch` applies. A copy is created exclusively, never over an existing file, and removed afterwards, also on Ctrl-C. Only if the audit process itself is killed can a copy stay behind; the next rerun then refuses to start and names it.
111
+ - Each test is selected by `file:line`, old and new in one Playwright run. When the new version is skipped or gone, one unchanged test of the same old file runs from the same copy as a control. The run uses `--retries=0`, `--trace=retain-on-failure` and `--update-snapshots=none`. The configuration is the nearest `playwright.config.*` above the test file, or `--config`. `--project` narrows the run.
112
+ - If Playwright cannot load a file, it runs nothing at all. Each copy left without results then runs on its own, so one old file that no longer loads affects only its own tests.
113
+ - An old version that fails is run a second time. A failure, then a pass, is reported as flaky.
114
+ - The whole rerun is bounded by `--rerun-timeout` (default 600 seconds). On timeout Playwright gets SIGINT, so it ends its web server. If Playwright ignores that, it gets SIGKILL five seconds later, and a web server it started can then stay running.
115
+ - `git status` is compared before and after. Any difference is listed, and makes `--fail-on-change-needed` exit 3.
116
+
117
+ **Outcomes per test:**
118
+
119
+ | Outcome | When |
120
+ |---|---|
121
+ | `change-needed` | The old version failed at a locator or assertion and failed again on the second run, and the new version passed. When the new version is skipped or gone, the unchanged control test must pass instead, so a broken environment (sign-in, setup) is not taken for a broken build. |
122
+ | `not-needed` | The old version still passes on this build. The change may still be unwanted, but it hides no failure today. |
123
+ | `inconclusive` | Anything else, with a reason. For example: both versions fail; the old version failed outside a locator or assertion, such as while loading or in a helper that changed; a flaky result; not run. |
124
+ | `not-applicable` | A new test: there is no old version. |
125
+
126
+ Without a control there is no `change-needed` for a skipped or removed test. That happens for a deleted test file, a whole `describe` skipped, or a file where every test changed; the outcome is then always inconclusive. This fails closed.
127
+
128
+ `test.only` added to a test is not rerun, because it would focus the whole Playwright run. A head file that has `.only` is kept out of the run, and so is an old file that has it. `--fail-on-change-needed` fails on an added `.only` (exit 1) without a rerun, because it stops every other test.
129
+
130
+ Untested: whether Playwright runs setup projects (`dependencies`) when tests are selected by `file:line`. If it does not, the control fails too, and the outcome is inconclusive rather than wrong.
131
+
132
+ Not rerun, and inconclusive:
133
+ - tests in a file that runs in serial mode (`test.describe.serial`, `mode: "serial"`), where one test depends on those before it;
134
+ - hooks (rerun the tests they cover yourself);
135
+ - tests that compare snapshot files, which are found by the test file's name;
136
+ - tests past the first 50 flagged.
137
+
138
+ With several Playwright projects, a project where the change is needed decides the outcome.
139
+
140
+ **The old test runs with the new helpers.** The copy imports the head's page objects, fixtures and helpers. If a helper changed, a pure refactor can fail the old version at a locator. That can come back as `change-needed`. The files listed as not examined say which helpers changed. Read those before trusting the outcome.
141
+
142
+ **Direction.** For `change-needed`, the old version's failure is read with the engine `explain` uses (its `error-context.md` and trace). `direction` is `site` if any finding points to the site, otherwise `task` (the old test) if any does, otherwise `unclear`. This is the same rule `watch` uses.
143
+ - Failed requests count even when explain does not read the locator. Network errors, 5xx, 404 and 410 point to the site.
144
+ - A changed expected value usually comes back `unclear`. explain reads locators and requests, not values.
145
+ - **A locator retargeted to a typo the page now shows passes the gate (exit 0).** If "Add to cart" becomes "Add to crat" on the page and the head test follows, the result is `change-needed` with direction `task`. A typo added to the page leaves the same evidence as a correct rename, so nothing in the browser can say which side changed. Read every `target-changed` with `change-needed` before merging.
146
+ - **A retarget to an untranslated message key fails it (exit 1).** That holds when the name is a `target-message-key` change and the change is needed. The direction stays `unclear`, because explain reports the key shape as a fact. The failure comes from the "Weakens" kind, not from the direction.
147
+
148
+ **Measured on lab pages** (development measurements by the people who built the gate; the records are in the source repository, not in the package):
149
+ - **Mechanical edits:** the gate failed 17 of 19 test edits that hid a planted fault, and passed 2 of 2 correct updates. The two it passed are a retarget to a typo the page shows and an expected value changed to a wrong count, as described above.
150
+ - **Edits made by healer agents** (two models, 12 planted product changes each): the gate failed all 15 pull requests that skipped a broken test, and passed all 8 correct updates. It passed the one that retargeted a field around a broken label. Reading that case from Playwright's snapshot was added afterwards; it then caught that case and two fresh ones of the same kind, and passed two intended label changes. Those are development cases, not a held-out measurement.
151
+
152
+ A test step deleted with a feature removed on purpose is a weakening edit, and fails the gate.
153
+
154
+ **`--fail-on-change-needed`** (needs `--rerun`; not with `--fail-on-weakening`):
155
+
156
+ | Exit | When |
157
+ |---|---|
158
+ | 3 | Anything was not read, the rerun ran out of time or changed the working tree, or a weakened test's rerun was inconclusive. |
159
+ | 1 | A weakened test's change is needed, a needed change's evidence points to the site, or `.only` was added. |
160
+ | 0 | Otherwise. A test with only "Changes" kinds whose change is needed with a `task` or `unclear` direction is listed, not failed. |
161
+
162
+ ## Exit codes
163
+
164
+ | Code | Meaning |
165
+ |---|---|
166
+ | 0 | Report printed. |
167
+ | 1 | With `--fail-on-weakening`: at least one test was weakened, and everything was read. |
168
+ | 2 | Usage error, an unknown ref, or not a git repository. |
169
+ | 3 | With `--fail-on-weakening`: some file or test could not be read. |
170
+
171
+ With `--rerun --fail-on-change-needed`, the codes are as in [the table above](#what-fails-the-gate).
172
+
173
+ With either flag, the text output ends with a `Gate (exit N):` line that gives the reason in one sentence, and names up to three tests. With `--json` that line goes to standard error, so standard output stays one JSON document; with `--summary` the same reason appears under the summary's heading.
@@ -0,0 +1,104 @@
1
+ # Autonomous mode (experimental)
2
+
3
+ In autonomous mode, a model you configure chooses the browser actions toward the task's goal. The browser host validates and runs each action. The same independent assertions as in deterministic mode then decide the verdict. Deterministic runs never call a model.
4
+
5
+ No model or paid account is bundled, and AgentPath never downloads a model or contacts a provider on its own. The results so far come from small synthetic fixtures. They do not establish broad reliability.
6
+
7
+ ![An autonomous run: the model's work, its completion claim, and the independent verdict](images/run-autonomous-passed-desktop.jpg)
8
+
9
+ ## What the model sees and does not see
10
+
11
+ The model receives:
12
+
13
+ - the goal, the initial URL and the allowed hosts
14
+ - bounded primary-page accessibility role and name pairs
15
+ - form-control affordances and optional value-free control state
16
+ - the observed effect of its last action
17
+
18
+ The model never receives:
19
+
20
+ - the independent assertions
21
+ - the action policy
22
+ - reference steps
23
+ - browser credentials, the DOM, screenshots or filesystem content
24
+
25
+ After a fill or keypress, free text is withheld. This deliberately limits some tasks. Page content is untrusted and can still influence the model's decisions. See [Security and privacy](security.md).
26
+
27
+ ## Configure a task
28
+
29
+ 1. **Start a model server.** Use a trusted, already installed local inference server. Ollama listens on `http://127.0.0.1:11434`. OpenAI-compatible servers use their root URL or their `/v1` base.
30
+ 2. **Choose autonomous mode.** In Studio, open **Tasks → New task** and choose **Autonomous model execution**. Studio asks before it removes the deterministic action list.
31
+ 3. **Set the model.** In the **Model** section, set the provider (Ollama or OpenAI compatible), the **Model endpoint** and the **Model name**.
32
+ 4. **Add assertions.** Add independent assertions that prove the goal. They are the only thing that can make the run pass.
33
+ 5. **Tune limits if needed.** Open **Advanced** for inference settings and limits:
34
+ - temperature
35
+ - Ollama thinking, and the Ollama decision format (JSON object or decision JSON schema)
36
+ - maximum browser actions and model decisions
37
+ - the token allowance, maximum response tokens and model request timeout
38
+ - whether to store filtered model responses
39
+ 6. **Run it.** Save and run. **Cancel** in the run header stops a running task.
40
+
41
+ In a source checkout, the examples in `examples/autonomous/` (`catalog.json`, `cart.json` and `workshop.json`) contain goals and assertions, with no reference steps. Replace `replace-with-installed-model` with a model you have installed. The CLI runs autonomous tasks with `agentpath run <task.json> --json`.
42
+
43
+ ## Defaults and limits
44
+
45
+ | Limit | Default |
46
+ |---|---|
47
+ | Browser actions | 20 |
48
+ | Model decisions | 30 |
49
+ | Response tokens per request | 512 |
50
+ | Token allowance | 65,536 units |
51
+ | Model request timeout | 30 seconds |
52
+ | Overall run deadline | 120 seconds, set by the task's browser limits |
53
+
54
+ The token allowance is conservative. It reserves the input's UTF-8 byte count plus the maximum response tokens before each request, and grows if a provider reports more usage. It is not a billing counter or a tokenizer guarantee.
55
+
56
+ The run stops without retrying when any of these happens:
57
+
58
+ - the model returns an invalid response or declares it cannot continue
59
+ - a budget runs out
60
+ - the provider fails
61
+ - a browser action fails
62
+
63
+ ## Endpoints and credentials
64
+
65
+ - **Default.** Only numeric loopback endpoints, `127.0.0.1` or `[::1]`, are allowed.
66
+ - **External endpoints.** An external endpoint requires the local operator to set `AGENTPATH_MODEL_ENDPOINT` to its exact normalized base URL, including a trailing slash when normalization adds one.
67
+ - **API key.** An optional `AGENTPATH_MODEL_API_KEY` is sent only to that approved endpoint. Keep credentials out of task JSON.
68
+ - **Cost and data.** Setting an external endpoint authorizes sending goals and bounded page observations to that service, and it may incur provider costs. AgentPath never makes this configuration itself.
69
+
70
+ **Protocols.** AgentPath supports non-streaming Chat Completions in JSON-object mode, and Ollama `/api/chat` with JSON-object output or the opt-in decision-schema format. Thinking output is never parsed as an action. Other dialects and the Responses API are not established.
71
+
72
+ ## Reading an autonomous run
73
+
74
+ Run Explorer adds an **Autonomous execution** panel. It shows:
75
+
76
+ - the provider, the model and the endpoint origin
77
+ - the browser actions and model decisions recorded, and the token allowance charged
78
+ - the inference settings
79
+ - **Agent completion declared** next to **Independent verification** passed or failed
80
+ - a premature-completion warning when the model declared success but an assertion failed
81
+ - the **Model decision trace**: each proposal, its control reference, value-free control state, observed effect, rejections and policy outcomes
82
+
83
+ **Inspect step N** jumps from a decision to its browser step. A model's declaration is recorded for reference and never decides the verdict.
84
+
85
+ `agent.json` stores minimized, versioned decisions, observation and proposal digests, budgets, action references, and declaration against verification. Full response storage is off by default. Enabling it (`agent.storeMessages`) can keep sensitive material despite filtering.
86
+
87
+ ## Controls, references and policies
88
+
89
+ Observations list form controls separately from page text. Each control has:
90
+
91
+ - an observation-local reference (`c1`, `c2`, …)
92
+ - its kind: native select, custom combobox or text input
93
+ - whether it is enabled, and the actions it supports
94
+ - for a native select, its bounded choices
95
+
96
+ A reference is valid only for the observation that issued it, and it is checked against the live page before use. Unknown, stale, disabled, ambiguous, wrong-type and unsupported targets fail with a named error instead of a guess. Decision protocol v2 names a select as `{ "action": "select", "control": …, "option": … }`, and v1 decisions are still accepted. See [contracts](contracts.md#grounding-and-action-policy).
97
+
98
+ An action policy (see [Writing tasks](writing-tasks.md#action-policy)) applies to model proposals. In enforce mode, a matching proposal is rejected before it runs. The model learns only that the action was rejected, never the rule.
99
+
100
+ ## When a model is unavailable
101
+
102
+ Run `agentpath doctor` for endpoint checks. Verify that your trusted model service is running and that the task uses its endpoint and an installed model name. Save the corrected task and run it again. If you just want to try AgentPath, run `agentpath demo` for the deterministic walkthrough.
103
+
104
+ Review the [security and privacy limitations](security.md) before connecting any model.
package/ci.md ADDED
@@ -0,0 +1,118 @@
1
+ # Running AgentPath in CI
2
+
3
+ `agentpath run` takes several task files, runs them one after another (or several at a time with `--workers`), and can write two reports a CI system understands:
4
+
5
+ ```sh
6
+ agentpath run tasks/*.task.json --junit agentpath-junit.xml --summary agentpath-summary.md
7
+ ```
8
+
9
+ - **Exit code.** 0 when every task passed, 1 when any task failed, 2 for a usage or configuration error. Every file is validated before a browser starts, so a broken task file fails the job in seconds, not after a long run.
10
+ - **`--junit <file>`** writes JUnit XML: one test case per task file, with the failed operation, what was observed and expected, what the evidence points to, and the suggested JSON Patch in the failure body. It is standard JUnit XML, which most CI systems can display as test results.
11
+ - **`--summary <file>`** writes Markdown for a job summary or pull request comment: a table of verdicts and, for each failure, what the evidence points to. When the evidence points to the site, it says that no task change is suggested. If the file is the one named by `$GITHUB_STEP_SUMMARY`, the summary is appended to it rather than overwriting it.
12
+ - **`--json`** prints one JSON line per task, each with the task file it came from.
13
+ - **`--workers <n>`** (1 to 8, default 1) runs up to n tasks at a time, each in its own browser, sinkhole and run directory. Results, JSON lines and reports keep the order of the files. Parallel runs share the machine's CPU and memory, so a timing-sensitive task can be slower than when it runs alone, and a timeout can then fail it: use more workers where the runner has headroom, and fewer for tasks with tight timeouts. On one laptop, 24 short tasks took 41.5 s with 1 worker and 6.3 s with 8, all passing, with about 300 MB of memory per worker, and 74 benchmark tasks gave the same verdicts and directions at 1 and 8 workers (the repository's `docs/evaluations/scale.md`).
14
+ - At most 50 task files per command. Run directories go to `.agentpath/runs`, or to `--runs-dir`. Upload them as a build artifact to read a failure in Studio later.
15
+
16
+ Task and page text in both reports is escaped. The Markdown summary neutralises characters that could start markup, a link, an autolink or a mention, because page-provided names can appear in it.
17
+
18
+ ## GitHub Actions
19
+
20
+ This is an untested example: no AgentPath release has run it on GitHub yet. Adapt it and check the first run. AgentPath tests a site you run, so start the site in the same job and allow only its host. It assumes your app serves on `127.0.0.1:3000` and your tasks live in `tests/agentpath/`.
21
+
22
+ ```yaml
23
+ name: browser-tasks
24
+ on: pull_request
25
+ concurrency: { group: "browser-tasks-${{ github.event.pull_request.number }}", cancel-in-progress: true }
26
+ jobs:
27
+ agentpath:
28
+ runs-on: ubuntu-24.04
29
+ timeout-minutes: 15
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+ - uses: actions/setup-node@v4
33
+ with: { node-version: 22 }
34
+ - run: npm ci
35
+ - run: npm install --global --ignore-scripts ./vendor/agentpath-0.1.0-alpha.2.tgz
36
+ - run: npx --yes playwright@1.65.1 install-deps chromium && agentpath browser install
37
+ - run: |
38
+ npm run start &
39
+ for i in $(seq 60); do curl -fsS http://127.0.0.1:3000 >/dev/null && break; sleep 1; done
40
+ - run: agentpath run tests/agentpath/*.task.json --junit agentpath-junit.xml --summary "$GITHUB_STEP_SUMMARY"
41
+ - if: failure()
42
+ uses: actions/upload-artifact@v4
43
+ with: { name: agentpath-runs, path: .agentpath/runs, retention-days: 7 }
44
+ ```
45
+
46
+ Notes:
47
+
48
+ - `install-deps` installs Chromium's system libraries on the runner. Pin it to the Playwright version AgentPath uses (1.65.1 in this release).
49
+ - The job runs on pull requests only, and a newer push cancels the older run. Both keep Actions minutes down.
50
+ - `actions/upload-artifact` stores the run directories only when the job failed. They contain screenshots and accessibility snapshots of your test site, so keep retention short and do not run against production data.
51
+ - Run directories are evidence for a person or an agent. A coding agent with the [MCP server](coding-agents.md) can read the same failure and decide whether to repair the task or report the site.
52
+
53
+ ## Scheduled checks
54
+
55
+ `agentpath watch` runs the same task files on a schedule, on a machine that stays up, and alerts only when a task's verdict changes:
56
+
57
+ ```sh
58
+ agentpath watch tasks/*.task.json --every 10m
59
+ ```
60
+
61
+ - **Rounds.** Every task runs once per round, one after another. The next round starts `--every` (such as `30s`, `10m` or `2h`) after the previous one finished, so rounds never overlap. `--rounds <n>` stops after n rounds; without it, `watch` runs until Ctrl+C.
62
+ - **Alerts.** An alert is a change between passed and failed. A task's first verdict is a baseline, so a task that already fails does not alert until it passes. A new failure category while a task keeps failing is not an alert. A passed-to-failed alert says whether the recorded evidence points to the task, to the site, or to neither, as `run` would.
63
+ - **Not a verdict.** A cancelled run, a browser that cannot start on this machine (reported as `NOT CHECKED`, with a pointer to `agentpath doctor`), and a run that cannot be recorded at all (`NOT RUN`, for example on a full disk) never alert and never change the previous verdict.
64
+ - **State.** The latest verdict per task is kept in `watch-state.json` next to the runs directory, or at `--state <file>`. It is a cache: when it is missing or unreadable, `watch` rebuilds it from the run directories and says so.
65
+ - **Output.** One summary line per round that names the failing tasks, then any alerts. `--json` prints one JSON line per round in the shape in [contracts](contracts.md#scheduled-checks-agentpath-watch). `watch` exits 0 when its rounds end, whatever the verdicts, and 130 or 143 when interrupted.
66
+ - Deterministic tasks only, at most 50, each with its own task ID.
67
+
68
+ `watch` reports change, not correctness: a task that fails the same way every round raises no alert after its baseline. Read the round line for that.
69
+
70
+ ## Checking test changes on pull requests
71
+
72
+ `agentpath audit` and `agentpath ledger` need no site and no browser. They read git, so they fit any pull request job. `audit --rerun` also runs the old versions of changed tests in your existing Playwright setup. This is an untested example: no AgentPath release has run it on GitHub yet. It assumes your Playwright tests already run with `npx playwright test` after `npm ci`.
73
+
74
+ ```yaml
75
+ name: test-changes
76
+ on: pull_request
77
+ concurrency: { group: "test-changes-${{ github.event.pull_request.number }}", cancel-in-progress: true }
78
+ permissions: { contents: read }
79
+ jobs:
80
+ agentpath:
81
+ runs-on: ubuntu-24.04
82
+ timeout-minutes: 30
83
+ steps:
84
+ - uses: actions/checkout@v4
85
+ with: { fetch-depth: 0 } # audit needs the merge base, ledger the history
86
+ - uses: actions/setup-node@v4
87
+ with: { node-version: 22 }
88
+ - run: npm install --global --ignore-scripts ./vendor/agentpath-0.1.0-alpha.2.tgz
89
+ # Reads git only: lists turned-off tests and the test changes in this pull request.
90
+ - run: agentpath ledger --summary "$GITHUB_STEP_SUMMARY"
91
+ # e2e is your Playwright directory (give each suite's, if you have several): a pull request that changes only
92
+ # unit tests is then not reported, and test files changed outside these paths are listed, not read.
93
+ - run: agentpath audit --base "origin/$GITHUB_BASE_REF" --summary "$GITHUB_STEP_SUMMARY" e2e
94
+ # Optional, and the required check: rerun the old versions of the changed tests on this build.
95
+ - run: npm ci && npx playwright install --with-deps chromium
96
+ - run: agentpath audit --base "origin/$GITHUB_BASE_REF" --rerun --fail-on-change-needed --summary "$GITHUB_STEP_SUMMARY" e2e
97
+ ```
98
+
99
+ Notes:
100
+
101
+ - **History.** `fetch-depth: 0` fetches the full history. A shallow clone has no merge base for `audit` (exit 2) and no history for `ledger`, which says so under "Not read".
102
+ - **Which commit.** `actions/checkout` on `pull_request` checks out a merge commit of the branch into the base. `--head` then defaults to that commit, which is what the pull request would merge. Since `--rerun` runs the pull request's own code, run it only where you would already run that pull request's tests.
103
+ - **Exit codes.**
104
+ - `ledger` never fails the job.
105
+ - `audit` without a `--fail-on-…` option exits 0.
106
+ - `--fail-on-change-needed` exits 1 when a weakened test's change is needed on this build, or when a needed change's evidence points to the site. It exits 3 when anything was not read or a weakened test's rerun was inconclusive ([audit](audit.md#rerunning-the-old-tests---rerun)).
107
+ - To start without blocking merges, keep the step but add `continue-on-error: true`.
108
+ - **Summaries.** `--summary` appends Markdown to the job summary. Test titles and commit messages in it are escaped, so they cannot add links, mentions or HTML.
109
+
110
+ ## Other CI systems
111
+
112
+ The command is the same everywhere: install the tarball and Chromium, start the site, run the tasks, and collect `agentpath-junit.xml` as a test report. On GitLab, declare it under `artifacts: reports: junit:`.
113
+
114
+ ## What CI does not change
115
+
116
+ - A verdict still comes only from the task's independent assertions.
117
+ - Suggestions in the reports are never applied. A suggestion is a hypothesis; rerunning the task is the proof.
118
+ - `allowedHosts` in each task file is still the only list of hosts the browser may reach.