一键导入
bdd-gherkin-test-cases-for-coach-platform
Generate complete BDD/Gherkin test cases for the coaching platform from a scenario description or file.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate complete BDD/Gherkin test cases for the coaching platform from a scenario description or file.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Coaching Agent — validate and execute @regression scenarios for the Baseline Assessment (baseline-assessment.feature) and the Module-Based Training Journey (training-flow.feature) against the app. Logs in first, runs only @regression scenarios (ignoring @smoke/@sanity/@wip/untagged), captures evidence, and generates a regression report. Trigger with /coaching-agent.
Mandatory SDLC workflow for new features, bug fixes, refactors, architecture changes, API changes, database changes, UI changes, tests, and deployment-related work. Use before implementation.
Use when producing final IDD validation output - create markdown table with scenario findings, assign PASS/PARTIAL/FAIL verdict, follow schema exactly
Use when IDD scenario is not COVERED - trace code line-by-line to find what the code ACTUALLY does, not what it should do
Use when validating IDD scenarios - map each scenario's steps to specific implementation locations in scope-bounded source files
Use when validating BDD feature files - extract scenarios, detect chunk filtering mode, classify positive vs negative scenarios
| name | BDD-gherkin-test-cases-for-coach-platform |
| description | Generate complete BDD/Gherkin test cases for the coaching platform from a scenario description or file. |
| allowed-tools | Read, Write, Bash |
Generate comprehensive Gherkin feature files with all scenario types for the coaching platform.
Ask the user to select how they want to provide the scenario:
How would you like to provide the scenario?
- Type manually — I'll describe the scenario here
- Provide a file — I'll give you a path to an existing spec/requirements file
Please choose 1 or 2:
Wait for their response.
If they chose 1 (manual):
If they chose 2 (file):
cat "<file-path>"Ask the user:
What is the feature area name? (e.g., password-reset, user-profile, login)
Use lowercase letters and hyphens only:
Wait for their input and normalize to lowercase-hyphenated slug (convert spaces to hyphens, remove special chars).
Using the intent description and feature area name, generate comprehensive BDD scenarios.
Generate the .feature test cases file (plus the .scope file in Step 5). Do NOT write an <area>.intent.md intent/feature definition file. Only the Gherkin test cases and the .scope file are produced.
<area>.featureGherkin format with comprehensive scenarios covering:
Structure:
Feature: <Feature Name>
As a <actor>
I want to <action>
So that <benefit>
Background:
[Shared setup steps]
# ── POSITIVE SCENARIOS ───────────────────────────────────────────────────────
[3-5 happy path scenarios, each tagged @positive]
# ── NEGATIVE SCENARIOS ───────────────────────────────────────────────────────
[4-6 error/invalid input scenarios, each tagged @negative]
# ── EDGE SCENARIOS ──────────────────────────────────────────────────────────
[2-4 boundary/race condition scenarios, each tagged @edge]
# ── ERROR SCENARIOS ────────────────────────────────────────────────────────
[2-4 system failure scenarios, each tagged @error]
Critical Requirements:
Style Reference (match this format exactly):
Feature: User Login
As a registered user
I want to log in to my CoachCert account
So that I can continue my training and track my progress
Background:
Given I am on the Login page
# ── POSITIVE SCENARIOS ───────────────────────────────────────────────────────
Scenario: Successful login with valid credentials
Given I enter "ali@example.com" in the Email field
And I enter "SecurePass1" in the Password field
When I click the "Sign In" button
Then I am logged in successfully
And I am redirected to the dashboard
Scenario: Login with correct email but wrong password
Given I enter "ali@example.com" in the Email field
And I enter "WrongPass1" in the Password field
When I click the "Sign In" button
Then I see an error message "Invalid login credentials"
And I am not redirected away from the Login page
# ── ERROR SCENARIOS ──────────────────────────────────────────────────────────
Scenario: Server returns a network error during login
Given I enter "user@test.com" in the Email field
And I enter "ValidPass1" in the Password field
And the server is unreachable
When I click the "Sign In" button
Then I see an error message "Unable to connect. Please check your internet connection."
And I am not redirected away from the Login page
Create the directory and write two files (do NOT write an <area>.intent.md file):
/home/tbd/Desktop/Coaching platform/coaching-platform/tests/features/<area>/<area>.feature to that directory.scope file (see below for format)This is the Coaching Platform repo — a React + TypeScript + Supabase app. There is NO taleemabad_core Django backend and NO frontend/apps/school-app/ monorepo here. All source lives under src/. Analyze the feature to identify the src/ paths it touches.
Format (match the existing tests/features/<area>/.scope files, e.g. login and signup):
# <Area> feature scope
src/pages/<Page>.tsx
src/contexts/<Context>.tsx
src/hooks/<useHook>.ts
src/lib/apiClients/<client>.ts
src/components/<Component>.tsx
Rules:
.scope file lists the src/ modules/paths that this feature touches.src/pages/, src/hooks/, src/contexts/, src/components/, src/lib/). Verify a path exists before listing it.supabase/migrations/ — list that directory, not a Django path.# <Area> feature scope comment line; optionally group related paths with extra # comments..scope (no prefix like <area>.scope).Use the Write tool to write the .scope file to the feature directory.
Display the output to the user:
✅ Generated BDD feature files for '<area>'
Files created:
• /home/tbd/Desktop/Coaching platform/coaching-platform/tests/features/<area>/<area>.feature
• /home/tbd/Desktop/Coaching platform/coaching-platform/tests/features/<area>/.scope
Scenario Summary:
@positive: N scenarios (happy paths)
@negative: N scenarios (error conditions)
@edge: N scenarios (boundary cases)
@error: N scenarios (system failures)
────────────────
Total: N scenarios
Next step: Run /add-chunk-on-bdd-scenarios to add @chunk tags above all scenarios.
<area>.intent.md file — only the .feature test cases and .scope.scope)