@capagents/forgeqe 2.9.3 → 2.9.5

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 (106) hide show
  1. package/HOW_TO_USE.md +78 -13
  2. package/README.md +1 -1
  3. package/dist/docs-site/docs/architecture/index.html +1 -1
  4. package/dist/docs-site/docs/index.html +66 -10
  5. package/dist/docs-site/docs/search.js +1 -1
  6. package/dist/forgeqe.js +1679 -1640
  7. package/dist/web/assets/Agent-BU8FKiQt.js +7 -0
  8. package/dist/web/assets/ApiTests-Bsv3NhD5.js +10 -0
  9. package/dist/web/assets/Browse-D-ho9bS_.js +2 -0
  10. package/dist/web/assets/{Chat-BdlfK2ra.js → Chat-czaM5kUi.js} +3 -3
  11. package/dist/web/assets/CommandPalette-CrLuxoE5.js +1 -0
  12. package/dist/web/assets/{Compare-BxUfo0rI.js → Compare-DfHMTNGi.js} +1 -1
  13. package/dist/web/assets/Cost-BYb3T8-c.js +1 -0
  14. package/dist/web/assets/Data-EF_k6c_T.js +6 -0
  15. package/dist/web/assets/Desktop-DY5Q1Sd3.js +1 -0
  16. package/dist/web/assets/DesktopReview-DFKpYor2.js +1 -0
  17. package/dist/web/assets/Evidence-Db9H4-Nu.js +1 -0
  18. package/dist/web/assets/{Explore--B18Jvg9.js → Explore-B0EkFCFe.js} +2 -2
  19. package/dist/web/assets/{Features-BerYifH7.js → Features-8jsv2A1d.js} +1 -1
  20. package/dist/web/assets/{Flags-ABMq---p.js → Flags-DtzmOA5o.js} +2 -2
  21. package/dist/web/assets/{Flaky-DKeceXsa.js → Flaky-BCzOx7Mq.js} +1 -1
  22. package/dist/web/assets/{ForceGraph-C9HFjZX3.js → ForceGraph-i1zlas5l.js} +1 -1
  23. package/dist/web/assets/Impact-Da9L1tDd.js +3 -0
  24. package/dist/web/assets/Jobs-CHw00lcx.js +5 -0
  25. package/dist/web/assets/KindPage-DiOmtzVZ.js +6 -0
  26. package/dist/web/assets/Migration-Cu4JgOj1.js +2 -0
  27. package/dist/web/assets/{Product-CgVhHMMY.js → Product-DmvUI7pH.js} +3 -3
  28. package/dist/web/assets/{Production-OdB4gZ3T.js → Production-CLoOV4jl.js} +1 -1
  29. package/dist/web/assets/{Quality-DOV4suvD.js → Quality-ylTg9e0c.js} +1 -1
  30. package/dist/web/assets/{Readiness-DawfUUHc.js → Readiness-BMD5Uj8D.js} +1 -1
  31. package/dist/web/assets/{Record-C9uAKGYM.js → Record-CoCnmfqW.js} +2 -2
  32. package/dist/web/assets/Regression-D_Hy9bMt.js +5 -0
  33. package/dist/web/assets/{Reports-BHOS6af1.js → Reports-DXphAHAy.js} +2 -2
  34. package/dist/web/assets/{Response-qfMk4Nrh.js → Response-PDQ8zEZU.js} +2 -2
  35. package/dist/web/assets/{RunDiff-BNywFV7t.js → RunDiff-C3MIKipo.js} +1 -1
  36. package/dist/web/assets/{Runs-BJPYXRiB.js → Runs-DSQZwCpE.js} +2 -2
  37. package/dist/web/assets/Steps-CY6WROAr.js +2 -0
  38. package/dist/web/assets/{TestCases-DcYY2l9q.js → TestCases-BjgWdtPi.js} +1 -1
  39. package/dist/web/assets/TestData-CDziNp2d.js +2 -0
  40. package/dist/web/assets/TestDebt-D59zFYSu.js +1 -0
  41. package/dist/web/assets/Tosca-umw1O224.js +3 -0
  42. package/dist/web/assets/{WhatsNew-CIOTidx-.js → WhatsNew-DqNMAytd.js} +1 -1
  43. package/dist/web/assets/{dataParts-CUb0Q0IZ.js → dataParts-DGVc48Ed.js} +3 -3
  44. package/dist/web/assets/{families-C9MndVzT.js → families-DlfXDoO8.js} +1 -1
  45. package/dist/web/assets/{filters-Bk7ovF3M.js → filters-NVjc0d8i.js} +1 -1
  46. package/dist/web/assets/{fold-97yBCSav.js → fold-BKAl2p_2.js} +1 -1
  47. package/dist/web/assets/frame-B0nzdTfN.js +4 -0
  48. package/dist/web/assets/index-BLUj4Sgh.js +73 -0
  49. package/dist/web/assets/index-RzPHjTCW.css +2 -0
  50. package/dist/web/assets/{logos-CbNeXLAM.js → logos-J0WPxDqj.js} +1 -1
  51. package/dist/web/assets/{palette-Dg3RS-ff.js → palette-DViz4KwG.js} +1 -1
  52. package/dist/web/assets/{parts-CPAyV15O.js → parts-W2J4TR3o.js} +1 -1
  53. package/dist/web/assets/{productParts-BpXw1jMa.js → productParts-_8gKGn4o.js} +1 -1
  54. package/dist/web/assets/{qualityParts-8TPKphgl.js → qualityParts-DnbSeK-G.js} +1 -1
  55. package/dist/web/assets/{recordTest-DvnpHsd2.js → recordTest-etYNiLQy.js} +1 -1
  56. package/dist/web/assets/{rows-BdYJLCRD.js → rows-CbXelp5_.js} +1 -1
  57. package/dist/web/assets/{segmented-DlF5rvSR.js → segmented-B7n6eLrO.js} +1 -1
  58. package/dist/web/assets/{thread-DlyX7xQt.js → thread-BIUxcjeu.js} +1 -1
  59. package/dist/web/assets/{usePageChat-Dhu3upXA.js → usePageChat-DMOtRwzT.js} +1 -1
  60. package/dist/web/index.html +4 -4
  61. package/docs/ARCHITECTURE.md +1 -1
  62. package/docs/user-guide.html +66 -10
  63. package/forgeqe.example.yaml +4 -1
  64. package/package.json +1 -1
  65. package/prompts/README.md +2 -0
  66. package/prompts/brain.md +9 -0
  67. package/prompts/business-persona.md +62 -0
  68. package/prompts/heal.md +2 -0
  69. package/prompts/page-differs.md +16 -0
  70. package/prompts/test-agent.md +4 -3
  71. package/prompts/test-rules.md +1 -10
  72. package/py/forgeqe_engine/copilot_gateway.py +31 -0
  73. package/py/forgeqe_engine/persona.py +28 -11
  74. package/py/forgeqe_engine/service.py +2 -0
  75. package/skills/bdd-gherkin/SKILL.md +141 -0
  76. package/skills/bdd-gherkin/references/cucumber-js.md +52 -0
  77. package/skills/bdd-gherkin/references/cucumber-jvm.md +54 -0
  78. package/skills/bdd-gherkin/references/python-bdd.md +50 -0
  79. package/skills/bdd-gherkin/references/reqnroll-specflow.md +83 -0
  80. package/skills/bdd-gherkin/references/review-checklist.md +37 -0
  81. package/skills/bdd-scenario-design/SKILL.md +50 -0
  82. package/skills/dynamics-365/SKILL.md +30 -15
  83. package/skills/dynamics-365-automation/SKILL.md +72 -0
  84. package/skills/dynamics-365-automation/references/elements.md +187 -0
  85. package/skills/dynamics-365-automation/references/recipes.md +97 -0
  86. package/dist/web/assets/Agent-B6xfobJ9.js +0 -4
  87. package/dist/web/assets/ApiTests-BwgezlYi.js +0 -10
  88. package/dist/web/assets/Browse-DDzk_KTh.js +0 -2
  89. package/dist/web/assets/CommandPalette-Cla7m818.js +0 -1
  90. package/dist/web/assets/Cost-Dpa8aWQG.js +0 -1
  91. package/dist/web/assets/Data-D_7m2GL6.js +0 -6
  92. package/dist/web/assets/Desktop-CgslBkAr.js +0 -1
  93. package/dist/web/assets/DesktopReview-CsW65QZz.js +0 -1
  94. package/dist/web/assets/Evidence-SYt-mbDx.js +0 -1
  95. package/dist/web/assets/Impact-DQ2c0dTT.js +0 -3
  96. package/dist/web/assets/Jobs-Dy_C2x36.js +0 -5
  97. package/dist/web/assets/KindPage-DQzstMyM.js +0 -6
  98. package/dist/web/assets/Migration-B4GWsCLR.js +0 -2
  99. package/dist/web/assets/Regression-DZdddPfI.js +0 -5
  100. package/dist/web/assets/Steps-Cdzyueit.js +0 -2
  101. package/dist/web/assets/TestData-CrzKA3xh.js +0 -2
  102. package/dist/web/assets/TestDebt-CVDJT511.js +0 -1
  103. package/dist/web/assets/Tosca-CBwGCrbL.js +0 -3
  104. package/dist/web/assets/frame-CqWJMIHh.js +0 -4
  105. package/dist/web/assets/index-ASvNRLI7.js +0 -73
  106. package/dist/web/assets/index-B5o9vY-v.css +0 -2
package/HOW_TO_USE.md CHANGED
@@ -66,6 +66,7 @@ agent:
66
66
  | building blocks, mauve | Agent builder | `forgeqe-agent-builder` | Works out a custom agent with the user: questions, plan, name | No |
