@allurereport/plugin-agent 3.11.0 → 3.12.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.
package/README.md CHANGED
@@ -104,6 +104,38 @@ The preferred CLI entrypoint is:
104
104
  npx allure agent -- npm test
105
105
  ```
106
106
 
107
+ To analyze existing Allure results or dump archives downloaded from CI without
108
+ rerunning tests, use `agent inspect`. Positional arguments match Allure results
109
+ directories. `--dump` accepts paths or glob patterns and can be repeated for
110
+ multiple jobs or environments:
111
+
112
+ ```shell
113
+ npx allure agent inspect path/to/allure-results
114
+ npx allure agent inspect --dump allure-results-linux.zip --dump allure-results-macos.zip
115
+ npx allure agent inspect --config ./allurerc.mjs --output ./agent-output path/to/allure-results
116
+ ```
117
+
118
+ `agent inspect` accepts the same result inputs and configuration-style options as
119
+ `allure generate`, including result directory globs, `--dump`, `--config`,
120
+ `--cwd`, `--report-name`, `--history-limit`, and `--hide-labels`. Its `--output`
121
+ option writes the agentic output directory.
122
+
123
+ `allure agent` and `allure agent inspect` use `--report auto` by default. This
124
+ writes the agent-readable artifacts and, when the stored visible result count is
125
+ 1000 or fewer, also writes a single-file Awesome report at `awesome/index.html`
126
+ inside the agent output directory. Runs above that threshold skip the human
127
+ report to avoid excessive output. Check `manifest/human-report.json`, the Human
128
+ Report section in `index.md`, or `allure agent query --latest summary` to see
129
+ whether a report was generated.
130
+
131
+ If you need the human-readable report from the most recent agent run, first run
132
+ `npx allure agent latest` when the output directory is unknown. Then check
133
+ `<output>/manifest/human-report.json`; when its status is `generated`, open
134
+ `<output>/<path>` from that manifest, usually `<output>/awesome/index.html`.
135
+ Use `--report off` for agent-only artifacts, `--report awesome` to force the
136
+ single-file Awesome report regardless of result count, or `--report config` to
137
+ force the configured non-agent report plugins inside the agent output directory.
138
+
107
139
  You can provide compact inline expectations for the common review path:
108
140
 
109
141
  ```shell
@@ -125,7 +157,9 @@ npx allure agent \
125
157
  -- npm test
