pst-debug
PST Debug
Diagnose and fix a failing Playwright test. Three entry modes based on available context.
When to use
When a Playwright test is failing — whether it was generated by pst-generate or written manually.
Entry: Choose a mode
At invocation, present this to the user:
How would you like to proceed?
- From a session (recommended) — I'll read
insights.md,plan.md, andsnapshots/from.pst/sessions/[name]/for full diagnostic context. Best accuracy. - From documentation (recommended) — Paste the failing test file path + full error output + original test case documentation. I'll re-explore the live app to diagnose selector drift or behavior changes.
- From test only — Paste the failing test file path + full error output only. Diagnosis accuracy may be lower without documentation.
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