67
67
  | an envelope, plum | Bug reporter | `forgeqe-bug-report` | Drafts a defect in ForgeQE itself from the person's words, and asks what it lacks | No |
68
68
  | a database drum, aqua | DB agent | `forgeqe-data` | DB agent: finds or designs the test data other agents ask for before they run | No |
69
+ | a person, head and shoulders, heather | Persona agent | `forgeqe-persona` | Persona agent: drafts a business persona (an SME, an end user, a specialist, a business user) any agent acts as or tests for | No |
69
70
  | a gavel, coral | Judge | `forgeqe-judge` | Judges domain evaluations | No |
70
71
  | a balance, amber | Model profiler | `forgeqe-model-profile` | Rates the configured models for the model router | No |
71
72
  | quote marks, rust | Content judge | `forgeqe-evidence-content` | Reads an agent's answer against what it took in, or against its owner's rubric, quoting what it rests on | No |
@@ -106,20 +107,23 @@ The icons as the shell draws them, each in its agent's colour:
106
107
  █ █ Agent builder █▀▀█ Bug reporter
107
108
  █ █ ▙▟▙▟
108
109
 
109
- ▟██▙ DB agent ▐█▙ Judge
110
- ▚▄▄▞ ▄▖▝▙
110
+ ▟██▙ DB agent ▟▙ Persona agent
111
+ ▚▄▄▞ ▟██▙
111
112
 
112
- ▄▟▙▄ Model profiler █ █ Content judge
113
- ▙▖ ▙ ▞ ▞
113
+ ▐█▙ Judge ▄▟▙▄ Model profiler
114
+ ▄▖▝▙ ▙▖ ▙
114
115
 
115
- ▛▀█▖ Scenario drafter ▀▖▗▀ Knowledge builder
116
- ▙█▄▌ ▄▝▘▄
116
+ █ █ Content judge ▛▀█▖ Scenario drafter
117
+ ▞ ▞ ▙█▄▌
117
118
 
118
- ▗▜▛▖ Investigator ▞▀▀▚ Acceptance reader
119
- ▝▄▄▙ ▙██▟
119
+ ▀▖▗▀ Knowledge builder ▗▜▛▖ Investigator
120
+ ▄▝▘▄ ▝▄▄▙
120
121
 
121
- ▗▚▞▖ Change reader ▛▀▀▜ Browser agent
122
- ▝▞▚▘ ▙▄▄▟
122
+ ▞▀▀▚ Acceptance reader ▗▚▞▖ Change reader
123
+ ▙██▟ ▝▞▚▘
124
+
125
+ ▛▀▀▜ Browser agent
126
+ ▙▄▄▟
123
127
  ```
124
128
  <!-- subagents:end -->
125
129
 
@@ -138,6 +142,7 @@ Everything ForgeQE can do, by area. ForgeQE's agent answers "can you…?" questi
138
142
  | Test cases | **Write test cases from a story**: Writes test cases from an understanding of the feature, not only a story's acceptance criteria: it reads the feature and epic above the story, their other stories, linked Confluence pages, the RAG service, product knowledge, the app's pages and flows in page memory, and the area's past defects (from earlier runs and the tracker's bugs), then analyses each criterion before it designs cases. Each case names what it covers, and nothing is saved while a criterion has no case or reason. Saves them in Azure DevOps or Jira, linked to the story. Reads the cases already linked first, so asking again adds only what is missing and updates cases in place instead of duplicating them; plans end-to-end journeys from the existing cases. | `story_test_cases`, `save_test_cases`, `link_test_case`, `apply_case_changes`, `trace_criteria`, `requirements_file`, `e2e_journey` | [docs](#where-cases-come-from) |
139
143
  | Test cases | **Domain and regulatory test design**: Every agent works as an expert in the product's industry would, automatically: the risks the industry is known for and the obligations of its regulations and standards (for example DORA, PSD2, GDPR, ISO 27001), declared in forgeqe.yaml or worked out from the story and the application. It applies to analysing requirements, writing and checking test cases, exploration, writing, reviewing, and healing test code, API tests, finding tests, and pull request reviews, labelled so coverage can be traced and citing only the control ids in the team's compliance file. forgeqe eval domain measures how well the agent does it. | | [docs](#16-domain-and-regulations) |
140
144
  | Test cases | **Exploratory testing of a story**: Explores a story in real browsers beyond its scripted cases (edge cases, invalid input, boundaries, roles, state), confirms each defect by reproducing it, proposes test cases, and files bugs once the user agrees. | `explore_story` | [docs](#exploratory-testing-from-a-story) |
145
+ | Test cases | **Business personas for testing**: Personas that test the software the way the business would: a subject matter expert (a payments SME who checks refunds, settlement cut-offs and currency rounding), an end user, a specialist (compliance) or a business user (an operations manager with approval limits). The Persona agent drafts a new one from your words; any agent then acts as it in a browser run, designs test cases from what it validates, or reviews a feature through its eyes. Kept in the project for every agent. | `business_persona` | [docs](#business-personas) |
141
146
  | Setup | **Test environments and their apps**: Knows the test environments in env.yaml (QA, UAT, …) and each one's apps: web apps and APIs by URL, Windows desktop apps, and mobile apps, with what each is for. Every agent works from the active one; switches environment on request, picks the apps a scenario needs, and carries values such as an order number from one app to the next. | `test_apps`, `use_environment` | [docs](#environments-and-apps) |
142
147
  | Desktop | **Automate Windows desktop apps**: Carries out a plain-language goal in a Windows thick-client app with UFO² and saves it as a workflow with checks of the outcome, or records the steps a tester does by hand, with no model; replays saved workflows with no model, healing a step whose control moved, and fixes a workflow from chat (a timeout, a wait, a dialog to dismiss) after showing the change. Apps and the secrets they may type come from env.yaml or forgeqe.yaml desktop:. | `desktop_explore`, `desktop_record`, `desktop_replay`, `desktop_edit_workflow`, `desktop_manage` | [docs](#desktop-apps-windows) |
143
148
  | Mobile | **Automate Android and iOS apps**: Carries out a plain-language goal in an Android or iOS app through Appium and saves it as a mobile workflow with checks of the outcome; replays workflows with no model on Appium (healing a moved control) or Maestro; runs the team's own Maestro flows after checking them against an allowlist; uploads an app build to TestMu AI and saves its lt:// id as the app's build. Apps come from env.yaml (kind: mobile) or forgeqe.yaml mobile:. | `mobile_explore`, `mobile_replay`, `mobile_maestro`, `mobile_upload` | [docs](#mobile-apps-android-ios) |
@@ -1120,7 +1125,7 @@ A card says which it did and why (*Extending PracticeTests.Flow · covers 12 of
1120
1125
 
1121
1126
  **Why a test failed.** When ForgeQE's run of Scribe's test fails, the ✗ line and the next attempt say why in the test's own words: dotnet test's Error Message, pytest's `E` lines, or the error with its Expected and Received values (Playwright, Jest, JUnit), not the runner's summary line.
1122
1127
 
1123
- **Keeping Scribe's cost down.** ForgeQE reads the repository's test setup itself before Scribe starts (stack, settings files and their browser values, the test id attribute, base classes, page objects and their methods, one test command) and hands it over, so Scribe does not discover it with dozens of file reads. Each attempt after the first starts a fresh session from a summary of the job (handoff, files changed, what each attempt did, the latest failure), so later attempts cost about what the first did. The summary has a "Tried already, and did not work" list: for each failed attempt, what Scribe said it did (it reports each change in `tried`), how it failed, the locator the test was waiting for and the element that covered it and took the click, both read from the test's output, and whether an earlier attempt already failed on that locator. Scribe must not try those again in the same form and must say what it does differently. `forgeqe heal` keeps the same list across its attempts. `code.max_attempts` (default 3) and `code.max_tokens` (default 1,500,000; `0` turns it off) cap a job, and the token budget is checked during an attempt too, so one long attempt is stopped when the total passes it. Cached input counts at its share of the profile's input price (a session re-reads its own context, and that is most of its input), and in full when no cached price is known, such as with another `code.model`. The reviewer sorts its issues into correctness (the test does not test what the goal says, or not reliably) and coding standards (test data or credentials in a page object, naming, hard waits, leftovers). Coding standards never fail a test that works: it is accepted, and the coding agent gets one more round (not counted in `max_attempts`) to fix them; if that round breaks the test, ForgeQE puts back the version that passed and lists the standards issues in the notes (`code.tidy: false` skips the round). A test the reviewer rejects twice for correctness stops the job with its issues, since that usually means the test case and the page disagree. When a test passed and the reviewer sent it back, and the changes for the review then break it (or the attempts or the token budget run out first), ForgeQE puts back the version that passed: the result is passed but not approved, with the reviewer's issues in the notes, so you get a working test to finish instead of none. Under each step, the handoff shows that step's part of the page (its section and neighbours, from the replay's page snapshot) instead of whole snapshots. When a test fails, ForgeQE shows the failing element on the test's page at the failure and on the replay's page, so most failures are fixed without opening a browser. Scribe's live browser is switched on only when the same failure repeats, and it does not send a page snapshot after every click or keystroke. `code.max_steps` (default 50) caps the tool calls in one of Scribe's turns. `code.review_profile` runs the reviewer on a cheaper llms.json profile.
1128
+ **Keeping Scribe's cost down.** ForgeQE reads the repository's test setup itself before Scribe starts (stack, settings files and their browser values, the test id attribute, base classes, page objects and their methods, one test command) and hands it over, so Scribe does not discover it with dozens of file reads. Each attempt after the first starts a fresh session from a summary of the job (handoff, files changed, what each attempt did, the latest failure), so later attempts cost about what the first did. The summary has a "Tried already, and did not work" list: for each failed attempt, what Scribe said it did (it reports each change in `tried`), how it failed, the locator the test was waiting for and the element that covered it and took the click, both read from the test's output, and whether an earlier attempt already failed on that locator. Scribe must not try those again in the same form and must say what it does differently. `forgeqe heal` keeps the same list across its attempts. `code.max_attempts` (default 3) and `code.max_tokens` (default 1,500,000; `0` turns it off) cap a job, and the token budget is checked during an attempt too, so one long attempt is stopped when the total passes it. Cached input counts at its share of the profile's input price (a session re-reads its own context, and that is most of its input), and in full when no cached price is known, such as with another `code.model`. The reviewer sorts its issues into correctness (the test does not test what the goal says, or not reliably) and coding standards (test data or credentials in a page object, naming, hard waits, leftovers). Coding standards never fail a test that works: it is accepted, and the coding agent gets one more round (not counted in `max_attempts`) to fix them; if that round breaks the test, ForgeQE puts back the version that passed and lists the standards issues in the notes (`code.tidy: false` skips the round). A test the reviewer rejects twice for correctness stops the job with its issues, since that usually means the test case and the page disagree. When a test passed and the reviewer sent it back, and the changes for the review then break it (or the attempts or the token budget run out first), ForgeQE puts back the version that passed: the result is passed but not approved, with the reviewer's issues in the notes, so you get a working test to finish instead of none. Under each step, the handoff shows that step's part of the page (its section and neighbours, from the replay's page snapshot) instead of whole snapshots. When a test fails, ForgeQE shows the failing element on the test's page at the failure and on the replay's page, so most failures are fixed without opening a browser. Scribe's live browser is switched on only when the same failure repeats, or from the start when ForgeQE's own replay got through the flow in no setup (Scribe would otherwise patch the failing steps blind until a test ran), and it does not send a page snapshot after every click or keystroke. `code.max_steps` (default 50) caps the tool calls in one of Scribe's turns. `code.review_profile` runs the reviewer on a cheaper llms.json profile.
1124
1129
 
1125
1130
  **Scribe's rulebook: the same mistake once.** When a job passes after a failed test run or a reviewer's change, Scribe's report gives up to three one-line rules that would have avoided the mistake ("Wait for the cart badge with toHaveText before clicking Checkout; it updates after a request"). ForgeQE keeps them in `.forgeqe/scribe-rules.json` in the repository, and every attempt of later jobs, and every healing session, starts with them. A lesson from a job that did not pass, or that passed at once, is not kept: only a fix that worked becomes a rule. The book stays small, since it is sent with each model call: at most 15 rules of one line each; a lesson learned again is merged into its rule (shown as "learned 3 times") instead of added; when it is full, the rule confirmed least and longest ago goes, and a rule not learned again for 180 days expires. The rules are the coding agent's own words, so a rule with a link, something like a token, a destructive command, or wording that tells an agent to drop its instructions is refused, and the agents are told they are hints that never override their instructions or the team's guardrails. Commit the file to share the rules with the team and see each change in review; edit or delete a rule there (the agents cannot change `.forgeqe`). ForgeQE says each new rule as it learns it (`Learned for next time: …`). `code.rulebook: false` turns it off.
1126
1131
 
@@ -1625,6 +1630,8 @@ code:
1625
1630
  max_attempts: 5 # test runs before giving up
1626
1631
  test_timeout_seconds: 600 # per test run
1627
1632
  stall_after: 5 # stop the agent's turn when one command it runs has failed this many times
1633
+ repeat_after: 6 # stop its turn after this many look-ups answered as before (a file re-read unchanged, the same diff)
1634
+ edit_after: 8 # stop its turn after this many edits to files it already changed, with no test run in between
1628
1635
  replay: true # before the agent starts, run the steps as a Playwright script and hand over what worked
1629
1636
  live_browser: true # once a step fails, the agent looks at that page in a Playwright browser
1630
1637
  graph: true # the code graph: find page objects without reading files, and reuse what already locates an element
@@ -1644,7 +1651,9 @@ What happens after the run passes:
1644
1651
 
1645
1652
  Before Scribe starts, ForgeQE reads the repo into a **code graph**, without a model: every class, page object, method, property, and test (TypeScript, JavaScript, C#, Java, Python), the calls between them, and the locators each one builds, in any framework's spelling (Playwright, Selenium, Cypress, WebdriverIO, Testing Library). It is kept in `~/.forgeqe/cache/code-graph`, nothing leaves the machine, and the next job reads again only the files that changed. The graph is tied to page memory, which knows each element by all its locators (its id, role and name, text, test id): so when the run clicked `getByRole('button', { name: 'Login' })` and the repo's `LoginPage.LoginButton` uses `#login-button`, the handoff says under that step "in this repository: LoginPage.LoginButton … used by LoginPage.SignInAsync", and Scribe calls the existing method instead of writing a second locator. Scribe also gets tools that answer from the graph instead of grep and whole-file reads: `code_find` (classes, methods, and tests by name, or by the text a locator uses), `code_outline` (a file's or class's signatures and locators, or the source of one member), `code_element` (which member already locates an element), `code_references` (what calls a member, before it is changed), and `code_impact` (the tests a change reaches, through flows and base classes, whatever the test files are called). `graph: false` turns it off. The handoff also outlines the page objects its steps use and includes the repo's test that uses the most of them, so Scribe takes the test conventions from that test instead of reading other tests, and reads a settings file only to change it.
