Require Playwright E2E tests in every verification step
- New skill e2e-testing: on-demand Playwright setup (config, test:e2e script), acceptance-criteria-driven specs (one per feature + app-shell smoke), blueprint-driven semantic locators, and the shared verification checklist - /add-feature Step 7 and /execute-milestones Step 2.6 now write/update E2E specs and run npm run test:e2e alongside test/lint/typecheck; milestone gates and completion criteria include E2E - /generate-app Step 5 sets up Playwright and creates the app-shell smoke spec for the web target (integration_test / UI automation noted for flutter/winui3) - steering tasklist template, milestone-planning Definition of Done, milestone-execution task slicing/gates, development-guidelines pointers, and implementation-validator checks updated - AGENTS.md and README updated Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@ -119,15 +119,19 @@ If any of the following situations occur while the implementation loop is runnin
|
||||
|
||||
**Once this step completes successfully, never stop; immediately proceed to Step 7.**
|
||||
|
||||
## Step 7: Run Automated Tests
|
||||
## Step 7: Run Automated Tests (including Playwright E2E)
|
||||
|
||||
1. Run the following commands in order and confirm that all tests pass.
|
||||
1. Write or update the feature's end-to-end tests following the **e2e-testing** skill (loaded automatically):
|
||||
- Create/update `e2e/[feature-name].spec.ts` covering the feature's acceptance criteria.
|
||||
- If Playwright is not yet set up in the repository, set it up first as described in the skill.
|
||||
2. Run the following commands in order and confirm that all of them pass.
|
||||
```bash
|
||||
npm test
|
||||
npm run lint
|
||||
npm run typecheck
|
||||
npm run test:e2e
|
||||
```
|
||||
2. If any command produces an error, analyze the problem, generate and apply a fix, and then run this step again.
|
||||
3. If any command produces an error, analyze the problem, generate and apply a fix, and then run this step again. Never skip or delete a failing test to make verification pass.
|
||||
|
||||
**Once this step completes successfully, never stop; immediately proceed to Step 8.**
|
||||
|
||||
@ -162,7 +166,7 @@ If any of the following situations occur while the implementation loop is runnin
|
||||
This workflow completes automatically once all of the following conditions are met.
|
||||
- Step 5: All tasks in `tasklist.md` are complete (`[x]` or skipped for a valid reason).
|
||||
- Step 6: The `implementation-validator` subagent's validation passes.
|
||||
- Step 7: The `test`, `lint`, and `typecheck` commands all succeed without errors.
|
||||
- Step 7: The `test`, `lint`, `typecheck`, and `test:e2e` (Playwright) commands all succeed without errors, and the feature has E2E tests covering its acceptance criteria.
|
||||
- Step 8: Handover notes are recorded in `tasklist.md`, all six persistent documents in `docs/` have been reconciled with the feature (updates applied, or a skip reason noted for each), and the feature is checked off in its phase file (if `docs/milestones/` exists).
|
||||
|
||||
Until these completion criteria are met, continue to think autonomously, solve problems, and carry on the work.
|
||||
|
||||
@ -104,15 +104,19 @@ Use the Task tool to launch the `implementation-validator` subagent:
|
||||
- `description`: "Milestone implementation validation"
|
||||
- `prompt`: "Please validate the quality of all changes implemented for milestone `[NN] [name]`. The target files are `[list of implemented file paths]`. Focus on coding standards, error handling, testability, consistency with existing patterns, and whether every feature's acceptance criteria in `.steering/[dir]/requirements.md` are met."
|
||||
|
||||
#### 2.6 Run Automated Tests
|
||||
#### 2.6 Run Automated Tests (including Playwright E2E)
|
||||
|
||||
1. Write or update the milestone's end-to-end tests following the **e2e-testing** skill (loaded automatically): one `e2e/[feature-name].spec.ts` per feature in the milestone, covering its acceptance criteria. Set up Playwright first (as described in the skill) if it is missing.
|
||||
2. Run:
|
||||
|
||||
```bash
|
||||
npm test
|
||||
npm run lint
|
||||
npm run typecheck
|
||||
npm run test:e2e
|
||||
```
|
||||
|
||||
If any command fails, analyze, fix, and re-run until all pass.
|
||||
If any command fails, analyze, fix, and re-run until all pass. Never skip or delete a failing test to make verification pass.
|
||||
|
||||
#### 2.7 Retrospective and Document Reconciliation
|
||||
|
||||
@ -125,7 +129,7 @@ Apply `/add-feature` Step 8 for the milestone:
|
||||
|
||||
#### 2.8 Milestone Gate — then Continue
|
||||
|
||||
The milestone is done only when: all tasks are `[x]`, validation passed, tests/lint/typecheck are green, the six documents are reconciled, and the milestone status is updated in the phase file and the roadmap.
|
||||
The milestone is done only when: all tasks are `[x]`, validation passed, tests/lint/typecheck/E2E (Playwright) are green, the six documents are reconciled, and the milestone status is updated in the phase file and the roadmap.
|
||||
|
||||
**Once the gate passes, never stop; immediately start Step 2 for the next milestone in the queue.** If the gate genuinely cannot be passed (external blocker), record the blocker in the milestone's `tasklist.md`, the phase file, and `roadmap.md`, then stop and report — this is the only permitted early stop.
|
||||
|
||||
@ -139,7 +143,7 @@ The milestone is done only when: all tasks are `[x]`, validation passed, tests/l
|
||||
- Every milestone in the specified phase file has status `Completed`.
|
||||
- The phase's status is `Completed` in both the phase file and `docs/milestones/roadmap.md`.
|
||||
- Each executed milestone has its own `.steering/[date]-milestone-[NN]-[name]/` directory with all tasks `[x]`.
|
||||
- Tests, lint, and typecheck pass on the final state.
|
||||
- Tests, lint, typecheck, and Playwright E2E tests pass on the final state, with E2E coverage for every implemented feature's acceptance criteria.
|
||||
- The six persistent documents reflect everything implemented.
|
||||
|
||||
Completion message:
|
||||
|
||||
@ -118,10 +118,13 @@ Apply the requirements for the selected target:
|
||||
|
||||
If new directories/files were created, update `docs/repository-structure.md` so it reflects the generated layout.
|
||||
|
||||
### Step 5: Verify
|
||||
### Step 5: Verify (including Playwright E2E)
|
||||
|
||||
- If the target is `web` and the repo has `npm test`, `npm run lint`, `npm run typecheck`, run them and fix any errors caused by the generated code.
|
||||
- For `flutter` / `winui3`, run the platform's available static checks if the toolchain is present; otherwise note what should be checked manually.
|
||||
- If the target is `web`:
|
||||
- Run `npm test`, `npm run lint`, `npm run typecheck` (where present) and fix any errors caused by the generated code.
|
||||
- Set up Playwright following the **e2e-testing** skill (loaded automatically) if it is not set up yet, and create the app-shell smoke spec `e2e/app-shell.spec.ts` (shell renders, every blueprint route navigates, primary navigation works).
|
||||
- Run `npm run test:e2e` and fix any failures caused by the generated code.
|
||||
- For `flutter` / `winui3`, run the platform's available static checks and UI/integration tests if the toolchain is present (`integration_test` for Flutter, the platform's UI automation for WinUI 3); otherwise note what should be checked manually.
|
||||
|
||||
## Completion Criteria
|
||||
|
||||
@ -141,6 +144,7 @@ Generated:
|
||||
✅ Routes / navigation (from ui-blueprint.json)
|
||||
✅ Screens (one per blueprint screen)
|
||||
✅ Reusable components
|
||||
✅ Playwright E2E smoke spec (e2e/app-shell.spec.ts, web target)
|
||||
|
||||
Next steps:
|
||||
- Run the app and verify the shell renders
|
||||
|
||||
Reference in New Issue
Block a user