@capagents/forgeqe 3.0.7 → 3.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/HOW_TO_USE.md +46 -50
  2. package/THIRD_PARTY_NOTICES.md +1018 -0
  3. package/dist/docs-site/docs/index.html +44 -39
  4. package/dist/docs-site/docs/search.js +1 -1
  5. package/dist/forgeqe.js +2110 -2023
  6. package/dist/web/assets/Agent-MlW7cfAm.js +7 -0
  7. package/dist/web/assets/AgentWork-BhepbEeU.js +2 -0
  8. package/dist/web/assets/ApiTests-mxUkUZvv.js +10 -0
  9. package/dist/web/assets/Browse-DENLuv4C.js +2 -0
  10. package/dist/web/assets/Chat-jxak1jci.js +3 -0
  11. package/dist/web/assets/CommandPalette-DMAmXPq1.js +1 -0
  12. package/dist/web/assets/Compare-DJNSrM2v.js +1 -0
  13. package/dist/web/assets/Cost-CEOZgbPs.js +1 -0
  14. package/dist/web/assets/Data-COFRpcJn.js +6 -0
  15. package/dist/web/assets/Desktop-DGNdy7iS.js +1 -0
  16. package/dist/web/assets/DesktopReview-SdAwvi9y.js +1 -0
  17. package/dist/web/assets/Evidence-DTrdEz3M.js +1 -0
  18. package/dist/web/assets/Explore-DDXgQj5Q.js +2 -0
  19. package/dist/web/assets/Features-BM5iXhOR.js +1 -0
  20. package/dist/web/assets/Flags-CkKp4bbv.js +2 -0
  21. package/dist/web/assets/Flaky-BqUHVLao.js +1 -0
  22. package/dist/web/assets/Impact-CA6s3POt.js +3 -0
  23. package/dist/web/assets/Jobs-B59p1qvn.js +5 -0
  24. package/dist/web/assets/KindPage-DPADNnwH.js +6 -0
  25. package/dist/web/assets/Migration-DtynahwR.js +2 -0
  26. package/dist/web/assets/PageAgent-CB8HtdGd.js +1 -0
  27. package/dist/web/assets/Product-wWMz2Nnk.js +7 -0
  28. package/dist/web/assets/Production-Nst6__N7.js +1 -0
  29. package/dist/web/assets/Quality-DgNo4H0u.js +1 -0
  30. package/dist/web/assets/Readiness--GiTxFZo.js +1 -0
  31. package/dist/web/assets/Record-a4whC1jV.js +1 -0
  32. package/dist/web/assets/Regression-hesOlN4G.js +5 -0
  33. package/dist/web/assets/{RelationGraph-Stj9gLlk.js → RelationGraph-C3Re0M1N.js} +1 -1
  34. package/dist/web/assets/Reports-C-NSlVAn.js +2 -0
  35. package/dist/web/assets/Response-CzX2rQEZ.js +9 -0
  36. package/dist/web/assets/RunDiff-CIdQD95y.js +1 -0
  37. package/dist/web/assets/Runs-DIDCOhbK.js +2 -0
  38. package/dist/web/assets/{Steps-DDNOjqR0.js → Steps-BOWDBzu4.js} +2 -2
  39. package/dist/web/assets/TestCases-D-ZRb2N7.js +1 -0
  40. package/dist/web/assets/TestData-kXWCn7uZ.js +2 -0
  41. package/dist/web/assets/TestDebt-BvP3w7ye.js +1 -0
  42. package/dist/web/assets/TestManagement-CphGo9DZ.js +1 -0
  43. package/dist/web/assets/Tosca-dhFuqYxV.js +3 -0
  44. package/dist/web/assets/WhatsNew-DpJWNec7.js +1 -0
  45. package/dist/web/assets/agentTabs-BO5l3zw2.js +1 -0
  46. package/dist/web/assets/dataParts-DeUdfjjv.js +3 -0
  47. package/dist/web/assets/diff-D1_Qo2h1.js +2 -0
  48. package/dist/web/assets/{families-C_rjd0Xf.js → families-DWilSDct.js} +1 -1
  49. package/dist/web/assets/filters-CVzIOjPG.js +1 -0
  50. package/dist/web/assets/{fold-BWrh257K.js → fold-BRxvbN9r.js} +1 -1
  51. package/dist/web/assets/frame-VTMu7MoC.js +13 -0
  52. package/dist/web/assets/index-CKRa-K2y.css +2 -0
  53. package/dist/web/assets/index-nuLrB-Rb.js +69 -0
  54. package/dist/web/assets/line-icons-C_amZ5-o.js +1 -0
  55. package/dist/web/assets/{logos-BGwyuzYI.js → logos-J6txZkKc.js} +1 -1
  56. package/dist/web/assets/{markdown-A9SeSXqj.js → markdown-CWisJbSJ.js} +7 -7
  57. package/dist/web/assets/paletteCommands-BmYmp6YY.js +1 -0
  58. package/dist/web/assets/parts-CDBCk_Xz.js +1 -0
  59. package/dist/web/assets/{productParts-Cuv1euHM.js → productParts-BxdHuSBa.js} +1 -1
  60. package/dist/web/assets/qualityParts-CGKSK9Dq.js +1 -0
  61. package/dist/web/assets/{recordTest-Bynmxkso.js → recordTest-CcplpTS6.js} +1 -1
  62. package/dist/web/assets/{rows-Vz0y1oXB.js → rows-yPc39hV7.js} +1 -1
  63. package/dist/web/index.html +6 -6
  64. package/docs/BASAL.md +61 -0
  65. package/docs/TEST_MANAGEMENT_PLAN.md +186 -15
  66. package/docs/user-guide.html +44 -39
  67. package/forgeqe.example.yaml +13 -0
  68. package/package.json +3 -1
  69. package/prompts/README.md +5 -2
  70. package/prompts/basal-cast.md +44 -0
  71. package/prompts/basal-rehearse.md +45 -0
  72. package/prompts/basal-strategist.md +49 -0
  73. package/prompts/basal-understand.md +46 -0
  74. package/prompts/brain.md +7 -10
  75. package/prompts/test-linker.md +43 -0
  76. package/py/forgeqe_testmgmt/__init__.py +1 -0
  77. package/py/forgeqe_testmgmt/pytest_collect.py +56 -0
  78. package/dist/web/assets/Agent-BPjox9-J.js +0 -8
  79. package/dist/web/assets/AgentWork-BrMSCnH9.js +0 -2
  80. package/dist/web/assets/ApiTests-BWkctGq_.js +0 -10
  81. package/dist/web/assets/Browse-BHkFgQm7.js +0 -2
  82. package/dist/web/assets/Chat-DN075IE2.js +0 -3
  83. package/dist/web/assets/CommandPalette-C4U1esum.js +0 -1
  84. package/dist/web/assets/Compare-BeuKSpJg.js +0 -1
  85. package/dist/web/assets/Cost-C0q4kFo_.js +0 -1
  86. package/dist/web/assets/Data-C0xGI6gj.js +0 -6
  87. package/dist/web/assets/Desktop-BPo9EQzU.js +0 -1
  88. package/dist/web/assets/DesktopReview-CbPOcaTp.js +0 -1
  89. package/dist/web/assets/Evidence-xBD_g-6G.js +0 -1
  90. package/dist/web/assets/Explore-AgY2mPFA.js +0 -2
  91. package/dist/web/assets/Features-CNQLzHNE.js +0 -1
  92. package/dist/web/assets/Flags-BYiygdEm.js +0 -2
  93. package/dist/web/assets/Flaky-zDUSG0D0.js +0 -1
  94. package/dist/web/assets/Impact-B7flvv3m.js +0 -3
  95. package/dist/web/assets/Jobs-KO_M1Z5x.js +0 -5
  96. package/dist/web/assets/KindPage-D6QT3D1p.js +0 -6
  97. package/dist/web/assets/Migration-CH3HvJkR.js +0 -2
  98. package/dist/web/assets/Product-B14vAOSF.js +0 -7
  99. package/dist/web/assets/Production-NgWNih7Q.js +0 -1
  100. package/dist/web/assets/Quality-C0InnJO5.js +0 -1
  101. package/dist/web/assets/Readiness-CKfe15YB.js +0 -1
  102. package/dist/web/assets/Record-Bo1qtSQJ.js +0 -1
  103. package/dist/web/assets/Regression-DKCF89mp.js +0 -5
  104. package/dist/web/assets/Reports-5y4wtUOg.js +0 -2
  105. package/dist/web/assets/Response-BZZNyAAR.js +0 -10
  106. package/dist/web/assets/RunDiff-DHvLXuxX.js +0 -1
  107. package/dist/web/assets/Runs-C9vsfEz2.js +0 -2
  108. package/dist/web/assets/TestCases-CwvwkJJK.js +0 -1
  109. package/dist/web/assets/TestData-fdvpO4sj.js +0 -2
  110. package/dist/web/assets/TestDebt-C0qy5pIJ.js +0 -1
  111. package/dist/web/assets/TestManagement-CAyj7lhx.js +0 -1
  112. package/dist/web/assets/Tosca-DsHjjrsa.js +0 -3
  113. package/dist/web/assets/WhatsNew-D30mYpbI.js +0 -1
  114. package/dist/web/assets/agentLink-yb-OobW-.js +0 -1
  115. package/dist/web/assets/dataParts-BXHRvarN.js +0 -3
  116. package/dist/web/assets/filters-DoEToSM9.js +0 -1
  117. package/dist/web/assets/frame-5jc7OkUQ.js +0 -7
  118. package/dist/web/assets/index-DAN0sMvE.js +0 -69
  119. package/dist/web/assets/index-T6cArIaU.css +0 -2
  120. package/dist/web/assets/line-icons-Cb4JZG1G.js +0 -1
  121. package/dist/web/assets/paletteCommands-BlTG5RlB.js +0 -1
  122. package/dist/web/assets/parts-B0-ARNQW.js +0 -1
  123. package/dist/web/assets/qualityParts-BFHdnu9w.js +0 -1
  124. package/dist/web/assets/segmented-ZM3wOT2F.js +0 -1
  125. package/dist/web/assets/thread-gzrCd4Os.js +0 -5
  126. package/dist/web/assets/usePageChat-CNhpFZ3D.js +0 -1
  127. package/docs/BUSINESS_ASSURANCE.md +0 -105
  128. package/prompts/business-interview.md +0 -43
  129. package/prompts/business-strategist.md +0 -44
