@allurereport/plugin-agent 3.10.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.
@@ -0,0 +1,266 @@
1
+ export const AGENT_CAPABILITIES_SCHEMA = "allure-agent-capabilities/v1";
2
+ export const createAgentCapabilities = () => ({
3
+ schema: AGENT_CAPABILITIES_SCHEMA,
4
+ commands: {
5
+ help: {
6
+ supported: true,
7
+ usage: "allure --version; allure agent --help; allure agent capabilities",
8
+ output: ["human", "json"],
9
+ },
10
+ run: {
11
+ supported: true,
12
+ usage: "allure agent [options] -- <command>",
13
+ options: [
14
+ "--config",
15
+ "--cwd",
16
+ "--output",
17
+ "--report",
18
+ "--expectations",
19
+ "--goal",
20
+ "--task-id",
21
+ "--expect-tests",
22
+ "--expect-label",
23
+ "--expect-env",
24
+ "--expect-test",
25
+ "--expect-prefix",
26
+ "--expect-step-containing",
27
+ "--forbid-label",
28
+ "--expect-steps",
29
+ "--expect-attachments",
30
+ "--expect-attachment",
31
+ "--environment",
32
+ "--environment-name",
33
+ "--silent",
34
+ "--rerun-from",
35
+ "--rerun-latest",
36
+ "--rerun-preset",
37
+ "--rerun-environment",
38
+ "--rerun-label",
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
+ },
74
+ latest: {
75
+ supported: true,
76
+ usage: "allure agent latest [--cwd <dir>]",
77
+ output: ["agent output: <dir>", "agent index: <dir>/index.md"],
78
+ },
79
+ stateDir: {
80
+ supported: true,
81
+ usage: "allure agent state-dir [--cwd <dir>]",
82
+ environmentVariable: "ALLURE_AGENT_STATE_DIR",
83
+ },
84
+ select: {
85
+ supported: true,
86
+ usage: "allure agent select (--latest | --from <output-dir>) [options]",
87
+ presets: ["review", "failed", "unsuccessful", "all"],
88
+ filters: ["environment", "label"],
89
+ output: ["stdout-testplan-json", "file-testplan-json", "file-summary"],
90
+ },
91
+ query: {
92
+ supported: true,
93
+ usage: "allure agent query (--latest | --from <output-dir>) [summary|tests|findings|test] [options]",
94
+ views: ["summary", "tests", "findings", "test"],
95
+ filters: ["status", "environment", "label", "severity", "category", "check", "test"],
96
+ output: ["json"],
97
+ },
98
+ rerun: {
99
+ supported: true,
100
+ usage: "allure agent (--rerun-latest | --rerun-from <output-dir>) [filters] -- <command>",
101
+ presets: ["review", "failed", "unsuccessful", "all"],
102
+ filters: ["environment", "label"],
103
+ transport: "ALLURE_TESTPLAN_PATH",
104
+ },
105
+ },
106
+ expectations: {
107
+ inline: {
108
+ supported: true,
109
+ goal: true,
110
+ taskId: true,
111
+ expected: {
112
+ testCount: true,
113
+ labels: true,
114
+ environments: true,
115
+ fullNames: true,
116
+ fullNamePrefixes: true,
117
+ },
118
+ forbidden: {
119
+ labels: true,
120
+ environments: false,
121
+ fullNames: false,
122
+ fullNamePrefixes: false,
123
+ },
124
+ evidence: {
125
+ stepNameContains: true,
126
+ minSteps: true,
127
+ minAttachments: true,
128
+ attachmentFilters: ["name", "content-type"],
129
+ },
130
+ },
131
+ file: {
132
+ supported: true,
133
+ formats: ["yaml", "json"],
134
+ },
135
+ },
136
+ output: {
137
+ automaticTempDirectory: true,
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.",
140
+ schema: "allure-agent-output/v1",
141
+ files: [
142
+ "index.md",
143
+ "AGENTS.md",
144
+ "manifest/run.json",
145
+ "manifest/test-events.jsonl",
146
+ "manifest/tests.jsonl",
147
+ "manifest/findings.jsonl",
148
+ "manifest/expected.json",
149
+ "manifest/human-report.json",
150
+ "tests/<environment>/<slug>.md",
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.",
179
+ ],
180
+ },
181
+ unsupported: {
182
+ discovery: true,
183
+ configureIntegration: true,
184
+ executionSignal: true,
185
+ compare: true,
186
+ flaky: true,
187
+ duplicates: true,
188
+ stale: true,
189
+ suppressions: true,
190
+ observe: true,
191
+ interrupt: true,
192
+ localAgentService: true,
193
+ expectationControls: ["--expect-evidence"],
194
+ },
195
+ });
196
+ export const AGENT_TASK_MAP_HELP = `Agent task map:
197
+ allure --version
198
+ allure agent --help
199
+ allure agent capabilities
200
+ Setup and capability detection. Use when the local CLI surface is unknown,
201
+ generated guidance may be stale, or an agent needs supported flags without
202
+ guessing.
203
+
204
+ allure agent --goal ... -- <command>
205
+ Run a test command with runtime evidence, scope expectations, and
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.
218
+
219
+ allure agent latest
220
+ Recover the newest agent output directory and index.md when --output was
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.
225
+
226
+ allure agent state-dir
227
+ Show the shared state directory that stores per-project run registries. Useful when
228
+ latest cannot find a run or CI/sandbox state looks wrong.
229
+
230
+ allure agent select --latest
231
+ allure agent select --from <output-dir>
232
+ Inspect/filter prior results and write an Allure test plan before rerun.
233
+
234
+ allure agent query --latest summary
235
+ allure agent query --from <output-dir> tests
236
+ allure agent query --from <output-dir> findings
237
+ Inspect prior agent output as focused JSON without manually loading raw
238
+ manifests. Use for summaries, human_report status, filtered test lists,
239
+ findings, or one test.
240
+
241
+ allure agent --rerun-latest -- <command>
242
+ allure agent --rerun-from <output-dir> -- <command>
243
+ Rerun the failed, unsuccessful, or selected tests from prior agent output
244
+ through Allure test plan support.
245
+
246
+ Environment:
247
+ ALLURE_AGENT_STATE_DIR=<dir>
248
+ Override the shared agent state directory. Useful in CI, sandboxes, or
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.
265
+ `;
266
+ export const isAgentTaskMapHelpRequest = (args) => args.length === 2 && args[0] === "agent" && (args[1] === "--help" || args[1] === "-h");
@@ -0,0 +1,9 @@
1
+ export declare class AgentUsageError extends Error {
2
+ constructor(message: string);
3
+ }
4
+ export declare class AgentExpectationUsageError extends AgentUsageError {
5
+ readonly sourceOption?: string;
6
+ constructor(message: string, sourceOption?: string);
7
+ }
8
+ export declare const isAgentUsageError: (error: unknown) => error is AgentUsageError;
9
+ export declare const isAgentExpectationUsageError: (error: unknown) => error is AgentExpectationUsageError;
package/dist/errors.js ADDED
@@ -0,0 +1,15 @@
1
+ export class AgentUsageError extends Error {
2
+ constructor(message) {
3
+ super(message);
4
+ this.name = "AgentUsageError";
5
+ }
6
+ }
7
+ export class AgentExpectationUsageError extends AgentUsageError {
8
+ constructor(message, sourceOption) {
9
+ super(message);
10
+ this.name = "AgentExpectationUsageError";
11
+ this.sourceOption = sourceOption;
12
+ }
13
+ }
14
+ export const isAgentUsageError = (error) => error instanceof AgentUsageError;
15
+ export const isAgentExpectationUsageError = (error) => error instanceof AgentExpectationUsageError;
@@ -5,14 +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_ENRICHMENT_WORKFLOW: readonly ["Generate or refresh `ALLURE_AGENT_EXPECTATIONS` before each targeted enrichment iteration.", "Run tests with `allure agent --output <dir> --expectations <file> -- <command>`.", "After each test run, print the `index.md` path from that output directory so collaborators can open the run overview quickly.", "Use `allure agent latest` to recover the newest output directory when a prior run omitted `--output`.", "Use `allure agent state-dir` to inspect where the current project stores its latest-agent state.", "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`.", "Use `allure agent select --latest` or `allure agent select --from <output-dir>` to inspect the review-targeted test plan before rerunning.", "Use `allure agent --rerun-latest -- <command>` or `allure agent --rerun-from <output-dir> -- <command>` to rerun only the selected tests through Allure testplan support. Add `--rerun-preset`, repeated `--rerun-environment`, or repeated `--rerun-label name=value` filters when you need a narrower rerun slice.", "Inspect `manifest/run.json`, tail `manifest/test-events.jsonl`, then review `index.md`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` before editing tests.", "Enrich only the intended tests, rerun the same scope, and compare the rerun against `manifest/expected.json` when present.", "Accept the rerun only when scope is clean, evidence is strong enough to review, and no high-confidence dummy findings remain."];
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."];
9
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."];
10
- export declare const AGENT_SMALL_TEST_CHANGE_WORKFLOW: readonly ["Create a fresh temp `ALLURE_AGENT_OUTPUT` and `ALLURE_AGENT_EXPECTATIONS` for the touched scope before closing the task.", "Run the touched scope with `allure agent`, even if the goal is only a smoke check after a mechanical change such as typing cleanup, mock refactors, or helper extraction.", "Review `manifest/run.json`, `manifest/test-events.jsonl`, `index.md`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` before making any final claim."];
11
- export declare const AGENT_COVERAGE_REVIEW_WORKFLOW: readonly ["Split package or business-logic audits into scoped groups and give each group its own temp output directory and expectations file.", "Review agent-mode artifacts first for each group, then inspect source code only after the runtime evidence shows what actually ran.", "Treat grouped coverage review as incomplete until each scoped run has matching expectations or an explicit note that the audit is intentionally broad."];
12
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."];
13
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."];
14
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."];
15
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."];
16
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."];
17
- 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_*` with `allure run` only as the lower-level fallback when you need direct environment control.\n- Use `allure agent latest` to reopen the newest run when `--output` was omitted.\n- Use `allure agent state-dir` to inspect where the current project stores its latest-agent state.\n- Use `allure agent select --latest` or `allure agent select --from <output-dir>` to inspect the review-targeted test plan before rerunning.\n- Use `allure agent --rerun-latest -- <command>` or `allure agent --rerun-from <output-dir> -- <command>` to rerun only the selected tests.\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- Generate or refresh `ALLURE_AGENT_EXPECTATIONS` before each targeted rerun.\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.";
18
- export declare const renderAgentsGuide: (projectGuidePath?: string) => string;
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
+ export declare const renderAgentsGuide: () => string;