flow-based-functional-testing
Skill4 starsChanged 2 months agoMITView on GitHub
Execute user flows as functional test cases and verify outcomes match the design. Use when functional testing, user flow testing, end-to-end test, verify the flow works, or test this feature.
In this repository46 other files it gives its agents.
- accessibility-reviewSkill
- accessibility-runtime-auditSkill
- adaptive-component-behaviorSkill
- ai-feature-ux-patternsSkill
- behavioral-pricing-psychologySkill
- business-model-readingSkill
- business-model-thinkingSkill
- cognitive-load-heatmap-predictionSkill
- component-style-guideSkill
- cross-functional-reviewSkill
- dark-mode-theming-systemSkill
- dashboard-layout-patternsSkill
- dashboard-scaffolding-contractSkill
- design-drift-detectorSkill
- design-system-builderSkill
- design-to-code-handoffSkill
- design-tokensSkill
- error-boundary-resilience-designSkill
- growth-impact-reviewSkill
- i18n-localization-strategySkill
- information-architectureSkill
- interactive-element-auditSkill
- kinematic-motion-choreographySkill
- micro-interaction-motion-designSkill
- module-registry-syncSkill
- mvp-scopingSkill
- perceived-performance-loadingSkill
- prd-traceability-matrixSkill
- product-discoverySkill
- product-strategySkill
- project-health-diagnosticsSkill
- qa-feedback-loop-orchestratorSkill
- responsive-breakpoint-strategySkill
- responsive-qa-auditSkill
- route-integrity-checkerSkill
- security-privacy-reviewSkill
- stakeholder-requirement-mappingSkill
- touch-gesture-interactionSkill
- typography-systemSkill
- usability-heuristics-checkSkill
- user-flow-mappingSkill
- user-research-synthesisSkill
- ux-chaos-monkeySkill
- visual-hierarchy-reviewSkill
- visual-responsive-regression-testingSkill
- visual-style-extractorSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Every user flow defined in user-flow-mapping becomes a test scenario.
- Distinctive: line 17
Not all flows are equal. Order execution by business impact:
- Distinctive: line 25
Use Given-When-Then format for absolute clarity.
- Distinctive: line 48
Run the test suite. Record states: pass / fail / blocked (environment issue, not a product bug).
- Very specific: line 57
Every user flow from user-flow-mapping has at least one test scenario
- Distinctive: line 59
All failures are documented with PRD requirement reference
- Distinctive: line 61
Test results are recorded in an output report
- Distinctive: line 64
Test case document (Given-When-Then format for each scenario)
- Distinctive: line 66
Test results report (scenario × pass/fail × failure details × PRD requirement ID)
- Distinctive: line 72
Not recording results — "it passed on my machine" is not a result
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
A feature is not done when it is built — it is done when a user can complete the flow you designed for them. Testing the flow is the only way to know.
1. Extract test scenarios from user-flow-mapping
Every user flow defined in user-flow-mapping becomes a test scenario. Define the scenario attributes:
- Entry point (URL or starting state)
- Actor (user role/permission level)
- Steps (sequence of actions)
- Expected outcome (what MUST be true at the end)
- Error paths (what happens if a step fails)
2. Prioritize scenarios
Not all flows are equal. Order execution by business impact:
- Critical path (the flow that delivers the product's core value)
- Authentication and permission flows (most security-critical)
- Data mutation flows (create, update, delete — irreversible actions)
- Error and recovery flows (what happens when things go wrong)
- Edge cases (empty state, max length inputs, concurrent operations)
3. Write test cases
Use Given-When-Then format for absolute clarity. For each scenario:
- Given: initial state and preconditions
- When: sequence of user actions
- Then: expected outcomes (UI changes, data changes, navigation, notifications)
4. Generate Playwright test scaffolds
Produce an executable Playwright test for every scenario. Ensure assertions test outcomes, not implementation details.
// Run: npx playwright test flow-tests/
test('Critical path: User completes [flow name]', async ({ page }) => {
// Given
await page.goto('/start-url');
// When
await page.click('[data-testid="action-button"]');
// Then
await expect(page.locator('[data-testid="success-state"]')).toBeVisible();
});Note: Use data-testid attributes for selectors — never CSS classes or text content.
5. Execute tests and record results
Run the test suite. Record states: pass / fail / blocked (environment issue, not a product bug). For failures, capture:
- Step that failed
- Expected vs actual outcome
- Screenshot or DOM snapshot at point of failure
6. Map failures to PRD requirements
For every failed test, resolve the corresponding PRD requirement ID from the prd-traceability-matrix. The failure report must include the requirement ID. This feeds the qa-feedback-loop-orchestrator.
Completion Criteria
- Every user flow from
user-flow-mappinghas at least one test scenario - Critical path tests pass 100%
- All failures are documented with PRD requirement reference
- Playwright scaffolds are in version control and runnable
- Test results are recorded in an output report
Output
- Test case document (Given-When-Then format for each scenario)
- Playwright test files (
flow-tests/*.spec.js) - Test results report (scenario × pass/fail × failure details × PRD requirement ID)
Anti-patterns
- Writing tests only for the happy path and ignoring error flows
- Using CSS classes or display text as selectors
- Running tests only locally — they should be reproducible in any environment
- Not recording results — "it passed on my machine" is not a result
- Testing implementation details instead of user outcomes
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