126
158
  ```
127
159
 
128
- That command uses an agent-only profile by default, so configured presentation and export plugins such as Awesome, Dashboard, or TestOps are ignored for that run.
160
+ That command uses the default `--report auto` policy. Configured presentation or
161
+ export plugins such as Dashboard or TestOps are otherwise ignored for agent runs
162
+ unless you explicitly use `--report config`.
129
163
 
130
164
  ## Options
131
165
 
@@ -284,6 +318,7 @@ support is unclear:
284
318
  - Use `allure --version`, `allure agent capabilities --json`, and `allure agent --help` before choosing flags when the local CLI surface is unknown.
285
319
  - Use `allure agent latest` to print the newest output directory and `index.md` path when `--output` was omitted.
286
320
  - Use `allure agent latest`, `state-dir`, `query`, `select`, and `--rerun-*` according to their loop/task/problem mapping instead of treating them as interchangeable helper commands.
321
+ - Use `allure agent inspect <allure-results-dir-or-glob>` or `allure agent inspect --dump <archive-or-glob>` when you need agent-readable markdown and manifests from existing Allure results without rerunning tests locally; repeat `--dump` for multiple CI jobs or environments.
287
322
  - Use `allure agent query --latest summary|tests|findings|test` or `allure agent query --from <output-dir> ...` to inspect prior output as focused JSON before manually opening raw manifests.
288
323
  - Use `allure agent select --from <output-dir> --output <file>` when you want the CLI to write the test plan and print a short summary with the file path, source output, preset, and selected count.
289
324
  - When rerunning previous failures, use `allure agent --rerun-latest --rerun-preset failed -- <command>` or `allure agent --rerun-from <output-dir> --rerun-preset failed -- <command>` instead of manually rebuilding runner-specific test names.
@@ -10,7 +10,13 @@ export declare const createAgentCapabilities: () => {
10
10
  readonly run: {
11
11
  readonly supported: true;
12
12
  readonly usage: "allure agent [options] -- <command>";
13
- readonly options: readonly ["--config", "--cwd", "--output", "--expectations", "--goal", "--task-id", "--expect-tests", "--expect-label", "--expect-env", "--expect-test", "--expect-prefix", "--expect-step-containing", "--forbid-label", "--expect-steps", "--expect-attachments", "--expect-attachment", "--environment", "--environment-name", "--silent", "--rerun-from", "--rerun-latest", "--rerun-preset", "--rerun-environment", "--rerun-label"];
13
+ readonly options: readonly ["--config", "--cwd", "--output", "--report", "--expectations", "--goal", "--task-id", "--expect-tests", "--expect-label", "--expect-env", "--expect-test", "--expect-prefix", "--expect-step-containing", "--forbid-label", "--expect-steps", "--expect-attachments", "--expect-attachment", "--environment", "--environment-name", "--silent", "--rerun-from", "--rerun-latest", "--rerun-preset", "--rerun-environment", "--rerun-label"];
14
+ };
15
+ readonly inspect: {
16
+ readonly supported: true;
17
+ readonly usage: "allure agent inspect [options] [<allure-results-dir-or-glob> ...]";
18
+ readonly inputs: readonly ["allure-results-directories", "dump-archives"];
19
+ readonly options: readonly ["--config", "--cwd", "--output", "--report", "--report-name", "--name", "--dump", "--open", "--port", "--history-limit", "--hide-labels", "--expectations", "--goal", "--task-id", "--expect-tests", "--expect-label", "--expect-env", "--expect-test", "--expect-prefix", "--expect-step-containing", "--forbid-label", "--expect-steps", "--expect-attachments", "--expect-attachment", "--environment", "--environment-name"];
14
20
  };
15
21
  readonly latest: {
16
22
  readonly supported: true;
@@ -77,8 +83,30 @@ export declare const createAgentCapabilities: () => {
77
83
  readonly output: {
78
84
  readonly automaticTempDirectory: true;
79
85
  readonly explicitOutputOption: "--output <dir>";
86
+ readonly explicitOutputCleanup: "When --output is provided, the output directory and its lifetime are caller-managed. Agent-mode cleanup will not remove it, so agents that pass --output should remove or archive that directory when it is no longer needed; later state compaction drops missing explicit outputs from the registry.";
80
87
  readonly schema: "allure-agent-output/v1";
81
- readonly files: readonly ["index.md", "AGENTS.md", "manifest/run.json", "manifest/test-events.jsonl", "manifest/tests.jsonl", "manifest/findings.jsonl", "manifest/expected.json", "tests/<environment>/<slug>.md", "artifacts/global/"];
88
+ readonly files: readonly ["index.md", "AGENTS.md", "manifest/run.json", "manifest/test-events.jsonl", "manifest/tests.jsonl", "manifest/findings.jsonl", "manifest/expected.json", "manifest/human-report.json", "tests/<environment>/<slug>.md", "artifacts/global/", "awesome/index.html"];
89
+ };
90
+ readonly humanReports: {
91
+ readonly supported: true;
92
+ readonly option: "--report <auto|off|awesome|config>";
93
+ readonly defaultMode: "auto";
94
+ readonly modes: {
95
+ readonly auto: "Generate a single-file Awesome report when the stored visible result count is 1000 or fewer; skip above that threshold.";
96
+ readonly off: "Disable human-readable reports and write agent artifacts only.";
97
+ readonly awesome: "Force a single-file Awesome report and ignore the auto threshold.";
98
+ readonly config: "Force the configured non-agent report plugins inside the agent output directory and ignore the auto threshold.";
99
+ };
100
+ readonly threshold: {
101
+ readonly resultCount: 1000;
102
+ readonly appliesTo: "auto";
103
+ readonly countSource: "Allure store visible logical test results with retries excluded";
104
+ readonly generatedWhen: "<= 1000";
105
+ readonly skippedWhen: "> 1000";
106
+ };
107
+ readonly statusManifest: "manifest/human-report.json";
108
+ readonly defaultGeneratedPath: "awesome/index.html";
109
+ readonly discovery: readonly ["When a user asks for a human-readable report after an agent run, first use `allure agent latest` if no output directory is known.", "Read `<output>/manifest/human-report.json`, the Human Report section of `<output>/index.md`, or `allure agent query --latest summary` to check whether a report already exists.", "If the status is `generated`, use `<output>/<path>` from the human-report manifest; for auto and awesome this is usually `<output>/awesome/index.html`.", "If the status is `skipped`, `disabled`, `failed`, or the manifest is missing, generate a report only from available results or dumps with the requested `--report` mode."];
82
110
  };
83
111
  readonly unsupported: {
84
112
  readonly discovery: true;
@@ -95,5 +123,5 @@ export declare const createAgentCapabilities: () => {
95
123
  readonly expectationControls: readonly ["--expect-evidence"];
96
124
  };
97
125
  };
98
- export declare const AGENT_TASK_MAP_HELP = "Agent task map:\n allure --version\n allure agent --help\n allure agent capabilities\n Setup and capability detection. Use when the local CLI surface is unknown,\n generated guidance may be stale, or an agent needs supported flags without\n guessing.\n\n allure agent --goal ... -- <command>\n Run a test command with runtime evidence, scope expectations, and\n agent-readable artifacts for review, debugging, smoke checks, or validation.\n\n allure agent latest\n Recover the newest agent output directory and index.md when --output was\n omitted or a follow-up task needs the previous run.\n\n allure agent state-dir\n Show where project-scoped latest-run pointers are stored. Useful when\n latest cannot find a run or CI/sandbox state looks wrong.\n\n allure agent select --latest\n allure agent select --from <output-dir>\n Inspect/filter prior results and write an Allure test plan before rerun.\n\n allure agent query --latest summary\n allure agent query --from <output-dir> tests\n allure agent query --from <output-dir> findings\n Inspect prior agent output as focused JSON without manually loading raw\n manifests. Use for summaries, filtered test lists, findings, or one test.\n\n allure agent --rerun-latest -- <command>\n allure agent --rerun-from <output-dir> -- <command>\n Rerun the failed, unsuccessful, or selected tests from prior agent output\n through Allure test plan support.\n\nEnvironment:\n ALLURE_AGENT_STATE_DIR=<dir>\n Override the project-scoped state directory. Useful in CI, sandboxes, or\n multi-job setups that need a deterministic shared state location.\n";
126
+ export declare const AGENT_TASK_MAP_HELP = "Agent task map:\n allure --version\n allure agent --help\n allure agent capabilities\n Setup and capability detection. Use when the local CLI surface is unknown,\n generated guidance may be stale, or an agent needs supported flags without\n guessing.\n\n allure agent --goal ... -- <command>\n Run a test command with runtime evidence, scope expectations, and\n agent-readable artifacts for review, debugging, smoke checks, or validation.\n Use --report auto|off|awesome|config to control the optional human report.\n The default --report auto may already generate awesome/index.html in the\n agent output when the stored visible result count is 1000 or fewer.\n\n allure agent inspect [<allure-results-dir-or-glob> ...]\n allure agent inspect --dump <archive-or-glob> [--dump <archive-or-glob> ...]\n Restore one or more dump archives and/or read existing Allure results\n directories, then produce agent-readable artifacts without executing a\n test command. Use --report auto|off|awesome|config to control the optional\n human report. Use after downloading CI dump artifacts created by\n allure run --dump or when local results already exist.\n\n allure agent latest\n Recover the newest agent output directory and index.md when --output was\n omitted or a follow-up task needs the previous run. If a user asks for a\n human-readable report from the last run, start here, then inspect\n <output>/manifest/human-report.json and use <output>/<path> when status is\n generated.\n\n allure agent state-dir\n Show the shared state directory that stores per-project run registries. Useful when\n latest cannot find a run or CI/sandbox state looks wrong.\n\n allure agent select --latest\n allure agent select --from <output-dir>\n Inspect/filter prior results and write an Allure test plan before rerun.\n\n allure agent query --latest summary\n allure agent query --from <output-dir> tests\n allure agent query --from <output-dir> findings\n Inspect prior agent output as focused JSON without manually loading raw\n manifests. Use for summaries, human_report status, filtered test lists,\n findings, or one test.\n\n allure agent --rerun-latest -- <command>\n allure agent --rerun-from <output-dir> -- <command>\n Rerun the failed, unsuccessful, or selected tests from prior agent output\n through Allure test plan support.\n\nEnvironment:\n ALLURE_AGENT_STATE_DIR=<dir>\n Override the shared agent state directory. Useful in CI, sandboxes, or\n multi-job setups that need a deterministic shared state location.\n\nHuman reports:\n Default agent runs use --report auto. For 1000 or fewer stored visible logical\n results, the last run may already contain a human-readable single-file Awesome\n report at <output>/awesome/index.html. Larger runs are skipped in auto mode to\n avoid excessive output.\n\n When a user asks for \"the report\" after a run, do not assume it needs to be\n regenerated. First run allure agent latest when the output directory is\n unknown, then read <output>/manifest/human-report.json or\n allure agent query --latest summary. If the human-report status is generated,\n return or open <output>/<path> from that manifest. If the status is skipped,\n disabled, failed, or missing, rerun or inspect existing results/dumps with the\n requested --report mode, for example --report awesome to force the single-file\n Awesome report or --report config to force configured report plugins.\n";
99
127
  export declare const isAgentTaskMapHelpRequest: (args: string[]) => boolean;
@@ -14,6 +14,7 @@ export const createAgentCapabilities = () => ({
14
14
  "--config",
15
15
  "--cwd",
16
16
  "--output",
17
+ "--report",
17
18
  "--expectations",
18
19
  "--goal",
19
20
  "--task-id",
@@ -37,6 +38,39 @@ export const createAgentCapabilities = () => ({
37
38
  "--rerun-label",
38
39
  ],
39
40
  },
41
+ inspect: {
42
+ supported: true,
43
+ usage: "allure agent inspect [options] [<allure-results-dir-or-glob> ...]",
44
+ inputs: ["allure-results-directories", "dump-archives"],
45
+ options: [
46
+ "--config",
47
+ "--cwd",
48
+ "--output",
49
+ "--report",
50
+ "--report-name",
51
+ "--name",
52
+ "--dump",
53
+ "--open",
54
+ "--port",
55
+ "--history-limit",
56
+ "--hide-labels",
57
+ "--expectations",
58
+ "--goal",
59
+ "--task-id",
60
+ "--expect-tests",
61
+ "--expect-label",
62
+ "--expect-env",
63
+ "--expect-test",
64
+ "--expect-prefix",
65
+ "--expect-step-containing",
66
+ "--forbid-label",
67
+ "--expect-steps",
68
+ "--expect-attachments",
69
+ "--expect-attachment",
70
+ "--environment",
71
+ "--environment-name",
72
+ ],
73
+ },
40
74
  latest: {
41
75
  supported: true,
42
76
  usage: "allure agent latest [--cwd <dir>]",
@@ -102,6 +136,7 @@ export const createAgentCapabilities = () => ({
102
136
  output: {
103
137
  automaticTempDirectory: true,
104
138
  explicitOutputOption: "--output <dir>",
139
+ explicitOutputCleanup: "When --output is provided, the output directory and its lifetime are caller-managed. Agent-mode cleanup will not remove it, so agents that pass --output should remove or archive that directory when it is no longer needed; later state compaction drops missing explicit outputs from the registry.",
105
140
  schema: "allure-agent-output/v1",
106
141
  files: [
107
142
  "index.md",
@@ -111,8 +146,36 @@ export const createAgentCapabilities = () => ({
111
146
  "manifest/tests.jsonl",
112
147
  "manifest/findings.jsonl",
113
148
  "manifest/expected.json",
149
+ "manifest/human-report.json",
114
150
  "tests/<environment>/<slug>.md",
115
151
  "artifacts/global/",
152
+ "awesome/index.html",
153
+ ],
154
+ },
155
+ humanReports: {
156
+ supported: true,
157
+ option: "--report <auto|off|awesome|config>",
158
+ defaultMode: "auto",
159
+ modes: {
160
+ auto: "Generate a single-file Awesome report when the stored visible result count is 1000 or fewer; skip above that threshold.",
161
+ off: "Disable human-readable reports and write agent artifacts only.",
162
+ awesome: "Force a single-file Awesome report and ignore the auto threshold.",
163
+ config: "Force the configured non-agent report plugins inside the agent output directory and ignore the auto threshold.",
164
+ },
165
+ threshold: {
166
+ resultCount: 1000,
167
+ appliesTo: "auto",
168
+ countSource: "Allure store visible logical test results with retries excluded",
169
+ generatedWhen: "<= 1000",
170
+ skippedWhen: "> 1000",
171
+ },
172
+ statusManifest: "manifest/human-report.json",
173
+ defaultGeneratedPath: "awesome/index.html",
174
+ discovery: [
175
+ "When a user asks for a human-readable report after an agent run, first use `allure agent latest` if no output directory is known.",
176
+ "Read `<output>/manifest/human-report.json`, the Human Report section of `<output>/index.md`, or `allure agent query --latest summary` to check whether a report already exists.",
177
+ "If the status is `generated`, use `<output>/<path>` from the human-report manifest; for auto and awesome this is usually `<output>/awesome/index.html`.",
178
+ "If the status is `skipped`, `disabled`, `failed`, or the manifest is missing, generate a report only from available results or dumps with the requested `--report` mode.",
116
179
  ],
117
180
  },
118
181
  unsupported: {
@@ -141,13 +204,27 @@ export const AGENT_TASK_MAP_HELP = `Agent task map:
141
204
  allure agent --goal ... -- <command>
