analyze-codebase
Analyze Codebase
When to use
- At the start of a Playwright testing session (before ingest-spec or plan-tests)
- When running as part of
run-testing-sessionpipeline (Stage 1) - When project context is stale and needs refresh
Important: Always Prompt, Never Skip
When invoked as part of the run-testing-session orchestrator (Stage 0):
- If
project-context.mddoes NOT exist: Show user "No global project context found. Run analyze-codebase? (required to proceed)" → User must choose Yes or the orchestrator cancels - If
project-context.mdEXISTS: Show user these options:- A) Use existing context (skip analyze-codebase)
- B) Re-run analyze-codebase (project has grown or changed)
- C) Cancel session
This ensures the user always controls when the codebase analysis happens, especially important when the repository has grown and context needs refresh.
More from lautaroleonhardt/pst
plan-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.
9run-testing-session
Use to run the full Playwright testing pipeline (analyze → ingest → plan → explore → generate → debug) with isolated subagent context per stage. Each stage is reviewed and fixed automatically. Requires a running target app and a spec input.
9