@orion-qa/orion 3.2.0 → 3.3.0

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 (29) hide show
  1. package/.claude/settings.json +1 -0
  2. package/.claude/skills/documentation/SKILL.md +1 -1
  3. package/.claude/skills/execution/SKILL.md +1 -1
  4. package/.claude/skills/orion/SKILL.md +1 -1
  5. package/.claude/skills/orion/references/assess-fix.md +1 -1
  6. package/.claude/skills/orion/references/batch.md +1 -1
  7. package/.claude/skills/orion/references/conversation.md +9 -22
  8. package/.claude/skills/orion/references/greeting.md +23 -0
  9. package/.claude/skills/orion/references/hosts.md +2 -2
  10. package/.claude/skills/orion/references/plain-language.md +2 -0
  11. package/.claude/skills/orion/references/setup-card.md +1 -1
  12. package/.claude/skills/orion/references/status-lines.md +7 -2
  13. package/.claude/skills/orion/scripts/done_check.mjs +6 -1
  14. package/.claude/skills/orion/scripts/report_check.mjs +5 -2
  15. package/.claude/skills/orion/scripts/report_make.mjs +186 -0
  16. package/.claude/skills/orion/scripts/results_parse.mjs +7 -0
  17. package/.claude/skills/orion/templates/project-context/assessment.md +1 -1
  18. package/.claude/skills/playwright/templates/javascript/reporters/summaryReporter.js +14 -0
  19. package/.claude/skills/playwright/templates/project/reporters/summaryReporter.ts +15 -0
  20. package/.claude-plugin/plugin.json +1 -1
  21. package/.cursor/commands/orion.md +1 -1
  22. package/.gemini/commands/orion.toml +1 -1
  23. package/.github/prompts/orion.prompt.md +1 -1
  24. package/.windsurf/workflows/orion.md +1 -1
  25. package/AGENTS.md +2 -2
  26. package/README.md +2 -2
  27. package/bin/orion.mjs +2 -2
  28. package/hosts/gemini-extension/gemini-extension.json +1 -1
  29. package/package.json +1 -1
@@ -13,6 +13,7 @@
13
13
  "Bash(node .claude/skills/orion/scripts/parity_check.mjs:*)",
14
14
  "Bash(node .claude/skills/orion/scripts/fix_plan.mjs:*)",
15
15
  "Bash(node .claude/skills/orion/scripts/report_check.mjs:*)",
16
+ "Bash(node .claude/skills/orion/scripts/report_make.mjs:*)",
16
17
  "Bash(node .claude/skills/orion/scripts/rules.mjs:*)",
17
18
  "Bash(node .claude/skills/orion/scripts/codemap.mjs:*)",
18
19
  "WebFetch(domain:playwright.dev)",
@@ -12,7 +12,7 @@ description: Writes the final execution report, traceability matrix and troubles
12
12
 
13
13
  ## Procedure
14
14
  1. Include only claims the evidence map marks supported.
15
- 2. Write the report in the shape and style below, then check it: `node .claude/skills/orion/scripts/report_check.mjs project-context/runs/<run id>.report.md`. Fix every finding it names and run it again until it passes (exit 0) before the report is shown. No shell on this host: go through the Style list by hand and write `report check: by hand` in the details block.
15
+ 2. Start from the draft, never a blank page (with Node): `node .claude/skills/orion/scripts/report_make.mjs --project <test project> --story <KEY> --run <run id> --title "<story title>" --app "<base URL> (<environment>)"`. It fills the title, verdict, facts, coverage (from the design's AC and case tables and the recorded runs), what was added and how to run it, and prints the few `<…>` lines left (fail check, review, failures and fixes, approvals, not checked). Fill those in one edit, then check it: `node .claude/skills/orion/scripts/report_check.mjs project-context/runs/<run id>.report.md`. It lists every finding in one pass, unfilled placeholders included; fix them all in one edit and run it again until it passes (exit 0) before the report is shown. No shell on this host: go through the Style list by hand and write `report check: by hand` in the details block.
16
16
  3. Approvals with their decision ids go in the details block.
17
17
  4. What the user must do next goes in "Needs your attention", one line each with the action.
18
18
  5. **What wasn't checked** (fail checks not run, unproven locators, flaky counts, impacted tests not run): the ones that change the user's next step in "Needs your attention", all of them under "Not checked" in the details block.
@@ -42,7 +42,7 @@ description: Runs automated tests with the project's own runner and configuratio
42
42
  7. **Capture.** Exit code, pass/fail/skip **and flaky** counts as the runner reports them (a test that passed only on retry is flaky, not passed), duration, the last 30 lines of output.
43
43
  7a. **Inventory check.** Compare the tests the runner actually executed with the planned scope: new tests × 3 runs + impacted tests. 0 executed, fewer than planned, or a new test reported as skipped is `failed`, never `passed`, even when the exit code is 0: a filter, tag or group that matches nothing, a file outside the runner's test pattern, or a class missing from the suite (AUTOMATION_DEFECT). Never add a pass-with-no-tests flag (Playwright `--pass-with-no-tests`). Run mode: 0 executed → `needs_user` (the selection matches no test). Skipped impacted tests: list each with its skip reason; a skip the base branch doesn't have is a finding.
44
44
  8. **Reports.** Record report, trace and screenshot paths by name (e.g. `test-summary/index.html` and `playwright-report/index.html`, `target/surefire-reports/`, `reports/run-1.xml`, `TestResults/*.trx`), taken from the runner config or the command. If the runner writes no report, write `none` and cite the config line. A summary line is not a report path. **In an existing suite, run reports never go into a new folder in it:** per-run files (JSON, JUnit, the HTML report) are written to the workspace's `project-context/results/` (e.g. `--reporter=list,json` with the JSON output file there), or to an output folder the suite's own config already names and ignores.
45
- 8a. **Per-test results (required: the done check counts these files, not the chat).** After each counted run, where a shell and Node exist, from the workspace root (not the worktree; the report path may point into it; the script writes only inside the folder it runs in): `node .claude/skills/orion/scripts/results_parse.mjs <report path> --run <run id>-<n> --out project-context/results/<run id>-<n>.json` (JUnit XML, TRX or Playwright JSON). Get the report from the counted run itself, through the suite's own command, never a second run or a direct runner call: Playwright `node .claude/skills/orion/scripts/quiet.mjs "npm test --silent -- <spec> --retries=0 --reporter=json > project-context/results/<run id>-<n>.pw.json"` (the quotes keep the redirect inside the counted command; for a project in `sut/<app>/`, from the workspace root: `quiet.mjs "cd sut/<app> && npm test --silent -- <spec> --retries=0 --reporter=json > ../../project-context/results/<run id>-<n>.pw.json"`; the runner creates the results folder. Measured on the demo site, 2026-11-19: 3 runs, 18 of 18 each, parsed, done check passed) (`--silent` keeps npm's banner out of the JSON; no environment variable); pytest `--junitxml=<file>`; Maven and Gradle write JUnit XML themselves; `dotnet test --logger trx`. Put its summary line in the RESULT. Exit 1 (no results found) is reported as `results: none parsed` with the report path; it never replaces the runner's own counts.
45
+ 8a. **Per-test results (required: the done check counts these files, not the chat).** After each counted run, where a shell and Node exist, from the workspace root (not the worktree; the report path may point into it; the script writes only inside the folder it runs in): `node .claude/skills/orion/scripts/results_parse.mjs <report path> --run <run id>-<n> --out project-context/results/<run id>-<n>.json` (JUnit XML, TRX or Playwright JSON). Get the report from the counted run itself, through the suite's own command, never a second run or a direct runner call. **Playwright starters, and suites with their run summary reporter,** write `test-summary/results.json` on every run, so a counted run is the suite's command as is (`node .claude/skills/orion/scripts/quiet.mjs "cd <project> && npm test -- <spec> --retries=0"`), then `results_parse.mjs <project>/test-summary/results.json --run <run id>-<n> --out project-context/results/<run id>-<n>.json` before the next run overwrites it (measured on the demo suite 2026-11-19: the same 18 results as the JSON route). Other Playwright suites: `node .claude/skills/orion/scripts/quiet.mjs "npm test --silent -- <spec> --retries=0 --reporter=json > project-context/results/<run id>-<n>.pw.json"` (the quotes keep the redirect inside the counted command; for a project in `sut/<app>/`, from the workspace root: `quiet.mjs "cd sut/<app> && npm test --silent -- <spec> --retries=0 --reporter=json > ../../project-context/results/<run id>-<n>.pw.json"`; the runner creates the results folder. Measured on the demo site, 2026-11-19: 3 runs, 18 of 18 each, parsed, done check passed) (`--silent` keeps npm's banner out of the JSON; no environment variable); pytest `--junitxml=<file>`; Maven and Gradle write JUnit XML themselves; `dotnet test --logger trx`. Put its summary line in the RESULT. Exit 1 (no results found) is reported as `results: none parsed` with the report path; it never replaces the runner's own counts.
46
46
  9. If anything failed, return `failed` with the run record. Classification is the failure-analyst's job.
47
47
 
48
48
  ## Output
@@ -12,7 +12,7 @@ description: "Runs the end-to-end test-automation workflow for a requirement: va
12
12
 
13
13
  ## Procedure
14
14
  00. **Rules first, on every host.** Read `AGENTS.md` before anything else: the repo root, else `${CLAUDE_PLUGIN_ROOT}/AGENTS.md` in a plugin install. Don't rely on the host having loaded it (Claude Code skips it when the project has a `CLAUDE.md`; Codex prefers an `AGENTS.override.md`). Copilot Studio has no files: the rules are in your instructions. Not found anywhere → say so in your first sentence and run `doctor`. Then read [references/capabilities.md](references/capabilities.md): what the platform can do now, which agent does what, and where each template and rule lives.
15
- 0e. **Greeting and start.** A greeting or empty request gets the capability card. A request to write, extend or design tests (full, build, design) gets the [setup card](references/setup-card.md) word for word (existing framework? existing test cases? style, tool and language, connections, site and scope, account, extra checks) and waits for go (the next story in the same chat: one "Same setup as before" line instead, conversation.md 1a); after exploring, the test-case table waits for go before any code. No other form or questions. The other modes get no card. Everything the user sees follows [references/conversation.md](references/conversation.md).
15
+ 0e. **Greeting and start.** A greeting or empty request gets the capability card ([references/greeting.md](references/greeting.md); read only that file for it). A request to write, extend or design tests (full, build, design) gets the [setup card](references/setup-card.md) word for word (existing framework? existing test cases? style, tool and language, connections, site and scope, account, extra checks) and waits for go (the next story in the same chat: one "Same setup as before" line instead, conversation.md 1a); after exploring, the test-case table waits for go before any code. No other form or questions. The other modes get no card. Everything the user sees follows [references/conversation.md](references/conversation.md).
16
16
  0. **Mode.** Decide what the user asked for and its stop point from [references/modes.md](references/modes.md) (full, build, analyze, assess, fix, batch, design, review, triage, run, report, doctor, task; for assess and fix read [references/assess-fix.md](references/assess-fix.md), for batch [references/batch.md](references/batch.md), and only then); don't announce it (it goes in the run file), run only that mode's agents and stop at its stop point. Analyze, review, triage and run follow that table; the others are below.
17
17
  0p. **Plain language, every message.** Read each message for what it means, never its exact words, by [references/plain-language.md](references/plain-language.md): a case is "the third one" as well as TS-3, a mode is "just the test cases" as well as `design`, and the user never has to type a command. Safe, read-only asks are done at once; writes and approvals are confirmed in one line with your reading first; two readings get one numbered question.
18
18
  0b. **Report mode.** If the user asks for a report across runs, in any words ("how did the sprint go", "summary of runs"; shortcut `/orion report <scope>`: a run id, story, sprint or fix version, release, date range, or `trend`), delegate test-reporter in `aggregate` mode with the run files in scope. Read-only: no gates, no approvals; publishing the result is a separate H9 question.
@@ -12,7 +12,7 @@ Agents, in order; Gate numbers as in the run file. **First reply: only the basel
12
12
  2. **Baseline run (Gate 6, H6).** Ask once, naming the exact command and the base URL the suite will use (from its config, not a guess). Never against production (H5 and the production refusal apply); tests tagged as changing data run only if the user says so. executor runs it once (no 3-run rule, no fail check) and writes the results file with `results_parse.mjs`. Failures go to failure-analyst for a class each. No run (declined, no environment): the assessment says `baseline: not run (<reason>)` and fix mode can't start until one exists. **The baseline changes nothing in the suite either:** it runs only with dependencies that are already there (or restored from the suite's own lockfile without changing it: `npm ci`, `mvn dependency:resolve`, `dotnet restore`, each as part of the H6 question). An install that would create or change a tracked file (`npm install` without a lockfile writes `package-lock.json`) isn't done: the baseline is `not run (dependencies not installed)` and the assessment gives the user the one command to run.