142
205
  Run a test command with runtime evidence, scope expectations, and
143
206
  agent-readable artifacts for review, debugging, smoke checks, or validation.
207
+ Use --report auto|off|awesome|config to control the optional human report.
208
+ The default --report auto may already generate awesome/index.html in the
209
+ agent output when the stored visible result count is 1000 or fewer.
210
+
211
+ allure agent inspect [<allure-results-dir-or-glob> ...]
212
+ allure agent inspect --dump <archive-or-glob> [--dump <archive-or-glob> ...]
213
+ Restore one or more dump archives and/or read existing Allure results
214
+ directories, then produce agent-readable artifacts without executing a
215
+ test command. Use --report auto|off|awesome|config to control the optional
216
+ human report. Use after downloading CI dump artifacts created by
217
+ allure run --dump or when local results already exist.
144
218
 
145
219
  allure agent latest
146
220
  Recover the newest agent output directory and index.md when --output was
147
- omitted or a follow-up task needs the previous run.
221
+ omitted or a follow-up task needs the previous run. If a user asks for a
222
+ human-readable report from the last run, start here, then inspect
223
+ <output>/manifest/human-report.json and use <output>/<path> when status is
224
+ generated.
148
225
 
149
226
  allure agent state-dir
150
- Show where project-scoped latest-run pointers are stored. Useful when
227
+ Show the shared state directory that stores per-project run registries. Useful when
151
228
  latest cannot find a run or CI/sandbox state looks wrong.
152
229
 
153
230
  allure agent select --latest
@@ -158,7 +235,8 @@ export const AGENT_TASK_MAP_HELP = `Agent task map:
158
235
  allure agent query --from <output-dir> tests
159
236
  allure agent query --from <output-dir> findings
160
237
  Inspect prior agent output as focused JSON without manually loading raw
161
- manifests. Use for summaries, filtered test lists, findings, or one test.
238
+ manifests. Use for summaries, human_report status, filtered test lists,
239
+ findings, or one test.
162
240
 
163
241
  allure agent --rerun-latest -- <command>
164
242
  allure agent --rerun-from <output-dir> -- <command>
@@ -167,7 +245,22 @@ export const AGENT_TASK_MAP_HELP = `Agent task map:
167
245
 
168
246
  Environment:
169
247
  ALLURE_AGENT_STATE_DIR=<dir>
170
- Override the project-scoped state directory. Useful in CI, sandboxes, or
248
+ Override the shared agent state directory. Useful in CI, sandboxes, or
171
249
  multi-job setups that need a deterministic shared state location.
