pst-run
PST Run
End-to-end pipeline runner for PST. Chains all four stages in sequence using isolated subagents:
pst-explore → pst-plan → pst-generate → pst-debug (if needed)
When to use
When you have test case documentation and want to run the full pipeline from exploration to a passing test in one invocation.
Inputs
The user pastes test case documentation inline in the chat.
Steps
1. Collect inputs
Ask the user:
- Session name — short slug for this test case (e.g.
sign-in)
Confirm the test case documentation is present in the conversation.
2. Run pst-explore
Invoke the pst-explore skill. Provide:
- The session name
- The full test case documentation text
Verify that .pst/sessions/[name]/insights.md was created before proceeding.
3. Run pst-plan
Invoke the pst-plan skill. Provide:
- The session name
Important: This stage requires a user interaction — the skill will ask the user to confirm or specify the test file path. Wait for the user's response before continuing.
Verify that .pst/sessions/[name]/plan.md was created before proceeding.
4. Run pst-generate
Invoke the pst-generate skill. Provide:
- The session name
If tests pass: Proceed to step 6.
If tests fail: Collect the full error output and proceed to step 5.
5. Run pst-debug — only if tests failed
Invoke the pst-debug skill. Provide:
- Session name
- Failing test file path
- Full error output from step 4
- Instruct it to use Mode 1 (from session — full context available)
Confirm whether the test now passes before reporting.
6. Report final status
PST Run complete.
Session: .pst/sessions/[name]/
Test file: [confirmed path]
Status: PASSING | FAILING
Artifacts:
insights.md ✓
plan.md ✓
snapshots/ ✓ ([N] files)
If still failing after debug, report:
PST Run ended with a failing test.
See pst-debug output above for diagnosis and next steps.
Rules
- Each stage runs in isolation — never combine stages
- Never skip a stage even if artifacts appear to already exist — always re-run to ensure freshness
- The pst-plan stage always requires user confirmation of the test file path — do not skip this interaction
- If any stage fails unexpectedly (not a test failure but an execution error), report the error and stop — do not auto-retry
More from lautaroleonhardt/pst
analyze-codebase
Use when starting a Playwright testing session or when project structure is unknown. Scans the project for Playwright config, test conventions, routing, and tech stack. Writes output to docs/playwright-spec-testing/project-context.md.
9plan-tests
Use after explore-app to synthesize an exhaustive, human-reviewable test plan from exploration reports and project context. Reads all exploration/<slug>.md files, parsed-spec.md, and project-context.md. Outputs test-plan.md with full steps, assertions, and assigned test file paths.
9ingest-spec
Use when you have a Gherkin .feature file or plain-English test cases to parse into structured scenarios. Writes output to docs/playwright-spec-testing/parsed-spec.md.
9generate-tests
Use after plan-tests to write a Playwright test for one scenario by mechanically translating test-plan.md into Playwright API calls. Requires docs/playwright-spec-testing/test-plan.md. Writes the test file at the path assigned in the plan.
9debug-test
Use when a Playwright test is failing. Diagnoses the root cause and applies a minimal fix. Requires the failing test file path and the full error output.
9explore-app
Use after ingest-spec to walk through one scenario in the live app and capture real selectors and URLs. Requires a running app and a scenario from docs/playwright-spec-testing/parsed-spec.md. Writes output to docs/playwright-spec-testing/exploration/<scenario-slug>.md.
9