13
13
  3. **Review (Gate 5, review part).** reviewer, brief `mode: assess`: applies every U, P and M row of the pattern rules to the **whole suite** (not a diff), confirms or rejects each script finding with the line it read, adds the judged ones (U3 shared data, U4 branching, U8/U12 assertion strength, P3, P4, P7, P9–P13, M1–M6) with file:line, gives each finding's fix the files it edits (the "Changes" column: a P1 fix names the page object and the test the assertion moves into; never an app file), and writes the architecture section against `patterns.md`. A redesign beyond a finding's own fix is not proposed.
14
14
  4. **Evidence (Gate 7).** evidence-validator checks every finding's file:line and quote.
15
- 5. **Save and stop.** The orchestrator writes `project-context/assessments/A-<YYYYMMDD>-<HHMM>/assessment.md` from `templates/project-context/assessment.md` (verdict, facts, top issues in plain words, what's good, how to fix; the full findings table numbered F-1…, most severe first, with the baseline, architecture and what wasn't assessed, inside the folded engineer block), checks it with `node .claude/skills/orion/scripts/report_check.mjs <assessment.md>` until it passes (no shell: by hand, said so), and shows at most 8 lines in chat: the bold verdict with one sentence; "Baseline: " the result; "Findings: 🔴 n critical · 🟠 n blocking · 🟡 n major · ⚪ n minor"; the top 3 issues, one line each in plain words with `file:line`; "Report: `<path>`"; "To fix: `/orion fix A-<id>` (you choose the items; nothing else changes)". With a shell, `graph.mjs build` again so findings show on their files.
15
+ 5. **Save and stop.** The orchestrator writes `project-context/assessments/A-<YYYYMMDD>-<HHMM>/assessment.md` from `templates/project-context/assessment.md` (verdict, facts, top issues in plain words, what's good, how to fix; the full findings table numbered F-1…, most severe first, with the baseline, architecture and what wasn't assessed, inside the folded engineer block), checks it with `node .claude/skills/orion/scripts/report_check.mjs <assessment.md>` until it passes (no shell: by hand, said so), and shows at most 8 lines in chat: the bold verdict with one sentence; "Baseline: " the result; "Findings: 🔴 n critical · 🟠 n blocking · 🟡 n major · ⚪ n minor"; the top 3 issues, one line each in plain words with `file:line`; "Report: `<path>`"; "To fix: say which ones, like *fix F-2 and F-5* or *do the quick wins* (you choose the items; nothing else changes)". With a shell, `graph.mjs build` again so findings show on their files.
16
16
 
17
17
  ## fix (`/orion fix A-<id>` · "fix F-2 and F-5")
