Files
DevRunbook release export cfd2804e27
Managed validation / full (push) Successful in 3m18s
Publish DevRunbook source
2026-09-03 04:09:17 +02:00

219 lines
8.1 KiB
YAML

apiVersion: devrunbook.io/v1alpha1
kind: Playbook
metadata:
id: testing.playwright-critical-flows
slug: playwright-critical-flows
version: 1.0.0
title: Add Playwright Critical-Flow Tests
summary: Cover selected end-to-end user journeys with resilient selectors, deterministic setup and useful failure artifacts.
category: testing
tags:
- playwright
- e2e
- frontend
lifecycle: reviewed
riskTier: moderate
authors:
- name: DevRunbook Core Team
license: MIT
package:
files:
- path: prompt.md
role: template
digest: true
exportByDefault: false
- path: README.md
role: documentation
digest: true
exportByDefault: false
- path: CHANGELOG.md
role: changelog
digest: true
exportByDefault: false
- path: examples/minimal.yaml
role: example
digest: true
exportByDefault: false
- path: evaluations/static-structure.yaml
role: evaluation
digest: true
exportByDefault: false
spec:
type: run-pack
intent:
problem: Development work around add playwright critical-flow tests is often underspecified, inconsistently executed or
reported without enough evidence.
outcome: Cover selected end-to-end user journeys with resilient selectors, deterministic setup and useful failure artifacts.
whenToUse:
- Use this playbook when the repository needs a bounded add playwright critical-flow tests task with explicit evidence
and completion criteria.
- Use it when Codex should follow a repeatable workflow rather than improvise from a one-line request.
whenNotToUse:
- Do not use it when the desired outcome or authority boundaries are still materially undecided.
- Do not use it to access unavailable production credentials, bypass safeguards or claim validation that cannot be performed.
modes:
- guided
- execute
- recovery
defaultMode: execute
autonomy:
min: implement
max: repair
default: verify
inputs:
- key: criticalFlows
label: Critical flows
description: List the highest-value user or system flows that must be covered.
type: string-list
required: true
sensitive: false
includeInOutput: true
- key: browserTargets
label: Browser targets
description: Select the browser engines required for the end-to-end suite.
type: multiselect
required: true
sensitive: false
includeInOutput: true
default:
- chromium
options:
- chromium
- firefox
- webkit
compatibility:
repositoryRequired: true
languages: []
frameworks: []
packageManagers: []
databases: []
deploymentTypes: []
requiredProfileCapabilities:
- dev-start-command
incompatibleConditions: []
guardrails:
- id: guardrail-1
severity: blocking
text: Use resilient user-facing selectors and avoid arbitrary sleep-based timing.
- id: guardrail-2
severity: blocking
text: Do not depend on mutable production data or external services without controlled fixtures.
- id: guardrail-3
severity: blocking
text: Capture traces or screenshots on failure without including secrets or private content.
workflow:
- id: map-flows
title: Map critical flows
instruction: Define preconditions, roles, test data, success states and failure states for each selected flow.
required: true
- id: configure-playwright
title: Configure Playwright
instruction: Add compatible browser, base URL, server startup, retries and artifact settings.
required: true
- id: build-fixtures
title: Build test fixtures
instruction: Create isolated deterministic data setup and teardown that supports parallel or repeated execution.
required: true
- id: implement-flows
title: Implement flow tests
instruction: Exercise behavior through accessible user interactions and assert meaningful outcomes.
required: true
- id: stabilize
title: Stabilize tests
instruction: Replace timing assumptions with state-based waits and investigate flakiness through traces.
required: true
- id: ci-integration
title: Integrate with CI
instruction: Add an appropriate CI job, browser dependencies and artifact retention.
required: true
- id: verify
title: Verify repeatedly
instruction: Run selected browsers repeatedly and confirm the suite fails for meaningful regressions.
required: true
validation:
commandRoles:
- dev-start
- end-to-end-test
- build
checks:
- id: check-1
type: assertion
description: Critical flows pass repeatedly without arbitrary delays.
blocking: true
evidence: Referenced files, command results or explicit review notes.
- id: check-2
type: assertion
description: Failure artifacts are useful and safely redacted.
blocking: true
evidence: Referenced files, command results or explicit review notes.
- id: command-dev-start
type: command
description: Run the resolved dev-start command when the repository profile provides it and record the result.
blocking: true
evidence: Resolved command, exit status and concise result summary.
- id: command-end-to-end-test
type: command
description: Run the resolved end-to-end-test command when the repository profile provides it and record the result.
blocking: true
evidence: Resolved command, exit status and concise result summary.
- id: command-build
type: command
description: Run the resolved build command when the repository profile provides it and record the result.
blocking: true
evidence: Resolved command, exit status and concise result summary.
completion:
criteria:
- Critical flows pass from clean setup.
- Failures capture actionable evidence and avoid brittle timing.
- Validation evidence and unresolved limitations are reported honestly.
failurePolicy:
onValidationFailure: Investigate failures caused by the current work, repair them when they remain within scope, rerun
affected validation and report any genuine blocker without claiming success.
onAmbiguity: Use repository evidence and existing conventions for minor reversible choices. Preserve current behavior
and stop before any material irreversible decision that the specification does not resolve.
onMissingContext: Inspect the repository for missing non-sensitive context. Never invent commands, credentials, production
behavior or validation results; report what remains unavailable.
onOutOfScopeCause: Explain the evidenced out-of-scope cause, avoid unrelated changes and provide the smallest safe follow-up
recommendation.
onExternalDependencyUnavailable: Use an approved local substitute or fixture only when it preserves the behavior under
test. Otherwise record the blocked validation and do not claim the external path succeeded.
onUnableToReproduce: Record attempted reproduction, environment and observed evidence. Do not apply speculative production
changes; provide the narrowest next diagnostic action.
reporting:
sections:
- id: outcome
title: Outcome
required: true
description: State the delivered result or audit conclusion without overstating evidence.
- id: evidence
title: Evidence and scope
required: true
description: List inspected or changed areas and the evidence supporting the result.
- id: validation
title: Validation
required: true
description: Report commands, manual checks and their actual outcomes.
- id: risks
title: Risks and limitations
required: true
description: State residual risk, inaccessible evidence and untested conditions.
- id: follow-up
title: Recommended follow-up
required: true
description: List the smallest useful next actions or state None.
template:
main: prompt.md
partials: []
exports:
prompt: true
markdown: true
runPack: true
agentsSuggestion: false
quality:
reviewStatus: editorial-reviewed
testedStacks: []
knownLimitations:
- Repository-specific effectiveness depends on the accuracy of the selected profile and the evidence available to Codex.
evaluationCaseIds:
- playwright-critical-flows.static-structure