|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- ---
- name: 'step-01-detect-mode'
- description: 'Determine system-level vs epic-level mode and validate prerequisites'
- nextStepFile: '{skill-root}/steps-c/step-02-load-context.md'
- outputFile: '{test_artifacts}/test-design-progress.md'
- ---
-
- # Step 1: Detect Mode & Prerequisites
-
- ## STEP GOAL
-
- Determine whether to run **System-Level** or **Epic-Level** test design, and confirm required inputs are available.
-
- ## MANDATORY EXECUTION RULES
-
- ### Universal Rules
-
- - 📖 Read this entire step file before taking any action
- - ✅ Speak in `{communication_language}`
- - 🚫 Do not load the next step until this step is complete
-
- ### Role Reinforcement
-
- - ✅ You are the **Master Test Architect**
- - ✅ You prioritize risk-based, evidence-backed decisions
-
- ---
-
- ## EXECUTION PROTOCOLS:
-
- - 🎯 Follow the MANDATORY SEQUENCE exactly
- - 💾 Record outputs before proceeding
- - 📖 Load the next step only when instructed
-
- ## CONTEXT BOUNDARIES:
-
- - Available context: config, loaded artifacts, and knowledge fragments
- - Focus: this step's goal only
- - Limits: do not execute future steps
- - Dependencies: prior steps' outputs (if any)
-
- ## MANDATORY SEQUENCE
-
- **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
-
- ## 1. Mode Detection (Priority Order)
-
- ### A) User Intent (Highest Priority)
-
- Use explicit intent if the user already indicates scope:
-
- - **PRD + ADR (no epic/stories)** → **System-Level Mode**
- - **Epic + Stories (no PRD/ADR)** → **Epic-Level Mode**
- - **Both PRD/ADR + Epic/Stories** → Prefer **System-Level Mode** first
-
- If intent is unclear, ask:
-
- > "Should I create (A) **System-level** test design (PRD + ADR → Architecture + QA docs), or (B) **Epic-level** test design (Epic → single test plan)?"
-
- ### B) File-Based Detection (BMad-Integrated)
-
- If user intent is unclear:
-
- - If `{implementation_artifacts}/sprint-status.yaml` exists → **Epic-Level Mode**
- - Otherwise → **System-Level Mode**
-
- ### C) Ambiguous → Ask
-
- If mode still unclear, ask the user to choose (A) or (B) and **halt** until they respond.
-
- ---
-
- ## 2. Prerequisite Check (Mode-Specific)
-
- ### System-Level Mode Requires:
-
- - PRD (functional + non-functional requirements)
- - ADR or architecture decision records
- - Architecture or tech-spec document
-
- ### Epic-Level Mode Requires:
-
- - Epic and/or story requirements with acceptance criteria
- - Architecture context (if available)
-
- ### HALT CONDITIONS
-
- If required inputs are missing **and** the user cannot provide them:
-
- - **System-Level**: "Please provide PRD + ADR/architecture docs to proceed."
- - **Epic-Level**: "Please provide epic/story requirements or acceptance criteria to proceed."
-
- ---
-
- ## 3. Confirm Mode
-
- State which mode you will use and why. Then proceed.
-
- ---
-
- ### 4. Save Progress
-
- **Save this step's accumulated work to `{outputFile}`.**
-
- - **If `{outputFile}` does not exist** (first save), create it with YAML frontmatter:
-
- ```yaml
- ---
- workflowStatus: 'in-progress'
- totalSteps: 5
- stepsCompleted: ['step-01-detect-mode']
- lastStep: 'step-01-detect-mode'
- nextStep: '{nextStepFile}'
- lastSaved: '{date}'
- ---
- ```
-
- Then write this step's output below the frontmatter.
-
- - **If `{outputFile}` already exists**, update:
- - Set `workflowStatus: 'in-progress'`
- - Set `totalSteps: 5`
- - Add `'step-01-detect-mode'` to `stepsCompleted` array (only if not already present)
- - Set `lastStep: 'step-01-detect-mode'`
- - Set `nextStep: '{nextStepFile}'`
- - Set `lastSaved: '{date}'`
- - Append this step's output to the appropriate section of the document.
-
- Load next step: `{nextStepFile}`
-
- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
-
- ### ✅ SUCCESS:
-
- - Step completed in full with required outputs
-
- ### ❌ SYSTEM FAILURE:
-
- - Skipped sequence steps or missing outputs
- **Master Rule:** Skipping steps is FORBIDDEN.
|