package/HOW_TO_USE.md CHANGED
@@ -64,11 +64,11 @@ agent:
64
64
  | a bug, orange | Sleuth | `forgeqe-defect-rca` | Finds the root cause of a defect | No |
65
65
  | a funnel, indigo | Polish | `forgeqe-refine` | Turns a request into a task specification | No |
66
66
  | a stack of layers, cobalt | Sorter | `forgeqe-suite-builder` | Builds a test suite from what a person asks, as groups of rules over the project's test cases | No |
67
+ | a target with its centre, sky | Matchmaker | `forgeqe-test-linker` | Links test cases to the automated tests that check them, from their titles, steps, names and files | No |
67
68
  | building blocks, mauve | Smith | `forgeqe-agent-builder` | Works out a custom agent with the user: questions, plan, name | No |
68
69
  | an envelope, plum | Herald | `forgeqe-bug-report` | Drafts a defect in ForgeQE itself from the person's words, and asks what it lacks | No |
69
70
  | a database drum, aqua | Miner | `forgeqe-data` | Miner: finds or designs the test data other agents ask for before they run | No |
70
- | a target with its centre, wine | Watchdog | `forgeqe-business-strategist` | Scenario Strategist: proposes business hypotheses (misuse, unfair outcomes, money lost) over a model of the business; code plans and judges them | No |
71
- | a microphone on its stand, berry | Echo | `forgeqe-business-interviewer` | Echo: answers, as one person of a simulated population, why they did what they did, citing their own calls; the model's account, never evidence | No |
71
+ | basalt columns, wine | BASAL | `forgeqe-basal` | BASAL: reads a business question with its sources into a scenario, then a test strategy that ForgeQE's agents play as real stakeholders; code checks both and judges the outcome | No |
72
72
  | a person, head and shoulders, heather | Mask | `forgeqe-persona` | Mask: drafts a business persona (an SME, an end user, a specialist, a business user) any agent acts as or tests for | No |
