Skip to main content

/plan-test

What it does

/plan-test runs the Planner agent in isolation. It takes a plain-English scenario description and produces one or more structured spec markdown files under tests/specs/. No TypeScript is written — the output is a human-readable, structured spec that describes the test in terms of user intent and page-object method calls.

Each spec file contains:

  • A frontmatter block with the test id, feature, title, fixture, and data references.
  • A numbered list of steps, each with an intent (what the user is doing) and a method (the page-object or helper call that implements it).

The spec becomes the input for /generate-test.

When to use it

Use /plan-test when you want to think through a scenario before generating code. It is useful for:

  • Breaking a complex flow into reviewable steps before committing to a test.
  • Getting the Planner's read on which page objects and data fixtures are needed.
  • Batch-planning several scenarios before generating them in one go.

If you want to go straight from a scenario to a runnable test without stopping at the spec stage, use /e2e-from-scratch instead.

How to run it

/plan-test "add an Account Manager to the project team and see the row after save"

Example

Input:

"add an Account Manager to the project team and see the row after save"

What you get back:

A spec file at tests/specs/project/team/add-key-member.md, for example:

---
id: project-team-add-key-member
feature: project/team
title: Add an Account Manager to the project team and verify the row appears after save
fixture: projectPage
data:
- '{{project.id}}'
- '{{team.accountManager.name}}'
---

1. intent: Navigate to the project's Team tab
method: projectPage.team.open(data.project.id)

2. intent: Click the "Add Key Member" button
method: projectPage.team.clickAddKeyMember()

3. intent: Select "Account Manager" from the role dropdown and fill in the name
method: projectPage.team.fillKeyMemberForm({ role: "Account Manager", name: data.team.accountManager.name })

4. intent: Save the form and confirm the row appears in the grid
method: projectPage.team.saveAndExpectRow({ name: data.team.accountManager.name })

Notes

  • The Planner reads the application source, existing page objects, and the project rulebook to choose field names and method references — so spec paths and method names match what already exists in the codebase.
  • If the Planner cannot resolve a field name or determine the correct page object, it will flag it with a [NEW: ...] annotation rather than guessing.
  • A vague or ambiguous scenario description causes the Planner to ask for clarification rather than producing an incomplete spec.