sat-generate
Skill17 starsChanged 8 months agoMITView on GitHub
Generate UX test scenarios from project documentation using persona lenses. Reads docs/, loads personas from sat/personas/, and writes scenario markdown files to sat/scenarios/. Use when user says "generate test scenarios", "sat generate", "create UX scenarios", or "generate sat scenarios".
In this repository74 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- src/CLAUDE.mdCLAUDE.md
- bmad-advanced-elicitationSkill
- bmad-agent-analystSkill
- bmad-agent-architectSkill
- bmad-agent-builderSkill
- bmad-agent-devSkill
- bmad-agent-pmSkill
- bmad-agent-qaSkill
- bmad-agent-quick-flow-solo-devSkill
- bmad-agent-smSkill
- bmad-agent-tech-writerSkill
- bmad-agent-ux-designerSkill
- bmad-brainstormingSkill
- bmad-builder-setupSkill
- bmad-check-implementation-readinessSkill
- bmad-code-reviewSkill
- bmad-correct-courseSkill
- bmad-create-architectureSkill
- bmad-create-epics-and-storiesSkill
- bmad-create-prdSkill
- bmad-create-storySkill
- bmad-create-ux-designSkill
- bmad-dev-storySkill
- bmad-distillatorSkill
- bmad-document-projectSkill
- bmad-domain-researchSkill
- bmad-editorial-review-proseSkill
- bmad-editorial-review-structureSkill
- bmad-edit-prdSkill
- bmad-generate-project-contextSkill
- bmad-helpSkill
- bmad-index-docsSkill
- bmad-initSkill
- bmad-market-researchSkill
- bmad-party-modeSkill
- bmad-product-briefSkill
- bmad-qa-generate-e2e-testsSkill
- bmad-quick-devSkill
- bmad-retrospectiveSkill
- bmad-review-adversarial-generalSkill
- bmad-review-edge-case-hunterSkill
- bmad-shard-docSkill
- bmad-sprint-planningSkill
- bmad-sprint-statusSkill
- bmad-story-cycleSkill
- bmad-teach-me-testingSkill
- bmad-teaSkill
- bmad-technical-researchSkill
- bmad-testarch-atddSkill
- bmad-testarch-automateSkill
- bmad-testarch-ciSkill
- bmad-testarch-frameworkSkill
- bmad-testarch-nfrSkill
- bmad-testarch-test-designSkill
- bmad-testarch-test-reviewSkill
- bmad-testarch-traceSkill
- bmad-validate-prdSkill
- bmad-workflow-builderSkill
- pr-shepherdSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 3 are distinctive, and 14 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
If count is less than 5, set it to 5 and inform the user.
- Very specific: line 25
Check if sat/scenarios/.sat-state.yaml exists.
- Very specific: line 28
If status: complete — a previous run finished.
- Distinctive: line 29
If file doesn't exist — first run.
- Very specific: line 53
Read all markdown files from <input_path> (default: docs/).
- Very specific: line 56
If the directory doesn't exist: STOP.
- Very specific: line 57
If the directory has no .md files: STOP.
- Very specific: line 59
Update .sat-state.yaml with input_files count.
- Very specific: line 63
Check if sat/personas/ exists and has .yaml files.
- Distinctive: line 65
If missing or empty: Create the directory and write 3 default personas:
- Very specific: line 83
Update .sat-state.yaml with personas_loaded list.
- Very specific: line 87
If sat/learnings.yaml exists and is valid YAML, read it:
- Very specific: line 93
If the file is malformed YAML, warn the user: "Warning: sat/learnings.yaml is malformed, skipping learnings for this run." Continue without …
- Very specific: line 95
Update .sat-state.yaml with learnings_applied: true if learnings were loaded.
- Very specific: line 150
Write each scenario to sat/scenarios/<id>.md
- Very specific: line 154
Update scenarios_generated with running total
- Distinctive: line 161
After all batches complete, validate every generated scenario file using bash.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
SAT Scenario Generator
You are a test scenario generator for web-accessible applications. Your job is to read project documentation, understand what the app does, and generate natural-language test scenarios that a human or AI tester could walk through to evaluate user satisfaction.
Arguments
The user may provide:
- input_path — directory to read docs from (default:
docs/) - count — target number of scenarios to generate (default: 20, minimum: 5)
- focus — optional focus area (e.g., "worktree creation", "PR triage")
If count is less than 5, set it to 5 and inform the user.
Step 1: Check State and Resume
Check if sat/scenarios/.sat-state.yaml exists.
- If
status: generating— a previous run was interrupted. Count existingsat/scenarios/*.mdfiles. Calculatebatches_completedasfloor(count / 5). Ifcountis not a multiple of 5, the last batch was partial — delete thosecount % 5most-recently-modified.mdfiles (they may be incomplete). Then reload inputs (Step 2) and resume generation from the next batch. - If
status: complete— a previous run finished. This is a replace run. Delete all existingsat/scenarios/*.mdfiles (keep.sat-state.yamland.gitkeep). Start fresh. - If file doesn't exist — first run. Start fresh.
Write initial state:
status: generating
generated_at: <current ISO timestamp>
input_path: <input_path>
input_files: 0
scenarios_generated: 0
categories:
happy_path: 0
edge_case: 0
failure_mode: 0
personas_loaded: []
learnings_applied: false
batches_completed: 0
batch_size: 5Step 2: Load Inputs
Documentation
Read all markdown files from <input_path> (default: docs/).
Error handling:
- If the directory doesn't exist: STOP. Tell the user: "No
docs/directory found. Createdocs/with project documentation first, or provide an input path:/sat-generate input_path=path/to/docs" - If the directory has no
.mdfiles: STOP. Tell the user: "No markdown files found in<input_path>. Add project documentation as markdown files."
Update .sat-state.yaml with input_files count.
Personas
Check if sat/personas/ exists and has .yaml files.
- If missing or empty: Create the directory and write 3 default personas:
confused-newbie.yaml— low frustration threshold, no technical knowledge, gives up after 2 confusing stepspower-user.yaml— high frustration threshold, expert, expects keyboard shortcuts and fast workflowsaccessibility-user.yaml— medium threshold, intermediate, relies on keyboard navigation and screen readers
Each persona file uses this schema:
name: <display name>
description: <one-line description>
frustration_threshold: low | medium | high
technical_level: none | beginner | intermediate | expert
satisfaction_criteria:
- <what makes this persona satisfied>
behaviors:
- <how this persona interacts with apps>Update .sat-state.yaml with personas_loaded list. Use filename slugs (e.g., confused-newbie, power-user), not display names, to match the architecture contract.
Learnings
If sat/learnings.yaml exists and is valid YAML, read it:
fixed_issues— avoid generating scenarios that test already-fixed issuesfalse_positives— avoid scenario patterns that produced false positivesweak_areas— generate more scenarios for weak areasscenario_feedback— avoid patterns marked asquality: bad
If the file is malformed YAML, warn the user: "Warning: sat/learnings.yaml is malformed, skipping learnings for this run." Continue without learnings.
Update .sat-state.yaml with learnings_applied: true if learnings were loaded.
Step 3: Generate Scenarios in Batches
Generate scenarios in batches of 5. After each batch, write files and update state.
Category Distribution
Aim for this approximate distribution across all scenarios:
- Happy path (~50%) — core user flows that should work smoothly
- Edge case (~30%) — boundary conditions, unusual inputs, uncommon paths
- Failure mode (~20%) — error states, disconnections, permission issues
Scenario Quality Rules
- Steps are natural language — describe what the user does ("Click the Add Worktree button"), not CSS selectors or XPaths
- Each scenario tests one user goal — not a multi-goal integration test
- Persona-aware — consider which persona would encounter this scenario. Set
personafield to a persona filename slug (e.g.,confused-newbie) orany - Non-obvious coverage — don't just test the happy path of every feature. Think about: what would confuse a newbie? What would frustrate a power user? What breaks for accessibility?
- No hallucinated features — only generate scenarios for features described in the documentation. If the docs describe a roadmap item, do NOT generate scenarios for it
- If learnings loaded: weight toward
weak_areas, avoid patterns infalse_positivesandscenario_feedbackwithquality: bad
For Each Batch
- Generate 5 scenario markdown files with this format:
---
id: <slugified-from-title>
title: <descriptive scenario title>
persona: <persona-name or any>
priority: <high | medium | low>
tags: [<relevant-tags>]
generated_from: <relative path to source doc, e.g., docs/mvp-brief.md>
---
## Context
<1-2 sentences about the user's situation and goal>
## Steps
1. <First user action>
2. <Second user action>
...
## Expected Satisfaction
- <What should feel good about this flow>
- <What the persona would specifically appreciate>
## Edge Cases
- <What could go wrong>
- <Unusual conditions to watch for>- ID generation: Slugify the title (lowercase, hyphens for spaces, remove special chars). If the ID collides with an existing file, append
-2,-3, etc. - Write each scenario to
sat/scenarios/<id>.md - Update
.sat-state.yaml:- Increment
batches_completed - Update
scenarios_generatedwith running total - Update category counts
- Increment
- Continue until target count is reached or you run out of meaningful scenarios to generate (don't pad with low-quality filler).
Step 4: Self-Check via Bash Validation
After all batches complete, validate every generated scenario file using bash. Do NOT re-read the files yourself for validation — use bash commands to verify the structure.
Run this validation:
errors=0
count=0
for f in sat/scenarios/*.md; do
[ "$f" = "sat/scenarios/*.md" ] && continue
count=$((count + 1))
# Verify file has closing --- for frontmatter (at least 2 occurrences of ---)
dashes=$(grep -c "^---$" "$f")
if [ "$dashes" -lt 2 ]; then
echo "BROKEN FRONTMATTER (missing closing ---): $f"
errors=$((errors + 1))
continue
fi
# Extract frontmatter (between first two --- lines)
frontmatter=$(sed -n '2,/^---$/p' "$f" | sed '$d')
# Check required fields exist
echo "$frontmatter" | grep -q "^id:" || { echo "MISSING id: $f"; errors=$((errors + 1)); }
echo "$frontmatter" | grep -q "^title:" || { echo "MISSING title: $f"; errors=$((errors + 1)); }
# Check ## Steps section exists
grep -q "^## Steps" "$f" || { echo "MISSING ## Steps: $f"; errors=$((errors + 1)); }
done
echo "Validated $count files, $errors errors found"Report the validation results. If any files fail validation, fix them.
Step 5: Finalize
Update .sat-state.yaml:
status: complete
generated_at: <original timestamp>
input_path: <input_path>
input_files: <count>
scenarios_generated: <total>
categories:
happy_path: <count>
edge_case: <count>
failure_mode: <count>
personas_loaded: [<list>]
learnings_applied: <true|false>
batches_completed: <count>
batch_size: 5Report to the user:
- Total scenarios generated
- Breakdown by category (happy path / edge case / failure mode)
- Breakdown by persona
- Any validation errors found and fixed
- Source documents read
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.

