@capagents/forgeqe 2.6.4 → 2.6.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 (77) hide show
  1. package/HOW_TO_USE.md +11 -2
  2. package/dist/docs-site/docs/architecture/index.html +1 -1
  3. package/dist/docs-site/docs/guardrails/index.html +20 -4
  4. package/dist/docs-site/docs/index.html +12 -3
  5. package/dist/docs-site/docs/search.js +1 -1
  6. package/dist/forgeqe.js +1489 -1478
  7. package/dist/web/assets/Agent-DnSnk8A8.js +4 -0
  8. package/dist/web/assets/ApiTests-r6c8xggS.js +10 -0
  9. package/dist/web/assets/Chat-MqHZCQeC.js +3 -0
  10. package/dist/web/assets/Data-zWPzpJpS.js +3 -0
  11. package/dist/web/assets/Evidence-LEqF3nUt.js +1 -0
  12. package/dist/web/assets/Features-Bgo9qp1-.js +1 -0
  13. package/dist/web/assets/Jobs-Bcwb8HMh.js +5 -0
  14. package/dist/web/assets/KindPage-lAkUjTIP.js +6 -0
  15. package/dist/web/assets/Migration-BjGJA-Bs.js +2 -0
  16. package/dist/web/assets/Product-FEoKmnjo.js +1 -0
  17. package/dist/web/assets/Quality-DCZXDZOe.js +1 -0
  18. package/dist/web/assets/Record-B2wCMjZD.js +2 -0
  19. package/dist/web/assets/Regression-D01mVc1q.js +5 -0
  20. package/dist/web/assets/Reports-DccvSnM0.js +2 -0
  21. package/dist/web/assets/Response-1L54PHOc.js +4 -0
  22. package/dist/web/assets/Runs-CxBqtEcI.js +2 -0
  23. package/dist/web/assets/Shell--wVGpLnJ.js +3 -0
  24. package/dist/web/assets/TestCases-Cnoe8tSS.js +1 -0
  25. package/dist/web/assets/TestData-BeYAygIt.js +2 -0
  26. package/dist/web/assets/WhatsNew-CI0LQ45V.js +1 -0
  27. package/dist/web/assets/{arrow-down-RIu4BNco.js → arrow-down-DSu4Dagx.js} +1 -1
  28. package/dist/web/assets/{arrow-right-DrTAkvEV.js → arrow-right-Ts-WXM9E.js} +1 -1
  29. package/dist/web/assets/circle-DCKdGe8K.js +1 -0
  30. package/dist/web/assets/{circle-dashed-D_uPuLx9.js → circle-dashed-DrntJOQb.js} +1 -1
  31. package/dist/web/assets/{circle-dot-BOuBI-n0.js → circle-dot-DnHcdiDL.js} +1 -1
  32. package/dist/web/assets/dataParts-3r2pCk9l.js +3 -0
  33. package/dist/web/assets/index-CUL4L1Mc.js +43 -0
  34. package/dist/web/assets/index-DchZ3sW9.css +2 -0
  35. package/dist/web/assets/{keyboard-DEIIhxqf.js → keyboard-DasQ_iKX.js} +1 -1
  36. package/dist/web/assets/pencil-DGS0VPko.js +1 -0
  37. package/dist/web/assets/{productParts-DyOA9ubE.js → productParts-CZORYXa1.js} +1 -1
  38. package/dist/web/assets/qualityParts-BL7Mmsao.js +1 -0
  39. package/dist/web/assets/thread-BuTNjR0M.js +5 -0
  40. package/dist/web/assets/{upload-DmbJDCcg.js → upload-Dp3RevwG.js} +1 -1
  41. package/dist/web/assets/usePageChat-iWpW3cZo.js +1 -0
  42. package/dist/web/index.html +3 -3
  43. package/docs/ARCHITECTURE.md +1 -1
  44. package/docs/user-guide.html +12 -3
  45. package/forgeqe.example.yaml +6 -0
  46. package/guardrails/README.md +14 -1
  47. package/package.json +1 -1
  48. package/prompts/brain.md +35 -4
  49. package/py/forgeqe_engine/browser.py +78 -0
  50. package/py/forgeqe_engine/service.py +7 -0
  51. package/dist/web/assets/Agent-DEPTD9pN.js +0 -4
  52. package/dist/web/assets/ApiTests-DeW608jq.js +0 -10
  53. package/dist/web/assets/Chat-B8TOp9np.js +0 -3
  54. package/dist/web/assets/Data-CIXhtuw3.js +0 -3
  55. package/dist/web/assets/Evidence-C9qQTyEk.js +0 -1
  56. package/dist/web/assets/Features-B-wMlbqn.js +0 -1
  57. package/dist/web/assets/Jobs-DeX2jmbu.js +0 -5
  58. package/dist/web/assets/KindPage-DBZJP3U-.js +0 -6
  59. package/dist/web/assets/Migration-XZmPunGD.js +0 -2
  60. package/dist/web/assets/Product-Dlk_1xCK.js +0 -1
  61. package/dist/web/assets/Quality-Bal66JLa.js +0 -1
  62. package/dist/web/assets/Record-DWtUcZWt.js +0 -2
  63. package/dist/web/assets/Regression-WZEVTvAn.js +0 -5
  64. package/dist/web/assets/Reports-DJGUcECV.js +0 -2
  65. package/dist/web/assets/Response-FZElpR4y.js +0 -4
  66. package/dist/web/assets/Runs-DV_VCFbw.js +0 -2
  67. package/dist/web/assets/Shell-DrZla-8i.js +0 -3
  68. package/dist/web/assets/TestData-DMyp7DQ6.js +0 -2
  69. package/dist/web/assets/WhatsNew-KBVDRnTD.js +0 -1
  70. package/dist/web/assets/chevron-up-LdVKD-pj.js +0 -1
  71. package/dist/web/assets/circle-Blgfhc1Z.js +0 -1
  72. package/dist/web/assets/dataParts-wYKqjAh3.js +0 -3
  73. package/dist/web/assets/index-BKwsvR1Y.css +0 -2
  74. package/dist/web/assets/index-DarljPXz.js +0 -38
  75. package/dist/web/assets/qualityParts-DhiyeZEy.js +0 -1
  76. package/dist/web/assets/thread-jMTjTeNN.js +0 -5
  77. package/dist/web/assets/usePageChat-BKJalCrm.js +0 -1