73
73
  | a lit lamp, slate | Librarian | `forgeqe-knowledge-agent` | Librarian: says what ForgeQE understood about the product and turns a person's corrections into changes to knowledge, skills, team prompts and the product graph | No |
74
74
  | an open book with its pages, denim | Skimmer | `forgeqe-doc-reader` | Skimmer: picks the sections of the project's documents that answer a question, from their outline | No |
@@ -109,14 +109,14 @@ The icons as the shell draws them, each in its agent's colour:
109
109
  ▚▟▙▞ Sleuth ▜██▛ Polish
110
110
  ▜██▛ ▜▛
111
111
 
112
- ▜██▛ Sorter █ █ Smith
113
- ▜██▛ █ █
112
+ ▜██▛ Sorter ▟▀▀▙ Matchmaker
113
+ ▜██▛ ▜▟▙▛
114
114
 
115
- █▀▀█ Herald ▟██▙ Miner
116
- ▙▟▙▟ ▚▄▄▞
115
+ █ █ Smith █▀▀█ Herald
116
+ █ █ ▙▟▙▟
117
117
 
118
- ▟▀▀▙ Watchdog █ Echo
119
- ▜▟▙▛ ▝█▘
118
+ ▟██▙ Miner ▗█▖▄ BASAL
119
+ ▚▄▄▞ ████
120
120
 