1646
1653
  4. It writes the test from the handoff and the replay script: steps that worked are ported with their locators, steps that failed are fixed first. Every locator, including those for assertions, comes from the replay script, the page snapshots, page memory, or a check on the page; steps where the browser agent ran JavaScript to look around are left out. It does not walk the flow again or build tests to explore. Once a step fails (in the replay, or in its test), ForgeQE switches on its live browser: a Chrome that Playwright drives, set up like ForgeQE's, where it looks at the failing step's page one tool call per action (open, snapshot, click, type, wait, screenshot, run JavaScript, console errors, failed requests). Until then the live browser tools are off, so no tokens go into looking at pages that work. The live browser needs Node.js (`npx`), and Microsoft's Playwright MCP server is downloaded on first use; with `live_browser: false`, or without `npx`, it looks with a small throwaway script instead. When its browser gets a different page than ForgeQE's did (an error, a challenge, a control that will not open), it compares the two browsers (user agent, `navigator.webdriver`, headless, failed requests and CORS errors, headers the framework adds, console errors) and fixes the difference in the repo's browser configuration. It never judges the site with `curl` or `webfetch`.
1647
- 5. Scribe does not run the test itself: it may build or compile, then reports the test file and the command that runs only that test, and ForgeQE runs it. If one command it runs fails `stall_after` times in a row within its work (the same build again and again, say), ForgeQE stops that turn and sends the command and its last output back, asking it to change approach. If the same command stalls again, the job stops as a failure with that output in the notes.
1654
+ 5. Scribe does not run the test itself: it may build or compile, then reports the test file and the command that runs only that test, and ForgeQE runs it. If one command it runs fails `stall_after` times in a row within its work (the same build again and again, say), ForgeQE stops that turn and sends the command and its last output back, asking it to change approach. If the same command stalls again, the job stops as a failure with that output in the notes. The same goes for going round in circles: re-reading files, outlines or `git diff` it has already seen, unchanged, `repeat_after` times, or changing files it already changed `edit_after` times without handing the test over, or making 3 edits that fail because the file no longer has the lines it expected (it then reads the file once and edits from that). Its turn stops and it is asked for the test, which ForgeQE then runs; if it does it again, the job stops.
1655
+
1656
+ Every model call sends the whole conversation again, so ForgeQE keeps conversations short. Each attempt after the first, a rerun of a job that stopped while writing, and carrying on after you raise the token budget all start a new session from a brief: the handoff, the plan, the notes, and the files the job wrote as they are now. For a recording, what the planner already looked up in the code goes to Scribe too, and the planner's tokens count toward `max_tokens`. When a session's calls are mostly re-sent in full rather than read from the model's cache, ForgeQE says so once. At the token budget, the question says whether ForgeQE has run the test yet; an unattended write never asks and stops there. A job that stops says whether a test ever ran and which files it left changed in the repository.
1648
1657
  6. ForgeQE runs that command (with `CI=1`) and checks the exit code, and it watches the processes the command starts for a browser launched by Playwright, Puppeteer, Selenium, or Cypress. On a failure it sends the command, exit code, and output back to Scribe. The output is kept short so the error is never cut off: the page dump Playwright puts into a failed assertion ("Aria snapshot:", often thousands of lines) is taken out and saved as `<run>/test-runs/attempt-N-page.aria.yml`, then the start (where the first error and its stack trace are) and the end (the summary) are sent; the full output is in `<run>/test-runs/attempt-N.log`, and the prompt names both files. A command that exits 0 without starting a browser also goes back: the test must drive the app in a browser. If the repo's browser runs on another machine (Selenium Grid, a cloud service, a container), the agent says where and the check is skipped.