package/HOW_TO_USE.md CHANGED
@@ -125,7 +125,7 @@ Everything ForgeQE can do, by area. ForgeQE's agent answers "can you…?" questi
125
125
  | Browser | **Record a web test by hand**: Opens a browser with the Recorder panel docked in the page while the user does the steps of a web test themself, and saves their clicks, typing, choices and keys in order as a run, with the checks, kept values, test data and notes they add; the coding agent then turns it into a test in the repository's framework. | `web_record` | [docs](#recording-a-web-test-by-hand) |
126
126
  | Test cases | **Run manual test cases in browsers**: Reads test cases from Azure DevOps, Jira, Xray, TestRail, Zephyr Scale, qTest, a file, or pasted text, runs each in a real browser with a verdict per step, writes report.html and junit.xml, posts results back, and files or updates bugs for failures. | `find_test_cases`, `run_test_cases` | [docs](#7-test-cases-and-suites) |
127
127
  | Test cases | **Check and improve test cases**: Checks test cases before they run (vague or missing expected results, missing test data, placeholders, duplicates) against the story, feature, and epic they test, then rewrites Azure DevOps or Jira cases in place once the user agrees. | `check_test_cases`, `update_test_case`, `retire_test_case` | [docs](#checking-test-cases-before-they-run) |
128
- | Test cases | **Write test cases from a story**: Writes test cases from a story's acceptance criteria and 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`, `e2e_journey` | [docs](#where-cases-come-from) |
128
+ | 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) |
129
129
  | 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) |
130
130
  | 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) |
131
131
  | 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) |