250
+
251
+ Human reports:
252
+ Default agent runs use --report auto. For 1000 or fewer stored visible logical
253
+ results, the last run may already contain a human-readable single-file Awesome
254
+ report at <output>/awesome/index.html. Larger runs are skipped in auto mode to
255
+ avoid excessive output.
256
+
257
+ When a user asks for "the report" after a run, do not assume it needs to be
258
+ regenerated. First run allure agent latest when the output directory is
259
+ unknown, then read <output>/manifest/human-report.json or
260
+ allure agent query --latest summary. If the human-report status is generated,
261
+ return or open <output>/<path> from that manifest. If the status is skipped,
262
+ disabled, failed, or missing, rerun or inspect existing results/dumps with the
263
+ requested --report mode, for example --report awesome to force the single-file
264
+ Awesome report or --report config to force configured report plugins.
172
265
  `;
173
266
  export const isAgentTaskMapHelpRequest = (args) => args.length === 2 && args[0] === "agent" && (args[1] === "--help" || args[1] === "-h");
@@ -5,13 +5,13 @@ export type EnrichmentActionDefinition = {
5
5
  guidance: string;
6
6
  };
7
7
  export declare const ENRICHMENT_ACTIONS_BY_CHECK_NAME: Record<string, EnrichmentActionDefinition>;
8
- export declare const AGENT_WORKFLOWS_MARKDOWN = "Use the smallest workflow that matches the task. Each workflow has the same shape: when to use it, which agent-mode commands help, and what must be true before you call the task done.\n\n### Validate A Change\n\nUse when code or tests changed and you need a user-facing safety conclusion. For small mechanical changes, use this same workflow with narrower expectations rather than a separate shortcut.\n\nCommands:\n\n- `allure agent --goal <text> --expect-* -- <command>`\n\nDone when:\n\n- the expected scope ran and no forbidden scope appeared\n- `index.md`, `manifest/run.json`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` were reviewed\n- the `index.md` path was reported\n- the changed package build and required static checks passed when this repository guide requires them\n\n### Add Or Update Tests\n\nUse when creating or changing tests for a feature, fix, or behavior gap.\n\nCommands:\n\n- `allure agent --goal <text> --expect-tests <count> --expect-test \"<fullName>\" --expect-label name=value --expect-step-containing <text> -- <command>`\n\nDone when:\n\n- the tests prove the intended behavior rather than only touching the code path\n- scope expectations match the intended feature, issue, or package slice\n- each expected test has enough steps or attachments for a reviewer to understand what happened\n- weak evidence, scope drift, and unexpected-test findings are fixed or explicitly accepted as out of scope\n\n### Review Existing Coverage\n\nUse when auditing a package, command matrix, feature area, or business behavior without necessarily changing tests first.\n\nCommands:\n\n- one scoped `allure agent --goal <text> --expect-* -- <command>` run per review group\n\nDone when:\n\n- the audit is split into reviewable groups, or it is explicitly documented as a broad package-health run\n- each group has expectations that describe the intended scope\n- runtime artifacts are reviewed before source-only coverage conclusions\n- uncovered behavior is recorded as follow-up test work instead of being hidden in a broad pass/fail summary\n\n### Triage Failures\n\nUse when tests failed, broke, or runner output does not match agent artifacts.\n\nCommands:\n\n- `allure agent latest`\n- `allure agent --rerun-latest --rerun-preset failed -- <command>`\n- `allure agent --rerun-from <output-dir> --rerun-preset failed -- <command>`\n\nDone when:\n\n- failing, broken, or unmodeled runner-visible failures are represented in agent artifacts, or partial modeling is called out explicitly\n- `artifacts/global/stderr.txt` and global errors were checked when failures are missing from `manifest/tests.jsonl`\n- reruns use prior agent output instead of hand-built runner test names whenever the runner can consume the generated test plan\n\n### Rerun A Prior Scope\n\nUse when prior agent output already identifies failed, unsuccessful, or review-targeted tests and the next run should stay focused.\n\nCommands:\n\n- `allure agent select --latest [--preset review|failed|unsuccessful|all]`\n- `allure agent select --from <output-dir> [--environment <id>] [--label name=value]`\n- `allure agent --rerun-latest -- <command>`\n- `allure agent --rerun-from <output-dir> -- <command>`\n\nDone when:\n\n- the rerun scope comes from Allure testplan support\n- `--rerun-preset`, `--rerun-environment`, or `--rerun-label` filters explain any narrowed selection\n- manual test names are used only as a fallback when testplan support is unavailable\n- the rerun output is reviewed before making a new conclusion\n\n### Improve Evidence Quality\n\nUse when tests pass or fail but the runtime story is too weak to review.\n\nCommands:\n\n- `allure agent --expect-step-containing <text> --expect-steps <count> --expect-attachments <count> -- <command>`\n- `allure agent --expect-attachment <name|name=value|content-type=value> -- <command>`\n\nDone when:\n\n- steps describe real setup, actions, state transitions, or assertions\n- attachments contain runtime evidence such as payloads, responses, screenshots, DOM snapshots, diffs, logs, or traces\n- placeholder steps, generic `\"passed\"` attachments, and other dummy evidence are removed\n- the same intended scope was rerun and no high-confidence evidence findings remain\n\n### Recover Or Diagnose Agent Mode\n\nUse when agent output is missing, the latest run cannot be found, local CLI support is unclear, or state behaves differently in CI or a sandbox.\n\nCommands:\n\n- `allure --version`\n- `allure agent capabilities --json`\n- `allure agent --help`\n- `allure agent latest`\n- `allure agent state-dir`\n- `ALLURE_AGENT_STATE_DIR=<dir>`\n\nDone when:\n\n- supported local commands and flags are known from capabilities or help output\n- the output directory, `index.md` path, or state directory is identified, or the reason it is unavailable is documented\n- console-only conclusions stay provisional until agent-mode artifacts are available";
9
- export declare const AGENT_COMMAND_TASK_MAP: readonly ["`allure --version`, `allure agent capabilities --json`, and `allure agent --help`: setup and capability-detection loop. Use when the local CLI surface is unknown, generated guidance may be stale, or you need to choose supported flags without guessing.", "`allure agent --goal ... -- <command>`: test review, feature delivery, smoke-check, and coverage loops. Use when a test command needs runtime evidence, scope expectations, and user-facing conclusions based on agent artifacts rather than console output alone.", "`allure agent latest`: output recovery loop. Use when a previous run omitted `--output`, you need the newest output directory and `index.md` path, or a follow-up task needs prior output before selecting or rerunning tests.", "`allure agent state-dir`: tooling diagnosis loop. Use when `latest` cannot find a run, CI or sandbox state looks wrong, or you need to explain where project-scoped latest pointers are stored.", "`allure agent query --latest summary|tests|findings|test` / `allure agent query --from <output-dir> ...`: output inspection loop. Use when you need a focused JSON summary, filtered tests, filtered findings, or one test from prior agent output without manually loading raw manifests first.", "`allure agent select --latest` / `allure agent select --from <output-dir>`: rerun-planning loop. Use when you need to inspect, filter, or write the Allure test plan from prior results before executing another run. Without `--output`, stdout is raw testplan JSON; with `--output`, stdout summarizes the file path, source output, preset, and selected count.", "`allure agent --rerun-latest` / `allure agent --rerun-from <output-dir>`: focused retry loop. Use when prior output already identifies failed, unsuccessful, or review-targeted tests and you should rerun that slice through Allure testplan support instead of rebuilding runner-specific test names.", "`ALLURE_AGENT_STATE_DIR=<dir>`: CI and sandbox state-control loop. Use when multiple jobs need a deterministic state location, the default temp state is not shared, or the default state directory is not writable."];
8
+ export declare const AGENT_WORKFLOWS_MARKDOWN = "Use the smallest workflow that matches the task. Each workflow has the same shape: when to use it, which agent-mode commands help, and what must be true before you call the task done.\n\n### Validate A Change\n\nUse when code or tests changed and you need a user-facing safety conclusion. For small mechanical changes, use this same workflow with narrower expectations rather than a separate shortcut.\n\nCommands:\n\n- `allure agent --goal <text> --expect-* -- <command>`\n\nDone when:\n\n- the expected scope ran and no forbidden scope appeared\n- `index.md`, `manifest/run.json`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` were reviewed\n- the `index.md` path was reported\n- the changed package build and required static checks passed when this repository guide requires them\n\n### Add Or Update Tests\n\nUse when creating or changing tests for a feature, fix, or behavior gap.\n\nCommands:\n\n- `allure agent --goal <text> --expect-tests <count> --expect-test \"<fullName>\" --expect-label name=value --expect-step-containing <text> -- <command>`\n\nDone when:\n\n- the tests prove the intended behavior rather than only touching the code path\n- scope expectations match the intended feature, issue, or package slice\n- each expected test has enough steps or attachments for a reviewer to understand what happened\n- weak evidence, scope drift, and unexpected-test findings are fixed or explicitly accepted as out of scope\n\n### Review Existing Coverage\n\nUse when auditing a package, command matrix, feature area, or business behavior without necessarily changing tests first.\n\nCommands:\n\n- one scoped `allure agent --goal <text> --expect-* -- <command>` run per review group\n- `allure agent inspect --goal <text> --expect-* <allure-results-dir-or-glob>` or `--dump <archive-or-glob>` when the evidence already exists as local results or CI dump artifacts\n\nDone when:\n\n- the audit is split into reviewable groups, or it is explicitly documented as a broad package-health run\n- each group has expectations that describe the intended scope\n- runtime artifacts are reviewed before source-only coverage conclusions\n- uncovered behavior is recorded as follow-up test work instead of being hidden in a broad pass/fail summary\n\n### Review Existing Evidence\n\nUse when CI has already produced dump archives or local Allure results already exist and you need agent-readable review artifacts without rerunning tests locally.\n\nCommands:\n\n- `allure agent inspect <allure-results-dir-or-glob>`\n- `allure agent inspect --dump <archive-or-glob>`\n- `allure agent inspect --dump <linux.zip> --dump <macos.zip>`\n- `allure agent inspect --goal <text> --expect-* --dump <archive-or-glob>`\n\nDone when:\n\n- all intended result directories or dump artifacts were downloaded or present and matched by the command\n- `index.md`, `manifest/run.json`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` were reviewed\n- the review calls out that inspect-derived output cannot add missing live process logs or rerun-time evidence unless those artifacts were captured in the results or dumps\n- any environment-specific gaps between CI jobs are explicit\n\n### Triage Failures\n\nUse when tests failed, broke, or runner output does not match agent artifacts.\n\nCommands:\n\n- `allure agent latest`\n- `allure agent --rerun-latest --rerun-preset failed -- <command>`\n- `allure agent --rerun-from <output-dir> --rerun-preset failed -- <command>`\n\nDone when:\n\n- failing, broken, or unmodeled runner-visible failures are represented in agent artifacts, or partial modeling is called out explicitly\n- `artifacts/global/stderr.txt` and global errors were checked when failures are missing from `manifest/tests.jsonl`\n- reruns use prior agent output instead of hand-built runner test names whenever the runner can consume the generated test plan\n\n### Rerun A Prior Scope\n\nUse when prior agent output already identifies failed, unsuccessful, or review-targeted tests and the next run should stay focused.\n\nCommands:\n\n- `allure agent select --latest [--preset review|failed|unsuccessful|all]`\n- `allure agent select --from <output-dir> [--environment <id>] [--label name=value]`\n- `allure agent --rerun-latest -- <command>`\n- `allure agent --rerun-from <output-dir> -- <command>`\n\nDone when:\n\n- the rerun scope comes from Allure testplan support\n- `--rerun-preset`, `--rerun-environment`, or `--rerun-label` filters explain any narrowed selection\n- manual test names are used only as a fallback when testplan support is unavailable\n- the rerun output is reviewed before making a new conclusion\n\n### Improve Evidence Quality\n\nUse when tests pass or fail but the runtime story is too weak to review.\n\nCommands:\n\n- `allure agent --expect-step-containing <text> --expect-steps <count> --expect-attachments <count> -- <command>`\n- `allure agent --expect-attachment <name|name=value|content-type=value> -- <command>`\n\nDone when:\n\n- steps describe real setup, actions, state transitions, or assertions\n- attachments contain runtime evidence such as payloads, responses, screenshots, DOM snapshots, diffs, logs, or traces\n- placeholder steps, generic `\"passed\"` attachments, and other dummy evidence are removed\n- the same intended scope was rerun and no high-confidence evidence findings remain\n\n### Recover Or Diagnose Agent Mode\n\nUse when agent output is missing, the latest run cannot be found, local CLI support is unclear, or state behaves differently in CI or a sandbox.\n\nCommands:\n\n- `allure --version`\n- `allure agent capabilities --json`\n- `allure agent --help`\n- `allure agent latest`\n- `allure agent state-dir`\n- `ALLURE_AGENT_STATE_DIR=<dir>`\n\nDone when:\n\n- supported local commands and flags are known from capabilities or help output\n- the output directory, `index.md` path, or state directory is identified, or the reason it is unavailable is documented\n- console-only conclusions stay provisional until agent-mode artifacts are available";
9
+ export declare const AGENT_COMMAND_TASK_MAP: readonly ["`allure --version`, `allure agent capabilities --json`, and `allure agent --help`: setup and capability-detection loop. Use when the local CLI surface is unknown, generated guidance may be stale, or you need to choose supported flags without guessing.", "`allure agent --goal ... -- <command>`: test review, feature delivery, smoke-check, and coverage loops. Use when a test command needs runtime evidence, scope expectations, and user-facing conclusions based on agent artifacts rather than console output alone. The default `--report auto` may also write a human-readable `awesome/index.html` for small runs.", "`allure agent inspect <allure-results-dir-or-glob>` / `allure agent inspect --dump <archive-or-glob>`: existing evidence review loop. Use after downloading one or more dump archives or when Allure results already exist and you need agent-readable markdown, manifests, and optional human report output without rerunning tests locally. Repeat `--dump` to merge multiple environments or jobs.", "`allure agent latest`: output recovery loop. Use when a previous run omitted `--output`, you need the newest output directory and `index.md` path, a user asks for the human-readable report from the last run, or a follow-up task needs prior output before selecting or rerunning tests.", "`allure agent state-dir`: tooling diagnosis loop. Use when `latest` cannot find a run, CI or sandbox state looks wrong, or you need to explain where per-project run registries are stored.", "`allure agent query --latest summary|tests|findings|test` / `allure agent query --from <output-dir> ...`: output inspection loop. Use when you need a focused JSON summary, human-report status, filtered tests, filtered findings, or one test from prior agent output without manually loading raw manifests first.", "`allure agent select --latest` / `allure agent select --from <output-dir>`: rerun-planning loop. Use when you need to inspect, filter, or write the Allure test plan from prior results before executing another run. Without `--output`, stdout is raw testplan JSON; with `--output`, stdout summarizes the file path, source output, preset, and selected count.", "`allure agent --rerun-latest` / `allure agent --rerun-from <output-dir>`: focused retry loop. Use when prior output already identifies failed, unsuccessful, or review-targeted tests and you should rerun that slice through Allure testplan support instead of rebuilding runner-specific test names.", "`ALLURE_AGENT_STATE_DIR=<dir>`: CI and sandbox state-control loop. Use when multiple jobs need a deterministic state location, the default temp state is not shared, or the default state directory is not writable."];
10
10
  export declare const AGENT_VERIFICATION_RULES: readonly ["If a command executes tests and its result will be used for smoke checking, reasoning, review, coverage analysis, debugging, or any user-facing conclusion, run it through `allure agent`. It preserves the original console logs and adds agent-mode artifacts without inheriting the normal report or export plugins from the project config.", "Use `allure agent` for smoke checks too, even when the change is small or mechanical.", "Only skip agent mode when it is impossible or when you are debugging agent mode itself.", "After changing a package in this repository, run that package build command before finalizing (for example, `yarn workspace <package-name> build`).", "After each agent-mode test run, print the `index.md` path from that run's output directory so users can open the run overview quickly."];
