initial commit
This commit is contained in:
235
.claude/skills/bmad-teach-me-testing/steps-c/step-01-init.md
Normal file
235
.claude/skills/bmad-teach-me-testing/steps-c/step-01-init.md
Normal file
@@ -0,0 +1,235 @@
|
||||
---
|
||||
name: 'step-01-init'
|
||||
description: 'Initialize TEA Academy - check for existing progress and route to continuation or new assessment'
|
||||
|
||||
nextStepFile: './step-02-assess.md'
|
||||
continueFile: './step-01b-continue.md'
|
||||
progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
|
||||
progressTemplate: '../templates/progress-template.yaml'
|
||||
---
|
||||
|
||||
# Step 1: Initialize TEA Academy
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To welcome the learner, check for existing progress from previous sessions, and route to either continuation (if progress exists) or new assessment (if starting fresh).
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a Master Test Architect and Teaching Guide
|
||||
- ✅ We engage in collaborative learning, not lectures
|
||||
- ✅ You bring expertise in TEA methodology and teaching pedagogy
|
||||
- ✅ Learner brings their role context, experience, and learning goals
|
||||
- ✅ Together we build their testing knowledge progressively
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on initialization and routing
|
||||
- 🚫 FORBIDDEN to start teaching yet - that comes in session steps
|
||||
- 💬 Approach: Check for progress, route appropriately
|
||||
- 🚪 This is the entry point - sets up everything that follows
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Check for existing progress file
|
||||
- 💾 Create initial progress if new learner
|
||||
- 📖 Route to continuation or assessment based on progress
|
||||
- 🚫 FORBIDDEN to skip continuation check - critical for multi-session learning
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Available context: User name, test artifacts path, templates
|
||||
- Focus: Detect continuation vs new start
|
||||
- Limits: No teaching yet, no assessment yet
|
||||
- Dependencies: None - this is the first step
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
||||
|
||||
### 1. Welcome Message
|
||||
|
||||
Display:
|
||||
|
||||
"🧪 **Welcome to TEA Academy - Test Architecture Enterprise Learning**
|
||||
|
||||
A multi-session learning companion that teaches testing progressively through 7 structured sessions.
|
||||
|
||||
Let me check if you've started this journey before..."
|
||||
|
||||
### 2. Check for Existing Progress
|
||||
|
||||
Check if {progressFile} exists.
|
||||
|
||||
**How to check:**
|
||||
|
||||
- Attempt to read {progressFile}
|
||||
- If file exists and is readable → Progress found
|
||||
- If file not found or error → No progress (new learner)
|
||||
|
||||
### 3. Route Based on Progress
|
||||
|
||||
**IF progress file EXISTS:**
|
||||
|
||||
Display:
|
||||
|
||||
"✅ **Welcome back!** I found your existing progress.
|
||||
|
||||
Let me load where you left off..."
|
||||
|
||||
**THEN:** Immediately load, read entire file, then execute {continueFile}
|
||||
|
||||
---
|
||||
|
||||
**IF progress file DOES NOT EXIST:**
|
||||
|
||||
Display:
|
||||
|
||||
"📝 **Starting fresh!** I'll create your progress tracking file.
|
||||
|
||||
You can pause and resume anytime - your progress will be saved automatically after each session."
|
||||
|
||||
**THEN:** Proceed to step 4
|
||||
|
||||
### 4. Create Initial Progress File (New Learner Only)
|
||||
|
||||
Load {progressTemplate} and create {progressFile} with:
|
||||
|
||||
```yaml
|
||||
---
|
||||
# TEA Academy Progress Tracking
|
||||
user: { user_name }
|
||||
role: null # Will be set in assessment
|
||||
experience_level: null # Will be set in assessment
|
||||
learning_goals: null # Will be set in assessment
|
||||
pain_points: null # Optional, set in assessment
|
||||
|
||||
started_date: { current_date }
|
||||
last_session_date: { current_date }
|
||||
|
||||
sessions:
|
||||
- id: session-01-quickstart
|
||||
name: 'Quick Start'
|
||||
duration: '30 min'
|
||||
status: not-started
|
||||
started_date: null
|
||||
completed_date: null
|
||||
score: null
|
||||
notes_artifact: null
|
||||
|
||||
- id: session-02-concepts
|
||||
name: 'Core Concepts'
|
||||
duration: '45 min'
|
||||
status: not-started
|
||||
started_date: null
|
||||
completed_date: null
|
||||
score: null
|
||||
notes_artifact: null
|
||||
|
||||
- id: session-03-architecture
|
||||
name: 'Architecture & Patterns'
|
||||
duration: '60 min'
|
||||
status: not-started
|
||||
started_date: null
|
||||
completed_date: null
|
||||
score: null
|
||||
notes_artifact: null
|
||||
|
||||
- id: session-04-test-design
|
||||
name: 'Test Design'
|
||||
duration: '60 min'
|
||||
status: not-started
|
||||
started_date: null
|
||||
completed_date: null
|
||||
score: null
|
||||
notes_artifact: null
|
||||
|
||||
- id: session-05-atdd-automate
|
||||
name: 'ATDD & Automate'
|
||||
duration: '60 min'
|
||||
status: not-started
|
||||
started_date: null
|
||||
completed_date: null
|
||||
score: null
|
||||
notes_artifact: null
|
||||
|
||||
- id: session-06-quality-trace
|
||||
name: 'Quality & Trace'
|
||||
duration: '45 min'
|
||||
status: not-started
|
||||
started_date: null
|
||||
completed_date: null
|
||||
score: null
|
||||
notes_artifact: null
|
||||
|
||||
- id: session-07-advanced
|
||||
name: 'Advanced Patterns'
|
||||
duration: 'ongoing'
|
||||
status: not-started
|
||||
started_date: null
|
||||
completed_date: null
|
||||
score: null
|
||||
notes_artifact: null
|
||||
|
||||
sessions_completed: 0
|
||||
total_sessions: 7
|
||||
completion_percentage: 0
|
||||
next_recommended: session-01-quickstart
|
||||
|
||||
stepsCompleted: ['step-01-init']
|
||||
lastStep: 'step-01-init'
|
||||
lastContinued: { current_date }
|
||||
|
||||
certificate_generated: false
|
||||
certificate_path: null
|
||||
completion_date: null
|
||||
---
|
||||
```
|
||||
|
||||
### 5. Proceed to Assessment (New Learner Only)
|
||||
|
||||
Display:
|
||||
|
||||
"✅ **Progress file created!**
|
||||
|
||||
Now let's learn about you - your role, experience level, and learning goals.
|
||||
|
||||
This helps me customize examples and recommendations for you.
|
||||
|
||||
**Proceeding to assessment...**"
|
||||
|
||||
**THEN:** Immediately load, read entire file, then execute {nextStepFile}
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Progress file check performed correctly
|
||||
- Existing learners routed to continuation (step-01b)
|
||||
- New learners get progress file created
|
||||
- Progress file has complete schema with all 7 sessions
|
||||
- New learners routed to assessment (step-02)
|
||||
- stepsCompleted array initialized
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping progress file check
|
||||
- Not routing to continuation for existing learners
|
||||
- Creating duplicate progress files
|
||||
- Progress file missing required fields
|
||||
- Not updating stepsCompleted array
|
||||
- Asking user questions before checking progress
|
||||
|
||||
**Master Rule:** This is an auto-proceed initialization step. Check progress, route appropriately, no user menu needed.
|
||||
@@ -0,0 +1,147 @@
|
||||
---
|
||||
name: 'step-01b-continue'
|
||||
description: 'Resume TEA Academy learning - load progress and display dashboard'
|
||||
|
||||
progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
|
||||
nextStepFile: './step-03-session-menu.md'
|
||||
---
|
||||
|
||||
# Step 1b: Continue TEA Academy
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To resume the TEA Academy workflow from a previous session by loading progress, displaying a dashboard, and routing to the session menu.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate _new instructional content_ without user input (auto-proceed steps may display status/route)
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a Master Test Architect and Teaching Guide
|
||||
- ✅ We engage in collaborative learning, not lectures
|
||||
- ✅ You bring expertise in TEA methodology and teaching pedagogy
|
||||
- ✅ Learner brings their role context, experience, and learning goals
|
||||
- ✅ Together we build their testing knowledge progressively
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on loading progress and routing to session menu
|
||||
- 🚫 FORBIDDEN to start teaching - that happens in session steps
|
||||
- 💬 Approach: Load progress, show dashboard, route to menu
|
||||
- 🚪 This is the continuation entry point - seamless resume
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Load progress file completely
|
||||
- 💾 Update lastContinued timestamp
|
||||
- 📖 Display progress dashboard with completion status
|
||||
- 🚫 FORBIDDEN to skip dashboard - learners need to see progress
|
||||
- ⏭️ Auto-route to session menu after dashboard
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Available context: Progress file with all session data
|
||||
- Focus: Display progress, route to menu
|
||||
- Limits: No teaching, no session execution
|
||||
- Dependencies: Progress file must exist (checked in step-01-init)
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
||||
|
||||
### 1. Load Progress File
|
||||
|
||||
Read {progressFile} completely and extract:
|
||||
|
||||
- user
|
||||
- role
|
||||
- experience_level
|
||||
- started_date
|
||||
- sessions array (all 7 sessions with status, scores)
|
||||
- sessions_completed
|
||||
- completion_percentage
|
||||
- next_recommended
|
||||
|
||||
### 2. Update Last Continued Timestamp
|
||||
|
||||
Update {progressFile} frontmatter:
|
||||
|
||||
- Set `lastContinued: {current_date}`
|
||||
- Keep all other fields unchanged
|
||||
|
||||
### 3. Display Progress Dashboard
|
||||
|
||||
Display:
|
||||
|
||||
"🧪 **Welcome back to TEA Academy, {user}!**
|
||||
|
||||
**Your Role:** {role}
|
||||
**Experience Level:** {experience_level}
|
||||
**Started:** {started_date}
|
||||
**Progress:** {completion_percentage}% ({sessions_completed} of 7 sessions completed)
|
||||
|
||||
---
|
||||
|
||||
### 📊 Session Progress
|
||||
|
||||
{Display each session with completion indicator}
|
||||
|
||||
{For each session in sessions array:}
|
||||
{If status == 'completed':}
|
||||
✅ **Session {N}:** {name} - Completed {completed_date} (Score: {score}/100)
|
||||
{If status == 'in-progress':}
|
||||
🔄 **Session {N}:** {name} - In Progress (Started {started_date})
|
||||
{If status == 'not-started':}
|
||||
⬜ **Session {N}:** {name} - Not Started
|
||||
|
||||
---
|
||||
|
||||
### 🎯 Next Recommended
|
||||
|
||||
{next_recommended}
|
||||
|
||||
---
|
||||
|
||||
**Let's continue your learning journey!**
|
||||
|
||||
Loading session menu..."
|
||||
|
||||
### 4. Route to Session Menu
|
||||
|
||||
Display:
|
||||
|
||||
"**Proceeding to session menu...**"
|
||||
|
||||
**THEN:** Immediately load, read entire file, then execute {nextStepFile}
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Progress file loaded correctly
|
||||
- lastContinued timestamp updated
|
||||
- Dashboard displayed with accurate completion status
|
||||
- Session indicators correct (✅ completed, 🔄 in-progress, ⬜ not-started)
|
||||
- Completion percentage calculated correctly
|
||||
- Next recommended session identified
|
||||
- Auto-routed to session menu (step-03)
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Not loading progress file
|
||||
- Dashboard missing or incomplete
|
||||
- Incorrect completion indicators
|
||||
- Not updating lastContinued timestamp
|
||||
- Asking user for input instead of auto-routing
|
||||
- Not routing to session menu
|
||||
|
||||
**Master Rule:** This is an auto-proceed continuation step. Load progress, show dashboard, route to session menu - no user menu needed.
|
||||
258
.claude/skills/bmad-teach-me-testing/steps-c/step-02-assess.md
Normal file
258
.claude/skills/bmad-teach-me-testing/steps-c/step-02-assess.md
Normal file
@@ -0,0 +1,258 @@
|
||||
---
|
||||
name: 'step-02-assess'
|
||||
description: 'Gather learner role, experience level, learning goals, and pain points to customize teaching'
|
||||
|
||||
nextStepFile: './step-03-session-menu.md'
|
||||
progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
|
||||
---
|
||||
|
||||
# Step 2: Learner Assessment
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To gather the learner's role, experience level, learning goals, and pain points to customize teaching examples and recommendations throughout the curriculum.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate _new instructional content_ without user input (auto-proceed steps may display status/route)
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step (auto-proceed), ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a Master Test Architect and Teaching Guide
|
||||
- ✅ We engage in collaborative learning, not lectures
|
||||
- ✅ You bring expertise in TEA methodology and teaching pedagogy
|
||||
- ✅ Learner brings their role context, experience, and learning goals
|
||||
- ✅ Together we build their testing knowledge progressively
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on gathering assessment data
|
||||
- 🚫 FORBIDDEN to start teaching yet - that comes in session steps
|
||||
- 💬 Approach: Ask clear questions, validate responses, explain why we're asking
|
||||
- 🚪 This assessment customizes the entire learning experience
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Ask questions one at a time
|
||||
- 💾 Validate each response before moving forward
|
||||
- 📖 Update progress file with complete assessment data
|
||||
- 🚫 FORBIDDEN to skip validation - ensures data quality
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Available context: Progress file created in step-01
|
||||
- Focus: Gather role, experience, goals, pain points
|
||||
- Limits: No teaching yet, no session execution
|
||||
- Dependencies: Progress file exists (created in step-01-init)
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
||||
|
||||
### 1. Welcome and Explain Assessment
|
||||
|
||||
Display:
|
||||
|
||||
"📋 **Learner Assessment**
|
||||
|
||||
Before we begin, let me learn about you. This helps me:
|
||||
|
||||
- Choose relevant examples for your role
|
||||
- Adjust complexity to your experience level
|
||||
- Focus on your specific learning goals
|
||||
- Address your pain points
|
||||
|
||||
This will take just 2-3 minutes."
|
||||
|
||||
### 2. Gather Role
|
||||
|
||||
Ask:
|
||||
|
||||
"**What is your role?**
|
||||
|
||||
Please select one:
|
||||
|
||||
- **QA** - QA Engineer / Test Engineer / SDET
|
||||
- **Dev** - Software Developer / Engineer
|
||||
- **Lead** - Tech Lead / Engineering Manager
|
||||
- **VP** - VP Engineering / Director / Executive
|
||||
|
||||
Your role helps me tailor examples to your perspective."
|
||||
|
||||
**Wait for response.**
|
||||
|
||||
**Validate response:**
|
||||
|
||||
- Must be one of: QA, Dev, Lead, VP (case-insensitive)
|
||||
- If invalid: "Please select one of the four options: QA, Dev, Lead, or VP"
|
||||
- Repeat until valid
|
||||
|
||||
**Store validated role for later update to progress file.**
|
||||
|
||||
### 3. Gather Experience Level
|
||||
|
||||
Ask:
|
||||
|
||||
"**What is your experience level with testing?**
|
||||
|
||||
Please select one:
|
||||
|
||||
- **Beginner** - New to testing, learning fundamentals
|
||||
- **Intermediate** - Have written tests, want to improve
|
||||
- **Experienced** - Strong testing background, want advanced techniques
|
||||
|
||||
Your experience level helps me adjust complexity and skip topics you already know."
|
||||
|
||||
**Wait for response.**
|
||||
|
||||
**Validate response:**
|
||||
|
||||
- Must be one of: Beginner, Intermediate, Experienced (case-insensitive)
|
||||
- If invalid: "Please select one of the three levels: Beginner, Intermediate, or Experienced"
|
||||
- Repeat until valid
|
||||
|
||||
**Store validated experience_level for later update to progress file.**
|
||||
|
||||
### 4. Gather Learning Goals
|
||||
|
||||
Ask:
|
||||
|
||||
"**What are your learning goals?**
|
||||
|
||||
Tell me what you want to achieve with TEA Academy. For example:
|
||||
|
||||
- Learn testing fundamentals from scratch
|
||||
- Understand TEA methodology and workflows
|
||||
- Improve test quality and reduce flakiness
|
||||
- Master advanced patterns (fixtures, network-first, etc.)
|
||||
- Prepare for QA onboarding at my company
|
||||
|
||||
**Your answer helps me recommend which sessions to focus on.**"
|
||||
|
||||
**Wait for response.**
|
||||
|
||||
**Validate response:**
|
||||
|
||||
- Must not be empty
|
||||
- Should be at least 10 characters
|
||||
- If too short: "Please provide more detail about your learning goals (at least a sentence)"
|
||||
- Repeat until valid
|
||||
|
||||
**Store learning_goals for later update to progress file.**
|
||||
|
||||
### 5. Gather Pain Points (Optional)
|
||||
|
||||
Ask:
|
||||
|
||||
"**What are your current pain points with testing?** _(Optional)_
|
||||
|
||||
For example:
|
||||
|
||||
- Flaky tests that fail randomly
|
||||
- Slow test suites
|
||||
- Hard to maintain tests
|
||||
- Don't know where to start
|
||||
- Team doesn't value testing
|
||||
|
||||
**This helps me provide targeted examples. You can skip this by typing 'skip' or 'none'.**"
|
||||
|
||||
**Wait for response.**
|
||||
|
||||
**Handle response:**
|
||||
|
||||
- If response is "skip", "none", or similar → Set pain_points to null
|
||||
- If response is provided → Store pain_points for later update
|
||||
- No validation needed (optional field)
|
||||
|
||||
### 6. Summarize Assessment
|
||||
|
||||
Display:
|
||||
|
||||
"✅ **Assessment Complete!**
|
||||
|
||||
Here's what I learned about you:
|
||||
|
||||
**Role:** {role}
|
||||
**Experience Level:** {experience_level}
|
||||
**Learning Goals:** {learning_goals}
|
||||
**Pain Points:** {pain_points or 'None specified'}
|
||||
|
||||
I'll use this to customize examples and recommendations throughout your learning journey."
|
||||
|
||||
### 7. Update Progress File
|
||||
|
||||
Load {progressFile} and update the following fields:
|
||||
|
||||
- `role: {role}`
|
||||
- `experience_level: {experience_level}`
|
||||
- `learning_goals: {learning_goals}`
|
||||
- `pain_points: {pain_points}` (or null if not provided)
|
||||
|
||||
Update stepsCompleted array:
|
||||
|
||||
- Append 'step-02-assess' to stepsCompleted array
|
||||
- Update lastStep: 'step-02-assess'
|
||||
|
||||
**Save the updated progress file.**
|
||||
|
||||
### 8. Provide Next Steps Preview
|
||||
|
||||
Display:
|
||||
|
||||
"**Next:** You'll see the session menu where you can choose from 7 learning sessions.
|
||||
|
||||
**Based on your experience level:**
|
||||
|
||||
{If beginner:}
|
||||
|
||||
- I recommend starting with Session 1 (Quick Start)
|
||||
- It introduces TEA with a hands-on example
|
||||
|
||||
{If intermediate:}
|
||||
|
||||
- You might want to skip to Session 3 (Architecture)
|
||||
- Or review Session 2 (Core Concepts) first if you want fundamentals
|
||||
|
||||
{If experienced:}
|
||||
|
||||
- Feel free to jump to Session 7 (Advanced Patterns)
|
||||
- Or pick specific sessions based on your goals
|
||||
|
||||
You can take sessions in any order and pause anytime!"
|
||||
|
||||
### 9. Proceed to Session Menu
|
||||
|
||||
After the assessment summary, proceed directly to the session menu:
|
||||
|
||||
- Load, read entire file, then execute {nextStepFile}
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- All required fields gathered (role, experience_level, learning_goals)
|
||||
- Optional pain_points handled correctly
|
||||
- All responses validated before proceeding
|
||||
- Progress file updated with assessment data
|
||||
- stepsCompleted array updated with 'step-02-assess'
|
||||
- Experience-based recommendations provided
|
||||
- User routed to session menu (step-03)
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping validation of required fields
|
||||
- Not updating progress file
|
||||
- Not adding to stepsCompleted array
|
||||
- Proceeding without waiting for user responses
|
||||
- Not providing experience-based recommendations
|
||||
- Hardcoding responses instead of asking user
|
||||
|
||||
**Master Rule:** Assessment must be complete and validated before proceeding to session menu.
|
||||
@@ -0,0 +1,219 @@
|
||||
---
|
||||
name: 'step-03-session-menu'
|
||||
description: 'Session selection hub - display all 7 sessions with completion status and route to selected session or completion'
|
||||
|
||||
progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
|
||||
session01File: './step-04-session-01.md'
|
||||
session02File: './step-04-session-02.md'
|
||||
session03File: './step-04-session-03.md'
|
||||
session04File: './step-04-session-04.md'
|
||||
session05File: './step-04-session-05.md'
|
||||
session06File: './step-04-session-06.md'
|
||||
session07File: './step-04-session-07.md'
|
||||
completionFile: './step-05-completion.md'
|
||||
---
|
||||
|
||||
# Step 3: Session Menu (Hub)
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To present all 7 learning sessions with completion status, allow non-linear session selection, and route to chosen session or completion. This is the central hub - all sessions return here.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a Master Test Architect and Teaching Guide
|
||||
- ✅ We engage in collaborative learning, not lectures
|
||||
- ✅ You bring expertise in TEA methodology and teaching pedagogy
|
||||
- ✅ Learner brings their role context, experience, and learning goals
|
||||
- ✅ Together we build their testing knowledge progressively
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on displaying sessions and routing
|
||||
- 🚫 FORBIDDEN to start teaching - that happens in session steps
|
||||
- 💬 Approach: Show progress, let learner choose their path
|
||||
- 🚪 This is the HUB - all sessions loop back here
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Load progress file to get session completion status
|
||||
- 💾 Display sessions with accurate indicators
|
||||
- 📖 Route to selected session or completion
|
||||
- 🚫 FORBIDDEN to skip progress check - status indicators critical
|
||||
- ⏭️ No stepsCompleted update (this is a routing hub, not a content step)
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Available context: Progress file with all session data
|
||||
- Focus: Display menu, route to selection
|
||||
- Limits: No teaching, no session execution
|
||||
- Dependencies: Progress file exists (created in step-01, updated in step-02)
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
||||
|
||||
### 1. Load Progress File
|
||||
|
||||
Read {progressFile} and extract:
|
||||
|
||||
- user
|
||||
- role
|
||||
- experience_level
|
||||
- sessions array (all 7 sessions with status, scores, dates)
|
||||
- sessions_completed
|
||||
- completion_percentage
|
||||
- next_recommended
|
||||
|
||||
### 2. Display Session Menu with Status
|
||||
|
||||
Display:
|
||||
|
||||
"🧪 **TEA Academy - Session Menu**
|
||||
|
||||
**Progress:** {completion_percentage}% ({sessions_completed} of 7 sessions completed)
|
||||
|
||||
---
|
||||
|
||||
### 📚 Available Sessions
|
||||
|
||||
{For each session in sessions array, display with status indicator:}
|
||||
|
||||
**Session 1: Quick Start (30 min)**
|
||||
{status_indicator} TEA Lite intro, run automate workflow
|
||||
{if completed: Score: {score}/100 | Completed: {completed_date}}
|
||||
{if in-progress: Started: {started_date}}
|
||||
|
||||
**Session 2: Core Concepts (45 min)**
|
||||
{status_indicator} Risk-based testing, DoD, testing philosophy
|
||||
{if completed: Score: {score}/100 | Completed: {completed_date}}
|
||||
{if in-progress: Started: {started_date}}
|
||||
|
||||
**Session 3: Architecture & Patterns (60 min)**
|
||||
{status_indicator} Fixtures, network patterns, framework setup
|
||||
{if completed: Score: {score}/100 | Completed: {completed_date}}
|
||||
{if in-progress: Started: {started_date}}
|
||||
|
||||
**Session 4: Test Design (60 min)**
|
||||
{status_indicator} Risk assessment, test design workflow
|
||||
{if completed: Score: {score}/100 | Completed: {completed_date}}
|
||||
{if in-progress: Started: {started_date}}
|
||||
|
||||
**Session 5: ATDD & Automate (60 min)**
|
||||
{status_indicator} ATDD + Automate workflows, TDD approach
|
||||
{if completed: Score: {score}/100 | Completed: {completed_date}}
|
||||
{if in-progress: Started: {started_date}}
|
||||
|
||||
**Session 6: Quality & Trace (45 min)**
|
||||
{status_indicator} Test review + Trace workflows, quality metrics
|
||||
{if completed: Score: {score}/100 | Completed: {completed_date}}
|
||||
{if in-progress: Started: {started_date}}
|
||||
|
||||
**Session 7: Advanced Patterns (ongoing)**
|
||||
{status_indicator} Menu-driven knowledge fragment exploration (35 fragments)
|
||||
{if completed: Score: {score}/100 | Completed: {completed_date}}
|
||||
{if in-progress: Started: {started_date}}
|
||||
|
||||
---
|
||||
|
||||
**Status Indicators:**
|
||||
|
||||
- ✅ = Completed
|
||||
- 🔄 = In Progress
|
||||
- ⬜ = Not Started
|
||||
|
||||
---
|
||||
|
||||
{If next_recommended exists:}
|
||||
💡 **Recommended Next:** {next_recommended}
|
||||
"
|
||||
|
||||
### 3. Check for Completion
|
||||
|
||||
**Before displaying menu options, check:**
|
||||
|
||||
If all 7 sessions have status 'completed' AND certificate_generated != true:
|
||||
|
||||
- Display: "🎉 **Congratulations!** You've completed all 7 sessions!"
|
||||
- Skip session menu options
|
||||
- Proceed directly to step 4b (route to completion)
|
||||
|
||||
**Otherwise:** Display session menu options in step 4a
|
||||
|
||||
### 4a. Present Session Menu Options (Sessions Remaining)
|
||||
|
||||
Display:
|
||||
|
||||
"**Select a session or exit:**
|
||||
|
||||
**[1-7]** Start or continue a session
|
||||
**[X]** Save progress and exit
|
||||
|
||||
What would you like to do?"
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- Route based on user selection
|
||||
- User can ask questions - always respond and redisplay menu
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF 1: Load, read entire file, then execute {session01File}
|
||||
- IF 2: Load, read entire file, then execute {session02File}
|
||||
- IF 3: Load, read entire file, then execute {session03File}
|
||||
- IF 4: Load, read entire file, then execute {session04File}
|
||||
- IF 5: Load, read entire file, then execute {session05File}
|
||||
- IF 6: Load, read entire file, then execute {session06File}
|
||||
- IF 7: Load, read entire file, then execute {session07File}
|
||||
- IF X: Display "Progress saved. See you next time! 👋" and END workflow
|
||||
- IF Any other: "Please select a session number (1-7) or X to exit", then [Redisplay Menu Options](#4a-present-session-menu-options-sessions-remaining)
|
||||
|
||||
### 4b. Route to Completion (All Sessions Done)
|
||||
|
||||
**If all 7 sessions completed:**
|
||||
|
||||
Display:
|
||||
|
||||
"**Proceeding to generate your completion certificate...**"
|
||||
|
||||
Load, read entire file, then execute {completionFile}
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Progress file loaded correctly
|
||||
- All 7 sessions displayed with accurate status indicators
|
||||
- Completion percentage calculated correctly
|
||||
- Session status matches progress file (✅ completed, 🔄 in-progress, ⬜ not-started)
|
||||
- User selection validated (1-7 or X)
|
||||
- Correct routing to selected session file
|
||||
- Completion detected when all 7 done
|
||||
- Exit option saves and ends workflow cleanly
|
||||
- No stepsCompleted update (this is routing hub, not content step)
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Not loading progress file
|
||||
- Wrong status indicators
|
||||
- Incorrect completion percentage
|
||||
- Not detecting when all sessions complete
|
||||
- Routing to wrong session file
|
||||
- Updating stepsCompleted (hub should not update this)
|
||||
- Not displaying session descriptions
|
||||
- Not allowing non-linear session selection
|
||||
|
||||
**Master Rule:** This is the central hub. Display accurate status, let learner choose freely, route correctly. All sessions return here.
|
||||
@@ -0,0 +1,460 @@
|
||||
---
|
||||
name: 'step-04-session-01'
|
||||
description: 'Session 1: Quick Start - TEA Lite intro, run automate workflow (30 min)'
|
||||
|
||||
progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
|
||||
sessionNotesTemplate: '../templates/session-notes-template.md'
|
||||
sessionNotesFile: '{test_artifacts}/tea-academy/{user_name}/session-01-notes.md'
|
||||
nextStepFile: './step-03-session-menu.md'
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# Step 4: Session 1 - Quick Start
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To provide immediate value through a 30-minute introduction to TEA Lite, run the automate workflow as a hands-on example, validate understanding through a quiz, and generate session notes.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate _unsolicited_ content without user input (session flow content is allowed once session begins)
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a Master Test Architect and Teaching Guide
|
||||
- ✅ We engage in collaborative learning, not lectures
|
||||
- ✅ You bring expertise in TEA methodology and teaching pedagogy
|
||||
- ✅ Learner brings their role context, experience, and learning goals
|
||||
- ✅ Together we build their testing knowledge progressively
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on Session 1 content (Quick Start)
|
||||
- 🚫 FORBIDDEN to skip ahead to other sessions
|
||||
- 💬 Approach: Teach concepts, provide examples, quiz understanding
|
||||
- 🚪 Teaching is mostly autonomous, quiz is collaborative
|
||||
- 📚 Reference TEA docs and provide URLs for further reading
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Load TEA docs just-in-time (not all at once)
|
||||
- 💾 Generate session notes after completion
|
||||
- 📖 Update progress file with session completion and score
|
||||
- 🚫 FORBIDDEN to skip quiz - validates understanding
|
||||
- ⏭️ Always return to session menu hub after completion
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Available context: Progress file with user role/experience
|
||||
- Focus: Session 1 - TEA Lite introduction
|
||||
- Limits: Only Session 1 content, don't preview other sessions
|
||||
- Dependencies: Progress file exists with assessment data
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
||||
|
||||
### 1. Session Welcome
|
||||
|
||||
Display:
|
||||
|
||||
"🧪 **Session 1: Quick Start** (30 minutes)
|
||||
|
||||
**Objective:** Get immediate value by seeing TEA in action
|
||||
|
||||
**What you'll learn:**
|
||||
|
||||
- What is TEA and why it exists
|
||||
- TEA Lite quick start approach
|
||||
- How to run your first TEA workflow (Automate)
|
||||
- TEA engagement models
|
||||
|
||||
Let's get started!"
|
||||
|
||||
### 2. Update Progress File (Session Started)
|
||||
|
||||
Load {progressFile} and update session-01-quickstart:
|
||||
|
||||
- Set `status: 'in-progress'`
|
||||
- Set `started_date: {current_date}`
|
||||
|
||||
Save the updated progress file.
|
||||
|
||||
### 3. Teaching: What is TEA?
|
||||
|
||||
Present this content (mostly autonomous, clear and educational):
|
||||
|
||||
"### 📖 What is TEA (Test Architecture Enterprise)?
|
||||
|
||||
TEA is a comprehensive test architecture framework that provides:
|
||||
|
||||
- **9 Workflows:** Teach Me Testing, Framework, Test Design, ATDD, Automate, Test Review, Trace, NFR Assessment, CI
|
||||
- **35 Knowledge Fragments:** Distilled expertise on patterns, best practices, Playwright Utils
|
||||
- **Quality Standards:** Definition of Done with execution limits (no flaky tests, no hard waits, etc.)
|
||||
- **Risk-Based Testing:** P0-P3 matrix for prioritizing test coverage
|
||||
|
||||
**Why TEA exists:**
|
||||
Testing knowledge doesn't scale through manual teaching. TEA makes testing expertise accessible through:
|
||||
|
||||
- Structured workflows that guide you step-by-step
|
||||
- Documentation (32 docs) organized by type (tutorials, how-to, explanation, reference)
|
||||
- Knowledge fragments for just-in-time learning
|
||||
- Online resources: <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/>
|
||||
|
||||
**TEA Engagement Models:**
|
||||
|
||||
1. **TEA Lite (30 min):** Quick start - run Automate workflow, generate tests
|
||||
2. **TEA Solo:** Use workflows individually as needed
|
||||
3. **TEA Integrated:** Full lifecycle - Framework → Test Design → ATDD/Automate → Review → Trace
|
||||
4. **TEA Enterprise:** Add NFR Assessment + CI integration for compliance
|
||||
5. **TEA Brownfield:** Adapt TEA for existing test suites
|
||||
|
||||
**Today we're experiencing TEA Lite!**"
|
||||
|
||||
### 4. Teaching: TEA Lite Quick Start
|
||||
|
||||
Present this content (adapt examples based on user role from progress file):
|
||||
|
||||
"### 🚀 TEA Lite: Your First Workflow
|
||||
|
||||
The **Automate workflow** generates tests for your application automatically.
|
||||
|
||||
**How it works:**
|
||||
|
||||
1. You describe what needs testing
|
||||
2. TEA analyzes your app structure
|
||||
3. Workflow generates test files with TEA best practices
|
||||
4. You review and run the tests
|
||||
|
||||
{If role == QA:}
|
||||
**For QA Engineers:** This helps you quickly expand test coverage without writing every test manually. Focus on test design, let TEA handle boilerplate.
|
||||
|
||||
{If role == Dev:}
|
||||
**For Developers:** This generates tests following best practices so you can focus on implementation. Tests are maintainable and follow fixture patterns.
|
||||
|
||||
{If role == Lead:}
|
||||
**For Tech Leads:** This standardizes test architecture across your team. Everyone writes tests the same way using TEA patterns.
|
||||
|
||||
{If role == VP:}
|
||||
**For VPs:** This scales testing across teams without manual training. New hires can generate quality tests from day one.
|
||||
|
||||
**Let me show you how the Automate workflow works conceptually:**
|
||||
|
||||
1. **Input:** You provide targets (features/pages to test)
|
||||
2. **TEA analyzes:** Understands your app structure
|
||||
3. **Test generation:** Creates API and/or E2E tests
|
||||
4. **Output:** Test files in your test suite with proper fixtures
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-automate/>
|
||||
|
||||
**Note:** We won't actually run the workflow now (you can do that on your project later), but you understand the concept."
|
||||
|
||||
### 5. Teaching: Key Concepts
|
||||
|
||||
Present this content:
|
||||
|
||||
"### 🎯 Key Concepts from Session 1
|
||||
|
||||
**1. TEA is a framework:** Not just docs, but executable workflows that guide you
|
||||
|
||||
**2. Risk-based testing:** Prioritize what matters (P0 critical, P3 nice-to-have)
|
||||
|
||||
**3. Quality standards:** Definition of Done ensures reliable tests
|
||||
|
||||
- No flaky tests
|
||||
- No hard waits/sleeps
|
||||
- Stateless & parallelizable
|
||||
- Self-cleaning tests
|
||||
|
||||
**4. Engagement models:** Choose how much TEA you need (Lite → Solo → Integrated → Enterprise → Brownfield)
|
||||
|
||||
**5. Knowledge fragments:** 35 fragments for deep-dive topics when you need them
|
||||
|
||||
- Testing patterns (fixtures, network-first, data factories)
|
||||
- Playwright Utils (api-request, network-recorder, recurse)
|
||||
- Configuration & governance (CI, feature flags, risk)
|
||||
|
||||
**You've now experienced TEA Lite! In future sessions, we'll go deeper.**"
|
||||
|
||||
### 6. Quiz: Validate Understanding
|
||||
|
||||
Display:
|
||||
|
||||
"### ✅ Quick Knowledge Check
|
||||
|
||||
Let me ask you 3 questions to validate your understanding. Passing score: ≥70% (2 of 3 correct)."
|
||||
|
||||
**Question 1:**
|
||||
|
||||
"**Question 1 of 3:**
|
||||
|
||||
What is the primary purpose of TEA?
|
||||
|
||||
A) Replace all testing tools with a single framework
|
||||
B) Make testing expertise accessible through structured workflows and knowledge
|
||||
C) Automate 100% of test writing
|
||||
D) Only works for Playwright tests
|
||||
|
||||
Your answer (A, B, C, or D):"
|
||||
|
||||
**Wait for response. Validate:**
|
||||
|
||||
- Correct answer: B
|
||||
- If correct: "✅ Correct! TEA makes testing expertise accessible and scalable."
|
||||
- If incorrect: "❌ Not quite. TEA's purpose is to make testing expertise accessible through structured workflows and knowledge (B). It's not about replacing tools or automating everything."
|
||||
|
||||
**Store result (1 point if correct, 0 if incorrect)**
|
||||
|
||||
**Question 2:**
|
||||
|
||||
"**Question 2 of 3:**
|
||||
|
||||
What does the P0-P3 risk matrix help with?
|
||||
|
||||
A) Prioritizing test coverage based on criticality
|
||||
B) Grading test code quality
|
||||
C) Measuring test execution speed
|
||||
D) Tracking bug severity
|
||||
|
||||
Your answer (A, B, C, or D):"
|
||||
|
||||
**Wait for response. Validate:**
|
||||
|
||||
- Correct answer: A
|
||||
- If correct: "✅ Correct! P0-P3 helps prioritize what to test based on risk and criticality."
|
||||
- If incorrect: "❌ The P0-P3 matrix is about prioritizing test coverage (A). P0 = critical features like login, P3 = nice-to-have like tooltips."
|
||||
|
||||
**Store result**
|
||||
|
||||
**Question 3:**
|
||||
|
||||
"**Question 3 of 3:**
|
||||
|
||||
Which TEA engagement model is best for quick value in 30 minutes?
|
||||
|
||||
A) TEA Enterprise
|
||||
B) TEA Lite
|
||||
C) TEA Integrated
|
||||
D) TEA Brownfield
|
||||
|
||||
Your answer (A, B, C, or D):"
|
||||
|
||||
**Wait for response. Validate:**
|
||||
|
||||
- Correct answer: B
|
||||
- If correct: "✅ Correct! TEA Lite is the 30-minute quick start approach."
|
||||
- If incorrect: "❌ TEA Lite (B) is the quick start approach. Enterprise and Integrated are more comprehensive."
|
||||
|
||||
**Store result**
|
||||
|
||||
**Calculate score:**
|
||||
|
||||
- Total points / 3 \* 100 = score (0-100)
|
||||
|
||||
**Display results:**
|
||||
|
||||
"**Quiz Results:** {score}/100
|
||||
|
||||
{If score >= 70:}
|
||||
✅ **Passed!** You've demonstrated understanding of Session 1 concepts.
|
||||
|
||||
{If score < 70:}
|
||||
⚠️ **Below passing threshold.** Would you like to:
|
||||
|
||||
- **[R]** Review the content again
|
||||
- **[C]** Continue anyway (your score will be recorded)
|
||||
|
||||
{Wait for response if < 70, handle R or C}"
|
||||
|
||||
### 7. Generate Session Notes
|
||||
|
||||
Create {sessionNotesFile} using {sessionNotesTemplate} with:
|
||||
|
||||
```markdown
|
||||
---
|
||||
session_id: session-01-quickstart
|
||||
session_name: 'Session 1: Quick Start'
|
||||
user: { user_name }
|
||||
role: { role }
|
||||
completed_date: { current_date }
|
||||
score: { score }
|
||||
duration: '30 min'
|
||||
---
|
||||
|
||||
# Session 1: Quick Start - Session Notes
|
||||
|
||||
**Learner:** {user_name} ({role})
|
||||
**Completed:** {current_date}
|
||||
**Score:** {score}/100
|
||||
**Duration:** 30 min
|
||||
|
||||
---
|
||||
|
||||
## Session Objectives
|
||||
|
||||
- Understand what TEA is and why it exists
|
||||
- Learn TEA Lite quick start approach
|
||||
- Conceptually understand the Automate workflow
|
||||
- Explore TEA engagement models
|
||||
|
||||
---
|
||||
|
||||
## Key Concepts Covered
|
||||
|
||||
1. **TEA Framework:** 9 workflows + 35 knowledge fragments + quality standards
|
||||
2. **Risk-Based Testing:** P0-P3 prioritization matrix
|
||||
3. **Quality Standards:** Definition of Done (no flaky tests, no hard waits, stateless, self-cleaning)
|
||||
4. **Engagement Models:** Lite, Solo, Integrated, Enterprise, Brownfield
|
||||
5. **Automate Workflow:** Generates tests automatically with TEA best practices
|
||||
|
||||
---
|
||||
|
||||
## TEA Resources Referenced
|
||||
|
||||
### Documentation
|
||||
|
||||
- TEA Overview: https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/explanation/tea-overview/
|
||||
- TEA Lite Quickstart: https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/tutorials/tea-lite-quickstart/
|
||||
- Automate Workflow: https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-automate/
|
||||
|
||||
### Knowledge Fragments
|
||||
|
||||
- (None used in this session - knowledge fragments explored in Session 7)
|
||||
|
||||
### Online Resources
|
||||
|
||||
- TEA Website: https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/
|
||||
- Knowledge Base: https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/reference/knowledge-base/
|
||||
|
||||
---
|
||||
|
||||
## Quiz Results
|
||||
|
||||
**Score:** {score}/100
|
||||
|
||||
### Questions & Answers
|
||||
|
||||
1. What is the primary purpose of TEA? → {user_answer} ({correct/incorrect})
|
||||
2. What does the P0-P3 risk matrix help with? → {user_answer} ({correct/incorrect})
|
||||
3. Which TEA engagement model is best for quick value? → {user_answer} ({correct/incorrect})
|
||||
|
||||
---
|
||||
|
||||
## Key Takeaways
|
||||
|
||||
- TEA makes testing expertise accessible at scale
|
||||
- Start with TEA Lite (30 min) for immediate value
|
||||
- Risk-based testing prioritizes what matters (P0 critical features first)
|
||||
- Quality standards ensure reliable, maintainable tests
|
||||
- 5 engagement models let you choose the right level of TEA adoption
|
||||
|
||||
---
|
||||
|
||||
## Next Recommended Session
|
||||
|
||||
{If experience_level == 'beginner':}
|
||||
**Session 2: Core Concepts** - Learn testing fundamentals and TEA principles
|
||||
|
||||
{If experience_level == 'intermediate':}
|
||||
**Session 2 or 3** - Review concepts or dive into architecture patterns
|
||||
|
||||
{If experience_level == 'experienced':}
|
||||
**Session 7: Advanced Patterns** - Explore 35 knowledge fragments
|
||||
|
||||
---
|
||||
|
||||
**Generated by:** TEA Academy - Teach Me Testing Workflow
|
||||
**Session Path:** Session 1 of 7
|
||||
```
|
||||
|
||||
### 8. Update Progress File (Session Complete)
|
||||
|
||||
Load {progressFile} and update session-01-quickstart:
|
||||
|
||||
- Set `status: 'completed'`
|
||||
- Set `completed_date: {current_date}`
|
||||
- Set `score: {score}`
|
||||
- Set `notes_artifact: '{sessionNotesFile}'`
|
||||
|
||||
Update progress metrics:
|
||||
|
||||
- If previous status for `session-01-quickstart` is not `completed`, increment `sessions_completed` by 1 (otherwise leave unchanged)
|
||||
- Calculate `completion_percentage: (sessions_completed / 7) * 100`
|
||||
- Set `next_recommended: 'session-02-concepts'`
|
||||
|
||||
Update stepsCompleted array:
|
||||
|
||||
- Append 'step-04-session-01' to stepsCompleted array
|
||||
- Update lastStep: 'step-04-session-01'
|
||||
|
||||
Save the updated progress file.
|
||||
|
||||
### 9. Session Complete Message
|
||||
|
||||
Display:
|
||||
|
||||
"🎉 **Session 1 Complete!**
|
||||
|
||||
**Your Score:** {score}/100
|
||||
|
||||
**Session notes saved:** {sessionNotesFile}
|
||||
|
||||
You've completed your first step in TEA Academy! You now understand what TEA is, how TEA Lite works, and the different engagement models.
|
||||
|
||||
**Next:** You'll return to the session menu where you can choose Session 2 or explore any other session.
|
||||
|
||||
**Progress:** {completion_percentage}% complete ({sessions_completed} of 7 sessions)"
|
||||
|
||||
### 10. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Session Menu
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to session menu when user selects 'C'
|
||||
- After other menu items execution, return to this menu
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
|
||||
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
|
||||
- IF C: Progress file already updated in step 8, then load, read entire file, then execute {nextStepFile}
|
||||
- IF Any other: help user, then [Redisplay Menu Options](#10-present-menu-options)
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Teaching content presented clearly
|
||||
- Examples adapted to user role
|
||||
- Quiz administered with 3 questions
|
||||
- Score calculated correctly (0-100)
|
||||
- Session notes generated with all required sections
|
||||
- Progress file updated (status: completed, score, notes_artifact)
|
||||
- stepsCompleted array updated with 'step-04-session-01'
|
||||
- Completion percentage recalculated
|
||||
- Next recommended session set
|
||||
- User routed back to session menu hub
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping quiz
|
||||
- Not adapting examples to user role
|
||||
- Not generating session notes
|
||||
- Not updating progress file
|
||||
- Not updating stepsCompleted array
|
||||
- Not calculating completion percentage
|
||||
- Not routing back to hub
|
||||
- Loading all docs at once (should be just-in-time)
|
||||
|
||||
**Master Rule:** Teach, quiz, generate notes, update progress, return to hub. This pattern repeats for all 7 sessions.
|
||||
@@ -0,0 +1,465 @@
|
||||
---
|
||||
name: 'step-04-session-02'
|
||||
description: 'Session 2: Core Concepts - Risk-based testing, DoD, testing philosophy (45 min)'
|
||||
|
||||
progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
|
||||
sessionNotesTemplate: '../templates/session-notes-template.md'
|
||||
sessionNotesFile: '{test_artifacts}/tea-academy/{user_name}/session-02-notes.md'
|
||||
nextStepFile: './step-03-session-menu.md'
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# Step 4: Session 2 - Core Concepts
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To teach testing fundamentals including risk-based testing, TEA quality standards (Definition of Done), and testing as engineering philosophy in a 45-minute session.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a Master Test Architect and Teaching Guide
|
||||
- ✅ We engage in collaborative learning, not lectures
|
||||
- ✅ You bring expertise in TEA methodology and teaching pedagogy
|
||||
- ✅ Learner brings their role context, experience, and learning goals
|
||||
- ✅ Together we build their testing knowledge progressively
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on Session 2 content (Core Concepts)
|
||||
- 🚫 FORBIDDEN to skip ahead to other sessions
|
||||
- 💬 Approach: Teach fundamentals, provide examples, quiz understanding
|
||||
- 🚪 Teaching is mostly autonomous, quiz is collaborative
|
||||
- 📚 Reference TEA docs and knowledge fragments
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Load TEA docs just-in-time
|
||||
- 💾 Generate session notes after completion
|
||||
- 📖 Update progress file with session completion and score
|
||||
- 🚫 FORBIDDEN to skip quiz - validates understanding
|
||||
- ⏭️ Always return to session menu hub after completion
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Available context: Progress file with user role/experience
|
||||
- Focus: Session 2 - Testing fundamentals and TEA principles
|
||||
- Limits: Only Session 2 content
|
||||
- Dependencies: Progress file exists with assessment data
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
||||
|
||||
### 1. Session Welcome
|
||||
|
||||
Display:
|
||||
|
||||
"🧪 **Session 2: Core Concepts** (45 minutes)
|
||||
|
||||
**Objective:** Understand WHY behind TEA principles
|
||||
|
||||
**What you'll learn:**
|
||||
|
||||
- Testing as Engineering philosophy
|
||||
- Risk-based testing with P0-P3 matrix
|
||||
- TEA Definition of Done (quality standards)
|
||||
- Probability × Impact risk scoring
|
||||
|
||||
Let's dive into the fundamentals!"
|
||||
|
||||
### 2. Update Progress File (Session Started)
|
||||
|
||||
Load {progressFile} and update session-02-concepts:
|
||||
|
||||
- Set `status: 'in-progress'`
|
||||
- Set `started_date: {current_date}`
|
||||
|
||||
Save the updated progress file.
|
||||
|
||||
### 3. Teaching: Testing as Engineering
|
||||
|
||||
Present this content:
|
||||
|
||||
"### 🏗️ Testing as Engineering
|
||||
|
||||
**Core Philosophy:** Testing is not an afterthought - it's engineering.
|
||||
|
||||
**What this means:**
|
||||
|
||||
- Tests are **designed** before they're written (like architecture before coding)
|
||||
- Tests have **quality standards** (not just "does it run?")
|
||||
- Tests are **maintained** like production code
|
||||
- Testing decisions are **risk-based** (prioritize what matters)
|
||||
|
||||
{If role == QA:}
|
||||
**For QA Engineers:** You're not just finding bugs - you're engineering test systems that scale. Design before write, maintain like production code.
|
||||
|
||||
{If role == Dev:}
|
||||
**For Developers:** Think of tests like you think of production code. Design patterns, refactoring, DRY principles - they all apply to tests.
|
||||
|
||||
{If role == Lead:}
|
||||
**For Tech Leads:** Testing as engineering means architecture decisions: fixture patterns, data strategies, CI orchestration. Not just "write more tests."
|
||||
|
||||
{If role == VP:}
|
||||
**For VPs:** Testing is an engineering discipline requiring investment in tooling, architecture, and knowledge. Not a checklist item.
|
||||
|
||||
**Key Principle:** If you wouldn't accept sloppy production code, don't accept sloppy test code.
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/explanation/testing-as-engineering/>"
|
||||
|
||||
### 4. Teaching: Risk-Based Testing
|
||||
|
||||
Present this content:
|
||||
|
||||
"### ⚖️ Risk-Based Testing: The P0-P3 Matrix
|
||||
|
||||
**Problem:** You can't test everything. How do you prioritize?
|
||||
|
||||
**Solution:** Risk = Probability × Impact
|
||||
|
||||
**The P0-P3 Matrix:**
|
||||
|
||||
**P0 - Critical (Must Test)**
|
||||
|
||||
- Login/Authentication
|
||||
- Payment processing
|
||||
- Data loss scenarios
|
||||
- Security vulnerabilities
|
||||
- **Impact:** Business fails if broken
|
||||
- **Probability:** High usage, high complexity
|
||||
|
||||
**P1 - High (Should Test)**
|
||||
|
||||
- Core user workflows
|
||||
- Key features
|
||||
- Data integrity
|
||||
- **Impact:** Major user pain
|
||||
- **Probability:** Frequent usage
|
||||
|
||||
**P2 - Medium (Nice to Test)**
|
||||
|
||||
- Secondary features
|
||||
- Edge cases with workarounds
|
||||
- **Impact:** Inconvenience
|
||||
- **Probability:** Moderate usage
|
||||
|
||||
**P3 - Low (Optional)**
|
||||
|
||||
- Tooltips, help text
|
||||
- Nice-to-have features
|
||||
- Aesthetic issues
|
||||
- **Impact:** Minimal
|
||||
- **Probability:** Low usage
|
||||
|
||||
{If role == QA:}
|
||||
**For QA Engineers:** Use P0-P3 to defend test coverage decisions. "We have 100% P0 coverage, 80% P1" is better than "we have 50% coverage overall."
|
||||
|
||||
{If role == Dev:}
|
||||
**For Developers:** When writing tests, ask "Is this P0 login or P3 tooltip?" Focus your time accordingly.
|
||||
|
||||
{If role == Lead:}
|
||||
**For Tech Leads:** P0-P3 helps allocate test automation budget. Mandate P0/P1 automation, P2/P3 is cost-benefit analysis.
|
||||
|
||||
{If role == VP:}
|
||||
**For VPs:** Risk-based testing aligns engineering effort with business impact. Metrics that matter: P0 coverage, not lines of code.
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/explanation/risk-based-testing/>
|
||||
|
||||
**Knowledge Fragment:** probability-impact.md defines scoring criteria"
|
||||
|
||||
### 5. Teaching: Definition of Done (Quality Standards)
|
||||
|
||||
Present this content:
|
||||
|
||||
"### ✅ TEA Definition of Done: Quality Standards
|
||||
|
||||
**The Problem:** "The tests pass" isn't enough. What about quality?
|
||||
|
||||
**TEA Definition of Done ensures:**
|
||||
|
||||
**1. No Flaky Tests**
|
||||
|
||||
- Tests pass/fail deterministically
|
||||
- No "run it again, it'll work" tests
|
||||
- Use explicit waits, not hard sleeps
|
||||
- Handle async properly
|
||||
|
||||
**2. No Hard Waits/Sleeps**
|
||||
|
||||
- Use `waitFor` conditions, not `sleep(5000)`
|
||||
- React to state changes, don't guess timing
|
||||
- Tests complete when ready, not after arbitrary delays
|
||||
|
||||
**3. Stateless & Parallelizable**
|
||||
|
||||
- Tests run independently, any order
|
||||
- No shared state between tests
|
||||
- Can run in parallel (fast feedback)
|
||||
- Use cron jobs/semaphores only when unavoidable
|
||||
|
||||
**4. No Order Dependency**
|
||||
|
||||
- Every `it`/`describe`/`context` block works in isolation
|
||||
- Supports `.only` execution for debugging
|
||||
- Tests don't depend on previous tests
|
||||
|
||||
**5. Self-Cleaning Tests**
|
||||
|
||||
- Test sets up its own data
|
||||
- Test automatically deletes/deactivates entities created
|
||||
- No manual cleanup required
|
||||
|
||||
**6. Tests Live Near Source Code**
|
||||
|
||||
- Co-locate test files with code they validate
|
||||
- `component.tsx` → `component.spec.tsx` in same folder
|
||||
|
||||
**7. Low Maintenance**
|
||||
|
||||
- Minimize manual upkeep
|
||||
- Avoid brittle selectors
|
||||
- Use APIs to set up state, not UI clicks
|
||||
- Don't repeat UI actions
|
||||
|
||||
{If role == QA:}
|
||||
**For QA Engineers:** These standards prevent the "test maintenance nightmare." Upfront investment in quality = long-term stability.
|
||||
|
||||
{If role == Dev:}
|
||||
**For Developers:** Write tests you'd want to inherit. No flaky tests, no "run twice" culture, no mystery failures.
|
||||
|
||||
{If role == Lead:}
|
||||
**For Tech Leads:** Enforce these standards in code review. Flaky test PRs don't merge. Period.
|
||||
|
||||
{If role == VP:}
|
||||
**For VPs:** Definition of Done isn't perfectionism - it's engineering rigor. Flaky tests erode trust in CI/CD.
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/explanation/test-quality-standards/>
|
||||
|
||||
**Knowledge Fragment:** test-quality.md has execution limits and criteria"
|
||||
|
||||
### 6. Teaching: Key Takeaways
|
||||
|
||||
Present this content:
|
||||
|
||||
"### 🎯 Session 2 Key Takeaways
|
||||
|
||||
**1. Testing is Engineering**
|
||||
|
||||
- Design before write
|
||||
- Maintain like production code
|
||||
- Apply engineering principles
|
||||
|
||||
**2. Risk-Based Testing**
|
||||
|
||||
- P0 = Critical (login, payment)
|
||||
- P1 = High (core workflows)
|
||||
- P2 = Medium (secondary features)
|
||||
- P3 = Low (tooltips, nice-to-have)
|
||||
- Prioritize based on Probability × Impact
|
||||
|
||||
**3. Definition of Done**
|
||||
|
||||
- No flaky tests (deterministic)
|
||||
- No hard waits (use waitFor)
|
||||
- Stateless & parallelizable
|
||||
- Self-cleaning tests
|
||||
- Low maintenance
|
||||
|
||||
**4. Quality Standards = Engineering Rigor**
|
||||
|
||||
- Not perfectionism, but reliability
|
||||
- Prevents test maintenance nightmares
|
||||
- Builds trust in CI/CD
|
||||
|
||||
**You now understand the WHY behind TEA principles!**"
|
||||
|
||||
### 7. Quiz: Validate Understanding
|
||||
|
||||
Display:
|
||||
|
||||
"### ✅ Knowledge Check
|
||||
|
||||
3 questions to validate your understanding. Passing: ≥70% (2 of 3 correct)."
|
||||
|
||||
**Question 1:**
|
||||
|
||||
"**Question 1 of 3:**
|
||||
|
||||
In the P0-P3 matrix, what priority level should login/authentication have?
|
||||
|
||||
A) P3 - Low priority
|
||||
B) P2 - Medium priority
|
||||
C) P1 - High priority
|
||||
D) P0 - Critical priority
|
||||
|
||||
Your answer (A, B, C, or D):"
|
||||
|
||||
**Wait for response. Validate:**
|
||||
|
||||
- Correct answer: D
|
||||
- If correct: "✅ Correct! Login/authentication is P0 - critical. Business fails if broken."
|
||||
- If incorrect: "❌ Login/authentication is P0 - Critical (D). It's high usage, high impact, and business-critical."
|
||||
|
||||
**Store result**
|
||||
|
||||
**Question 2:**
|
||||
|
||||
"**Question 2 of 3:**
|
||||
|
||||
What is the problem with using `sleep(5000)` instead of `waitFor` conditions?
|
||||
|
||||
A) It makes tests slower
|
||||
B) It's a hard wait that doesn't react to state changes (violates DoD)
|
||||
C) It uses too much memory
|
||||
D) It's not supported in modern frameworks
|
||||
|
||||
Your answer (A, B, C, or D):"
|
||||
|
||||
**Wait for response. Validate:**
|
||||
|
||||
- Correct answer: B
|
||||
- If correct: "✅ Correct! Hard waits don't react to state - they guess timing. Use `waitFor` to react to conditions."
|
||||
- If incorrect: "❌ The issue is that hard waits don't react to state changes (B). They guess timing instead of waiting for conditions. This violates TEA Definition of Done."
|
||||
|
||||
**Store result**
|
||||
|
||||
**Question 3:**
|
||||
|
||||
"**Question 3 of 3:**
|
||||
|
||||
What does "self-cleaning tests" mean in TEA Definition of Done?
|
||||
|
||||
A) Tests automatically fix their own bugs
|
||||
B) Tests delete/deactivate entities they create during testing
|
||||
C) Tests run faster by cleaning up code
|
||||
D) Tests remove old test files
|
||||
|
||||
Your answer (A, B, C, or D):"
|
||||
|
||||
**Wait for response. Validate:**
|
||||
|
||||
- Correct answer: B
|
||||
- If correct: "✅ Correct! Self-cleaning tests clean up their data - no manual cleanup needed."
|
||||
- If incorrect: "❌ Self-cleaning means tests delete/deactivate entities they created (B). No manual cleanup required."
|
||||
|
||||
**Store result**
|
||||
|
||||
**Calculate score:**
|
||||
|
||||
- Total points / 3 \* 100 = score (0-100)
|
||||
|
||||
**Display results:**
|
||||
|
||||
"**Quiz Results:** {score}/100
|
||||
|
||||
{If score >= 70:}
|
||||
✅ **Passed!** You understand core testing concepts.
|
||||
|
||||
{If score < 70:}
|
||||
⚠️ **Below passing.** Would you like to:
|
||||
|
||||
- **[R]** Review the content again
|
||||
- **[C]** Continue anyway (score will be recorded)
|
||||
|
||||
{Wait for response if < 70, handle R or C}"
|
||||
|
||||
### 8. Generate Session Notes
|
||||
|
||||
Create {sessionNotesFile} using {sessionNotesTemplate} with session-02 content including:
|
||||
|
||||
- Teaching topics covered
|
||||
- TEA docs referenced
|
||||
- Knowledge fragments referenced (test-quality.md, probability-impact.md)
|
||||
- Quiz results
|
||||
- Key takeaways
|
||||
- Next recommended session based on experience level
|
||||
|
||||
### 9. Update Progress File (Session Complete)
|
||||
|
||||
Load {progressFile} and update session-02-concepts:
|
||||
|
||||
- Set `status: 'completed'`
|
||||
- Set `completed_date: {current_date}`
|
||||
- Set `score: {score}`
|
||||
- Set `notes_artifact: '{sessionNotesFile}'`
|
||||
|
||||
Update progress metrics:
|
||||
|
||||
- Increment `sessions_completed` by 1
|
||||
- Calculate `completion_percentage`
|
||||
- Set `next_recommended: 'session-03-architecture'`
|
||||
|
||||
Update stepsCompleted array:
|
||||
|
||||
- Append 'step-04-session-02'
|
||||
- Update lastStep
|
||||
|
||||
Save the updated progress file.
|
||||
|
||||
### 10. Session Complete Message
|
||||
|
||||
Display:
|
||||
|
||||
"🎉 **Session 2 Complete!**
|
||||
|
||||
**Your Score:** {score}/100
|
||||
|
||||
**Session notes saved:** {sessionNotesFile}
|
||||
|
||||
You now understand:
|
||||
|
||||
- Testing as engineering philosophy
|
||||
- Risk-based testing (P0-P3 matrix)
|
||||
- TEA Definition of Done
|
||||
- Why quality standards matter
|
||||
|
||||
**Next:** Session 3 (Architecture & Patterns) or explore any session from the menu.
|
||||
|
||||
**Progress:** {completion_percentage}% complete ({sessions_completed} of 7 sessions)"
|
||||
|
||||
### 11. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Session Menu
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
|
||||
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
|
||||
- IF C: Progress file already updated, then load, read entire file, then execute {nextStepFile}
|
||||
- IF Any other: help user, then redisplay menu
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Teaching content presented (Testing as Engineering, Risk-based, DoD)
|
||||
- Examples adapted to user role
|
||||
- Quiz administered (3 questions)
|
||||
- Score calculated correctly
|
||||
- Session notes generated
|
||||
- Progress file updated
|
||||
- stepsCompleted array updated
|
||||
- User routed back to hub
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping quiz
|
||||
- Not adapting to role
|
||||
- Not generating notes
|
||||
- Not updating progress
|
||||
- Not routing to hub
|
||||
|
||||
**Master Rule:** Teach, quiz, generate notes, update progress, return to hub.
|
||||
@@ -0,0 +1,301 @@
|
||||
---
|
||||
name: 'step-04-session-03'
|
||||
description: 'Session 3: Architecture & Patterns - Fixtures, network patterns, framework setup (60 min)'
|
||||
|
||||
progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
|
||||
sessionNotesTemplate: '../templates/session-notes-template.md'
|
||||
sessionNotesFile: '{test_artifacts}/tea-academy/{user_name}/session-03-notes.md'
|
||||
nextStepFile: './step-03-session-menu.md'
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# Step 4: Session 3 - Architecture & Patterns
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To teach TEA architecture patterns including fixture composition, network-first patterns, and step-file architecture in a 60-minute session.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a Master Test Architect and Teaching Guide
|
||||
- ✅ We engage in collaborative learning, not lectures
|
||||
- ✅ You bring expertise in TEA methodology and teaching pedagogy
|
||||
- ✅ Learner brings their role context, experience, and learning goals
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on Session 3 content (Architecture & Patterns)
|
||||
- 🚫 FORBIDDEN to skip ahead to other sessions
|
||||
- 💬 Approach: Teach patterns, provide examples, quiz understanding
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Load TEA docs just-in-time
|
||||
- 💾 Generate session notes after completion
|
||||
- 📖 Update progress file with session completion and score
|
||||
- ⏭️ Return to session menu hub after completion
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Available context: Progress file with user role/experience
|
||||
- Focus: Session 3 - Architecture patterns
|
||||
- Dependencies: Progress file exists
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
**CRITICAL:** Follow this sequence exactly.
|
||||
|
||||
### 1. Session Welcome
|
||||
|
||||
"🧪 **Session 3: Architecture & Patterns** (60 minutes)
|
||||
|
||||
**Objective:** Understand TEA patterns and architecture
|
||||
|
||||
**What you'll learn:**
|
||||
|
||||
- Fixture architecture and composition
|
||||
- Network-first patterns
|
||||
- Data factories and test setup
|
||||
- Step-file architecture (the pattern this workflow uses!)
|
||||
|
||||
Let's explore TEA architecture!"
|
||||
|
||||
### 2. Update Progress (Started)
|
||||
|
||||
Load {progressFile}, update session-03-architecture:
|
||||
|
||||
- `status: 'in-progress'`
|
||||
- `started_date: {current_date}`
|
||||
|
||||
### 3. Teaching: Fixture Architecture
|
||||
|
||||
"### 🏗️ Fixture Architecture
|
||||
|
||||
**The Problem:** Tests have setup/teardown boilerplate everywhere.
|
||||
|
||||
**TEA Solution:** Composable fixtures
|
||||
|
||||
**Fixture Composition Pattern:**
|
||||
|
||||
```typescript
|
||||
// Base fixtures
|
||||
const baseFixtures = {
|
||||
page: async ({}, use) => {
|
||||
/* ... */
|
||||
},
|
||||
};
|
||||
|
||||
// Composed fixtures
|
||||
const authFixtures = {
|
||||
authenticatedPage: async ({ page }, use) => {
|
||||
await page.goto('/login');
|
||||
await login(page);
|
||||
await use(page);
|
||||
},
|
||||
};
|
||||
|
||||
// Merge and use
|
||||
test.use(mergeTests(baseFixtures, authFixtures));
|
||||
```
|
||||
|
||||
**Benefits:**
|
||||
|
||||
- DRY: Define once, use everywhere
|
||||
- Composable: Build complex fixtures from simple ones
|
||||
- Automatic cleanup: Fixtures handle teardown
|
||||
- Type-safe: Full TypeScript support
|
||||
|
||||
{Role-adapted example based on user role}
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/explanation/fixture-architecture/>
|
||||
**Knowledge Fragment:** fixture-architecture.md, fixtures-composition.md"
|
||||
|
||||
### 4. Teaching: Network-First Patterns
|
||||
|
||||
"### 🌐 Network-First Patterns
|
||||
|
||||
**The Problem:** Flaky tests due to network timing issues.
|
||||
|
||||
**TEA Solution:** Intercept and control network
|
||||
|
||||
**Network-First Pattern:**
|
||||
|
||||
```typescript
|
||||
// BEFORE the action, set up network interception
|
||||
await page.route('/api/users', (route) => {
|
||||
route.fulfill({ json: mockUsers });
|
||||
});
|
||||
|
||||
// THEN trigger the action
|
||||
await page.click('Load Users');
|
||||
|
||||
// Network is already mocked - no race condition
|
||||
```
|
||||
|
||||
**Why Network-First:**
|
||||
|
||||
- Prevents race conditions
|
||||
- Deterministic test behavior
|
||||
- Fast (no real API calls)
|
||||
- Control error scenarios
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/explanation/network-first-patterns/>
|
||||
**Knowledge Fragment:** network-first.md, intercept-network-call.md"
|
||||
|
||||
### 5. Teaching: Data Factories
|
||||
|
||||
"### 🏭 Data Factories
|
||||
|
||||
**The Problem:** Hard-coded test data everywhere.
|
||||
|
||||
**TEA Solution:** Factory functions
|
||||
|
||||
**Factory Pattern:**
|
||||
|
||||
```typescript
|
||||
function createUser(overrides = {}) {
|
||||
return {
|
||||
id: faker.uuid(),
|
||||
email: faker.email(),
|
||||
role: 'user',
|
||||
...overrides,
|
||||
};
|
||||
}
|
||||
|
||||
// Use in tests
|
||||
const admin = createUser({ role: 'admin' });
|
||||
const user = createUser(); // defaults
|
||||
```
|
||||
|
||||
**Benefits:**
|
||||
|
||||
- No hardcoded data
|
||||
- Easy to override fields
|
||||
- Consistent test data
|
||||
- Self-documenting
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Knowledge Fragment:** data-factories.md"
|
||||
|
||||
### 6. Teaching: Step-File Architecture
|
||||
|
||||
"### 📋 Step-File Architecture
|
||||
|
||||
**This workflow uses step-file architecture!**
|
||||
|
||||
**Pattern:**
|
||||
|
||||
- Micro-file design: Each step is self-contained
|
||||
- Just-in-time loading: Only current step in memory
|
||||
- Sequential enforcement: No skipping steps
|
||||
- State tracking: Progress saved between steps
|
||||
|
||||
**Why:**
|
||||
|
||||
- Disciplined execution
|
||||
- Clear progression
|
||||
- Resumable (continuable workflows)
|
||||
- Maintainable (one file per step)
|
||||
|
||||
**You're experiencing this right now:** Each session is a step file!
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/explanation/step-file-architecture/>"
|
||||
|
||||
### 7. Quiz (3 questions)
|
||||
|
||||
"### ✅ Knowledge Check"
|
||||
|
||||
**Q1:** "What is the main benefit of fixture composition?
|
||||
A) Faster test execution
|
||||
B) DRY - define once, reuse everywhere
|
||||
C) Better error messages
|
||||
D) Automatic screenshot capture"
|
||||
|
||||
Correct: B
|
||||
|
||||
**Q2:** "Why is 'network-first' better than mocking after the action?
|
||||
A) It's faster
|
||||
B) It prevents race conditions
|
||||
C) It uses less memory
|
||||
D) It's easier to write"
|
||||
|
||||
Correct: B
|
||||
|
||||
**Q3:** "What pattern does this teaching workflow use?
|
||||
A) Page Object Model
|
||||
B) Behavior Driven Development
|
||||
C) Step-File Architecture
|
||||
D) Test Pyramid"
|
||||
|
||||
Correct: C
|
||||
|
||||
Calculate score, handle <70% retry option.
|
||||
|
||||
### 8. Generate Session Notes
|
||||
|
||||
Create {sessionNotesFile} with:
|
||||
|
||||
- Session 3 content
|
||||
- Topics: Fixtures, network-first, data factories, step-file architecture
|
||||
- TEA docs referenced
|
||||
- Knowledge fragments: fixture-architecture.md, network-first.md, data-factories.md
|
||||
- Quiz results
|
||||
- Next recommended: session-04-test-design
|
||||
|
||||
### 9. Update Progress (Completed)
|
||||
|
||||
Update session-03-architecture:
|
||||
|
||||
- `status: 'completed'`
|
||||
- `completed_date: {current_date}`
|
||||
- `score: {score}`
|
||||
- `notes_artifact`
|
||||
|
||||
Increment sessions_completed, update completion_percentage.
|
||||
Append 'step-04-session-03' to stepsCompleted.
|
||||
|
||||
### 10. Complete Message
|
||||
|
||||
"🎉 **Session 3 Complete!** Score: {score}/100
|
||||
You understand TEA architecture patterns!
|
||||
Progress: {completion_percentage}%"
|
||||
|
||||
### 11. Menu
|
||||
|
||||
[A] Advanced Elicitation [P] Party Mode [C] Continue to Session Menu
|
||||
|
||||
Return to {nextStepFile}
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Architecture patterns taught
|
||||
- Quiz administered
|
||||
- Notes generated
|
||||
- Progress updated
|
||||
- Returned to hub
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping patterns
|
||||
- Not generating notes
|
||||
- Not updating progress
|
||||
|
||||
**Master Rule:** Teach patterns, quiz, update, return to hub.
|
||||
@@ -0,0 +1,234 @@
|
||||
---
|
||||
name: 'step-04-session-04'
|
||||
description: 'Session 4: Test Design - Risk assessment, test design workflow (60 min)'
|
||||
|
||||
progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
|
||||
sessionNotesTemplate: '../templates/session-notes-template.md'
|
||||
sessionNotesFile: '{test_artifacts}/tea-academy/{user_name}/session-04-notes.md'
|
||||
nextStepFile: './step-03-session-menu.md'
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# Step 4: Session 4 - Test Design
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To teach risk assessment and coverage planning using the TEA Test Design workflow in a 60-minute session.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a Master Test Architect and Teaching Guide
|
||||
- ✅ We engage in collaborative learning
|
||||
- ✅ You bring expertise in TEA methodology
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus on Session 4 (Test Design)
|
||||
- 💬 Teach workflow, provide examples
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Load docs just-in-time
|
||||
- 💾 Generate notes
|
||||
- 📖 Update progress
|
||||
- ⏭️ Return to hub
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Welcome
|
||||
|
||||
"🧪 **Session 4: Test Design** (60 minutes)
|
||||
|
||||
**Objective:** Learn risk assessment and coverage planning
|
||||
|
||||
**What you'll learn:**
|
||||
|
||||
- Test Design workflow
|
||||
- Risk/testability assessment
|
||||
- Coverage planning with test levels
|
||||
- Test priorities matrix
|
||||
|
||||
Let's plan some tests!"
|
||||
|
||||
### 2. Update Progress (Started)
|
||||
|
||||
Set session-04-test-design `status: 'in-progress'`, `started_date`.
|
||||
|
||||
### 3. Teaching: Test Design Workflow
|
||||
|
||||
"### 📐 Test Design Workflow
|
||||
|
||||
**Purpose:** Plan tests BEFORE writing them (design before code).
|
||||
|
||||
**Workflow Steps:**
|
||||
|
||||
1. **Load Context:** Understand feature/system
|
||||
2. **Risk/Testability Assessment:** Score probability × impact
|
||||
3. **Coverage Planning:** Determine what to test and how
|
||||
4. **Generate Test Design Document:** Blueprint for implementation
|
||||
|
||||
**When to Use:**
|
||||
|
||||
- New features (epic/system level)
|
||||
- Major refactors
|
||||
- Quality gate before development
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-test-design/>"
|
||||
|
||||
### 4. Teaching: Risk/Testability Assessment
|
||||
|
||||
"### ⚖️ Risk & Testability Assessment
|
||||
|
||||
**Risk Scoring:**
|
||||
|
||||
- **Probability:** How likely is this to fail? (Low/Medium/High)
|
||||
- **Impact:** What happens if it fails? (Low/Medium/High)
|
||||
- **Risk = Probability × Impact**
|
||||
|
||||
**Example: Login Feature**
|
||||
|
||||
- Probability: High (complex, authentication)
|
||||
- Impact: High (business critical)
|
||||
- **Risk: HIGH** → P0 priority
|
||||
|
||||
**Example: Tooltip Text**
|
||||
|
||||
- Probability: Low (simple rendering)
|
||||
- Impact: Low (aesthetic only)
|
||||
- **Risk: LOW** → P3 priority
|
||||
|
||||
**Testability:**
|
||||
|
||||
- Can we test this easily?
|
||||
- Are there dependencies blocking us?
|
||||
- Do we need test infrastructure first?
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Knowledge Fragments:** probability-impact.md, test-priorities-matrix.md"
|
||||
|
||||
### 5. Teaching: Coverage Planning
|
||||
|
||||
"### 📋 Coverage Planning
|
||||
|
||||
**Test Levels Framework:**
|
||||
|
||||
**Unit Tests:** Isolated functions/classes
|
||||
|
||||
- Fast, focused
|
||||
- No external dependencies
|
||||
- Example: Pure functions, business logic
|
||||
|
||||
**Integration Tests:** Multiple components together
|
||||
|
||||
- Database, API interactions
|
||||
- Example: Service layer with DB
|
||||
|
||||
**E2E Tests:** Full user workflows
|
||||
|
||||
- Browser automation
|
||||
- Example: Complete checkout flow
|
||||
|
||||
**Coverage Strategy:**
|
||||
|
||||
- **P0 features:** Unit + Integration + E2E (high confidence)
|
||||
- **P1 features:** Integration + E2E (good coverage)
|
||||
- **P2 features:** E2E or Integration (basic coverage)
|
||||
- **P3 features:** Manual or skip (low priority)
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Knowledge Fragment:** test-levels-framework.md
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/explanation/test-quality-standards/>"
|
||||
|
||||
### 6. Teaching: Test Priorities Matrix
|
||||
|
||||
"### 📊 Test Priorities Matrix
|
||||
|
||||
**P0-P3 Coverage Targets:**
|
||||
|
||||
| Priority | Unit | Integration | E2E | Manual |
|
||||
| -------- | ---- | ----------- | --- | ------ |
|
||||
| P0 | ✅ | ✅ | ✅ | ✅ |
|
||||
| P1 | ✅ | ✅ | ✅ | - |
|
||||
| P2 | - | ✅ | - | ✅ |
|
||||
| P3 | - | - | - | ✅ |
|
||||
|
||||
**Goal:** 100% P0, 80% P1, 50% P2, 20% P3
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Knowledge Fragment:** test-priorities-matrix.md"
|
||||
|
||||
### 7. Quiz (3 questions)
|
||||
|
||||
**Q1:** "What does the Test Design workflow help you do?
|
||||
A) Write tests faster
|
||||
B) Plan tests BEFORE writing them
|
||||
C) Run tests in parallel
|
||||
D) Debug test failures"
|
||||
|
||||
Correct: B
|
||||
|
||||
**Q2:** "How do you calculate risk?
|
||||
A) Probability + Impact
|
||||
B) Probability × Impact
|
||||
C) Probability - Impact
|
||||
D) Probability / Impact"
|
||||
|
||||
Correct: B
|
||||
|
||||
**Q3:** "For P0 features, which test levels should you use?
|
||||
A) Only E2E tests
|
||||
B) Only unit tests
|
||||
C) Unit + Integration + E2E (comprehensive)
|
||||
D) Manual testing only"
|
||||
|
||||
Correct: C
|
||||
|
||||
Calculate score, handle <70% retry.
|
||||
|
||||
### 8. Generate Session Notes
|
||||
|
||||
Create {sessionNotesFile} with Session 4 content, docs, fragments, quiz.
|
||||
|
||||
### 9. Update Progress (Completed)
|
||||
|
||||
Update session-04-test-design: completed, score, notes.
|
||||
Increment sessions_completed, update percentage.
|
||||
Append 'step-04-session-04' to stepsCompleted.
|
||||
Set next_recommended: 'session-05-atdd-automate'.
|
||||
|
||||
### 10. Complete Message
|
||||
|
||||
"🎉 **Session 4 Complete!** Score: {score}/100
|
||||
You can now plan tests using risk assessment!
|
||||
Progress: {completion_percentage}%"
|
||||
|
||||
### 11. Menu
|
||||
|
||||
[A] Advanced Elicitation [P] Party Mode [C] Continue to Session Menu
|
||||
|
||||
Return to {nextStepFile}.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SUCCESS METRICS
|
||||
|
||||
✅ Test Design workflow taught, quiz passed, notes generated, progress updated, returned to hub.
|
||||
|
||||
**Master Rule:** Teach planning, quiz, update, return.
|
||||
@@ -0,0 +1,234 @@
|
||||
---
|
||||
name: 'step-04-session-05'
|
||||
description: 'Session 5: ATDD & Automate - TDD red-green approach, generate tests (60 min)'
|
||||
|
||||
progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
|
||||
sessionNotesTemplate: '../templates/session-notes-template.md'
|
||||
sessionNotesFile: '{test_artifacts}/tea-academy/{user_name}/session-05-notes.md'
|
||||
nextStepFile: './step-03-session-menu.md'
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# Step 4: Session 5 - ATDD & Automate
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To teach ATDD (red-green TDD) and Automate workflows for test generation in a 60-minute session.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read complete step file before action
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In {communication_language}
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ Master Test Architect and Teaching Guide
|
||||
- ✅ Collaborative learning
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus on Session 5 (ATDD & Automate)
|
||||
- 💬 Teach TDD approach
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Load docs just-in-time
|
||||
- 💾 Generate notes
|
||||
- 📖 Update progress
|
||||
- ⏭️ Return to hub
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Welcome
|
||||
|
||||
"🧪 **Session 5: ATDD & Automate** (60 minutes)
|
||||
|
||||
**Objective:** Generate tests with TDD red-green approach
|
||||
|
||||
**What you'll learn:**
|
||||
|
||||
- ATDD workflow (failing tests first)
|
||||
- Automate workflow (expand coverage)
|
||||
- Component TDD
|
||||
- API testing patterns
|
||||
|
||||
Let's generate some tests!"
|
||||
|
||||
### 2. Update Progress (Started)
|
||||
|
||||
Load {progressFile} and update session-05-atdd-automate:
|
||||
|
||||
- Set `status: 'in-progress'`
|
||||
- Set `started_date: {current_date}` if not already set
|
||||
|
||||
Save the updated progress file.
|
||||
|
||||
### 3. Teaching: ATDD Workflow
|
||||
|
||||
"### 🔴 ATDD: Acceptance-Driven Test Development
|
||||
|
||||
**TDD Red Phase:** Write failing tests FIRST
|
||||
|
||||
**ATDD Workflow:**
|
||||
|
||||
1. **Preflight:** Check prerequisites
|
||||
2. **Test Strategy:** Define what to test
|
||||
3. **Generate FAILING Tests:** Red phase (tests fail because code doesn't exist yet)
|
||||
4. **Implement Code:** Green phase (make tests pass)
|
||||
|
||||
**Why Failing Tests First:**
|
||||
|
||||
- Validates tests actually test something
|
||||
- Prevents false positives
|
||||
- Drives implementation (tests define behavior)
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-atdd/>"
|
||||
|
||||
### 4. Teaching: Automate Workflow
|
||||
|
||||
"### 🤖 Automate: Expand Test Coverage
|
||||
|
||||
**Purpose:** Generate tests for existing features
|
||||
|
||||
**Automate Workflow:**
|
||||
|
||||
1. **Identify Targets:** What needs testing
|
||||
2. **Generate Tests:** API and/or E2E tests
|
||||
3. **Review & Run:** Tests should pass (code already exists)
|
||||
|
||||
**Difference from ATDD:**
|
||||
|
||||
- ATDD: Tests first, then code (red → green)
|
||||
- Automate: Code first, then tests (coverage expansion)
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-automate/>"
|
||||
|
||||
### 5. Teaching: Component TDD
|
||||
|
||||
"### 🔄 Component TDD Red-Green Loop
|
||||
|
||||
**Pattern:**
|
||||
|
||||
1. **Red:** Write failing test
|
||||
2. **Green:** Minimal code to pass
|
||||
3. **Refactor:** Improve code, tests stay green
|
||||
4. **Repeat:** Next requirement
|
||||
|
||||
**Example:**
|
||||
|
||||
```typescript
|
||||
// RED: Test fails (function doesn't exist)
|
||||
test('calculates total price', () => {
|
||||
expect(calculateTotal([10, 20])).toBe(30);
|
||||
});
|
||||
|
||||
// GREEN: Minimal implementation
|
||||
function calculateTotal(prices) {
|
||||
return prices.reduce((a, b) => a + b, 0);
|
||||
}
|
||||
|
||||
// REFACTOR: Add validation, tests still green
|
||||
```
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Knowledge Fragment:** component-tdd.md"
|
||||
|
||||
### 6. Teaching: API Testing Patterns
|
||||
|
||||
"### 🌐 API Testing Patterns
|
||||
|
||||
**Pure API Testing (no browser):**
|
||||
|
||||
- Fast execution
|
||||
- Test business logic
|
||||
- Validate responses
|
||||
- Schema validation
|
||||
|
||||
**Pattern:**
|
||||
|
||||
```typescript
|
||||
test('GET /users returns user list', async ({ request }) => {
|
||||
const response = await request.get('/api/users');
|
||||
expect(response.ok()).toBeTruthy();
|
||||
const users = await response.json();
|
||||
expect(users).toHaveLength(10);
|
||||
});
|
||||
```
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Knowledge Fragment:** api-testing-patterns.md, api-request.md"
|
||||
|
||||
### 7. Quiz (3 questions)
|
||||
|
||||
**Q1:** "What is the 'red' phase in TDD?
|
||||
A) Tests fail (code doesn't exist yet)
|
||||
B) Tests pass
|
||||
C) Code is refactored
|
||||
D) Tests are deleted"
|
||||
|
||||
Correct: A
|
||||
|
||||
**Q2:** "What's the difference between ATDD and Automate workflows?
|
||||
A) ATDD generates E2E, Automate generates API tests
|
||||
B) ATDD writes tests first (red phase), Automate tests existing code
|
||||
C) ATDD is faster than Automate
|
||||
D) They're the same workflow"
|
||||
|
||||
Correct: B
|
||||
|
||||
**Q3:** "Why use pure API tests without a browser?
|
||||
A) They look prettier
|
||||
B) They're easier to debug
|
||||
C) They're faster and test business logic directly
|
||||
D) They're required by TEA"
|
||||
|
||||
Correct: C
|
||||
|
||||
Calculate score, handle <70% retry.
|
||||
|
||||
### 8. Generate Session Notes
|
||||
|
||||
Create {sessionNotesFile} with Session 5 content:
|
||||
|
||||
- ATDD workflow (red-green TDD)
|
||||
- Automate workflow (coverage expansion)
|
||||
- Component TDD
|
||||
- API testing patterns
|
||||
- Docs: ATDD, Automate
|
||||
- Fragments: component-tdd.md, api-testing-patterns.md, api-request.md
|
||||
- Quiz results
|
||||
|
||||
### 9. Update Progress (Completed)
|
||||
|
||||
Update session-05-atdd-automate: completed, score, notes.
|
||||
Increment sessions_completed, update percentage.
|
||||
Append 'step-04-session-05' to stepsCompleted.
|
||||
Set next_recommended: 'session-06-quality-trace'.
|
||||
|
||||
### 10. Complete Message
|
||||
|
||||
"🎉 **Session 5 Complete!** Score: {score}/100
|
||||
You can now generate tests with ATDD and Automate!
|
||||
Progress: {completion_percentage}%"
|
||||
|
||||
### 11. Menu
|
||||
|
||||
[A] Advanced Elicitation [P] Party Mode [C] Continue to Session Menu
|
||||
|
||||
Return to {nextStepFile}.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SUCCESS METRICS
|
||||
|
||||
✅ ATDD and Automate taught, TDD explained, quiz passed, notes generated, progress updated, returned to hub.
|
||||
@@ -0,0 +1,209 @@
|
||||
---
|
||||
name: 'step-04-session-06'
|
||||
description: 'Session 6: Quality & Trace - Test review, traceability, quality metrics (45 min)'
|
||||
|
||||
progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
|
||||
sessionNotesTemplate: '../templates/session-notes-template.md'
|
||||
sessionNotesFile: '{test_artifacts}/tea-academy/{user_name}/session-06-notes.md'
|
||||
nextStepFile: './step-03-session-menu.md'
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# Step 4: Session 6 - Quality & Trace
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To teach test quality auditing and requirements traceability using Test Review and Trace workflows in a 45-minute session.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate _unsolicited_ content without user input (session flow content is allowed once session begins)
|
||||
- 📖 CRITICAL: Read complete step file before action
|
||||
- ✅ SPEAK OUTPUT In {communication_language}
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ Master Test Architect and Teaching Guide
|
||||
- ✅ Collaborative learning
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus on Session 6 (Quality & Trace)
|
||||
- 💬 Teach quality metrics
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Load docs just-in-time
|
||||
- 💾 Generate notes
|
||||
- 📖 Update progress
|
||||
- ⏭️ Return to hub
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Welcome
|
||||
|
||||
"🧪 **Session 6: Quality & Trace** (45 minutes)
|
||||
|
||||
**Objective:** Audit quality and ensure traceability
|
||||
|
||||
**What you'll learn:**
|
||||
|
||||
- Test Review workflow (quality scoring)
|
||||
- 5 dimensions of test quality
|
||||
- Trace workflow (requirements traceability)
|
||||
- Release gate decisions
|
||||
|
||||
Let's ensure quality!"
|
||||
|
||||
### 2. Update Progress (Started)
|
||||
|
||||
Set session-06-quality-trace `status: 'in-progress'`.
|
||||
|
||||
### 3. Teaching: Test Review Workflow
|
||||
|
||||
"### 🔍 Test Review Workflow
|
||||
|
||||
**Purpose:** Audit test quality with 0-100 scoring
|
||||
|
||||
**5 Dimensions of Quality:**
|
||||
|
||||
**1. Determinism (0-100)**
|
||||
|
||||
- Tests pass/fail consistently
|
||||
- No flakiness, no randomness
|
||||
- Proper async handling
|
||||
|
||||
**2. Isolation (0-100)**
|
||||
|
||||
- Tests run independently
|
||||
- No shared state
|
||||
- Parallelizable
|
||||
|
||||
**3. Assertions (0-100)**
|
||||
|
||||
- Correct checks for expected behavior
|
||||
- Meaningful assertions (not just presence)
|
||||
- Fails for the right reasons
|
||||
|
||||
**4. Structure (0-100)**
|
||||
|
||||
- Readable test code
|
||||
- Clear organization and naming
|
||||
- Minimal duplication
|
||||
|
||||
**5. Performance (0-100)**
|
||||
|
||||
- Test execution speed
|
||||
- Resource usage
|
||||
- Parallel efficiency
|
||||
|
||||
**Overall Score = Average of 5 dimensions**
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-test-review/>"
|
||||
|
||||
### 4. Teaching: Trace Workflow
|
||||
|
||||
"### 🔗 Trace Workflow: Requirements Traceability
|
||||
|
||||
**Purpose:** Map tests to requirements, make release gate decision
|
||||
|
||||
**Trace Workflow:**
|
||||
|
||||
1. **Load Context:** Understand acceptance criteria
|
||||
2. **Discover Tests:** Find all test files
|
||||
3. **Map Criteria:** Link tests to requirements
|
||||
4. **Analyze Gaps:** What's not tested?
|
||||
5. **Gate Decision:** GREEN (ship) or RED (block)
|
||||
|
||||
**Release Gate Logic:**
|
||||
|
||||
- **GREEN:** All P0/P1 criteria have tests, gaps are P2/P3
|
||||
- **YELLOW:** Some P1 gaps, assess risk
|
||||
- **RED:** P0 gaps exist, DO NOT SHIP
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-trace/>"
|
||||
|
||||
### 5. Teaching: Quality Metrics
|
||||
|
||||
"### 📊 Quality Metrics That Matter
|
||||
|
||||
**Track:**
|
||||
|
||||
- **P0/P1 Coverage %** (not total line coverage)
|
||||
- **Flakiness Rate** (flaky tests / total tests)
|
||||
- **Test Execution Time** (feedback loop speed)
|
||||
- **Determinism Score** (from Test Review)
|
||||
|
||||
**Don't Track (Vanity Metrics):**
|
||||
|
||||
- Total line coverage % (tells you nothing about risk)
|
||||
- Number of tests (quantity ≠ quality)
|
||||
- Test file count (irrelevant)
|
||||
|
||||
{Role-adapted example}
|
||||
|
||||
**Goal:** High P0/P1 coverage, zero flakiness, fast execution."
|
||||
|
||||
### 6. Quiz (3 questions)
|
||||
|
||||
**Q1:** "What are the 5 dimensions in Test Review workflow?
|
||||
A) Speed, cost, coverage, bugs, time
|
||||
B) Determinism, Isolation, Assertions, Structure, Performance
|
||||
C) Unit, integration, E2E, manual, exploratory
|
||||
D) P0, P1, P2, P3, P4"
|
||||
|
||||
Correct: B
|
||||
|
||||
**Q2:** "When should the Trace workflow gate decision be RED (block release)?
|
||||
A) Any test failures exist
|
||||
B) P0 gaps exist (critical requirements not tested)
|
||||
C) Code coverage is below 80%
|
||||
D) Tests are slow"
|
||||
|
||||
Correct: B
|
||||
|
||||
**Q3:** "Which metric matters most for quality?
|
||||
A) Total line coverage %
|
||||
B) Number of tests written
|
||||
C) P0/P1 coverage %
|
||||
D) Test file count"
|
||||
|
||||
Correct: C
|
||||
|
||||
Calculate score, handle <70% retry.
|
||||
|
||||
### 7. Generate Session Notes
|
||||
|
||||
Create {sessionNotesFile} with Session 6 content, Test Review + Trace workflows, quality metrics.
|
||||
|
||||
### 8. Update Progress (Completed)
|
||||
|
||||
Update session-06-quality-trace: completed, score, notes.
|
||||
Increment sessions_completed, update percentage.
|
||||
Append 'step-04-session-06' to stepsCompleted.
|
||||
Set next_recommended: 'session-07-advanced'.
|
||||
|
||||
### 9. Complete Message
|
||||
|
||||
"🎉 **Session 6 Complete!** Score: {score}/100
|
||||
You can now audit quality and ensure traceability!
|
||||
Progress: {completion_percentage}%"
|
||||
|
||||
### 10. Menu
|
||||
|
||||
[A] Advanced Elicitation [P] Party Mode [C] Continue to Session Menu
|
||||
|
||||
Return to {nextStepFile}.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SUCCESS METRICS
|
||||
|
||||
✅ Test Review and Trace taught, quality dimensions explained, quiz passed, notes generated, returned to hub.
|
||||
@@ -0,0 +1,212 @@
|
||||
---
|
||||
name: 'step-04-session-07'
|
||||
description: 'Session 7: Advanced Patterns - Menu-driven knowledge fragment exploration (ongoing)'
|
||||
|
||||
progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
|
||||
sessionNotesTemplate: '../templates/session-notes-template.md'
|
||||
sessionNotesFile: '{test_artifacts}/tea-academy/{user_name}/session-07-notes.md'
|
||||
nextStepFile: './step-03-session-menu.md'
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# Step 4: Session 7 - Advanced Patterns
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To provide menu-driven exploration of 35 TEA knowledge fragments organized by category, allowing deep-dive into specific advanced topics on-demand.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read complete step file before action
|
||||
- ✅ SPEAK OUTPUT In {communication_language}
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ Master Test Architect and Teaching Guide
|
||||
- ✅ Collaborative exploration
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus on Session 7 (Advanced Patterns exploration)
|
||||
- 💬 Menu-driven, user chooses topics
|
||||
- 📚 This session is ONGOING - users can explore multiple fragments
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Display fragment categories
|
||||
- 💾 Generate notes after exploration
|
||||
- 📖 Update progress when user exits
|
||||
- ⏭️ Return to hub when done
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Welcome
|
||||
|
||||
"🧪 **Session 7: Advanced Patterns** (Ongoing Exploration)
|
||||
|
||||
**Objective:** Deep-dive into 34 TEA knowledge fragments
|
||||
|
||||
**This session is different:**
|
||||
|
||||
- Menu-driven exploration (you choose topics)
|
||||
- Explore as many fragments as you want
|
||||
- Can revisit this session anytime
|
||||
- No quiz - this is reference learning
|
||||
|
||||
**35 Knowledge Fragments organized by category:**
|
||||
|
||||
Let's explore!"
|
||||
|
||||
### 2. Update Progress (Started)
|
||||
|
||||
Set session-07-advanced `status: 'in-progress'` (only first time).
|
||||
|
||||
### 3. Display Knowledge Fragment Categories
|
||||
|
||||
"### 📚 Knowledge Fragment Categories
|
||||
|
||||
**1. Testing Patterns (9 fragments)**
|
||||
|
||||
- fixture-architecture.md - Composable fixture patterns
|
||||
- fixtures-composition.md - mergeTests composition patterns
|
||||
- network-first.md - Network interception safeguards
|
||||
- data-factories.md - Data seeding & setup
|
||||
- component-tdd.md - TDD red-green loop
|
||||
- api-testing-patterns.md - Pure API testing
|
||||
- test-healing-patterns.md - Auto-fix common failures
|
||||
- selector-resilience.md - Robust selectors
|
||||
- timing-debugging.md - Race condition fixes
|
||||
|
||||
**2. Playwright Utils (11 fragments)**
|
||||
|
||||
- overview.md - Playwright Utils overview
|
||||
- api-request.md - Typed HTTP client
|
||||
- network-recorder.md - HAR record/playback
|
||||
- intercept-network-call.md - Network spy/stub
|
||||
- recurse.md - Async polling
|
||||
- log.md - Report logging
|
||||
- file-utils.md - CSV/XLSX/PDF validation
|
||||
- burn-in.md - Smart test selection
|
||||
- network-error-monitor.md - HTTP error detection
|
||||
- contract-testing.md - Pact integration
|
||||
- visual-debugging.md - Trace viewer workflows
|
||||
|
||||
**3. Configuration & Governance (6 fragments)**
|
||||
|
||||
- playwright-config.md - Environment & timeout guardrails
|
||||
- ci-burn-in.md - CI orchestration
|
||||
- selective-testing.md - Tag/grep filters
|
||||
- feature-flags.md - Governance & cleanup
|
||||
- risk-governance.md - Scoring matrix & gates
|
||||
- adr-quality-readiness-checklist.md - Quality readiness checklist
|
||||
|
||||
**4. Quality Frameworks (5 fragments)**
|
||||
|
||||
- test-quality.md - DoD execution limits
|
||||
- test-levels-framework.md - Unit/Integration/E2E
|
||||
- test-priorities-matrix.md - P0-P3 coverage targets
|
||||
- probability-impact.md - Probability × impact scoring
|
||||
- nfr-criteria.md - NFR assessment definitions
|
||||
|
||||
**5. Authentication & Security (3 fragments)**
|
||||
|
||||
- email-auth.md - Magic link extraction
|
||||
- auth-session.md - Token persistence
|
||||
- error-handling.md - Exception handling
|
||||
|
||||
**GitHub Repository:** <https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/tree/main/src/testarch/knowledge>
|
||||
|
||||
**Select a category (1-5) or specific fragment to explore, or [X] to finish:**"
|
||||
|
||||
### 4. Fragment Exploration Loop
|
||||
|
||||
**Wait for user selection.**
|
||||
|
||||
**Handle selection:**
|
||||
|
||||
- **IF 1-5 (category):** Display all fragments in that category with descriptions, ask which fragment to explore
|
||||
- **IF specific fragment name:** Load and present that fragment's content
|
||||
- **IF X:** Proceed to step 5 (complete session)
|
||||
- **IF Any other:** Help user, redisplay categories
|
||||
|
||||
**For each fragment explored:**
|
||||
|
||||
1. Present the fragment's key concepts
|
||||
2. Provide role-adapted examples
|
||||
3. Link to GitHub source
|
||||
4. Ask: "Explore another fragment? [Y/N/X to finish]"
|
||||
5. If Y: Redisplay categories
|
||||
6. If N or X: Proceed to completion
|
||||
|
||||
**Track fragments explored** (for session notes).
|
||||
|
||||
### 5. Session Summary
|
||||
|
||||
After user selects X (finish exploration):
|
||||
|
||||
"### 🎯 Session 7 Summary
|
||||
|
||||
**Fragments Explored:** {count}
|
||||
|
||||
{List each fragment explored}
|
||||
|
||||
**Key Takeaways:**
|
||||
{Summarize insights from explored fragments}
|
||||
|
||||
**Remember:** You can return to Session 7 anytime to explore more fragments!
|
||||
|
||||
**GitHub Knowledge Base:** <https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/tree/main/src/testarch/knowledge>"
|
||||
|
||||
### 6. Generate Session Notes
|
||||
|
||||
Create {sessionNotesFile} with:
|
||||
|
||||
- Session 7 content
|
||||
- List of fragments explored
|
||||
- Key insights from each
|
||||
- GitHub links
|
||||
- No quiz (exploratory session)
|
||||
- Score: 100 (completion based, not quiz based)
|
||||
|
||||
### 7. Update Progress (Completed)
|
||||
|
||||
Update session-07-advanced: completed, score: 100, notes.
|
||||
Increment sessions_completed, update percentage.
|
||||
Append 'step-04-session-07' to stepsCompleted.
|
||||
|
||||
**Check completion:**
|
||||
|
||||
- If sessions_completed == 7: Set next_recommended: 'completion'
|
||||
- Otherwise: Recommend next incomplete session
|
||||
|
||||
### 8. Complete Message
|
||||
|
||||
"🎉 **Session 7 Complete!**
|
||||
|
||||
**Fragments Explored:** {count}
|
||||
|
||||
{If sessions_completed == 7:}
|
||||
🏆 **Congratulations!** You've completed ALL 7 sessions!
|
||||
Your completion certificate will be generated when you return to the menu.
|
||||
|
||||
{Otherwise:}
|
||||
**Progress:** {completion_percentage}% complete ({sessions_completed} of 7 sessions)
|
||||
You can return to Session 7 anytime to explore more fragments!"
|
||||
|
||||
### 9. Menu
|
||||
|
||||
[A] Advanced Elicitation [P] Party Mode [C] Continue to Session Menu
|
||||
|
||||
Return to {nextStepFile}.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SUCCESS METRICS
|
||||
|
||||
✅ Fragment categories displayed, user explored chosen fragments, notes generated with exploration summary, progress updated, returned to hub.
|
||||
|
||||
**Master Rule:** This session is exploratory and repeatable. User drives exploration, workflow facilitates.
|
||||
@@ -0,0 +1,339 @@
|
||||
---
|
||||
name: 'step-05-completion'
|
||||
description: 'Generate completion certificate, final progress update, congratulate learner'
|
||||
|
||||
progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
|
||||
certificateTemplate: '../templates/certificate-template.md'
|
||||
certificateFile: '{test_artifacts}/tea-academy/{user_name}/tea-completion-certificate.md'
|
||||
---
|
||||
|
||||
# Step 5: Completion & Certificate Generation
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To generate the TEA Academy completion certificate, update final progress, and congratulate the learner on completing all 7 sessions.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read complete step file before action
|
||||
- ✅ SPEAK OUTPUT In {communication_language}
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ Master Test Architect and Teaching Guide
|
||||
- ✅ Celebrating completion
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus on completion and celebration
|
||||
- 🚫 FORBIDDEN to proceed without verifying all 7 sessions complete
|
||||
- 💬 Approach: Congratulate, generate certificate, inspire next steps
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Verify all sessions complete
|
||||
- 💾 Generate completion certificate
|
||||
- 📖 Final progress update
|
||||
- 🎉 This is the final step - no next step
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Available context: Progress file with all 7 sessions completed
|
||||
- Focus: Certificate generation and celebration
|
||||
- Dependencies: All 7 sessions must be complete
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Verify All Sessions Complete
|
||||
|
||||
Load {progressFile} and check:
|
||||
|
||||
- All 7 sessions have `status: 'completed'`
|
||||
- All 7 sessions have scores
|
||||
- sessions_completed == 7
|
||||
|
||||
**If any session NOT complete:**
|
||||
|
||||
Display:
|
||||
|
||||
"⚠️ **Not all sessions complete!**
|
||||
|
||||
You still have {7 - sessions_completed} sessions remaining.
|
||||
|
||||
Please return to the session menu to complete the remaining sessions before generating your certificate."
|
||||
|
||||
**THEN:** Stop and do not proceed. This is an error state.
|
||||
|
||||
---
|
||||
|
||||
**If all 7 sessions complete:** Proceed to step 2.
|
||||
|
||||
### 2. Calculate Final Metrics
|
||||
|
||||
From progress file, calculate:
|
||||
|
||||
**Average Score:**
|
||||
|
||||
- Sum all 7 session scores
|
||||
- Divide by 7
|
||||
- Round to nearest integer
|
||||
|
||||
**Total Duration:**
|
||||
|
||||
- Calculate days between started_date and current_date
|
||||
- Format as "{N} days" or "{N} weeks"
|
||||
|
||||
**Individual Session Scores:**
|
||||
|
||||
- Extract score for each session (session-01 through session-07)
|
||||
|
||||
### 3. Congratulations Message
|
||||
|
||||
Display:
|
||||
|
||||
"🏆 **CONGRATULATIONS, {user_name}!**
|
||||
|
||||
You've completed all 7 sessions of TEA Academy!
|
||||
|
||||
**Your Achievement:**
|
||||
|
||||
- **Started:** {started_date}
|
||||
- **Completed:** {current_date}
|
||||
- **Duration:** {total_duration}
|
||||
- **Average Score:** {average_score}/100
|
||||
- **Sessions Completed:** 7 of 7 (100%)
|
||||
|
||||
**Session Scores:**
|
||||
|
||||
- Session 1 (Quick Start): {session_01_score}/100
|
||||
- Session 2 (Core Concepts): {session_02_score}/100
|
||||
- Session 3 (Architecture): {session_03_score}/100
|
||||
- Session 4 (Test Design): {session_04_score}/100
|
||||
- Session 5 (ATDD & Automate): {session_05_score}/100
|
||||
- Session 6 (Quality & Trace): {session_06_score}/100
|
||||
- Session 7 (Advanced Patterns): {session_07_score}/100
|
||||
|
||||
Generating your completion certificate..."
|
||||
|
||||
### 4. Generate Completion Certificate
|
||||
|
||||
Load {certificateTemplate} and create {certificateFile} with:
|
||||
|
||||
```markdown
|
||||
---
|
||||
certificate_type: tea-academy-completion
|
||||
user: { user_name }
|
||||
role: { role }
|
||||
completion_date: { current_date }
|
||||
started_date: { started_date }
|
||||
total_duration: { total_duration }
|
||||
average_score: { average_score }
|
||||
---
|
||||
|
||||
# 🏆 TEA Academy Completion Certificate
|
||||
|
||||
---
|
||||
|
||||
## Certificate of Completion
|
||||
|
||||
**This certifies that**
|
||||
|
||||
# {user_name}
|
||||
|
||||
**has successfully completed the TEA Academy testing curriculum**
|
||||
|
||||
---
|
||||
|
||||
### Program Details
|
||||
|
||||
**Role:** {role}
|
||||
**Started:** {started_date}
|
||||
**Completed:** {current_date}
|
||||
**Total Duration:** {total_duration}
|
||||
**Average Score:** {average_score}/100
|
||||
|
||||
---
|
||||
|
||||
### Sessions Completed
|
||||
|
||||
✅ **Session 1:** Quick Start (30 min) - Score: {session_01_score}/100
|
||||
✅ **Session 2:** Core Concepts (45 min) - Score: {session_02_score}/100
|
||||
✅ **Session 3:** Architecture & Patterns (60 min) - Score: {session_03_score}/100
|
||||
✅ **Session 4:** Test Design (60 min) - Score: {session_04_score}/100
|
||||
✅ **Session 5:** ATDD & Automate (60 min) - Score: {session_05_score}/100
|
||||
✅ **Session 6:** Quality & Trace (45 min) - Score: {session_06_score}/100
|
||||
✅ **Session 7:** Advanced Patterns (ongoing) - Score: {session_07_score}/100
|
||||
|
||||
---
|
||||
|
||||
### Skills Acquired
|
||||
|
||||
{user_name} has demonstrated proficiency in:
|
||||
|
||||
- ✅ **Testing Fundamentals:** Risk-based testing, test pyramid, test types, P0-P3 prioritization
|
||||
- ✅ **TEA Methodology:** 9 workflows (Teach Me Testing, Framework, Test Design, ATDD, Automate, Test Review, Trace, NFR, CI)
|
||||
- ✅ **Architecture Patterns:** Fixture composition, network-first patterns, data factories, step-file architecture
|
||||
- ✅ **Test Design:** Risk assessment (Probability × Impact), coverage planning, test levels framework
|
||||
- ✅ **Test Development:** ATDD red-green TDD approach, test automation, API testing patterns
|
||||
- ✅ **Quality Assurance:** Test review (5 dimensions), traceability, release gates, quality metrics
|
||||
- ✅ **Advanced Techniques:** Knowledge fragments explored, Playwright Utils integration
|
||||
|
||||
---
|
||||
|
||||
### Learning Artifacts
|
||||
|
||||
All session notes and progress tracking available at:
|
||||
`{test_artifacts}/tea-academy/{user_name}/`
|
||||
|
||||
**Session Notes:**
|
||||
|
||||
- session-01-notes.md - Quick Start
|
||||
- session-02-notes.md - Core Concepts
|
||||
- session-03-notes.md - Architecture & Patterns
|
||||
- session-04-notes.md - Test Design
|
||||
- session-05-notes.md - ATDD & Automate
|
||||
- session-06-notes.md - Quality & Trace
|
||||
- session-07-notes.md - Advanced Patterns
|
||||
|
||||
**Progress File:**
|
||||
`{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml`
|
||||
|
||||
---
|
||||
|
||||
### Next Steps
|
||||
|
||||
**Recommended Actions:**
|
||||
|
||||
1. **Apply TEA to your project:** Start with Framework setup workflow
|
||||
2. **Run TEA workflows:** Test Design → ATDD/Automate → Test Review
|
||||
3. **Share knowledge:** Help team members through TEA Academy
|
||||
4. **Explore knowledge fragments:** 35 fragments for just-in-time learning
|
||||
5. **Contribute improvements:** Share feedback on TEA methodology
|
||||
|
||||
**TEA Resources:**
|
||||
|
||||
- **Documentation:** https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/
|
||||
- **Knowledge Base:** https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/reference/knowledge-base/
|
||||
- **GitHub Fragments:** https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/tree/main/src/testarch/knowledge
|
||||
|
||||
---
|
||||
|
||||
**Generated by:** TEA Academy - Teach Me Testing Workflow
|
||||
**Module:** Test Architecture Enterprise (TEA)
|
||||
**Completion Date:** {current_date}
|
||||
|
||||
---
|
||||
|
||||
🧪 **Master Test Architect and Quality Advisor**
|
||||
```
|
||||
|
||||
Save certificate to {certificateFile}.
|
||||
|
||||
### 5. Update Progress File (Final)
|
||||
|
||||
Load {progressFile} and make final updates:
|
||||
|
||||
**Update session-07 (if not already):**
|
||||
|
||||
- `status: 'completed'`
|
||||
- `completed_date: {current_date}`
|
||||
- `score: 100` (exploratory session, completion based)
|
||||
- `notes_artifact: '{sessionNotesFile}'`
|
||||
|
||||
**Update completion fields:**
|
||||
|
||||
- `sessions_completed: 7`
|
||||
- `completion_percentage: 100`
|
||||
- `certificate_generated: true`
|
||||
- `certificate_path: '{certificateFile}'`
|
||||
- `completion_date: {current_date}`
|
||||
|
||||
**Update stepsCompleted:**
|
||||
|
||||
- Append 'step-04-session-07' (if session 7 just completed)
|
||||
- Append 'step-05-completion'
|
||||
- Update lastStep: 'step-05-completion'
|
||||
|
||||
Save final progress file.
|
||||
|
||||
### 6. Display Certificate
|
||||
|
||||
Display the complete certificate content to the user.
|
||||
|
||||
### 7. Final Celebration
|
||||
|
||||
Display:
|
||||
|
||||
"🎉 **CONGRATULATIONS, {user_name}!** 🎉
|
||||
|
||||
You've successfully completed the entire TEA Academy curriculum!
|
||||
|
||||
**Your Achievement:**
|
||||
|
||||
- ✅ 7 sessions completed
|
||||
- ✅ Average score: {average_score}/100
|
||||
- ✅ {total_duration} of dedicated learning
|
||||
- ✅ Certificate generated
|
||||
|
||||
**All Your Artifacts:**
|
||||
|
||||
- **Certificate:** {certificateFile}
|
||||
- **Progress:** {progressFile}
|
||||
- **Session Notes:** {test_artifacts}/tea-academy/{user_name}/
|
||||
|
||||
**You're now equipped to:**
|
||||
|
||||
- Write high-quality tests following TEA principles
|
||||
- Use all 9 TEA workflows effectively
|
||||
- Apply risk-based testing (P0-P3 prioritization)
|
||||
- Implement architecture patterns (fixtures, network-first)
|
||||
- Maintain quality through Test Review and Trace
|
||||
- Explore 35 knowledge fragments as needed
|
||||
|
||||
**Next Steps:**
|
||||
|
||||
1. Apply TEA to your current project
|
||||
2. Share this workflow with your team
|
||||
3. Help onboard new team members
|
||||
4. Continue learning through knowledge fragments
|
||||
|
||||
**Thank you for investing in testing excellence!** 🧪
|
||||
|
||||
---
|
||||
|
||||
**TEA Academy - Mission Accomplished** ✅"
|
||||
|
||||
### 8. Workflow Complete
|
||||
|
||||
**This is the final step - no menu, no next step.**
|
||||
|
||||
Workflow ends here. User can run the workflow again to re-take sessions or explore more fragments.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- All 7 sessions verified complete before certificate generation
|
||||
- Average score calculated correctly
|
||||
- Certificate generated with all session data
|
||||
- Certificate saved to file
|
||||
- Progress file updated with completion status
|
||||
- Final celebration message displayed
|
||||
- All artifacts paths provided to user
|
||||
- Workflow completes successfully
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Generating certificate without verifying all sessions complete
|
||||
- Incorrect average score calculation
|
||||
- Missing session data in certificate
|
||||
- Not updating progress file with completion status
|
||||
- Not providing artifact paths to user
|
||||
- Proceeding to next step (this is final - no next step)
|
||||
|
||||
**Master Rule:** Verify completion, generate certificate, celebrate achievement, end workflow. This is the finale.
|
||||
Reference in New Issue
Block a user