121
121
  ▟▙ Mask ▗██▖ Librarian
122
122
  ▟██▙ ▜▛
@@ -154,7 +154,7 @@ Everything ForgeQE can do, by area. ForgeQE's agent answers "can you…?" questi
154
154
  | 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) |
155
155
  | 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) |
156
156
  | 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). Mask 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) |
157
- | Test cases | **Business assurance: testing as the business, its customers and its opportunists**: The Business Testing agent: builds a model of how the business works from the product's code (capabilities, processes, the rules the code enforces, record states, personal data), asks business questions rather than functional ones (can a refund exceed what was paid, can a one-time coupon be used twice at once, can a rule on one journey be bypassed on another, can one customer act on another's order), plays them out as multi-persona scenarios through the API and the browser on a test environment, and judges business outcomes rather than HTTP statuses. Findings are classed as confirmed failures, potential risks, policy ambiguities or missing evidence, ranked by business impact, with exposure estimated only from observed breaches and stated assumptions. | `business_assurance` | [docs](#business-assurance) |
157
+ | Test cases | **BASAL: business testing that acts**: BASAL turns a business question (should we launch saved cards with a fee? are prices the same from list to cart before the sale?) into a test that ForgeQE's own agents play as the people it affects. It reads the question's brief and data with the product knowledge graph (Neo4j, by meaning) into a scenario: the decision, stakeholders, success criteria and facts, observed or inferred; writes a test strategy whose steps are on browser, API, mobile, desktop or a person; casts a persona for each stakeholder; rehearses their reactions on a feed; and, once a person approves, hands each step to WebPilot, the API workbench, the mobile or desktop agent as that persona on a test environment. Code judges each scenario from what the agents observed: confirmed failure, policy ambiguity, potential risk, missing evidence or expected behaviour. | `basal` | [docs](#basal-business-testing) |
158
158
  | 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) |
159
159
  | 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) |