11
11
  export declare const AGENT_TEST_ENRICHMENT_BEST_PRACTICES: readonly ["Steps must wrap real actions, state transitions, or assertions. Prefer a small setup/action/assertion narrative over event-by-event step spam.", "Attachments must capture real runtime evidence from that execution: payloads, responses, screenshots, DOM snapshots, diffs, logs, or traces.", "Add metadata only when it improves scope review, debugging, or downstream policy. Keep labels and parameters intentionally minimal.", "If multiple call sites need the same evidence, instrument the helper once. Example: teach `runCommand` to emit a step instead of wrapping every `runCommand(...)` call site with identical step blocks."];
12
12
  export declare const AGENT_ANTI_DUMMY_POLICY: readonly ["Do not add empty wrapper steps, placeholder attachments, or generic strings such as `passed`, `success`, or static boilerplate.", "Do not attach evidence that is not grounded in the current test execution. Synthetic summaries are fine only when they are derived from real runtime artifacts.", "Do not inflate metadata with labels, stories, or severities that no expectation, review step, or policy actually uses."];
13
13
  export declare const AGENT_ACCEPTANCE_CHECKLIST: readonly ["The rerun matches the intended scope and does not trigger forbidden or unexpected-test findings.", "Each touched test shows enough evidence to explain what happened and what was verified.", "Retries include per-attempt diagnostics when the same test reruns.", "No high-confidence anti-dummy findings remain, especially `noop-dominated-steps` or low-signal `step-spam` traces."];
14
14
  export declare const AGENT_REVIEW_COMPLETENESS_CHECKLIST: readonly ["The relevant scope was run with agent mode unless that was impossible.", "Scoped reviews created expectations before the final rerun, unless the task was an intentionally broad package-health audit.", "The final conclusion was based on `manifest/run.json`, `manifest/test-events.jsonl`, `index.md`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` rather than console output alone.", "Any missing or partial runtime modeling was called out explicitly before the review was considered complete."];
15
15
  export declare const AGENT_PARTIAL_RUNTIME_REVIEW_RULES: readonly ["Suite-load, import, or setup failures may appear only in `artifacts/global/stderr.txt` or global errors instead of `manifest/tests.jsonl`.", "If runner-visible failures are not represented as logical tests, inspect global stderr and treat the run as a partial runtime review, not a clean result set.", "Console-only conclusions stay provisional when agent output is missing, incomplete, or partially modeled."];
