playwright-test-agent 0.1.2 → 0.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-test-agent",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Initialize Playwright Test agents and install the playwright-test-agent skill.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,7 +21,7 @@ Use the names for the active platform. The role names below refer to these mappe
21
21
 
22
22
  ## Agent responsibilities
23
23
 
24
- - **Main agent:** Own the user conversation, gather the minimum entry information, locate the default seed generated by `playwright init-agents`, dispatch each subagent with that seed, present the plan for confirmation, and report final results. It must not ask the user to provide a seed or investigate UI details itself when the planner can discover them.
24
+ - **Main agent:** Own the user conversation, inspect only the local project for context, gather the minimum non-discoverable information from the user, locate the default seed generated by `playwright init-agents`, dispatch each subagent with that seed, present the plan for confirmation, and report final results. It must not open, navigate, inspect, screenshot, or otherwise investigate the deployed website itself.
25
25
  - **Planner:** Run the generated seed to establish page context, global setup, dependencies, fixtures, and hooks. Explore the deployed application for the requested scenarios and user flows, compare observations with the request and optional PRD, and save a precise human-readable Markdown plan under `specs/`. It does not generate the formal test files.
26
26
  - **Generator:** Read the complete user-confirmed Markdown plan and the same generated seed, execute each scenario to validate locators and assertions against the live application, and generate executable Playwright tests under the configured test directory. It must not invent unconfirmed scenarios or expected behavior.
27
27
  - **Healer:** Run the failing test, replay its steps, inspect the current UI, propose and apply test-side patches, and rerun until the test passes or a guardrail stops the loop. It must report a likely broken product, environment/data problem, or plan conflict instead of weakening assertions merely to obtain a pass.
@@ -54,9 +54,13 @@ It uses the project-local Playwright command. Never install a global/additional
54
54
 
55
55
  ## Understand the request
56
56
 
57
- Before testing, briefly inspect the target project for relevant source, routes/API clients, environment examples, existing tests, fixtures, the generated seed, and run instructions. The project may otherwise be empty or contain no useful application context; in that case, do not keep searching the filesystem or invent missing details. Use the user's description, generated seed, and live target as the available evidence.
57
+ Before testing, the main agent may briefly inspect the local target project for relevant source, routes/API clients, environment examples, existing tests, fixtures, the generated seed, and run instructions. The project may otherwise be empty or contain no useful application context; in that case, do not keep searching the filesystem or invent missing details.
58
58
 
59
- Invoke the Planner as soon as the user has supplied a UI test objective and a deployed base URL. For example, "test this project's login feature" plus its deployment URL is sufficient: the Planner, not the main agent, investigates the login page, fields, controls, navigation, and observable outcomes. Do not delay Planner dispatch by asking for UI facts it can safely discover from the live application.
59
+ This local project inspection is the maximum reconnaissance the main agent may perform. The main agent must not use browser tools, HTTP requests, screenshots, or other means to investigate the deployed application. All live website reconnaissance belongs exclusively to the Planner. The main agent may read and summarize Planner output, but it must not independently verify or extend that investigation.
60
+
61
+ Before starting the Planner, the main agent may ask the user to clarify information that materially affects the purpose, scope, safety, or expected result of the test plan. Relevant questions may cover the business goal, in-scope and excluded flows, user roles or accounts, expected success and failure outcomes, allowed data mutations, test-data constraints, environment limitations, and required browsers or devices. Ask only questions whose answers could change the plan or authorization boundary; if a necessary answer is missing, wait for it before starting the Planner.
62
+
63
+ Do not ask the user for UI facts the Planner can safely discover from the deployed application, such as field labels, button locations, page structure, or ordinary navigation. Once the main agent has the test objective, deployed base URL, and any necessary non-discoverable constraints, invoke the Planner and let it perform all live investigation. For example, "test this project's login feature" plus its deployment URL is enough to investigate a public login page, unless the intended account role, authenticated outcome, or permitted side effects must first be clarified.
60
64
 
61
65
  Pass the planner the exact objective, deployed URL, generated seed path, known authentication/roles, allowed side effects, supplied test data, and relevant project or PRD context. The seed is produced by initialization, not supplied by the user. It may remain the default page-context seed or be customized for project fixtures, global setup, dependencies, or authenticated context. Credentials are required before attempting an authenticated-only flow, but not merely to investigate a publicly reachable login page.
62
66
 
@@ -12,7 +12,7 @@ const CODEX_INSTRUCTIONS = `${BLOCK_START}
12
12
 
13
13
  For any website, browser workflow, HTTP API, or application-feature testing request, load and follow \`.agents/skills/playwright-test-agent/SKILL.md\` before planning or using browser tools. This skill has priority over ad hoc browser automation.
14
14
 
15
- For UI testing, the Codex subagents are \`playwright_test_planner\`, \`playwright_test_generator\`, and \`playwright_test_healer\`. When the user provides a UI test objective and deployed URL, the main agent must start \`playwright_test_planner\` to investigate the live page; it must not replace Planner work with its own ad hoc browser exploration.
15
+ For UI testing, the Codex subagents are \`playwright_test_planner\`, \`playwright_test_generator\`, and \`playwright_test_healer\`. The main agent may inspect only the local project; it must not open, navigate, inspect, screenshot, or otherwise investigate the deployed website itself. Before starting Planner, the main agent may ask for necessary information that materially affects test purpose, scope, expected outcomes, roles, allowed side effects, data, or environment constraints. It must not ask for UI details Planner can safely discover. Once the objective, deployed URL, and necessary non-discoverable constraints are available, start \`playwright_test_planner\` to perform all live page investigation.
16
16
 
17
17
  If Planner reports that required test information is missing, invalid, or inconsistent, stop that planning attempt and ask the user for the specific missing information. After the user responds, start \`playwright_test_planner\` again with the corrected information and the previous blocking observation. Do not continue guessing or exploring around the blocker.
18
18
  ${BLOCK_END}`;
@@ -22,7 +22,7 @@ const CLAUDE_INSTRUCTIONS = `${BLOCK_START}
22
22
 
23
23
  For any website, browser workflow, HTTP API, or application-feature testing request, load and follow \`.claude/skills/playwright-test-agent/SKILL.md\` before planning or using browser tools. This skill has priority over ad hoc browser automation.
24
24
 
25
- For UI testing, the Claude Code subagents are \`playwright-test-planner\`, \`playwright-test-generator\`, and \`playwright-test-healer\`. When the user provides a UI test objective and deployed URL, the main agent must start \`playwright-test-planner\` to investigate the live page; it must not replace Planner work with its own ad hoc browser exploration.
25
+ For UI testing, the Claude Code subagents are \`playwright-test-planner\`, \`playwright-test-generator\`, and \`playwright-test-healer\`. The main agent may inspect only the local project; it must not open, navigate, inspect, screenshot, or otherwise investigate the deployed website itself. Before starting Planner, the main agent may ask for necessary information that materially affects test purpose, scope, expected outcomes, roles, allowed side effects, data, or environment constraints. It must not ask for UI details Planner can safely discover. Once the objective, deployed URL, and necessary non-discoverable constraints are available, start \`playwright-test-planner\` to perform all live page investigation.
26
26
 
27
27
  If Planner reports that required test information is missing, invalid, or inconsistent, stop that planning attempt and ask the user for the specific missing information. After the user responds, start \`playwright-test-planner\` again with the corrected information and the previous blocking observation. Do not continue guessing or exploring around the blocker.
28
28
  ${BLOCK_END}`;