@@ -2236,7 +2236,16 @@ More of managing test cases, each set in `forgeqe.yaml` (and Settings › Integr
2236
2236
  - **Cases with no story.** Cases written from a page, a spec or a file are saved in an Azure DevOps area path or a Jira or Zephyr Scale project you name, compared with that area's or project's scope.
2237
2237
  - **The feature's other stories.** `sibling_cases: true` also compares with the cases of the other stories under the story's feature or epic (the first 30 stories; in Jira, the parent field Jira Cloud uses for epics).
2238
2238
  - **Automation on Jira and Xray.** A test that passes for a Jira or Xray case labels it `automated` and records the test on the issue, as Azure DevOps cases get their Associated Automation; a comment is added only when the test is new.
2239
- - **Release readiness in Jira.** `release_readiness` with `system: jira` reads a sprint, a fix version, an epic or story keys: each story's tests, which are automated, their last results in ForgeQE's runs, open bugs by priority, and the same verdict. Results recorded only in Xray or Zephyr Scale executions are not read.
2239
+ - **Release readiness in Jira.** `release_readiness` with `system: jira` reads a sprint, a fix version, an epic or story keys: each story's tests, which are automated, their last results (ForgeQE's runs, Xray test runs and Zephyr Scale executions, the newest of them), open bugs by priority, and the same verdict.
2240
+ - **Matching by steps.** Saving keeps an index of the scope's cases in `.forgeqe/cases-index/` (git-ignored): every case's steps read once, then only those changed since, 40 per save. A case with the same steps is found whatever its title, and a slightly reworded step still counts for extends.
2241
+ - **Several changes at once.** `apply_case_changes` links, extends, updates and retires several cases with one question, every change checked and read first.
2242
+ - **What ForgeQE changed.** Every case it creates, links, updates or retires is logged in `.forgeqe/history/case-changes.jsonl`; `story_test_cases` and the readiness report list the changes for their stories.
2243
+ - **Acceptance criteria traced to cases.** Saved cases carry the criteria they cover (`covers`), and `trace_criteria` records which linked cases cover which; `story_test_cases` lists each criterion with its cases, and readiness names the criteria no traced case covers.
2244
+ - **Healing and test cases.** When healing fixes a test because the application changed, it names the test cases that test automates (heal.md, Test cases to review), and the agent offers to update their steps.
2245
+ - **From Requirements Agent.** Requirements Agent writes `requirements.json` next to its report; `requirements_file` reads it, and the agent writes a case per requirement, traced by its id (FR-001).
2246
+ - **qTest, TestRail and Zephyr Scale.** Cases are saved in qTest (`module_id`, linked to the story's requirement), retired in TestRail (moved to `retired_section_id`) and Zephyr Scale (status Deprecated), and marked automated (TestRail's `automation_field`, Zephyr Scale's `automated` label). Sibling stories on Jira Server are found through Epic Link.
2247
+ - **Settings checks.** A `test_cases`, `new_cases` or retire setting ForgeQE would refuse when saving cases is refused when Settings saves it, with the setting named. In a saved Azure DevOps or Jira connection, **Try** beside each `test_cases` line says how many cases it finds, with a few of their titles.
2248
+ - **The Test cases page** (`forgeqe web`, Test cases): open a story by its system and id to see its linked cases (those older than the story's last change marked), its acceptance criteria with the cases traced to each, what ForgeQE changed, and the changes `save_test_cases` proposed. Tick the ones to make, review them, and Apply: the server checks every change again and nothing is written before Apply.
2240
2249
 
2241
2250
  With `sources.write_back: true` (the default), results go back after the suite:
2242
2251
 
@@ -252,7 +252,7 @@
252
252
  <tr><td><code>brain/prompt.ts</code></td><td><code>BRAIN_PROMPT</code>: the tools (every CLI command is one, so the agent uses the tool instead of telling the user to run a command), how to choose a source, find vs run, signing in, writing tests (<code>write_test</code>; small hand edits verified with <code>run_test</code>), the CI pipeline procedure, fixing broken tests (<code>heal_tests</code>), running existing repo tests (<code>find_tests</code> then <code>run_tests</code>, never without the user's confirmation; sprint dates only from <code>sprint</code>), monitoring, ForgeQE's own docs and setup, and the rules (no secret values, push only with <code>push_branch</code>, stay in the working directory). The reply is plain text, so it streams to the shell as it is written (the runtime's <code>message.part.delta</code> events, relayed as <code>stream</code> events); it ends with a hidden line <code>&amp;lt;!--forgeqe {&quot;outcome&quot;: done | failed | needs_input, &quot;next&quot;: […]}--&gt;</code> that <code>splitReply</code> reads and <code>visibleReply</code> holds back while the reply streams</td></tr>
253
253
  <tr><td><code>brain/index.ts</code></td><td><code>openBrain</code> starts the MCP server on 127.0.0.1 with a random token (<code>localToolServer</code>), then an agent runtime session with the prompt, the session notes, the schema, and the server as a remote MCP entry (6 h tool timeout). <code>ask</code> returns the reply and outcome, <code>abort</code> stops the session and every running tool call. <code>brainUnavailable</code> is why it cannot run (no model set up and no <code>code.model</code>, or no agent runtime); callers then run the text as one browser goal. <code>sessionSetup</code> picks the working directory and whether passed runs become tests from <code>--repo</code>, <code>--no-code</code>, and <code>code.repo</code> (default: tests in the current folder)</td></tr>
254
254
  <tr><td><code>mcp/tools.ts</code></td><td><code>TOOLS</code> and <code>environmentNotes</code> (working directory, run and memory folders, configured test case systems, suite defaults, timeouts, the profile, and the names, never values, of keys set in the environment). Each tool reports <code>ToolEvent</code>s (run-start/event/done, suite-start/event/done, info, <code>agent</code> for a nested coding or healing session's events, <code>card</code> for a result panel) to whoever shows them. <code>ToolContext</code> carries <code>session</code> (<code>shell</code>, <code>once</code> for <code>forgeqe run</code>, <code>server</code> for <code>forgeqe mcp</code>), <code>waitForUser</code> and <code>ask</code> when a person can answer, and <code>openSession</code> so tests can script the nested agent runtime sessions</td></tr>
255
- <tr><td><code>cases/save.ts</code></td><td><code>save_test_cases</code>: <code>saveAdoCases</code> creates Test Case work items (<code>adoStepsXml</code> writes <code>Microsoft.VSTS.TCM.Steps</code> the way <code>adoCases</code> reads it) linked to the story with <code>TestedBy-Reverse</code> in its area and iteration; <code>saveJiraCases</code> creates issues (type Test by default) with the steps in the description and an issue link. Both reuse a case already linked to the story under the same title, then compare with the story's scope (<code>cases/scope.ts</code>: <code>test_cases</code> maps an area path or project to a plan, suite, area or JQL filter, values checked before they reach WIQL or JQL, at most <code>MAX_SCOPE</code> cases read, steps only for the <code>shortlist</code>): the same steps are <code>reuse</code>, a case adding steps is <code>extends</code> with its <code>insert</code>; nothing is written to an existing case there. <code>planLinks</code> checks ids, type and project before <code>link_test_case</code> or <code>update_test_case</code>'s <code>story</code> asks; <code>insertSteps</code> applies an <code>insert</code>. <code>saveTestrailCases</code>, <code>saveZephyrCases</code>, Xray mode in <code>saveJiraCases</code> (<code>createXrayTest</code>, <code>setXraySteps</code> in <code>cases/xray.ts</code>), <code>saveAdoCasesInArea</code> and <code>saveJiraCasesInProject</code> for cases with no story, and <code>existingCases</code> for <code>check_test_cases</code>' <code>against</code>. <code>cases/fields.ts</code> checks <code>new_cases</code>; <code>cases/adodata.ts</code> writes shared steps references and parameters; <code>cases/staleness.ts</code> reads a story's history; <code>cases/retire.ts</code> retires a case; <code>cases/jirareadiness.ts</code> is release readiness for Jira. On unless <code>sources.save_cases: false</code>; <code>environmentNotes</code> tells the agent which</td></tr>
255
+ <tr><td><code>cases/save.ts</code></td><td><code>save_test_cases</code>: <code>saveAdoCases</code> creates Test Case work items (<code>adoStepsXml</code> writes <code>Microsoft.VSTS.TCM.Steps</code> the way <code>adoCases</code> reads it) linked to the story with <code>TestedBy-Reverse</code> in its area and iteration; <code>saveJiraCases</code> creates issues (type Test by default) with the steps in the description and an issue link. Both reuse a case already linked to the story under the same title, then compare with the story's scope (<code>cases/scope.ts</code>: <code>test_cases</code> maps an area path or project to a plan, suite, area or JQL filter, values checked before they reach WIQL or JQL, at most <code>MAX_SCOPE</code> cases read, steps only for the <code>shortlist</code>): the same steps are <code>reuse</code>, a case adding steps is <code>extends</code> with its <code>insert</code>; nothing is written to an existing case there. <code>planLinks</code> checks ids, type and project before <code>link_test_case</code> or <code>update_test_case</code>'s <code>story</code> asks; <code>insertSteps</code> applies an <code>insert</code>. <code>saveTestrailCases</code>, <code>saveZephyrCases</code>, Xray mode in <code>saveJiraCases</code> (<code>createXrayTest</code>, <code>setXraySteps</code> in <code>cases/xray.ts</code>), <code>saveAdoCasesInArea</code> and <code>saveJiraCasesInProject</code> for cases with no story, and <code>existingCases</code> for <code>check_test_cases</code>' <code>against</code>. <code>cases/fields.ts</code> checks <code>new_cases</code>; <code>cases/adodata.ts</code> writes shared steps references and parameters; <code>cases/staleness.ts</code> reads a story's history; <code>cases/retire.ts</code> retires a case; <code>cases/jirareadiness.ts</code> is release readiness for Jira. <code>cases/caseindex.ts</code> keeps a project's index of scope cases' steps; <code>cases/bulk.ts</code> prepares several changes for one question (apply_case_changes and the web gateway <code>web/testcases.ts</code>); <code>cases/targets.ts</code> names a case's system by its id; <code>cases/changelog.ts</code>, <code>cases/trace.ts</code> and <code>cases/proposals.ts</code> keep the project's change log, criteria trace and pending proposals; <code>cases/requirementsfile.ts</code> reads Requirements Agent's requirements.json; <code>cases/scopecheck.ts</code> checks the settings Settings saves and tries a test_cases line. On unless <code>sources.save_cases: false</code>; <code>environmentNotes</code> tells the agent which</td></tr>
256
256
  <tr><td><code>mcp/commands.ts</code></td><td><code>COMMAND_TOOLS</code>, one tool per CLI command, appended to <code>TOOLS</code>. <code>write_test</code> runs the coding loop (<code>runCodeAgent</code>) and <code>heal_tests</code> runs <code>runHeal</code>, forwarding their events as <code>agent</code> events and ending with a card; each opens its own agent runtime server on port 0, so it nests inside the brain's session. <code>monitor</code>: <code>round</code> (one <code>runMonitor --once</code>, refused while a background monitor uses the folder), <code>start</code>/<code>stop</code>/<code>status</code> (background monitors, only in <code>shell</code> and <code>server</code> sessions), <code>test_alerts</code>. <code>browser_run</code> takes <code>purpose</code> (<code>test</code> or <code>task</code>); <code>taskReason</code> treats a <code>task</code>, or a run that starts on, ends on, or names a configured source system's host (Azure DevOps, Jira, Confluence, TestRail, Zephyr, qTest, Xray), as a task: it writes <code>task.json</code> (<code>TASK_FILE</code>) in the run folder, returns no <code>write_test</code> next step, and <code>write_test</code> refuses that folder. <code>browser_run</code> also takes <code>resume_from</code> (a failed run's folder or name, read by <code>loadResume</code> in <code>run.ts</code>) and, after a failure with resume steps, returns them with a <code>next_step</code> naming the folder; the brain's prompt says to retry with it and say what to do differently. <code>logins</code>: <code>remember</code> (session logins), list (configured and remembered), clear (a saved session, and a remembered login's credentials and session file), and <code>sign_in</code> through <code>signIn</code> and <code>ctx.waitForUser</code> (refused without it). <code>forgeqe_setup</code>: profiles, MCP servers, <code>docsAbout</code> (README and HOW_TO_USE split at headings and scored against the topic, since the agent's <code>external_directory</code> rule keeps it out of the package folder), <code>install_engine</code>, <code>init</code>, <code>skills</code> (<code>op</code> list, show, or new: <code>newSkill</code> into the project's or the user's skills folder)</td></tr>
257
257
  <tr><td><code>card.ts</code></td><td><code>Card</code> (<code>status</code>, <code>title</code>, <code>stats</code>, <code>body</code>) and <code>cardText</code>. <code>codeCard</code>, <code>healCard</code>, and <code>roundCard</code> build cards from the same lines as the terminal summaries</td></tr>
258
258
  <tr><td><code>mcp/server.ts</code></td><td>JSON-RPC for MCP by hand: <code>initialize</code> (protocol 2025-06-18, 2025-03-26, 2024-11-05, with <code>instructions</code>), <code>ping</code>, <code>tools/list</code>, <code>tools/call</code>, <code>notifications/cancelled</code>. <code>serveHttp</code>: Streamable HTTP on 127.0.0.1, checking the bearer token in constant time (<code>tokenMatches</code>) and refusing requests whose <code>Origin</code> is not this machine (<code>originAllowed</code>), so a web page cannot call the tools; tool calls answer as an event stream with a progress notification every 10 s and a keep-alive every 15 s, so the agent runtime's per-call timeout (which resets on progress) never fires during a long suite. <code>serveStdio</code>: newline-delimited JSON-RPC for <code>forgeqe mcp</code>; closing stdin aborts running calls. <code>localToolServer</code>: a server over HTTP with a fresh token and the agent runtime's MCP entry for it, shared by the brain and the healing session</td></tr>
@@ -125,10 +125,26 @@
125
125
  the file ForgeQE's agent adds to when you ask it for a new rule.</p>
126
126
  <p>How the agents use them:</p>
127
127
  <ul>
128
- <li>Every agent gets every guardrail with its instructions, above any request, skill, ticket, page or tool output that
129
- says otherwise. When a guardrail stops part of a task, the agent skips that part and says which rule stopped it.</li>
130
- <li>At most 40 rules of up to 300 characters each are given to the agents, since each one is sent on every model call.
131
- <code>forgeqe context</code> shows how much they add.</li>
128
+ <li>
129
+ <p>A file can be for some agents only: start it with a header that names them, by their names in <code>forgeqe context</code>
130
+ (the Settings › Guardrails page writes it for you when you add a file there, pasted or uploaded):</p>
131
+ <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>---
132
+ description: &quot;Keep runs off real cards&quot;
133
+ for: engine, forgeqe-test
134
+ ---
135
+ - Use only the test cards in knowledge/test-data.md
136
+ </code></pre></div>
137
+ <p>Without a header, or with <code>for: all</code>, a file is for every agent; a header that names no agent ForgeQE has is for
138
+ every agent too, so a typo never drops a rule. Custom agents get every rule.</p>
139
+ </li>
140
+ <li>
141
+ <p>Every agent gets its guardrails with its instructions, above any request, skill, ticket, page or tool output that
142
+ says otherwise. When a guardrail stops part of a task, the agent skips that part and says which rule stopped it.</p>
143
+ </li>
144
+ <li>
145
+ <p>At most 40 rules of up to 300 characters each are given to the agents, since each one is sent on every model call.
146
+ <code>forgeqe context</code> shows how much they add.</p>
147
+ </li>
132
148
  </ul>
133
149
  <p>Guardrails are instructions, not a sandbox. What must never happen is also refused in code: hosts outside
134
150
  <code>browser.allowed_hosts</code>, pushes, secrets, protected files. Put a host rule in <code>allowed_hosts</code> as well as here.</p>
@@ -1229,7 +1229,16 @@ forgeqe suite cases.yaml --no-code --no-write-back --out .forgeqe/reports/smoke
1229
1229
  <li><strong>Cases with no story.</strong> Cases written from a page, a spec or a file are saved in an Azure DevOps area path or a Jira or Zephyr Scale project you name, compared with that area's or project's scope.</li>
1230
1230
  <li><strong>The feature's other stories.</strong> <code>sibling_cases: true</code> also compares with the cases of the other stories under the story's feature or epic (the first 30 stories; in Jira, the parent field Jira Cloud uses for epics).</li>
1231
1231
  <li><strong>Automation on Jira and Xray.</strong> A test that passes for a Jira or Xray case labels it <code>automated</code> and records the test on the issue, as Azure DevOps cases get their Associated Automation; a comment is added only when the test is new.</li>
1232
- <li><strong>Release readiness in Jira.</strong> <code>release_readiness</code> with <code>system: jira</code> reads a sprint, a fix version, an epic or story keys: each story's tests, which are automated, their last results in ForgeQE's runs, open bugs by priority, and the same verdict. Results recorded only in Xray or Zephyr Scale executions are not read.</li>
1232
+ <li><strong>Release readiness in Jira.</strong> <code>release_readiness</code> with <code>system: jira</code> reads a sprint, a fix version, an epic or story keys: each story's tests, which are automated, their last results (ForgeQE's runs, Xray test runs and Zephyr Scale executions, the newest of them), open bugs by priority, and the same verdict.</li>
1233
+ <li><strong>Matching by steps.</strong> Saving keeps an index of the scope's cases in <code>.forgeqe/cases-index/</code> (git-ignored): every case's steps read once, then only those changed since, 40 per save. A case with the same steps is found whatever its title, and a slightly reworded step still counts for extends.</li>
1234
+ <li><strong>Several changes at once.</strong> <code>apply_case_changes</code> links, extends, updates and retires several cases with one question, every change checked and read first.</li>
1235
+ <li><strong>What ForgeQE changed.</strong> Every case it creates, links, updates or retires is logged in <code>.forgeqe/history/case-changes.jsonl</code>; <code>story_test_cases</code> and the readiness report list the changes for their stories.</li>
1236
+ <li><strong>Acceptance criteria traced to cases.</strong> Saved cases carry the criteria they cover (<code>covers</code>), and <code>trace_criteria</code> records which linked cases cover which; <code>story_test_cases</code> lists each criterion with its cases, and readiness names the criteria no traced case covers.</li>
1237
+ <li><strong>Healing and test cases.</strong> When healing fixes a test because the application changed, it names the test cases that test automates (heal.md, Test cases to review), and the agent offers to update their steps.</li>
1238
+ <li><strong>From Requirements Agent.</strong> Requirements Agent writes <code>requirements.json</code> next to its report; <code>requirements_file</code> reads it, and the agent writes a case per requirement, traced by its id (FR-001).</li>
1239
+ <li><strong>qTest, TestRail and Zephyr Scale.</strong> Cases are saved in qTest (<code>module_id</code>, linked to the story's requirement), retired in TestRail (moved to <code>retired_section_id</code>) and Zephyr Scale (status Deprecated), and marked automated (TestRail's <code>automation_field</code>, Zephyr Scale's <code>automated</code> label). Sibling stories on Jira Server are found through Epic Link.</li>
1240
+ <li><strong>Settings checks.</strong> A <code>test_cases</code>, <code>new_cases</code> or retire setting ForgeQE would refuse when saving cases is refused when Settings saves it, with the setting named. In a saved Azure DevOps or Jira connection, <strong>Try</strong> beside each <code>test_cases</code> line says how many cases it finds, with a few of their titles.</li>
1241
+ <li><strong>The Test cases page</strong> (<code>forgeqe web</code>, Test cases): open a story by its system and id to see its linked cases (those older than the story's last change marked), its acceptance criteria with the cases traced to each, what ForgeQE changed, and the changes <code>save_test_cases</code> proposed. Tick the ones to make, review them, and Apply: the server checks every change again and nothing is written before Apply.</li>
1233
1242
  </ul>
1234
1243
  <p>With <code>sources.write_back: true</code> (the default), results go back after the suite:</p>
1235
1244
  <ul>
@@ -1316,11 +1325,11 @@ forgeqe suite cases.yaml --no-code --no-write-back --out .forgeqe/reports/smoke
1316
1325
  </article>
1317
1326
  <article class="spec feat" id="cap-write-test-cases">
1318
1327
  <div class="hd"><span class="mono">Test cases</span><h3>Write test cases from a story</h3></div>
1319
- <p class="ds">Writes test cases from a story's acceptance criteria and 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.</p>
1328
+ <p class="ds">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.</p>
1320
1329
  <div class="facts">
1321
1330
  <div class="fact"><span class="mono">Ask it</span><ul class="asks"><li>Write test cases for story 1234 and save them</li><li>Build an end-to-end journey from story 1234's cases</li></ul></div>
1322
1331
  <div class="fact"><span class="mono">What it needs</span><ul class="needs"><li><span class="need req">Required</span><span>Azure DevOps or Jira: set up under sources: in forgeqe.yaml, or sign in with /auth</span></li></ul></div>
1323
- <div class="fact"><span class="mono">Tools</span><p class="tools"><code>story_test_cases</code> <code>save_test_cases</code> <code>link_test_case</code> <code>e2e_journey</code></p></div>
1332
+ <div class="fact"><span class="mono">Tools</span><p class="tools"><code>story_test_cases</code> <code>save_test_cases</code> <code>link_test_case</code> <code>apply_case_changes</code> <code>trace_criteria</code> <code>requirements_file</code> <code>e2e_journey</code></p></div>
1324
1333
  </div>
1325
1334
  <div class="detail"><span class="mono">In detail</span>
1326
1335
  <p class="see">See <a href="#doc-how_to_use-where-cases-come-from">Where cases come from</a>.</p>