@allurereport/plugin-agent 3.5.0 → 3.6.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 +32 -7
- package/dist/guidance.d.ts +4 -4
- package/dist/guidance.js +22 -7
- package/dist/plugin.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ This plugin writes AI-friendly markdown summaries for a test run. It is designed
|
|
|
16
16
|
flows like:
|
|
17
17
|
|
|
18
18
|
```shell
|
|
19
|
-
|
|
19
|
+
npx allure agent -- npm test
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
When enabled, the plugin writes:
|
|
@@ -38,8 +38,8 @@ accept. See [the enrichment loop guide](../../docs/agent_enrichment_loop.md).
|
|
|
38
38
|
|
|
39
39
|
## Verification Standard
|
|
40
40
|
|
|
41
|
-
- 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
|
|
42
|
-
- Use `allure
|
|
41
|
+
- 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.
|
|
42
|
+
- Use `allure agent` for smoke checks too, even when the change is small or mechanical.
|
|
43
43
|
- Only skip agent mode when it is impossible or when you are debugging agent mode itself.
|
|
44
44
|
|
|
45
45
|
## Skills-First Workflow
|
|
@@ -84,7 +84,24 @@ export default defineConfig({
|
|
|
84
84
|
});
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
The preferred CLI entrypoint is:
|
|
88
|
+
|
|
89
|
+
```shell
|
|
90
|
+
npx allure agent -- npm test
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
You can provide an explicit expectations file and output directory when you need deterministic paths:
|
|
94
|
+
|
|
95
|
+
```shell
|
|
96
|
+
npx allure agent \
|
|
97
|
+
--output ./out/agent-report \
|
|
98
|
+
--expectations ./out/agent-expected.yaml \
|
|
99
|
+
-- npm test
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
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.
|
|
103
|
+
|
|
104
|
+
You can also enable the plugin through lower-level environment variables when you need direct env control:
|
|
88
105
|
|
|
89
106
|
```shell
|
|
90
107
|
ALLURE_AGENT_OUTPUT=./out/agent-report npx allure run -- npm test
|
|
@@ -184,7 +201,7 @@ markdown and `manifest/findings.jsonl`.
|
|
|
184
201
|
|
|
185
202
|
The intended usage pattern is:
|
|
186
203
|
|
|
187
|
-
1. Run tests with `allure
|
|
204
|
+
1. Run tests with `allure agent -- <command>`.
|
|
188
205
|
2. Watch `manifest/run.json` and `manifest/test-events.jsonl` while the run is active.
|
|
189
206
|
3. Review `index.md` plus the manifest files.
|
|
190
207
|
4. If evidence is weak, add steps, attachments, labels, or parameters.
|
|
@@ -252,9 +269,17 @@ the same policy in a project-level skill or agent prompt, you can start with:
|
|
|
252
269
|
```md
|
|
253
270
|
## Allure Agent Mode Instructions
|
|
254
271
|
|
|
255
|
-
- 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
|
|
256
|
-
- Use `allure
|
|
272
|
+
- 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.
|
|
273
|
+
- Use `allure agent` for smoke checks too, even when the change is small or mechanical.
|
|
257
274
|
- Only skip agent mode when it is impossible or when you are debugging agent mode itself.
|
|
275
|
+
- 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.
|
|
276
|
+
- Use `allure agent latest` to reopen the newest run when `--output` was omitted.
|
|
277
|
+
- Use `allure agent state-dir` to inspect where the current project stores its latest-agent state.
|
|
278
|
+
- Use `allure agent select --latest` or `allure agent select --from <output-dir>` to inspect the review-targeted test plan before rerunning.
|
|
279
|
+
- Use `allure agent --rerun-latest -- <command>` or `allure agent --rerun-from <output-dir> -- <command>` to rerun only the selected tests.
|
|
280
|
+
- 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.
|
|
281
|
+
- 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`.
|
|
282
|
+
- Use `ALLURE_AGENT_*` with `allure run` only as the lower-level fallback when you need direct environment control.
|
|
258
283
|
- Generate or refresh `ALLURE_AGENT_EXPECTATIONS` before each targeted rerun.
|
|
259
284
|
- Run tests with `ALLURE_AGENT_OUTPUT` and review `manifest/run.json`, `manifest/test-events.jsonl`, `index.md`, `manifest/tests.jsonl`, and `manifest/findings.jsonl`.
|
|
260
285
|
- Enrich only the intended tests. Add real steps for real setup, actions, and assertions.
|
package/dist/guidance.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ 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 run -- <command>`
|
|
9
|
-
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
|
|
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
|
|
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."];
|
|
9
|
+
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 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
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
12
|
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
13
|
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
14
|
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
15
|
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
16
|
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
|
|
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
18
|
export declare const renderAgentsGuide: (projectGuidePath?: string) => string;
|
package/dist/guidance.js
CHANGED
|
@@ -112,19 +112,26 @@ export const ENRICHMENT_ACTIONS_BY_CHECK_NAME = {
|
|
|
112
112
|
};
|
|
113
113
|
export const AGENT_ENRICHMENT_WORKFLOW = [
|
|
114
114
|
"Generate or refresh `ALLURE_AGENT_EXPECTATIONS` before each targeted enrichment iteration.",
|
|
115
|
-
"Run tests with `allure
|
|
115
|
+
"Run tests with `allure agent --output <dir> --expectations <file> -- <command>`.",
|
|
116
|
+
"After each test run, print the `index.md` path from that output directory so collaborators can open the run overview quickly.",
|
|
117
|
+
"Use `allure agent latest` to recover the newest output directory when a prior run omitted `--output`.",
|
|
118
|
+
"Use `allure agent state-dir` to inspect where the current project stores its latest-agent state.",
|
|
119
|
+
"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`.",
|
|
120
|
+
"Use `allure agent select --latest` or `allure agent select --from <output-dir>` to inspect the review-targeted test plan before rerunning.",
|
|
121
|
+
"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.",
|
|
116
122
|
"Inspect `manifest/run.json`, tail `manifest/test-events.jsonl`, then review `index.md`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` before editing tests.",
|
|
117
123
|
"Enrich only the intended tests, rerun the same scope, and compare the rerun against `manifest/expected.json` when present.",
|
|
118
124
|
"Accept the rerun only when scope is clean, evidence is strong enough to review, and no high-confidence dummy findings remain.",
|
|
119
125
|
];
|
|
120
126
|
export const AGENT_VERIFICATION_RULES = [
|
|
121
|
-
"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
|
|
122
|
-
"Use `allure
|
|
127
|
+
"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.",
|
|
128
|
+
"Use `allure agent` for smoke checks too, even when the change is small or mechanical.",
|
|
123
129
|
"Only skip agent mode when it is impossible or when you are debugging agent mode itself.",
|
|
130
|
+
"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.",
|
|
124
131
|
];
|
|
125
132
|
export const AGENT_SMALL_TEST_CHANGE_WORKFLOW = [
|
|
126
133
|
"Create a fresh temp `ALLURE_AGENT_OUTPUT` and `ALLURE_AGENT_EXPECTATIONS` for the touched scope before closing the task.",
|
|
127
|
-
"Run the touched scope with `allure
|
|
134
|
+
"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.",
|
|
128
135
|
"Review `manifest/run.json`, `manifest/test-events.jsonl`, `index.md`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` before making any final claim.",
|
|
129
136
|
];
|
|
130
137
|
export const AGENT_COVERAGE_REVIEW_WORKFLOW = [
|
|
@@ -162,11 +169,19 @@ export const AGENT_PARTIAL_RUNTIME_REVIEW_RULES = [
|
|
|
162
169
|
];
|
|
163
170
|
export const AGENT_INSTRUCTIONS_TEMPLATE = `## Allure Agent Mode Instructions
|
|
164
171
|
|
|
165
|
-
- 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
|
|
166
|
-
- Use \`allure
|
|
172
|
+
- 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.
|
|
173
|
+
- Use \`allure agent\` for smoke checks too, even when the change is small or mechanical.
|
|
167
174
|
- Only skip agent mode when it is impossible or when you are debugging agent mode itself.
|
|
175
|
+
- 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.
|
|
176
|
+
- Use \`ALLURE_AGENT_*\` with \`allure run\` only as the lower-level fallback when you need direct environment control.
|
|
177
|
+
- Use \`allure agent latest\` to reopen the newest run when \`--output\` was omitted.
|
|
178
|
+
- Use \`allure agent state-dir\` to inspect where the current project stores its latest-agent state.
|
|
179
|
+
- Use \`allure agent select --latest\` or \`allure agent select --from <output-dir>\` to inspect the review-targeted test plan before rerunning.
|
|
180
|
+
- Use \`allure agent --rerun-latest -- <command>\` or \`allure agent --rerun-from <output-dir> -- <command>\` to rerun only the selected tests.
|
|
181
|
+
- 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.
|
|
182
|
+
- 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\`.
|
|
168
183
|
- Generate or refresh \`ALLURE_AGENT_EXPECTATIONS\` before each targeted rerun.
|
|
169
|
-
- Run tests with \`
|
|
184
|
+
- Run tests with \`allure agent\` and review \`manifest/run.json\`, \`manifest/test-events.jsonl\`, \`index.md\`, \`manifest/tests.jsonl\`, and \`manifest/findings.jsonl\`.
|
|
170
185
|
- Enrich only the intended tests. Add real steps for real setup, actions, and assertions.
|
|
171
186
|
- Attach only real runtime evidence such as payloads, responses, screenshots, DOM snapshots, diffs, logs, or traces.
|
|
172
187
|
- Keep metadata minimal. Add labels or severity only when scope review, debugging, or quality policy uses them.
|
package/dist/plugin.js
CHANGED
|
@@ -1446,7 +1446,7 @@ const buildRunAndTestFindings = (params) => {
|
|
|
1446
1446
|
message: "The run does not include global stdout or stderr logs.",
|
|
1447
1447
|
explanation: "Global process logs help agents debug bootstrap failures and compare the recorded results with console output.",
|
|
1448
1448
|
evidencePaths: [],
|
|
1449
|
-
remediationHint: "Run tests through `allure
|
|
1449
|
+
remediationHint: "Run tests through `allure agent -- <command>` without `--silent` when you need bootstrap diagnostics, or use `ALLURE_AGENT_*` with `allure run` for lower-level control.",
|
|
1450
1450
|
confidence: 0.9,
|
|
1451
1451
|
}));
|
|
1452
1452
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-agent",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Allure Agent Plugin – AI-friendly markdown report generator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"lint:fix": "oxlint --import-plugin --fix src test features stories"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@allurereport/core-api": "3.
|
|
35
|
-
"@allurereport/plugin-api": "3.
|
|
34
|
+
"@allurereport/core-api": "3.6.0",
|
|
35
|
+
"@allurereport/plugin-api": "3.6.0",
|
|
36
36
|
"yaml": "^2.8.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@allurereport/reader-api": "3.
|
|
39
|
+
"@allurereport/reader-api": "3.6.0",
|
|
40
40
|
"@types/node": "^20.17.9",
|
|
41
41
|
"@vitest/runner": "^2.1.9",
|
|
42
42
|
"allure-vitest": "^3.3.3",
|