1649
1658
  7. A passing test then goes to a separate reviewer agent, which can read files and `git diff` but not change anything. It checks the change against the goal and the test rules: every part of the goal done through the page and asserted, generic page objects with data in the test, no values or URLs copied from the run, browser settings in the repo's configuration, no leftover files. The changed files come inline in its prompt, so it reads nothing again, and it does not ask to replace locators or texts that came from the replay or the checks, since those matched the live site. It judges only what this job changed: ForgeQE records the working tree before the job, so your uncommitted edits, your untracked files, and ForgeQE's own files (`.forgeqe/`, `forgeqe.yaml`, `llms.json`) are never part of the review. It checks the diff of every file that existed before the job: removing or rewriting an existing test, even a commented-out one, is a correctness problem. Credentials come from the environment, except a public demo login that the application itself shows to anyone (such as the logins on saucedemo.com's sign-in page), which may stay in the repo's test data. It gets the outlines of the classes the changed code uses, the repo's browser settings, and the same `code_*` tools, so it checks reuse and settings without reading those files. The code graph also tells it what the job added that it can check in the code: a new member that locates an element an existing member already locates (to reuse instead), and new XPath or position-based locators. If it finds problems, they go back to Scribe as the next attempt. The terminal shows the exchange as it happens, in order: the reviewer's verdict with its reason and each issue (✗ correctness, ~ coding standard) with the file and the fix it asks for; then why Scribe tries again and what it is fixing (the reviewer's issues, or the test's first error); then what Scribe says it did and which files it changed; then the next verdict:
1650
1659
 
@@ -3898,6 +3907,62 @@ A persona file can come from the repository, so ForgeQE reads it strictly: only
3898
3907
 
3899
3908
  A simulated persona is not a real user, and automated checks find only part of the problems: treat the result as a first pass, and confirm important barriers with people who use assistive technology.
3900
3909
 
3910
+ ### Business personas
3911
+
3912
+ A **business persona** is a person who validates the software the way the business does: a **subject matter expert** (a payments SME who checks refunds, settlement cut-offs and currency rounding), an **end user** (an everyday customer, a first-time user), a **specialist** (a KYC and AML compliance reviewer) or a **business user** (an operations manager with approval limits). Each persona says who the person is, what they want, what they know, and above all **what they check before they accept the software** (`validates`). Any agent can use one:
3913
+
3914
+ - **The Orchestrator** makes personas too ("create a persona of an SME in payments"), with the Persona agent, and acts as a persona in a browser run (the persona's brief goes at the start of the goal), designs test cases from what it validates, or reviews a feature through its eyes: "test the refund flow as a payments SME", "write test cases for checkout as a first-time user".
3915
+ - **Other agents** (`forgeqe mcp` clients such as Claude Code or Copilot, and custom agents) call the `business_persona` tool: `op: list`, `op: get` (the persona and its brief), or `op: create`.
3916
+ - **A person** at a terminal:
3917
+
3918
+ ```bash
3919
+ forgeqe persona # the personas: built in, and the project's
3920
+ forgeqe persona show payments-sme # one persona and the brief agents act on
3921
+ forgeqe persona create "an SME in card payments who reconciles settlements" --domain payments --kind sme [--save]
3922
+ ```
3923
+
3924
+ Built in: `payments-sme` (`/priya`), `retail-customer` (`/sam`), `compliance-specialist` (`/dana`), `operations-manager` (`/lee`), `first-time-user` (`/alex`).
3925
+
3926
+ **Every persona is a command in every agent's chat.** Start a message with it and the task: `/priya Validate the payment change`. It works in the terminal shell (typing `/` suggests the personas with the shell's commands), `forgeqe run "/priya …"`, every chat box of the web app (typing `/` at the start offers the personas) and a custom agent's chat. ForgeQE turns the command into the persona's brief, quoted as data, and your task after it, so the agent acts as that person, puts the brief at the start of its browser runs, and judges the app by what they check. A persona's command is its `handle` (its id when it has none): a word of lower-case letters, digits and dashes that is never one of the shell's own commands or another persona's.
3927
+
3928
+ ```bash
3929
+ forgeqe persona export --out personas.json # your own personas, as a file to share
3930
+ forgeqe persona import personas.json # another project's: new ones only, never replacing one here
3931
+ ```
3932
+
3933
+ **Sharing personas:** the Persona agent's page (Personas tab) has Export and Import, and so does `forgeqe persona export|import`. The file is JSON of the personas' fields. An import is checked as strictly as a persona file. The whole file is refused when any persona in it is refused, and a persona whose id or command this project already has is skipped and listed, never replaced.
3934
+
3935
+ **In the web app**, the Persona agent's page (Agents, Persona agent) opens on its **Agent** tab: describe a person in your words ("a compliance officer who reviews every refund over 10,000 EUR") and the agent turns them into a persona in the conversation, shows it, and asks before saving it. **Personas** lists every persona by kind; open one to read what it checks and **Run as this persona**: say what they should try and a chat starts as them. **New persona** has the Persona agent draft one from your words (or write it yourself), lets you change every field, and saves it when you press Save.
3936
+
3937
+ **The Persona agent** (`forgeqe-persona`) drafts a new persona from your words: ask "create a persona of an SME in payments", or `op: create` with `request`. It has no tools and answers in a fixed shape; ForgeQE keeps only the persona's fields, checked. A draft is shown first and saved only when you agree (`--save` asks in a terminal; `save: true` asks in the shell and the web app). It needs a live model; without one, write the persona yourself.
3938
+
3939
+ **Your own personas** are `.forgeqe/business-personas/<id>.yaml`, shared with everyone who uses the repository. Saving one also writes its profile as `<id>.md` beside it, made from its fields, for people and agents that read the project's documents. The YAML is the persona; the `.md` is written again whenever the persona is saved:
3940
+
3941
+ ```yaml
3942
+ id: merchant-onboarding-sme
3943
+ handle: omar # its command in any agent's chat: /omar Validate the merchant onboarding change
3944
+ name: Omar, merchant onboarding SME
3945
+ kind: sme # sme, end_user, specialist, business_user
3946
+ role: Merchant onboarding lead
3947
+ domain: payments
3948
+ expertise: expert # novice, intermediate, expert
3949
+ description: Onboards new merchants and sets their fees and payout schedules.
3950
+ goals:
3951
+ - onboard a merchant in one session
3952
+ knows:
3953
+ - merchant category codes
3954
+ - payout schedules and reserves
3955
+ validates:
3956
+ - a merchant cannot take payments before KYC is approved
3957
+ - the fee shown at onboarding is the fee charged on the first payout
3958
+ frustrations:
3959
+ - having to enter the same company details twice
3960
+ scenarios:
3961
+ - Onboard a merchant and take its first test payment
3962
+ ```
3963
+
3964
+ A persona file can come from the repository, so ForgeQE reads it strictly: only these keys, each choice from its list, no YAML aliases, every text one line and clipped, at most 12 items in a list, a regular file only (no link), and a text that reads as an instruction to an agent ("ignore the rules", "run this command") is refused. A persona only describes a person: it never changes what an agent may do. These personas are separate from the accessibility personas (`.forgeqe/personas`), which set how the browser perceives the page.
3965
+
3901
3966
  ### Visual comparison
3902
3967
 
3903
3968
  Every browser run also captures each page it visits and compares it, pixel by pixel, with that page's **approved baseline**:
@@ -4404,7 +4469,7 @@ agents: [browser]
4404
4469
 
4405
4470
  | Source | Folder |
4406
4471
  |--------|--------|
4407
- | Built-in | the `skills/` folder ForgeQE ships: `playwright-typescript`, `dotnet-nunit-playwright` and `testcontainers` (Scribe), `azure-sdk-testing`, `aws-sdk-testing` and `gcp-sdk-testing` (Scribe and ForgeQE's agent), `dynamics-365` (browser), `writing-skills` (ForgeQE's agent) |
4472
+ | Built-in | the `skills/` folder ForgeQE ships: `playwright-typescript`, `dotnet-nunit-playwright`, `bdd-gherkin` and `testcontainers` (Scribe), `bdd-scenario-design` (ForgeQE's agent: asks about Examples, Background and Rule before a BDD test, and passes the answers to `write_test` as `bdd`), `azure-sdk-testing`, `aws-sdk-testing` and `gcp-sdk-testing` (Scribe and ForgeQE's agent), `dynamics-365` (browser), `dynamics-365-automation` (Scribe: D365 control names and locators, steps per control, EasyRepro), `writing-skills` (ForgeQE's agent) |
4408
4473
  | Global, only with `skills.external: true` | `~/.claude/skills`, `~/.agents/skills`, and the repo's `.claude/skills` and `.agents/skills` |
4409
4474
  | User | `~/.forgeqe/skills` (or `$FORGEQE_HOME/skills`) |
4410
4475
  | Project | `.forgeqe/skills` next to `forgeqe.yaml`, and the repo's own `.forgeqe/skills` |
package/README.md CHANGED
@@ -141,7 +141,7 @@ A new goal on a site ForgeQE knows replays the start it shares with an earlier g
141
141
 
142
142
  ## Skills
143
143
 
144
- Skills teach the agents what a prompt can't know: your repo's test conventions, a framework, or how to drive an app. A skill is a folder with a `SKILL.md` (the Agent Skills format: `name`, `description`, then instructions), plus ForgeQE's `agents: [forgeqe, scribe, browser]` to say who uses it. ForgeQE ships `playwright-typescript`, `dotnet-nunit-playwright` and `testcontainers` for Scribe, `azure-sdk-testing`, `aws-sdk-testing` and `gcp-sdk-testing` for Scribe and ForgeQE's agent (code that uses a cloud SDK: emulators first, the default credential chain, cleanup of only what a test made), `dynamics-365` for the browser agent, and `writing-skills` for ForgeQE's agent. Your own go in `.forgeqe/skills` next to `forgeqe.yaml` (commit them) or `~/.forgeqe/skills`; a project skill replaces a built-in one with the same name. Skills in `~/.claude/skills` and `~/.agents/skills` are used only with `skills.external: true`.
144
+ Skills teach the agents what a prompt can't know: your repo's test conventions, a framework, or how to drive an app. A skill is a folder with a `SKILL.md` (the Agent Skills format: `name`, `description`, then instructions), plus ForgeQE's `agents: [forgeqe, scribe, browser]` to say who uses it. ForgeQE ships `playwright-typescript`, `dotnet-nunit-playwright`, `bdd-gherkin` (Reqnroll, SpecFlow, Cucumber, behave and pytest-bdd: Gherkin, step reuse and page objects behind steps) and `testcontainers` for Scribe, `bdd-scenario-design` for ForgeQE's agent (it asks whether you want a Scenario Outline with Examples, a Background or Rule blocks before a feature file is written), `azure-sdk-testing`, `aws-sdk-testing` and `gcp-sdk-testing` for Scribe and ForgeQE's agent (code that uses a cloud SDK: emulators first, the default credential chain, cleanup of only what a test made), `dynamics-365` for the browser agent (D365's own names for its controls: Quick Find, lookups and Advanced lookup, the command bar's More commands, Quick Create, the header flyout, business process flows), `dynamics-365-automation` for Scribe (a catalogue of D365 controls and their stable locators from Microsoft's EasyRepro, steps for each control, page objects, waiting for the app to be idle, and EasyRepro's API), and `writing-skills` for ForgeQE's agent. Your own go in `.forgeqe/skills` next to `forgeqe.yaml` (commit them) or `~/.forgeqe/skills`; a project skill replaces a built-in one with the same name. Skills in `~/.claude/skills` and `~/.agents/skills` are used only with `skills.external: true`.
145
145
 
146
146
  Each agent sees the skills meant for it and loads the ones whose description fits the job. For browser runs, ForgeQE's agent passes the skills a goal needs; in `forgeqe suite`, `monitor` and `run --direct` the engine picks them from the goal once, and `--skill NAME` (or `--skill none`) fixes the list. Reports and `run.json` show which skills a run used.
147
147
 
@@ -318,7 +318,7 @@
318
318
  <tr><td><code>loop.ts</code> (retries)</td><td>Each failed attempt (a failed run, a run that opened no browser, a rejected review) adds a <code>Tried</code> entry: Scribe's <code>tried</code> items from its result (else its notes), the failure, and <code>failureFacts</code> of the output (the last &quot;waiting for&quot; locator of Playwright's call log, and the element that &quot;intercepts pointer events&quot;), with <code>again</code> when an earlier entry failed on the same locator. <code>nextAttemptPrompt</code> renders them with <code>triedSection</code>; <code>runHeal</code> keeps the same list from each test's <code>reason</code> and passes it to <code>healNextPrompt</code>. The attempt log, and so <code>scribe-mistakes.jsonl</code>, uses the <code>tried</code> items too</td></tr>
319
319
  <tr><td><code>notes.ts</code></td><td><code>scribe-notes.json</code> in <code>memory.dir</code>: per repository, the reading turn's notes (<code>saveNotes</code>), when they were written, and up to 15 tests jobs wrote there (<code>addWrittenTest</code> on approval). <code>readNotes</code> returns nothing past 30 days; <code>notesSection</code> renders them for the first prompt</td></tr>
320
320
  <tr><td><code>worktree.ts</code></td><td>The working tree before the job (<code>git status --porcelain -uall</code> with a hash of each file, and a copy of each file up to 5 MB, plus ForgeQE's <code>forgeqe.yaml</code> and <code>llms.json</code>); the paths the job changed since then; putting back files the job deleted or uncommitted edits it reverted to the committed version; and the protected paths in the form the agent runtime matches them</td></tr>
321
- <tr><td><code>loop.ts</code></td><td>The attempt loop, stop handling, the replay (<code>code.replay</code>, on by default in <code>forgeqe.yaml</code>: <code>replayRun</code> runs while Scribe reads the repo, then the handoff is rebuilt with the replay and the result goes to <code>code.json</code> <code>replay</code>; skipped when <code>canReplay</code> finds no step beyond navigation and no checks), the reading turn (<code>READ_AGENT</code>, no structured answer, with or without a replay; skipped when <code>readNotes</code> has notes for the repo, which go into the first prompt instead; its reply is saved as the notes), the live browser (<code>code.live_browser</code>, on by default in <code>forgeqe.yaml</code>; its tools are off until the replay or a test run fails, a stall, a no-browser run, or a blocked report, and the prompt that switches them on says so), the stall guard (<code>code.stall_after</code>, default 5; counts reset after each ForgeQE test run), <code>code.json</code> (the run folder is recreated if it is gone, and a failed write is reported without changing the result), and resuming: <code>scribe-session.json</code> in the run folder (session id, repo, stage <code>reading</code>/<code>writing</code>, whether the live browser is on) is written when the session opens and updated as the job goes, and removed when the job ends with a result; after a stop, a crash, or a <code>ProviderAuthError</code>/<code>APIError</code> it stays, and a rerun for the same run and repo passes it as <code>openSession</code>'s <code>resume</code>. A reopened session skips the reading turn, takes <code>savedReplay</code> when the replay finished, and starts with <code>carryOnPrompt</code> (or <code>RESUMED_NOTE</code> plus the first prompt when it was still reading)</td></tr>
321
+ <tr><td><code>loop.ts</code></td><td>The attempt loop, stop handling, the replay (<code>code.replay</code>, on by default in <code>forgeqe.yaml</code>: <code>replayRun</code> runs while Scribe reads the repo, then the handoff is rebuilt with the replay and the result goes to <code>code.json</code> <code>replay</code>; skipped when <code>canReplay</code> finds no step beyond navigation and no checks), the reading turn (<code>READ_AGENT</code>, no structured answer, with or without a replay; skipped when <code>readNotes</code> has notes for the repo, which go into the first prompt instead; its reply is saved as the notes), the live browser (<code>code.live_browser</code>, on by default in <code>forgeqe.yaml</code>; its tools are off until the replay or a test run fails, a stall, a no-browser run, or a blocked report, and the prompt that switches them on says so), the stall guard (<code>code.stall_after</code>, default 5; counts reset after each ForgeQE test run), the loop guards (<code>code.repeat_after</code>, default 6: <code>RepeatedLooks</code>, look-ups whose answer is unchanged; <code>code.edit_after</code>, default 8: <code>RepeatedEdits</code>, edits to files already changed, and <code>FAILED_EDITS_AFTER</code> (3) edits that failed on lines the file no longer has; all reset after each test run, and each kind of loop gets <code>loopPrompt</code> once, then the job stops; a stop's notes say whether a test ever ran and which files were left changed (<code>stopFacts</code>), and its <code>test</code> event has <code>ran: false</code>), <code>code.json</code> (the run folder is recreated if it is gone, and a failed write is reported without changing the result), and resuming: <code>scribe-session.json</code> in the run folder (session id, repo, stage <code>reading</code>/<code>writing</code>, whether the live browser is on) is written when the session opens and updated as the job goes, and removed when the job ends with a result; after a stop, a crash, or a <code>ProviderAuthError</code>/<code>APIError</code> it stays, and a rerun for the same run and repo passes it as <code>openSession</code>'s <code>resume</code>. The session file also keeps the files the job changed (<code>changed</code>, saved after every edit, read back by <code>carriedPaths</code>). A rerun of a job that stopped while writing opens a fresh session whose first message is <code>brief(carriedOnTask)</code>; one that stopped while reading reopens its session with <code>RESUMED_NOTE</code> plus the first prompt. Either skips the reading turn and takes <code>savedReplay</code> when the replay finished. <code>brief</code> (the job's target or existing test, environment, notes, plan, <code>planFindings</code>, handoff, attempts and files) also starts every later attempt and the session after a raised budget (<code>BUDGET_RAISED</code>)</td></tr>
322
322
  </tbody>
323
323
  </table></div>
324
324
  <p><strong>Config.</strong> The whole agent runtime config is passed through the environment, so nothing is written into the repo. Keys are <code>{env:NAME}</code> references, never values. Profile mapping:</p>
@@ -151,7 +151,7 @@ forgeqe docs --copy ./docs # copy the guide, the architecture page, the refere
151
151
  </div>
152
152
  <h3 class="band-title">Every feature</h3>
153
153
  <div class="area"><a href="#area-browser" class="area-name"><span class="mono">Browser</span></a><ul class="tiles"><li><a href="#cap-browser-goals" class="tile"><b>Run any goal in a real browser</b><span>Go to booking.com and search hotels in Mumbai for next weekend</span></a></li><li><a href="#cap-logins" class="tile"><b>Saved logins for the application under test</b><span>Sign in to the admin site and keep the session</span></a></li><li><a href="#cap-record-web" class="tile"><b>Record a web test by hand</b><span>I'll show you the checkout steps in the shop: record them</span></a></li></ul></div>
154
- <div class="area"><a href="#area-test-cases" class="area-name"><span class="mono">Test cases</span></a><ul class="tiles"><li><a href="#cap-run-test-cases" class="tile"><b>Run manual test cases in browsers</b><span>Run SHOP-12 and SHOP-14 from Jira, two browsers at once</span></a></li><li><a href="#cap-test-case-quality" class="tile"><b>Check and improve test cases</b><span>Are the cases in test plan 12 good enough to run?</span></a></li><li><a href="#cap-write-test-cases" class="tile"><b>Write test cases from a story</b><span>Write test cases for story 1234 and save them</span></a></li><li><a href="#cap-domain-compliance" class="tile"><b>Domain and regulatory test design</b><span>Write test cases for story 1234, covering our DORA and PSD2 obligations</span></a></li><li><a href="#cap-exploratory-testing" class="tile"><b>Exploratory testing of a story</b><span>Explore story 1234 and find bugs</span></a></li></ul></div>
154
+ <div class="area"><a href="#area-test-cases" class="area-name"><span class="mono">Test cases</span></a><ul class="tiles"><li><a href="#cap-run-test-cases" class="tile"><b>Run manual test cases in browsers</b><span>Run SHOP-12 and SHOP-14 from Jira, two browsers at once</span></a></li><li><a href="#cap-test-case-quality" class="tile"><b>Check and improve test cases</b><span>Are the cases in test plan 12 good enough to run?</span></a></li><li><a href="#cap-write-test-cases" class="tile"><b>Write test cases from a story</b><span>Write test cases for story 1234 and save them</span></a></li><li><a href="#cap-domain-compliance" class="tile"><b>Domain and regulatory test design</b><span>Write test cases for story 1234, covering our DORA and PSD2 obligations</span></a></li><li><a href="#cap-exploratory-testing" class="tile"><b>Exploratory testing of a story</b><span>Explore story 1234 and find bugs</span></a></li><li><a href="#cap-business-personas" class="tile"><b>Business personas for testing</b><span>Create a persona of an SME in payments</span></a></li></ul></div>
155
155
  <div class="area"><a href="#area-setup" class="area-name"><span class="mono">Setup</span></a><ul class="tiles"><li><a href="#cap-test-apps" class="tile"><b>Test environments and their apps</b><span>Place an order in the shop, then check its invoice in Billing, in UAT</span></a></li><li><a href="#cap-generated-code" class="tile"><b>What ForgeQE wrote</b><span>How much of the code ForgeQE wrote is still there?</span></a></li><li><a href="#cap-forgeqe-commands" class="tile"><b>Every forgeqe command from the shell</b><span>Show me the context budget</span></a></li><li><a href="#cap-product-knowledge" class="tile"><b>Product knowledge from the product's repositories</b><span>How does the product cancel an order? Show the endpoints and tables involved</span></a></li><li><a href="#cap-setup-help" class="tile"><b>Setup, skills, and documentation</b><span>What can you do?</span></a></li></ul></div>
156
156
  <div class="area"><a href="#area-desktop" class="area-name"><span class="mono">Desktop</span></a><ul class="tiles"><li><a href="#cap-desktop-apps" class="tile"><b>Automate Windows desktop apps</b><span>Create an invoice for Contoso in the Billing app and save it as a test</span></a></li></ul></div>
157
157
  <div class="area"><a href="#area-mobile" class="area-name"><span class="mono">Mobile</span></a><ul class="tiles"><li><a href="#cap-mobile-apps" class="tile"><b>Automate Android and iOS apps</b><span>Sign in to the courier app and accept the first delivery, and save it as a test</span></a></li></ul></div>
@@ -1512,6 +1512,63 @@ Acceptance criteria:
1512
1512
  </section>
1513
1513
  </div>
1514
1514
  </article>
1515
+ <article class="spec feat" id="cap-business-personas">
1516
+ <div class="hd"><span class="mono">Test cases</span><h3>Business personas for testing</h3></div>
1517
+ <p class="ds">Personas that test the software the way the business would: a subject matter expert (a payments SME who checks refunds, settlement cut-offs and currency rounding), an end user, a specialist (compliance) or a business user (an operations manager with approval limits). The Persona agent drafts a new one from your words; any agent then acts as it in a browser run, designs test cases from what it validates, or reviews a feature through its eyes. Kept in the project for every agent.</p>
1518
+ <div class="facts">
1519
+ <div class="fact"><span class="mono">Ask it</span><ul class="asks"><li>Create a persona of an SME in payments</li><li>Test the refund flow as a payments SME</li><li>Make a business persona for an operations manager who approves orders</li><li>Which business personas do we have?</li></ul></div>
1520
+ <div class="fact"><span class="mono">What it needs</span><ul class="needs"><li><span class="need opt">Optional</span><span>A live model profile in llms.json (an API key or Microsoft Entra ID sign-in)</span></li></ul></div>
1521
+ <div class="fact"><span class="mono">Limits</span><ul class="plainlist"><li>A persona is a description for agents to act on, not a real user: its checks come from its validates list and the domain the model knows</li><li>Saved only after you agree, as .forgeqe/business-personas/&lt;id&gt;.yaml; a persona never changes what an agent may do</li></ul></div>
1522
+ <div class="fact"><span class="mono">Tools</span><p class="tools"><code>business_persona</code></p></div>
1523
+ </div>
1524
+ <div class="detail"><span class="mono">In detail</span>
1525
+ <section class="doc" id="doc-how_to_use-business-personas">
1526
+ <h4>Business personas</h4>
1527
+ <div class="prose"><p>A <strong>business persona</strong> is a person who validates the software the way the business does: a <strong>subject matter expert</strong> (a payments SME who checks refunds, settlement cut-offs and currency rounding), an <strong>end user</strong> (an everyday customer, a first-time user), a <strong>specialist</strong> (a KYC and AML compliance reviewer) or a <strong>business user</strong> (an operations manager with approval limits). Each persona says who the person is, what they want, what they know, and above all <strong>what they check before they accept the software</strong> (<code>validates</code>). Any agent can use one:</p>
1528
+ <ul>
1529
+ <li><strong>The Orchestrator</strong> makes personas too (&quot;create a persona of an SME in payments&quot;), with the Persona agent, and acts as a persona in a browser run (the persona's brief goes at the start of the goal), designs test cases from what it validates, or reviews a feature through its eyes: &quot;test the refund flow as a payments SME&quot;, &quot;write test cases for checkout as a first-time user&quot;.</li>
1530
+ <li><strong>Other agents</strong> (<code>forgeqe mcp</code> clients such as Claude Code or Copilot, and custom agents) call the <code>business_persona</code> tool: <code>op: list</code>, <code>op: get</code> (the persona and its brief), or <code>op: create</code>.</li>
1531
+ <li><strong>A person</strong> at a terminal:</li>
1532
+ </ul>
1533
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>bash</span><button class="copy-code" type="button">Copy</button></div><pre><code>forgeqe persona # the personas: built in, and the project's
1534
+ forgeqe persona show payments-sme # one persona and the brief agents act on
1535
+ forgeqe persona create &quot;an SME in card payments who reconciles settlements&quot; --domain payments --kind sme [--save]
1536
+ </code></pre></div>
1537
+ <p>Built in: <code>payments-sme</code> (<code>/priya</code>), <code>retail-customer</code> (<code>/sam</code>), <code>compliance-specialist</code> (<code>/dana</code>), <code>operations-manager</code> (<code>/lee</code>), <code>first-time-user</code> (<code>/alex</code>).</p>
1538
+ <p><strong>Every persona is a command in every agent's chat.</strong> Start a message with it and the task: <code>/priya Validate the payment change</code>. It works in the terminal shell (typing <code>/</code> suggests the personas with the shell's commands), <code>forgeqe run &quot;/priya …&quot;</code>, every chat box of the web app (typing <code>/</code> at the start offers the personas) and a custom agent's chat. ForgeQE turns the command into the persona's brief, quoted as data, and your task after it, so the agent acts as that person, puts the brief at the start of its browser runs, and judges the app by what they check. A persona's command is its <code>handle</code> (its id when it has none): a word of lower-case letters, digits and dashes that is never one of the shell's own commands or another persona's.</p>
1539
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>bash</span><button class="copy-code" type="button">Copy</button></div><pre><code>forgeqe persona export --out personas.json # your own personas, as a file to share
1540
+ forgeqe persona import personas.json # another project's: new ones only, never replacing one here
1541
+ </code></pre></div>
1542
+ <p><strong>Sharing personas:</strong> the Persona agent's page (Personas tab) has Export and Import, and so does <code>forgeqe persona export|import</code>. The file is JSON of the personas' fields. An import is checked as strictly as a persona file. The whole file is refused when any persona in it is refused, and a persona whose id or command this project already has is skipped and listed, never replaced.</p>
1543
+ <p><strong>In the web app</strong>, the Persona agent's page (Agents, Persona agent) opens on its <strong>Agent</strong> tab: describe a person in your words (&quot;a compliance officer who reviews every refund over 10,000 EUR&quot;) and the agent turns them into a persona in the conversation, shows it, and asks before saving it. <strong>Personas</strong> lists every persona by kind; open one to read what it checks and <strong>Run as this persona</strong>: say what they should try and a chat starts as them. <strong>New persona</strong> has the Persona agent draft one from your words (or write it yourself), lets you change every field, and saves it when you press Save.</p>
1544
+ <p><strong>The Persona agent</strong> (<code>forgeqe-persona</code>) drafts a new persona from your words: ask &quot;create a persona of an SME in payments&quot;, or <code>op: create</code> with <code>request</code>. It has no tools and answers in a fixed shape; ForgeQE keeps only the persona's fields, checked. A draft is shown first and saved only when you agree (<code>--save</code> asks in a terminal; <code>save: true</code> asks in the shell and the web app). It needs a live model; without one, write the persona yourself.</p>
1545
+ <p><strong>Your own personas</strong> are <code>.forgeqe/business-personas/&lt;id&gt;.yaml</code>, shared with everyone who uses the repository. Saving one also writes its profile as <code>&lt;id&gt;.md</code> beside it, made from its fields, for people and agents that read the project's documents. The YAML is the persona; the <code>.md</code> is written again whenever the persona is saved:</p>
1546
+ <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: merchant-onboarding-sme
1547
+ handle: omar # its command in any agent's chat: /omar Validate the merchant onboarding change
1548
+ name: Omar, merchant onboarding SME
1549
+ kind: sme # sme, end_user, specialist, business_user
1550
+ role: Merchant onboarding lead
1551
+ domain: payments
1552
+ expertise: expert # novice, intermediate, expert
1553
+ description: Onboards new merchants and sets their fees and payout schedules.
1554
+ goals:
1555
+ - onboard a merchant in one session
1556
+ knows:
1557
+ - merchant category codes
1558
+ - payout schedules and reserves
1559
+ validates:
1560
+ - a merchant cannot take payments before KYC is approved
1561
+ - the fee shown at onboarding is the fee charged on the first payout
1562
+ frustrations:
1563
+ - having to enter the same company details twice
1564
+ scenarios:
1565
+ - Onboard a merchant and take its first test payment
1566
+ </code></pre></div>
1567
+ <p>A persona file can come from the repository, so ForgeQE reads it strictly: only these keys, each choice from its list, no YAML aliases, every text one line and clipped, at most 12 items in a list, a regular file only (no link), and a text that reads as an instruction to an agent (&quot;ignore the rules&quot;, &quot;run this command&quot;) is refused. A persona only describes a person: it never changes what an agent may do. These personas are separate from the accessibility personas (<code>.forgeqe/personas</code>), which set how the browser perceives the page.</p>
1568
+ </div>
1569
+ </section>
1570
+ </div>
1571
+ </article>
1515
1572
  </section>
1516
1573
  <section class="chapter" id="area-setup" aria-labelledby="area-setup-h">
1517
1574
  <header class="chead"><img class="pix pix--chapter" src="../img/icons/healer.svg" alt="" width="40" height="40"><span class="mono">06</span><h2 id="area-setup-h">Setup</h2><p>Configuration, skills, and help</p></header>
@@ -2139,7 +2196,7 @@ agents: [browser]
2139
2196
  <tr><th>Source</th><th>Folder</th></tr>
2140
2197
  </thead>
2141
2198
  <tbody>
2142
- <tr><td>Built-in</td><td>the <code>skills/</code> folder ForgeQE ships: <code>playwright-typescript</code>, <code>dotnet-nunit-playwright</code> and <code>testcontainers</code> (Scribe), <code>azure-sdk-testing</code>, <code>aws-sdk-testing</code> and <code>gcp-sdk-testing</code> (Scribe and ForgeQE's agent), <code>dynamics-365</code> (browser), <code>writing-skills</code> (ForgeQE's agent)</td></tr>
2199
+ <tr><td>Built-in</td><td>the <code>skills/</code> folder ForgeQE ships: <code>playwright-typescript</code>, <code>dotnet-nunit-playwright</code>, <code>bdd-gherkin</code> and <code>testcontainers</code> (Scribe), <code>bdd-scenario-design</code> (ForgeQE's agent: asks about Examples, Background and Rule before a BDD test, and passes the answers to <code>write_test</code> as <code>bdd</code>), <code>azure-sdk-testing</code>, <code>aws-sdk-testing</code> and <code>gcp-sdk-testing</code> (Scribe and ForgeQE's agent), <code>dynamics-365</code> (browser), <code>dynamics-365-automation</code> (Scribe: D365 control names and locators, steps per control, EasyRepro), <code>writing-skills</code> (ForgeQE's agent)</td></tr>
2143
2200
  <tr><td>Global, only with <code>skills.external: true</code></td><td><code>~/.claude/skills</code>, <code>~/.agents/skills</code>, and the repo's <code>.claude/skills</code> and <code>.agents/skills</code></td></tr>
2144
2201
  <tr><td>User</td><td><code>~/.forgeqe/skills</code> (or <code>$FORGEQE_HOME/skills</code>)</td></tr>
2145
2202
  <tr><td>Project</td><td><code>.forgeqe/skills</code> next to <code>forgeqe.yaml</code>, and the repo's own <code>.forgeqe/skills</code></td></tr>
@@ -4635,6 +4692,8 @@ tokens and the like) show as <code>•••</code> in results. A check compares
4635
4692
  max_attempts: 5 # test runs before giving up
4636
4693
  test_timeout_seconds: 600 # per test run
4637
4694
  stall_after: 5 # stop the agent's turn when one command it runs has failed this many times
4695
+ repeat_after: 6 # stop its turn after this many look-ups answered as before (a file re-read unchanged, the same diff)
4696
+ edit_after: 8 # stop its turn after this many edits to files it already changed, with no test run in between
4638
4697
  replay: true # before the agent starts, run the steps as a Playwright script and hand over what worked
4639
4698
  live_browser: true # once a step fails, the agent looks at that page in a Playwright browser
4640
4699
  graph: true # the code graph: find page objects without reading files, and reuse what already locates an element
@@ -4659,15 +4718,12 @@ tokens and the like) show as <code>•••</code> in results. A check compares
4659
4718
  <p>It writes the test from the handoff and the replay script: steps that worked are ported with their locators, steps that failed are fixed first. Every locator, including those for assertions, comes from the replay script, the page snapshots, page memory, or a check on the page; steps where the browser agent ran JavaScript to look around are left out. It does not walk the flow again or build tests to explore. Once a step fails (in the replay, or in its test), ForgeQE switches on its live browser: a Chrome that Playwright drives, set up like ForgeQE's, where it looks at the failing step's page one tool call per action (open, snapshot, click, type, wait, screenshot, run JavaScript, console errors, failed requests). Until then the live browser tools are off, so no tokens go into looking at pages that work. The live browser needs Node.js (<code>npx</code>), and Microsoft's Playwright MCP server is downloaded on first use; with <code>live_browser: false</code>, or without <code>npx</code>, it looks with a small throwaway script instead. When its browser gets a different page than ForgeQE's did (an error, a challenge, a control that will not open), it compares the two browsers (user agent, <code>navigator.webdriver</code>, headless, failed requests and CORS errors, headers the framework adds, console errors) and fixes the difference in the repo's browser configuration. It never judges the site with <code>curl</code> or <code>webfetch</code>.</p>
4660
4719
  </li>
4661
4720
  <li>
4662
- <p>Scribe does not run the test itself: it may build or compile, then reports the test file and the command that runs only that test, and ForgeQE runs it. If one command it runs fails <code>stall_after</code> times in a row within its work (the same build again and again, say), ForgeQE stops that turn and sends the command and its last output back, asking it to change approach. If the same command stalls again, the job stops as a failure with that output in the notes.</p>
4663
- </li>
4664
- <li>
4665
- <p>ForgeQE runs that command (with <code>CI=1</code>) and checks the exit code, and it watches the processes the command starts for a browser launched by Playwright, Puppeteer, Selenium, or Cypress. On a failure it sends the command, exit code, and output back to Scribe. The output is kept short so the error is never cut off: the page dump Playwright puts into a failed assertion (&quot;Aria snapshot:&quot;, often thousands of lines) is taken out and saved as <code>&lt;run&gt;/test-runs/attempt-N-page.aria.yml</code>, then the start (where the first error and its stack trace are) and the end (the summary) are sent; the full output is in <code>&lt;run&gt;/test-runs/attempt-N.log</code>, and the prompt names both files. A command that exits 0 without starting a browser also goes back: the test must drive the app in a browser. If the repo's browser runs on another machine (Selenium Grid, a cloud service, a container), the agent says where and the check is skipped.</p>
4666
- </li>
4667
- <li>
4668
- <p>A passing test then goes to a separate reviewer agent, which can read files and <code>git diff</code> but not change anything. It checks the change against the goal and the test rules: every part of the goal done through the page and asserted, generic page objects with data in the test, no values or URLs copied from the run, browser settings in the repo's configuration, no leftover files. The changed files come inline in its prompt, so it reads nothing again, and it does not ask to replace locators or texts that came from the replay or the checks, since those matched the live site. It judges only what this job changed: ForgeQE records the working tree before the job, so your uncommitted edits, your untracked files, and ForgeQE's own files (<code>.forgeqe/</code>, <code>forgeqe.yaml</code>, <code>llms.json</code>) are never part of the review. It checks the diff of every file that existed before the job: removing or rewriting an existing test, even a commented-out one, is a correctness problem. Credentials come from the environment, except a public demo login that the application itself shows to anyone (such as the logins on saucedemo.com's sign-in page), which may stay in the repo's test data. It gets the outlines of the classes the changed code uses, the repo's browser settings, and the same <code>code_*</code> tools, so it checks reuse and settings without reading those files. The code graph also tells it what the job added that it can check in the code: a new member that locates an element an existing member already locates (to reuse instead), and new XPath or position-based locators. If it finds problems, they go back to Scribe as the next attempt. The terminal shows the exchange as it happens, in order: the reviewer's verdict with its reason and each issue (✗ correctness, ~ coding standard) with the file and the fix it asks for; then why Scribe tries again and what it is fixing (the reviewer's issues, or the test's first error); then what Scribe says it did and which files it changed; then the next verdict:</p>
4721
+ <p>Scribe does not run the test itself: it may build or compile, then reports the test file and the command that runs only that test, and ForgeQE runs it. If one command it runs fails <code>stall_after</code> times in a row within its work (the same build again and again, say), ForgeQE stops that turn and sends the command and its last output back, asking it to change approach. If the same command stalls again, the job stops as a failure with that output in the notes. The same goes for going round in circles: re-reading files, outlines or <code>git diff</code> it has already seen, unchanged, <code>repeat_after</code> times, or changing files it already changed <code>edit_after</code> times without handing the test over, or making 3 edits that fail because the file no longer has the lines it expected (it then reads the file once and edits from that). Its turn stops and it is asked for the test, which ForgeQE then runs; if it does it again, the job stops.</p>
4669
4722
  </li>
4670
4723
  </ol>
4724
+ <p>Every model call sends the whole conversation again, so ForgeQE keeps conversations short. Each attempt after the first, a rerun of a job that stopped while writing, and carrying on after you raise the token budget all start a new session from a brief: the handoff, the plan, the notes, and the files the job wrote as they are now. For a recording, what the planner already looked up in the code goes to Scribe too, and the planner's tokens count toward <code>max_tokens</code>. When a session's calls are mostly re-sent in full rather than read from the model's cache, ForgeQE says so once. At the token budget, the question says whether ForgeQE has run the test yet; an unattended write never asks and stops there. A job that stops says whether a test ever ran and which files it left changed in the repository.
4725
+ 6. ForgeQE runs that command (with <code>CI=1</code>) and checks the exit code, and it watches the processes the command starts for a browser launched by Playwright, Puppeteer, Selenium, or Cypress. On a failure it sends the command, exit code, and output back to Scribe. The output is kept short so the error is never cut off: the page dump Playwright puts into a failed assertion (&quot;Aria snapshot:&quot;, often thousands of lines) is taken out and saved as <code>&lt;run&gt;/test-runs/attempt-N-page.aria.yml</code>, then the start (where the first error and its stack trace are) and the end (the summary) are sent; the full output is in <code>&lt;run&gt;/test-runs/attempt-N.log</code>, and the prompt names both files. A command that exits 0 without starting a browser also goes back: the test must drive the app in a browser. If the repo's browser runs on another machine (Selenium Grid, a cloud service, a container), the agent says where and the check is skipped.
4726
+ 7. A passing test then goes to a separate reviewer agent, which can read files and <code>git diff</code> but not change anything. It checks the change against the goal and the test rules: every part of the goal done through the page and asserted, generic page objects with data in the test, no values or URLs copied from the run, browser settings in the repo's configuration, no leftover files. The changed files come inline in its prompt, so it reads nothing again, and it does not ask to replace locators or texts that came from the replay or the checks, since those matched the live site. It judges only what this job changed: ForgeQE records the working tree before the job, so your uncommitted edits, your untracked files, and ForgeQE's own files (<code>.forgeqe/</code>, <code>forgeqe.yaml</code>, <code>llms.json</code>) are never part of the review. It checks the diff of every file that existed before the job: removing or rewriting an existing test, even a commented-out one, is a correctness problem. Credentials come from the environment, except a public demo login that the application itself shows to anyone (such as the logins on saucedemo.com's sign-in page), which may stay in the repo's test data. It gets the outlines of the classes the changed code uses, the repo's browser settings, and the same <code>code_*</code> tools, so it checks reuse and settings without reading those files. The code graph also tells it what the job added that it can check in the code: a new member that locates an element an existing member already locates (to reuse instead), and new XPath or position-based locators. If it finds problems, they go back to Scribe as the next attempt. The terminal shows the exchange as it happens, in order: the reviewer's verdict with its reason and each issue (✗ correctness, ~ coding standard) with the file and the fix it asks for; then why Scribe tries again and what it is fixing (the reviewer's issues, or the test's first error); then what Scribe says it did and which files it changed; then the next verdict:</p>
4671
4727
  <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>⏺ Reviewer asked for changes attempt 1 of 5 · 1 to fix, 1 coding-standard
4672
4728
  ⎿ The test never checks that the pie chart is shown.
4673
4729
  ✗ Correctness · tests/PracticeTests.cs: No assertion on the SVG pie chart.
@@ -4760,7 +4816,7 @@ forgeqe run &quot;...&quot; --no-code # no tests
4760
4816
  </ul>
4761
4817
  <p><strong>When the flow cannot be reproduced.</strong> If ForgeQE's own replay of the run could not reach the run's final page and Scribe's test fails too, Scribe is told where the replay stopped and what was open on the page, since that is usually a pop-up, consent banner or ad the browser agent closed, or state its browser already had (signed in, items in a cart), and gets another attempt to handle it. The job stops, saying which replayed step failed and why, only when the test then fails the same way again, instead of spending its remaining attempts on a flow no script can repeat as recorded.</p>
4762
4818
  <p><strong>Why a test failed.</strong> When ForgeQE's run of Scribe's test fails, the ✗ line and the next attempt say why in the test's own words: dotnet test's Error Message, pytest's <code>E</code> lines, or the error with its Expected and Received values (Playwright, Jest, JUnit), not the runner's summary line.</p>
4763
- <p><strong>Keeping Scribe's cost down.</strong> ForgeQE reads the repository's test setup itself before Scribe starts (stack, settings files and their browser values, the test id attribute, base classes, page objects and their methods, one test command) and hands it over, so Scribe does not discover it with dozens of file reads. Each attempt after the first starts a fresh session from a summary of the job (handoff, files changed, what each attempt did, the latest failure), so later attempts cost about what the first did. The summary has a &quot;Tried already, and did not work&quot; list: for each failed attempt, what Scribe said it did (it reports each change in <code>tried</code>), how it failed, the locator the test was waiting for and the element that covered it and took the click, both read from the test's output, and whether an earlier attempt already failed on that locator. Scribe must not try those again in the same form and must say what it does differently. <code>forgeqe heal</code> keeps the same list across its attempts. <code>code.max_attempts</code> (default 3) and <code>code.max_tokens</code> (default 1,500,000; <code>0</code> turns it off) cap a job, and the token budget is checked during an attempt too, so one long attempt is stopped when the total passes it. Cached input counts at its share of the profile's input price (a session re-reads its own context, and that is most of its input), and in full when no cached price is known, such as with another <code>code.model</code>. The reviewer sorts its issues into correctness (the test does not test what the goal says, or not reliably) and coding standards (test data or credentials in a page object, naming, hard waits, leftovers). Coding standards never fail a test that works: it is accepted, and the coding agent gets one more round (not counted in <code>max_attempts</code>) to fix them; if that round breaks the test, ForgeQE puts back the version that passed and lists the standards issues in the notes (<code>code.tidy: false</code> skips the round). A test the reviewer rejects twice for correctness stops the job with its issues, since that usually means the test case and the page disagree. When a test passed and the reviewer sent it back, and the changes for the review then break it (or the attempts or the token budget run out first), ForgeQE puts back the version that passed: the result is passed but not approved, with the reviewer's issues in the notes, so you get a working test to finish instead of none. Under each step, the handoff shows that step's part of the page (its section and neighbours, from the replay's page snapshot) instead of whole snapshots. When a test fails, ForgeQE shows the failing element on the test's page at the failure and on the replay's page, so most failures are fixed without opening a browser. Scribe's live browser is switched on only when the same failure repeats, and it does not send a page snapshot after every click or keystroke. <code>code.max_steps</code> (default 50) caps the tool calls in one of Scribe's turns. <code>code.review_profile</code> runs the reviewer on a cheaper llms.json profile.</p>
4819
+ <p><strong>Keeping Scribe's cost down.</strong> ForgeQE reads the repository's test setup itself before Scribe starts (stack, settings files and their browser values, the test id attribute, base classes, page objects and their methods, one test command) and hands it over, so Scribe does not discover it with dozens of file reads. Each attempt after the first starts a fresh session from a summary of the job (handoff, files changed, what each attempt did, the latest failure), so later attempts cost about what the first did. The summary has a &quot;Tried already, and did not work&quot; list: for each failed attempt, what Scribe said it did (it reports each change in <code>tried</code>), how it failed, the locator the test was waiting for and the element that covered it and took the click, both read from the test's output, and whether an earlier attempt already failed on that locator. Scribe must not try those again in the same form and must say what it does differently. <code>forgeqe heal</code> keeps the same list across its attempts. <code>code.max_attempts</code> (default 3) and <code>code.max_tokens</code> (default 1,500,000; <code>0</code> turns it off) cap a job, and the token budget is checked during an attempt too, so one long attempt is stopped when the total passes it. Cached input counts at its share of the profile's input price (a session re-reads its own context, and that is most of its input), and in full when no cached price is known, such as with another <code>code.model</code>. The reviewer sorts its issues into correctness (the test does not test what the goal says, or not reliably) and coding standards (test data or credentials in a page object, naming, hard waits, leftovers). Coding standards never fail a test that works: it is accepted, and the coding agent gets one more round (not counted in <code>max_attempts</code>) to fix them; if that round breaks the test, ForgeQE puts back the version that passed and lists the standards issues in the notes (<code>code.tidy: false</code> skips the round). A test the reviewer rejects twice for correctness stops the job with its issues, since that usually means the test case and the page disagree. When a test passed and the reviewer sent it back, and the changes for the review then break it (or the attempts or the token budget run out first), ForgeQE puts back the version that passed: the result is passed but not approved, with the reviewer's issues in the notes, so you get a working test to finish instead of none. Under each step, the handoff shows that step's part of the page (its section and neighbours, from the replay's page snapshot) instead of whole snapshots. When a test fails, ForgeQE shows the failing element on the test's page at the failure and on the replay's page, so most failures are fixed without opening a browser. Scribe's live browser is switched on only when the same failure repeats, or from the start when ForgeQE's own replay got through the flow in no setup (Scribe would otherwise patch the failing steps blind until a test ran), and it does not send a page snapshot after every click or keystroke. <code>code.max_steps</code> (default 50) caps the tool calls in one of Scribe's turns. <code>code.review_profile</code> runs the reviewer on a cheaper llms.json profile.</p>
4764
4820
  <p><strong>Scribe's rulebook: the same mistake once.</strong> When a job passes after a failed test run or a reviewer's change, Scribe's report gives up to three one-line rules that would have avoided the mistake (&quot;Wait for the cart badge with toHaveText before clicking Checkout; it updates after a request&quot;). ForgeQE keeps them in <code>.forgeqe/scribe-rules.json</code> in the repository, and every attempt of later jobs, and every healing session, starts with them. A lesson from a job that did not pass, or that passed at once, is not kept: only a fix that worked becomes a rule. The book stays small, since it is sent with each model call: at most 15 rules of one line each; a lesson learned again is merged into its rule (shown as &quot;learned 3 times&quot;) instead of added; when it is full, the rule confirmed least and longest ago goes, and a rule not learned again for 180 days expires. The rules are the coding agent's own words, so a rule with a link, something like a token, a destructive command, or wording that tells an agent to drop its instructions is refused, and the agents are told they are hints that never override their instructions or the team's guardrails. Commit the file to share the rules with the team and see each change in review; edit or delete a rule there (the agents cannot change <code>.forgeqe</code>). ForgeQE says each new rule as it learns it (<code>Learned for next time: …</code>). <code>code.rulebook: false</code> turns it off.</p>
4765
4821
  </div>
4766
4822
  </section>