16
- export declare const AGENT_INSTRUCTIONS_TEMPLATE = "## Allure Agent Mode Instructions\n\n- If a command executes tests and its result will be used for smoke checking, reasoning, review, coverage analysis, debugging, or any user-facing conclusion, run it through `allure agent`. It preserves the original console logs and adds agent-mode artifacts without inheriting the normal report or export plugins from the project config.\n- Use `allure agent` for smoke checks too, even when the change is small or mechanical.\n- Only skip agent mode when it is impossible or when you are debugging agent mode itself.\n- After each agent-mode test run, print the `index.md` path from that run's output directory so users can open the run overview quickly.\n- Use `allure agent latest` to print the newest output directory and `index.md` path when `--output` was omitted.\n- Use `allure agent capabilities --json` when you need structured supported-command, expectation, output, rerun, and unsupported-feature data without scraping help text.\n- Use `allure agent state-dir` to inspect where the current project stores its latest-agent state.\n- Use `allure agent latest`, `state-dir`, `query`, `select`, and `--rerun-*` according to their loop/task/problem mapping instead of treating them as interchangeable helper commands.\n- Use `allure agent query --latest summary|tests|findings|test` or `allure agent query --from <output-dir> ...` to inspect prior output as focused JSON before manually opening raw manifests.\n- Use `allure agent select --latest` or `allure agent select --from <output-dir>` to inspect the review-targeted test plan before rerunning; add `--output <file>` when you want the CLI to write the plan and print a short selection summary.\n- Use `allure agent --rerun-latest -- <command>` or `allure agent --rerun-from <output-dir> -- <command>` to rerun only the selected tests.\n- When rerunning previous failures, use `allure agent --rerun-latest --rerun-preset failed -- <command>` or `allure agent --rerun-from <output-dir> --rerun-preset failed -- <command>` instead of manually rebuilding runner-specific test names.\n- Use `--rerun-preset review|failed|unsuccessful|all`, repeated `--rerun-environment <id>`, and repeated `--rerun-label name=value` when you need a narrower rerun selection from the previous output.\n- Use `ALLURE_AGENT_STATE_DIR` when you need to override where the current project stores latest-agent state for `latest`, `state-dir`, or `--rerun-latest`.\n- Prefer inline `allure agent` expectation flags such as `--goal`, `--expect-tests`, `--expect-test`, `--expect-label`, and `--expect-step-containing`; use `--expectations <file>` only when flags become awkward.\n- Run tests with `allure agent` and review `manifest/run.json`, `manifest/test-events.jsonl`, `index.md`, `manifest/tests.jsonl`, and `manifest/findings.jsonl`.\n- Enrich only the intended tests. Add real steps for real setup, actions, and assertions.\n- Attach only real runtime evidence such as payloads, responses, screenshots, DOM snapshots, diffs, logs, or traces.\n- Keep metadata minimal. Add labels or severity only when scope review, debugging, or quality policy uses them.\n- Instrument stable helpers when several call sites need the same evidence. For example, teach `runCommand` to emit a step instead of wrapping every caller.\n- Reject the rerun if scope drifts, evidence stays weak, or high-confidence noop-style findings remain.";
16
+ export declare const AGENT_INSTRUCTIONS_TEMPLATE = "## Allure Agent Mode Instructions\n\n- If a command executes tests and its result will be used for smoke checking, reasoning, review, coverage analysis, debugging, or any user-facing conclusion, run it through `allure agent`. It preserves the original console logs and adds agent-mode artifacts without inheriting the normal report or export plugins from the project config.\n- Use `allure agent` for smoke checks too, even when the change is small or mechanical.\n- Only skip agent mode when it is impossible or when you are debugging agent mode itself.\n- After each agent-mode test run, print the `index.md` path from that run's output directory so users can open the run overview quickly.\n- Use `allure agent latest` to print the newest output directory and `index.md` path when `--output` was omitted.\n- When a user asks for the human-readable report from the last run, use `allure agent latest` first if the output directory is unknown, then check `manifest/human-report.json`; when its status is `generated`, use the path recorded there, usually `awesome/index.html`.\n- Use `allure agent capabilities --json` when you need structured supported-command, expectation, output, rerun, and unsupported-feature data without scraping help text.\n- Use `allure agent state-dir` to inspect the shared state directory that stores per-project run registries.\n- Use `allure agent latest`, `state-dir`, `query`, `select`, and `--rerun-*` according to their loop/task/problem mapping instead of treating them as interchangeable helper commands.\n- Use `allure agent inspect <allure-results-dir-or-glob>` or `allure agent inspect --dump <archive-or-glob>` when you need agent-readable markdown and manifests from existing Allure results without rerunning tests locally; repeat `--dump` for multiple CI jobs or environments.\n- Use `--report auto|off|awesome|config` to control human report output. The default `auto` mode writes `awesome/index.html` for 1000 or fewer stored visible logical results and records generated, skipped, disabled, or failed status in `manifest/human-report.json`.\n- Use `allure agent query --latest summary|tests|findings|test` or `allure agent query --from <output-dir> ...` to inspect prior output as focused JSON before manually opening raw manifests.\n- Use `allure agent select --latest` or `allure agent select --from <output-dir>` to inspect the review-targeted test plan before rerunning; add `--output <file>` when you want the CLI to write the plan and print a short selection summary.\n- Use `allure agent --rerun-latest -- <command>` or `allure agent --rerun-from <output-dir> -- <command>` to rerun only the selected tests.\n- When rerunning previous failures, use `allure agent --rerun-latest --rerun-preset failed -- <command>` or `allure agent --rerun-from <output-dir> --rerun-preset failed -- <command>` instead of manually rebuilding runner-specific test names.\n- Use `--rerun-preset review|failed|unsuccessful|all`, repeated `--rerun-environment <id>`, and repeated `--rerun-label name=value` when you need a narrower rerun selection from the previous output.\n- Use `ALLURE_AGENT_STATE_DIR` when you need to override the shared agent state directory for `latest`, `state-dir`, or `--rerun-latest`.\n- Prefer inline `allure agent` expectation flags such as `--goal`, `--expect-tests`, `--expect-test`, `--expect-label`, and `--expect-step-containing`; use `--expectations <file>` only when flags become awkward.\n- Run tests with `allure agent` and review `manifest/run.json`, `manifest/test-events.jsonl`, `index.md`, `manifest/tests.jsonl`, and `manifest/findings.jsonl`.\n- Enrich only the intended tests. Add real steps for real setup, actions, and assertions.\n- Attach only real runtime evidence such as payloads, responses, screenshots, DOM snapshots, diffs, logs, or traces.\n- Keep metadata minimal. Add labels or severity only when scope review, debugging, or quality policy uses them.\n- Instrument stable helpers when several call sites need the same evidence. For example, teach `runCommand` to emit a step instead of wrapping every caller.\n- Reject the rerun if scope drifts, evidence stays weak, or high-confidence noop-style findings remain.";
17
17
  export declare const renderAgentsGuide: () => string;
package/dist/guidance.js CHANGED
@@ -194,6 +194,7 @@ Use when auditing a package, command matrix, feature area, or business behavior
194
194
  Commands:
195
195
 