18
18
  1. **Plan.** `node .claude/skills/orion/scripts/fix_plan.mjs make project-context/assessments/A-<id>/assessment.md` writes `fix-plan.md` next to it: batches of ≤ 5 findings and ≤ 8 files (each item's `changes:` list), most severe first, every item unticked, items that change what a test checks marked H8, secret items marked as needing the variable name.
@@ -56,7 +56,7 @@ State lives in `project-context/batches/B-<date>-<time>-<slug>/batch.json`. `nod
56
56
  - Parallel agents cut wall time, not cost. They also reach the usage limit sooner. Say so on the card, and never claim a time or cost for a batch size that wasn't measured.
57
57
 
58
58
  ## Single-agent hosts (Cursor, Copilot, Codex, Gemini)
59
- The same `batch.json` and waves, one story at a time (K = 1), and each agent's step done in the same chat. After about 3 stories, say: "To keep answers sharp, start a new chat and type `/orion batch resume B-<id>`." The card's "Who does what" lists the steps, not parallel agents.
59
+ The same `batch.json` and waves, one story at a time (K = 1), and each agent's step done in the same chat. After about 3 stories, say: "To keep answers sharp, start a new chat and say *continue batch B-<id>*." The card's "Who does what" lists the steps, not parallel agents.
60
60
 
61
61
  ## Rules
62
62
  - The checkpoints are the card, the setup message and the test-case pages. Approvals (AGENTS rule 2: H3, H4, H5, H6, H8, H9, H10, H13) are still asked when they come up, once for the batch where they cover it.
@@ -3,25 +3,7 @@
3
3
  What the user sees. The gates, decisions and metrics still happen and are recorded in the run file; the chat shows only what the user needs. Sources: a Cursor run (2026-10-16) that spent 1 hour 40 minutes on approvals and credential files before a single test existed, and the 2026-10-22 demo where the agent built without asking about an existing framework, existing test cases or tool connections. Both are counterexamples: ask once, up front, with defaults; then work without narrating.
4
4
 
5
5
  ## Greeting
6
- On a greeting ("hi", "hello"), an empty request, or "what can you do", reply with this, word for word (as Markdown, not a code block, so the lines and bullets render), and nothing else:
7
-
8
- > **Hi, I'm Orion**, your team of AI test agents. Give me a story and a link, and I'll explore your app, design the test cases, write the tests and prove they pass. Nothing changes without your yes.
9
- >
10
- > **Here's what I can do**
11
- > 1. **Build tests end to end:** explore your site, design the cases, write and run them
12
- > 2. **Design test cases only:** as a table, Excel, PDF, Word, Gherkin, or a TestRail, Xray, Zephyr or Azure import
13
- > 3. **Review or fix your existing tests**
14
- > 4. **Find out why a test failed**
15
- >
16
- > **Works with** Playwright, Selenium, Appium, API tools, k6 (load) and Pact (contract), in TypeScript, JavaScript, Java, C# or Python. Extras: accessibility, visual, broken links, load time.
17
- >
18
- > **Lean by design:** I read only what each step needs, keep test output to the failures, map your code instead of rereading it, and reuse before writing anything new. Lower cost, smaller tests.
19
- >
20
- > **What should we test?** Just tell me in your own words, no commands to learn. Send a link and one sentence, like *login and add to cart on https://test.example.com*, or pick a number.
21
-
22
- A reply that is only a number gets one line asking for what that choice needs: 1 or 2, the link and what to check; 3, the tests' folder, branch or PR; 4, the failing test or its log.
23
-
24
- Name only the tools and languages that have an adapter whose tools ran here ([capabilities.md](capabilities.md): a starter that passes the template check, or the measured k6 and Pact runs) and that this host can serve ([hosts.md](hosts.md)). Warm and plain: a greeting, what you can do, one question. Never a bare list.
6
+ A greeting ("hi", "hello"), an empty request or "what can you do" gets the capability card in [greeting.md](greeting.md), word for word, and nothing else.
25
7
 
26
8
  ## Voice (every message)
27
9
  - **Energetic, respectful, professional.** Confident and friendly, like a senior colleague who is glad to help: short sentences, active verbs, "you" and "I". Thank the user once where it fits (the card), never grovel, never apologise for asking, at most one exclamation mark in a message, no emoji (✅ ⚠️ ❌ are verdict marks, not decoration).
@@ -51,8 +33,8 @@ Two checkpoints, nothing more: the setup card (all questions at once, defaults i
51
33
  5. **Other questions only when a missing fact would make the test wrong and neither the user nor the site can answer it.** One question, with your suggested answer.
52
34
  6. **A pasted account is used, not refused.** Write it to the test project's gitignored `.env` (`BASE_URL`, `E2E_USER`, `E2E_PASSWORD`) with one command from inside the project, each value in single quotes, and never read it back:
53
35
  - bash, zsh, Git Bash: `printf 'BASE_URL=%s\nE2E_USER=%s\nE2E_PASSWORD=%s\n' '<url>' '<user>' '<password>' > .env` (a `'` inside a value is written `'\''`); add `HTTP_USER`/`HTTP_PASSWORD` the same way with `>>`. Check from the workspace root: `node .claude/skills/orion/scripts/env_check.mjs sut/<site>` (names with set, empty or missing, never a value; `env_check.py` gives the same with Python).
54
- - PowerShell (Cursor's default terminal on Windows; there is no `printf`, and `>` writes UTF-16, which the runners can't read): `[IO.File]::WriteAllLines("$PWD\.env", [string[]]@('BASE_URL=<url>','E2E_USER=<user>','E2E_PASSWORD=<password>'))` (UTF-8 without a byte-order mark; a `'` inside a value is written `''`); add lines with `[IO.File]::AppendAllLines` the same way. Check: `node .claude\skills\automate\scripts\env_check.mjs sut\<site>` (it also flags a UTF-16 file).
55
- The platform's own deny rules block reading `.env`, by design, also through `grep`, `cat` or `head`; `env_check.mjs` (or `env_check.py`) is the only check. If the write itself is denied, stop with the blocker message (what failed, the one fix) without printing any value and without asking the user to create the file. Then continue; say once, in one line, that the password is in the chat and in the command log and may be worth rotating (only when the user really pasted one; never say it otherwise). The user who replied "I'll add it" on the setup card gets the file with empty values instead ([setup-card.md](setup-card.md), line 7). Never echo it, never ask the user to create a file, never keep a copy anywhere else (AGENTS rule 5, [login methods](../../ui-observation/references/login-methods.md)). A login the request already gives (the account, or the site's own browser login) is used without asking; the one question is only for a login the request didn't give. A login isn't an approval: AGENTS rule 2 (only a reply typed after the question) is about approvals.
36
+ - PowerShell (Cursor's default terminal on Windows; there is no `printf`, and `>` writes UTF-16, which the runners can't read): `[IO.File]::WriteAllLines("$PWD\.env", [string[]]@('BASE_URL=<url>','E2E_USER=<user>','E2E_PASSWORD=<password>'))` (UTF-8 without a byte-order mark; a `'` inside a value is written `''`); add lines with `[IO.File]::AppendAllLines` the same way. Check: `node .claude\skills\orion\scripts\env_check.mjs sut\<site>` (it also flags a UTF-16 file).
37
+ The platform's own deny rules block reading `.env`, by design, also through `grep`, `cat` or `head`; `env_check.mjs` (or `env_check.py`) is the only check. If the write itself is denied, stop with the blocker message (what failed, the one fix) without printing any value and without asking the user to create the file. Then continue; in your very next message (not at the end of the run), say once, in one line, that the password is in the chat and in the command log and may be worth rotating (only when the user really pasted one; never say it otherwise). The user who replied "I'll add it" on the setup card gets the file with empty values instead ([setup-card.md](setup-card.md), line 7). Never echo it, never ask the user to create a file, never keep a copy anywhere else (AGENTS rule 5, [login methods](../../ui-observation/references/login-methods.md)). A login the request already gives (the account, or the site's own browser login) is used without asking; the one question is only for a login the request didn't give. A login isn't an approval: AGENTS rule 2 (only a reply typed after the question) is about approvals.
56
38
  6a. **Host prompts are not extra questions.** Claude Code shows its own permission prompt for installs (`npm install`, `npm ci`, a browser download) and for commands it hasn't been allowed yet, such as `npm test` or `npx playwright test`; the user answers it there ("Yes, and don't ask again" for test commands saves later prompts). Never repeat a host prompt as a chat question.
57
39
  7. **Other approvals are asked when they come up, one line each:** a production URL (H5), commit, push or PR (H3, H4), writing to a tracker (H9), installing anything outside the test project (H10), changing an expected value (H8) (AGENTS rule 2).
58
40
  8. **"ok" or "go ahead" confirms only what was just shown** (the setup card, the test-case table). It is never recorded as a yes to a question that wasn't asked, and never covers an approval in item 7.
@@ -77,7 +59,7 @@ Two checkpoints, nothing more: the setup card (all questions at once, defaults i
77
59
  ## What the user sees
78
60
  - Plain sentences ([status-lines.md](status-lines.md)): what you are doing, the folder path, the test list, the command results, any real blocker. No gate board, decision IDs, "recorded", or specialist names.
79
61
  - **The first reply to a build or design request is the setup card** (or the greeting card for a greeting): its eight questions, each with a default, never a list of open questions without defaults, and never a page observation or code before the user said go.
80
- - **The result is one short message: exactly the 5 numbered lines below, at most 120 words before "Accept?" (count them; code paths count as one word), no line over 30 words**, the report's top in chat form, in this order. No sentence before line 1 and none between the lines: no intro ("I wrote 8 tests…"), no repeat of the story not being read (line 4 says it once if it matters), no password note (said once, when the account was pasted, never again), no "To run the tests yourself". Never a per-test table, a file list, the run command, or notes on the platform's own checks: what the report checker or a type checker said, a starter check you removed or changed, a reload to do; those go in the report, and a checker that flags the app's own name is noted there as a checker problem):
62
+ - **The result is one short message: exactly the 5 numbered lines below, each its own paragraph (a blank line between them, or a chat window runs them together), at most 120 words before "Accept?" (count them; code paths count as one word), no line over 30 words**, the report's top in chat form, in this order. No sentence before line 1 and none between the lines: no intro ("I wrote 8 tests…"), no repeat of the story not being read (line 4 says it once if it matters), no password note (said once, when the account was pasted, never again), no "To run the tests yourself". Never a per-test table, a file list, the run command, or notes on the platform's own checks: what the report checker or a type checker said, a starter check you removed or changed, a reload to do; those go in the report, and a checker that flags the app's own name is noted there as a checker problem):
81
63
  1. **The verdict, bold, then what was built and how it ran**, the same verdict as the report (✅ Ready to accept · ⚠️ Ready, with notes · ❌ Not ready): "**✅ Ready to accept**: 10 tests in `sut/<app>/tests`, passed 3 runs in a row (30 of 30); each failed when its check was broken."
82
64
  2. "Login: " automated and how, or why not.
83
65
  3. "Coverage: " on one line, never a table (the report keeps its coverage table; the chat gets this line): each requirement in a few words with its test ids, or why one has none: "Coverage: log in → TS-1, TS-2 · log out → TS-3 · checkout → not covered (needs a payment account)."
@@ -86,10 +68,15 @@ Two checkpoints, nothing more: the setup card (all questions at once, defaults i
86
68
  A full example, 89 words before "Accept?":
87
69
  ```
88
70
  **✅ Ready to accept**: 9 tests in `sut/<app>/tests/ui`, passed 3 runs in a row (27 of 27); each failed when its check was broken.
71
+
89
72
  Login: automated, signed in once through the form and the session reused.
73
+
90
74
  Coverage: sign in → TS-1, TS-2 · wrong or empty details → TS-3 to TS-6 · logout → TS-9 · PIN reset → not covered (no test PIN).
75
+
91
76
  ⚠️ The story wasn't read: the cases follow your request and the site. Connect the tracker or paste the story to check them.
77
+
92
78
  Report: `project-context/reports/<story>-report.md`
79
+
93
80
  **Accept?** Reply **yes**, or tell me what to change. What next: 1 open the report · 2 the test cases as Excel, PDF or any file · 3 commit to a new branch (I'll ask first)
94
81
  ```
95
82
  Then "**Accept?** Reply **yes**, or tell me what to change." and one "What next" line of up to three numbered choices that fit the run (open the report; the test cases as Excel or a tool import file; commit to a new branch, asked first; share results to the connected tool, asked first). A choice is only offered when this host can do it.
@@ -0,0 +1,23 @@
1
+ # Greeting: the capability card
2
+
3
+ On its own file so a greeting reads 2 KB, not the whole 21 KB of conversation rules. The tone is in [conversation.md](conversation.md), "Voice".
4
+
5
+ On a greeting ("hi", "hello"), an empty request, or "what can you do", reply with this, word for word (as Markdown, not a code block, so the lines and bullets render), and nothing else:
6
+
7
+ > **Hi, I'm Orion**, your team of AI test agents. Give me a story and a link, and I'll explore your app, design the test cases, write the tests and prove they pass. Nothing changes without your yes.
8
+ >
9
+ > **Here's what I can do**
10
+ > 1. **Build tests end to end:** explore your site, design the cases, write and run them
11
+ > 2. **Design test cases only:** as a table, Excel, PDF, Word, Gherkin, or a TestRail, Xray, Zephyr or Azure import
12
+ > 3. **Review or fix your existing tests**
13
+ > 4. **Find out why a test failed**
14
+ >
15
+ > **Works with** Playwright, Selenium, Appium, API tools, k6 (load) and Pact (contract), in TypeScript, JavaScript, Java, C# or Python. Extras: accessibility, visual, broken links, load time.
16
+ >
17
+ > **Lean by design:** I read only what each step needs, keep test output to the failures, map your code instead of rereading it, and reuse before writing anything new. Lower cost, smaller tests.
18
+ >
19
+ > **What should we test?** Just tell me in your own words, no commands to learn. Send a link and one sentence, like *login and add to cart on https://test.example.com*, or pick a number.
20
+
21
+ A reply that is only a number gets one line asking for what that choice needs: 1 or 2, the link and what to check; 3, the tests' folder, branch or PR; 4, the failing test or its log.
22
+
23
+ Name only the tools and languages that have an adapter whose tools ran here ([capabilities.md](capabilities.md): a starter that passes the template check, or the measured k6 and Pact runs) and that this host can serve ([hosts.md](hosts.md)). Warm and plain: a greeting, what you can do, one question. Never a bare list.
@@ -10,11 +10,11 @@ The native files for Cursor, GitHub Copilot, Windsurf, Gemini CLI and Codex are
10
10
  | `cursor` | `/orion` (`.cursor/commands/`); or the Cursor plugin (`.cursor-plugin/`, unverified) | **single-agent**: in a run on 2026-10-16 the Task tool rejected `subagent_type: requirement-analyst` (the platform's agent types), so the main chat does every step itself with each specialist's skills; it says so once and names itself, not the specialist, in the run file (earlier runs on 2026-09-29 delegated) | auto-run off, Auto-review guidance (steers, doesn't block) | per-agent tools, read-only, no nesting, commit approval (`git commit` ran unprompted, CU-6) | measured: delegation 2026-09-29, rejected 2026-10-16 |
11
11
  | `github-copilot` | `/orion` (`.github/prompts/`) | reads `.claude/agents/` (docs) | tool approval prompts | per-agent limits until measured | unverified |
12
12
  | `copilot-studio` | chat with the orchestrator | connected agents | tools attached per agent; each user's own sign-in; ask-before-run where the tenant offers it | approvals content; no shell anywhere | partial, read-only (Gates 1–4, repo reads, design mode 2026-10-05/07; analyze up to Gate 7 2026-10-06; chat safety tests 2026-10-09); no writes or runs |
13
- | `codex` | type: "Host: codex. Follow `.claude/skills/orion/SKILL.md` for this story: …" | `.codex/agents/*.toml` (loaded from a trusted project's `.codex/agents/`) if Codex lets the session start them by name; else single-agent mode. A Codex plugin install carries skills only, no agents | sandbox per agent: `read-only` unless the agent may edit files or run its own shell commands (then `workspace-write`; see each file's `sandbox_mode`); approval prompts. the agents whose own commands reach the network (implementer, executor, change-agent, requirement-analyst and test-reporter: installs, test runs, `git push`, `tm.py`) also get `[sandbox_workspace_write] network_access = true`, because Codex's sandbox cuts the network off otherwise; a third-party report says newer Codex versions apply the parent session's sandbox to every agent instead (verify) | command ask/deny lists (not generated for Codex) | unverified |
13
+ | `codex` | plain words, e.g. "Orion, write tests for login on …" (Codex reads `AGENTS.md`; the long form "Host: codex. Follow `.claude/skills/orion/SKILL.md` for this story: …" still works) | `.codex/agents/*.toml` (loaded from a trusted project's `.codex/agents/`) if Codex lets the session start them by name; else single-agent mode. A Codex plugin install carries skills only, no agents | sandbox per agent: `read-only` unless the agent may edit files or run its own shell commands (then `workspace-write`; see each file's `sandbox_mode`); approval prompts. the agents whose own commands reach the network (implementer, executor, change-agent, requirement-analyst and test-reporter: installs, test runs, `git push`, `tm.py`) also get `[sandbox_workspace_write] network_access = true`, because Codex's sandbox cuts the network off otherwise; a third-party report says newer Codex versions apply the parent session's sandbox to every agent instead (verify) | command ask/deny lists (not generated for Codex) | unverified |
14
14
  | `gemini-cli` | `/orion` (`.gemini/commands/`) | `.gemini/agents/*.md` | tool allowlist per agent (no edit/write tools for read-only agents); ask/deny from the rules extension `orion-rules` (`hosts/gemini-extension`, installed once per user; Gemini CLI ignores policy files inside a repo) | shell command prefixes per agent (an agent with any shell rule gets the shell tool); path rules (`.env`, keys) | unverified |
15
15
  | `grok-build` | `/orion` (reads `.claude/` skills and `AGENTS.md`, per its docs) | `.claude/agents/` if it reads them, else single-agent mode | its permission settings | everything until measured | unverified |
16
16
  | `windsurf` | `/orion` (`.windsurf/workflows/`) | single-agent mode | Cascade approval settings | per-agent limits, separation of duties | unverified |
17
- | unknown host | "Host: <tool name>. Follow `.claude/skills/orion/SKILL.md` for this story: …" | single-agent mode (`AGENTS.md`) | the host's approval mode, if on | everything else | — |
17
+ | unknown host | plain words, e.g. "Orion, write tests for login on …", where the tool reads `AGENTS.md`; else "Host: <tool name>. Follow `.claude/skills/orion/SKILL.md` for this story: …" | single-agent mode (`AGENTS.md`) | the host's approval mode, if on | everything else | — |
18
18
 
19
19
  ## Single-agent mode
20
20
  You play each specialist in turn: for each gate, open that specialist's agent file and the skills it lists, follow them, keep its *Never* list, write its RESULT, then switch back to orchestrator and judge the RESULT with the seven checks (`task-brief.md`). The reviewer step re-reads the diff from disk, never from memory.
@@ -39,6 +39,8 @@ People say what they want in their own words, with typos, in another language, h
39
39
  | "don't push", "skip that", "not now" | writes nothing, moves on | — |
40
40
  | "where are we", "what's happening", "still running?" | one status line from the run file | — |
41
41
  | "continue", "carry on", "pick up where you left off" | resume from the run file (SKILL step 1r) | `continue` |
42
+ | "continue batch B-…", "carry on with the sprint batch" | resume that batch from its `batch.json` ([batch.md](batch.md)) | `/orion batch resume B-<id>` |
43
+ | "continue the fixes", "carry on with A-…" | resume the fix run from its plan ([assess-fix.md](assess-fix.md)) | `/orion fix A-<id> resume` |
42
44
  | "how much did that cost", "how long has it been" | the budget line (`run_state.mjs budget`) | — |
43
45
  | "show me the details", "what did each agent do", "hide that again" | the board on, or off | `details` · `details off` |
44
46
  | "yes", "accept", "ship it" (after the result) | accepts the result | `yes` |
@@ -26,7 +26,7 @@ Nothing missing: no message; carry on. Otherwise:
26
26
  Reply **yes** to set up all, **yes, not 1** to skip one, or **no**."
27
27
  Number only the items that are missing, in this order. Item 1 is offered only when the check printed `setup in the chat`; when it didn't, item 1 is "**Browser for exploring:** <its `ready: no` reason>; to fix it: <its Fix>", for the user to do. On Cursor and VS Code, after item 1 is set up or when the check says ready, the same message also asks, as its last line before the reply line: "And please confirm `browser_run_code_unsafe` and the other unused browser tools are switched off (<where>); it runs any code on this machine." (once per workspace, recorded). Windsurf and other tools whose settings live elsewhere (exit 3): "**Browser for exploring:** I can't see your tool's MCP settings; make sure its `playwright` entry points at `sut/<site>/.env`."
28
28
 
29
- Nothing else goes in this message: an unanswered card line (for example line 7, the login, which has no default) is asked in its own message **after** the setup is done, never alongside it. Only a yes typed after this message counts; the card's "go" never approves it, and it's never bundled with the card or another question. Record message and reply in `decisions.md`. On yes, do the items approved, in order: item 1 with `node .claude/skills/orion/scripts/browser_setup.mjs <URL>` from the workspace root (an existing suite: add `--env-file <its own env file>`, so the browser signs in with the suite's account and no `sut/<site>/` is created) (never edit the file yourself; if it exits 1 or 2, give its warning in one line and use the test project's Playwright); items 2 and 3 with the install commands (the host shows its own prompts). Then one line on what was set up and what needs a reload ("**All set:** the browser for saucedemo (starts after you reload Cursor), Playwright in `sut/saucedemo/`. Exploring now.") and carry on. The tracker item (5) is never waited for: it is the user's to do whenever they like, so after **yes** (or **no**, or any reply that isn't "done") the run carries on without it, by [conversation.md](conversation.md) item 2a, in the same turn: explore, then the test-case table titled "Story <PR-1> not read: cases from your request and the site". Never end the turn after this message with only "connect <Jira> or paste the story". A skipped item 1 means the test project's Playwright for this run. **no**, or a skipped item the run can't do without: say in one line what that stops (for example "Without the test project I can't explore or run tests: I'll design the test cases from your description and mark the screens not observed") and carry on with what's possible; don't ask again in this run. "done" or "reloaded" means: run the checks again, then continue.
29
+ Nothing else goes in this message, with one exception that saves a round: when line 7 (the login, which has no default) is still unanswered, the message ends, after the reply line, with "**Login:** paste it with your reply (it goes only into the git-ignored `.env`), or say *I'll add it*." The yes approves only the numbered items; a login pasted in the same reply is written as [conversation.md](conversation.md) item 6. Any other unanswered card line is asked in its own message **after** the setup is done. Only a yes typed after this message counts; the card's "go" never approves it, and it's never bundled with the card or another question. Record message and reply in `decisions.md`. On yes, do the items approved, in order: item 1 with `node .claude/skills/orion/scripts/browser_setup.mjs <URL>` from the workspace root (an existing suite: add `--env-file <its own env file>`, so the browser signs in with the suite's account and no `sut/<site>/` is created) (never edit the file yourself; if it exits 1 or 2, give its warning in one line and use the test project's Playwright); items 2 and 3 with the install commands (the host shows its own prompts). Then one line on what was set up and what needs a reload ("**All set:** the browser for saucedemo (starts after you reload Cursor), Playwright in `sut/saucedemo/`. Exploring now.") and carry on; it never repeats the browser-tools reminder (said once, in the setup message). If the reply brought no login and the site needs one, the same line ends with the login question, once ("…in `sut/saucedemo/`. **Login:** paste it, or say *I'll add it*."), never a separate message. The tracker item (5) is never waited for: it is the user's to do whenever they like, so after **yes** (or **no**, or any reply that isn't "done") the run carries on without it, by [conversation.md](conversation.md) item 2a, in the same turn: explore, then the test-case table titled "Story <PR-1> not read: cases from your request and the site". Never end the turn after this message with only "connect <Jira> or paste the story". A skipped item 1 means the test project's Playwright for this run. **no**, or a skipped item the run can't do without: say in one line what that stops (for example "Without the test project I can't explore or run tests: I'll design the test cases from your description and mark the screens not observed") and carry on with what's possible; don't ask again in this run. "done" or "reloaded" means: run the checks again, then continue.
30
30
 
31
31
  ## The card (send it word for word)
32
32
 
@@ -3,7 +3,7 @@
3
3
  The user wants results and questions, not a narration of the machinery. Everything else follows the output budget in [conversation.md](conversation.md).
4
4
 
5
5
  ## Hosts that show their own activity (Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, Windsurf, Grok Build)
6
- - **No narration, three milestones.** The host already shows each file read, command and tool call. Write only: the one question you need, a result the user can use, a blocker, the deliverable. No "I'll…" lines between tool calls ("I'll pull, free the port and install", "I'll write the suite, then review it"): the first text the user sees is the setup card.
6
+ - **No narration, three milestones.** The host already shows each file read, command and tool call. Write only: the one question you need, a result the user can use, a blocker, the deliverable. No "I'll…" lines between tool calls ("I'll pull, free the port and install", "I'll write the suite, then review it"), and no reasoning out loud while working ("Next I'll run the regression three times", "The checker wants a results file", "The output was cut off, so I'll rerun it", "I'll fix both"): the first text the user sees is the setup card, and during a build only the three milestones below. Fixing your own checker findings is silent work; its outcome shows in the result.
7
7
  - **Milestone lines** (a long run otherwise shows minutes of tool output and no sentence): one line, at most three times in a build or full run, each a result that just happened plus what comes next, never a plan: after exploring ("Signed in and mapped 4 pages; all 23 locators matched exactly one element. Designing the test cases."), after the code is reviewed ("8 tests written and reviewed in `sut/shop/tests`. Running them 3 times."), and after a slow install ("Playwright and Chromium installed in `sut/shop/`."). No milestone may restate one already sent.
8
8
  - **No step names, icons or prefixes** in chat: never `Understand ·`, `Design ·`, `Mode:`, `Confirmed:`, `⛔`, `📖` or the like. Two exceptions: the one-line confirmation of a decision the user just made, led by **Approved:**, **Updated:**, **Understood, …** or **All set:** ([conversation.md](conversation.md), Voice), and the result: its bold verdict (✅ ⚠️ ❌) and "⚠️ " on its attention lines, the same marks as the report ([conversation.md](conversation.md), "What the user sees"). The steps and gates are internal; they live in the run file.
9
9
  - Each message is plain sentences: what you found or did, then what you need (if anything). Numbers come from accepted RESULTs and the run file's `Run state` (UI map, test design, executor's `executed / planned`); no number without its source.
@@ -24,14 +24,19 @@ One short plain sentence when a long step starts, because a connected-agent call
24
24
  [user: go]
25
25
  Signed in and mapped 3 pages: login, 6 products each with Add to cart, the cart. All 14 locators matched exactly one element. Designing the test cases.
26
26
  [the test-case table: ID · What it checks · Type · Priority · Expected]
27
- 8 test cases, from your request and what the site shows. **Shall I write these?** Reply **go**, or change any case: "add: locked-out user", "drop TS-4".
27
+ 8 test cases, from your request and what the site shows. **Shall I write these?** Reply **go**, or tell me what to change in your own words, like "add a locked-out user" or "drop the fourth one".
28
28
  [user: go]
29
29
  8 tests written and reviewed in sut/saucedemo/tests. Running them 3 times.
30
30
  **⚠️ Ready, with notes**: 8 tests in `sut/saucedemo/tests`, ran 3 times: 7 pass every time; each failed when its check was broken.
31
+
31
32
  Login: automated, signed in once per run and the session reused.
33
+
32
34
  Coverage: log in → TS-1, TS-2 · add to cart → TS-3 to TS-5 · cart → TS-6 to TS-8.
35
+
33
36
  ⚠️ TS-6 fails every time: the app shows a different locked-out message than the story says. A defect draft is in the report; reply "file it" to send it to Jira.
37
+
34
38
  Report: `project-context/runs/R-20261113-1010-cart.report.md`
39
+
35
40
  **Accept?** Reply **yes**, or tell me what to change. What next: 1 open the report · 2 the test cases as Excel, PDF, Word or any file · 3 commit to a new branch (I'll ask first)
36
41
  ```
37
42
  With the story read from a connected tracker, choice 2 becomes "push the 8 test cases to Jira, linked to PR-1 (I'll show exactly what first)" and the files move to 3. The coverage line is never a table, even when the report's is.
@@ -86,6 +86,11 @@ export function checkResultText(text) {
86
86
  const long = lines.filter((l) => words(l) > 30);
87
87
  if (long.length) problems.push(`${long.length} line(s) over 30 words, e.g. "${long[0].slice(0, 60)}…"`);
88
88
  if (lines.length > 7) problems.push(`${lines.length} lines before "Accept?" (the 5 lines of conversation.md, at most 2 of them ⚠️)`);
89
+ if (lines.length && !/^\*\*(✅|⚠️|❌)/.test(lines[0].trim())) problems.push('the first line is not the bold verdict (**✅ Ready to accept**, **⚠️ Ready, with notes** or **❌ Not ready**)');
90
+ // Chat windows render Markdown: lines with no blank line between them run together into one paragraph (seen in Cursor).
91
+ if (lines.length >= 3 && !/\n[ \t]*\n/.test(top)) problems.push('the lines run together in Markdown: leave a blank line between them');
92
+ const setup = lines.find((l) => /\b(reload|restart) (Cursor|VS Code|Claude Code|Gemini|Codex|your (AI )?tool)|\bMCP\b|browser_run_code_unsafe|Cursor Settings|report_check|done_check|suite_check|type[- ]?check/i.test(l));
93
+ if (setup) problems.push(`a note about the tools' own setup or Orion's checks: "${setup.trim().slice(0, 60)}…" (it goes in the report, not the result)`);
89
94
  return problems;
90
95
  }
91
96
 
@@ -124,7 +129,7 @@ function main() {
124
129
  // runs
125
130
  const dir = path.resolve(root, o.results);
126
131
  const files = fs.existsSync(dir) ? fs.readdirSync(dir).filter((f) => f.startsWith(o.run) && f.endsWith('.json') && !/\.(pw|raw|report)\.json$/.test(f)).sort() : [];
127
- if (files.length < 3) add('runs', 'FAIL', `${files.length} results file(s) for ${o.run} in ${o.results}`, 'after each counted run: results_parse.mjs <report> --run <run id>-<n> --out project-context/results/<run id>-<n>.json');
132
+ if (files.length < 3) add('runs', 'FAIL', `${files.length} results file(s) for ${o.run} in ${o.results}`, 'after each counted run: results_parse.mjs <project>/test-summary/results.json (or the run\'s JSON or JUnit report) --run <run id>-<n> --out project-context/results/<run id>-<n>.json');
128
133
  else {
129
134
  const bad = [];
130
135
  for (const f of files) {
@@ -8,7 +8,7 @@
8
8
  * Run report: `# <story> · test report`; a bold verdict (✅ ⚠️ ❌) in the first lines; the facts table (| Story |);
9
9
  * Coverage, What was added, Run it yourself; a <details> block for engineers; the footer.
10
10
  * Assessment: `# <suite> · assessment`; the verdict; the facts table (| Suite |, | Baseline run |, | Findings |); Top
11
- * issues, Fix it (`/orion fix A-…`); a <details> block holding the full findings table (| F | Rule | …); the footer. Above the
11
+ * issues, Fix it (how to ask for fixes in plain words); a <details> block holding the full findings table (| F | Rule | …); the footer. Above the
12
12
  * details block: at most 45 lines, and no decision ids (D-nnn), gate numbers, agent names, rule codes, temporary-folder
13
13
  * paths or a bare "unknown". Each finding names what to change.
14
14
  * Exit code: 0 passes · 1 findings · 2 wrong arguments or unreadable file.
@@ -36,9 +36,12 @@ export function checkReport(text) {
36
36
  if (!/^# .+ · (test report|assessment)$/.test(lines[0] || '')) out.push("first line: '# <story title> · test report' (or '# <suite folder> · assessment')");
37
37
  const verdicts = assess ? '✅ In good shape · ⚠️ Works, needs fixes · ❌ Serious issues' : '✅ Ready to accept · ⚠️ Ready, with notes · ❌ Not ready';
38
38
  if (!lines.slice(1, 5).some((l) => /^\*\*.*(✅|⚠️|❌)/.test(l))) out.push(`no bold verdict (${verdicts}) in the first lines`);
39
+ // A template placeholder left in (`<what was built…>`, `<none | one line each…>`): fill it or remove the line.
40
+ // The template itself (its title is a placeholder) is checked for shape only.
41
+ if (!/^# </.test(lines[0] || '')) lines.forEach((l, i) => { if (/<[A-Za-z✅⚠❌][^<>\n=]*\s[^<>\n=]*>/.test(l) && !/<\/?(details|summary)\b[^>]*>/.test(l) && !/^\s*(```| )/.test(l)) out.push(`line ${i + 1}: a template placeholder is left: ${l.trim().slice(0, 80)}`); });
39
42
  const facts = assess ? [/^\| Suite \|/m, /^\| Baseline run \|/m, /^\| Findings \|/m] : [/^\| Story \|/m];
40
43
  if (!facts.every((rx) => rx.test(text))) out.push(assess ? 'no facts table (| Suite |, | Baseline run |, | Findings |, | Date |)' : 'no facts table (| Story | … |, | App |, | Tests |, | Runs |, | Date |)');
41
- const need = assess ? ['## Top issues', '## Fix it', '/orion fix A-', '<details>', '<summary>All findings and details for engineers</summary>']
44
+ const need = assess ? ['## Top issues', '## Fix it', '<details>', '<summary>All findings and details for engineers</summary>']
42
45
  : ['## Coverage', '## What was added', '## Run it yourself', '<details>', '<summary>Details for engineers</summary>'];
43
46
  for (const h of need) if (!text.includes(h)) out.push(`missing: ${h}`);
44
47
  if (assess && !/^\| F \| Rule \|/m.test(text.split('<details>')[1] || '')) out.push('the full findings table (| F | Rule | … |) is not inside the details block');
@@ -0,0 +1,186 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Report draft: writes the run report (templates/project-context/report.md) filled from the run's own data, so an agent
4
+ * completes a few lines instead of writing a report by hand and fixing report_check findings one by one. In a measured
5
+ * single-agent run (Cursor, 2026-11-19) writing the report took about ten rounds of check and fix.
6
+ *
7
+ * Usage (from the workspace root):
8
+ * node .claude/skills/orion/scripts/report_make.mjs --project <test project> --story <KEY> --run <run id>
9
+ * [--title "<story title>"] [--app <base URL>] [--command "npm test"] [--out project-context/runs/<run id>.report.md]
10
+ * Reads: project-context/test-designs/<story>/design.md (the AC table `| AC… | Meaning |` and the case table
11
+ * `| ID | What it checks | … | AC |`), project-context/results/<run id>-*.json (results_parse output; the runner's raw
12
+ * .pw.json is skipped), the run file's `fail checks <done>/<new>` line, the project's package.json and its git status.
13
+ * Writes the draft (it never overwrites a report without --force) and prints the lines still to fill: each is a
14
+ * `<…>` placeholder that report_check reports until it is filled or removed.
15
+ * Exit code: 0 written · 1 nothing to report (no results files) · 2 wrong arguments.
16
+ */
17
+ import fs from 'node:fs';
18
+ import path from 'node:path';
19
+ import { spawnSync } from 'node:child_process';
20
+ import { pathToFileURL } from 'node:url';
21
+
22
+ /** Rows of the first Markdown table whose header matches `head`. */
23
+ export function table(text, head) {
24
+ const lines = text.replace(/\r/g, '').split('\n');
25
+ const i = lines.findIndex((l) => head.test(l));
26
+ if (i < 0) return [];
27
+ const cols = lines[i].split('|').slice(1, -1).map((c) => c.trim());
28
+ const rows = [];
29
+ for (let j = i + 2; j < lines.length && lines[j].trim().startsWith('|'); j++) {
30
+ const cells = lines[j].split('|').slice(1, -1).map((c) => c.trim());
31
+ rows.push(Object.fromEntries(cols.map((c, k) => [c, cells[k] ?? ''])));
32
+ }
33
+ return rows;
34
+ }
35
+
36
+ /** Per case id: how many recorded runs it passed first time, out of how many it ran in. */
37
+ export function tally(resultFiles, story) {
38
+ const out = new Map();
39
+ for (const f of resultFiles) {
40
+ let d;
41
+ try { d = JSON.parse(fs.readFileSync(f, 'utf8')); } catch { continue; }
42
+ for (const t of d.tests || []) {
43
+ if (!t.test_id || (t.story && t.story !== story)) continue;
44
+ const id = String(t.test_id).replace(/^.*:/, '');
45
+ const c = out.get(id) || { pass: 0, runs: 0, title: t.title, file: t.file };
46
+ c.runs++;
47
+ if (t.status === 'passed' && (t.attempts || 1) === 1) c.pass++;
48
+ out.set(id, c);
49
+ }
50
+ }
51
+ return out;
52
+ }
53
+
54
+ const pick = (o, ...names) => { for (const n of names) for (const k of Object.keys(o)) if (k.toLowerCase().startsWith(n)) return o[k]; return ''; };
55
+
56
+ /** Files as at most 6 lines: the test files by name, the rest by folder with a count. */
57
+ export function grouped(files, testFiles = []) {
58
+ if (files.length > 10) {
59
+ const tests = files.filter((f) => testFiles.includes(f));
60
+ const folders = [...new Set(files.filter((f) => !tests.includes(f)).map((f) => (f.includes('/') ? f.split('/')[0] + '/' : 'project root')))];
61
+ return [...tests.slice(0, 4).map((f) => `- **Tests:** \`${f}\``), `- **With them:** ${files.length - tests.length} files in ${folders.slice(0, 8).map((x) => (x === 'project root' ? x : `\`${x}\``)).join(', ')}${folders.length > 8 ? ' and more' : ''}`].join('\n');
62
+ }
63
+ const by = new Map();
64
+ for (const f of files) { const d = path.posix.dirname(f); by.set(d, [...(by.get(d) || []), path.posix.basename(f)]); }
65
+ const lines = [...by].map(([d, fs]) => (fs.length <= 2 ? fs.map((x) => `\`${d === '.' ? x : `${d}/${x}`}\``).join(', ') : d === '.' ? `${fs.length} files in the project root` : `\`${d}/\` (${fs.length} files)`));
66
+ return (lines.length > 6 ? [...lines.slice(0, 5), `and ${lines.length - 5} more folders (git status)`] : lines).map((l) => `- ${l}`).join('\n');
67
+ }
68
+
69
+ export function draft(o, data) {
70
+ const { acRows, caseRows, counts, runs, fail, tool, testDir, command, files, date } = data;
71
+ const ids = [...counts.keys()].sort((a, b) => a.localeCompare(b, 'en', { numeric: true }));
72
+ const allPass = ids.length && ids.every((id) => counts.get(id).pass === counts.get(id).runs && counts.get(id).runs >= 3);
73
+ const passedEach = runs ? `${ids.filter((id) => counts.get(id).pass === counts.get(id).runs).length}/${ids.length}` : '0';
74
+ const verdict = allPass ? '✅ Ready to accept' : '<⚠️ Ready, with notes | ❌ Not ready>';
75
+ const failLine = fail ? (fail[0] === fail[1] ? 'each new test also failed when its check was broken' : `fail check: ${fail[0]} of ${fail[1]} new tests`) : '<each new test also failed when its check was broken | fail check not run: reason>';
76
+ const covered = new Set();
77
+ const cov = [];
78
+ const caseOf = (id) => caseRows.find((r) => pick(r, 'id') === id) || {};
79
+ const res = (id) => (counts.has(id) ? `${counts.get(id).pass === counts.get(id).runs ? '✅' : '❌'} ${counts.get(id).pass}/${counts.get(id).runs}` : 'not run');
80
+ for (const ac of acRows) {
81
+ const acId = pick(ac, 'ac');
82
+ const cases = caseRows.filter((r) => pick(r, 'ac').split(/[,\s]+/).includes(acId));
83
+ if (!cases.length) { cov.push(`| ${pick(ac, 'meaning', 'criterion', 'requirement')} | not covered: <reason> | — |`); continue; }
84
+ const cids = cases.map((c) => pick(c, 'id'));
85
+ cids.forEach((id) => covered.add(id));
86
+ const results = [...new Set(cids.map(res))];
87
+ const tests = cids.length === 1 ? `${cids[0]} ${pick(cases[0], 'what')}` : cids.join(', ');
88
+ cov.push(`| ${pick(ac, 'meaning', 'criterion', 'requirement')} | ${tests} | ${results.length === 1 ? results[0] + (cids.length > 1 ? ' each' : '') : cids.map((id) => `${id} ${res(id)}`).join(' · ')} |`);
89
+ }
90
+ for (const id of ids) if (!covered.has(id)) cov.push(`| ${pick(caseOf(id), 'what') || counts.get(id).title} *(added)* | ${id} ${pick(caseOf(id), 'what') || counts.get(id).title} | ${res(id)} |`);
91
+ const n = ids.length;
92
+ const title = o.title || `<${o.story} story title>`;
93
+ return `# ${title} · test report
94
+
95
+ **${verdict}**: ${allPass ? `${n} new test${n === 1 ? '' : 's'}, all passed in ${runs} run${runs === 1 ? '' : 's'} in a row` : '<what was built and how it ran>'}${allPass && fail && fail[0] === fail[1] ? '; each failed when its check was broken' : ''}.
96
+
97
+ | | |
98
+ |---|---|
99
+ | Story | ${o.story}${o.title ? ` · ${o.title}` : ''} |
100
+ | App | ${o.app || '<base URL> (<test environment>)'} |
101
+ | Tests | ${n} ${tool} tests · \`${testDir}\` |
102
+ | Runs | ${runs} runs, retries off: ${passedEach} passed each time · ${failLine} |
103
+ | Date | ${date} |
104
+
105
+ ## Coverage
106
+ | Requirement | Test | Result |
107
+ |---|---|---|
108
+ ${cov.join('\n') || '| <requirement> | <TS-n> | <result> |'}
109
+
110
+ ## Needs your attention
111
+ - ${allPass ? 'Nothing: every requirement above has a passing test.' : '<one line each, most important first, each ending with what to do>'}
112
+
113
+ ## What was added
114
+ ${files.length ? grouped(files, data.testFiles || []) : '- <files>'}
115
+
116
+ ## Run it yourself
117
+ \`\`\`
118
+ cd ${o.project}
119
+ ${command}
120
+ \`\`\`
121
+
122
+ <details>
123
+ <summary>Details for engineers</summary>
124
+
125
+ - **Runs:** ${runs} recorded runs in \`project-context/results/\` (${o.run}-1 … ${o.run}-${runs}); the run summary page is \`${path.join(o.project, 'test-summary', 'index.html').split(path.sep).join('/')}\`.
126
+ - **Review:** <blocking findings n (fixed) · suggestions n>
127
+ - **Failures and fixes during the run:** <none | one line each: test · cause · what was done>
128
+ - **Approvals:** <setup confirmed · test cases accepted · installs approved>
129
+ - **Not checked:** <anything not confirmed, and why | nothing>
130
+
131
+ </details>
132
+
133
+ _Written by Orion's agents from checked results. Not yet accepted._
134
+ `;
135
+ }
136
+
137
+ function main() {
138
+ const argv = process.argv.slice(2);
139
+ const o = { force: false };
140
+ for (let i = 0; i < argv.length; i++) {
141
+ const k = argv[i];
142
+ if (k === '--force') o.force = true;
143
+ else if (k.startsWith('--')) o[k.slice(2)] = argv[++i];
144
+ }
145
+ if (!o.project || !o.story || !o.run) { console.log('usage: node .claude/skills/orion/scripts/report_make.mjs --project <test project> --story <KEY> --run <run id> [--title …] [--app <url>] [--out <file>]'); process.exit(2); }
146
+ const out = o.out || path.join('project-context', 'runs', `${o.run}.report.md`);
147
+ if (fs.existsSync(out) && !o.force) { console.log(`report_make: ${out} exists; pass --force to write a new draft over it`); process.exit(2); }
148
+ const resDir = path.join('project-context', 'results');
149
+ const resultFiles = fs.existsSync(resDir) ? fs.readdirSync(resDir).filter((f) => f.startsWith(o.run) && f.endsWith('.json') && !/\.(pw|raw|report)\.json$/.test(f)).sort().map((f) => path.join(resDir, f)) : [];
150
+ if (!resultFiles.length) { console.log(`report_make: no results files for ${o.run} in ${resDir} (results_parse after each counted run)`); process.exit(1); }
151
+ const designFile = path.join('project-context', 'test-designs', o.story, 'design.md');
152
+ const design = fs.existsSync(designFile) ? fs.readFileSync(designFile, 'utf8') : '';
153
+ const acRows = table(design, /^\|\s*AC\b[^|]*\|\s*(Meaning|Criterion|Requirement)/i);
154
+ const caseRows = table(design, /^\|\s*ID\s*\|\s*What it checks/i);
155
+ const counts = tally(resultFiles, o.story);
156
+ const runFile = path.join('project-context', 'runs', `${o.run}.md`);
157
+ const rf = fs.existsSync(runFile) ? fs.readFileSync(runFile, 'utf8') : '';
158
+ const fm = rf.match(/fail checks (\d+)\/(\d+)/);
159
+ const pkgFile = path.join(o.project, 'package.json');
160
+ const pkg = fs.existsSync(pkgFile) ? JSON.parse(fs.readFileSync(pkgFile, 'utf8')) : null;
161
+ const deps = pkg ? { ...pkg.dependencies, ...pkg.devDependencies } : {};
162
+ const ts = fs.existsSync(path.join(o.project, 'tsconfig.json'));
163
+ const tool = deps['@playwright/test'] ? `UI · Playwright + ${ts ? 'TypeScript' : 'JavaScript'}` : fs.existsSync(path.join(o.project, 'pom.xml')) ? 'Java' : fs.existsSync(path.join(o.project, 'pytest.ini')) ? 'Python (pytest)' : '<tool + language>';
164
+ // Results name files relative to the runner's test folder (`ui/x.spec.js`): find each one in the project.
165
+ const all = [];
166
+ const walk = (d, rel) => { for (const e of fs.readdirSync(d, { withFileTypes: true })) { if (['node_modules', '.git', 'test-results', 'playwright-report', 'test-summary'].includes(e.name)) continue; const r = rel ? `${rel}/${e.name}` : e.name; if (e.isDirectory()) walk(path.join(d, e.name), r); else all.push(r); } };
167
+ if (fs.existsSync(o.project)) walk(o.project, '');
168
+ const testFiles = [...new Set([...counts.values()].map((c) => c.file).filter(Boolean).map((f) => f.replace(/^(\.\.\/)+/, '')).map((f) => all.find((a) => a === f || a.endsWith(`/${f}`)) || f))];
169
+ const testDir = testFiles.length ? path.posix.join(o.project.split(path.sep).join('/'), path.posix.dirname(testFiles[0])) : o.project;
170
+ const command = o.command || (pkg && pkg.scripts && pkg.scripts.test ? 'npm test' : '<one command>');
171
+ let files = [];
172
+ // Changed and new files, relative to the project (git ls-files answers relative to the folder it runs in).
173
+ const git = spawnSync('git', ['ls-files', '--modified', '--others', '--exclude-standard'], { cwd: o.project, encoding: 'utf8' });
174
+ if (git.status === 0 && git.stdout.trim()) files = [...new Set(git.stdout.trim().split('\n'))].filter((f) => !/(^|\/)(node_modules|test-results|playwright-report|test-summary|auth)\/|\.env$|package-lock\.json$/.test(f));
175
+ if (!files.length) files = testFiles;
176
+ const runs = Math.max(0, ...[...counts.values()].map((c) => c.runs));
177
+ const date = new Date().toLocaleDateString('en-GB', { day: 'numeric', month: 'short', year: 'numeric' });
178
+ const text = draft(o, { testFiles, acRows, caseRows, counts, runs, fail: fm ? [Number(fm[1]), Number(fm[2])] : null, tool, testDir, command, files, date });
179
+ fs.mkdirSync(path.dirname(out), { recursive: true });
180
+ fs.writeFileSync(out, text);
181
+ const todo = text.split('\n').map((l, i) => [i + 1, l]).filter(([, l]) => /<[^<>\n]*\s[^<>\n]*>/.test(l) && !/<\/?(details|summary)>/.test(l));
182
+ console.log(`report draft: ${out} · ${counts.size} cases · ${runs} runs${design ? '' : ' · no design.md: coverage from results only'}`);
183
+ console.log(todo.length ? `fill ${todo.length} line(s), then run report_check.mjs ${out}:\n${todo.map(([n, l]) => ` ${n}: ${l.slice(0, 120)}`).join('\n')}` : `nothing to fill; run report_check.mjs ${out}`);
184
+ }
185
+
186
+ if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) main();
@@ -170,6 +170,13 @@ function main() {
170
170
  try {
171
171
  const j = JSON.parse(text);
172
172
  if (Array.isArray(j.suites) && j.stats) { format = 'playwright-json'; found = parsePlaywrightJson(j, rel); }
173
+ // The starters' run summary (test-summary/results.json), written on every run by reporters/summaryReporter.
174
+ else if (j.format === 'orion-summary/1' && Array.isArray(j.tests)) {
175
+ format = 'orion-summary';
176
+ found = j.tests.map((t) => ({ title: String(t.title || ''), file: String(t.file || '').replace(/:\d+$/, ''), project: t.project || null,
177
+ status: ['passed', 'failed', 'flaky', 'skipped'].includes(t.status) ? t.status : 'failed', duration_ms: t.duration_ms ?? null,
178
+ attempts: t.attempts || 1, failure_sig: t.failure_sig ? signature(String(t.failure_sig)) : null, source: rel }));
179
+ }
173
180
  // A run that failed before any test (global setup, sign-in, config) lists it in errors[]: say so, never "no tests".
174
181
  if (Array.isArray(j.errors) && j.errors.length) runErrors.push(`${rel}: ${String(j.errors[0].message || j.errors[0].value || j.errors[0]).split('\n')[0].replace(/((?:password|passwd|token|secret)\s*[=:]\s*)\S+/gi, '$1***').slice(0, 200)}`);
175
182
  } catch { /* not JSON */ }
@@ -18,7 +18,7 @@
18
18
  - <one line each, at most 3, e.g. "Page objects for every screen; tests read like user steps.">
19
19
 
20
20
  ## Fix it
21
- `/orion fix A-<id>`: you tick the findings you want fixed. Each fix is made on a separate local branch, run, and kept only if the suite still tests at least what it did; nothing you don't tick is touched.
21
+ Say which findings to fix, in your own words: *fix F-2 and F-5*, or *do the quick wins* (shortcut: `/orion fix A-<id>`). You tick the findings you want fixed. Each fix is made on a separate local branch, run, and kept only if the suite still tests at least what it did; nothing you don't tick is touched.
22
22
 
23
23
  <details>
24
24
  <summary>All findings and details for engineers</summary>
@@ -218,6 +218,20 @@ class SummaryReporter {
218
218
  const projects = [...new Set(rows.map((r) => r.project))];
219
219
  fs.mkdirSync(dir, { recursive: true });
220
220
  fs.writeFileSync(this.outputFile, renderSummary({ rows, support, startedAt: this.startedAt, durationMs: full.duration, baseUrl: this.baseUrl, projects }));
221
+ // The same run as data, next to the page: every run (yours, CI's or an agent's) leaves results a script can read
222
+ // (Orion's results_parse.mjs), so nothing has to run again just to get a machine-readable report.
223
+ const data = {
224
+ format: 'orion-summary/1',
225
+ finished_at: new Date().toISOString(),
226
+ status: full.status,
227
+ // `all` was built from the same entries in the same order: match by position, since tests made in a loop share a line.
228
+ tests: [...this.results].map(([test, results], i) => {
229
+ const r = all[i];
230
+ return { title: test.title, file: r ? r.file : '', project: r ? r.project : '', status: r ? r.outcome : 'failed',
231
+ duration_ms: r ? r.durationMs : 0, attempts: results.length, failure_sig: r && r.error ? r.error.split('\n')[0].slice(0, 200) : null };
232
+ }),
233
+ };
234
+ fs.writeFileSync(path.join(dir, 'results.json'), `${JSON.stringify(data, null, 2)}\n`);
221
235
  console.log(`Summary: ${path.relative(process.cwd(), this.outputFile)}`);
222
236
  }
223
237
 
@@ -231,6 +231,21 @@ export default class SummaryReporter implements Reporter {
231
231
  const projects = [...new Set(rows.map((r) => r.project))];
232
232
  fs.mkdirSync(dir, { recursive: true });
233
233
  fs.writeFileSync(this.outputFile, renderSummary({ rows, support, startedAt: this.startedAt, durationMs: full.duration, baseUrl: this.baseUrl, projects }));
234
+ // The same run as data, next to the page: every run (yours, CI's or an agent's) leaves results a script can read
235
+ // (Orion's results_parse.mjs), so nothing has to run again just to get a machine-readable report.
236
+ const data = {
237
+ format: 'orion-summary/1',
238
+ finished_at: new Date().toISOString(),
239
+ status: full.status,
240
+ // `all` was built from the same entries in the same order: match by position, since tests made in a loop share a line.
241
+ tests: [...this.results].map(([test, results], i) => {
242
+ const file = `${path.relative(paths.root, test.location.file).split(path.sep).join('/')}:${test.location.line}`;
243
+ const r = all[i];
244
+ return { title: test.title, file, project: r ? r.project : '', status: r ? r.outcome : 'failed',
245
+ duration_ms: r ? r.durationMs : 0, attempts: results.length, failure_sig: r && r.error ? r.error.split('\n')[0].slice(0, 200) : null };
246
+ }),
247
+ };
248
+ fs.writeFileSync(path.join(dir, 'results.json'), `${JSON.stringify(data, null, 2)}\n`);
234
249
  console.log(`Summary: ${path.relative(process.cwd(), this.outputFile)}`);
235
250
  }
236
251
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "orion",
3
3
  "displayName": "Orion",
4
- "version": "3.2.0",
4
+ "version": "3.3.0",
5
5
  "description": "Orion: AI test agents that work as one team. An orchestrator and 11 specialist agents, 42 skills and 8 quality gates that extend a project's existing test framework, with your approval at every write.",
6
6
  "author": {
7
7
  "name": "ahmad44980"
@@ -1,7 +1,7 @@
1
1
  <!-- generated by scripts/build_hosts.py from .claude/ and AGENTS.md; edit the source, then rerun the script -->
2
2
  # /orion
3
3
 
4
- Host: cursor. Run the test-automation workflow for the requirement given after this command. If it is a greeting, answer with the capability card (`references/conversation.md`). If it starts with a mode word (`build`, `analyze`, `assess`, `fix`, `batch`, `design`, `review`, `triage`, `run`, `report`, `doctor`), or the request is one specialist's job, run only that mode and stop at its stop point (`.claude/skills/orion/references/modes.md`).
4
+ Host: cursor. Run the test-automation workflow for the requirement given after this command. If it is a greeting, answer with the capability card (`references/greeting.md`). If it starts with a mode word (`build`, `analyze`, `assess`, `fix`, `batch`, `design`, `review`, `triage`, `run`, `report`, `doctor`), or the request is one specialist's job, run only that mode and stop at its stop point (`.claude/skills/orion/references/modes.md`).
5
5
 
6
6
  1. Read `AGENTS.md`, then read and follow `.claude/skills/orion/SKILL.md` and the files in `.claude/skills/orion/references/`. You are the orchestrator; `.claude/agents/super-orchestrator.md` holds your gate state and hard rules. The host is `cursor`: its row in `references/hosts.md` says how you delegate and what the host enforces.
7
7
  2. This host runs single-agent: its Task tool rejects the platform's agent types (run of 2026-10-16). Do each gate yourself with that specialist's skills, as `AGENTS.md` describes; say so once, and name yourself, not the specialist, in the run file.
@@ -1,7 +1,7 @@
1
1
  # generated by scripts/build_hosts.py from .claude/ and AGENTS.md; edit the source, then rerun the script
2
2
  description = "Run Orion, the AI test agents (/orion <story> | build | analyze | assess | fix | batch | design | review | triage | run | report | doctor)"
3
3
  prompt = '''
4
- Host: gemini-cli. Run the test-automation workflow for the requirement given after this command. If it is a greeting, answer with the capability card (`references/conversation.md`). If it starts with a mode word (`build`, `analyze`, `assess`, `fix`, `batch`, `design`, `review`, `triage`, `run`, `report`, `doctor`), or the request is one specialist's job, run only that mode and stop at its stop point (`.claude/skills/orion/references/modes.md`).
4
+ Host: gemini-cli. Run the test-automation workflow for the requirement given after this command. If it is a greeting, answer with the capability card (`references/greeting.md`). If it starts with a mode word (`build`, `analyze`, `assess`, `fix`, `batch`, `design`, `review`, `triage`, `run`, `report`, `doctor`), or the request is one specialist's job, run only that mode and stop at its stop point (`.claude/skills/orion/references/modes.md`).
5
5
 
6
6
  1. Read `AGENTS.md`, then read and follow `.claude/skills/orion/SKILL.md` and the files in `.claude/skills/orion/references/`. You are the orchestrator; `.claude/agents/super-orchestrator.md` holds your gate state and hard rules. The host is `gemini-cli`: its row in `references/hosts.md` says how you delegate and what the host enforces.
7
7
  2. Delegate each gate to the matching specialist (automation-strategist, change-agent, codebase-analyst, environment-discovery, evidence-validator, executor, failure-analyst, implementer, requirement-analyst, reviewer, test-reporter) with the TASK brief from `references/task-brief.md`. If this host can't start those agents, work in single-agent mode as `AGENTS.md` describes.
@@ -2,7 +2,7 @@
2
2
  description: Run Orion, the AI test agents (/orion <story> | build | analyze | assess | fix | batch | design | review | triage | run | report | doctor)
3
3
  ---
4
4
  <!-- generated by scripts/build_hosts.py from .claude/ and AGENTS.md; edit the source, then rerun the script -->
5
- Host: github-copilot. Run the test-automation workflow for the requirement given after this command. If it is a greeting, answer with the capability card (`references/conversation.md`). If it starts with a mode word (`build`, `analyze`, `assess`, `fix`, `batch`, `design`, `review`, `triage`, `run`, `report`, `doctor`), or the request is one specialist's job, run only that mode and stop at its stop point (`.claude/skills/orion/references/modes.md`).
5
+ Host: github-copilot. Run the test-automation workflow for the requirement given after this command. If it is a greeting, answer with the capability card (`references/greeting.md`). If it starts with a mode word (`build`, `analyze`, `assess`, `fix`, `batch`, `design`, `review`, `triage`, `run`, `report`, `doctor`), or the request is one specialist's job, run only that mode and stop at its stop point (`.claude/skills/orion/references/modes.md`).
6
6
 
7
7
  1. Read `AGENTS.md`, then read and follow `.claude/skills/orion/SKILL.md` and the files in `.claude/skills/orion/references/`. You are the orchestrator; `.claude/agents/super-orchestrator.md` holds your gate state and hard rules. The host is `github-copilot`: its row in `references/hosts.md` says how you delegate and what the host enforces.
8
8
  2. Delegate each gate to the matching specialist (automation-strategist, change-agent, codebase-analyst, environment-discovery, evidence-validator, executor, failure-analyst, implementer, requirement-analyst, reviewer, test-reporter) with the TASK brief from `references/task-brief.md`. If this host can't start those agents, work in single-agent mode as `AGENTS.md` describes.
@@ -2,7 +2,7 @@
2
2
  description: Run Orion, the AI test agents (/orion <story> | build | analyze | assess | fix | batch | design | review | triage | run | report | doctor)
3
3
  ---
4
4
  <!-- generated by scripts/build_hosts.py from .claude/ and AGENTS.md; edit the source, then rerun the script -->
5
- Host: windsurf. Run the test-automation workflow for the requirement given after this command. If it is a greeting, answer with the capability card (`references/conversation.md`). If it starts with a mode word (`build`, `analyze`, `assess`, `fix`, `batch`, `design`, `review`, `triage`, `run`, `report`, `doctor`), or the request is one specialist's job, run only that mode and stop at its stop point (`.claude/skills/orion/references/modes.md`).
5
+ Host: windsurf. Run the test-automation workflow for the requirement given after this command. If it is a greeting, answer with the capability card (`references/greeting.md`). If it starts with a mode word (`build`, `analyze`, `assess`, `fix`, `batch`, `design`, `review`, `triage`, `run`, `report`, `doctor`), or the request is one specialist's job, run only that mode and stop at its stop point (`.claude/skills/orion/references/modes.md`).
6
6
 
7
7
  1. Read `AGENTS.md`, then read and follow `.claude/skills/orion/SKILL.md` and the files in `.claude/skills/orion/references/`. You are the orchestrator; `.claude/agents/super-orchestrator.md` holds your gate state and hard rules. The host is `windsurf`: its row in `references/hosts.md` says how you delegate and what the host enforces.
8
8
  2. Delegate each gate to the matching specialist (automation-strategist, change-agent, codebase-analyst, environment-discovery, evidence-validator, executor, failure-analyst, implementer, requirement-analyst, reviewer, test-reporter) with the TASK brief from `references/task-brief.md`. If this host can't start those agents, work in single-agent mode as `AGENTS.md` describes.
package/AGENTS.md CHANGED
@@ -8,9 +8,9 @@ Rules for any AI agent working in a repository where Orion (this test-automation
8
8
  - **Hosts without subagents, and Cursor** (its Task tool rejects the platform's agent types): single-agent mode, you are the orchestrator. For each gate, load the skill that the gate's specialist would use (listed in its agent file under `skills:`), follow it, and write the same RESULT block before moving on. Respect each specialist's *Never* list while you're doing that specialist's step. Say once that the host runs single-agent, and never name a specialist in the run file for work you did.
9
9
 
10
10
  ## In the chat
11
- - **A greeting or an empty request** ("hi", "what can you do") gets the capability card from [conversation.md](.claude/skills/orion/references/conversation.md) and nothing else, with or without `/orion`.
11
+ - **A greeting or an empty request** ("hi", "what can you do") gets the capability card from [greeting.md](.claude/skills/orion/references/greeting.md) and nothing else, with or without `/orion`.
12
12
  - **The first reply to a request to write, extend or design tests is the [setup card](.claude/skills/orion/references/setup-card.md), word for word:** it asks whether there is an existing framework or repo, whether test cases already exist (Jira, Xray, TestRail, Zephyr, Azure Test Plans, Trello, Excel/CSV), the style (page objects, hybrid, BDD), tool and language, which tools to connect (Jira, Xray, TestRail, Zephyr, Trello, GitHub, Bitbucket, GitLab, Azure DevOps), site and scope, the test account and extra checks, each with a default; then waits for go. `doctor`, `report`, `review`, `triage`, `run` and `analyze` don't get it. Never reword it into a plan. Nothing is explored or written before the reply. **The second checkpoint** is the test-case table: "Shall I write these?". No other stops before the result.
13
- - **No narration.** Never write "I'll inspect the page…", "The plan is confirmed. I'll…", "I'll start by reading the rules…", "Waiting for the requirement analysis…", "Gate 3 next", agent names, decision IDs ("recorded as D-002") or the mode. Write only the one question you need, a result the user can use, a blocker, or the deliverable; gates and decisions go in the run file.
13
+ - **No narration, also between tool calls.** Never write "I'll inspect the page…", "The first reply is the setup card. I'll load it…", "Next I'll run…", "The checker wants…", "The output was cut off, so I'll…", "Waiting for the requirement analysis…", "Gate 3 next", agent names, decision IDs ("recorded as D-002") or the mode. Your tool calls already show the work; text appears only when the user has something to read. Write only the one question you need, a result the user can use, a blocker, or the deliverable; gates and decisions go in the run file.
14
14
 
15
15
  ## Non-negotiable rules
16
16
  1. **Gates 1–8, in order.** Never skip one, and never mark one passed without the evidence its skill asks for. Only Gates 2 and 3 may run together. A mode that needs fewer gates (analyze, design, review, triage, run, task) records the others `n/a`.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <p align="center"><img src="https://cdn.jsdelivr.net/npm/@orion-qa/orion@3.2.0/assets/orion-banner.svg" alt="Orion: AI test agents, one team. 12 agents that explore, design, build and prove." width="720"></p>
1
+ <p align="center"><img src="https://cdn.jsdelivr.net/npm/@orion-qa/orion@3.3.0/assets/orion-banner.svg" alt="Orion: AI test agents, one team. 12 agents that explore, design, build and prove." width="720"></p>
2
2
 
3
3
  # Orion
4
4
 
@@ -32,7 +32,7 @@ No commands to learn. Typos, half sentences and any language work; anything that
32
32
  `/orion …` still works as a shortcut where your tool has commands.
33
33
 
34
34
  ## How a run goes
35
- [![One Orion run, A to Z: you say what to test and answer the setup card; the agents read the story, explore your app and your code, design the test cases for you to approve, write and review the tests, run each 3 times, check every claim and confirm the finish by script; you accept the result](https://cdn.jsdelivr.net/npm/@orion-qa/orion@3.2.0/assets/run-flow.svg)](https://cdn.jsdelivr.net/npm/@orion-qa/orion@3.2.0/assets/run-flow.svg)
35
+ [![One Orion run, A to Z: you say what to test and answer the setup card; the agents read the story, explore your app and your code, design the test cases for you to approve, write and review the tests, run each 3 times, check every claim and confirm the finish by script; you accept the result](https://cdn.jsdelivr.net/npm/@orion-qa/orion@3.3.0/assets/run-flow.svg)](https://cdn.jsdelivr.net/npm/@orion-qa/orion@3.3.0/assets/run-flow.svg)
36
36
 
37
37
  1. **You ask**, and answer 8 quick setup questions (each has a default; reply **go**).
38
38
  2. **Understand and explore:** the story becomes numbered acceptance criteria; the live app is explored in a real browser and every locator is proven.
package/bin/orion.mjs CHANGED
@@ -34,10 +34,10 @@ const HOSTS = {
34
34
  cursor: [['.cursor/commands', '.cursor/mcp.template.json', '.cursor/hooks.json'], '/orion doctor (main Agent chat)'],
35
35
  'github-copilot': [['.github/prompts', '.github/hooks/orion-lean.json', '.vscode/mcp.template.json'], '/orion doctor'],
36
36
  'gemini-cli': [['.gemini/agents', '.gemini/commands', '.gemini/settings.json'], '/orion doctor'],
37
- codex: [['.codex/agents', '.codex/hooks.json'], 'Host: codex. Follow .claude/skills/orion/SKILL.md for this story: doctor'],
37
+ codex: [['.codex/agents', '.codex/hooks.json'], 'Orion, is everything set up?'],
38
38
  windsurf: [['.windsurf/workflows', '.devin/hooks.v1.json'], '/orion doctor'],
39
39
  'grok-build': [[], '/orion doctor'],
40
- other: [[], 'Host: <tool name>. Follow .claude/skills/orion/SKILL.md for this story: doctor'],
40
+ other: [[], "Orion, is everything set up? (if your tool doesn't read AGENTS.md: Host: <tool name>. Follow .claude/skills/orion/SKILL.md for this story: doctor)"],
41
41
  };
42
42
  const NOTES = {
43
43
  'claude-code': 'CLAUDE.md imports AGENTS.md, so the platform rules load even where a CLAUDE.md exists. Start Claude Code '
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "orion-rules",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "Ask/deny rules of Orion, the AI test agents, for Gemini CLI (policies only; the agents and commands are installed into the repo by scripts/install.py)."
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-qa/orion",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "Orion: AI test agents that work as one team. They explore your live site, design test cases you approve, write Playwright, Selenium, Appium or API tests in your framework, run them 3 times and prove them. For Claude Code, Cursor, Copilot, Codex and Gemini CLI.",
5
5
  "keywords": [
6
6
  "orion",