@capagents/forgeqe 1.0.5 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/HOW_TO_USE.md +42 -2
  2. package/docs/user-guide.html +45 -3
  3. package/package.json +1 -1
  4. package/prompts/README.md +6 -1
  5. package/prompts/api-scenarios.md +21 -10
  6. package/prompts/api-tests.md +55 -25
  7. package/prompts/brain.md +296 -135
  8. package/prompts/browser-capture.md +8 -1
  9. package/prompts/browser-case-report.md +12 -1
  10. package/prompts/browser-checks.md +22 -8
  11. package/prompts/browser-efficiency.md +1 -1
  12. package/prompts/browser-error-recovery.md +18 -6
  13. package/prompts/browser-goal-verification.md +9 -8
  14. package/prompts/browser-skill-select.md +1 -1
  15. package/prompts/domain-rule.md +16 -8
  16. package/prompts/eval-judge.md +15 -8
  17. package/prompts/explore-charters.md +19 -15
  18. package/prompts/find-tests.md +26 -16
  19. package/prompts/heal.md +32 -24
  20. package/prompts/pr-review.md +21 -13
  21. package/prompts/refine.md +30 -10
  22. package/prompts/skill-rule.md +1 -1
  23. package/prompts/test-agent.md +43 -18
  24. package/prompts/test-reviewer.md +37 -15
  25. package/prompts/test-rules.md +55 -19
  26. package/src/brain/index.ts +4 -3
  27. package/src/brain/prompt.ts +34 -2
  28. package/src/capabilities/registry.ts +12 -0
  29. package/src/cli/help.ts +1 -0
  30. package/src/cli/index.ts +21 -3
  31. package/src/mcp/reporttools.ts +101 -0
  32. package/src/mcp/tools.ts +4 -0
  33. package/src/refine.ts +53 -7
  34. package/src/ste.ts +184 -0
  35. package/src/tui/App.tsx +60 -41
  36. package/src/tui/components.tsx +49 -0
  37. package/src/tui/inspector.tsx +40 -6
  38. package/src/tui/next.ts +12 -1
  39. package/src/tui/palette.tsx +6 -2
  40. package/src/tui/refine-panel.tsx +14 -1
  41. package/src/tui/transcript.tsx +78 -2
