@capagents/forgeqe 3.3.8 → 3.3.9

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 (130) hide show
  1. package/HOW_TO_USE.md +92 -0
  2. package/dist/a11y-runtime.mjs +3204 -0
  3. package/dist/docs-site/docs/area-quality/index.html +90 -2
  4. package/dist/docs-site/docs/overview/index.html +1 -1
  5. package/dist/docs-site/docs/search.js +1 -1
  6. package/dist/forgeqe.js +2215 -2094
  7. package/dist/template.html +69 -70
  8. package/dist/web/assets/{3d-force-graph-bqf5EzgX.js → 3d-force-graph-BPsVSYjw.js} +1 -1
  9. package/dist/web/assets/Agent-DY6pRvcD.js +10 -0
  10. package/dist/web/assets/{AgentWork-Dqa1UKaU.js → AgentWork-Brch_Mn3.js} +1 -1
  11. package/dist/web/assets/ApiTests-BtWKVPw5.js +17 -0
  12. package/dist/web/assets/{Browse-W54t28gX.js → Browse-DbIFxsy8.js} +1 -1
  13. package/dist/web/assets/Chat-BWiH0XGV.js +3 -0
  14. package/dist/web/assets/{CommandPalette-DnIxy2ga.js → CommandPalette-DfoEUEL6.js} +1 -1
  15. package/dist/web/assets/{Compare-VdisgqmY.js → Compare-DTZ_BW1P.js} +1 -1
  16. package/dist/web/assets/Cost-DDghPWch.js +1 -0
  17. package/dist/web/assets/Data-DZlKsTwA.js +6 -0
  18. package/dist/web/assets/Desktop-DTIZ62Pi.js +1 -0
  19. package/dist/web/assets/DesktopReview-B8-dSGJH.js +2 -0
  20. package/dist/web/assets/Evidence-BYw_Q4Ul.js +1 -0
  21. package/dist/web/assets/Explore-BL_c5WK1.js +2 -0
  22. package/dist/web/assets/{Features-CIhQJMAK.js → Features-DrFNrvbh.js} +1 -1
  23. package/dist/web/assets/Flags-CHrDwhqG.js +2 -0
  24. package/dist/web/assets/Flaky-DtcLf8h6.js +1 -0
  25. package/dist/web/assets/Impact-CMU_ijo2.js +3 -0
  26. package/dist/web/assets/Jobs-BjybdQb_.js +5 -0
  27. package/dist/web/assets/KindPage-VK-Vgkzv.js +6 -0
  28. package/dist/web/assets/{LiveDevice-CZZRu6xl.js → LiveDevice-BqL1P33F.js} +1 -1
  29. package/dist/web/assets/Migration-7BI7iXIv.js +8 -0
  30. package/dist/web/assets/Mobile-AgAhvlVL.js +1 -0
  31. package/dist/web/assets/Observability-5r36Xf3d.js +1 -0
  32. package/dist/web/assets/{OwnItems-BinKnGAs.js → OwnItems-CqCOuvba.js} +4 -4
  33. package/dist/web/assets/PageAgent-00NQxK49.js +1 -0
  34. package/dist/web/assets/Product-B75ztJFn.js +6 -0
  35. package/dist/web/assets/Production-lIUlcjf0.js +1 -0
  36. package/dist/web/assets/Quality-BlRpB6mx.js +1 -0
  37. package/dist/web/assets/Readiness-CesaSDtp.js +1 -0
  38. package/dist/web/assets/Record-CLy9jQ5N.js +1 -0
  39. package/dist/web/assets/Regression-BjpZrkfK.js +5 -0
  40. package/dist/web/assets/{RelationGraph-CszRGlEp.js → RelationGraph-ClPBGuMw.js} +1 -1
  41. package/dist/web/assets/{Reports-BPD6ODz4.js → Reports-Du8SNiHM.js} +2 -2
  42. package/dist/web/assets/Requirements-Dr1iLoMc.js +2 -0
  43. package/dist/web/assets/Responsive-DcD6MLzG.js +3 -0
  44. package/dist/web/assets/{RunDiff-aEt4BZYX.js → RunDiff-cLSFOsfC.js} +1 -1
  45. package/dist/web/assets/{Settings-D188FdLb.js → Settings-CUT5ggDd.js} +16 -16
  46. package/dist/web/assets/SiteScan-iUfWBeLV.js +5 -0
  47. package/dist/web/assets/{Steps-CgQ8E_Vv.js → Steps-DJYwIiDu.js} +2 -2
  48. package/dist/web/assets/{TestData-Dj73b-hW.js → TestData-DqEcL5o4.js} +2 -2
  49. package/dist/web/assets/TestManagement-mBcfWTVH.js +4 -0
  50. package/dist/web/assets/{WhatsNew-D-5E8NFV.js → WhatsNew-DrPf6l9-.js} +1 -1
  51. package/dist/web/assets/{agentSettingsSheet-5JMUsoLi.js → agentSettingsSheet-DyaVNewv.js} +1 -1
  52. package/dist/web/assets/api-Dr3U7W5w.js +1 -0
  53. package/dist/web/assets/{choice-C4-yW2x9.js → choice-W0qOx_1k.js} +1 -1
  54. package/dist/web/assets/{coverage-pqIlfEP0.js → coverage-DbHm8BUP.js} +3 -3
  55. package/dist/web/assets/{dataParts-bqVlyE0X.js → dataParts-Bdf97ZOD.js} +3 -3
  56. package/dist/web/assets/{desktopAppPath-BDSG0kvw.js → desktopAppPath-kQmQOW6a.js} +1 -1
  57. package/dist/web/assets/{flowTheme-DU5XjJr-.js → flowTheme-CVnIjV_m.js} +1 -1
  58. package/dist/web/assets/frame-CavkQick.js +13 -0
  59. package/dist/web/assets/index-BaEsXdFc.css +2 -0
  60. package/dist/web/assets/index-C1kXcI0E.js +57 -0
  61. package/dist/web/assets/line-icons-Cwj9OmCz.js +1 -0
  62. package/dist/web/assets/{logos-P2LOMyTK.js → logos-Cf-Wf5ex.js} +1 -1
  63. package/dist/web/assets/{markdown-DgUpsCX8.js → markdown-Bvv6oj4v.js} +3 -3
  64. package/dist/web/assets/{nav-IMBXh0Jg.js → nav-DVPiPhOy.js} +1 -1
  65. package/dist/web/assets/pageBack-Blig1Uqs.js +3 -0
  66. package/dist/web/assets/{palette-CeG8IIbL.js → palette-DwrGI2Fp.js} +1 -1
  67. package/dist/web/assets/{paletteCommands-Isq1rLs-.js → paletteCommands-DOF2o-rv.js} +1 -1
  68. package/dist/web/assets/parts-DgJ2y_ic.js +1 -0
  69. package/dist/web/assets/{productParts-ClDOvIlz.js → productParts-B78jij3z.js} +1 -1
  70. package/dist/web/assets/qualityParts-t5t9kEKG.js +2 -0
  71. package/dist/web/assets/{recordTest-BBDRjct0.js → recordTest-BbXVOuGZ.js} +1 -1
  72. package/dist/web/assets/{route-oDy8sV6H.js → route-9BkoTWUE.js} +1 -1
  73. package/dist/web/assets/{sectionList-B651VPon.js → sectionList-DMyhAqst.js} +1 -1
  74. package/dist/web/assets/{step-mark-CaKf4dAR.js → step-mark-Bu6fNKW8.js} +1 -1
  75. package/dist/web/assets/stepper-CE4yOLqn.js +1 -0
  76. package/dist/web/assets/wizardParts-Bxb9UG5k.js +1 -0
  77. package/dist/web/index.html +11 -11
  78. package/docs/ForgeQE-Static-Analysis-Report-4008e9ee.html +207 -0
  79. package/docs/ForgeQE-Static-Analysis-Report-4008e9ee.pdf +0 -0
  80. package/docs/user-guide.html +89 -1
  81. package/forgeqe.example.yaml +1 -1
  82. package/package.json +2 -2
  83. package/prompts/brain.md +7 -0
  84. package/py/forgeqe_engine/cli.py +57 -0
  85. package/py/forgeqe_engine/diagnostics.py +32 -2
  86. package/py/forgeqe_engine/logins.py +11 -0
  87. package/py/forgeqe_engine/persona.py +90 -1
  88. package/py/forgeqe_engine/scan.py +202 -0
  89. package/py/forgeqe_engine/seo.py +95 -0
  90. package/py/forgeqe_engine/seo_analytics.mjs +59 -0
  91. package/py/forgeqe_engine/seo_facts.mjs +63 -0
  92. package/py/forgeqe_engine/seo_site.mjs +36 -0
  93. package/py/forgeqe_engine/service.py +3 -2
  94. package/dist/web/assets/Agent-8Y47YLdR.js +0 -10
  95. package/dist/web/assets/ApiTests-BOdFugGs.js +0 -17
  96. package/dist/web/assets/Chat-DiIxGONU.js +0 -3
  97. package/dist/web/assets/Cost-qfQZZB7-.js +0 -1
  98. package/dist/web/assets/Data-CDyRsQ0U.js +0 -6
  99. package/dist/web/assets/Desktop-DEYZusRQ.js +0 -1
  100. package/dist/web/assets/DesktopReview-4YU21PCr.js +0 -2
  101. package/dist/web/assets/Evidence-l0_yQUpE.js +0 -1
  102. package/dist/web/assets/Explore-DkybdJjI.js +0 -2
  103. package/dist/web/assets/Flags-OCOPCt4-.js +0 -2
  104. package/dist/web/assets/Flaky-B9EYZK9j.js +0 -1
  105. package/dist/web/assets/Impact-BXDjDf_Q.js +0 -3
  106. package/dist/web/assets/Jobs-COZhEsxq.js +0 -5
  107. package/dist/web/assets/KindPage-DIeBVPZA.js +0 -6
  108. package/dist/web/assets/Migration-BTCG2m5B.js +0 -8
  109. package/dist/web/assets/Mobile-CLT5OlqS.js +0 -1
  110. package/dist/web/assets/Observability-Nd9uj2hQ.js +0 -1
  111. package/dist/web/assets/PageAgent-DrELdLct.js +0 -1
  112. package/dist/web/assets/Product-1SMtAUqO.js +0 -6
  113. package/dist/web/assets/Production-C5q3LjAR.js +0 -1
  114. package/dist/web/assets/Quality-DVb1L07l.js +0 -1
  115. package/dist/web/assets/Readiness-BN1VQDip.js +0 -1
  116. package/dist/web/assets/Record-C8ohbDBp.js +0 -1
  117. package/dist/web/assets/Regression-mAzdSpwD.js +0 -5
  118. package/dist/web/assets/Requirements-D1xVywdV.js +0 -2
  119. package/dist/web/assets/Responsive-DnK0Myzs.js +0 -3
  120. package/dist/web/assets/TestManagement-DxPMUroR.js +0 -4
  121. package/dist/web/assets/api-D_HT-I9y.js +0 -1
  122. package/dist/web/assets/frame-Dt9QcYNX.js +0 -13
  123. package/dist/web/assets/index-BdWLAq_n.js +0 -57
  124. package/dist/web/assets/index-CpAtlS2x.css +0 -2
  125. package/dist/web/assets/line-icons-CwCZidXs.js +0 -1
  126. package/dist/web/assets/pageBack-DwhsvsK7.js +0 -3
  127. package/dist/web/assets/parts-DVUUpFdW.js +0 -1
  128. package/dist/web/assets/qualityParts-DF3ZMgo5.js +0 -1
  129. package/dist/web/assets/stepper-uX1iUWez.js +0 -1
  130. package/dist/web/assets/wizardParts-qs3g8O6h.js +0 -1