196
196
  - one scoped \`allure agent --goal <text> --expect-* -- <command>\` run per review group
197
+ - \`allure agent inspect --goal <text> --expect-* <allure-results-dir-or-glob>\` or \`--dump <archive-or-glob>\` when the evidence already exists as local results or CI dump artifacts
197
198
 
198
199
  Done when:
199
200
 
@@ -202,6 +203,24 @@ Done when:
202
203
  - runtime artifacts are reviewed before source-only coverage conclusions
203
204
  - uncovered behavior is recorded as follow-up test work instead of being hidden in a broad pass/fail summary
204
205
 
206
+ ### Review Existing Evidence
207
+
208
+ Use when CI has already produced dump archives or local Allure results already exist and you need agent-readable review artifacts without rerunning tests locally.
209
+
210
+ Commands:
211
+
212
+ - \`allure agent inspect <allure-results-dir-or-glob>\`
213
+ - \`allure agent inspect --dump <archive-or-glob>\`
214
+ - \`allure agent inspect --dump <linux.zip> --dump <macos.zip>\`
215
+ - \`allure agent inspect --goal <text> --expect-* --dump <archive-or-glob>\`
216
+
217
+ Done when:
218
+
219
+ - all intended result directories or dump artifacts were downloaded or present and matched by the command
220
+ - \`index.md\`, \`manifest/run.json\`, \`manifest/tests.jsonl\`, and \`manifest/findings.jsonl\` were reviewed
221
+ - the review calls out that inspect-derived output cannot add missing live process logs or rerun-time evidence unless those artifacts were captured in the results or dumps
222
+ - any environment-specific gaps between CI jobs are explicit
223
+
205
224
  ### Triage Failures
206
225
 
207
226
  Use when tests failed, broke, or runner output does not match agent artifacts.
@@ -272,10 +291,11 @@ Done when:
272
291
  - console-only conclusions stay provisional until agent-mode artifacts are available`;