package/HOW_TO_USE.md CHANGED
@@ -66,6 +66,7 @@ Everything ForgeQE can do, by area. ForgeQE's agent answers "can you…?" questi
66
66
  | Release | **Requirement coverage and release readiness**: Gives requirement coverage and a GO / GO WITH RISKS / NO-GO verdict for a sprint, area, epic, or stories, from test cases, results, bugs, and flaky tests; can publish it to the wiki. | `release_readiness` | [docs](#requirement-coverage-and-release-readiness) |
67
67
  | Operations | **Scheduled monitoring with alerts**: Runs checks on a schedule and alerts Teams or email when one keeps failing, and again when it recovers. | `monitor` | [docs](#9-monitoring) |
68
68
  | Operations | **Teams and email notifications**: Tells the team in Microsoft Teams channels or by email when a suite fails or passes, when a release readiness verdict is in, and when the domain evaluation falls below its gate, with the failing cases, their bugs, and links to the report and the CI build. Each channel picks its events; the agent also posts a summary to a channel when asked. | `notify` | [docs](#17-notifications) |
69
+ | Release | **Reports you can share**: Writes up what ForgeQE's agent found, such as release status across projects, open defects, or pipeline health, as a Markdown file and an HTML page in the reports folder, with a summary in the chat and links to open them. | `write_report` | [docs](#reports-from-the-agent) |
69
70
  | Operations | **CI pipelines**: Writes a GitHub Actions or Azure Pipelines workflow that runs ForgeQE, stores the secrets it needs, pushes a branch, and makes the pipeline green. | `push_branch`, `set_ci_secret` | [docs](#8-pipelines) |
70
71
  | Systems | **Work with Azure DevOps, Jira, and Confluence**: Reads anything in the configured systems (work items, issues, queries, boards, pages), makes changes the user asks for, and builds Azure DevOps dashboards and wiki pages. | `query_api`, `read_confluence`, `create_ado_dashboard`, `write_ado_wiki_page` | [docs](README.md#azure-devops-jira-and-other-systems) |
71
72
  | Setup | **Setup, skills, and documentation**: Shows the model profiles and MCP servers, installs or repairs the browser engine, creates a forgeqe.yaml, manages skills, and answers questions about ForgeQE from its documentation and this list. | `forgeqe_setup`, `capabilities` | [docs](#2-scaffold-config) |
@@ -227,8 +228,12 @@ forgeqe prompts # every prompt, what it is for, and where it
227
228
  forgeqe prompts show test-agent # the prompt as the agent gets it (includes expanded; --raw for the file)
228
229
  forgeqe prompts diff test-rules # how your copy differs from ForgeQE's
229
230
  forgeqe prompts reset test-rules # back to ForgeQE's (yours is kept as test-rules.md.bak)
231
+ forgeqe prompts check # how closely each prompt follows ASD-STE100 (exits 1 when one is below 80%)
232
+ forgeqe prompts check brain # the sentences to fix in one prompt, with the rule each one breaks
230
233
  ```
231
234
 
235
+ **Writing style: ASD-STE100.** Every prompt ForgeQE ships is written in ASD-STE100 Simplified Technical English, so each agent reads one clear instruction at a time: an instruction has 20 words or fewer and a description 25 or fewer, one instruction per sentence, the active voice in instructions, and approved words ("make sure", not "ensure"; "for example", not "e.g."). `forgeqe prompts check` scores each prompt in use, ForgeQE's or your edited copy, as the share of sentences that keep these rules; ForgeQE's own are held to at least 80% by its tests. Write your edits the same way. The check covers the rules that can be measured in text and a list of common words the standard does not approve; the standard's full approved-word dictionary is licensed and not included.
236
+
232
237
  **Product knowledge.** Fill in the templates (or add your own `.md` and `.txt` files, in folders if you like), one topic per `##` heading. ForgeQE's agent sees the list and reads what a request needs; the exploratory and API scenario planners get the sections that match their story or scenario; the browser agent gets the few sections that clearly match its goal, at most `knowledge.browser_max_chars` (1500 by default; 0 turns it off). Untouched templates are left out, so their examples never reach an agent. Never put passwords or tokens there: use logins and environment variables.
233
238
 
234
239
  ### Signing in to your tools
@@ -366,6 +371,18 @@ While a run is going, the bar under the prompt shows a spinner, the tokens used,
366
371
 
367
372
  The text is the agent's own result. Failed runs show `✗ Task failed` with the reason, and stopped runs show `■ Run stopped`. `forgeqe run` prints the same summary at the end.
368
373
 
374
+ ### Reports from the agent
375
+
376
+ Ask for a report and ForgeQE's agent writes one you can share: "create a release report for all projects", "write up the open defects", "summarise this sprint's test results as a report". It gathers the facts with its tools (Azure DevOps, Jira, the runs it made), then saves the report with `write_report` as a Markdown file and an HTML page in the reports folder (`export.out_dir`, `.forgeqe/reports/` by default):
377
+
378
+ ```
379
+ .forgeqe/reports/release-status-all-projects-20261009-001512/
380
+ report.md # to edit, paste into a wiki, or attach
381
+ report.html # to open or share; light and dark, tables scroll on a phone
382
+ ```
383
+
384
+ The chat gets a short summary and a card with both paths as links, and **Open the report** appears as a next step. The report holds only what the agent read in that request. To post it, ask for it ("post the report to the release channel") once `notify.channels` is set up; the reports folder is linked when it is served (`notify.report_url`).
385
+
369
386
  ### The screen
370
387
 
371
388
  On a terminal 120 columns wide or more, the shell splits in two once you send a request:
@@ -375,6 +392,12 @@ On a terminal 120 columns wide or more, the shell splits in two once you send a
375
392
 
376
393
  On a narrower terminal the chat fills the screen, and Ctrl-O switches between the chat and the same panels.
377
394
 
395
+ **Buttons.** Under the prompt: **✦ Refine** (Ctrl-R; it fills in once there is text to refine) and **⌕ Search** (Ctrl-P, the command palette); while a request runs, **■ Stop** (Esc) takes Refine's place. In the status line above the panels: **▦ Panels** (Shift-Tab) and **⤢ Wide chat**, which gives the conversation the whole width for reading a long answer; **◧ Split view**, under the prompt, brings the panels back. On a narrow terminal, **◧ Details** (Ctrl-O) and **⇄ Profile** (Tab) are under the prompt. Each is clickable.
396
+
397
+ **Progress.** While a request runs, the status line above the panels shows a bar for how far the agent's plan has got (`███████░░░░░ 2/3`), or the suite's cases while a suite runs.
398
+
399
+ **Replies.** The agent's answers lead with the answer, then short headed sections; lists keep their bullets in a column, so a wrapped line stays under its text instead of running back to the margin.
400
+
378
401
  **Moving between panels.** Shift-Tab (or a click) moves the keys from the prompt to Plan, Activity, then Files; the focused panel's border lights up and shows its keys. Esc, or typing, goes back to the prompt.
379
402
 
380
403
  | Panel | Keys |
@@ -391,9 +414,26 @@ On a narrower terminal the chat fills the screen, and Ctrl-O switches between th
391
414
 
392
415
  **`/` and `@` in the prompt.** Typing `/` lists the commands that match; typing `@` suggests references: recent runs (*last run*, then each by its folder), files in the repository by name or path (`@Login` finds `pages/Login.ts`), and, after `@` and a number such as `@1761`, the Azure DevOps work item with its title (read-only). Tab completes, ↑/↓ choose, Esc closes the list.
393
416
 
394
- **Refine.** Ctrl-R (or *Refine my request* in the palette) turns what you typed into a precise request before it is sent. A read-only agent checks it against this setup: what ForgeQE can do here, the systems that are set up, the project's sprints and test cases, and recent runs. It shows the refined request with what it **checked** ✓, what it **assumed** ~, and what is **missing** ?. Enter uses it, `e` puts it in the prompt to edit, Esc keeps yours. Refine never runs anything, writes files, or changes a work item.
417
+ **Refine.** Ctrl-R (or *Refine my request* in the palette) turns what you typed into a task specification for ForgeQE's agent, in ASD-STE100 Simplified Technical English, before it is sent:
418
+
419
+ ```
420
+ Goal: Check the Azure DevOps QI-Payments pipelines and make a shareable report for the manager.
421
+
422
+ Context:
423
+ - Project: Azure DevOps project QI-Payments.
424
+ - Pipeline: build definition 32, QI-Payments-CD.
425
+ - Latest checked CD build: build 1021, failed, finished 2026-09-21.
426
+
427
+ Steps:
428
+ 1. Review the recent runs of QI-Payments-CI and QI-Payments-CD.
429
+ 2. Make a shareable report with a short manager summary.
430
+
431
+ Result: A shareable report file with a short summary for the manager.
432
+ ```
433
+
434
+ A read-only agent writes it. It starts knowing every capability and whether it works in this setup, and the domain; it checks names and ids in the systems that are set up (work items, test plans, pipelines, sprints, recent runs). The panel shows the request with what it **checked** ✓, what it **assumed** ~, and what is **missing** ? (for example "Which story? Give the work item id"); a capability that is not set up shows as missing too. Enter sends it, `e` puts it in the prompt to edit, Esc keeps yours. Refine never runs anything, writes files, or changes a work item; it never invents an id, URL, project, or file.
395
435
 
396
- **Next steps.** When a request finishes, up to three suggestions appear above the prompt, such as *Write a test for this run*, *Why did it fail?*, *Open the report*, or *Rerun the cases that failed*. Click one or press Alt-1 to Alt-3; suggestions that start work are put in the prompt first.
436
+ **Next steps.** When a request finishes, up to three suggestions appear above the prompt: from what it produced (*Open the report*, *Write a test for this run*, *Why did it fail?*, *Rerun the cases that failed*) and from the agent's answer, which suggests the follow-ups you are likely to want (*Write a release report*, *Show the failed CD logs*). Click one or press Alt-1 to Alt-3; suggestions that start work are put in the prompt first, to adjust and send.
397
437
 
398
438
  | Key | Action |
399
439
  |-----|--------|
@@ -286,7 +286,7 @@ forgeqe docs --copy ./docs # copy the guide, the architecture page, and the re
286
286
  <div class="area"><a class="area-name" href="#area-pull-requests"><span class="mono">Pull requests</span></a><ul class="tiles"><li><a class="tile" href="#cap-pr-review"><b>Review pull requests</b><span>Review PR 42 and focus on error handling</span></a></li><li><a class="tile" href="#cap-pr-impact"><b>Pull request impact and test selection</b><span>What does PR 42 impact?</span></a></li></ul></div>
287
287
  <div class="area"><a class="area-name" href="#area-api"><span class="mono">API</span></a><ul class="tiles"><li><a class="tile" href="#cap-api-testing"><b>API and contract testing</b><span>Turn the last run's API calls into tests</span></a></li></ul></div>
288
288
  <div class="area"><a class="area-name" href="#area-quality"><span class="mono">Quality</span></a><ul class="tiles"><li><a class="tile" href="#cap-accessibility-performance"><b>Accessibility and page performance</b><span>Is the checkout page accessible?</span></a></li><li><a class="tile" href="#cap-visual-comparison"><b>Visual comparison with baselines</b><span>What changed visually since the last run?</span></a></li></ul></div>
289
- <div class="area"><a class="area-name" href="#area-release"><span class="mono">Release</span></a><ul class="tiles"><li><a class="tile" href="#cap-release-readiness"><b>Requirement coverage and release readiness</b><span>Are we ready to release?</span></a></li></ul></div>
289
+ <div class="area"><a class="area-name" href="#area-release"><span class="mono">Release</span></a><ul class="tiles"><li><a class="tile" href="#cap-release-readiness"><b>Requirement coverage and release readiness</b><span>Are we ready to release?</span></a></li><li><a class="tile" href="#cap-reports"><b>Reports you can share</b><span>Create a release report for all projects</span></a></li></ul></div>
290
290
  <div class="area"><a class="area-name" href="#area-operations"><span class="mono">Operations</span></a><ul class="tiles"><li><a class="tile" href="#cap-monitoring"><b>Scheduled monitoring with alerts</b><span>Check the login flow every 15 minutes and alert Teams</span></a></li><li><a class="tile" href="#cap-notifications"><b>Teams and email notifications</b><span>Post the results to the QA channel</span></a></li><li><a class="tile" href="#cap-pipelines"><b>CI pipelines</b><span>Add a GitHub Actions workflow that runs tests/cases.yaml on every PR, and make it green</span></a></li></ul></div>
291
291
  <div class="area"><a class="area-name" href="#area-systems"><span class="mono">Systems</span></a><ul class="tiles"><li><a class="tile" href="#cap-systems"><b>Work with Azure DevOps, Jira, and Confluence</b><span>Show the open bugs in this sprint</span></a></li></ul></div>
292
292
  <div class="area"><a class="area-name" href="#area-setup"><span class="mono">Setup</span></a><ul class="tiles"><li><a class="tile" href="#cap-setup-help"><b>Setup, skills, and documentation</b><span>What can you do?</span></a></li></ul></div>
@@ -428,7 +428,10 @@ bun src/index.ts init --global --profile azure-gpt4o
428
428
  forgeqe prompts show test-agent # the prompt as the agent gets it (includes expanded; --raw for the file)
429
429
  forgeqe prompts diff test-rules # how your copy differs from ForgeQE's
430
430
  forgeqe prompts reset test-rules # back to ForgeQE's (yours is kept as test-rules.md.bak)
431
+ forgeqe prompts check # how closely each prompt follows ASD-STE100 (exits 1 when one is below 80%)
432
+ forgeqe prompts check brain # the sentences to fix in one prompt, with the rule each one breaks
431
433
  </code></pre>
434
+ <p><strong>Writing style: ASD-STE100.</strong> Every prompt ForgeQE ships is written in ASD-STE100 Simplified Technical English, so each agent reads one clear instruction at a time: an instruction has 20 words or fewer and a description 25 or fewer, one instruction per sentence, the active voice in instructions, and approved words (&quot;make sure&quot;, not &quot;ensure&quot;; &quot;for example&quot;, not &quot;e.g.&quot;). <code>forgeqe prompts check</code> scores each prompt in use, ForgeQE's or your edited copy, as the share of sentences that keep these rules; ForgeQE's own are held to at least 80% by its tests. Write your edits the same way. The check covers the rules that can be measured in text and a list of common words the standard does not approve; the standard's full approved-word dictionary is licensed and not included.</p>
432
435
  <p><strong>Product knowledge.</strong> Fill in the templates (or add your own <code>.md</code> and <code>.txt</code> files, in folders if you like), one topic per <code>##</code> heading. ForgeQE's agent sees the list and reads what a request needs; the exploratory and API scenario planners get the sections that match their story or scenario; the browser agent gets the few sections that clearly match its goal, at most <code>knowledge.browser_max_chars</code> (1500 by default; 0 turns it off). Untouched templates are left out, so their examples never reach an agent. Never put passwords or tokens there: use logins and environment variables.</p>
433
436
  </div></section>
434
437
  <section class="doc sub" id="doc-how_to_use-signing-in-to-your-tools"><h4>Signing in to your tools</h4><div class="prose"><p>Instead of copying tokens into <code>.env</code>, sign in once and ForgeQE saves the token in your system's credential store: the macOS Keychain, Windows Credential Manager, or the Secret Service keyring on Linux. On a machine without one, such as a headless Linux box, it uses <code>~/.forgeqe/credentials.json</code>, readable only by you.</p>
@@ -550,6 +553,9 @@ Add a GitHub Actions workflow that runs tests/cases.yaml on every PR, and make i
550
553
  <li><strong>Right (60%)</strong>: a status line with who is working, for how long, and a <strong>■ Stop</strong> button (a running suite adds a progress bar, <code>██████░░░░░░ 5/8</code>); then <strong>Plan</strong> (the agent's to-do list, then each browser step or suite case with ✓, ✗ and why, ◐ running), <strong>Activity</strong> (every tool call, browser step, and the agents' reasoning), <strong>Files</strong> (each file read ◉, written ✚, or edited ✎, newest first), <strong>Context</strong> (how full the model's context window is, and the skills, product knowledge, domain, and MCP servers in it), and <strong>Tokens</strong> (total, input, output, cached; no prices, which are in reports and <code>forgeqe models</code>).</li>
551
554
  </ul>
552
555
  <p>On a narrower terminal the chat fills the screen, and Ctrl-O switches between the chat and the same panels.</p>
556
+ <p><strong>Buttons.</strong> Under the prompt: <strong>✦ Refine</strong> (Ctrl-R; it fills in once there is text to refine) and <strong>⌕ Search</strong> (Ctrl-P, the command palette); while a request runs, <strong>■ Stop</strong> (Esc) takes Refine's place. In the status line above the panels: <strong>▦ Panels</strong> (Shift-Tab) and <strong>⤢ Wide chat</strong>, which gives the conversation the whole width for reading a long answer; <strong>◧ Split view</strong>, under the prompt, brings the panels back. On a narrow terminal, <strong>◧ Details</strong> (Ctrl-O) and <strong>⇄ Profile</strong> (Tab) are under the prompt. Each is clickable.</p>
557
+ <p><strong>Progress.</strong> While a request runs, the status line above the panels shows a bar for how far the agent's plan has got (<code>███████░░░░░ 2/3</code>), or the suite's cases while a suite runs.</p>
558
+ <p><strong>Replies.</strong> The agent's answers lead with the answer, then short headed sections; lists keep their bullets in a column, so a wrapped line stays under its text instead of running back to the margin.</p>
553
559
  <p><strong>Moving between panels.</strong> Shift-Tab (or a click) moves the keys from the prompt to Plan, Activity, then Files; the focused panel's border lights up and shows its keys. Esc, or typing, goes back to the prompt.</p>
554
560
  <div class="tbl"><table>
555
561
  <thead>
@@ -565,8 +571,22 @@ Add a GitHub Actions workflow that runs tests/cases.yaml on every PR, and make i
565
571
  <p><strong>Setup checklist.</strong> Until everything is set up, the start screen shows what most features rest on: <strong>Model</strong> (a live model profile), <strong>Coding agent</strong>, <strong>Work items</strong> (Azure DevOps, Jira, TestRail, Zephyr, qTest, or Xray), <strong>Domain</strong>, and <strong>Notifications</strong>, each ✓ or ○. Click an open item to see how to set it up; <strong>Work items</strong> starts <code>/auth</code>. The checks are the same ones <code>/features</code> uses, so the two always agree.</p>
566
572
  <p><strong>Command palette.</strong> Ctrl-P opens a palette of every action, command, profile, and example request; type a few letters to find one (&quot;rr&quot; finds <em>Refine my request</em>, &quot;auth&quot; finds the sign-in commands), ↑/↓ to choose, Enter to run it. Example requests are put in the prompt for you to edit, never sent straight away.</p>
567
573
  <p><strong><code>/</code> and <code>@</code> in the prompt.</strong> Typing <code>/</code> lists the commands that match; typing <code>@</code> suggests references: recent runs (<em>last run</em>, then each by its folder), files in the repository by name or path (<code>@Login</code> finds <code>pages/Login.ts</code>), and, after <code>@</code> and a number such as <code>@1761</code>, the Azure DevOps work item with its title (read-only). Tab completes, ↑/↓ choose, Esc closes the list.</p>
568
- <p><strong>Refine.</strong> Ctrl-R (or <em>Refine my request</em> in the palette) turns what you typed into a precise request before it is sent. A read-only agent checks it against this setup: what ForgeQE can do here, the systems that are set up, the project's sprints and test cases, and recent runs. It shows the refined request with what it <strong>checked</strong> ✓, what it <strong>assumed</strong> ~, and what is <strong>missing</strong> ?. Enter uses it, <code>e</code> puts it in the prompt to edit, Esc keeps yours. Refine never runs anything, writes files, or changes a work item.</p>
569
- <p><strong>Next steps.</strong> When a request finishes, up to three suggestions appear above the prompt, such as <em>Write a test for this run</em>, <em>Why did it fail?</em>, <em>Open the report</em>, or <em>Rerun the cases that failed</em>. Click one or press Alt-1 to Alt-3; suggestions that start work are put in the prompt first.</p>
574
+ <p><strong>Refine.</strong> Ctrl-R (or <em>Refine my request</em> in the palette) turns what you typed into a task specification for ForgeQE's agent, in ASD-STE100 Simplified Technical English, before it is sent:</p>
575
+ <pre><code>Goal: Check the Azure DevOps QI-Payments pipelines and make a shareable report for the manager.
576
+
577
+ Context:
578
+ - Project: Azure DevOps project QI-Payments.
579
+ - Pipeline: build definition 32, QI-Payments-CD.
580
+ - Latest checked CD build: build 1021, failed, finished 2026-09-21.
581
+
582
+ Steps:
583
+ 1. Review the recent runs of QI-Payments-CI and QI-Payments-CD.
584
+ 2. Make a shareable report with a short manager summary.
585
+
586
+ Result: A shareable report file with a short summary for the manager.
587
+ </code></pre>
588
+ <p>A read-only agent writes it. It starts knowing every capability and whether it works in this setup, and the domain; it checks names and ids in the systems that are set up (work items, test plans, pipelines, sprints, recent runs). The panel shows the request with what it <strong>checked</strong> ✓, what it <strong>assumed</strong> ~, and what is <strong>missing</strong> ? (for example &quot;Which story? Give the work item id&quot;); a capability that is not set up shows as missing too. Enter sends it, <code>e</code> puts it in the prompt to edit, Esc keeps yours. Refine never runs anything, writes files, or changes a work item; it never invents an id, URL, project, or file.</p>
589
+ <p><strong>Next steps.</strong> When a request finishes, up to three suggestions appear above the prompt: from what it produced (<em>Open the report</em>, <em>Write a test for this run</em>, <em>Why did it fail?</em>, <em>Rerun the cases that failed</em>) and from the agent's answer, which suggests the follow-ups you are likely to want (<em>Write a release report</em>, <em>Show the failed CD logs</em>). Click one or press Alt-1 to Alt-3; suggestions that start work are put in the prompt first, to adjust and send.</p>
570
590
  <div class="tbl"><table>
571
591
  <thead>
572
592
  <tr><th>Key</th><th>Action</th></tr>
@@ -1559,6 +1579,28 @@ forgeqe visual approve --page /home # make this run's /home the baseline (asks
1559
1579
  </section>
1560
1580
  </div>
1561
1581
  </article>
1582
+ <article class="spec feat" id="cap-reports">
1583
+ <div class="hd"><span class="mono">Release</span><h3>Reports you can share</h3></div>
1584
+ <p class="ds">Writes up what ForgeQE's agent found, such as release status across projects, open defects, or pipeline health, as a Markdown file and an HTML page in the reports folder, with a summary in the chat and links to open them.</p>
1585
+ <div class="facts">
1586
+ <div class="fact"><span class="mono">Ask it</span><ul class="asks"><li>Create a release report for all projects</li><li>Write up the open defects as a report I can share</li></ul></div>
1587
+ <div class="fact"><span class="mono">What it needs</span><ul class="needs"><li><span class="need req">Required</span><span>A live model profile in llms.json (an API key or Microsoft Entra ID sign-in)</span></li></ul></div>
1588
+ <div class="fact"><span class="mono">Limits</span><ul class="plainlist"><li>The report holds what the agent read with its tools in this request; it does not invent figures, and it does not publish the page anywhere unless the reports folder is served (notify.report_url).</li></ul></div>
1589
+ <div class="fact"><span class="mono">Tools</span><p class="tools"><code>write_report</code></p></div>
1590
+ </div>
1591
+ <div class="detail"><span class="mono">In detail</span>
1592
+ <section class="doc" id="doc-how_to_use-reports-from-the-agent">
1593
+ <h4>Reports from the agent</h4>
1594
+ <div class="prose"><p>Ask for a report and ForgeQE's agent writes one you can share: &quot;create a release report for all projects&quot;, &quot;write up the open defects&quot;, &quot;summarise this sprint's test results as a report&quot;. It gathers the facts with its tools (Azure DevOps, Jira, the runs it made), then saves the report with <code>write_report</code> as a Markdown file and an HTML page in the reports folder (<code>export.out_dir</code>, <code>.forgeqe/reports/</code> by default):</p>
1595
+ <pre><code>.forgeqe/reports/release-status-all-projects-20261009-001512/
1596
+ report.md # to edit, paste into a wiki, or attach
1597
+ report.html # to open or share; light and dark, tables scroll on a phone
1598
+ </code></pre>
1599
+ <p>The chat gets a short summary and a card with both paths as links, and <strong>Open the report</strong> appears as a next step. The report holds only what the agent read in that request. To post it, ask for it (&quot;post the report to the release channel&quot;) once <code>notify.channels</code> is set up; the reports folder is linked when it is served (<code>notify.report_url</code>).</p>
1600
+ </div>
1601
+ </section>
1602
+ </div>
1603
+ </article>
1562
1604
  </section>
1563
1605
  <section class="chapter" id="area-operations" aria-labelledby="area-operations-h">
1564
1606
  <header class="chead"><span class="mono">11</span><h2 id="area-operations-h">Operations</h2><p>Monitoring and CI pipelines</p></header>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capagents/forgeqe",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "ForgeQE: a browser agent CLI that runs goals and test cases in Chrome and turns passing runs into tests in your repo",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/prompts/README.md CHANGED
@@ -16,7 +16,7 @@ project; leave it as it is to keep getting ForgeQE's improvements when you updat
16
16
  | api-scenarios.md | Plans API scenarios from test cases or plain English |
17
17
  | explore-charters.md | Plans exploratory charters for a story |
18
18
  | eval-judge.md | Scores the agent's test cases in `forgeqe eval domain` |
19
- | refine.md | Refine (ctrl+r) in the shell: makes what you typed precise, checked against what ForgeQE knows |
19
+ | refine.md | Refine (ctrl+r) in the shell: turns what you typed into a task specification (Goal, Context, Steps, Rules, Result), checked against what ForgeQE knows |
20
20
  | skill-rule.md | How agents use skills (included in most prompts) |
21
21
  | domain-rule.md | How agents apply the product's industry risks and regulations, declared or worked out (included in every agent that analyses requirements or designs, writes, reviews, or heals tests) |
22
22
  | browser-*.md | The browser agent: error recovery, when a goal counts as done, recording checks, clicking so runs become tests, step verdicts for test cases, picking skills |
@@ -32,4 +32,9 @@ How it works:
32
32
  - `forgeqe prompts` lists every prompt and where it comes from; `forgeqe prompts diff <name>` shows how yours differs
33
33
  from ForgeQE's (and warns when ForgeQE's changed after you edited yours); `forgeqe prompts reset <name>` goes back
34
34
  to ForgeQE's (yours is kept as `<name>.md.bak`).
35
+ - `forgeqe prompts check` scores each prompt against ASD-STE100 Simplified Technical English; `forgeqe prompts check
36
+ <name>` lists the sentences to fix. ForgeQE's own prompts keep at least 80% of their sentences to these rules:
37
+ - An instruction has 20 words or fewer. A description has 25 words or fewer.
38
+ - Give one instruction in each sentence. Start an instruction with a verb, in the active voice.
39
+ - Use approved words: "make sure", not "ensure"; "for example", not "e.g."; "use", not "utilize".
35
40
  - Changes to these prompts change how the agents behave: test a change on a few runs before you commit it.
@@ -3,19 +3,30 @@ name: api-scenarios
3
3
  description: "Plans end-to-end API scenarios from test cases or plain English, against an API's operations."
4
4
  used_by: "api_scenarios from cases or text"
5
5
  ---
6
- You plan end-to-end API test scenarios. You get a list of an API's operations (each with its method, path, an example call, its answer's key fields, whether it needs auth, and whether it changes data) and either test cases or a scenario in plain English. You write each scenario as API calls in order. You do not call the API and do not change files.
6
+ You plan end-to-end API test scenarios. You get a list of the operations of an API. For each operation, the list gives its method, its path, an example call, the key fields of its answer, whether it needs auth, and whether it changes data. You also get test cases, or a scenario in plain English. Write each scenario as API calls in sequence. You do not call the API, and you do not change files.
7
7
 
8
8
  Rules:
9
- - Use only operations from the list, by their exact id. When a step of the scenario has no operation that does it, do not invent an endpoint: name the step under unmatched.
10
- - Each step's path is the operation's example path with real values, or {{name}} where the value comes from an earlier answer. Save such values from the answer that gives them: save lists variable names and their path in that answer's JSON body (id, data.order.id, items[0].sku). Never use a variable before a step saves it.
11
- - Data the scenario creates must be new on every run: put {{$unique}} in emails, usernames, names, and references (user+{{$unique}}@example.com). {{$uuid}}, {{$now}}, and {{$randomInt}} are there too. Test data the case gives (a product, a coupon code) is used as given.
12
- - Checks: each step expects the status the operation gives on success, unless the case expects a refusal (then the refusal's status, e.g. 400, 401, 403, 404, 409, 422; list the acceptable ones). Put what the case's expected results say into expect_fields: a field path in that step's answer, with equals_json for a value that must hold (a status, a total the case states, a currency) or type for a field that must be there.
13
- - A scenario that creates data ends by deleting it when the API has an operation for that; also list those deletes under cleanup, which ForgeQE runs when the scenario fails part-way.
14
- - no_auth: true only for a step that checks a call without credentials is refused.
15
- - One scenario per test case, with its case_id. For plain English, one scenario unless it clearly describes several.
16
- - Keep the steps the scenario needs, no more: the API equivalent of what the case does and checks.
9
+ - Use only operations from the list, with their exact id.
10
+ - If no operation does a step of the scenario, do not invent an endpoint. Put the step under unmatched.
11
+ - For the path of each step, use the example path of the operation with real values.
12
+ - Write {{name}} where a value comes from an earlier answer.
13
+ - Save that value from the answer that gives it. In save, list the variable names and their paths in the JSON body of that answer, for example id, data.order.id, or items[0].sku.
14
+ - Do not use a variable before a step saves it.
15
+ - The data that the scenario creates must be new on each run. Put {{$unique}} in emails, usernames, names, and references, for example user+{{$unique}}@example.com.
16
+ - You can also use {{$uuid}}, {{$now}}, and {{$randomInt}}.
17
+ - Use the test data that the case gives (a product, a coupon code) as the case gives it.
18
+ - Checks: each step expects the status that the operation gives on success.
19
+ - If the case expects a refusal, expect the status of that refusal, for example 400, 401, 403, 404, 409, or 422. List all the statuses that are acceptable.
20
+ - Put what the expected results of the case say into expect_fields. Give a field path in the answer of that step.
21
+ - Use equals_json for a value that must be true, for example a status, a total that the case states, or a currency. Use type for a field that must be in the answer.
22
+ - A scenario that creates data must delete that data at the end, when the API has an operation for this.
23
+ - Also list those deletes under cleanup. ForgeQE runs cleanup when the scenario fails before it ends.
24
+ - Set no_auth to true only for a step that checks that the API refuses a call without credentials.
25
+ - Plan one scenario for each test case, with its case_id.
26
+ - For plain English, plan one scenario. Plan more only when the text clearly describes more than one.
27
+ - Keep only the steps that the scenario needs: the API equivalent of what the case does and checks.
17
28
 
18
29
  {{> domain-rule}}
19
- Plan scenarios for these too, where the API touches them: repeated and concurrent requests, each role's access, personal data in responses, and the records an obligation requires.
30
+ Where the API touches these items, plan scenarios for them too: repeated and concurrent requests, the access of each role, personal data in answers, and the records that an obligation needs.
20
31
 
21
32
  Finish with the structured result.
@@ -3,37 +3,67 @@ name: api-tests
3
3
  description: "Writes API and contract tests (and end-to-end API scenarios) in the repository's own framework."
4
4
  used_by: "write_api_tests, forgeqe api tests"
5
5
  ---
6
- You are a senior test automation engineer working inside an existing repository. You write API and contract tests: tests that call an application's API directly (no browser) and check its answers.
6
+ You are a senior test automation engineer in a repository that has tests. You write API and contract tests. These tests call the API of an application directly, without a browser, and check its answers.
7
7
 
8
- ForgeQE gives you a set of contracts: for each API operation, one example call (method, path, headers, body) and what the answer must look like: the status, the content type, the body's schema, and key fields (a few fields with their types, and a value only where it must not change, like a status). Contracts come from an API description (OpenAPI or Swagger, WSDL, GraphQL, .proto) or from the calls the application made while ForgeQE's browser used it.
8
+ ForgeQE gives you a set of contracts. For each API operation, a contract gives one example call (method, path, headers, body). It also tells what the answer must be: the status, the content type, the schema of the body, and key fields. Key fields are a few fields with their types. They have a value only where the value must not change, for example a status. Contracts come from an API description (OpenAPI or Swagger, WSDL, GraphQL, .proto). Or they come from the calls that the application made while the browser of ForgeQE used it.
9
9
 
10
- Know the repository:
11
- - Find the test framework, how one test or file is run, and what the repository already uses to call HTTP APIs in tests (Playwright's request fixture / APIRequestContext, supertest, axios, requests or httpx with pytest, REST Assured, RestSharp or HttpClient with NUnit or xUnit, Karate...). Use that. When it has none, use the one that fits its framework (Playwright Test: the request fixture; pytest: requests; JUnit: REST Assured; .NET: HttpClient) and add the dependency.
12
- - If the repository has no tests at all, add Playwright Test with TypeScript and use its request fixture.
10
+ Learn the repository:
11
+ - Find the test framework, and how to run one test or one file.
12
+ - Find what the repository uses to call HTTP APIs in tests, and use it. Examples are the request fixture or APIRequestContext of Playwright, supertest, axios, requests or httpx with pytest, REST Assured, RestSharp or HttpClient with NUnit or xUnit, and Karate.
13
+ - If it has none, use the one that fits its framework, and add the dependency. For Playwright Test, use the request fixture. For pytest, use requests. For JUnit, use REST Assured. For .NET, use HttpClient.
14
+ - If the repository has no tests, add Playwright Test with TypeScript, and use its request fixture.
13
15
 
14
16
  {{> skill-rule}}
15
17
 
16
18
  Write the tests:
17
- - One test per contract you are given, grouped in one file per API or resource (or the repository's layout for API tests). Name each test after the operation, e.g. "GET /api/orders/{id} returns the order".
18
- - Each test makes the example call and checks: the status; the content type; the body against the schema (with the repository's schema validator when it has one, such as ajv, jsonschema, or Json.NET Schema; else assert each required field and its type); and the key fields. A key field with a value is checked for that value; others only for being present with the right type. Never assert values that change with data (ids, names, totals, dates) unless the contract pins them.
19
- - GraphQL: POST the query and variables, and also check the answer has no errors array. SOAP: POST the envelope with its SOAPAction or content type, and check there is no Fault and the listed elements are present. gRPC: use the repository's gRPC client or grpcurl in a test helper; check the status code is OK and the fields.
20
- - The base URL comes from configuration, never hardcoded in a test: the repository's existing setting (baseURL in playwright.config, an env file, appsettings) or an environment variable API_BASE_URL with the given base URL as its default.
21
- - Credentials come only from environment variables. ForgeQE gives the variable names to read (for example API_TOKEN), never the values. Never print them.
22
- - Test data lives in the test or the repository's data files: path parameters, query values, and bodies as parameters or fixtures. A contract that says it needs real values gets them from environment variables or data files the user fills in, with a clear skip when they are missing, not made-up values that would fail.
23
- - A contract that changes data (POST, PUT, PATCH, DELETE, mutations) is only written when ForgeQE asks for it; then create what it needs in the test and clean up after it where the API allows.
24
- - Follow the repository's conventions and standards (naming, folders, lint rules, assertion style). The build must not gain warnings.
25
- - Never delete, revert, or move a file you did not create in this job. ForgeQE's files (.forgeqe/, forgeqe.yaml, llms.json) belong to ForgeQE.
26
-
27
- Scenarios (calls in order, each using values earlier answers gave):
28
- - Before writing, map the repository's existing API layer: its API clients, request helpers, page-object-like service classes, auth and base URL fixtures, data builders, and schemas. For each operation a scenario calls, use the helper that already calls it (e.g. CartApi.create()); add a helper only for operations that have none, in the same style and place as the others.
29
- - Reuse helpers, never tests: a scenario calls helpers, it never runs another test as a step. Each scenario test sets up its own data and passes values from one call to the next in variables ({{orderId}} in the plan).
30
- - Change a shared helper only by adding to it (a new optional parameter, a new method), so tests that already use it keep working. When you change a helper other tests use, report a command that runs those tests as regression_command; ForgeQE runs it too.
31
- - {{$unique}} in the plan means a value that is new on every run: generate it in the test (a timestamp or random suffix). Cleanup steps go in the test's teardown (afterEach, finally, fixture teardown) and run even when a step fails.
32
- - Name each scenario's test after its test case when it has one, e.g. "ADO-2238 Customer orders with a coupon", and report each scenario's test name in scenario_tests.
33
-
34
- Running them: do not run the tests yourself. When you reply, ForgeQE runs the command you report and, if it fails, sends you the output. A failure is a test problem, or a real difference between the API and its contract: when the API answers differently from the contract on a point the contract got from a single observation (a field that is optional, a status that varies), fix the test to the rule that holds; when the API is clearly wrong (a 500, a missing required field), keep the check and say so in notes.
19
+ - Write one test for each contract that you get. Put the tests in one file for each API or resource, or use the layout of the repository for API tests.
20
+ - Name each test after its operation, for example "GET /api/orders/{id} returns the order".
21
+ - Each test makes the example call. It checks the status, the content type, the body against the schema, and the key fields.
22
+ - To check the schema, use the schema validator of the repository when it has one, such as ajv, jsonschema, or Json.NET Schema. If not, assert each required field and its type.
23
+ - Check a key field that has a value for that value. Check the other key fields only for their presence and type.
24
+ - Do not assert values that change with data (ids, names, totals, dates), unless the contract gives them.
25
+ - GraphQL: POST the query and the variables. Also make sure that the answer has no errors array.
26
+ - SOAP: POST the envelope with its SOAPAction or content type. Make sure that there is no Fault, and that the listed elements are in the answer.
27
+ - gRPC: use the gRPC client of the repository, or grpcurl in a test helper. Make sure that the status code is OK, and check the fields.
28
+ - Take the base URL from the configuration. Do not write it in a test.
29
+ - Use the setting that the repository has (baseURL in playwright.config, an env file, appsettings). Or use an environment variable API_BASE_URL, with the base URL that you get as its default.
30
+ - Take credentials only from environment variables. ForgeQE gives the names of the variables (for example API_TOKEN), not the values. Do not print them.
31
+ - Put test data in the test or in the data files of the repository. Give path parameters, query values, and bodies as parameters or fixtures.
32
+ - Some contracts say that they need real values. Get these values from environment variables or data files that the user fills in. If they are missing, skip the test with a clear message. Do not invent values that will fail.
33
+ - Write a contract that changes data (POST, PUT, PATCH, DELETE, mutations) only when ForgeQE asks for it.
34
+ - Then create what it needs in the test. Remove that data after the test, where the API allows it.
35
+ - Follow the conventions and standards of the repository: names, folders, lint rules, and assertion style. The build must not get more warnings.
36
+ - Do not delete, revert, or move a file that you did not make in this job. The files .forgeqe/, forgeqe.yaml, and llms.json belong to ForgeQE.
37
+
38
+ Scenarios (calls in sequence; each call uses values that earlier answers gave):
39
+ - Before you write, find the API layer of the repository. This includes its API clients, request helpers, service classes like page objects, auth and base URL fixtures, data builders, and schemas.
40
+ - For each operation that a scenario calls, use the helper that calls it now, for example CartApi.create().
41
+ - Add a helper only for an operation that has no helper. Use the same style and place as the other helpers.
42
+ - Use helpers again, but not tests. A scenario calls helpers. It does not run a different test as a step.
43
+ - Each scenario test sets up its own data. It gives values from one call to the next in variables ({{orderId}} in the plan).
44
+ - Change a shared helper only by adding to it, for example a new optional parameter or a new method. The tests that use it then continue to work.
45
+ - When you change a helper that other tests use, report a command that runs those tests as regression_command. ForgeQE runs it too.
46
+ - {{$unique}} in the plan is a value that is new on each run. Make it in the test, for example from a timestamp or a random suffix.
47
+ - Put cleanup steps in the teardown of the test (afterEach, finally, fixture teardown). They run also when a step fails.
48
+ - When a scenario has a test case, name its test after the test case, for example "ADO-2238 Customer orders with a coupon".
49
+ - Report the test name of each scenario in scenario_tests.
50
+
51
+ How the tests run:
52
+ - Do not run the tests yourself. When you reply, ForgeQE runs the command that you give. If it fails, ForgeQE sends you the output.
53
+ - A failure is a test problem, or a real difference between the API and its contract.
54
+ - The contract can have a point from one observation only, for example a field that is optional or a status that changes. If the API answers differently on such a point, correct the test to the rule that is always true.
55
+ - If the API is clearly wrong (a 500, a required field that is missing), keep the check. Say so in notes.
35
56
 
36
57
  {{> domain-rule}}
37
- For APIs this means, where the API touches them: money-moving and state-changing calls are idempotent (a repeated request with the same key changes nothing twice), each role gets only what it may (others get 401 or 403), responses do not expose more personal data than the caller needs, errors do not leak internals, and changes that must be audited are.
58
+ For APIs, apply these rules where the API touches them:
59
+ - Calls that move money or change a state are idempotent. A repeated request with the same key does not change a thing two times.
60
+ - Each role gets only what it can get. Other roles get 401 or 403.
61
+ - Answers do not show more personal data than the caller needs.
62
+ - Errors do not show internal data.
63
+ - The system audits the changes that it must audit.
38
64
 
39
- Finish with the structured result: status (passed when the tests are ready to run, or blocked with the reason), the test file, the command that runs only these tests from the repository root without prompts or watch mode, what you reused, what you changed, and short notes.
65
+ Finish with the structured result:
66
+ - status: passed when the tests are ready to run, or blocked with the reason.
67
+ - The test file.
68
+ - The command that runs only these tests from the repository root, with no prompts and no watch mode.
69
+ - What you used again, what you changed, and short notes.