@@ -0,0 +1,207 @@
1
+ <!doctype html>
2
+ <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
3
+ <title>ForgeQE Static Analysis Report</title>
4
+ <link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
5
+ <link href="https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap" rel="stylesheet">
6
+ <style>
7
+ :root { color-scheme: light; --ink: #1d212f; --ink-2: #464b5b; --ink-3: #5d6272; --rule: #c9ccd4; --head: #f3f4f6; --paper: #fff;
8
+ --pass: #1a7a50; --pass-bg: #e6f3ec; --fail: #b3261e; --fail-bg: #fbe9e7; --na: #5d6272; --na-bg: #eef0f3; }
9
+ * { box-sizing: border-box; }
10
+ body { margin: 0; background: #eef0f3; color: var(--ink); font: 400 14.5px/1.5 "Source Sans 3", ui-sans-serif, system-ui, sans-serif; }
11
+ .doc { max-width: 880px; margin: 32px auto; background: var(--paper); padding: 52px 60px 60px; }
12
+ header.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; border-bottom: 2px solid var(--ink); padding-bottom: 16px; }
13
+ .title h1 { margin: 0; font-size: 25px; line-height: 1.2; font-weight: 700; }
14
+ .title p { margin: 4px 0 0; color: var(--ink-2); }
15
+ .tool { text-align: right; font-size: 12.5px; color: var(--ink-3); }
16
+ .tool .logo { display: block; height: 24px; width: auto; color: var(--ink); margin: 0 0 4px auto; }
17
+ section { margin-top: 30px; }
18
+ h2 { font-size: 17.5px; margin: 0 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--rule); }
19
+ h3 { font-size: 14.5px; margin: 18px 0 8px; }
20
+ p { margin: 8px 0; }
21
+ table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
22
+ th, td { border: 1px solid var(--rule); padding: 6px 9px; text-align: left; vertical-align: top; }
23
+ thead th { background: var(--head); font-weight: 600; }
24
+ .r { text-align: right; white-space: nowrap; }
25
+ .c { text-align: center; }
26
+ .nw { white-space: nowrap; }
27
+ table.meta td:first-child { width: 32%; background: var(--head); font-weight: 600; }
28
+ .note { color: var(--ink-2); font-size: 13px; }
29
+ .st { display: inline-block; padding: 1px 8px; border-radius: 3px; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
30
+ .st.pass { color: var(--pass); background: var(--pass-bg); } .st.fail { color: var(--fail); background: var(--fail-bg); } .st.na { color: var(--na); background: var(--na-bg); }
31
+ .grade { display: inline-block; min-width: 24px; padding: 0 6px; border-radius: 3px; font-weight: 700; color: #fff; }
32
+ .g-a { background: #1a7a50; } .g-b { background: #5b7f12; } .g-c { background: #8a6600; } .g-d { background: #b04a12; } .g-e { background: #b3261e; }
33
+ .status-line { display: flex; gap: 12px; align-items: center; margin: 4px 0 8px; font-size: 15px; }
34
+ .status-line .st { font-size: 14px; padding: 2px 10px; }
35
+ ul { margin: 6px 0; padding-left: 20px; } li { margin: 3px 0; }
36
+ .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 18px; }
37
+ .sign div { border-top: 1px solid var(--ink); padding-top: 6px; font-size: 13px; color: var(--ink-2); }
38
+ .sign { padding-top: 28px; }
39
+ .screen-foot { margin-top: 36px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 16px; }
40
+ @media (max-width: 720px) { .doc { margin: 0; padding: 24px 16px; } header.top { flex-direction: column; } .tool { text-align: left; } .tool .logo { margin: 0 0 4px; }
41
+ .wide { overflow-x: auto; } .sign { grid-template-columns: 1fr; } }
42
+
43
+ /* Print: A4, nothing split that fits on one page, headings kept with their content, page numbers. */
44
+ @page {
45
+ size: A4; margin: 16mm 14mm 18mm;
46
+ @bottom-left { content: "ForgeQE static code analysis report, commit 4008e9ee"; font: 8.5pt "Source Sans 3", sans-serif; color: #5d6272; }
47
+ @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 8.5pt "Source Sans 3", sans-serif; color: #5d6272; }
48
+ }
49
+ @media print {
50
+ body { background: #fff; font-size: 10.5pt; }
51
+ .doc { margin: 0; padding: 0; max-width: none; }
52
+ .screen-foot { display: none; }
53
+ section { break-inside: avoid; margin-top: 22px; }
54
+ section.long { break-inside: auto; }
55
+ .block { break-inside: avoid; }
56
+ h2, h3 { break-after: avoid; }
57
+ thead { display: table-header-group; }
58
+ tr, td, th { break-inside: avoid; }
59
+ table { font-size: 9.5pt; }
60
+ }
61
+ </style></head>
62
+ <body><div class="doc">
63
+
64
+ <header class="top">
65
+ <div class="title"><h1>Static Code Analysis Report</h1><p>ForgeQE, branch main, commit 4008e9ee</p></div>
66
+ <div class="tool"><svg role="img" aria-label="Sonar" class="logo" width="112" height="36" viewBox="0 0 112 36" fill="none" xmlns="http://www.w3.org/2000/svg">
67
+ <path d="M30.153 15.6497C30.153 12.7276 29.6289 9.91702 28.5876 7.30176C28.3807 7.39242 28.2151 7.47611 28.1048 7.5319C28.1048 7.5319 28.1048 7.5319 28.0979 7.5319C27.6221 7.77599 27.36 8.29905 27.4221 8.82907C27.5462 9.91702 27.6221 11.1863 27.6221 12.33C27.6221 17.6791 25.9117 22.8051 22.8152 26.7733C19.8843 30.5253 15.9533 32.9314 11.6775 33.6218C11.6913 33.6218 11.6982 33.6357 11.712 33.6427C14.2154 35.0863 17.2774 35.177 19.8567 33.8938C25.8979 30.888 30.153 23.8442 30.153 15.6497Z" fill="#1d212f"/>
68
+ <path d="M31.3324 6.75783C30.9324 6.74388 30.56 6.77177 30.2083 6.82757C31.2841 9.60323 31.8358 12.5672 31.8358 15.6497C31.8358 24.8345 26.7738 32.9942 19.3809 35.9651C19.7533 35.986 20.1326 36 20.5119 36C20.5326 36 20.5464 36 20.567 36C24.1256 35.986 27.5049 34.3402 29.7393 31.5436C32.5669 28.0008 34.3048 23.2305 34.3048 18C34.3048 13.9481 33.2772 10.0705 31.3324 6.75783Z" fill="#1d212f"/>
69
+ <path d="M38.3116 18C38.3116 15.5521 37.8289 13.2228 36.953 11.0957C36.5531 10.1193 35.9875 9.21271 35.2427 8.47346C34.8289 8.05502 34.3807 7.70632 33.8979 7.45525C33.7738 7.38551 33.6428 7.32972 33.5186 7.27393C35.1324 10.5238 35.9806 14.2131 35.9806 18C35.9806 23.3142 34.2703 28.4401 31.229 32.3665C35.5255 29.0818 38.3048 23.8652 38.3048 18H38.3116Z" fill="#1d212f"/>
70
+ <path d="M33.2841 5.46067C30.0496 2.09221 25.5256 0 20.5119 0C10.6706 0 2.60871 8.24332 2.71215 18.1883C2.73974 20.6222 3.23628 22.9376 4.12592 25.0508C3.83627 25.0089 3.53973 24.995 3.24318 25.0089C2.44319 25.0438 1.31907 24.7578 0.808734 24.6114C0.312191 24.4719 -0.156766 24.8834 0.0501272 25.3646C0.0501272 25.3646 0.0501272 25.3716 0.0501272 25.3785C1.81562 29.4723 5.73969 32.1364 9.47756 32.1294C9.47756 32.1294 9.47756 32.1294 9.48445 32.1294C9.73273 32.1294 9.981 32.1155 10.2293 32.0876C18.9877 31.4111 25.9394 22.8121 25.9394 12.3371C25.9394 11.6745 25.9118 11.019 25.8566 10.3634C25.829 10.0077 25.3738 9.87524 25.167 10.1612C22.7463 13.4041 19.1533 19.1019 14.6637 16.131C12.9396 14.9942 12.0154 12.5393 12.5327 10.0426C13.4706 5.55831 18.636 2.61527 20.9119 3.53584C21.0912 3.60558 21.7325 3.86362 21.9463 4.45641C22.2773 5.35606 21.2774 6.10228 20.767 7.69934C20.2153 9.4289 20.5257 11.2561 20.9119 11.3398C21.3394 11.4305 22.0705 9.82642 23.8566 8.36885C25.1532 7.30879 26.1325 7.01589 26.7462 5.89306C27.3393 4.81209 26.2842 3.64742 26.6428 3.54281C27.0083 3.4382 27.3393 4.7005 28.4083 5.32817C29.3048 5.85122 30.0979 5.52344 31.2703 5.47462C31.2703 5.47462 31.7737 5.4537 32.5737 5.57226C32.5737 5.57226 32.8013 5.60713 33.1668 5.68384C33.2979 5.71174 33.3806 5.55134 33.291 5.46067H33.2841ZM20.0153 19.339C20.1532 19.1856 20.4015 18.8927 20.8222 18.8439C20.905 18.8369 21.3325 18.795 21.6153 19.074C22.036 19.4785 21.9187 20.2596 21.5463 20.7129C21.2015 21.1313 20.5188 21.4033 20.0429 21.0895C19.6429 20.8245 19.6222 20.2735 19.6222 20.2247C19.6222 19.7923 19.8705 19.4994 20.0015 19.339H20.0153Z" fill="#1d212f"/>
71
+ <path d="M48.4562 26.4316C47.5804 26.048 46.8976 25.4971 46.3942 24.7857C45.9528 24.1581 45.7045 23.4397 45.6563 22.6238C45.6425 22.4494 45.7942 22.303 45.9666 22.303H47.1183C47.8011 22.303 48.4631 22.6517 48.7597 23.2724C48.8976 23.5653 49.0907 23.8233 49.339 24.0535C49.8286 24.5138 50.5183 24.7369 51.4079 24.7369C52.2975 24.7369 53.0424 24.5137 53.5596 24.0604C54.0768 23.6141 54.332 23.0283 54.332 22.3239C54.332 21.773 54.1734 21.3196 53.8561 20.9779C53.532 20.6292 53.1389 20.3642 52.6631 20.1759C52.1872 19.9876 51.532 19.7784 50.6838 19.5622C49.6217 19.2762 48.7597 18.9903 48.0976 18.6974C47.4355 18.4045 46.87 17.9512 46.4011 17.3375C45.9321 16.7237 45.6977 15.9008 45.6977 14.8756C45.6977 13.9272 45.9321 13.1042 46.4011 12.3929C46.87 11.6815 47.5252 11.1375 48.3666 10.7609C49.2079 10.3843 50.1872 10.196 51.2907 10.196C52.863 10.196 54.1596 10.5936 55.1665 11.3886C56.0906 12.1209 56.6354 13.0972 56.8009 14.3177C56.8285 14.499 56.6768 14.6664 56.4975 14.6664H54.1527C54.001 14.6664 53.8837 14.5548 53.8561 14.4014C53.7596 13.9132 53.4906 13.4878 53.0493 13.1251C52.532 12.6997 51.8562 12.4835 51.0148 12.4835C50.2493 12.4835 49.6286 12.6788 49.1459 13.0763C48.6631 13.4738 48.4217 14.0387 48.4217 14.778C48.4217 15.2801 48.5735 15.6986 48.8769 16.0194C49.1804 16.3402 49.5666 16.5982 50.0355 16.7865C50.5045 16.9748 51.1389 17.184 51.9527 17.4002C53.0286 17.7001 53.9044 18 54.5872 18.2999C55.2699 18.5998 55.8423 19.0601 56.3182 19.6807C56.794 20.3014 57.0285 21.1383 57.0285 22.1774C57.0285 23.0143 56.8078 23.8024 56.3595 24.5416C55.9113 25.2809 55.2699 25.8807 54.4147 26.327C53.5665 26.7803 52.5596 27.0035 51.4079 27.0035C50.3183 27.0035 49.3321 26.8082 48.4631 26.4246L48.4562 26.4316Z" fill="#1d212f"/>
72
+ <path d="M62.1182 26.2224C61.132 25.6645 60.3665 24.8764 59.801 23.8582C59.2423 22.84 58.9596 21.6614 58.9596 20.3223C58.9596 18.9833 59.2492 17.8187 59.8285 16.7935C60.4078 15.7683 61.194 14.9802 62.194 14.4293C63.194 13.8783 64.3112 13.5994 65.5388 13.5994C66.7664 13.5994 67.8836 13.8783 68.8836 14.4293C69.8836 14.9802 70.6698 15.7683 71.2491 16.7935C71.8284 17.8187 72.118 18.9973 72.118 20.3223C72.118 21.6474 71.8215 22.819 71.2284 23.8442C70.6353 24.8694 69.8284 25.6645 68.8077 26.2224C67.787 26.7803 66.656 27.0593 65.4285 27.0593C64.2009 27.0593 63.1112 26.7803 62.132 26.2224H62.1182ZM67.3526 24.2208C67.9525 23.8931 68.4422 23.3909 68.8146 22.7284C69.187 22.0659 69.3732 21.2638 69.3732 20.3154C69.3732 19.3669 69.1939 18.5649 68.8353 17.9163C68.4767 17.2607 68.0008 16.7656 67.4077 16.4378C66.8146 16.11 66.1733 15.9426 65.4905 15.9426C64.8078 15.9426 64.1664 16.11 63.5871 16.4378C63.0009 16.7656 62.5388 17.2607 62.194 17.9163C61.8492 18.5719 61.6768 19.3739 61.6768 20.3154C61.6768 21.7172 62.0285 22.8051 62.7388 23.5722C63.4492 24.3394 64.3388 24.723 65.4147 24.723C66.0974 24.723 66.7457 24.5556 67.3457 24.2278L67.3526 24.2208Z" fill="#1d212f"/>
73
+ <path d="M89.3522 16.7865C89.8901 15.7753 90.6211 14.9942 91.5521 14.4293C92.4831 13.8644 93.5038 13.5924 94.6279 13.5924C95.6417 13.5924 96.5245 13.7947 97.2831 14.1991C98.0417 14.6036 98.6417 15.1058 99.0968 15.6986V15.6497C99.0968 14.6315 99.9175 13.8016 100.924 13.8016H101.483C101.649 13.8016 101.786 13.9411 101.786 14.1085V26.5293C101.786 26.6966 101.649 26.8361 101.483 26.8361H99.4003C99.2348 26.8361 99.0968 26.6966 99.0968 26.5293V24.8973C98.6417 25.511 98.0279 26.0271 97.2486 26.4386C96.4693 26.8501 95.5797 27.0523 94.5797 27.0523C93.4693 27.0523 92.4556 26.7664 91.5383 26.1875C90.6211 25.6087 89.8901 24.8067 89.3522 23.7745C88.8142 22.7423 88.5453 21.5707 88.5453 20.2596C88.5453 18.9485 88.8142 17.7908 89.3522 16.7795V16.7865ZM98.552 17.9721C98.1865 17.3096 97.7038 16.8074 97.1107 16.4587C96.5176 16.11 95.8762 15.9357 95.1935 15.9357C94.5107 15.9357 93.8693 16.1031 93.2762 16.4448C92.6831 16.7865 92.2004 17.2817 91.8349 17.9372C91.4694 18.5928 91.2832 19.3669 91.2832 20.2666C91.2832 21.1662 91.4694 21.9543 91.8349 22.6308C92.2004 23.3072 92.6831 23.8233 93.2831 24.179C93.8831 24.5347 94.5176 24.709 95.1866 24.709C95.8555 24.709 96.5107 24.5347 97.1038 24.186C97.6969 23.8373 98.1727 23.3282 98.5451 22.6587C98.9106 21.9892 99.0968 21.2011 99.0968 20.3014C99.0968 19.4018 98.9106 18.6207 98.5451 17.9582L98.552 17.9721Z" fill="#1d212f"/>
74
+ <path d="M109.697 14.1503C110.262 13.8225 110.931 13.6412 111.683 13.5994C111.855 13.5924 112 13.7388 112 13.9132V16.389H111.324C110.283 16.389 109.49 16.661 108.952 17.191C108.414 17.728 108.145 18.6555 108.145 19.9806V26.5362C108.145 26.7036 108.007 26.8431 107.841 26.8431H105.779C105.614 26.8431 105.476 26.7036 105.476 26.5362V14.1154C105.476 13.9481 105.614 13.8086 105.779 13.8086H106.317C107.324 13.8086 108.145 14.6385 108.145 15.6567V15.7055C108.538 15.043 109.055 14.5269 109.703 14.1573L109.697 14.1503Z" fill="#1d212f"/>
75
+ <path d="M85.497 16.124C85.0418 15.2871 84.4143 14.6594 83.6143 14.234C82.8143 13.8086 81.904 13.5924 80.8902 13.5924C80.8005 13.5924 80.7178 13.5994 80.6281 13.6064C80.6212 13.6064 80.6074 13.6064 80.6005 13.6064C80.5592 13.6064 80.5178 13.6133 80.4764 13.6203C80.373 13.6273 80.2695 13.6412 80.173 13.6552C80.0971 13.6621 80.0212 13.6761 79.9454 13.69C79.8212 13.711 79.6902 13.7389 79.573 13.7668C79.5523 13.7668 79.5316 13.7807 79.5109 13.7807C79.1868 13.8714 78.8902 13.9969 78.6144 14.1503C77.9661 14.52 77.4489 15.036 77.0558 15.6986V15.6497C77.0558 14.6315 76.2351 13.8016 75.2282 13.8016H74.6903C74.5248 13.8016 74.3868 13.9411 74.3868 14.1085V26.5293C74.3868 26.6966 74.5248 26.8361 74.6903 26.8361H76.7523C76.9178 26.8361 77.0558 26.6966 77.0558 26.5293V19.9737C77.0558 19.9737 77.0558 19.9527 77.0558 19.9388V19.5482C77.0558 18.3836 77.3454 17.4839 77.9316 16.8632C78.5178 16.2425 79.3109 15.9287 80.3109 15.9287C81.3109 15.9287 82.0971 16.2425 82.6764 16.8632C83.2557 17.4839 83.5453 18.3836 83.5453 19.5482V26.5293C83.5453 26.6966 83.6832 26.8361 83.8488 26.8361H85.8832C86.0487 26.8361 86.1866 26.6966 86.1866 26.5293V19.1437C86.1866 17.9582 85.9591 16.9539 85.5108 16.117L85.497 16.124Z" fill="#1d212f"/>
76
+ </svg>
77
+ Analysis performed with SonarQube build 26.11.0.134175</div>
78
+ </header>
79
+
80
+ <section>
81
+ <h2>1. Summary</h2>
82
+ <div class="status-line"><span>Quality gate (Sonar way):</span><span class="st pass">Passed</span></div>
83
+ <p>All quality gate conditions are met. The analysis reports no open issues, no vulnerabilities and no security hotspots; reliability, security and maintainability are rated A, A and A. All 9,059 automated tests run passed (section 7).</p>
84
+ <div class="wide"><table>
85
+ <thead><tr><th>Measure</th><th class="r">Value</th><th>Measure</th><th class="r">Value</th></tr></thead>
86
+ <tbody>
87
+ <tr><td>Open issues</td><td class="r">0</td><td>Lines of code</td><td class="r">318,007</td></tr>
88
+ <tr><td>Bugs / vulnerabilities / code smells</td><td class="r">0 / 0 / 0</td><td>Files</td><td class="r">1,308</td></tr>
89
+ <tr><td>Security hotspots to review</td><td class="r">0</td><td>Line coverage</td><td class="r">81.7%</td></tr>
90
+ <tr><td>Technical debt</td><td class="r">0 min</td><td>Duplicated lines</td><td class="r">0.7%</td></tr>
91
+ <tr><td>Ratings: reliability / security / maintainability</td><td class="r">A / A / A</td><td>Coverage on new code</td><td class="r">88.9%</td></tr>
92
+ </tbody></table></div>
93
+ </section>
94
+
95
+ <section>
96
+ <h2>2. Scope and configuration</h2>
97
+ <div class="wide"><table class="meta"><tbody>
98
+ <tr><td>Project</td><td>ForgeQE</td></tr>
99
+ <tr><td>Repository</td><td>dev.azure.com/DevCGAzureDevOps/Atlas.Ai/_git/forge-qe-cli, folder ForgeQE</td></tr>
100
+ <tr><td>Branch and commit</td><td>main at 4008e9ee</td></tr>
101
+ <tr><td>Analysis date</td><td>1 December 2026, 15:17 UTC</td></tr>
102
+ <tr><td>Analysis tool</td><td>SonarQube build 26.11.0.134175; SonarScanner CLI</td></tr>
103
+ <tr><td>Source directories</td><td>src, web/src, report-ui/src, py, scripts, services, bin</td></tr>
104
+ <tr><td>Test code</td><td>tests, the test helpers in web/src/testing, web/src/testDom.ts and web/src/testIcons.ts, and *.test.ts / *.test.tsx files under web/src and report-ui/src</td></tr>
105
+ <tr><td>Exclusions</td><td>Dependencies and generated output: node_modules, dist, out, minified files, Python caches and build metadata</td></tr>
106
+ <tr><td>Quality gate</td><td>Sonar way (built-in), evaluated on new code</td></tr>
107
+ <tr><td>New code</td><td>Changes since the analysis of main at 7e859a7b on 18 November 2026, 23:31 UTC</td></tr>
108
+ <tr><td>Coverage reports</td><td>LCOV from the two TypeScript suites (bun test --coverage under tests, and bun test src --coverage in web); Cobertura XML from the Python suites (pytest under coverage.py 7.6.10). All produced from commit 4008e9ee.</td></tr>
109
+ </tbody></table></div>
110
+ </section>
111
+
112
+ <section>
113
+ <h2>3. Rule sets applied</h2>
114
+ <div class="wide"><table><thead><tr><th>Language</th><th>Quality profile</th><th class="r">Active rules</th></tr></thead><tbody><tr><td>CSS</td><td>Sonar way core</td><td class='r'>30</td></tr><tr><td>Docker</td><td>Sonar way core</td><td class='r'>18</td></tr><tr><td>HTML</td><td>Sonar way core</td><td class='r'>36</td></tr><tr><td>JavaScript</td><td>Sonar way core</td><td class='r'>200</td></tr><tr><td>Python</td><td>Sonar way core</td><td class='r'>232</td></tr><tr><td>Secrets</td><td>Sonar way core</td><td class='r'>30</td></tr><tr><td>Text</td><td>Sonar way core</td><td class='r'>3</td></tr><tr><td>TypeScript</td><td>Sonar way core</td><td class='r'>199</td></tr></tbody></table></div>
115
+ <p class="note">Built-in profiles, used unmodified; no rule was deactivated.</p>
116
+ </section>
117
+
118
+ <section>
119
+ <h2>4. Quality gate result</h2>
120
+ <div class="wide"><table><thead><tr><th>Condition</th><th>Threshold</th><th class="r">Measured</th><th>Status</th></tr></thead><tbody><tr><td>Issues on new code</td><td>Fails if greater than 0</td><td class='r'>0</td><td><span class='st pass'>Passed</span></td></tr><tr><td>Coverage on new code</td><td>Fails if less than 80%</td><td class='r'>88.9%</td><td><span class='st pass'>Passed</span></td></tr><tr><td>Duplicated lines on new code</td><td>Fails if greater than 3%</td><td class='r'>0.6%</td><td><span class='st pass'>Passed</span></td></tr><tr><td>Security hotspots reviewed on new code</td><td>Fails if less than 100%</td><td class='r'>Nothing to review</td><td><span class='st pass'>Passed</span></td></tr></tbody></table></div>
121
+ <p class="note">New code: 119,566 lines changed since the baseline, of which 49,852 are coverable and 44,302 are executed by tests.</p>
122
+ <div class="block">
123
+ <h3>Coverage of new code by area</h3>
124
+ <div class="wide"><table><thead><tr><th>Area</th><th class="r">New coverable lines</th><th class="r">Covered</th><th class="r">Not covered</th><th class="r">Coverage</th></tr></thead><tbody><tr><td>Core (src)</td><td class='r'>21,784</td><td class='r'>20,883</td><td class='r'>901</td><td class='r'>95.9%</td></tr><tr><td>Web application (web/src)</td><td class='r'>23,640</td><td class='r'>19,216</td><td class='r'>4,424</td><td class='r'>81.3%</td></tr><tr><td>Python engines (py)</td><td class='r'>2,890</td><td class='r'>2,820</td><td class='r'>70</td><td class='r'>97.6%</td></tr><tr><td>Report UI (report-ui/src)</td><td class='r'>630</td><td class='r'>604</td><td class='r'>26</td><td class='r'>95.9%</td></tr><tr><td>Build scripts (scripts)</td><td class='r'>894</td><td class='r'>768</td><td class='r'>126</td><td class='r'>85.9%</td></tr><tr><td>Launchers (bin)</td><td class='r'>13</td><td class='r'>10</td><td class='r'>3</td><td class='r'>76.9%</td></tr><tr><td>Defect intake service</td><td class='r'>1</td><td class='r'>1</td><td class='r'>0</td><td class='r'>100.0%</td></tr></tbody></table></div>
125
+
126
+ </div>
127
+ </section>
128
+
129
+ <section>
130
+ <h2>5. Findings by software quality</h2>
131
+ <div class="wide"><table><thead><tr><th>Quality</th><th class="c">Rating</th><th class="r">Open</th><th>Assessment</th></tr></thead><tbody>
132
+ <tr><td>Reliability</td><td class="c"><span class="grade g-a">A</span></td><td class="r">0</td><td>No open issues affecting reliability.</td></tr>
133
+ <tr><td>Security</td><td class="c"><span class="grade g-a">A</span></td><td class="r">0</td><td>No open vulnerabilities.</td></tr>
134
+ <tr><td>Maintainability</td><td class="c"><span class="grade g-a">A</span></td><td class="r">0</td><td>No open maintainability issues; technical debt 0 minutes.</td></tr>
135
+ <tr><td>Security review</td><td class="c"><span class="grade g-a">A</span></td><td class="r">0</td><td>No security hotspots raised or awaiting review.</td></tr>
136
+ </tbody></table></div>
137
+ <p class="note">Ratings are SonarQube's, from A (best) to E. With no open issues, each quality rates A; the security review rating is A when no hotspot is left unreviewed.</p>
138
+ </section>
139
+
140
+ <section>
141
+ <h2>6. Security hotspots</h2>
142
+ <p>No security hotspots were raised by the analysis (0 reviewed, 0 awaiting review). Security review rating: A.</p>
143
+ </section>
144
+
145
+ <section>
146
+ <h2>7. Test execution</h2>
147
+ <div class="wide"><table><thead><tr><th>Suite</th><th>Command</th><th class="r">Passed</th><th class="r">Failed</th><th class="r">Skipped</th></tr></thead>
148
+ <tbody><tr><td>Core, report UI and services (TypeScript)</td><td>bun test --coverage (550 files under tests)</td><td class='r'>6,024</td><td class='r'>0</td><td class='r'>9</td></tr><tr><td>Web application (TypeScript, React)</td><td>bun test src --coverage, in web (160 files)</td><td class='r'>1,279</td><td class='r'>0</td><td class='r'>0</td></tr><tr><td>Python launcher and Tosca converter</td><td>pytest tests/python tests/tosca</td><td class='r'>85</td><td class='r'>0</td><td class='r'>1</td></tr><tr><td>Python data engine</td><td>pytest tests/data</td><td class='r'>159</td><td class='r'>0</td><td class='r'>0</td></tr><tr><td>Python browser, mobile and desktop engines</td><td>pytest tests/engine; pytest tests/desktop</td><td class='r'>1,512</td><td class='r'>0</td><td class='r'>21</td></tr><tr><td><strong>Total</strong></td><td></td><td class="r"><strong>9,059</strong></td><td class="r"><strong>0</strong></td><td class="r"><strong>31</strong></td></tr></tbody></table></div>
149
+ <p>No test failed.</p>
150
+
151
+ </section>
152
+
153
+ <section>
154
+ <h2>8. Test coverage</h2>
155
+ <div class="wide"><table><thead><tr><th>Area</th><th class="r">Lines of code</th><th class="r">Covered / coverable lines</th><th class="r">Line coverage</th></tr></thead><tbody><tr><td>Core (src)</td><td class='r'>170,639</td><td class='r'>128,919 of 144,147</td><td class='r'>89.4%</td></tr><tr><td>Web application (web/src)</td><td class='r'>89,089</td><td class='r'>37,756 of 58,239</td><td class='r'>64.8%</td></tr><tr><td>Python engines (py)</td><td class='r'>33,387</td><td class='r'>20,774 of 27,483</td><td class='r'>75.6%</td></tr><tr><td>Report UI (report-ui/src)</td><td class='r'>21,222</td><td class='r'>11,930 of 13,843</td><td class='r'>86.2%</td></tr><tr><td>Build scripts (scripts)</td><td class='r'>2,629</td><td class='r'>1,054 of 1,527</td><td class='r'>69.0%</td></tr><tr><td>Launchers (bin)</td><td class='r'>601</td><td class='r'>299 of 511</td><td class='r'>58.5%</td></tr><tr><td>Defect intake service</td><td class='r'>440</td><td class='r'>290 of 347</td><td class='r'>83.6%</td></tr></tbody></table></div>
156
+ <p class="note">Overall line coverage 81.7% (201,022 of 246,097 coverable lines). The web application's unit tests exercise its logic modules and render a share of its components; most page components are not unit-tested.</p>
157
+ </section>
158
+
159
+ <section>
160
+ <h2>9. Duplication</h2>
161
+ <div class="wide"><table><thead><tr><th>Measure</th><th class="r">Value</th></tr></thead><tbody>
162
+ <tr><td>Duplicated lines density</td><td class="r">0.7%</td></tr>
163
+ <tr><td>Duplicated lines</td><td class="r">2,623</td></tr>
164
+ <tr><td>Duplicated blocks</td><td class="r">143</td></tr>
165
+ </tbody></table></div>
166
+ </section>
167
+
168
+ <section>
169
+ <h2>10. Size and complexity</h2>
170
+ <div class="wide"><table><thead><tr><th>Measure</th><th class="r">Value</th></tr></thead><tbody>
171
+ <tr><td>Lines (physical)</td><td class="r">380,775</td></tr>
172
+ <tr><td>Lines of code</td><td class="r">318,007</td></tr>
173
+ <tr><td>Files</td><td class="r">1,308</td></tr>
174
+ <tr><td>Functions</td><td class="r">40,297</td></tr>
175
+ <tr><td>Cyclomatic complexity</td><td class="r">146,287</td></tr>
176
+ <tr><td>Cognitive complexity</td><td class="r">128,406</td></tr>
177
+ <tr><td>Comment lines density</td><td class="r">10.5%</td></tr>
178
+ </tbody></table></div>
179
+ <div class="block">
180
+ <h3>Lines of code by language</h3>
181
+ <div class="wide"><table><thead><tr><th>Language</th><th class="r">Lines of code</th><th class="r">Share</th></tr></thead><tbody><tr><td>TypeScript</td><td class='r'>277,186</td><td class='r'>87.2%</td></tr><tr><td>Python</td><td class='r'>33,365</td><td class='r'>10.5%</td></tr><tr><td>CSS</td><td class='r'>6,566</td><td class='r'>2.1%</td></tr><tr><td>JavaScript</td><td class='r'>745</td><td class='r'>0.2%</td></tr><tr><td>HTML</td><td class='r'>138</td><td class='r'>0.0%</td></tr><tr><td>Dockerfile</td><td class='r'>7</td><td class='r'>0.0%</td></tr></tbody></table></div>
182
+ </div>
183
+ </section>
184
+
185
+ <section class="long">
186
+ <h2>11. Findings closed without a code change</h2>
187
+ <p>Findings reviewed and closed as accepted or as false positives, grouped by rule. Each issue carries its own justification as a comment in SonarQube; the table states the basis for each rule.</p>
188
+ <h3>11.1 Accepted (642)</h3>
189
+ <div class="wide"><table><thead><tr><th>Rule</th><th>Language</th><th>Rule title</th><th class="r">Issues</th><th>Justification</th></tr></thead><tbody><tr><td class='nw'>S8786</td><td>TypeScript</td><td>Regular expressions should not cause non-linear backtracking</td><td class='r'>256</td><td>222 read short, bounded text (names, identifiers, URLs, single lines, or ForgeQE&#x27;s own documentation in a build script); each was measured on hostile input of 20,000 characters and the time is recorded on the issue. The other 34 were rewritten to run in linear time and verified against the original pattern; the rule still reports them by their shape. Patterns that read large input (files, documents, tracker fields, test output) run in linear time.</td></tr><tr><td class='nw'>S2871</td><td>TypeScript</td><td>&quot;Array.prototype.sort()&quot; and &quot;Array.prototype.toSorted()&quot; should use a compare function</td><td class='r'>226</td><td>The arrays hold strings (paths, identifiers, ISO dates). Default code-unit order is deterministic across machines and locales, which these uses require; a locale-aware comparison would make the order depend on the host.</td></tr><tr><td class='nw'>S4036</td><td>TypeScript</td><td>OS commands should not rely on PATH resolution</td><td class='r'>63</td><td>External programs are started as argument arrays without a shell, as the project&#x27;s security rules require; resolution through PATH is how the user&#x27;s installation is found. The child environment excludes ForgeQE&#x27;s secrets.</td></tr><tr><td class='nw'>S8786</td><td>Python</td><td>Regular expressions should not cause non-linear backtracking</td><td class='r'>24</td><td>13 are in vendored ToscaTSU, kept byte-identical to upstream: 2 in its parser, which ForgeQE runs only in a child process with a 600-second limit, and 11 in a file ForgeQE never executes. The other 11 read short text (database CHECK-constraint text, display formatting, single log or template lines); the slowest measured 0.9 s at 4,000 characters.</td></tr><tr><td class='nw'>S6324</td><td>TypeScript</td><td>Regular expressions should not contain control characters</td><td class='r'>24</td><td>The patterns exist to remove terminal escape sequences and control bytes (including NUL) from text.</td></tr><tr><td class='nw'>S2310</td><td>TypeScript</td><td>Loop counters should not be assigned within the loop body</td><td class='r'>11</td><td>Hand-written scanners advance the index past a token they have just read; the assignment is the intended control flow.</td></tr><tr><td class='nw'>S6845</td><td>TypeScript</td><td>Non-interactive DOM elements should not have the `tabindex` attribute</td><td class='r'>8</td><td>Scrollable regions made keyboard-focusable as WCAG 2.1.1 requires, a keyboard-driven widget with role=&quot;application&quot;, and a row focusable so its full text (shown on focus) reaches a keyboard.</td></tr><tr><td class='nw'>S6848</td><td>TypeScript</td><td>Non-interactive DOM elements should not have an interactive handler</td><td class='r'>8</td><td>Elements that only stop event propagation, hold a page&#x27;s keyboard shortcuts, or widen the click target of a control inside them; each has a native keyboard equivalent (a button, a radio, Escape or a Close button).</td></tr><tr><td class='nw'>S5852</td><td>Python</td><td>Regular expressions should not cause catastrophic backtracking</td><td class='r'>6</td><td>Vendored third-party code (ToscaTSU) kept byte-identical to upstream and verified by checksum; ForgeQE never executes the file concerned. One pattern of ForgeQE&#x27;s own is used only on inputs with at most 16 braces, which bounds it to under 1 ms.</td></tr><tr><td class='nw'>S7737</td><td>TypeScript</td><td>Objects should not be used as default parameters</td><td class='r'>6</td><td>A new default object per call is the intended behaviour (an accumulator for one recursion, or default dependencies replaced in tests).</td></tr><tr><td class='nw'>S4790</td><td>Python</td><td>Weak hashing algorithms should not be used</td><td class='r'>2</td><td>Not used for security: HMAC-SHA1 in TOTP, as RFC 6238 specifies, and an identifier in vendored code.</td></tr><tr><td class='nw'>S6389</td><td>Text</td><td>Source code should not contain bidirectional control characters</td><td class='r'>2</td><td>Test input: a right-to-left override character planted on purpose, to check that a name holding it is refused.</td></tr><tr><td class='nw'>S4656</td><td>CSS</td><td>Properties should not be duplicated</td><td class='r'>1</td><td>A deliberate fallback declaration (display: block before display: -webkit-box).</td></tr><tr><td class='nw'>S8999</td><td>Python</td><td>&quot;pytest_plugins&quot; should be defined in conftest.py files</td><td class='r'>1</td><td>The pytester plugin is needed by one module only; declaring it in conftest.py would load it for every test.</td></tr><tr><td class='nw'>S1848</td><td>TypeScript</td><td>Objects should not be created to be dropped immediately without being used</td><td class='r'>1</td><td>The regular expression is constructed only to validate a user-supplied pattern; an invalid one throws.</td></tr><tr><td class='nw'>S4790</td><td>TypeScript</td><td>Weak hashing algorithms should not be used</td><td class='r'>1</td><td>Not used for security: a change-detection fingerprint stored with each graph node.</td></tr><tr><td class='nw'>S6544</td><td>TypeScript</td><td>Promises should not be misused</td><td class='r'>1</td><td>The asynchronous handler catches every error internally; callers invoke it from UI events.</td></tr><tr><td class='nw'>S9383</td><td>TypeScript</td><td>Promises should not be left unhandled</td><td class='r'>1</td><td>A team task&#x27;s promise is kept in the run&#x27;s list of tasks at work and settled with Promise.allSettled before the run ends; the task catches its own errors and returns them as its result.</td></tr></tbody></table></div>
190
+ <div class="block">
191
+ <h3>11.2 False positives (15)</h3>
192
+ <div class="wide"><table><thead><tr><th>Rule</th><th>Language</th><th>Rule title</th><th class="r">Issues</th><th>Justification</th></tr></thead><tbody><tr><td class='nw'>S5332</td><td>TypeScript</td><td>Clear-text protocols should not be used</td><td class='r'>4</td><td>A schema identifier and a placeholder base for parsing a relative URL; no request is made.</td></tr><tr><td class='nw'>S7727</td><td>TypeScript</td><td>Function references should not be passed directly to iterator methods</td><td class='r'>3</td><td>The callback is written to take (item, index); the index is used as the React key.</td></tr><tr><td class='nw'>S7739</td><td>TypeScript</td><td>Objects should not have a &quot;then&quot; property</td><td class='r'>3</td><td>The property holds a string, not a function, so the object is never treated as a thenable.</td></tr><tr><td class='nw'>S7767</td><td>TypeScript</td><td>Bitwise operators should not be used to truncate numbers</td><td class='r'>2</td><td>Deliberate 32-bit integer wraparound in a hash or pseudo-random step; Math.trunc would not wrap.</td></tr><tr><td class='nw'>S3516</td><td>Python</td><td>Functions returns should not be invariant</td><td class='r'>1</td><td>Process and command entry points that return an exit code; failures raise.</td></tr><tr><td class='nw'>S1313</td><td>TypeScript</td><td>IP addresses should not be hardcoded</td><td class='r'>1</td><td>Chrome&#x27;s version number (141.0.0.0) in a fixed user-agent string, not an IP address.</td></tr><tr><td class='nw'>S6852</td><td>TypeScript</td><td>Elements with an interactive role should support focus</td><td class='r'>1</td><td>The radio buttons inside the group take focus and the arrow keys move between them, as the ARIA radio group pattern specifies; the group itself is not a focus stop.</td></tr></tbody></table></div>
193
+ </div>
194
+ </section>
195
+
196
+ <section>
197
+ <h2>12. Limitations</h2>
198
+ <ul>
199
+ <li>Static analysis covers the rules in section 3; functional correctness rests on the test suites in section 7.</li>
200
+ <li>Coverage is line coverage; branch coverage was not collected.</li>
201
+ <li>The analysis covers a single branch; pull-request and branch analysis were not used.</li>
202
+ <li>The quality gate judges new code against the baseline in section 2; the overall measures in sections 5 to 10 describe the whole code base.</li>
203
+ </ul>
204
+ </section>
205
+
206
+ <div class="screen-foot"><span>ForgeQE static code analysis report, commit 4008e9ee</span><span>Generated 1 December 2026 from the SonarQube Web API</span></div>
207
+ </div></body></html>
@@ -410,7 +410,7 @@ forgeqe docs --copy ./docs # copy the guide, the architecture page, the refere
410
410
  <div class="area"><a class="area-name" href="#area-automated-tests"><span class="mono">Automated tests</span></a><ul class="tiles"><li><a class="tile" href="#cap-write-tests"><b>Turn a passed run into an automated test</b><span>Write a Playwright test for that run in ../app</span></a></li><li><a class="tile" href="#cap-heal-tests"><b>Heal failing tests</b><span>Heal the failing tests in ../app</span></a></li><li><a class="tile" href="#cap-migrate-tests"><b>Migrate a test suite</b><span>Migrate the Selenium tests in tests/ to Playwright TypeScript</span></a></li><li><a class="tile" href="#cap-tosca-convert"><b>Convert Tosca test cases</b><span>Convert the Tosca export tosca/checkout.tsu to Playwright TypeScript</span></a></li><li><a class="tile" href="#cap-find-run-tests"><b>Find and run existing tests</b><span>Run the checkout tests</span></a></li><li><a class="tile" href="#cap-regression-packs"><b>Regression packs for a release</b><span>Build a regression pack for sprint 12 and run it on TestMu</span></a></li><li><a class="tile" href="#cap-flaky-tests"><b>Flaky test detection and quarantine</b><span>Which tests are flaky?</span></a></li><li><a class="tile" href="#cap-run-diff"><b>Compare two runs step by step</b><span>It passed yesterday and fails today: why?</span></a></li><li><a class="tile" href="#cap-test-debt"><b>Test debt and coverage gaps</b><span>What has no test?</span></a></li><li><a class="tile" href="#cap-test-management"><b>Test management</b><span>Show the test inventory</span></a></li></ul></div>
411
411
  <div class="area"><a class="area-name" href="#area-pull-requests"><span class="mono">Pull requests</span></a><ul class="tiles"><li><a class="tile" href="#cap-pr-review"><b>Review pull requests</b><span>Review PR 42 and focus on error handling</span></a></li><li><a class="tile" href="#cap-pr-impact"><b>Pull request impact and test selection</b><span>What does PR 42 impact?</span></a></li></ul></div>
412
412
  <div class="area"><a class="area-name" href="#area-api"><span class="mono">API</span></a><ul class="tiles"><li><a class="tile" href="#cap-api-testing"><b>API and contract testing</b><span>Turn the last run's API calls into tests</span></a></li><li><a class="tile" href="#cap-api-calls"><b>An API's calls and collections</b><span>Import our Postman collection and send its calls</span></a></li><li><a class="tile" href="#cap-api-load-security"><b>API load and security checks</b><span>Load test the orders API with 20 users for a minute</span></a></li></ul></div>
413
- <div class="area"><a class="area-name" href="#area-quality"><span class="mono">Quality</span></a><ul class="tiles"><li><a class="tile" href="#cap-load-testing"><b>Load testing with JMeter</b><span>Write a load test for checkout with 200 users over 10 minutes</span></a></li><li><a class="tile" href="#cap-accessibility-performance"><b>Accessibility and page performance</b><span>Is the checkout page accessible?</span></a></li><li><a class="tile" href="#cap-accessibility-personas"><b>Accessibility testing with personas</b><span>Act as a blind person and use the website to find accessibility issues</span></a></li><li><a class="tile" href="#cap-visual-comparison"><b>Visual comparison with baselines</b><span>What changed visually since the last run?</span></a></li><li><a class="tile" href="#cap-defect-intelligence"><b>Defect intelligence: trends and prediction</b><span>Which defects keep coming back?</span></a></li><li><a class="tile" href="#cap-security-smoke"><b>Passive security smoke checks</b><span>Any security problems in the last checkout run?</span></a></li><li><a class="tile" href="#cap-localization-checks"><b>Localization checks</b><span>Is the German checkout fully translated?</span></a></li><li><a class="tile" href="#cap-responsive-check"><b>Responsive check</b><span>Does the checkout page work on phones?</span></a></li></ul></div>
413
+ <div class="area"><a class="area-name" href="#area-quality"><span class="mono">Quality</span></a><ul class="tiles"><li><a class="tile" href="#cap-load-testing"><b>Load testing with JMeter</b><span>Write a load test for checkout with 200 users over 10 minutes</span></a></li><li><a class="tile" href="#cap-accessibility-performance"><b>Accessibility and page performance</b><span>Is the checkout page accessible?</span></a></li><li><a class="tile" href="#cap-site-scan"><b>Site scan: SEO, analytics, WCAG</b><span>Scan these five pages for accessibility and SEO</span></a></li><li><a class="tile" href="#cap-accessibility-personas"><b>Accessibility testing with personas</b><span>Act as a blind person and use the website to find accessibility issues</span></a></li><li><a class="tile" href="#cap-visual-comparison"><b>Visual comparison with baselines</b><span>What changed visually since the last run?</span></a></li><li><a class="tile" href="#cap-defect-intelligence"><b>Defect intelligence: trends and prediction</b><span>Which defects keep coming back?</span></a></li><li><a class="tile" href="#cap-security-smoke"><b>Passive security smoke checks</b><span>Any security problems in the last checkout run?</span></a></li><li><a class="tile" href="#cap-localization-checks"><b>Localization checks</b><span>Is the German checkout fully translated?</span></a></li><li><a class="tile" href="#cap-responsive-check"><b>Responsive check</b><span>Does the checkout page work on phones?</span></a></li></ul></div>
414
414
  <div class="area"><a class="area-name" href="#area-release"><span class="mono">Release</span></a><ul class="tiles"><li><a class="tile" href="#cap-release-readiness"><b>Requirement coverage and release readiness</b><span>Are we ready to release?</span></a></li><li><a class="tile" href="#cap-release-verdict"><b>One release verdict from everything measured</b><span>Can we ship release-2.3?</span></a></li><li><a class="tile" href="#cap-feature-flags"><b>Regression across feature-flag combinations</b><span>Run the release pack across the new-checkout feature flag on and off</span></a></li><li><a class="tile" href="#cap-reports"><b>Reports you can share</b><span>Create a release report for all projects</span></a></li></ul></div>
415
415
  <div class="area"><a class="area-name" href="#area-systems"><span class="mono">Systems</span></a><ul class="tiles"><li><a class="tile" href="#cap-systems"><b>Work with Azure DevOps, Jira, GitHub, and Confluence</b><span>Show the open bugs in this sprint</span></a></li><li><a class="tile" href="#cap-system-data"><b>Read any data in Azure DevOps, Jira, Xray, and Confluence, and open Azure DevOps pull requests</b><span>Are there open pull requests in any repository of QI-Claims?</span></a></li></ul></div>
416
416
  <h3 class="band-title">Not supported</h3>
@@ -10828,6 +10828,87 @@ forgeqe quality trends shop.test # per page over time; exits 1 when a page go
10828
10828
  </section>
10829
10829
  </div>
10830
10830
  </article>
10831
+ <article class="spec feat" id="cap-site-scan">
10832
+ <div class="hd"><span class="mono">Quality</span><h3>Site scan: SEO, analytics, WCAG</h3></div>
10833
+ <p class="ds">Checks up to 25 pages, with no model, for accessibility and WCAG coverage, SEO, analytics tags and Core Web Vitals; HTML and PDF report, and a dashboard over time.</p>
10834
+ <div class="facts">
10835
+ <div class="fact"><span class="mono">Ask it</span><ul class="asks"><li>Scan these five pages for accessibility and SEO</li><li>Which analytics tags does our site load, and do they fire before consent?</li><li>Show the quality dashboard of our sites for the last 30 days</li></ul></div>
10836
+ <div class="fact"><span class="mono">What it needs</span><p class="muted">Nothing beyond ForgeQE itself.</p></div>
10837
+ <div class="fact"><span class="mono">Limits</span><ul class="plainlist"><li>Opens each page as it first loads: nothing is clicked, typed or submitted, so INP and content behind interactions are not measured (that is browser_run or accessibility_test).</li><li>Analytics are read from what the page loads with no consent given; a tag that waits for consent shows as loaded with no hit.</li></ul></div>
10838
+ <div class="fact"><span class="mono">Tools</span><p class="tools"><code>site_scan</code> <code>quality_dashboard</code> <code>wcag_coverage</code> <code>a11y_suite</code></p></div>
10839
+ </div>
10840
+ <div class="detail"><span class="mono">In detail</span>
10841
+ <section class="doc" id="doc-how_to_use-site-scan-accessibility-seo-and-analytics">
10842
+ <h4>Site scan: accessibility, SEO and analytics</h4>
10843
+ <div class="prose"><p>A site scan opens up to 25 pages in ForgeQE's browser, one after another, with no model and nothing clicked, typed or
10844
+ submitted, and checks each page:</p>
10845
+ <ul>
10846
+ <li><strong>Accessibility</strong>: the rule engine and standard of <code>quality.accessibility</code> (or the ones you pick), the rules that
10847
+ failed, and the rules that <strong>need a person's review</strong>.</li>
10848
+ <li><strong>WCAG coverage</strong>: every success criterion of the standard, with its result (see above).</li>
10849
+ <li><strong>SEO</strong>: the status code, HTTPS, whether search engines may index it (robots meta tag, robots.txt), the title and
10850
+ meta description (length, duplicates), one <code>&lt;h1&gt;</code>, heading order, the language, the canonical link, language
10851
+ versions (hreflang), the mobile viewport, mixed content, page weight, image alt attributes, link text, the social
10852
+ preview (Open Graph), structured data (JSON-LD) and the favicon; for each site, robots.txt and the sitemap. Each page
10853
+ gets a score: the weighted share of its checks that passed, a warning counting half.</li>
10854
+ <li><strong>Analytics</strong>: which tags each page loads (Google Analytics 4, Universal Analytics, Tag Manager, Google Ads, Adobe
10855
+ Analytics, Meta Pixel, Microsoft Clarity, Hotjar, Segment, Mixpanel, Amplitude, Heap, Matomo, Plausible, PostHog,
10856
+ LinkedIn Insight, TikTok Pixel, Microsoft Advertising UET, Piano Analytics), their ids, and what is wrong: a tag on
10857
+ some pages of a site and not others, a tag loaded twice, a tag loaded that sent nothing, Universal Analytics (it no
10858
+ longer collects data), and <strong>hits sent before anyone answered the consent banner</strong>. Google's consent mode is read
10859
+ from the hits: a cookieless ping while consent is denied is not counted as tracking.</li>
10860
+ <li><strong>Performance</strong>: each page's Core Web Vitals of its first load against Google's thresholds. INP needs an
10861
+ interaction, which a scan does not make.</li>
10862
+ </ul>
10863
+ <p>Each page is opened fresh, with no consent given. Signed-in pages use the saved sessions of your logins (<code>forgeqe login</code>); a scan never types a password.</p>
10864
+ <p><strong>Web app.</strong> Open <strong>Site scan</strong> (Quality), paste the addresses or pick a CSV (every cell that is an http(s) address
10865
+ is used), pick the standard and engine, and press <strong>Scan</strong>. Each scan's result has tabs for each part, and buttons
10866
+ for the HTML report, the PDF and the coverage CSV. The <strong>Dashboard</strong> shows each site over 7, 30 or 90 days or all
10867
+ time: violations, SEO score and LCP per run, the analytics tools, and the WCAG rules newly failing or fixed. <strong>WCAG
10868
+ coverage</strong> shows what ForgeQE can check for a standard and engine, with CSV, HTML and PDF downloads.</p>
10869
+ <p><strong>Terminal</strong></p>
10870
+ <pre><code class="language-bash">forgeqe scan https://shop.test/ https://shop.test/basket --standard wcag22aa --pdf
10871
+ forgeqe scan --csv pages.csv # every http(s) address in the file (inside the project)
10872
+ forgeqe a11y coverage --standard wcag22aa --engine ibm # what can be checked, criterion by criterion
10873
+ forgeqe a11y coverage --scan 20261201-112739 # a scan's results
10874
+ forgeqe quality dashboard --range 90d
10875
+ </code></pre>
10876
+ <p>A scan is a run folder of the reports folder: <code>scan-report.html</code> (no script, nothing loaded from outside), and
10877
+ <code>scan-report.pdf</code> printed from it by ForgeQE's browser with JavaScript off. <code>accessibility.json</code>, <code>performance.json</code> and
10878
+ <code>seo.json</code> hold the data, so <strong>Quality</strong> lists the scan too and its results join the history the dashboard reads. It
10879
+ exits 1 when a page could not be opened or a WCAG rule failed, so a pipeline can gate on it.</p>
10880
+ <p><strong>Regression suites: run it all again, with no model.</strong> A suite keeps what to check again in the repository,
10881
+ <code>.forgeqe/accessibility-suites/&lt;name&gt;.yaml</code>: the pages of a scan, and persona sessions with each persona's settings
10882
+ frozen in (device, zoom, text size, colour vision, motion, contrast, keyboard or screen reader) and the journey each
10883
+ persona's run recorded: every key a keyboard user pressed and what it focused, every swipe and double tap of a screen
10884
+ reader user and what it reached, every click and field of a persona who uses the mouse.</p>
10885
+ <pre><code class="language-bash">forgeqe a11y suite create checkout --scan 20261201-113906 --session 20261201-122718-find-the-contact-page
10886
+ forgeqe a11y suite run checkout # no model: replays the journeys, scans the pages
10887
+ forgeqe a11y suite baseline checkout --run 20261201-123219 # a person approves it (types the name)
10888
+ forgeqe a11y suite run checkout # later: exits 1 when anything got worse than the baseline
10889
+ forgeqe a11y suite run checkout --heal # the persona agent goes through again where a journey broke (a model's run)
10890
+ forgeqe a11y suite tests checkout # JavaScript Playwright tests in a11y-tests/checkout
10891
+ </code></pre>
10892
+ <p>A run fails only on what got worse than the baseline: a WCAG criterion that now fails, a rule newly failing on a page,
10893
+ a page that no longer opens, an SEO score down by 5 or more, an analytics tag gone, a persona who no longer gets
10894
+ through (a key that now focuses something else, an element a screen reader user activated that is gone, a link that no
10895
+ longer leads where it did). A replay judges no barrier anew; <code>--heal</code> has the persona agent go through again where the
10896
+ page changed, and its new journey replaces the old one only when a person approves that run as the baseline.</p>
10897
+ <p><strong>The JavaScript tests</strong> need no model and no ForgeQE: <code>cd a11y-tests/checkout &amp;&amp; npm install &amp;&amp; npx playwright install chrome &amp;&amp; npx playwright test</code>. They hold no recorded value as code: the pages, personas and journeys are data in
10898
+ <code>suite.json</code>, judged against <code>baseline.json</code> by the same runtime ForgeQE's own runs use (<code>forgeqe-a11y.mjs</code>), with
10899
+ axe-core 4.14.0 and ForgeQE's SEO and analytics scripts beside them. Values a journey types come from environment
10900
+ variables (the README names them). They write <code>results/snapshot.json</code>, <code>junit.xml</code> and an HTML report; <code>forgeqe a11y suite baseline checkout --from a11y-tests/checkout/results/snapshot.json</code> makes a CI run the baseline. Write them again
10901
+ after the suite or its baseline changes.</p>
10902
+ <p>On the page: <strong>Accessibility › Suites</strong> makes a suite from a scan and sessions, runs it, shows each run against the
10903
+ baseline, approves a run as the baseline (type the suite's name) and writes the tests.</p>
10904
+ <p><strong>Rules never prove conformance.</strong> ForgeQE counts a criterion as covered by rules only when a rule the engine actually
10905
+ runs for the standard checks it: axe-core's experimental and deprecated rules are left out, because axe-core does not
10906
+ run them under a standard's tags. With axe-core 4.14, 21 of the 55 WCAG 2.2 AA criteria have rules; with IBM Equal
10907
+ Access 4.0, 33. The personas exercise most of the rest; the criteria neither reaches still need a person.</p>
10908
+ </div>
10909
+ </section>
10910
+ </div>
10911
+ </article>
10831
10912
  <article class="spec feat" id="cap-accessibility-personas">
10832
10913
  <div class="hd"><span class="mono">Quality</span><h3>Accessibility testing with personas</h3></div>
10833
10914
  <p class="ds">A browser agent does a goal as a person with a disability would (a blind screen reader user, keyboard only, low vision, colour blind, cognitive, or the project's own personas) and records each barrier with its WCAG criterion and severity. Not functional testing.</p>
@@ -10899,6 +10980,13 @@ watch_for:
10899
10980
  </code></pre>
10900
10981
  <p>A persona file can come from the repository, so ForgeQE reads it strictly: only these keys, each setting from its list, no YAML aliases. Its text describes the person to the browser model; what the browser does comes only from the settings.</p>
10901
10982
  <p>A simulated persona is not a real user, and automated checks find only part of the problems. Treat the result as a first pass, and confirm important barriers with people who use assistive technology.</p>
10983
+ <p><strong>WCAG coverage of a session.</strong> Each session also writes <code>coverage.html</code> and <code>coverage.csv</code> beside its report: every
10984
+ success criterion of the session's standard with one result, the worst that holds. <strong>Failed</strong> means a rule failed or a
10985
+ persona met a barrier of it. <strong>Needs review</strong> means a rule ran and could not decide (axe-core's &quot;incomplete&quot;, IBM's
10986
+ potential violations), so a person has to look. <strong>Exercised by a persona</strong> means a persona who uses the page that way
10987
+ (keyboard only for focus order, 200% zoom for reflow) reached the goal with no barrier of it. <strong>Rules passed</strong> means
10988
+ its rules ran and passed. <strong>Not tested</strong> means nothing checked it. On the page, the session's <strong>Coverage</strong> tab shows
10989
+ the same; in a terminal, <code>forgeqe a11y coverage --session &lt;folder name&gt;</code>.</p>
10902
10990
  </div>
10903
10991
  </section>
10904
10992
  </div>
@@ -616,7 +616,7 @@ suite:
616
616
  # are reported and tracked over time; a run fails on them only when a budget below is exceeded.
617
617
  # quality:
618
618
  # accessibility:
619
- # standard: wcag21aa # wcag2a, wcag21aa, wcag22aa, wcag21aaa, section508, en301549, best-practice
619
+ # standard: wcag21aa # wcag2a, wcag2aa, wcag2aaa, wcag21a, wcag21aa, wcag21aaa, wcag22a, wcag22aa, wcag22aaa, section508, en301549, best-practice
620
620
  # engine: axe # axe (axe-core), ibm (IBM Equal Access: up to AA, no AAA rules), basic (ForgeQE's own)
621
621
  # ask_before_run: true # false: a persona session runs its browser runs without asking first
622
622
  # visual: # each page compared with its approved screenshot (.forgeqe/visual-baselines)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capagents/forgeqe",
3
- "version": "3.3.8",
3
+ "version": "3.3.9",
4
4
  "description": "ForgeQE: a browser agent CLI that runs goals and test cases in local Chrome or Chromium, or BrowserStack and TestMu AI/LambdaTest when configured, and turns passing runs into tests in your repo",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -53,7 +53,7 @@
53
53
  "test": "bun test",
54
54
  "test:release": "bun scripts/release-tests.ts",
55
55
  "typecheck": "tsc --noEmit",
56
- "build:report": "cd report-ui && npm install --no-audit --no-fund && npm run build && node -e \"require('fs').copyFileSync('dist/index.html', '../src/report/template.html')\"",
56
+ "build:report": "bun scripts/sync-report-ui.ts && cd report-ui && npm install --no-audit --no-fund && npm run build && node -e \"require('fs').copyFileSync('dist/index.html', '../src/report/template.html')\"",
57
57
  "build:web": "cd web && npm install --no-audit --no-fund && npm run build",
58
58
  "audit:layers": "bun web/scripts/audit-layers.ts",
59
59
  "build:docs": "bun scripts/build-docs-site.ts",
package/prompts/brain.md CHANGED
@@ -409,6 +409,13 @@ For testing with flags on and off, or across flag combinations:
409
409
  - A change that is not intended is a visual defect. A run fails on it only with quality.budgets.visual.
410
410
  - To set budgets, edit quality.budgets in forgeqe.yaml: accessibility (violations for each impact, rules to pass or ignore) and performance (web-vitals, or limits for each metric and page).
411
411
 
412
+ ### Site scans, SEO and analytics
413
+ - To check a list of pages for accessibility, SEO or analytics tags, use site_scan. It opens each page and clicks nothing. For a journey through the site, use accessibility_test or browser_run.
414
+ - For "what does our accessibility testing cover" or "which WCAG criteria failed", use wcag_coverage. Say that rules that pass do not prove a criterion is met.
415
+ - For "how did the site do this month" or a trend of SEO, use quality_dashboard.
416
+ - To check pages or persona sessions again later, or for a script that runs with no model, use a11y_suite. A person approves the baseline: you MUST NOT offer to do it.
417
+ - Say an analytics finding of "hits before consent" as a possible privacy issue to confirm, not as a legal finding.
418
+
412
419
  ### Load testing with JMeter
413
420
  For "load test", "stress test", "how many users can it take", "soak", "spike", or a JMeter plan (.jmx):
414
421
  - Plans are JMeter .jmx files in perf.folder (default perf/) of the test repository. perf_plans lists them, with the load each declares and whether ForgeQE may run it.
@@ -153,6 +153,59 @@ def _run(out: TextIO) -> int:
153
153
  return asyncio.run(main())
154
154
 
155
155
 
156
+ def _scan(out: TextIO) -> int:
157
+ """stdin line 1: the scan request (scan.py); a later "stop" or EOF ends it, keeping what it checked."""
158
+ from .scan import run_scan
159
+
160
+ line = sys.stdin.readline()
161
+ payload = json.loads(line) if line.strip() else {}
162
+ lock = threading.Lock()
163
+
164
+ def emit(event: Dict[str, Any]) -> None:
165
+ with lock:
166
+ out.write(json.dumps(event, ensure_ascii=False, default=str) + "\n")
167
+ out.flush()
168
+
169
+ async def main() -> int:
170
+ loop = asyncio.get_running_loop()
171
+ cancel = asyncio.Event()
172
+
173
+ def watch_stdin() -> None:
174
+ for cmd in sys.stdin:
175
+ if cmd.strip().lower() == "stop":
176
+ break
177
+ loop.call_soon_threadsafe(cancel.set)
178
+
179
+ threading.Thread(target=watch_stdin, daemon=True).start()
180
+ try:
181
+ result = await run_scan(payload if isinstance(payload, dict) else {}, emit, cancel)
182
+ except Exception as e:
183
+ result = {"success": False, "error": str(e)[:600]}
184
+ emit({"type": "done", "result": result})
185
+ return 0 if result.get("success") else 1
186
+
187
+ return asyncio.run(main())
188
+
189
+
190
+ def _pdf(out: TextIO) -> int:
191
+ """stdin line 1: {html, pdf, browser}: a report ForgeQE wrote, printed to PDF (scan.print_pdf)."""
192
+ from .scan import print_pdf
193
+
194
+ line = sys.stdin.readline()
195
+ payload = json.loads(line) if line.strip() else {}
196
+
197
+ def emit(event: Dict[str, Any]) -> None:
198
+ out.write(json.dumps(event, ensure_ascii=False, default=str) + "\n")
199
+ out.flush()
200
+
201
+ try:
202
+ result = asyncio.run(print_pdf(payload if isinstance(payload, dict) else {}, emit))
203
+ except Exception as e:
204
+ result = {"success": False, "error": str(e)[:600]}
205
+ emit({"type": "done", "result": result})
206
+ return 0 if result.get("success") else 1
207
+
208
+
156
209
  def _login(out: TextIO) -> int:
157
210
  """
158
211
  stdin line 1: {url, logins: [login]}; then each "save" tries to save the session (the browser stays open while
@@ -351,6 +404,10 @@ def main(argv: list[str] | None = None) -> int:
351
404
  return _run(out)
352
405
  if cmd == "login":
353
406
  return _login(out)
407
+ if cmd == "scan":
408
+ return _scan(out)
409
+ if cmd == "pdf":
410
+ return _pdf(out)
354
411
  if cmd == "record":
355
412
  return _record(out)
356
413
  if cmd == "code":
@@ -17,6 +17,7 @@ from urllib.parse import urlsplit
17
17
 
18
18
  from .brand import clean_capture
19
19
  from .network import NetworkCapture, hook
20
+ from .seo import SeoCollector
20
21
 
21
22
  logger = logging.getLogger(__name__)
22
23
 
@@ -345,8 +346,10 @@ def box_for(browser_state: Any, index: Any) -> Optional[Dict[str, float]]:
345
346
 
346
347
 
347
348
  class Diagnostics:
348
- def __init__(self, *, accessibility: bool = True, network: bool = True, axe: Optional[Dict[str, Any]] = None, vitals: bool = True, visual: Optional[Dict[str, Any]] = None, keep_headers: Optional[List[str]] = None, ibm: Optional[Dict[str, Any]] = None) -> None:
349
+ def __init__(self, *, accessibility: bool = True, network: bool = True, axe: Optional[Dict[str, Any]] = None, vitals: bool = True, visual: Optional[Dict[str, Any]] = None, keep_headers: Optional[List[str]] = None, ibm: Optional[Dict[str, Any]] = None, seo: bool = False) -> None:
349
350
  self.accessibility = accessibility
351
+ # A scan's SEO facts and analytics tags (seo.py); off for runs, where the agent's clicks change what loaded.
352
+ self.seo: Optional[SeoCollector] = SeoCollector() if seo else None
350
353
  # axe-core: {"script": path to axe.min.js, "tags": ["wcag2a", "wcag2aa"]}; without it, the built-in checks.
351
354
  self.axe_tags: List[str] = [str(t) for t in ((axe or {}).get("tags") or ["wcag2a", "wcag2aa"])]
352
355
  self._axe_source: Optional[str] = None
@@ -375,7 +378,7 @@ class Diagnostics:
375
378
  # {"mask": [selectors], "pages": {"/path": [selectors]}, "full_page": bool}; None: no visual captures.
376
379
  self.visual: Optional[Dict[str, Any]] = visual
377
380
  self.shots: Dict[str, Dict[str, Any]] = {}
378
- self.timeout = CHECK_TIMEOUT * (3 if self._axe_source or self._ibm_source else 1)
381
+ self.timeout = CHECK_TIMEOUT * (3 if self._axe_source or self._ibm_source else 1) + (20.0 if seo else 0.0)
379
382
  self.network: Optional[NetworkCapture] = NetworkCapture(keep_headers) if network else None
380
383
  self._net_handlers: Dict[str, Any] = {}
381
384
  self.events: List[Dict[str, Any]] = []
@@ -524,12 +527,31 @@ class Diagnostics:
524
527
  "url": url, "ms": int(r["ms"])})
525
528
  if self.vitals:
526
529
  await self._read_vitals(session)
530
+ # Before the page is checked or localized (which changes its text for a moment), so the facts are the page's own.
531
+ if self.seo is not None:
532
+ await self._collect_seo(browser, session)
527
533
  if self.accessibility:
528
534
  await self._check_page(browser, session)
529
535
  await self._localize(session)
530
536
  if self.visual is not None:
531
537
  await self._capture(session)
532
538
 
539
+ async def _collect_seo(self, browser: Any, session: Any) -> None:
540
+ try:
541
+ url = str(await browser.get_current_page_url() or "")
542
+ except Exception:
543
+ return
544
+ if not url.startswith("http"):
545
+ return
546
+
547
+ async def evaluate(expression: str, await_promise: bool) -> Any:
548
+ r = await session.cdp_client.send.Runtime.evaluate(
549
+ params={"expression": expression, "returnByValue": True, "awaitPromise": await_promise}, session_id=session.session_id
550
+ )
551
+ return ((r or {}).get("result") or {}).get("value")
552
+
553
+ await self.seo.collect(evaluate, _page_key(url))
554
+
533
555
  async def _localize(self, session: Any) -> None:
534
556
  """A page not seen before: its language checks as it is, then with pseudo-localized text and right to left."""
535
557
  try:
@@ -819,6 +841,14 @@ class Diagnostics:
819
841
  file.write_text(json.dumps(list(self.pages.values()), indent=2, ensure_ascii=False), encoding="utf-8")
820
842
  return str(file.resolve())
821
843
 
844
+ def write_seo(self, out_dir: Path) -> Optional[str]:
845
+ data = self.seo.result() if self.seo is not None else None
846
+ if not data:
847
+ return None
848
+ file = out_dir / "seo.json"
849
+ file.write_text(json.dumps(data, indent=2, ensure_ascii=False), encoding="utf-8")
850
+ return str(file.resolve())
851
+
822
852
  def write_perf(self, out_dir: Path) -> Optional[str]:
823
853
  if not self.perf:
824
854
  return None