273
292
  export const AGENT_COMMAND_TASK_MAP = [
274
293
  "`allure --version`, `allure agent capabilities --json`, and `allure agent --help`: setup and capability-detection loop. Use when the local CLI surface is unknown, generated guidance may be stale, or you need to choose supported flags without guessing.",
275
- "`allure agent --goal ... -- <command>`: test review, feature delivery, smoke-check, and coverage loops. Use when a test command needs runtime evidence, scope expectations, and user-facing conclusions based on agent artifacts rather than console output alone.",
276
- "`allure agent latest`: output recovery loop. Use when a previous run omitted `--output`, you need the newest output directory and `index.md` path, or a follow-up task needs prior output before selecting or rerunning tests.",
277
- "`allure agent state-dir`: tooling diagnosis loop. Use when `latest` cannot find a run, CI or sandbox state looks wrong, or you need to explain where project-scoped latest pointers are stored.",
278
- "`allure agent query --latest summary|tests|findings|test` / `allure agent query --from <output-dir> ...`: output inspection loop. Use when you need a focused JSON summary, filtered tests, filtered findings, or one test from prior agent output without manually loading raw manifests first.",
294
+ "`allure agent --goal ... -- <command>`: test review, feature delivery, smoke-check, and coverage loops. Use when a test command needs runtime evidence, scope expectations, and user-facing conclusions based on agent artifacts rather than console output alone. The default `--report auto` may also write a human-readable `awesome/index.html` for small runs.",
295
+ "`allure agent inspect <allure-results-dir-or-glob>` / `allure agent inspect --dump <archive-or-glob>`: existing evidence review loop. Use after downloading one or more dump archives or when Allure results already exist and you need agent-readable markdown, manifests, and optional human report output without rerunning tests locally. Repeat `--dump` to merge multiple environments or jobs.",
296
+ "`allure agent latest`: output recovery loop. Use when a previous run omitted `--output`, you need the newest output directory and `index.md` path, a user asks for the human-readable report from the last run, or a follow-up task needs prior output before selecting or rerunning tests.",
297
+ "`allure agent state-dir`: tooling diagnosis loop. Use when `latest` cannot find a run, CI or sandbox state looks wrong, or you need to explain where per-project run registries are stored.",
298
+ "`allure agent query --latest summary|tests|findings|test` / `allure agent query --from <output-dir> ...`: output inspection loop. Use when you need a focused JSON summary, human-report status, filtered tests, filtered findings, or one test from prior agent output without manually loading raw manifests first.",
279
299
  "`allure agent select --latest` / `allure agent select --from <output-dir>`: rerun-planning loop. Use when you need to inspect, filter, or write the Allure test plan from prior results before executing another run. Without `--output`, stdout is raw testplan JSON; with `--output`, stdout summarizes the file path, source output, preset, and selected count.",
280
300
  "`allure agent --rerun-latest` / `allure agent --rerun-from <output-dir>`: focused retry loop. Use when prior output already identifies failed, unsuccessful, or review-targeted tests and you should rerun that slice through Allure testplan support instead of rebuilding runner-specific test names.",
281
301
  "`ALLURE_AGENT_STATE_DIR=<dir>`: CI and sandbox state-control loop. Use when multiple jobs need a deterministic state location, the default temp state is not shared, or the default state directory is not writable.",
@@ -322,15 +342,18 @@ export const AGENT_INSTRUCTIONS_TEMPLATE = `## Allure Agent Mode Instructions
322
342
  - Only skip agent mode when it is impossible or when you are debugging agent mode itself.
323
343
  - After each agent-mode test run, print the \`index.md\` path from that run's output directory so users can open the run overview quickly.
324
344
  - Use \`allure agent latest\` to print the newest output directory and \`index.md\` path when \`--output\` was omitted.
345
+ - When a user asks for the human-readable report from the last run, use \`allure agent latest\` first if the output directory is unknown, then check \`manifest/human-report.json\`; when its status is \`generated\`, use the path recorded there, usually \`awesome/index.html\`.
325
346
  - Use \`allure agent capabilities --json\` when you need structured supported-command, expectation, output, rerun, and unsupported-feature data without scraping help text.
326
- - Use \`allure agent state-dir\` to inspect where the current project stores its latest-agent state.
347
+ - Use \`allure agent state-dir\` to inspect the shared state directory that stores per-project run registries.
327
348
  - Use \`allure agent latest\`, \`state-dir\`, \`query\`, \`select\`, and \`--rerun-*\` according to their loop/task/problem mapping instead of treating them as interchangeable helper commands.
349
+ - Use \`allure agent inspect <allure-results-dir-or-glob>\` or \`allure agent inspect --dump <archive-or-glob>\` when you need agent-readable markdown and manifests from existing Allure results without rerunning tests locally; repeat \`--dump\` for multiple CI jobs or environments.
350
+ - Use \`--report auto|off|awesome|config\` to control human report output. The default \`auto\` mode writes \`awesome/index.html\` for 1000 or fewer stored visible logical results and records generated, skipped, disabled, or failed status in \`manifest/human-report.json\`.
328
351
  - Use \`allure agent query --latest summary|tests|findings|test\` or \`allure agent query --from <output-dir> ...\` to inspect prior output as focused JSON before manually opening raw manifests.
329
352
  - Use \`allure agent select --latest\` or \`allure agent select --from <output-dir>\` to inspect the review-targeted test plan before rerunning; add \`--output <file>\` when you want the CLI to write the plan and print a short selection summary.
330
353
  - Use \`allure agent --rerun-latest -- <command>\` or \`allure agent --rerun-from <output-dir> -- <command>\` to rerun only the selected tests.
331
354
  - When rerunning previous failures, use \`allure agent --rerun-latest --rerun-preset failed -- <command>\` or \`allure agent --rerun-from <output-dir> --rerun-preset failed -- <command>\` instead of manually rebuilding runner-specific test names.
332
355
  - Use \`--rerun-preset review|failed|unsuccessful|all\`, repeated \`--rerun-environment <id>\`, and repeated \`--rerun-label name=value\` when you need a narrower rerun selection from the previous output.
333
- - Use \`ALLURE_AGENT_STATE_DIR\` when you need to override where the current project stores latest-agent state for \`latest\`, \`state-dir\`, or \`--rerun-latest\`.
356
+ - Use \`ALLURE_AGENT_STATE_DIR\` when you need to override the shared agent state directory for \`latest\`, \`state-dir\`, or \`--rerun-latest\`.
334
357
  - Prefer inline \`allure agent\` expectation flags such as \`--goal\`, \`--expect-tests\`, \`--expect-test\`, \`--expect-label\`, and \`--expect-step-containing\`; use \`--expectations <file>\` only when flags become awkward.
335
358
  - Run tests with \`allure agent\` and review \`manifest/run.json\`, \`manifest/test-events.jsonl\`, \`index.md\`, \`manifest/tests.jsonl\`, and \`manifest/findings.jsonl\`.
336
359
  - Enrich only the intended tests. Add real steps for real setup, actions, and assertions.
@@ -349,8 +372,9 @@ export const renderAgentsGuide = () => `# AGENTS Guide
349
372
  1. Read \`manifest/run.json\` for the current phase, counts, and modeling summary.
350
373
  2. Tail \`manifest/test-events.jsonl\` for the newest structured updates while the run is active.
351
374
  3. Open \`index.md\` for run-level status, scope summary, and the highest-priority findings.
352
- 4. Open the relevant file under \`tests/<environment>/<historyId-or-trId>.md\` for evidence review.
353
- 5. Follow links into \`.assets/\` for test-scoped artifacts and into \`artifacts/global/\` for process logs such as stdout and stderr.
375
+ 4. If a human-readable report is needed, read \`manifest/human-report.json\`; when status is \`generated\`, open the recorded path such as \`awesome/index.html\`.
376
+ 5. Open the relevant file under \`tests/<environment>/<historyId-or-trId>.md\` for evidence review.
377
+ 6. Follow links into \`.assets/\` for test-scoped artifacts and into \`artifacts/global/\` for process logs such as stdout and stderr.
354
378
 
355
379
  ## Directory Contract
356
380
 
@@ -360,6 +384,8 @@ export const renderAgentsGuide = () => `# AGENTS Guide
360
384
  - \`manifest/tests.jsonl\` contains one logical test summary per line.
361
385
  - \`manifest/findings.jsonl\` contains one advisory finding per line.
362
386
  - \`manifest/expected.json\` contains normalized expectations from inline flags or \`--expectations <file>\` when provided.
387
+ - \`manifest/human-report.json\` records whether a human-readable report was generated, skipped, disabled, or failed.
388
+ - \`awesome/index.html\` is the default single-file human report path when \`--report auto\` or \`--report awesome\` generates it.
363
389
  - \`tests/<environment>/<slug>.md\` contains one logical test per file.
364
390
  - Retries from the same run are nested inside the same logical test file.
365
391
  - \`tests/<environment>/<slug>.assets/\` contains copied attachments for that logical test.
package/dist/harness.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { Statistic, TestLabel, TestStatus } from "@allurereport/core-api";
2
2
  import { type EnrichmentActionCategory } from "./guidance.js";
3
+ import type { AgentHumanReportStatus } from "./model.js";
3
4
  export type AgentFindingSeverity = "info" | "warning" | "high";
4
5
  export type AgentFindingCategory = "bootstrap" | "scope" | "metadata" | "evidence" | "smells";
5
6
  export type AgentScopeMatch = "match" | "unexpected" | "forbidden" | "unknown";
@@ -111,11 +112,13 @@ export type AgentRunManifest = {
111
112
  findings_manifest: string;
112
113
  test_events_manifest?: string;
113
114
  expected_manifest: string | null;
115
+ human_report_manifest?: string | null;
114
116
  process_logs: {
115
117
  stdout: string | null;
116
118
  stderr: string | null;
117
119
  };
118
120
  };
121
+ human_report?: AgentHumanReportStatus | null;
119
122
  modeling?: {
120
123
  completeness: "complete" | "partial";
121
124
  reasons: string[];
@@ -265,6 +268,7 @@ export type AgentOutputBundle = {
265
268
  tests: AgentTestManifestLine[];
266
269
  findings: AgentFindingManifestLine[];
267
270
  expected?: AgentExpectations;
271
+ humanReport?: AgentHumanReportStatus;
268
272
  };
269
273
  export type AgentEnrichmentAction = {
270
274
  checkName: string;
package/dist/harness.js CHANGED
@@ -179,12 +179,16 @@ export const loadAgentOutput = async (outputDir) => {
179
179
  const expected = run.paths.expected_manifest && run.expectations_present
180
180
  ? await readJson(join(absoluteOutputDir, run.paths.expected_manifest))
181
181
  : undefined;
182
+ const humanReport = run.paths.human_report_manifest
183
+ ? await readJson(join(absoluteOutputDir, run.paths.human_report_manifest))
184
+ : undefined;
182
185
  return {
183
186
  outputDir: absoluteOutputDir,
184
187
  run,
185
188
  tests,
186
189
  findings,
187
190
  expected,
191
+ humanReport,
188
192
  };
189
193
  };
190
194
  export const planAgentEnrichmentReview = (output, options = {}) => {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { type AgentAttachmentExpectationInput, type AgentEvidenceExpectationInput, type AgentExpectationSelectorInput, type AgentExpectationsInput, type AgentPluginOptions, parseAgentExpectations, } from "./model.js";
1
+ export { type AgentAttachmentExpectationInput, type AgentEvidenceExpectationInput, type AgentExpectationSelectorInput, type AgentExpectationsInput, type AgentHumanReportEntry, type AgentHumanReportError, type AgentHumanReportMode, type AgentHumanReportStatus, type AgentHumanReportStatusName, type AgentHumanReportStatusProvider, type AgentPluginOptions, parseAgentExpectations, } from "./model.js";
2
2
  export * from "./capabilities.js";
3
3
  export * from "./errors.js";
4
4
  export * from "./harness.js";
@@ -1,6 +1,6 @@
1
1
  import { mkdir, rm, writeFile } from "node:fs/promises";
2
2
  import { dirname, join } from "node:path";
3
- const isFileNotFoundError = (error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
3
+ import { isFileNotFoundError } from "./utils.js";
4
4
  const emptyAgentStats = () => ({
5
5
  total: 0,
6
6
  failed: 0,
package/dist/model.d.ts CHANGED
@@ -24,6 +24,30 @@ export type AgentExpectationsInput = {
24
24
  evidence?: AgentEvidenceExpectationInput;
25
25
  notes?: string | string[];
26
26
  };
27
+ export type AgentHumanReportMode = "auto" | "off" | "awesome" | "config";
28
+ export type AgentHumanReportStatusName = "pending" | "disabled" | "skipped" | "generated" | "failed";
29
+ export type AgentHumanReportEntry = {
30
+ plugin_id: string;
31
+ path: string;
32
+ };
33
+ export type AgentHumanReportError = {
34
+ plugin_id?: string;
35
+ message: string;
36
+ };
37
+ export type AgentHumanReportStatus = {
38
+ schema_version: "allure-agent-human-report/v1";
39
+ mode: AgentHumanReportMode;
40
+ status: AgentHumanReportStatusName;
41
+ result_count: number | null;
42
+ threshold: number;
43
+ path: string | null;
44
+ reports: AgentHumanReportEntry[];
45
+ reason: string | null;
46
+ error: string | null;
47
+ errors?: AgentHumanReportError[];
48
+ generated_at?: string;
49
+ };
50
+ export type AgentHumanReportStatusProvider = AgentHumanReportStatus | (() => AgentHumanReportStatus | undefined | Promise<AgentHumanReportStatus | undefined>);
27
51
  export type AgentPluginOptions = {
28
52
  outputDir?: string;
29
53
  expectationsPath?: string;
@@ -33,5 +57,6 @@ export type AgentPluginOptions = {
33
57
  loopId?: string;
34
58
  taskId?: string;
35
59
  conversationId?: string;
60
+ humanReport?: AgentHumanReportStatusProvider;
36
61
  };
37
62
  export declare const parseAgentExpectations: (rawContent: string) => AgentExpectationsInput;