160
160
  | 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, or records one by hand on the Record page (the device's screen shown there, here or on TestMu AI or BrowserStack, each tap, entry and check done on the device and kept as a step, no model); 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) |
@@ -1908,6 +1908,7 @@ forgeqe migrate run mig-20261103-101500-ab12 # here, or
1908
1908
  forgeqe jobs add migrate-ui --now -- migrate run mig-20261103-101500-ab12
1909
1909
  forgeqe migrate plan --git https://github.com/org/ui-tests.git --branch main --token-var GIT_TOKEN --to playwright-python
1910
1910
  forgeqe migrate plan --source-folder ~/projects/shop-ui-tests --to cypress-typescript
1911
+ forgeqe migrate plan --from perf --stack other --tests "*.jmx" --support "*.groovy" --source-name JMeter --to playwright-typescript
1911
1912
  forgeqe migrate verify mig-… [--workspace ws-…] # run every migrated test again (no model)
1912
1913
  forgeqe migrate fix mig-… --unit u006 --note "The payment page opens in a new tab" # the fixing agent on one file
1913
1914
  ```
@@ -1918,6 +1919,19 @@ anywhere on this computer, or files uploaded or pasted on the Migration page. A
1918
1919
  a workspace of its own under ForgeQE's home and migrated there; the original is never changed. Links, hidden files and
1919
1920
  dependency folders are not copied.
1920
1921
 
1922
+ A stack ForgeQE does not know is named with `--stack other` (on the Migration page, "Other (name it)" under Framework):
1923
+ `--tests` and `--support` give the file types of its tests and support code as plain extensions (`*.jmx`, `*.groovy`,
1924
+ never a pattern, a credential file or a binary), and `--source-name` what to call it. Those files become the units; test
1925
+ data they name is copied; nothing else is migrated. The agent reads each file as it is, and the plan names this as a
1926
+ limit to accept: ForgeQE runs none of its checks for known stacks first, and for a format it does not read itself, the
1927
+ checks after migration only ask that the test declares a test, skips none and passes. ForgeQE reads JMeter test plans
1928
+ (`.jmx`) itself, as untrusted XML (a document type or entity declaration is refused, sizes capped): the agent gets an
1929
+ outline of each request, assertion, capture, CSV data set and script beside the file, with credential headers and
1930
+ secret-named values never repeated and Groovy or BeanShell quoted as data, never run; each request becomes a call with
1931
+ the target's own HTTP client, and load settings (threads, ramp-up, timers) are named as a limit and dropped. The values
1932
+ the plan's assertions expect (never one under "not") are what the mutation oracle below corrupts, so a migrated test
1933
+ that ignores them fails, and one that never mentions them is reported.
1934
+
1921
1935
  1. **Plan.** ForgeQE reads the source folder with no model: regular files only (a symbolic link is skipped and listed, never followed), test files, the support code they import, feature files, and test data. It orders the files so support code comes before the tests that use it, names each target file by the target's conventions (`test_login.py` for pytest, `LoginTest.java` for JUnit, `login.cy.ts` for Cypress), and checks what is possible.
1922
1936
  2. **What is possible.** A *blocker* stops the plan: an unknown source stack, a mobile Appium suite to a browser framework, nothing to migrate, a target folder that already has files, no git repository, or the target's program (npx, python, mvn, dotnet) missing on this computer. A *limit* is something the target does differently: Cypress drives one tab and has no built-in iframes, Selenium cannot stub network calls, Protractor's Angular locators have no equivalent, a grid or cloud set-up is not carried over, BDD features need a BDD runner, code imported from outside the source folder is not migrated. Each limit names the files it affects; confirming accepts them all.
1923
1937
  3. **Confirm.** A person confirms the plan: at a terminal by typing its id, or on the Migration page of `forgeqe web`. The confirmation is kept under ForgeQE's home, by the plan's digest, so a plan file that comes with a repository is never already confirmed, and a plan edited after it was confirmed is refused. When the run starts, ForgeQE builds the plan again from the source and refuses it if the files, targets or limits changed.
@@ -4220,52 +4234,34 @@ scenarios:
4220
4234
 
4221
4235
  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.
4222
4236
 
4223
- ### Business assurance
4224
-
4225
- The **Business Testing agent** asks what a functional test does not: *how does this business really work, what could go wrong when different people use it, who could benefit from unexpected behaviour, what could the organisation lose, and what is the evidence of the actual business outcome?* An HTTP 200, a finished workflow or a confirmation message proves nothing to it.
4226
-
4227
- It works in steps, each reading the same model of the business:
4228
-
4229
- 1. **Discover** (`context`): from the product knowledge graph (`forgeqe knowledge build`), a model of the business: capabilities (payments, refunds, incentives, approvals, entitlements, payouts, personal data…), processes, the **rules the code enforces** (the conditions that refuse a request, with file and line), the states a record goes through, tables with personal data, and the **exposures** these suggest (a refund route with no cap on the amount, an incentive that may be granted twice, a route that acts on a record by its id with no sign-in seen). What was read is *observed*; what it means is *inferred*, and said to be.
4230
- 2. **Hypothesise** (`hypotheses`): business questions, each with personas chosen for their motives: can two partial refunds add up to more than was paid; can a one-time coupon be used five times at the same moment; is a reward taken back when its order is returned; can a cancelled order still be shipped (a rule enforced on one journey, missing on another); can a limit be split; can someone approve their own request; can one customer act on another's order; do equivalent customers get the same price; is a refund after the payout run taken off the next payout. With a live model, the **Scenario Strategist** (`forgeqe-business-strategist`, no tools) proposes more; ForgeQE keeps only those that name things the model of the business has. When a scenario needs a persona the project lacks (an insider, a colluding merchant), it says so, and Mask drafts it.
4231
- 3. **Plan** (`plan`): an investigation: steps by one or several personas (in turn, or at the same moment for a race), each an **API call** ForgeQE sends (matched to your saved API contracts) or a **browser journey** Atlas runs as the persona, and **business outcome oracles**: what the business intended, as checks over business values (`sum($refunded) <= $paid`, at most one accepted redemption, the forbidden action refused, the same outcome for equivalent customers).
4232
- 4. **Run** (`run`): the API steps on a **test environment** of env.yaml (never one named like production), the calls that change data only after you agree. Atlas does the browser steps as the personas and records what it saw (`observe`).
4233
- 5. **Judge and report** (`report`): each investigation's outcome, worked out by code: **confirmed business failure** (an expectation that is policy, or a rule the code enforces elsewhere, was broken, with the evidence), **policy ambiguity** (the software did something unexpected, but nobody has said the expectation is policy: a question for the business), **potential risk**, **missing evidence**, or **expected behaviour**. Findings are ranked by impact, exploitability, likelihood and confidence, with an exposure range only where a breach was observed and you stated how often it could happen. Views for executives, product owners, risk and compliance, and engineering.
4234
- 6. **Learn**: findings, a person's decisions and proposals (add a broken expectation to the personas who acted) are kept in `.forgeqe/business/memory.jsonl`; a pattern confirmed once weighs more in later hypotheses. Proposals are never applied by themselves.
4237
+ ### BASAL: business testing
4235
4238
 
4236
- Ask ForgeQE's agent ("test our refunds and coupons the way an opportunistic customer would", "what could the business lose in checkout?"), or at a terminal:
4239
+ **BASAL** tests a business decision the way real people meet it. Ask a business question with its brief ("Should we launch saved cards as Option A or B? Test how merchants, shoppers and support would really be affected"), and BASAL works it through eight steps, each a page of its own beside the live knowledge graph (Agents › BASAL › Tests):
4237
4240
 
4238
- ```bash
4239
- forgeqe business context # the model of the business (writes .forgeqe/business/context.md too)
4240
- forgeqe business hypotheses [--focus refunds] [--model]
4241
- forgeqe business plan <hypothesis-id> [--env qa] # writes .forgeqe/business/investigations/<id>.json; edit it, or plan again
4242
- forgeqe business run <investigation-id> [--env qa] [--yes]
4243
- forgeqe business observe <investigation-id> --step 2 --accepted|--refused [--value name=value] [--note TEXT]
4244
- forgeqe business decide <investigation-id> <expectation> --policy|--permitted|--not-policy --reason TEXT
4245
- forgeqe business report [--view executive|product|risk|engineering] [--out FILE]
4246
- forgeqe business population [--size 200] [--seed 7] # many people drawn from the personas
4247
- ```
4241
+ 1. **Ask**: the question, the files it rests on (a brief, survey data, policy extracts) and work items.
4242
+ 2. **Understand**: the decision, its options, the stakeholders, the success criteria and the facts, read from the sources and the product knowledge graph (found by meaning in Neo4j). An item is **observed** only when its quote is in the source it names; otherwise it is **inferred**.
4243
+ 3. **Strategy**: scenarios that decide the question, each step by a stakeholder on a channel ForgeQE's agents play (browser, API, mobile, desktop, a person, or opinion only), and the business expectations that judge it. Only stakeholders, apps, saved API calls and test environments the project has are kept; an expectation is **policy** only when it rests on an observed success criterion.
4244
+ 4. **Cast**: one persona per stakeholder who acts: what they check, what they object to, the mistakes they bring.
4245
+ 5. **Rehearse**: the cast react on a feed (post, comment, share, like) to the decision, to each other, and to what the agents saw on the product; what they want tried picks what to play next. Their posts are opinions, never evidence.
4246
+ 6. **Approve**: nothing runs until a person approves the strategy (the test's id typed). An agent never approves.
4247
+ 7. **Act**: each step goes to WebPilot, the API workbench, the mobile or desktop agent as its persona, on a test environment; a journey of one persona in one app is one handover. Steps that change data run only when you agree to the list shown. The operations board shows each handover as it happens.
4248
+ 8. **Judge**: code judges each scenario from what was observed: **confirmed failure**, **policy ambiguity**, **potential risk**, **missing evidence** or **expected behaviour**. A step only a person can see waits for you. "Next round" sends the outcomes back to the cast.
4248
4249
 
4249
- **Populations.** A population is many people drawn from your personas, the way a business really has them: mostly legitimate customers, some opportunists, a few insiders, and the staff and partners they deal with (`--size`, and on the page the shares of opportunists and adversarial customers). Each person is one of a persona, with their own activity, the hours they act in, a monthly budget and how long they have been a customer; people are linked by what the personas say about who they deal with (`relationships`: "buys from partner-merchant", "requests approval from operations-manager", "may collude with incentive-exploiter"). It is made by code from a seed, so the same seed gives the same people, with no model. The **Personas** tab draws it as a relationship graph in the style of MiroFish's (rebuilt in ForgeQE's own code): each person a node coloured by their persona, curved edges labelled with the relation (`BUYS_FROM`, `APPROVAL_FROM`, `SHARES_DEALS_WITH`, `MAY_COLLUDE_WITH`), a picked person's or relationship's card floating at the top right, the persona types at the bottom left, Refresh and full screen; drag, pan and zoom. By keyboard, Tab to the graph, then the arrows move to the nearest person that way, R walks their relationships and F follows one to the person at its other end, Enter or Space opens the details and Escape closes them, + and − zoom, 0 fits and Shift with an arrow pans; where you are is ringed and read out to a screen reader. Populations are kept in `.forgeqe/business/populations` and read back as untrusted. They are the cast for simulations.
4250
-
4251
- **Simulations.** A simulation plays a population on a test environment over simulated days: each hour, the people active in it act through your saved API calls. Customers place an order, pay, sometimes ask for a refund and redeem their one-time code; opportunists ask twice at once for 60% back and redeem their code five times at once. Who does what comes from the seed, so a run can be repeated exactly; values are worked out by formulas over what each person captured (`$paid * 0.6`), never by a model. Its checks judge the whole population ("the business never refunds more than it took") and each person ("nobody is refunded more than they paid", "a one-time code redeems once"), and name everyone who broke them, so a loss the totals hide still shows. It runs only on a test environment, its calls that change data only after you agree to the list shown, and never more than its call budget (`max_calls`). On the page, the **Simulation** tab plans one for the newest population, runs it, and shows the outcome, who broke each check, calls by persona and the run log; the plan can be changed and is checked again. Each simulation's latest run is also in the **Findings** report (and `forgeqe business report`): for leaders, ranked with the investigations by what needs attention, saying how many people broke each check and of which persona; for product, risk and engineering, a Simulations section with each check, who broke it by persona, the amount beyond the rule (not for product) and, for engineering, the calls by persona. Interviews are not part of the report: they are the model's account, not evidence. At a terminal:
4250
+ At a terminal:
4252
4251
 
4253
4252
  ```bash
4254
- forgeqe business simulate # plan one for the newest population
4255
- forgeqe business simulate <simulation> [--env qa] [--yes]
4256
- ```
4257
-
4258
- **Interviews.** After a run you can ask any person of the population why they did what they did: on the Simulation tab, **Ask why** next to each person who broke a check, or at a terminal. The interviewer is a model with no tools; it is given that person's persona, their attributes and their own calls of that run, numbered, as data, and answers as that person, citing the calls its answer rests on. Code keeps only citations of that person's own calls, and says so when an answer cites none ("not tied to the run"). An answer is the model's account, never evidence: it never changes the outcome, and the checks stay the evidence. Interviews are kept in the simulation's `interviews.jsonl` and read back as untrusted. With no model set up, nobody is interviewed.
4259
-
4260
- ```bash
4261
- forgeqe business interview <simulation> <member> 'Why did you ask for a refund twice?'
4262
- ```
4263
-
4264
- **In the web app**, Watchdog's page (Agents, or Quality Engineering, Test design, Business assurance) has its tabs at the top right: **Agent** (ask it in words; its tools and runs), **Investigations** (each one's scenario, what the business intended, Run, which first lists the calls that change data and runs them only once you agree, the evidence, what pending steps showed, and **Decide**, where you type the investigation's id), **Hypotheses** (filter by area, **Plan** one), **Model of the business** (read again from the product graph), and **Findings** for leaders, product, risk and compliance, or engineering. Switching tabs is instant and keeps what you typed; each tab has its own address. The gateway (`src/web/business.ts`) checks everything again, and audits every plan, run, observation and decision. Mask's page shows and edits each persona's intent, risk appetite, motivations, permissions, constraints, mistakes and relationships.
4265
-
4266
- Try it on `samples/business-shop`, a small shop API whose checks each return the right status for the case they were written for, and whose business still loses money: a second partial refund is checked against the order's total, not what is left to refund; a one-time coupon is checked before a slow lookup, so a burst redeems it several times; shipping does not check that the order was cancelled.
4267
-
4268
- An investigation file can be written by hand, by the model or come from the repository, so it is read strictly: known keys only, personas and API calls only ones the project has (a contract set by its id, never a path), a call's path only a path on the API, `{{name}}` values put in a path encoded and in a body as data, values captured only from the fields named, no input named like a credential, oracles only in their small formula grammar (numbers, `$names`, `+ - *`, `sum min max count abs`; never code), at most 20 steps and 20 repeats. Deciding whether an expectation is the business's policy, or a behaviour is permitted, is a person's: `forgeqe business decide` asks you to type the investigation's id, and the agent asks you first.
4253
+ forgeqe basal new "Should we launch saved cards with a fee?" --file briefs/brief.md --file briefs/survey.csv
4254
+ forgeqe basal understand <id>
4255
+ forgeqe basal strategy <id>
4256
+ forgeqe basal cast <id>
4257
+ forgeqe basal rehearse <id>
4258
+ forgeqe basal approve <id> # a person types the id
4259
+ forgeqe basal act <id> [--scenario s1,s2]
4260
+ forgeqe basal judge <id>
4261
+ forgeqe basal observe <id> <scenario> --step 3 --accepted|--refused [--values name=value] [--note TEXT]
4262
+ ```
4263
+
4264
+ BASAL needs a model, and is best with the graph store (`forgeqe graph setup`: Neo4j, after you agree) and an embedding model (`graph.embedding`). Its files are in `.forgeqe/basal/tests/<id>/`. It replaces the Business assurance agent (Watchdog); `forgeqe business` points here.
4269
4265
 
4270
4266
  ### Visual comparison
4271
4267