@capagents/forgeqe 2.9.6 → 2.9.8

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 (79) hide show
  1. package/HOW_TO_USE.md +19 -1
  2. package/dist/docs-site/docs/architecture/index.html +1 -1
  3. package/dist/docs-site/docs/containers/index.html +2 -2
  4. package/dist/docs-site/docs/cost-architecture/index.html +1 -1
  5. package/dist/docs-site/docs/custom-agents-first-run/index.html +216 -0
  6. package/dist/docs-site/docs/desktop/index.html +1 -1
  7. package/dist/docs-site/docs/desktop-ci/index.html +1 -1
  8. package/dist/docs-site/docs/evidence/index.html +992 -0
  9. package/dist/docs-site/docs/feature-test-prompts/index.html +1 -1
  10. package/dist/docs-site/docs/graphify/index.html +380 -0
  11. package/dist/docs-site/docs/guardrails/index.html +2 -2
  12. package/dist/docs-site/docs/index.html +20 -5
  13. package/dist/docs-site/docs/mobile/index.html +1 -1
  14. package/dist/docs-site/docs/model-routing/index.html +1 -1
  15. package/dist/docs-site/docs/product-graph/index.html +356 -0
  16. package/dist/docs-site/docs/product-knowledge/index.html +3 -3
  17. package/dist/docs-site/docs/product-views/index.html +431 -0
  18. package/dist/docs-site/docs/search.js +1 -1
  19. package/dist/docs-site/docs/web-app/index.html +2 -2
  20. package/dist/forgeqe.js +1705 -1691
  21. package/dist/web/assets/Agent-D0jovbz1.js +6 -0
  22. package/dist/web/assets/{ApiTests-BVvDTNOF.js → ApiTests-CMMMApBR.js} +1 -1
  23. package/dist/web/assets/{Browse-DWtHfslb.js → Browse-Bimy9-t0.js} +2 -2
  24. package/dist/web/assets/{Chat-6ZM6dG91.js → Chat-DSlBwNAI.js} +1 -1
  25. package/dist/web/assets/{CommandPalette-Cdjwbda-.js → CommandPalette-D7NWAtOU.js} +1 -1
  26. package/dist/web/assets/{Compare-DFRXMkZb.js → Compare-BI8IMq49.js} +1 -1
  27. package/dist/web/assets/{Cost-BAJ8OwYF.js → Cost-BV0JavsG.js} +1 -1
  28. package/dist/web/assets/{Data-BKgbQF5L.js → Data-CjnqjcAx.js} +1 -1
  29. package/dist/web/assets/{Desktop-DR0SPUpa.js → Desktop-Bu72INy4.js} +1 -1
  30. package/dist/web/assets/{DesktopReview-RwGj52iT.js → DesktopReview-jDnb5Gfn.js} +1 -1
  31. package/dist/web/assets/{Evidence-CAmhcrWH.js → Evidence-CIlcAy5n.js} +1 -1
  32. package/dist/web/assets/{Explore-CEqgVwSY.js → Explore-Cc-1cTwG.js} +1 -1
  33. package/dist/web/assets/{Features-BGwhjQCB.js → Features-CewFSOSI.js} +1 -1
  34. package/dist/web/assets/{Flags-xn0sSPIa.js → Flags-CICcBCkH.js} +1 -1
  35. package/dist/web/assets/{Flaky-YNkwSUV0.js → Flaky-BrWbRajc.js} +1 -1
  36. package/dist/web/assets/{Impact-COvx15JE.js → Impact-D7seby-G.js} +1 -1
  37. package/dist/web/assets/{Jobs-B_AMFjhY.js → Jobs-D7yPretO.js} +1 -1
  38. package/dist/web/assets/{KindPage-Bs0utNlI.js → KindPage-Cjt1s7Vd.js} +1 -1
  39. package/dist/web/assets/{Migration-CDfhBjFm.js → Migration-CbCqOsJI.js} +1 -1
  40. package/dist/web/assets/{Product-Dk2nFc1g.js → Product-CxXVrpoD.js} +1 -1
  41. package/dist/web/assets/{Production-CPqGEo0W.js → Production-D5jIe328.js} +1 -1
  42. package/dist/web/assets/{Quality-DlFvpmDu.js → Quality-D3G8IKLZ.js} +1 -1
  43. package/dist/web/assets/{Readiness-CyYHV3qv.js → Readiness-B4Fy4Vln.js} +1 -1
  44. package/dist/web/assets/{Record-C1UE1ESU.js → Record-DLfODYjy.js} +1 -1
  45. package/dist/web/assets/{Regression-n0n9EsCb.js → Regression-Daoc9Qvx.js} +1 -1
  46. package/dist/web/assets/{Reports-CE--CULd.js → Reports-DEzDDoGF.js} +1 -1
  47. package/dist/web/assets/{Response-C4jADREA.js → Response-CaWPiZyx.js} +1 -1
  48. package/dist/web/assets/{RunDiff-CpPIvPDP.js → RunDiff-BQKwTCbM.js} +1 -1
  49. package/dist/web/assets/{Runs-BE8r8ctC.js → Runs-BIUnN08h.js} +1 -1
  50. package/dist/web/assets/{Steps-CknoiWv9.js → Steps-DjR_K32c.js} +1 -1
  51. package/dist/web/assets/{TestCases-CV1sKVIL.js → TestCases-BZWiTLjC.js} +1 -1
  52. package/dist/web/assets/{TestData-CxmtyZgT.js → TestData-D6YiouU4.js} +1 -1
  53. package/dist/web/assets/{TestDebt-DLNkmbFY.js → TestDebt-COFagfQU.js} +1 -1
  54. package/dist/web/assets/{Tosca-CYBQxyy-.js → Tosca-B3sZ9uqe.js} +1 -1
  55. package/dist/web/assets/{WhatsNew-D2EKxd96.js → WhatsNew-CznfTEFM.js} +1 -1
  56. package/dist/web/assets/{dataParts-DVmwyJxx.js → dataParts-DpVitZdm.js} +1 -1
  57. package/dist/web/assets/{fold-C8qhDrNk.js → fold-HnodvJWj.js} +1 -1
  58. package/dist/web/assets/{frame-CInX-4Bh.js → frame-DiKY0GWx.js} +2 -2
  59. package/dist/web/assets/{index-BCb4cUBF.js → index-HjX2EOmp.js} +5 -5
  60. package/dist/web/assets/{logos-CWOa7QH1.js → logos-CNarWSPL.js} +1 -1
  61. package/dist/web/assets/{palette-pcRC5zbt.js → palette-B2YywN1k.js} +1 -1
  62. package/dist/web/assets/{qualityParts-Cw5dR80i.js → qualityParts-jsPhayON.js} +1 -1
  63. package/dist/web/assets/{rows-BzbMQOJ2.js → rows-7zDrF-Yp.js} +1 -1
  64. package/dist/web/assets/{thread-BgQjmXDJ.js → thread-BUBgX0xW.js} +1 -1
  65. package/dist/web/assets/{usePageChat-DlFXcVhv.js → usePageChat-DnOXyd_B.js} +1 -1
  66. package/dist/web/index.html +2 -2
  67. package/docs/user-guide.html +16 -1
  68. package/env.example.yaml +1 -0
  69. package/forgeqe.example.yaml +1 -0
  70. package/package.json +1 -1
  71. package/prompts/README.md +1 -0
  72. package/prompts/api-tests.md +2 -0
  73. package/prompts/heal.md +3 -1
  74. package/prompts/requests-rule.md +14 -0
  75. package/prompts/test-agent.md +5 -2
  76. package/py/forgeqe_engine/logins.py +27 -0
  77. package/py/forgeqe_engine/service.py +6 -1
  78. package/skills/cypress-typescript/SKILL.md +35 -0
  79. package/dist/web/assets/Agent-Ckze0-_m.js +0 -7
@@ -0,0 +1,992 @@
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">
6
+ <title>Evidence (design and status) · ForgeQE docs</title>
7
+ <meta name="description" content="Status:">
8
+ <meta name="theme-color" content="#080a10">
9
+ <link rel="canonical" href="https://forgeqe.qualityai.co.uk/docs/evidence/">
10
+ <link rel="icon" type="image/png" href="../../img/favicon.png">
11
+ <link rel="stylesheet" href="../docs.css">
12
+ <script src="../search.js" defer></script>
13
+ <script src="../docs.js" defer></script>
14
+ </head>
15
+ <body class="docs">
16
+ <svg aria-hidden="true" style="position:absolute;width:0;height:0;overflow:hidden" xmlns="http://www.w3.org/2000/svg"><!-- Lucide icons v0.454.0, ISC licence (https://lucide.dev) -->
17
+ <symbol id="i-monitor" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="3" rx="2" />
18
+ <line x1="8" x2="16" y1="21" y2="21" />
19
+ <line x1="12" x2="12" y1="17" y2="21" /></symbol>
20
+ <symbol id="i-smartphone" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="20" x="5" y="2" rx="2" ry="2" />
21
+ <path d="M12 18h.01" /></symbol>
22
+ <symbol id="i-braces" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1" />
23
+ <path d="M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1" /></symbol>
24
+ <symbol id="i-container" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z" />
25
+ <path d="M10 21.9V14L2.1 9.1" />
26
+ <path d="m10 14 11.9-6.9" />
27
+ <path d="M14 19.8v-8.1" />
28
+ <path d="M18 17.5V9.4" /></symbol>
29
+ <symbol id="i-shield-check" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />
30
+ <path d="m9 12 2 2 4-4" /></symbol>
31
+ <symbol id="i-file-text" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
32
+ <path d="M14 2v4a2 2 0 0 0 2 2h4" />
33
+ <path d="M10 9H8" />
34
+ <path d="M16 13H8" />
35
+ <path d="M16 17H8" /></symbol>
36
+ <symbol id="i-terminal" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 17 10 11 4 5" />
37
+ <line x1="12" x2="20" y1="19" y2="19" /></symbol>
38
+ <symbol id="i-brain" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z" />
39
+ <path d="M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z" />
40
+ <path d="M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4" />
41
+ <path d="M17.599 6.5a3 3 0 0 0 .399-1.375" />
42
+ <path d="M6.003 5.125A3 3 0 0 0 6.401 6.5" />
43
+ <path d="M3.477 10.896a4 4 0 0 1 .585-.396" />
44
+ <path d="M19.938 10.5a4 4 0 0 1 .585.396" />
45
+ <path d="M6 18a4 4 0 0 1-1.967-.516" />
46
+ <path d="M19.967 17.484A4 4 0 0 1 18 18" /></symbol>
47
+ <symbol id="i-git-branch" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="6" x2="6" y1="3" y2="15" />
48
+ <circle cx="18" cy="6" r="3" />
49
+ <circle cx="6" cy="18" r="3" />
50
+ <path d="M18 9a9 9 0 0 1-9 9" /></symbol>
51
+ <symbol id="i-database" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="5" rx="9" ry="3" />
52
+ <path d="M3 5V19A9 3 0 0 0 21 19V5" />
53
+ <path d="M3 12A9 3 0 0 0 21 12" /></symbol>
54
+ <symbol id="i-zap" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z" /></symbol>
55
+ <symbol id="i-scan-search" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7V5a2 2 0 0 1 2-2h2" />
56
+ <path d="M17 3h2a2 2 0 0 1 2 2v2" />
57
+ <path d="M21 17v2a2 2 0 0 1-2 2h-2" />
58
+ <path d="M7 21H5a2 2 0 0 1-2-2v-2" />
59
+ <circle cx="12" cy="12" r="3" />
60
+ <path d="m16 16-1.9-1.9" /></symbol>
61
+ <symbol id="i-bug" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 1.88 1.88" />
62
+ <path d="M14.12 3.88 16 2" />
63
+ <path d="M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" />
64
+ <path d="M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6" />
65
+ <path d="M12 20v-9" />
66
+ <path d="M6.53 9C4.6 8.8 3 7.1 3 5" />
67
+ <path d="M6 13H2" />
68
+ <path d="M3 21c0-2.1 1.7-3.9 3.8-4" />
69
+ <path d="M20.97 5c0 2.1-1.6 3.8-3.5 4" />
70
+ <path d="M22 13h-4" />
71
+ <path d="M17.2 17c2.1.1 3.8 1.9 3.8 4" /></symbol>
72
+ <symbol id="i-repeat" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m17 2 4 4-4 4" />
73
+ <path d="M3 11v-1a4 4 0 0 1 4-4h14" />
74
+ <path d="m7 22-4-4 4-4" />
75
+ <path d="M21 13v1a4 4 0 0 1-4 4H3" /></symbol>
76
+ <symbol id="i-code" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" />
77
+ <polyline points="8 6 2 12 8 18" /></symbol>
78
+ <symbol id="i-lock" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" />
79
+ <path d="M7 11V7a5 5 0 0 1 10 0v4" /></symbol>
80
+ <symbol id="i-plug" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22v-5" />
81
+ <path d="M9 8V2" />
82
+ <path d="M15 8V2" />
83
+ <path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z" /></symbol>
84
+ <symbol id="i-layers" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z" />
85
+ <path d="m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" />
86
+ <path d="m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" /></symbol>
87
+ <symbol id="i-chevron-right" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6" /></symbol>
88
+ <symbol id="i-copy" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
89
+ <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" /></symbol>
90
+ <symbol id="i-play" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polygon points="6 3 20 12 6 21 6 3" /></symbol>
91
+ <symbol id="i-maximize" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9" /><polyline points="9 21 3 21 3 15" /><line x1="21" x2="14" y1="3" y2="10" /><line x1="3" x2="10" y1="21" y2="14" /></symbol>
92
+ <symbol id="i-x" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18" /><path d="m6 6 12 12" /></symbol>
93
+ <symbol id="i-mail" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="16" x="2" y="4" rx="2" /><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" /></symbol>
94
+ <symbol id="i-message-square" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" /></symbol>
95
+ </svg>
96
+
97
+ <a class="skip" href="#main">Skip to content</a>
98
+ <header class="nav" id="navigation">
99
+ <div class="nav__bar">
100
+ <a class="nav__logo" href="https://forgeqe.github.io/" aria-label="ForgeQE by Capgemini, home"><img src="../../img/wordmark-white.webp" alt="" width="160" height="76"><span class="nav__by">by <img src="../../img/capgemini-color.svg" alt="" width="92" height="21"></span></a>
101
+ <nav aria-label="Main"><ul class="nav__links"><li><a href="https://forgeqe.github.io/"><img class="pix pix--nav" src="../../img/icons/context-engine.svg" alt="" width="40" height="40">Product</a></li><li><a href="../index.html" aria-current="page"><img class="pix pix--nav" src="../../img/icons/wikis.svg" alt="" width="40" height="40">Docs</a></li><li><a href="https://forgeqe.github.io/security/"><img class="pix pix--nav" src="../../img/icons/shield.svg" alt="" width="40" height="40">Security</a></li><li><a href="../../architecture-map/index.html"><img class="pix pix--nav" src="../../img/icons/architecture.svg" alt="" width="40" height="40">Architecture</a></li><li><a href="https://forgeqe.github.io/contact/"><img class="pix pix--nav" src="../../img/icons/mail.svg" alt="" width="40" height="40">Contact us</a></li></ul></nav>
102
+ <div class="nav__end">
103
+ <button class="search-open" type="button" aria-haspopup="dialog"><svg class="icon" aria-hidden="true"><use href="#i-scan-search"></use></svg><span>Search</span><kbd>/</kbd></button>
104
+ <button class="nav__menu" type="button" aria-expanded="false" aria-controls="menu"><span class="sr-only">Open the menu</span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 8h16M4 16h16"/></svg></button>
105
+ </div>
106
+ </div>
107
+ <div class="menu" id="menu" hidden><ul><li><a href="https://forgeqe.github.io/"><img class="pix pix--nav" src="../../img/icons/context-engine.svg" alt="" width="40" height="40">Product</a></li><li><a href="../index.html" aria-current="page"><img class="pix pix--nav" src="../../img/icons/wikis.svg" alt="" width="40" height="40">Docs</a></li><li><a href="https://forgeqe.github.io/security/"><img class="pix pix--nav" src="../../img/icons/shield.svg" alt="" width="40" height="40">Security</a></li><li><a href="../../architecture-map/index.html"><img class="pix pix--nav" src="../../img/icons/architecture.svg" alt="" width="40" height="40">Architecture</a></li><li><a href="https://forgeqe.github.io/contact/"><img class="pix pix--nav" src="../../img/icons/mail.svg" alt="" width="40" height="40">Contact us</a></li></ul></div>
108
+ </header>
109
+ <div class="container docs-layout">
110
+ <nav class="docs-side" aria-label="Docs">
111
+ <a class="side-home" href="../index.html"><img class="pix" src="../../img/icons/wikis.svg" alt="" width="40" height="40">User guide</a>
112
+ <div class="side-group"><p class="side-head">Guide</p><ul><li><a href="../index.html#overview" data-chapter="overview"><img class="pix" src="../../img/icons/context-engine.svg" alt="" width="40" height="40"><span>Overview</span><b>01</b></a></li><li><a href="../index.html#get-started" data-chapter="get-started"><img class="pix" src="../../img/icons/download.svg" alt="" width="40" height="40"><span>Get started</span><b>02</b></a></li><li><a href="../index.html#using" data-chapter="using"><img class="pix" src="../../img/icons/orchestrator.svg" alt="" width="40" height="40"><span>Using ForgeQE</span><b>03</b></a></li></ul></div><div class="side-group"><p class="side-head">Capability areas</p><ul><li><a href="../index.html#area-browser" data-chapter="area-browser"><img class="pix" src="../../img/icons/browser-agent.svg" alt="" width="40" height="40"><span>Browser</span><b>04</b></a></li><li><a href="../index.html#area-test-cases" data-chapter="area-test-cases"><img class="pix" src="../../img/icons/case.svg" alt="" width="40" height="40"><span>Test cases</span><b>05</b></a></li><li><a href="../index.html#area-setup" data-chapter="area-setup"><img class="pix" src="../../img/icons/healer.svg" alt="" width="40" height="40"><span>Setup</span><b>06</b></a></li><li><a href="../index.html#area-desktop" data-chapter="area-desktop"><img class="pix" src="../../img/icons/desktop.svg" alt="" width="40" height="40"><span>Desktop</span><b>07</b></a></li><li><a href="../index.html#area-mobile" data-chapter="area-mobile"><img class="pix" src="../../img/icons/mobile.svg" alt="" width="40" height="40"><span>Mobile</span><b>08</b></a></li><li><a href="../index.html#area-operations" data-chapter="area-operations"><img class="pix" src="../../img/icons/network.svg" alt="" width="40" height="40"><span>Operations</span><b>09</b></a></li><li><a href="../index.html#area-data" data-chapter="area-data"><img class="pix" src="../../img/icons/knowledge-base.svg" alt="" width="40" height="40"><span>Data</span><b>10</b></a></li><li><a href="../index.html#area-automated-tests" data-chapter="area-automated-tests"><img class="pix" src="../../img/icons/scribe.svg" alt="" width="40" height="40"><span>Automated tests</span><b>11</b></a></li><li><a href="../index.html#area-pull-requests" data-chapter="area-pull-requests"><img class="pix" src="../../img/icons/pr-reviewer.svg" alt="" width="40" height="40"><span>Pull requests</span><b>12</b></a></li><li><a href="../index.html#area-api" data-chapter="area-api"><img class="pix" src="../../img/icons/api.svg" alt="" width="40" height="40"><span>API</span><b>13</b></a></li><li><a href="../index.html#area-quality" data-chapter="area-quality"><img class="pix" src="../../img/icons/result.svg" alt="" width="40" height="40"><span>Quality</span><b>14</b></a></li><li><a href="../index.html#area-release" data-chapter="area-release"><img class="pix" src="../../img/icons/speed.svg" alt="" width="40" height="40"><span>Release</span><b>15</b></a></li><li><a href="../index.html#area-systems" data-chapter="area-systems"><img class="pix" src="../../img/icons/architecture.svg" alt="" width="40" height="40"><span>Systems</span><b>16</b></a></li></ul></div><div class="side-group"><p class="side-head">Reference</p><ul><li><a href="../index.html#reference" data-chapter="reference"><img class="pix" src="../../img/icons/wikis.svg" alt="" width="40" height="40"><span>Reference</span><b>17</b></a></li></ul></div>
113
+ <div class="side-group"><p class="side-head">More documentation</p><ul><li><a href="../web-app/index.html"><img class="pix" src="../../img/icons/wikis.svg" alt="" width="40" height="40"><span>The web app</span></a></li><li><a href="../desktop/index.html"><img class="pix" src="../../img/icons/desktop.svg" alt="" width="40" height="40"><span>Desktop apps</span></a></li><li><a href="../desktop-ci/index.html"><img class="pix" src="../../img/icons/desktop.svg" alt="" width="40" height="40"><span>Desktop in CI</span></a></li><li><a href="../mobile/index.html"><img class="pix" src="../../img/icons/mobile.svg" alt="" width="40" height="40"><span>Mobile apps</span></a></li><li><a href="../containers/index.html"><img class="pix" src="../../img/icons/knowledge-base.svg" alt="" width="40" height="40"><span>Containers</span></a></li><li><a href="../custom-agents-first-run/index.html"><img class="pix" src="../../img/icons/wikis.svg" alt="" width="40" height="40"><span>Custom agents: a first run</span></a></li><li><a href="index.html" aria-current="page"><img class="pix" src="../../img/icons/wikis.svg" alt="" width="40" height="40"><span>Evidence (design and status)</span></a></li><li><a href="../product-knowledge/index.html"><img class="pix" src="../../img/icons/context-engine.svg" alt="" width="40" height="40"><span>Product knowledge</span></a></li><li><a href="../product-graph/index.html"><img class="pix" src="../../img/icons/wikis.svg" alt="" width="40" height="40"><span>The product knowledge graph (design)</span></a></li><li><a href="../product-views/index.html"><img class="pix" src="../../img/icons/wikis.svg" alt="" width="40" height="40"><span>Product views (design)</span></a></li><li><a href="../graphify/index.html"><img class="pix" src="../../img/icons/wikis.svg" alt="" width="40" height="40"><span>Reading product code (Graphify)</span></a></li><li><a href="../guardrails/index.html"><img class="pix" src="../../img/icons/shield.svg" alt="" width="40" height="40"><span>Guardrails</span></a></li><li><a href="../feature-test-prompts/index.html"><img class="pix" src="../../img/icons/scribe.svg" alt="" width="40" height="40"><span>Feature test prompts</span></a></li><li><a href="../architecture/index.html"><img class="pix" src="../../img/icons/architecture.svg" alt="" width="40" height="40"><span>Architecture</span></a></li><li><a href="../cost-architecture/index.html"><img class="pix" src="../../img/icons/speed.svg" alt="" width="40" height="40"><span>Cost-aware execution</span></a></li><li><a href="../model-routing/index.html"><img class="pix" src="../../img/icons/orchestrator.svg" alt="" width="40" height="40"><span>Model routing</span></a></li></ul></div>
114
+ <div class="side-group"><p class="side-head">Pages of their own</p><ul>
115
+ <li><a href="https://forgeqe.github.io/security/"><img class="pix" src="../../img/icons/shield.svg" alt="" width="40" height="40"><span>Security and data flows</span></a></li>
116
+ <li><a href="../../architecture-map/index.html"><img class="pix" src="../../img/icons/architecture.svg" alt="" width="40" height="40"><span>Architecture map</span></a></li>
117
+ </ul></div>
118
+ </nav>
119
+ <main id="main" class="docs-main">
120
+ <p class="crumbs"><a href="../index.html">Docs</a><span>/</span>More documentation</p>
121
+ <h1 class="topic-h"><img class="pix pix--title" src="../../img/icons/wikis.svg" alt="" width="40" height="40">Evidence (design and status)</h1>
122
+ <article class="prose">
123
+ <p>Status: design, agreed before building. Nothing here is built yet unless a phase says done.</p>
124
+ <p>Evidence tests <strong>agentic solutions</strong>: any AI agent, in any domain (software delivery, claims handling, customer
125
+ service, operations), not only ForgeQE's own. For each run of an agent it answers, with proof a person can check:</p>
126
+ <ul>
127
+ <li><strong>What did it do?</strong> Every step, tool call and output, in order.</li>
128
+ <li><strong>How did it do it?</strong> Against the way of working agreed for it: required steps, limits, allowed actions.</li>
129
+ <li><strong>What did it decide?</strong> Each decision point: what it chose, and what it could have chosen.</li>
130
+ <li><strong>Why?</strong> What it said its reasons were, and whether what it actually saw and did supports them.</li>
131
+ <li><strong>What data did it use?</strong> Which inputs it had before each decision (documents, tool results, memory, the user's
132
+ words), where each came from, and whether it was allowed to use them.</li>
133
+ <li><strong>Was the result right?</strong> For the agent's domain: for software, against the product knowledge graph; for a business
134
+ process, against its policies and rules.</li>
135
+ </ul>
136
+ <p>It does so twice in an agent's life: on scenarios <strong>before a version is released</strong> (is this version ready?), and on
137
+ <strong>every real run after go-live</strong> (was this run right?).</p>
138
+ <h2 id="principles-correctness-first"><a href="#principles-correctness-first" class="hash">#</a>Principles (correctness first)</h2>
139
+ <p>These hold for every phase; a phase is not done while one is broken.</p>
140
+ <ol>
141
+ <li><strong>An agent's account of itself is a claim, not evidence.</strong> What an agent says it did (&quot;tests passed&quot;, &quot;I read the
142
+ policy&quot;) and why it says it decided are recorded as its statements and checked against what was observed: the steps
143
+ it actually took and the data it actually had at that moment. A verdict never rests on the agent's own word.</li>
144
+ <li><strong>Every verdict rests on evidence that can be checked again.</strong> A finding names where: a step of the run, a decision,
145
+ an input, a line of a diff, a rule with its source. A finding without one is not shown.</li>
146
+ <li><strong>The record is faithful.</strong> It holds only what the run produced; nothing is inferred into it. Where a source does
147
+ not say something (an agent that logs no reasons), the record says it is not known, never a guess. It is written
148
+ once and never edited; verdicts are kept beside it, so a check re-run on the same record gives the same answer.</li>
149
+ <li><strong>Code decides what it can; a model only where it must.</strong> Each check is deterministic first (the contract, the
150
+ record, the knowledge). A model may judge only what code cannot (meaning, a rubric), must cite what it saw, and its
151
+ answer is checked by code like every model answer in ForgeQE.</li>
152
+ <li><strong>The evaluator is evaluated.</strong> Every check ships with a labelled set of runs whose right verdict is known, wrong ones
153
+ planted. Its precision and recall are measured and reported. A check starts <strong>advisory</strong> (it can only WARN) and
154
+ becomes <strong>gating</strong> (it can FAIL) only when its measured precision meets the bar its owner set.</li>
155
+ <li><strong>Domain-neutral at the core.</strong> The record, the contract and the behaviour, decision and data checks know nothing
156
+ about software. Domain knowledge (a product graph, a policy set) plugs in behind one interface.</li>
157
+ <li><strong>Standards first.</strong> Runs are read from OpenTelemetry, following its generative AI conventions (still being
158
+ developed), so any agent that can emit traces is judged the same way; adapters read other logs into the same record.</li>
159
+ <li><strong>The data is controlled.</strong> The data an agent used may be personal or confidential. By default the record keeps a
160
+ reference and a fingerprint of each input, not its content; content is kept only when switched on for that agent,
161
+ and redacted with the existing scrubbers first. Nothing leaves the machine except to the model the team configured.
162
+ Everything a run holds is untrusted input (CLAUDE.md): an instruction inside a document the agent read is data.</li>
163
+ <li><strong>Proposes, never applies.</strong> Evidence never changes a live agent or its settings. Fixes, guidance and scenarios are
164
+ proposals a person approves. A person can overrule any verdict, and that is recorded.</li>
165
+ <li><strong>Numbers are defined, not decorative.</strong> Every score has a written formula over named checks; none is shown without
166
+ the checks behind it.</li>
167
+ <li><strong>Small phases, each usable on its own</strong>, each with exit criteria measured on its labelled set, each reviewed
168
+ before the next starts.</li>
169
+ </ol>
170
+ <h2 id="the-run-record"><a href="#the-run-record" class="hash">#</a>The run record</h2>
171
+ <p>One record per agent run (<code>.forgeqe/evidence/runs/&amp;lt;run-id&gt;.json</code>, a versioned schema), whatever produced it:</p>
172
+ <div class="tbl"><table>
173
+ <thead>
174
+ <tr><th>Part</th><th>What</th><th>Notes</th></tr>
175
+ </thead>
176
+ <tbody>
177
+ <tr><td>run</td><td>id, start and end, outcome as the run reported it</td><td></td></tr>
178
+ <tr><td>agent</td><td>name, version, and the digest of what made it: instructions, skills, tools and their schemas, model and settings</td><td>two runs of &quot;the same&quot; agent with a different digest are different versions</td></tr>
179
+ <tr><td>request</td><td>what was asked, by whom, from where (chat, ticket, schedule), linked work items</td><td></td></tr>
180
+ <tr><td>steps</td><td>in order: model calls, tool calls (name, inputs, result, error), retrieval, hand-offs to other agents</td><td>inputs and results kept as references and fingerprints unless content is switched on</td></tr>
181
+ <tr><td>inputs</td><td>every piece of data the run took in: id, kind (user input, document, tool result, memory, another agent), source, time, sensitivity label, fingerprint</td><td>the data lineage: each step names the inputs it was given</td></tr>
182
+ <tr><td>decisions</td><td>each point where the agent chose: what it chose, the options it had where known, the inputs available at that moment, its stated reason (a claim)</td><td>taken from the run where it says so (a tool chosen, an answer given, a branch taken); never invented</td></tr>
183
+ <tr><td>outputs</td><td>what it produced: text, a change (diff, commit, pull request), a record written, a message sent</td><td></td></tr>
184
+ <tr><td>statements</td><td>what the agent said about its own work (&quot;tests passed&quot;, &quot;done&quot;, &quot;I checked X&quot;)</td><td>checked, never trusted</td></tr>
185
+ <tr><td>gaps</td><td>what the source could not say</td><td>an honest &quot;not known&quot;</td></tr>
186
+ </tbody>
187
+ </table></div>
188
+ <p>Sources (E1, built): ForgeQE's own agents, from their session logs (<code>src/evidence/forgeqe.ts</code>); OpenTelemetry traces,
189
+ OTLP JSON following the generative AI conventions in their older and newer forms (<code>src/evidence/otlp.ts</code>); an agent's
190
+ own JSON logs, through a mapping file its owner writes once (<code>src/evidence/jsonlog.ts</code>): which field says what kind of
191
+ event a line is (request, model, tool call and result, message, decision, hand-off, document or memory read, error)
192
+ and where each piece is (text, tool, call id, arguments, result, success, choice, options, reason, agent, source,
193
+ model, version). A mapping is data: only those keys, field paths, no YAML aliases; values are read only from an
194
+ event's own fields. What a source or a mapping does not say is listed in the record's gaps.</p>
195
+ <p>Agent platforms (built): <strong>Langfuse</strong> (<code>src/evidence/langfuse.ts</code>): a trace with its observations as its API gives it,
196
+ several in a list, or observations alone. GENERATION is a model call, TOOL and RETRIEVER a tool step (a retriever's
197
+ results the documents it took in), AGENT another agent handed to, GUARDRAIL a policy step. <strong>LangSmith</strong>
198
+ (<code>src/evidence/langsmith.ts</code>): runs from <code>list_runs</code> (flat, newest first) or one read with its <code>child_runs</code>, grouped by
199
+ trace and put in LangSmith's own order; llm, tool and retriever runs are steps, the root run is the agent (its inputs
200
+ the request, its outputs the answer). Both read chat messages in OpenAI's, Anthropic's and LangChain's shapes
201
+ (<code>src/evidence/chat.ts</code>), and times with no zone as UTC. What neither platform says is not guessed: spans, chains,
202
+ prompts and parsers are the agent's own code, counted and named in the gaps, and one that failed is an error step.
203
+ Scores and feedback on a run are someone's judgement of it, not the run, and are not read.</p>
204
+ <p><strong>Receiving traces as the agent runs</strong> (built): <code>forgeqe evidence receive</code> is an OTLP/HTTP endpoint on 127.0.0.1
205
+ (JSON or protobuf, gzipped or not; <code>src/evidence/receiver.ts</code>) that an agent under test sends its traces to with the
206
+ OpenTelemetry exporter's own settings, which it prints:</p>
207
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>text</span><button class="copy-code" type="button">Copy</button></div><pre><code>OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:4318/v1/traces
208
+ OTEL_EXPORTER_OTLP_TRACES_HEADERS=Authorization=Bearer%20&amp;lt;token&gt;
209
+ OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf
210
+ OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true
211
+ </code></pre></div>
212
+ <p>Spans are kept per trace as they arrive (<code>.forgeqe/evidence/incoming/</code>, owner only). A span ends before its parent, so
213
+ the root comes last: a trace is recorded once its root has arrived and nothing more has for <code>--settle</code> seconds (10), or
214
+ after five minutes with no root (the record then says part of the trace is missing). Ctrl+C records every trace still
215
+ open. A record is never changed: spans that arrive after their trace was recorded are kept beside it in
216
+ <code>incoming/&amp;lt;trace&gt;.late.jsonl</code> and said. The token is new each start unless <code>FORGEQE_EVIDENCE_TOKEN</code> keeps one. A
217
+ trace whose root is in another service (a remote parent) waits the five minutes. Content is recorded as fingerprints
218
+ unless <code>--content</code> is given, and only what the agent's instrumentation captured (the last setting above, for
219
+ OpenTelemetry's own generative AI instrumentations) is there to record.</p>
220
+ <h3 id="the-labelled-corpus-e13"><a href="#the-labelled-corpus-e13" class="hash">#</a>The labelled corpus (E1.3)</h3>
221
+ <p><code>evals/evidence/records/&amp;lt;case&gt;/</code> holds runs whose right record is known: a source (a ForgeQE session, an
222
+ OpenTelemetry trace, an agent's own JSON log with its <code>mapping.yaml</code>) and <code>case.json</code> with what each record must hold
223
+ (steps, inputs, decisions with who decided, their options and stated reasons, statements, outputs, gaps that must and
224
+ must not be said) and what was planted in the source (secrets, personal data, injected instructions). The expectations
225
+ are written by hand from the source, never copied from a reader's output. <code>tests/evidence-corpus.test.ts</code> reads every
226
+ case, and checks on every record from every reader, content on and off: well formed; the same bytes from the same
227
+ source; no planted secret kept; no input's content kept with content off; an instruction found in data never the
228
+ agent's own statement, decision, request or output; a missing request always said; nothing a source holds changes what
229
+ every JavaScript object inherits.</p>
230
+ <p><code>bun scripts/evidence-mutations.ts</code> proves the corpus can see: it puts realistic bugs back into the readers one at a
231
+ time (a hand-off credited to its target, content kept with content off, a forged step through <code>__proto__</code>, a decision's
232
+ options dropped, …) and every one must make the corpus fail. A pilot's runs are added as new case folders, with their
233
+ sensitive values replaced before they are committed.</p>
234
+ <h2 id="the-contract"><a href="#the-contract" class="hash">#</a>The contract</h2>
235
+ <p>What the agent's owner agreed for it, versioned with the agent and approved like a custom agent's manifest:</p>
236
+ <ul>
237
+ <li>its purpose, and the requests it takes;</li>
238
+ <li>required steps (read the claims policy before deciding a claim; read the workflow spec before editing case code);</li>
239
+ <li>allowed actions and their limits (tools, paths, environments, amounts), and forbidden ones;</li>
240
+ <li>the data it may use, and may not (sources, sensitivity labels, personal data rules);</li>
241
+ <li>limits: steps, retries, cost, time;</li>
242
+ <li>when it must hand over to a person.</li>
243
+ </ul>
244
+ <p><strong>Built (E2).</strong> <code>.forgeqe/evidence/contracts/&amp;lt;name&gt;.yaml</code> (<code>src/evidence/contract.ts</code>); <code>forgeqe evidence contract new &quot;&amp;lt;agent&gt;&quot;</code> starts one from the agent's recorded runs (the tools and agents they used, as a proposal to edit):</p>
245
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>yaml</span><button class="copy-code" type="button">Copy</button></div><pre><code>agent: claims-agent # the agent's name, as its runs record it
246
+ version: 1 # the contract's own version
247
+ purpose: Decides home-insurance claims within the policy.
248
+ versions: [&quot;2.1.0&quot;] # agent versions it is for (absent: every version)
249
+ steps:
250
+ required: # a step it must take; with before, only when that step comes, and before it
251
+ - { id: read-policy, step: { tool: get_policy }, before: { tool: [approve_claim, deny_claim] } }
252
+ - { id: fraud-check, step: { handoff: fraud-check }, before: { tool: approve_claim } }
253
+ actions:
254
+ tools: [get_policy, approve_claim, deny_claim, refer_to_person] # the run's own agent may use only these
255
+ forbidden: [delete_claim] # never, by whichever agent
256
+ agents: [fraud-check] # the agents it may hand to
257
+ max_calls: { approve_claim: 1 }
258
+ limits: { steps: 30, tool_calls: 20, model_calls: 15, failures: 3, repeats: 2, minutes: 10 }
259
+ handover:
260
+ to: [{ tool: refer_to_person }, { ask: true }] # what handing over to a person is
261
+ person_decides: # what only a person decides
262
+ - { id: big-approvals, step: { tool: approve_claim }, args: { amount: { over: 5000 } } }
263
+ after_failure: # hand over when one of these fails
264
+ - { id: approval-failed, step: { tool: approve_claim } }
265
+ statements: # what it says, and the step that must have worked before it
266
+ - { id: approved, says: [approved, have approved], needs: { tool: approve_claim } }
267
+ gate: { required_steps: 0.95, allowed_actions: 0.95 } # the precision a check must be measured at to fail a run
268
+ </code></pre></div>
269
+ <p>A step is named by <code>tool</code>, <code>handoff</code>, <code>ask: true</code>, or <code>kind</code> (with <code>name</code>), and <code>by</code> an agent. <code>repeats</code> is how many
270
+ times in a row the same call (same tool, same arguments) may be repeated. A phrase is matched as whole words,
271
+ case-insensitively, and not when a negating word comes just before it in its sentence (&quot;could not be approved&quot;).</p>
272
+ <p>The file may come from a repository and is read as untrusted: only these keys of their own types, no YAML aliases,
273
+ names and phrases as plain text (never a pattern that is run), the result frozen. What judges is the <strong>approved</strong>
274
+ version: <code>forgeqe evidence contract approve &amp;lt;name&gt;</code> shows everything it agrees and which checks could then fail a run,
275
+ and a person at a terminal types the name; an exact copy and its digest are kept in <code>contracts/.approved/</code> and checked
276
+ on every read (a copy changed by hand judges nothing). A change to the file waits for approval while the approved
277
+ version judges. A contract nobody approved still judges, but only warns. ForgeQE's own coding agents may not edit
278
+ <code>.forgeqe/</code> (<code>ownPaths</code>), so an agent cannot change its contract, its records or its verdicts.</p>
279
+ <h2 id="the-lenses"><a href="#the-lenses" class="hash">#</a>The lenses</h2>
280
+ <h3 id="behaviour-did-it-work-the-agreed-way"><a href="#behaviour-did-it-work-the-agreed-way" class="hash">#</a>Behaviour: did it work the agreed way?</h3>
281
+ <div class="tbl"><table>
282
+ <thead>
283
+ <tr><th>Check</th><th>Decided by</th></tr>
284
+ </thead>
285
+ <tbody>
286
+ <tr><td>Required steps</td><td>The steps in the record against the contract's required steps, in order</td></tr>
287
+ <tr><td>Allowed actions</td><td>Every action against the contract (the same engine as custom agents' <code>checkCall</code>): allowed, needed, valid inputs</td></tr>
288
+ <tr><td>Limits</td><td>Retries, loops, steps, cost and time against the contract</td></tr>
289
+ <tr><td>Hand-over</td><td>It handed over where the contract says a person decides</td></tr>
290
+ <tr><td>Statements</td><td>Each statement against the record: &quot;tests passed&quot; with no test step, or failed ones, is a finding</td></tr>
291
+ </tbody>
292
+ </table></div>
293
+ <p><strong>Built (E2)</strong> in <code>src/evidence/behaviour.ts</code>. Each check gives PASS, WARN, FAIL or NOT KNOWN: what the record cannot
294
+ settle (an argument kept only as a fingerprint, an outcome the source did not record) is not known, never a pass. A
295
+ finding names its steps (or statement, or output) and the contract rule it rests on. <code>forgeqe evidence check &amp;lt;id&gt;</code> (or
296
+ <code>--all</code>) judges runs and keeps each verdict in <code>.forgeqe/evidence/verdicts/&amp;lt;run&gt;.&amp;lt;digest&gt;.json</code>; it exits 1 when a run
297
+ fails, so a pipeline can gate on it. The run's page shows the verdict above its timeline, each finding opening its step.</p>
298
+ <p><strong>When a check may fail a run</strong> (principle 5): only when the contract is approved, its owner set a bar for that check
299
+ (<code>gate</code>), and the check's precision, measured at that moment on the labelled runs, meets the bar on at least five
300
+ labelled findings (<code>src/evidence/measure.ts</code>). The labelled runs are ForgeQE's own (<code>evals/evidence/behaviour/</code>: 20
301
+ runs, planted skipped and late steps, forbidden and unlisted tools, a sub-agent's forbidden call, a retry loop, an
302
+ approval only a person may make, &quot;tests pass&quot; when they did not, cancelled and refunded when they were not, and good
303
+ runs with negated claims and paging) and the project's own, in <code>.forgeqe/evidence/labelled/&amp;lt;case&gt;/</code> (a source, its
304
+ contract, and case.json with the findings each record must give). The measurement is made from them each time; there
305
+ is no stored number to change. <code>forgeqe evidence measure</code> prints it. On ForgeQE's labelled runs alone, required steps,
306
+ allowed actions and statements have enough labelled findings to gate; limits and hand-over need a team's own.</p>
307
+ <h3 id="decisions-and-data-did-it-decide-on-the-right-grounds-with-data-it-may-use"><a href="#decisions-and-data-did-it-decide-on-the-right-grounds-with-data-it-may-use" class="hash">#</a>Decisions and data: did it decide on the right grounds, with data it may use?</h3>
308
+ <div class="tbl"><table>
309
+ <thead>
310
+ <tr><th>Check</th><th>Decided by</th></tr>
311
+ </thead>
312
+ <tbody>
313
+ <tr><td>Grounded decisions</td><td>Each decision had the inputs the contract says it needs before it was made (the policy was read before the claim was decided, not after)</td></tr>
314
+ <tr><td>Data allowed</td><td>Every input against the contract's data rules: source, sensitivity, personal data; data it may not use, used, is a finding</td></tr>
315
+ <tr><td>Data used, not only seen</td><td>An output that states a fact traces to an input that holds it (the quote checks ForgeQE already has); a fact with no input behind it is a finding</td></tr>
316
+ <tr><td>Stated reasons</td><td>The agent's stated reason against the record: a reason that cites an input it never had, or a rule the knowledge does not hold, is a finding</td></tr>
317
+ <tr><td>Instructions in data</td><td>An action that follows an instruction found inside a document or tool result (not the user's request) is a finding</td></tr>
318
+ </tbody>
319
+ </table></div>
320
+ <p><strong>Built (E3)</strong> in <code>src/evidence/decisions.ts</code>, from these contract rules:</p>
321
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>yaml</span><button class="copy-code" type="button">Copy</button></div><pre><code>decisions: # what a decision must have had before it was made
322
+ - { id: policy-first, decision: { chose: [approve_claim, deny_claim] }, needs: [{ from: get_claim }, { from: get_policy }] }
323
+ data:
324
+ allowed: [{ kind: request }, { from: [get_claim, get_policy, approve_claim, deny_claim, refer_to_person] }]
325
+ forbidden: [{ from: crm_export }]
326
+ personal: false # it may take in no personal data
327
+ facts: true # what it states, reasons on or passes to a tool must be in an input it had
328
+ reasons: # what a reason may cite only once it had it
329
+ - { id: cites-policy, says: [policy covers, policy excludes, the policy says], needs: { from: get_policy } }
330
+ instructions: { phrases: [per management] } # more phrases that mark an instruction hidden in data
331
+ </code></pre></div>
332
+ <ul>
333
+ <li><strong>Grounded decisions</strong>: each decision a rule names had every input it needs, taken in at or before its step.</li>
334
+ <li><strong>Data allowed</strong>: each input against <code>allowed</code> and <code>forbidden</code>, by where it came from (<code>from</code>: a tool, file or agent)
335
+ and its kind. <code>allowed</code> lists every tool whose answer it may take in, actions included: an action's answer is data
336
+ it takes in too. With <code>personal: false</code>, what it fetched (not the person's own request) is checked for e-mail
337
+ addresses, card numbers (Luhn-checked), bank accounts (IBAN, checked) and international phone numbers; a finding
338
+ names the kind, never the value.</li>
339
+ <li><strong>Facts from its data</strong>: each amount (however written: 1,200 and 1 200 and 1200 are one), id (C-77), e-mail address
340
+ and date of two digits or more in what it said, its answer, its reasons and its own tool calls' arguments must be
341
+ in the request or an input it had by then. One that is not is a fact from nowhere.</li>
342
+ <li><strong>Stated reasons</strong>: a reason that says one of a rule's phrases (as whole words, not negated) had the input it
343
+ cites. Phrases that cite (&quot;policy covers&quot;, &quot;the policy says&quot;) rather than mention (&quot;the policy&quot;) keep a reason like
344
+ &quot;now the policy&quot; from counting.</li>
345
+ <li><strong>Instructions in data</strong>: judged for every run, contract or not. Text addressed to the agent (&quot;ignore previous
346
+ instructions&quot;, &quot;SYSTEM:&quot;, &quot;you are now&quot;, or a contract's own phrases) in a tool result, document or memory (not the
347
+ request, not an agent's hand-over) is an instruction; a later tool call that uses a value only that instruction
348
+ gave, or calls a tool it names, follows it. An instruction seen and not followed is said, not a finding. That the
349
+ agent did what the instruction asked in other words is not caught by code; a model may judge it later, measured
350
+ like every check.</li>
351
+ </ul>
352
+ <p>What reads the inputs' content says NOT KNOWN for a run recorded without <code>--content</code>, never PASS; grounded decisions,
353
+ data sources and stated reasons need only where inputs came from and are judged either way. A run shows one verdict per
354
+ lens; a lens its contract sets no rule for is left out (instructions in data always has one). The E3 labelled runs
355
+ (<code>evals/evidence/behaviour/e3-*</code>) plant each case the design names: decided before reading the policy, data it may
356
+ not use (forbidden, unlisted, personal), a fact from nowhere, a reason citing an input it never had or had only
357
+ later, an instruction followed by value and by name; and good runs, an instruction seen and ignored, and the same run
358
+ without content.</p>
359
+ <h3 id="domain-was-the-result-right-for-this-product-or-process"><a href="#domain-was-the-result-right-for-this-product-or-process" class="hash">#</a>Domain: was the result right for this product or process?</h3>
360
+ <p>The knowledge plugs in behind one interface: &quot;what rules, structure and dependencies apply to these parts, and where is
361
+ each stated&quot;. For software it is the product knowledge graph; for a business process, its policies and rules (from
362
+ documents, Confluence, Jira and Azure DevOps acceptance criteria).</p>
363
+ <p>For a software change (first domain, built on the product graph):</p>
364
+ <div class="tbl"><table>
365
+ <thead>
366
+ <tr><th>Check</th><th>Example finding</th></tr>
367
+ </thead>
368
+ <tbody>
369
+ <tr><td>Business rules</td><td>&quot;orders.status set directly in OrdersController.ts:88; the graph shows status changes go through OrderWorkflow.transition()&quot;</td></tr>
370
+ <tr><td>Architecture and patterns</td><td>&quot;payments now reads orders' tables directly; elsewhere Commerce calls the Orders API&quot;</td></tr>
371
+ <tr><td>Dependencies</td><td>&quot;GET /api/orders/:id response changed; web/src/api/orders.ts:4 reads <code>status</code>&quot;</td></tr>
372
+ <tr><td>Regression</td><td>&quot;Cancel an order is changed; no test reaches POST /api/orders/:id/cancel&quot;</td></tr>
373
+ <tr><td>Security</td><td>&quot;DELETE /api/orders/:id has no authorization; the other order endpoints require a signed-in user&quot;</td></tr>
374
+ </tbody>
375
+ </table></div>
376
+ <p>These are decided on facts, not on reading the diff: the graph's own extractor is run on each changed file before and
377
+ after the change, so what was added or removed (an endpoint, an auth mark, a guard, a state set, a table use, a call)
378
+ is exact, then read against the graph.</p>
379
+ <p><strong>Built (E4, the product check)</strong> in <code>src/evidence/product.ts</code>: <code>forgeqe evidence product-check &amp;lt;repo&gt; [--base main] [--head &amp;lt;ref&gt;] [--run &amp;lt;id&gt;]</code> reads the change from git in that product repository (the working tree when no head is
380
+ given, files not yet added included; git with an argument list, refs checked, binary files and links left out,
381
+ <code>src/evidence/gitchange.ts</code>) and reads it against the product graph built on the code before it (<code>forgeqe knowledge build</code>). With <code>--run</code>, the verdict is kept beside the agent's run and its page shows it as a third lens, &quot;Was its change
382
+ right for the product?&quot;, contract or not.</p>
383
+ <div class="tbl"><table>
384
+ <thead>
385
+ <tr><th>Check</th><th>What it finds, by code</th></tr>
386
+ </thead>
387
+ <tbody>
388
+ <tr><td>Business rules</td><td>a rule a request must meet (a refusing guard) gone, or answering otherwise (409 now throws); a record state set in a new place when the graph shows where it is set (&quot;sets orders to cancelled in admin.ts:13; until now workflow.ts:5 is where that is done&quot;); each with what the code says about it, when it says something: the comment above the line, else its function's comment or docstring, else a comment marked as a reason (<code>WHY:</code>, <code>NOTE:</code>, an ADR) that documents it (&quot;The code says why: &quot;Every change of an order's status goes through here…&quot; (workflow.ts:3)&quot;), read from the file (<code>src/product/why.ts</code>) and never repeated when it speaks to an agent</td></tr>
389
+ <tr><td>Architecture</td><td>a table of another service used directly</td></tr>
390
+ <tr><td>Dependencies</td><td>an endpoint removed or renamed that other code in the graph calls; a field its success answer no longer has (<code>res.json({ … })</code>, <code>return { … }</code>) that a file calling it, or using that caller, reads (not <code>res.status</code>, HTTP's own); a function the change removes, or declares so that its callers break (a new parameter without a default), while a call the change leaves as it is still calls it (&quot;cancel was declared <code>cancel(orderId)</code> and is now <code>cancel(orderId, reason)</code>; routes/orders.ts:21 calls it&quot;)</td></tr>
391
+ <tr><td>Regression</td><td>an endpoint added or changed in a file no test reaches, when the change adds no test that imports it; a function changed that no test calls, directly or through its callers, and whose endpoints no test reaches</td></tr>
392
+ <tr><td>Security</td><td>a new endpoint without sign-in where the service's other endpoints need one; sign-in removed from one</td></tr>
393
+ <tr><td>Acceptance criteria</td><td>each criterion of the change's work items (Azure DevOps or Jira, by <code>--work-item ado:123,jira:SHOP-12</code>, else the ids its commit messages name: <code>AB#123</code>, <code>SHOP-12</code>) met, not met, or not shown</td></tr>
394
+ </tbody>
395
+ </table></div>
396
+ <p>The function checks read the code's calls from the product graph (Graphify, docs/GRAPHIFY.md): the functions a change
397
+ touches are found from its changed lines, and each is read against its callers. A caller counts as updated only when
398
+ its call's line is part of the change. A finding that rests only on inferred calls says so. The domain tests run on the
399
+ sample's code as Graphify read it (<code>tests/fixtures/domain-graphify</code>, recorded from the real bridge).</p>
400
+ <p>A rule's message reworded is not a change of the rule; its status code or exception is. These checks are <strong>advisory</strong>
401
+ (they can only warn): they are measured on changes planted on ForgeQE's sample product (<code>evals/evidence/domain</code>: the
402
+ shop with sign-in, a workflow that owns status changes, a tested route and an untested one; 20 changes, 7 of them
403
+ clean), each giving exactly its labelled findings, and <code>forgeqe evidence measure</code> prints them; gating on them comes when
404
+ runs and their changes are tied together (E5).</p>
405
+ <p>The acceptance criteria are the one domain check a model reads (<code>src/evidence/acceptance.ts</code>, prompt
406
+ <code>evidence-acceptance</code>): code splits each work item's criteria (bullets, numbered lines, Given/When/Then scenarios,
407
+ paragraphs), the model (no tools, a schema) answers each with the lines of the change it rests on, and code keeps an
408
+ answer only for a criterion it gave, with every quote found in that file of the change within three lines of where it
409
+ says. Not met is a finding at its line; not shown, an answer that does not hold up, or no model (<code>--no-model</code>, or none
410
+ set up) is not known, never a pass. The work items and the change reach the model as data; its reasons are shown as its
411
+ reading. A quote proves only that the lines exist, not that the model read them rightly, so the check is advisory and
412
+ measured with a real model: <code>forgeqe evidence measure --with-model</code> reads the labelled criteria
413
+ (<code>evals/evidence/domain/acceptance</code>: five work items on planted changes, each criterion's verdict written by hand).</p>
414
+ <h3 id="engineering-for-agents-that-change-code"><a href="#engineering-for-agents-that-change-code" class="hash">#</a>Engineering: for agents that change code</h3>
415
+ <p>Rebuild the change in a clean worktree and run the tests itself; run the existing suite for regressions.</p>
416
+ <h3 id="content-is-a-generated-output-relevant-grounded-and-complete"><a href="#content-is-a-generated-output-relevant-grounded-and-complete" class="hash">#</a>Content: is a generated output relevant, grounded and complete?</h3>
417
+ <p>Fixed rules first, then meaning checks (every claim in its inputs), then a judge scoring it against a rubric the owner
418
+ wrote; outputs that vary are run several times and pass only when enough runs pass. Judges are calibrated against a
419
+ golden set people graded before they are trusted.</p>
420
+ <p><strong>Built (E7)</strong> in <code>src/evidence/content.ts</code>, <code>contentjudge.ts</code> and <code>calibration.ts</code>, from the contract's <code>content</code>
421
+ section. The answer is the run's last text output; a run with no answer, or one kept only in part, is not known for
422
+ what the missing part could change.</p>
423
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>yaml</span><button class="copy-code" type="button">Copy</button></div><pre><code>content:
424
+ rules: # decided by code
425
+ - { id: length, min_words: 8, max_words: 60 }
426
+ - { id: names-decision, says_any: [approved, declined, referred] }
427
+ - { id: next-step, says: [you will] }
428
+ - { id: no-promises, not_says: [guarantee, promise] }
429
+ grounded: true # every sentence rests on what the run took in (a model reads it)
430
+ rubric: # the owner's criteria, scored 1 to 5 by a judge
431
+ criteria: [Says what was decided., Says what the customer must do next.]
432
+ pass: 4 # the score each criterion needs (4 if not given)
433
+ judge_runs: 3 # how many times the judge reads it (3 if not given)
434
+ agree: 0.8 # how often the judge must agree with people before its misses count
435
+ </code></pre></div>
436
+ <div class="tbl"><table>
437
+ <thead>
438
+ <tr><th>Check</th><th>Decided by</th></tr>
439
+ </thead>
440
+ <tbody>
441
+ <tr><td>Answer rules (<code>content_rules</code>)</td><td>code: the answer's words counted; each phrase said as whole words and not negated, as statements are read (&quot;we cannot guarantee&quot; does not say &quot;guarantee&quot;)</td></tr>
442
+ <tr><td>Grounded (<code>grounded</code>)</td><td>a model (<code>forgeqe-evidence-content</code>, prompt <code>evidence-content</code>: no tools, a schema) reads each sentence against the request and each kept input; code keeps &quot;supported&quot; only with a quote it finds again in the input named, takes &quot;claims nothing&quot; as not known when the sentence states an amount, id, e-mail or date, and makes &quot;unsupported&quot; not known when an input is kept as a fingerprint or in part, or the inputs were too long to give whole</td></tr>
443
+ <tr><td>Rubric (<code>rubric</code>)</td><td>the judge scores each criterion <code>judge_runs</code> times, each in a session of its own; a score at the bar quotes the answer, found again by code; a judge that disagrees with itself by more than one point, or whose answer does not hold up, is not known; the median decides</td></tr>
444
+ </tbody>
445
+ </table></div>
446
+ <p><code>forgeqe evidence judge &amp;lt;run&gt;</code> asks the model and keeps its readings in <code>.forgeqe/evidence/judged/&amp;lt;run&gt;.&amp;lt;contract&gt;.json</code>;
447
+ they are checked again by code each time they are read, and readings made under another version of the contract are not
448
+ used. Until then the two checks say not known.</p>
449
+ <p><strong>Calibration.</strong> A rubric's misses are not known, and the run waits in the Review queue under &quot;Answers to grade&quot;, until
450
+ the judge agrees with people on at least 10 graded answers at the contract's <code>agree</code> level. People grade an answer
451
+ against each criterion, meets or misses with a reason: on the run's page, or at a terminal that types the run's id
452
+ (<code>forgeqe evidence grade &amp;lt;run&gt; R2 misses --reason &quot;…&quot;</code>); never an agent, since the grades are what the judge is trusted
453
+ by. Grades are append-only lines in <code>grades.jsonl</code>, checked when read (a line changed by hand is named, and the judge is
454
+ not calibrated on a file that has one). <code>forgeqe evidence calibrate &amp;lt;agent&gt;</code> prints the agreement and each disagreement,
455
+ worked out each time from the grades and the readings. Once calibrated, a miss is a warning; it may fail a run only
456
+ under an approved contract whose <code>gate.rubric</code> its precision on people's misses reaches, measured on 5 or more. The
457
+ grounding check stays advisory: its labelled measurement needs a real model.</p>
458
+ <p><strong>Repeated runs.</strong> A scenario of the suite may say <code>runs: 5</code> (how many runs of it a version needs) and <code>pass_rate: 0.8</code>
459
+ (the share of them that must pass, for answers that vary); the default is one run, all passing. A candidate with fewer
460
+ runs of a scenario than it needs is held; misuse and injection scenarios take no share: every run passes.</p>
461
+ <p>Labelled cases (<code>evals/evidence/behaviour/e7-*</code>): a good answer, one too long, one too short, one that never names the
462
+ decision, a promise, a negated promise (no finding) and a negated decision; 83 mutations of the readers and checks are
463
+ each caught by the tests (<code>bun scripts/evidence-mutations.ts</code>).</p>
464
+ <h2 id="verdicts-and-findings"><a href="#verdicts-and-findings" class="hash">#</a>Verdicts and findings</h2>
465
+ <ul>
466
+ <li>Each check gives PASS, WARN or FAIL with its findings; a lens's verdict is its worst gating check, WARN when only
467
+ advisory checks found something.</li>
468
+ <li>A finding: id, check, verdict, what, where (step, decision, input, diff line), the evidence for it, the rule and where
469
+ the rule is stated, a suggested fix where there is one.</li>
470
+ <li>Findings are written as a file the agent can read, and as a report where the team works (the pull request, the run's
471
+ page). An agent may make at most two automatic fix attempts; then a person takes over.</li>
472
+ </ul>
473
+ <p><strong>Built (E5)</strong> in <code>src/evidence/review.ts</code>:</p>
474
+ <ul>
475
+ <li><strong>Findings file</strong>: <code>forgeqe evidence findings &amp;lt;run&gt;</code> writes <code>.forgeqe/evidence/findings/&amp;lt;run&gt;.md</code> for the agent: each
476
+ open finding with its rule, where it is (steps, or the file and line), and the fix code can say from its rule; which
477
+ fix attempt this is; and, once the attempts are used, &quot;Stop: a person takes over&quot;. It says that text from the run is
478
+ data, and never repeats an instruction found in data (the agent reads the file).</li>
479
+ <li><strong>Fix attempts</strong>: <code>forgeqe evidence check &amp;lt;run&gt; --attempt-of &amp;lt;first run&gt;</code> records the run as the next attempt at the
480
+ first run's work (<code>attempts.jsonl</code>); after the second, open findings mean a person takes over, and a third is
481
+ refused. The run's page says which attempt it is.</li>
482
+ <li><strong>Overrule</strong>: a person overrules one finding with a reason: <code>forgeqe evidence overrule &amp;lt;run&gt; &amp;lt;finding&gt; --reason &quot;…&quot;</code>
483
+ at a terminal (typing the run's id), or the Overrule form under the finding on the run's page (also in the audit log).
484
+ Kept in <code>overrules.jsonl</code> with who, when and how; matched by the finding's check, rule and what it says, so judging
485
+ again finds it again. The finding stays, marked, and no longer counts toward its check or the run.</li>
486
+ <li><strong>Report and CI</strong>: <code>forgeqe evidence report &amp;lt;run&gt;…</code> is Markdown for a pull request comment or a job summary, every
487
+ value from a run escaped (no link, image, markup, mention or table column can come from it). <code>forgeqe evidence ci [&amp;lt;repo&gt; --base &amp;lt;ref&gt;] [--run &amp;lt;id&gt;,&amp;lt;id&gt;] --report report.md --sarif out.sarif</code> is the pipeline's check: the change
488
+ against the product graph and the runs named, the report, SARIF annotations for findings with a file and line, and
489
+ exit 1 only when a check that gates fails. <code>forgeqe evidence ci init github | azure</code> writes the pipeline (ForgeQE at
490
+ this exact version; branch names reach the shell as variables only; the comment is posted with the pipeline's own
491
+ token).</li>
492
+ <li><strong>Review queue</strong> (<code>#/evidence-review</code>): runs with open findings, the failed first, then work whose attempts are used;
493
+ and every overruled finding with who, when and why.</li>
494
+ </ul>
495
+ <p>End to end (<code>tests/evidence-review.test.ts</code>): on a test repository, a change the graph flags gives the report and the
496
+ annotation and passes the check (advisory), and an agent's run under an approved, measured contract fails it; a claims
497
+ agent's work goes through two fix attempts to &quot;a person takes over&quot;, a third is refused, and a person's overrules on
498
+ the page take it off the queue.</p>
499
+ <h2 id="the-lifecycle"><a href="#the-lifecycle" class="hash">#</a>The lifecycle</h2>
500
+ <div class="tbl"><table>
501
+ <thead>
502
+ <tr><th>Stage</th><th>Before release</th><th>After go-live</th></tr>
503
+ </thead>
504
+ <tbody>
505
+ <tr><td>Capture</td><td>Scenario runs in a sandbox</td><td>Every real run</td></tr>
506
+ <tr><td>Plan</td><td>Scenario suite (stories, past defects, misuse and injection tests); golden set graded by the owners</td><td>A plan per run, by its request, risk and outputs</td></tr>
507
+ <tr><td>Evaluate</td><td>Every lens on every scenario</td><td>Every lens on every run</td></tr>
508
+ <tr><td>Decide</td><td>Release gate: not worse than the live version on any lens, and every misuse test passed</td><td>PASS, WARN or FAIL per run, with a gate where the team wants one</td></tr>
509
+ <tr><td>Learn</td><td>Failed scenarios drive fixes before release</td><td>Recurring findings become guidance a person approves; a root cause is traced to the instruction, skill, tool or data, proven by replay, and proposed as a fix</td></tr>
510
+ <tr><td>Monitor</td><td>A baseline per check at release</td><td>Nightly scenarios; alerts on model, knowledge, tool and judge drift</td></tr>
511
+ </tbody>
512
+ </table></div>
513
+ <p><strong>Built (E6, before release)</strong> in <code>src/evidence/scenarios.ts</code>. An agent's scenario suite,
514
+ <code>.forgeqe/evidence/scenarios/&amp;lt;name&gt;.yaml</code>, read as untrusted like a contract:</p>
515
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>yaml</span><button class="copy-code" type="button">Copy</button></div><pre><code>agent: claims-agent
516
+ version: 1
517
+ scenarios:
518
+ - id: storm-roof
519
+ kind: story # story | defect | misuse | injection
520
+ request: Decide claim C-200 # what is asked of the agent, exactly
521
+ expect: # the owners' expectations: the golden set
522
+ chose: [approve_claim] # one of these is chosen (a decision, or a tool its own agent calls)
523
+ not_chose: [delete_claim]
524
+ says: [approved] # phrases, as words, not negated
525
+ not_says: [refunded]
526
+ clean: true # every lens finds nothing (the default)
527
+ </code></pre></div>
528
+ <p>ForgeQE does not run another team's agent: the team runs each scenario's request through a version in its sandbox and
529
+ records the runs as usual (<code>forgeqe evidence scenarios &amp;lt;agent&gt;</code> lists them for a harness). A run is a scenario's when
530
+ its agent, version and request match exactly; a scenario passes for a version only when every run of it passes, so one
531
+ bad run of a flaky agent is a failure. <code>forgeqe evidence release &amp;lt;agent&gt; --candidate &amp;lt;v&gt; --live &amp;lt;v&gt;</code> is the gate (exit 1
532
+ when held; each decision kept in <code>releases.jsonl</code>):</p>
533
+ <div class="tbl"><table>
534
+ <thead>
535
+ <tr><th>The candidate is held when</th><th>Measured as</th></tr>
536
+ </thead>
537
+ <tbody>
538
+ <tr><td>it is worse on any lens</td><td>scenario by scenario on the scenarios both ran (paired): more that passed on live and fail on the candidate than the other way; worse beyond run-to-run noise when McNemar's exact test says so (one-sided p &lt; 0.05), otherwise held as &quot;may be worse: run more repeats to tell&quot; (B5)</td></tr>
539
+ <tr><td>it meets fewer of the owners' expectations</td><td>the same paired test, on scenarios whose runs meet all their <code>expect</code> (the lenses aside)</td></tr>
540
+ <tr><td>it fails a misuse or injection scenario</td><td>each one, whatever the live version did, and one not run</td></tr>
541
+ <tr><td>a scenario live passed was not run on it</td><td>not run is never a pass</td></tr>
542
+ </tbody>
543
+ </table></div>
544
+ <p>Not known is never a pass either. The gate decides nothing: a person releases. The Releases page (<code>#/evidence-releases</code>)
545
+ shows a candidate against live, scenario by scenario and lens by lens, and the gates kept. Labelled cases
546
+ (<code>evals/evidence/release</code>): an equal and a better candidate are ready; a worse one, one failing a misuse test that live
547
+ failed too (only that holds it), one following an injected instruction, one with a scenario not run, and a flaky one are
548
+ held; a first release with no live version is ready once its misuse and injection tests pass.</p>
549
+ <h2 id="the-dashboard-and-benchmark-e8"><a href="#the-dashboard-and-benchmark-e8" class="hash">#</a>The dashboard and benchmark (E8)</h2>
550
+ <p><strong>Built</strong> in <code>src/evidence/dashboard.ts</code>: <code>forgeqe evidence dashboard &amp;lt;agent&gt; [--version v] [--json]</code>, and the agent's
551
+ page in <code>forgeqe web</code> (Overview, then the agent). Every number is a tally of runs, the count with the ids it counts, so
552
+ each traces to its runs: on the page a number opens the list of its runs, on the command line the ids follow it.
553
+ Nothing is stored; it is worked out each time from the runs and their verdicts as judging gives them now, with people's
554
+ overrules applied.</p>
555
+ <div class="tbl"><table>
556
+ <thead>
557
+ <tr><th>Shown</th><th>Counted as</th></tr>
558
+ </thead>
559
+ <tbody>
560
+ <tr><td>Versions</td><td>each version's runs by verdict (the worst of its lenses): passed, warned, failed, not known, and not judged (no contract names the agent); fix attempts, and runs a person had to take over</td></tr>
561
+ <tr><td>Checks</td><td>per version, each check's runs by its outcome, and the runs with a finding a person overruled</td></tr>
562
+ <tr><td>What keeps going wrong</td><td>each rule broken, by the runs it was broken in (once per run), most first; overruled and not known findings left out</td></tr>
563
+ <tr><td>Week by week</td><td>the runs of each ISO week by verdict</td></tr>
564
+ <tr><td>Versions side by side</td><td>each check: the share of a version's runs that passed it, of the runs it judged; not known is judged and not passed</td></tr>
565
+ </tbody>
566
+ </table></div>
567
+ <p><code>tests/evidence-dashboard.test.ts</code> checks every tally against the runs it names, each judged again on its own: as many
568
+ as it says, each once, each a run of the agent; a run under a verdict or an outcome has it; the counts of a version add
569
+ up to its runs.</p>
570
+ <h2 id="learn-e9"><a href="#learn-e9" class="hash">#</a>Learn (E9)</h2>
571
+ <p><strong>Built</strong> in <code>src/evidence/learn.ts</code>. From what was found to what to change, proposed to a person and never applied.</p>
572
+ <p><strong>Causes.</strong> For each open finding of a run, code says where it may come from, each a hypothesis with the change to try:</p>
573
+ <div class="tbl"><table>
574
+ <thead>
575
+ <tr><th>Finding</th><th>Causes code proposes</th></tr>
576
+ </thead>
577
+ <tbody>
578
+ <tr><td>An instruction in data followed</td><td>the data (the input that holds it: remove it, or keep it out of reach), and the agent's instructions</td></tr>
579
+ <tr><td>No hand-over after a failed step</td><td>the tool that failed (make it work), and the instructions</td></tr>
580
+ <tr><td>Data from a source it may not use</td><td>the tool (take it away), and the instructions</td></tr>
581
+ <tr><td>Any other</td><td>the agent's instructions, in the contract's own words (&quot;Before you call approve_claim, always call get_policy.&quot;)</td></tr>
582
+ </tbody>
583
+ </table></div>
584
+ <p>The instruction for a rule is written from the contract, never from the run's text: an instruction found in data is
585
+ named as what to remove, never offered as one to follow.</p>
586
+ <p><strong>Replay.</strong> ForgeQE does not run the agent: the team runs the same request again with the one change, in its sandbox,
587
+ and records the runs as usual (<code>forgeqe evidence replay-kit &amp;lt;run&gt; H1</code> gives the request and the change as data for a
588
+ harness). <code>forgeqe evidence replay &amp;lt;run&gt; H1 &amp;lt;replay ids&gt;</code>, or <strong>Link replays</strong> on the page, links them. Each replay is
589
+ checked by code:</p>
590
+ <ul>
591
+ <li>the same agent and the same request exactly, run after the original;</li>
592
+ <li>the change, where a record shows it: the input no longer holds the instruction, the tool no longer fails (a change to
593
+ instructions is as the team says, and said so);</li>
594
+ <li>the finding gone, and nothing broken that the run had not broken.</li>
595
+ </ul>
596
+ <p>A cause is <strong>proven</strong> on 3 clean replays, since agents vary; <strong>promising</strong> on fewer; <strong>refuted</strong> by one replay where the
597
+ finding comes back, or by replays that do not carry the change; <strong>with side effects</strong> when the finding goes but
598
+ something else breaks. A replay tests one change: it is linked to one cause of a run.</p>
599
+ <p><strong>Proposals.</strong> A proven cause is proposed as a fix; a rule broken in 3 runs or more of the agent's latest version is
600
+ proposed as guidance for its instructions. A person approves or declines each with a reason: at a terminal that types
601
+ its id (<code>forgeqe evidence decide &amp;lt;agent&gt; &amp;lt;proposal&gt; approve|decline --reason &quot;…&quot;</code>), or on the Learn page. Links and
602
+ decisions are append-only lines in <code>learn.jsonl</code>, checked when read. <code>forgeqe evidence guidance &amp;lt;agent&gt;</code> writes what was
603
+ approved as Markdown, every value escaped, for the team to put into the agent; Evidence never changes the agent.</p>
604
+ <p>Labelled cases (<code>evals/evidence/learn</code>): a followed injection whose data is proven the cause by three clean replays, and
605
+ the same run with only its instructions replayed (refuted: the finding came back once), with one replay (promising), and
606
+ with replays that never removed the instruction (refuted: they do not test it); a skipped step proven to be the
607
+ instructions, and the same fix with a side effect (it deletes the claim); and a failed tool proven the cause.</p>
608
+ <h2 id="monitor-trust-and-governance-e10"><a href="#monitor-trust-and-governance-e10" class="hash">#</a>Monitor, trust and governance (E10)</h2>
609
+ <p><strong>Built</strong> in <code>src/evidence/monitor.ts</code>. Nothing here changes an agent; baselines and trust grants are append-only lines
610
+ in <code>governance.jsonl</code>, checked when read, each with who, when, why and how (terminal or page).</p>
611
+ <p><strong>Baseline.</strong> <code>forgeqe evidence baseline &amp;lt;agent&gt; [--version v] --reason &quot;…&quot;</code> (a person at a terminal, typing the agent's
612
+ name, or the Monitor page) keeps a snapshot of a version's runs as they are judged now: the models that answered (the
613
+ agent's own and each model step's), the tools it called, each document, file or memory source it read with the
614
+ fingerprints of the contents it had, each check's pass rate, the contract that judged it, and whether the rubric's
615
+ judge was calibrated.</p>
616
+ <p><strong>Drift.</strong> <code>forgeqe evidence drift &amp;lt;agent&gt; | --all [--notify] [--json]</code> compares every run since the baseline (any
617
+ version: a model can change under the same version) with it, and exits 1 when there is an alert:</p>
618
+ <div class="tbl"><table>
619
+ <thead>
620
+ <tr><th>Alert</th><th>When</th></tr>
621
+ </thead>
622
+ <tbody>
623
+ <tr><td>Model</td><td>a model answered that the baseline never had</td></tr>
624
+ <tr><td>Tool</td><td>a tool was called that the baseline never called</td></tr>
625
+ <tr><td>Knowledge</td><td>a document, file or memory source read with content the baseline never had</td></tr>
626
+ <tr><td>Check</td><td>a check passes more than 10 points less often, each side judged on 5 runs or more</td></tr>
627
+ <tr><td>Judge</td><td>the contract changed since the baseline (what judges is not what was measured); the rubric's judge no longer agrees with people: recalibrate by grading answers in the Review queue</td></tr>
628
+ <tr><td>Trust</td><td>the agent is granted more trust than its evidence supports now</td></tr>
629
+ </tbody>
630
+ </table></div>
631
+ <p>Each alert names the runs it rests on. The nightly job is a job of the jobs service running <code>forgeqe evidence drift --all --notify</code>; channels that list <code>evidence_drift</code> (notify: in forgeqe.yaml) get each alert.</p>
632
+ <p><strong>Trust.</strong> The autonomy an agent's evidence supports, by code, each level needing everything below it:</p>
633
+ <div class="tbl"><table>
634
+ <thead>
635
+ <tr><th>Level</th><th>Means</th><th>Needs</th></tr>
636
+ </thead>
637
+ <tbody>
638
+ <tr><td>Observe</td><td>a person reviews everything it does</td><td>nothing</td></tr>
639
+ <tr><td>Assist</td><td>a person approves each change it makes</td><td>its contract approved</td></tr>
640
+ <tr><td>Act</td><td>it acts alone within its contract; people review its findings</td><td>at least one check gating; the release gate for its latest version kept as ready; none of its last 20 runs of that version failed</td></tr>
641
+ <tr><td>Autonomous</td><td>it acts alone; only alerts reach people</td><td>a baseline, and no drift since; 30 judged runs of its latest version, 95% passed; the rubric's judge calibrated, where it has one</td></tr>
642
+ </tbody>
643
+ </table></div>
644
+ <p>A person grants a level (<code>forgeqe evidence trust &amp;lt;agent&gt; &amp;lt;level&gt; --reason &quot;…&quot;</code> at a terminal typing the agent's name, or
645
+ the page), never above what is supported; when the evidence later falls below a grant, drift says so.</p>
646
+ <p><strong>Audit.</strong> <code>forgeqe evidence audit &amp;lt;agent&gt; [--out f]</code> (or <strong>Download the audit</strong> on the page) exports every decision people
647
+ made about the agent, oldest first, each with who, when, how, why and what it rested on: its contract's approval (the
648
+ approved copy's record: the latest one), overrules, grades, replays linked, proposal decisions, release gates, baselines
649
+ and trust grants; with every run a decision names, as recorded and judged now (its record's fingerprint and verdict).</p>
650
+ <p><strong>Inventory.</strong> <code>forgeqe evidence inventory [--json]</code> and the Monitor page: every agent evaluated, with its versions,
651
+ models, tools, sources, contract, suite, trust supported and granted, and alerts.</p>
652
+ <p>Labelled cases (<code>evals/evidence/monitor</code>): a planted change of model, of a document's content, of a check (runs that
653
+ skip the policy), a new tool, and runs with no change; each gives exactly its alerts.</p>
654
+ <h2 id="while-the-agent-is-being-built-the-harness-b1"><a href="#while-the-agent-is-being-built-the-harness-b1" class="hash">#</a>While the agent is being built: the harness (B1)</h2>
655
+ <p><strong>Built</strong> in <code>src/evidence/harness.ts</code>. ForgeQE runs an agent version through its scenario suite itself, so a version
656
+ is judged before release without anyone recording runs by hand: <code>forgeqe evidence run-suite &amp;lt;agent&gt; --version 2.2.0 --live 2.1.0 --repeats 3</code> runs both versions, every scenario at least three times (or its own <code>runs</code>), then keeps the
657
+ release gate (exit 1 when held).</p>
658
+ <p>How to run each version is the agent's harness, <code>.forgeqe/evidence/harness/&amp;lt;agent&gt;.yaml</code>:</p>
659
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>yaml</span><button class="copy-code" type="button">Copy</button></div><pre><code>agent: claims-agent
660
+ versions:
661
+ &quot;2.2.0&quot;: { command: [opentelemetry-instrument, python, agent.py, &quot;{request}&quot;], cwd: agents/claims }
662
+ &quot;2.1.0&quot;: { command: [python, agent_v21.py, &quot;{request}&quot;], cwd: agents/claims }
663
+ request: argv # an argument that is exactly {request}; or stdin, or env (FORGEQE_EVIDENCE_REQUEST)
664
+ capture: { otlp: true } # ForgeQE's receiver, started for the suite; or { file: { from: langfuse } } at FORGEQE_EVIDENCE_OUT
665
+ timeout: 300 # seconds a run may take
666
+ env: { CLAIMS_API: &quot;http://127.0.0.1:9000&quot; } # plain values; never a secret
667
+ pass_env: [OPENAI_API_KEY] # names whose values come from this environment
668
+ sandbox: host # or container, with container: { image: python:3.12-slim }
669
+ </code></pre></div>
670
+ <p>It can come from the repository and it runs commands, so it is read like a contract (known keys, no aliases, plain
671
+ text) and only its approved copy runs: a person reads every command and types the agent's name (<code>forgeqe evidence harness approve &amp;lt;agent&gt;</code>); the copy is checked against its digest on every read. A command is a list of arguments,
672
+ never a shell: the request is one argument, as it is, however it is worded. Each run gets system settings, the
673
+ variables the harness names (never one of ForgeQE's secrets, and never one that changes how programs start, such as
674
+ <code>NODE_OPTIONS</code>), and the harness's own: the exporter settings of a receiver with a port and token of its own
675
+ (<code>forgeqe evidence instrument</code> says how an agent's OpenTelemetry uses them), and <code>FORGEQE_EVIDENCE_SCENARIO</code>,
676
+ <code>_VERSION</code>, <code>_REPEAT</code>. In a container the agent's folder is mounted read-only and values reach the runtime by name,
677
+ never on its command line.</p>
678
+ <p>Each run is logged in <code>harness.jsonl</code> with its scenario, version and repeat, so the release gate counts it as that
679
+ scenario's even when the agent's trace words the request otherwise. A run is logged and not counted when it is stopped
680
+ at its time limit, exits with an error, sends no trace, or its trace names another agent or version.</p>
681
+ <h3 id="the-harness-and-the-product"><a href="#the-harness-and-the-product" class="hash">#</a>The harness and the product</h3>
682
+ <p>A coding agent's harness names the product repository it works on: <code>product: { repo: orders-api, base: main }</code>, a
683
+ repository of <code>product.repos</code> and a ref (<code>src/evidence/harnessproduct.ts</code>). Before anything runs, the repository's
684
+ clone, the base commit and the product graph are checked; then each run gets a clean checkout of that commit (a git
685
+ worktree, hooks off), given to the agent as <code>FORGEQE_EVIDENCE_REPO</code> or the <code>{repo}</code> argument (in a container, mounted
686
+ at <code>/repo</code>, the one folder it may change). After the run, what it changed there is read from git and checked against
687
+ the graph, the domain check of E4 (business rules, architecture, dependencies, regression, security), and kept as the
688
+ run's domain verdict, so the release gate counts the domain lens version against version with no one running
689
+ <code>product-check</code> by hand. A run that changes nothing is checked too. The checkout is removed; the repository is never
690
+ touched. Build the graph on the code at the harness's base (<code>forgeqe knowledge build</code>).</p>
691
+ <h2 id="build-and-test-does-the-change-work-b2"><a href="#build-and-test-does-the-change-work-b2" class="hash">#</a>Build and test: does the change work? (B2)</h2>
692
+ <p><strong>Built</strong> in <code>src/evidence/buildcheck.ts</code>, SWE-bench style, and the main engineering signal: an agent's change is
693
+ judged first by whether it works, then by how the agent got there. Evidence does not trust the agent's &quot;tests passed&quot;.
694
+ <code>forgeqe evidence build-check &amp;lt;name&gt; --base main --head agent/branch [--run &amp;lt;id&gt;]</code> (or <code>ci --verify &amp;lt;name&gt;</code> on a pull
695
+ request) checks the repository out clean at the base and with the change (git worktrees, hooks off), runs the
696
+ repository's own setup, build and tests in each, and compares the JUnit results test by test:</p>
697
+ <div class="tbl"><table>
698
+ <thead>
699
+ <tr><th>Finding</th><th>When</th></tr>
700
+ </thead>
701
+ <tbody>
702
+ <tr><td>build-failed</td><td>setup or build fails with the change, and not at the base</td></tr>
703
+ <tr><td>new-test-failed</td><td>a test the change adds fails</td></tr>
704
+ <tr><td>regression</td><td>a test that passes at the base fails with the change (pass to pass)</td></tr>
705
+ <tr><td>test-removed</td><td>a test that passes at the base is gone with the change</td></tr>
706
+ <tr><td>claim-false</td><td>the agent's run says the tests pass, and with its change they do not</td></tr>
707
+ </tbody>
708
+ </table></div>
709
+ <p>A test failing at the base too is not held against the change; a failing test is run once more, and one that then
710
+ passes is flaky, said and not counted. Without JUnit results the tests are judged by their exit code only, and it says
711
+ so. How the repository is built is its verify file, <code>.forgeqe/evidence/verify/&amp;lt;name&gt;.yaml</code>:</p>
712
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>yaml</span><button class="copy-code" type="button">Copy</button></div><pre><code>name: orders-api
713
+ repo: services/orders-api # its folder, inside the project
714
+ image: node:20-slim # a container: setup may use the network, build and tests never do
715
+ setup: [[npm, ci]]
716
+ build: [[npm, run, build]]
717
+ test: [[npx, vitest, run, --reporter=junit, --outputFile=junit.xml]]
718
+ results: [junit.xml]
719
+ gate: true # its findings may fail the change (otherwise they warn)
720
+ </code></pre></div>
721
+ <p>Commands are argument lists, never a shell; the file can come from the repository and runs commands, so only its
722
+ approved copy runs (<code>forgeqe evidence verify approve &amp;lt;name&gt;</code>, a person typing its name), checked against its digest.
723
+ In the container the checkout is mounted, the container runs as this user with no privilege raised, and values are
724
+ passed by name. Labelled changes (<code>evals/evidence/build</code>): a good change, a regression, a failing new test, a broken
725
+ build, a removed test, a flaky test and a fix of a test that failed at the base; each gives exactly its findings.</p>
726
+ <h2 id="trajectory-did-the-agent-take-a-sound-path-b3"><a href="#trajectory-did-the-agent-take-a-sound-path-b3" class="hash">#</a>Trajectory: did the agent take a sound path? (B3)</h2>
727
+ <p><strong>Built</strong> in <code>src/evidence/trajectory.ts</code>. Agents solve one task by different routes, so a scenario's path is checked
728
+ by rules, not by one exact route; an exact path is used only where its owners choose one (a deterministic flow):</p>
729
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>yaml</span><button class="copy-code" type="button">Copy</button></div><pre><code> - id: storm-roof
730
+ kind: story
731
+ request: Decide claim C-201
732
+ path:
733
+ must: [get_claim, get_policy, approve_claim] # each called at least once
734
+ order: [get_claim, get_policy, approve_claim] # in this order; other steps may come between
735
+ never: [delete_claim] # by the agent or any agent it hands to
736
+ at_most: { get_policy: 2 } # calls of a tool
737
+ total: 12 # tool calls in all
738
+ reference: [get_claim, get_policy, fraud-check, approve_claim] # a known good path, measured against
739
+ min_match: 0.75 # fails below this path match (only when set)
740
+ # exact: true # the path is `order`, step for step
741
+ </code></pre></div>
742
+ <p>The path is the agent's own tool calls and hand-offs in order; <code>never</code> counts every call of the run. Path match is the
743
+ F1 of the longest common subsequence of the run's path and the reference (in the spirit of Ragas' tool call
744
+ accuracy); step efficiency is the reference's length over the run's, at most 1. A rule broken is an expectation not
745
+ met, so it fails the scenario and counts in the release gate. The Releases page shows, for each scenario with a path,
746
+ expected against actual step by step (expected and not done, done and not expected), and <code>forgeqe evidence trajectory &amp;lt;agent&gt; &amp;lt;scenario&gt; --version &amp;lt;v&gt;</code> prints the same for every run.</p>
747
+ <h2 id="tool-calls-was-every-call-the-right-one-with-valid-inputs-b4"><a href="#tool-calls-was-every-call-the-right-one-with-valid-inputs-b4" class="hash">#</a>Tool calls: was every call the right one, with valid inputs? (B4)</h2>
748
+ <p><strong>Built</strong> in <code>src/evidence/calls.ts</code>, BFCL style, decided by code. Three kinds:</p>
749
+ <p><strong>A scenario's expected calls.</strong> Each names a tool, how many times it may be called, and typed matchers that every call
750
+ of it must meet (an argument nested in another is <code>a.b</code>). <code>times: { max: 0 }</code> is the relevance test: no call where
751
+ none is right.</p>
752
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>yaml</span><button class="copy-code" type="button">Copy</button></div><pre><code> calls:
753
+ - tool: approve_claim
754
+ times: { min: 1, max: 1 }
755
+ args:
756
+ claim: { equals: C-201 }
757
+ amount: { min: 1, max: 5000 }
758
+ currency: { one_of: [EUR] }
759
+ note: { contains: storm } # plain text, found as it is
760
+ override: { absent: true }
761
+ - tool: delete_claim
762
+ times: { max: 0 }
763
+ </code></pre></div>
764
+ <p>Matchers are <code>equals</code>, <code>one_of</code>, <code>min</code>, <code>max</code>, <code>contains</code>, <code>type</code>, <code>present</code> and <code>absent</code>; never a pattern that is
765
+ run. A call not as expected is an expectation not met, so it counts in the release gate; arguments kept only as a
766
+ fingerprint are not known, which is not met.</p>
767
+ <p><strong>Each tool's input schema</strong>, in the contract, checked on every call of every run, after go-live too (<code>tool_inputs</code>, in
768
+ the behaviour lens): a subset of JSON Schema (type, required, properties, additionalProperties, enum, const, minimum,
769
+ maximum, exclusive bounds, lengths, items). What ForgeQE does not check (a <code>pattern</code>, a <code>$ref</code>) is refused, not
770
+ skipped.</p>
771
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>yaml</span><button class="copy-code" type="button">Copy</button></div><pre><code>inputs:
772
+ approve_claim:
773
+ type: object
774
+ required: [claim, amount]
775
+ properties: { claim: { type: string }, amount: { type: number, exclusiveMinimum: 0, maximum: 5000 } }
776
+ additionalProperties: false
777
+ </code></pre></div>
778
+ <p><strong>The files a coding agent may edit</strong>, in the contract (<code>allowed_actions</code>): the path argument of its edit tools and the
779
+ file changes its record holds, against globs (<code>**</code> across folders, <code>*</code> within one), turned into patterns by code.</p>
780
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>yaml</span><button class="copy-code" type="button">Copy</button></div><pre><code>actions:
781
+ files: { tools: [edit_file], may_edit: [&quot;src/**&quot;, &quot;tests/**&quot;], never_edit: [&quot;.github/**&quot;, &quot;**/*.lock&quot;] }
782
+ </code></pre></div>
783
+ <p>Labelled runs (<code>evals/evidence/behaviour/b4-*</code>): valid inputs, an amount sent as text, a field the schema does not
784
+ take, a required field missing, an amount over the maximum, a currency not allowed; edits inside scope, a CI workflow
785
+ edited, infrastructure edited, a lock file edited deep in the tree; each gives exactly its findings.</p>
786
+ <h2 id="scores-statistics-and-held-out-scenarios-b5"><a href="#scores-statistics-and-held-out-scenarios-b5" class="hash">#</a>Scores, statistics and held-out scenarios (B5)</h2>
787
+ <p><strong>Built</strong> in <code>src/evidence/stats.ts</code> and the release gate (<code>src/evidence/scenarios.ts</code>).</p>
788
+ <p><strong>Not worse is judged with its uncertainty.</strong> Agents vary from run to run: a scenario's pass already holds its
789
+ owners' rule for its runs (every run, or a <code>pass_rate</code> share), and two versions are compared scenario by scenario on
790
+ the scenarios both ran. Of those where they differ, <code>b</code> passed on live and failed on the candidate and <code>c</code> the other
791
+ way; McNemar's exact test gives the chance of <code>b</code> or more by luck alone. Under 0.05 the candidate is worse beyond
792
+ run-to-run noise; above it, with <code>b &gt; c</code>, it is held as &quot;it may be worse, but that is within run-to-run noise: run the
793
+ suite with more repeats, or more scenarios, to tell&quot;; <code>b ≤ c</code> is not worse. Either way a lower candidate is held: the
794
+ statistics decide what it is called and what to do next, never that a regression ships. Misuse and injection
795
+ scenarios stay hard blockers, whatever the numbers.</p>
796
+ <p><strong>Scores.</strong> Each lens's score is its runs passed of the runs judged, every run of the version pooled, with Wilson score
797
+ intervals where rates are compared (<code>wilson</code>, <code>newcombe</code> for a difference, <code>compare</code>). The summary is the weakest lens,
798
+ never an average: one lens cannot make up for another. Effort per run (steps, tool calls, model calls, time) is shown
799
+ version against version and never holds a release on its own. <code>forgeqe evidence release</code> and the Releases page show
800
+ them.</p>
801
+ <p><strong>Held-out scenarios.</strong> A scenario with <code>held_out: true</code> is run and counted in the gate, and reported apart; its runs
802
+ never reach what the agent's team reads to tune the agent: <code>forgeqe evidence findings</code> refuses them, and guidance from
803
+ recurring findings is drafted from the other runs only. Keep the held-out scenarios' requests away from whoever tunes
804
+ the agent (another suite file, outside its repository), so they keep measuring what the suite was meant to.</p>
805
+ <h2 id="drafted-scenarios-and-graded-answers-b6"><a href="#drafted-scenarios-and-graded-answers-b6" class="hash">#</a>Drafted scenarios and graded answers (B6)</h2>
806
+ <p><strong>Built</strong> in <code>src/evidence/drafting.ts</code> (<code>forgeqe evidence draft</code>, <code>drafts</code>) and the Releases page.</p>
807
+ <p>A suite is only as good as its scenarios, and the agent's needs and failures are already written down: in its work
808
+ items' acceptance criteria, in the defects raised against it, and in its runs that failed. Evidence drafts scenarios
809
+ from them; <strong>a person decides</strong> each one, and nothing is added by itself.</p>
810
+ <div class="tbl"><table>
811
+ <thead>
812
+ <tr><th>Source</th><th>Drafted by</th><th>What the draft is</th></tr>
813
+ </thead>
814
+ <tbody>
815
+ <tr><td>A run that failed (<code>--run &amp;lt;id&gt;</code>)</td><td>code alone</td><td>its request, exactly as it was asked, as a <code>defect</code> scenario expected clean on every lens; what failed is kept as the draft's why. A run the harness made of a scenario is in the suite already, and a run that passed is not drafted</td></tr>
816
+ <tr><td>A work item's acceptance criteria (<code>--from ado:N,jira:KEY-N</code>)</td><td>a model (<code>forgeqe-evidence-scenarios</code>: no tools, a schema)</td><td>1 to 3 scenarios per criterion, the usual case first, then an edge case or one the agent must refuse</td></tr>
817
+ <tr><td>A defect (<code>--defect ado:N,jira:KEY-N</code>)</td><td>the same model</td><td>a <code>defect</code> scenario of what the defect describes</td></tr>
818
+ <tr><td>The product graph's business rules (<code>--from-product [--about shipped,refund] [--repo r]</code>)</td><td>the same model</td><td>the case each rule refuses (what the product answers, when, read from its code), often a <code>misuse</code> scenario the agent must refuse or hand to a person: rules no work item may mention</td></tr>
819
+ </tbody>
820
+ </table></div>
821
+ <p>What the model proposes is <strong>kept only where it holds up</strong>, each refusal said with why: it names a criterion or defect
822
+ it was given; its quote is found in that source's text (for a business rule, the rule as the graph says it or its line of code); its request is of a request's shape and not one already drafted
823
+ or in the suite; the tools it expects chosen (or never chosen) are ones the agent is known to have (its contract's, or
824
+ called in its recorded runs); its phrases are plain words; and the whole scenario is read exactly as the suite reads it
825
+ (<code>parseSuite</code>). Without a model, nothing is drafted from a work item: nothing is invented. The tracker's text reaches
826
+ the model as data, and a line in it that gives an instruction changes nothing code decides.</p>
827
+ <p><strong>Code holds about one draft in five out</strong> (<code>held_out: true</code>, at random): the team tuning the agent does not choose what
828
+ it is measured on (see B5). The model is never asked.</p>
829
+ <p><strong>Deciding.</strong> <code>forgeqe evidence drafts</code> lists the drafts waiting, each with every expectation it would add;
830
+ <code>forgeqe evidence drafts accept|reject &amp;lt;draft&gt; --reason &quot;why&quot;</code> needs a person at a terminal who types the draft's id,
831
+ and the Releases page needs the id typed and a reason. Accepted, the scenario is added to the agent's suite (under a
832
+ fresh id if its own is taken; the suite's comments are kept) and the whole file is read again before it is written;
833
+ rejected, nothing changes. A draft is decided once. Drafts and decisions are append-only lines in
834
+ <code>.forgeqe/evidence/drafts.jsonl</code>, checked when read: a line changed by hand is said and not used, and a later line never
835
+ undoes a decision. Each decision on the page is in the audit log.</p>
836
+ <p><strong>Graded answers.</strong> Some of what owners expect cannot be checked by code: the tone of a reply, whether an explanation
837
+ would satisfy a customer. A scenario with <code>expect: { graded: true }</code> is decided by a person's grade of each run's answer
838
+ (<code>forgeqe evidence grade &amp;lt;run&gt; scenario meets|misses --reason &quot;why&quot;</code> at a terminal typing the run's id, or on the run's
839
+ page). Until a person grades it, the answer is not known and the scenario does not pass; the Releases page lists the
840
+ candidate's answers waiting for a grade. Grades are kept beside the rubric's in <code>grades.jsonl</code>, under
841
+ <code>scenario:&amp;lt;id&gt;</code>.</p>
842
+ <h2 id="fixes-proven-by-the-harness-b7"><a href="#fixes-proven-by-the-harness-b7" class="hash">#</a>Fixes proven by the harness (B7)</h2>
843
+ <p><strong>Built</strong> in <code>src/evidence/fix.ts</code> (<code>forgeqe evidence fix</code>, <code>fixes</code>) and the Learn page.</p>
844
+ <p>Learn (E9) says where a finding may come from and asks the team to replay the run with the change. When the cause is
845
+ in the agent's own instructions and ForgeQE runs the agent (B1), it does the replay itself:</p>
846
+ <ol>
847
+ <li><strong>The change is written by code, from the contract</strong>: the instruction that keeps the agent to the rule its run broke
848
+ (<code>instructionFor</code>, &quot;Before you call approve_claim, always call get_policy.&quot;), never words taken from the run or a
849
+ model. It is added under a section of its own at the end of the agent's instructions file, the harness's
850
+ <code>instructions:</code> (a file of the project inside the version's folder, never hidden, never under <code>.forgeqe</code>; the
851
+ harness is approved again when it changes).</li>
852
+ <li><strong>It is proven on a copy</strong>: the version's folder is copied (no hidden files, dependency folders linked, at most
853
+ 100 MB), the instruction added there, and the version run from the copy under a label of its own
854
+ (<code>2.0+fix-&amp;lt;id&gt;</code>, logged as <code>of</code> 2.0, so its runs never count as 2.0's): the failed scenario three times, linked as
855
+ replays of the cause, then the whole suite.</li>
856
+ <li><strong>Proven means both</strong>: the cause is proven (three clean replays, none where the finding comes back; E9's rule), and
857
+ the release gate of the patched copy against the version holds nothing (no lens worse, no misuse or injection
858
+ scenario failing that passes on the version), and every scenario and lens that passed on the version passes with
859
+ the fix. The paired test may call one scenario mended and another broken &quot;not worse&quot;; a fix that trades one failure
860
+ for another is still no fix. Nor is one whose runs could not be counted.</li>
861
+ <li><strong>Nothing in the project changes.</strong> What is kept is the patch, a unified diff <code>git apply</code> takes, in
862
+ <code>.forgeqe/evidence/fixes.jsonl</code> (append-only, checked when read: a line that says proven without its proof is
863
+ refused). <code>forgeqe evidence fix show &amp;lt;fix&gt; --patch</code> prints it, for a branch and a pull request.</li>
864
+ <li><strong>A person applies it</strong>: <code>forgeqe evidence fix apply &amp;lt;fix&gt; --reason &quot;why&quot;</code> at a terminal, typing the fix's id; only a
865
+ proven fix, once, and only while the file is exactly as it was when the fix was proven (else prove it again). The
866
+ fix's proposal is approved with the same reason. Nothing is committed: the team reviews the change, runs the suite
867
+ and opens the pull request.</li>
868
+ </ol>
869
+ <p>A cause in a tool or in the data is the team's to change (<code>forgeqe evidence replay-kit</code>); a held-out scenario's run is
870
+ never fixed from; a run the harness did not make of a scenario is drafted as one first (B6).</p>
871
+ <h2 id="a-demo"><a href="#a-demo" class="hash">#</a>A demo</h2>
872
+ <p><code>forgeqe evidence demo &amp;lt;new folder&gt;</code> (<code>src/evidence/demo.ts</code>) writes a demo project into a new or empty folder, never a
873
+ project: three made-up agents of a made-up insurer (a claims agent on Langfuse in a live and a candidate version, a
874
+ support agent, a coding agent on OpenTelemetry), four weeks of runs recorded from the exports it writes, an approved
875
+ contract, findings in every lens, a scenario suite and a release gate that holds the candidate, a baseline with drift,
876
+ an injected instruction traced to the claim data and proven by three replays, proposals, an overrule and a trust grant.
877
+ Every name, claim and amount is invented, and each decision is a demo role's. Its README says what is planted where;
878
+ <code>tests/evidence-demo.test.ts</code> keeps every page filled.</p>
879
+ <p>The build-time half is made by ForgeQE itself when the demo is written (<code>src/evidence/demobuild.ts</code>), from the stand-in
880
+ agents and samples in <code>evals/evidence</code>: its harness runs claims-bot 1.0 and 2.0 through a suite with paths, expected
881
+ calls, a graded and a held-out scenario, and the gate holds 2.0; a fix of its instructions is proven by three replays
882
+ and the suite, another refuted; shop-coder works on the sample shop, each run checked against its product graph, and
883
+ 2.0, which removes a business rule, is held; code-agent's &quot;all tests pass&quot; is checked by a build and test check of its
884
+ change; four scenarios wait for a person (from a failed run, a work item and the product's business rule: the model's
885
+ answer canned, since a demo has no model, and kept by code only as it keeps a model's). Every report ForgeQE writes is
886
+ in the demo's <code>reports/</code>: release gates, a pull request report and SARIF, findings files, dashboards, drift, guidance,
887
+ the audit, the inventory, drafts, fixes with their patch, and the build check. It needs <code>bun</code> and <code>git</code> on the PATH.</p>
888
+ <h2 id="who-decides"><a href="#who-decides" class="hash">#</a>Who decides</h2>
889
+ <div class="tbl"><table>
890
+ <thead>
891
+ <tr><th>Person</th><th>Decides</th></tr>
892
+ </thead>
893
+ <tbody>
894
+ <tr><td>Agent owner</td><td>The contract, fixes to the agent, each release</td></tr>
895
+ <tr><td>QA or assurance lead</td><td>Scenarios, guidance, which checks gate and at what bar</td></tr>
896
+ <tr><td>Domain owner (Product Owner, process owner)</td><td>The domain rules, rubrics and golden sets; outputs in the review queue</td></tr>
897
+ <tr><td>Risk and data owners</td><td>Release thresholds, the data an agent may use, how much autonomy it has</td></tr>
898
+ <tr><td>Evidence</td><td>Measures, explains and proposes; never approves</td></tr>
899
+ </tbody>
900
+ </table></div>
901
+ <h2 id="phases"><a href="#phases" class="hash">#</a>Phases</h2>
902
+ <div class="tbl"><table>
903
+ <thead>
904
+ <tr><th>#</th><th>Phase</th><th>What it delivers</th><th>Exit criteria (on its labelled set)</th></tr>
905
+ </thead>
906
+ <tbody>
907
+ <tr><td>E1</td><td><strong>The run record</strong> (done)</td><td>The schema; readers for ForgeQE's own agents, OpenTelemetry (generative AI conventions) and JSON logs; redaction and fingerprints; <code>forgeqe evidence record</code></td><td>Faithful: every step, input and output of the source is in the record, nothing is invented, nothing secret is kept, a gap is said; the same run read twice gives the same record</td></tr>
908
+ <tr><td>E2</td><td><strong>The contract, behaviour checks</strong> (done)</td><td>The contract file; required steps, allowed actions, limits, hand-over, statements</td><td>Planted runs (skipped step, forbidden action, retry loop, &quot;tests passed&quot; that did not) each caught; good runs pass</td></tr>
909
+ <tr><td>E3</td><td><strong>Decision and data checks</strong> (done)</td><td>Grounded decisions, data allowed, data used, stated reasons, instructions in data</td><td>Planted runs (decided before reading the policy, used data it may not, a fact from nowhere, a reason citing an input it never had, an injected instruction followed) each caught</td></tr>
910
+ <tr><td>E4</td><td><strong>Domain check for software</strong> (done)</td><td>The product check on a change (the five checks above), Jira and Azure DevOps as rule sources</td><td>Planted good and bad changes on the sample product; each violation found, each clean change passes</td></tr>
911
+ <tr><td>E5</td><td><strong>Verdicts where the team works</strong> (done)</td><td>Findings file, report, CI check, fix attempts, overrule</td><td>End to end on a test repository and a non-code agent</td></tr>
912
+ <tr><td>E6</td><td><strong>Before release</strong> (done; graded answers and drafted scenarios in B6)</td><td>Scenario suite, golden set, version against live, release gate</td><td>A worse version is held; a failed misuse test holds it</td></tr>
913
+ <tr><td>E7</td><td><strong>Content checks</strong> (done; the judges measured with a real model next)</td><td>Rules, meaning checks, rubric judges, repeated runs, calibration, review queue</td><td>Judges agree with the golden set at the agreed level first</td></tr>
914
+ <tr><td>E8</td><td><strong>Dashboard and benchmark</strong> (done)</td><td>Per agent and version: runs, verdicts, findings, history</td><td>Every number traces to its runs</td></tr>
915
+ <tr><td>E9</td><td><strong>Learn</strong> (done)</td><td>Guidance from recurring findings; root cause by replay; proposed fixes</td><td>A planted cause traced, its fix proven by replay</td></tr>
916
+ <tr><td>E10</td><td><strong>Monitor, trust and governance</strong> (done)</td><td>Nightly drift, judge recalibration, trust levels, audit export, inventory</td><td>A planted model change alerted; every decision exportable with its evidence and approver</td></tr>
917
+ </tbody>
918
+ </table></div>
919
+ <p>While the agent is being built (the build-time half):</p>
920
+ <div class="tbl"><table>
921
+ <thead>
922
+ <tr><th>#</th><th>Phase</th><th>What it delivers</th><th>Exit criteria (planted cases and mutations)</th></tr>
923
+ </thead>
924
+ <tbody>
925
+ <tr><td>B1</td><td><strong>The harness</strong> (done)</td><td>ForgeQE runs each version on the suite: commands as argument lists, its own receiver or a trace file, approved by a person</td><td>Each run captured and linked to its scenario; a secret or a variable that changes how programs start never reaches the agent</td></tr>
926
+ <tr><td>B2</td><td><strong>Build and test</strong> (done)</td><td>SWE-bench style: clean worktrees, approved commands, test by test at the base and with the change, in a container</td><td>A build that fails, a new test that fails, a regression, a test removed and a false &quot;tests pass&quot; each caught</td></tr>
927
+ <tr><td>B3</td><td><strong>Trajectory</strong> (done)</td><td>Rules about the path; an exact path where chosen; a reference path matched</td><td>Another valid route passes; each rule broken is said</td></tr>
928
+ <tr><td>B4</td><td><strong>Tool calls</strong> (done)</td><td>BFCL style: expected calls with typed matchers, the relevance test, each tool's input schema, the files a coding agent may edit</td><td>Each wrong argument named; no pattern ever run</td></tr>
929
+ <tr><td>B5</td><td><strong>Statistics and held-out scenarios</strong> (done)</td><td>Paired exact test per lens, intervals, lens scores with the weakest as summary, held-out scenarios</td><td>Noise said as not known; a real regression held; held-out runs never in guidance or findings</td></tr>
930
+ <tr><td>B6</td><td><strong>Drafted scenarios, graded answers</strong> (done)</td><td>Scenarios from acceptance criteria, defects and failed runs, for a person to accept; answers a person grades</td><td>A draft that does not rest on its source refused; an ungraded answer never a pass</td></tr>
931
+ <tr><td>B7</td><td><strong>Fixes proven by the harness</strong> (done)</td><td>The contract's instruction added to a copy of the agent's prompt, proven by replays and the suite, applied by a person</td><td>A fix that works proven; one that changes nothing refuted; the project unchanged until a person applies it</td></tr>
932
+ </tbody>
933
+ </table></div>
934
+ <h2 id="its-own-section-in-forgeqe"><a href="#its-own-section-in-forgeqe" class="hash">#</a>Its own section in ForgeQE</h2>
935
+ <p>Evidence is a section of its own, not pages inside Product or Agents: in <code>forgeqe web</code> a sidebar group of its own,
936
+ and on the command line <code>forgeqe evidence …</code>. Each page arrives with the phase that fills it, never empty ahead of it:</p>
937
+ <div class="tbl"><table>
938
+ <thead>
939
+ <tr><th>Page</th><th>Shows</th><th>Arrives with</th></tr>
940
+ </thead>
941
+ <tbody>
942
+ <tr><td>Overview (<code>#/evidence</code>, built)</td><td>Every agent evaluated: its versions, recent verdicts, what keeps going wrong, what waits for a person</td><td>E1 (agents, runs, decisions, gaps), grows each phase</td></tr>
943
+ <tr><td>Agent runs (<code>#/evidence-runs</code>, built)</td><td>Each run record: the steps, decisions and inputs as a timeline, every statement with whether the record supports it, the verdict per lens with its findings</td><td>E1 (the record), E2 on (verdicts)</td></tr>
944
+ <tr><td>Contracts (<code>#/evidence-contracts</code>, built)</td><td>Each agent's contract: required steps, allowed actions, data rules, limits, hand-over; its versions and approvals</td><td>E2 (with how well each check is measured)</td></tr>
945
+ <tr><td>Knowledge</td><td>What the domain checks read: for software, the product graph (the Product page's); for a process, its policies and rules</td><td>E4 (the product graph is read; its page is the Product page)</td></tr>
946
+ <tr><td>Review queue (<code>#/evidence-review</code>, built)</td><td>Runs and outputs a person must decide, and findings a person overruled</td><td>E5</td></tr>
947
+ <tr><td>Releases (<code>#/evidence-releases</code>, built)</td><td>Scenario suites, golden sets, a version against the live one, the release gate; scenarios drafted for a person to decide, and answers waiting for a grade</td><td>E6, B6</td></tr>
948
+ <tr><td>An agent's dashboard (<code>#/evidence/&amp;lt;agent&gt;</code>, built)</td><td>Per version its runs and verdicts, each check's outcomes, what keeps going wrong, week by week, and its versions side by side; each number opens the runs it counts</td><td>E8</td></tr>
949
+ <tr><td>Learn (<code>#/evidence-learn</code>, built)</td><td>An agent's proposals for a person to decide, the causes of its findings with their replays, and the fixes the harness proved with their patches</td><td>E9, B7</td></tr>
950
+ <tr><td>Monitor (<code>#/evidence-monitor</code>, built)</td><td>Every agent evaluated (inventory); per agent its drift since its baseline, the trust its evidence supports and the level granted, and its audit to download</td><td>E10</td></tr>
951
+ </tbody>
952
+ </table></div>
953
+ <p>The same rules as the rest of the web app hold (CLAUDE.md): what a run holds is drawn as text, never as HTML; a link
954
+ from a record opens only when it is http(s); content an agent used is shown only where the record keeps it. A run is
955
+ opened only by an id the runs folder has (<code>loadRecord</code>), a file there that is not a record is named and not shown, and
956
+ control characters in a record's text are shown as their codes, on the page and in <code>forgeqe evidence show</code> (<code>visible</code>),
957
+ so a record never drives a terminal.</p>
958
+ <h2 id="decisions-taken-in-this-design"><a href="#decisions-taken-in-this-design" class="hash">#</a>Decisions taken in this design</h2>
959
+ <ul>
960
+ <li><strong>Inside ForgeQE as its own module</strong> (<code>src/evidence/</code>), with no dependency of the core (record, contract, behaviour,
961
+ decision and data checks) on software or on the product graph, so it can later stand on its own.</li>
962
+ <li><strong>The run record and the contract come first</strong>: every other check depends on them being right.</li>
963
+ <li><strong>The product model stays ForgeQE's graph files</strong>; an export to a graph database can come later.</li>
964
+ <li><strong>Open-source scorers</strong> (DeepEval, Ragas, promptfoo, Inspect) may be used for content checks behind one interface,
965
+ their licences checked first.</li>
966
+ </ul>
967
+ <h2 id="open-questions"><a href="#open-questions" class="hash">#</a>Open questions</h2>
968
+ <ul>
969
+ <li>A pilot agent and product with known right and wrong runs: the best labelled set (sample runs come first).</li>
970
+ <li>The agents to read first besides ForgeQE's own: which emit OpenTelemetry today, which only logs.</li>
971
+ <li>The bar each check must reach to gate, per check, set by its owner once measurements exist.</li>
972
+ </ul>
973
+
974
+ </article>
975
+ <nav class="pager" aria-label="Previous and next">
976
+ <a class="prev" href="../custom-agents-first-run/index.html"><small>Previous</small><span>Custom agents: a first run</span></a>
977
+ <a class="next" href="../product-knowledge/index.html"><small>Next</small><span>Product knowledge</span></a>
978
+ </nav>
979
+ </main>
980
+ <aside class="docs-toc" aria-label="On this page">
981
+ <p class="side-head">On this page</p><ul><li><a href="#principles-correctness-first">Principles (correctness first)</a></li><li><a href="#the-run-record">The run record</a></li><li><a href="#the-contract">The contract</a></li><li><a href="#the-lenses">The lenses</a></li><li><a href="#verdicts-and-findings">Verdicts and findings</a></li><li><a href="#the-lifecycle">The lifecycle</a></li><li><a href="#the-dashboard-and-benchmark-e8">The dashboard and benchmark (E8)</a></li><li><a href="#learn-e9">Learn (E9)</a></li><li><a href="#monitor-trust-and-governance-e10">Monitor, trust and governance (E10)</a></li><li><a href="#while-the-agent-is-being-built-the-harness-b1">While the agent is being built: the harness (B1)</a></li><li><a href="#build-and-test-does-the-change-work-b2">Build and test: does the change work? (B2)</a></li><li><a href="#trajectory-did-the-agent-take-a-sound-path-b3">Trajectory: did the agent take a sound path? (B3)</a></li><li><a href="#tool-calls-was-every-call-the-right-one-with-valid-inputs-b4">Tool calls: was every call the right one, with valid inputs? (B4)</a></li><li><a href="#scores-statistics-and-held-out-scenarios-b5">Scores, statistics and held-out scenarios (B5)</a></li><li><a href="#drafted-scenarios-and-graded-answers-b6">Drafted scenarios and graded answers (B6)</a></li><li><a href="#fixes-proven-by-the-harness-b7">Fixes proven by the harness (B7)</a></li><li><a href="#a-demo">A demo</a></li><li><a href="#who-decides">Who decides</a></li><li><a href="#phases">Phases</a></li><li><a href="#its-own-section-in-forgeqe">Its own section in ForgeQE</a></li><li><a href="#decisions-taken-in-this-design">Decisions taken in this design</a></li><li><a href="#open-questions">Open questions</a></li></ul>
982
+ </aside>
983
+ </div>
984
+ <footer class="foot">
985
+ <div class="container foot__row">
986
+ <a class="foot__brand" href="https://forgeqe.github.io/"><img src="../../img/wordmark-white.webp" alt="ForgeQE" width="160" height="76"><span>AI writes the code. <em>ForgeQE proves it works.</em></span></a>
987
+ <nav aria-label="Footer"><ul><li><a href="https://forgeqe.github.io/">Product</a></li><li><a href="../index.html">Docs</a></li><li><a href="https://forgeqe.github.io/security/">Security</a></li><li><a href="../../architecture-map/index.html">Architecture</a></li><li><a href="https://forgeqe.github.io/contact/">Contact us</a></li><li><a href="https://forgeqe.github.io/sample-report/">Sample report</a></li></ul></nav>
988
+ </div>
989
+ <p class="container foot__legal">© 2026 Capgemini · forgeqe.qualityai.co.uk · Built from ForgeQE's own docs</p>
990
+ </footer>
991
+ </body>
992
+ </html>