[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D9S7CZGEECQ9YNTS1RAVTW":3,"skill-same:01M7D9S7CZGEECQ9YNTS1RAVTW":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":60,"commitSha":61,"skillDirectory":62,"forksCount":14,"repositoryHtmlUrl":63,"repositoryHomepageUrl":6,"ownerHtmlUrl":64,"ownerBlogUrl":65,"ownerDescription":66,"updatedAt":67,"install":68,"resources":81},"01M7D9S7CZGEECQ9YNTS1RAVTW","Test Case Generator from User Stories",null,"Automatically generate comprehensive test cases from user stories and acceptance criteria using BDD patterns, equivalence partitioning, and risk-based prioritization","GrupoANDevelopment-m\u002Falberto-ai","GrupoANDevelopment-m","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257455179?v=4","01M7D69X2N2KEVN0SJF6WGM6SH","Antônio  Ndombe","01M7D69X3P5JTT8H8S904N3888",0,"MIT","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Ftest-case-generator-user-stories\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: Test Case Generator from User Stories\ndescription: Automatically generate comprehensive test cases from user stories and acceptance criteria using BDD patterns, equivalence partitioning, and risk-based prioritization\nversion: 1.0.0\nauthor: Pramod\nlicense: MIT\ntags: [test-generation, user-stories, bdd, acceptance-criteria, gherkin, test-design, equivalence-partitioning, risk-based]\ntestingTypes: [bdd, tdd]\nframeworks: [cucumber]\nlanguages: [typescript, javascript, python, java]\ndomains: [web, api]\nagents: [claude-code, cursor, github-copilot, windsurf, codex, aider, continue, cline, zed, bolt, gemini-cli, amp]\n---\n\n# Test Case Generator from User Stories Skill\n\nYou are an expert QA engineer specializing in systematic test case generation from user stories and acceptance criteria. When the user asks you to generate test cases, create Gherkin scenarios, derive equivalence classes, or build traceability matrices from requirements, follow these detailed instructions to produce comprehensive, prioritized, and traceable test suites.\n\n## Core Principles\n\n1. **Parse before generating** -- Before writing any test case, fully parse the user story format (\"As a... I want... So that...\") and extract every testable acceptance criterion. Missing this step leads to incomplete coverage.\n2. **Apply equivalence partitioning systematically** -- Divide input domains into equivalence classes (valid, invalid, boundary) for every parameter mentioned in the story. Each class needs at least one representative test case.\n3. **Derive boundary values from requirements** -- Requirements that mention ranges, limits, or thresholds imply boundary values. Extract and test at the boundary, one below, and one above.\n4. **Generate both positive and negative scenarios** -- Every acceptance criterion implies what should happen and what should not happen. Generate explicit negative test cases for every positive scenario.\n5. **Use Gherkin for traceability** -- BDD scenarios in Given\u002FWhen\u002FThen format provide a natural link between requirements and test cases. Every scenario should trace back to a specific acceptance criterion.\n6. **Prioritize by risk, not by order** -- Not all test cases have equal value. Assign priority based on business impact, failure likelihood, and technical complexity. High-risk scenarios run first.\n7. **Maintain a traceability matrix** -- Every generated test case must link back to its source requirement. This enables coverage gap analysis and impact assessment when requirements change.\n8. **Consider implicit requirements** -- User stories rarely capture all requirements explicitly. Security, performance, accessibility, and error handling are often implicit. Generate test cases for these cross-cutting concerns.\n\n## Project Structure\n\n```\ntests\u002F\n  generated\u002F\n    features\u002F\n      user-authentication.feature\n      shopping-cart.feature\n      payment-processing.feature\n    step-definitions\u002F\n      user-authentication.steps.ts\n      shopping-cart.steps.ts\n      payment-processing.steps.ts\n    equivalence-classes\u002F\n      authentication-classes.ts\n      cart-classes.ts\n      payment-classes.ts\n    traceability\u002F\n      traceability-matrix.json\n      coverage-report.ts\n  generators\u002F\n    story-parser.ts\n    scenario-generator.ts\n    equivalence-generator.ts\n    boundary-generator.ts\n    negative-scenario-generator.ts\n    priority-calculator.ts\n    traceability-builder.ts\n    gherkin-formatter.ts\n  fixtures\u002F\n    sample-stories.ts\n    domain-rules.ts\n  utils\u002F\n    nlp-helpers.ts\n    gherkin-validator.ts\ncucumber.config.ts\n```\n\n## Configuration\n\n```typescript\n\u002F\u002F cucumber.config.ts\nexport default {\n  default: {\n    paths: ['tests\u002Fgenerated\u002Ffeatures\u002F**\u002F*.feature'],\n    require: ['tests\u002Fgenerated\u002Fstep-definitions\u002F**\u002F*.ts'],\n    requireModule: ['ts-node\u002Fregister'],\n    format: [\n      'progress-bar',\n      'html:reports\u002Fcucumber-report.html',\n      'json:reports\u002Fcucumber-report.json',\n    ],\n    formatOptions: {\n      snippetInterface: 'async-await',\n    },\n    publishQuiet: true,\n  },\n};\n```\n\n```typescript\n\u002F\u002F tests\u002Ffixtures\u002Fsample-stories.ts\n\nexport interface UserStory {\n  id: string;\n  title: string;\n  narrative: {\n    asA: string;\n    iWant: string;\n    soThat: string;\n  };\n  acceptanceCriteria: AcceptanceCriterion[];\n  priority: 'critical' | 'high' | 'medium' | 'low';\n  tags?: string[];\n}\n\nexport interface AcceptanceCriterion {\n  id: string;\n  given: string;\n  when: string;\n  then: string;\n  rules?: string[];\n}\n\nexport const sampleStories: UserStory[] = [\n  {\n    id: 'US-101',\n    title: 'User Registration',\n    narrative: {\n      asA: 'new visitor',\n      iWant: 'to create an account with my email and password',\n      soThat: 'I can access personalized features',\n    },\n    acceptanceCriteria: [\n      {\n        id: 'AC-101-1',\n        given: 'I am on the registration page',\n        when: 'I submit a valid email and password',\n        then: 'my account is created and I am logged in',\n        rules: [\n          'Email must be a valid email format',\n          'Password must be 8-64 characters',\n          'Password must contain at least one uppercase letter, one lowercase letter, and one number',\n          'Email must not already be registered',\n        ],\n      },\n      {\n        id: 'AC-101-2',\n        given: 'I am on the registration page',\n        when: 'I submit an email that is already registered',\n        then: 'I see an error message without revealing whether the email exists',\n      },\n      {\n        id: 'AC-101-3',\n        given: 'I am on the registration page',\n        when: 'I submit a password that does not meet requirements',\n        then: 'I see specific validation messages for each unmet requirement',\n      },\n    ],\n    priority: 'critical',\n    tags: ['authentication', 'registration'],\n  },\n  {\n    id: 'US-102',\n    title: 'Add Item to Shopping Cart',\n    narrative: {\n      asA: 'logged-in customer',\n      iWant: 'to add products to my shopping cart',\n      soThat: 'I can purchase them later',\n    },\n    acceptanceCriteria: [\n      {\n        id: 'AC-102-1',\n        given: 'I am viewing a product detail page',\n        when: 'I click \"Add to Cart\" with a valid quantity',\n        then: 'the item is added to my cart and the cart count updates',\n        rules: [\n          'Quantity must be between 1 and 99',\n          'Item must be in stock',\n          'Cart total must not exceed 50 items',\n        ],\n      },\n      {\n        id: 'AC-102-2',\n        given: 'I am viewing a product that is out of stock',\n        when: 'I attempt to add it to my cart',\n        then: 'the Add to Cart button is disabled and I see an \"Out of Stock\" message',\n      },\n    ],\n    priority: 'high',\n    tags: ['shopping', 'cart'],\n  },\n];\n```\n\n## How-To Guides\n\n### Parsing User Stories and Extracting Testable Criteria\n\nThe first step in test generation is systematically parsing user stories to identify all testable aspects.\n\n```typescript\n\u002F\u002F tests\u002Fgenerators\u002Fstory-parser.ts\n\nimport { UserStory, AcceptanceCriterion } from '..\u002Ffixtures\u002Fsample-stories';\n\nexport interface ParsedStory {\n  storyId: string;\n  actor: string;\n  action: string;\n  benefit: string;\n  criteria: ParsedCriterion[];\n  implicitRequirements: string[];\n}\n\nexport interface ParsedCriterion {\n  criterionId: string;\n  preconditions: string[];\n  trigger: string;\n  expectedOutcome: string;\n  businessRules: string[];\n  inputParameters: InputParameter[];\n}\n\nexport interface InputParameter {\n  name: string;\n  type: 'string' | 'number' | 'email' | 'date' | 'enum' | 'boolean';\n  constraints: string[];\n  extractedFrom: string;\n}\n\n\u002F**\n * Parse a user story into structured, testable components.\n *\u002F\nexport function parseUserStory(story: UserStory): ParsedStory {\n  const criteria = story.acceptanceCriteria.map((ac) => parseCriterion(ac));\n\n  \u002F\u002F Extract implicit requirements that are not stated but should be tested\n  const implicitRequirements = deriveImplicitRequirements(story);\n\n  return {\n    storyId: story.id,\n    actor: story.narrative.asA,\n    action: story.narrative.iWant,\n    benefit: story.narrative.soThat,\n    criteria,\n    implicitRequirements,\n  };\n}\n\nfunction parseCriterion(ac: AcceptanceCriterion): ParsedCriterion {\n  const inputParameters = extractInputParameters(ac);\n\n  return {\n    criterionId: ac.id,\n    preconditions: [ac.given],\n    trigger: ac.when,\n    expectedOutcome: ac.then,\n    businessRules: ac.rules || [],\n    inputParameters,\n  };\n}\n\nfunction extractInputParameters(ac: AcceptanceCriterion): InputParameter[] {\n  const params: InputParameter[] = [];\n\n  \u002F\u002F Parse rules to extract input constraints\n  for (const rule of ac.rules || []) {\n    \u002F\u002F Pattern: \"X must be Y-Z characters\"\n    const charLengthMatch = rule.match(\u002F(\\w+)\\s+must\\s+be\\s+(\\d+)-(\\d+)\\s+characters\u002Fi);\n    if (charLengthMatch) {\n      params.push({\n        name: charLengthMatch[1].toLowerCase(),\n        type: 'string',\n        constraints: [`minLength:${charLengthMatch[2]}`, `maxLength:${charLengthMatch[3]}`],\n        extractedFrom: rule,\n      });\n    }\n\n    \u002F\u002F Pattern: \"X must be a valid email\"\n    const emailMatch = rule.match(\u002F(\\w+)\\s+must\\s+be\\s+a\\s+valid\\s+email\u002Fi);\n    if (emailMatch) {\n      params.push({\n        name: emailMatch[1].toLowerCase(),\n        type: 'email',\n        constraints: ['validFormat'],\n        extractedFrom: rule,\n      });\n    }\n\n    \u002F\u002F Pattern: \"X must be between Y and Z\"\n    const rangeMatch = rule.match(\u002F(\\w+)\\s+must\\s+be\\s+between\\s+(\\d+)\\s+and\\s+(\\d+)\u002Fi);\n    if (rangeMatch) {\n      params.push({\n        name: rangeMatch[1].toLowerCase(),\n        type: 'number',\n        constraints: [`min:${rangeMatch[2]}`, `max:${rangeMatch[3]}`],\n        extractedFrom: rule,\n      });\n    }\n\n    \u002F\u002F Pattern: \"must contain at least one X\"\n    const containsMatch = rule.match(\u002Fmust\\s+contain\\s+at\\s+least\\s+one\\s+([\\w\\s]+)\u002Fi);\n    if (containsMatch) {\n      params.push({\n        name: containsMatch[1].trim().replace(\u002F\\s+\u002Fg, '_'),\n        type: 'string',\n        constraints: [`contains:${containsMatch[1].trim()}`],\n        extractedFrom: rule,\n      });\n    }\n  }\n\n  return params;\n}\n\nfunction deriveImplicitRequirements(story: UserStory): string[] {\n  const implicit: string[] = [];\n\n  \u002F\u002F Security: all forms need CSRF protection\n  if (story.acceptanceCriteria.some((ac) => ac.when.includes('submit'))) {\n    implicit.push('Form submission must include CSRF token validation');\n  }\n\n  \u002F\u002F Accessibility: all interactive elements need keyboard support\n  implicit.push('All interactive elements must be keyboard accessible');\n\n  \u002F\u002F Performance: page load within budget\n  implicit.push('Page must load within 3 seconds');\n\n  \u002F\u002F Error handling: generic error fallback\n  implicit.push('Server errors must show user-friendly error message');\n\n  \u002F\u002F Authentication stories need rate limiting\n  if (story.tags?.includes('authentication')) {\n    implicit.push('Authentication endpoints must have rate limiting');\n    implicit.push('Failed attempts must not reveal whether the account exists');\n  }\n\n  return implicit;\n}\n```\n\n### Generating Equivalence Classes\n\nEquivalence partitioning divides input domains into classes where all values in a class are expected to produce the same behavior. This reduces the number of test cases while maintaining coverage.\n\n```typescript\n\u002F\u002F tests\u002Fgenerators\u002Fequivalence-generator.ts\n\nimport { InputParameter, ParsedCriterion } from '.\u002Fstory-parser';\n\nexport interface EquivalenceClass {\n  parameterId: string;\n  parameterName: string;\n  className: string;\n  type: 'valid' | 'invalid' | 'boundary';\n  representative: string | number;\n  description: string;\n}\n\n\u002F**\n * Generate equivalence classes for all input parameters of a parsed criterion.\n *\u002F\nexport function generateEquivalenceClasses(\n  criterion: ParsedCriterion\n): EquivalenceClass[] {\n  const classes: EquivalenceClass[] = [];\n\n  for (const param of criterion.inputParameters) {\n    classes.push(...generateClassesForParameter(param));\n  }\n\n  return classes;\n}\n\nfunction generateClassesForParameter(param: InputParameter): EquivalenceClass[] {\n  const classes: EquivalenceClass[] = [];\n  const baseName = param.name;\n\n  switch (param.type) {\n    case 'email':\n      classes.push(\n        { parameterId: baseName, parameterName: baseName, className: 'Valid email', type: 'valid', representative: 'user@example.com', description: 'Standard email format' },\n        { parameterId: baseName, parameterName: baseName, className: 'Email with subdomain', type: 'valid', representative: 'user@mail.example.com', description: 'Email with subdomain' },\n        { parameterId: baseName, parameterName: baseName, className: 'Email with plus alias', type: 'valid', representative: 'user+tag@example.com', description: 'Email with plus addressing' },\n        { parameterId: baseName, parameterName: baseName, className: 'Missing @ symbol', type: 'invalid', representative: 'userexample.com', description: 'Email without @ symbol' },\n        { parameterId: baseName, parameterName: baseName, className: 'Missing domain', type: 'invalid', representative: 'user@', description: 'Email without domain' },\n        { parameterId: baseName, parameterName: baseName, className: 'Missing local part', type: 'invalid', representative: '@example.com', description: 'Email without local part' },\n        { parameterId: baseName, parameterName: baseName, className: 'Double dots', type: 'invalid', representative: 'user@example..com', description: 'Domain with consecutive dots' },\n        { parameterId: baseName, parameterName: baseName, className: 'Empty string', type: 'invalid', representative: '', description: 'Empty email field' },\n      );\n      break;\n\n    case 'string': {\n      const minLength = extractConstraintValue(param.constraints, 'minLength');\n      const maxLength = extractConstraintValue(param.constraints, 'maxLength');\n\n      if (minLength !== null && maxLength !== null) {\n        classes.push(\n          { parameterId: baseName, parameterName: baseName, className: 'At minimum length', type: 'boundary', representative: 'a'.repeat(minLength), description: `Exactly ${minLength} characters` },\n          { parameterId: baseName, parameterName: baseName, className: 'Below minimum', type: 'invalid', representative: 'a'.repeat(Math.max(0, minLength - 1)), description: `${minLength - 1} characters` },\n          { parameterId: baseName, parameterName: baseName, className: 'At maximum length', type: 'boundary', representative: 'a'.repeat(maxLength), description: `Exactly ${maxLength} characters` },\n          { parameterId: baseName, parameterName: baseName, className: 'Above maximum', type: 'invalid', representative: 'a'.repeat(maxLength + 1), description: `${maxLength + 1} characters` },\n          { parameterId: baseName, parameterName: baseName, className: 'Mid-range valid', type: 'valid', representative: 'a'.repeat(Math.floor((minLength + maxLength) \u002F 2)), description: 'Middle of valid range' },\n          { parameterId: baseName, parameterName: baseName, className: 'Empty string', type: 'invalid', representative: '', description: 'Empty field' },\n        );\n      }\n      break;\n    }\n\n    case 'number': {\n      const min = extractConstraintValue(param.constraints, 'min');\n      const max = extractConstraintValue(param.constraints, 'max');\n\n      if (min !== null && max !== null) {\n        classes.push(\n          { parameterId: baseName, parameterName: baseName, className: 'Minimum value', type: 'boundary', representative: min, description: `Exactly ${min}` },\n          { parameterId: baseName, parameterName: baseName, className: 'Below minimum', type: 'invalid', representative: min - 1, description: `${min - 1} (below minimum)` },\n          { parameterId: baseName, parameterName: baseName, className: 'Maximum value', type: 'boundary', representative: max, description: `Exactly ${max}` },\n          { parameterId: baseName, parameterName: baseName, className: 'Above maximum', type: 'invalid', representative: max + 1, description: `${max + 1} (above maximum)` },\n          { parameterId: baseName, parameterName: baseName, className: 'Mid-range valid', type: 'valid', representative: Math.floor((min + max) \u002F 2), description: 'Middle of valid range' },\n          { parameterId: baseName, parameterName: baseName, className: 'Zero', type: min > 0 ? 'invalid' : 'valid', representative: 0, description: 'Zero value' },\n          { parameterId: baseName, parameterName: baseName, className: 'Negative', type: 'invalid', representative: -1, description: 'Negative value' },\n        );\n      }\n      break;\n    }\n  }\n\n  return classes;\n}\n\nfunction extractConstraintValue(constraints: string[], prefix: string): number | null {\n  const constraint = constraints.find((c) => c.startsWith(`${prefix}:`));\n  if (!constraint) return null;\n  return parseInt(constraint.split(':')[1], 10);\n}\n```\n\n### Generating Gherkin Scenarios from Parsed Stories\n\nTransform parsed user stories and equivalence classes into Gherkin feature files with complete Given\u002FWhen\u002FThen scenarios.\n\n```typescript\n\u002F\u002F tests\u002Fgenerators\u002Fgherkin-formatter.ts\n\nimport { ParsedStory, ParsedCriterion } from '.\u002Fstory-parser';\nimport { EquivalenceClass, generateEquivalenceClasses } from '.\u002Fequivalence-generator';\n\n\u002F**\n * Generate a complete Gherkin feature file from a parsed user story.\n *\u002F\nexport function generateFeatureFile(story: ParsedStory): string {\n  const lines: string[] = [];\n\n  \u002F\u002F Feature header\n  lines.push(`@${story.storyId.replace(\u002F[^a-zA-Z0-9]\u002Fg, '-')}`);\n  lines.push(`Feature: ${story.action}`);\n  lines.push(`  As a ${story.actor}`);\n  lines.push(`  I want ${story.action}`);\n  lines.push(`  So that ${story.benefit}`);\n  lines.push('');\n\n  \u002F\u002F Background (common preconditions)\n  const commonPreconditions = extractCommonPreconditions(story.criteria);\n  if (commonPreconditions.length > 0) {\n    lines.push('  Background:');\n    for (const precondition of commonPreconditions) {\n      lines.push(`    Given ${precondition}`);\n    }\n    lines.push('');\n  }\n\n  \u002F\u002F Generate scenarios for each criterion\n  for (const criterion of story.criteria) {\n    \u002F\u002F Positive scenario\n    lines.push(...generatePositiveScenario(criterion));\n    lines.push('');\n\n    \u002F\u002F Negative scenarios from equivalence classes\n    const eqClasses = generateEquivalenceClasses(criterion);\n    const invalidClasses = eqClasses.filter((ec) => ec.type === 'invalid');\n\n    for (const invalidClass of invalidClasses) {\n      lines.push(...generateNegativeScenario(criterion, invalidClass));\n      lines.push('');\n    }\n\n    \u002F\u002F Boundary scenarios\n    const boundaryClasses = eqClasses.filter((ec) => ec.type === 'boundary');\n    if (boundaryClasses.length > 0) {\n      lines.push(...generateBoundaryScenarioOutline(criterion, boundaryClasses));\n      lines.push('');\n    }\n  }\n\n  \u002F\u002F Implicit requirement scenarios\n  for (const implicit of story.implicitRequirements) {\n    lines.push(`  @implicit @non-functional`);\n    lines.push(`  Scenario: ${implicit}`);\n    lines.push(`    Given the application is running`);\n    lines.push(`    Then ${implicit.toLowerCase()}`);\n    lines.push('');\n  }\n\n  return lines.join('\\n');\n}\n\nfunction generatePositiveScenario(criterion: ParsedCriterion): string[] {\n  const lines: string[] = [];\n\n  lines.push(`  @${criterion.criterionId.replace(\u002F[^a-zA-Z0-9]\u002Fg, '-')} @positive`);\n  lines.push(`  Scenario: ${criterion.trigger} - happy path`);\n\n  for (const precondition of criterion.preconditions) {\n    lines.push(`    Given ${precondition}`);\n  }\n\n  lines.push(`    When ${criterion.trigger}`);\n  lines.push(`    Then ${criterion.expectedOutcome}`);\n\n  for (const rule of criterion.businessRules) {\n    lines.push(`    And ${rule}`);\n  }\n\n  return lines;\n}\n\nfunction generateNegativeScenario(\n  criterion: ParsedCriterion,\n  invalidClass: EquivalenceClass\n): string[] {\n  const lines: string[] = [];\n\n  lines.push(`  @${criterion.criterionId.replace(\u002F[^a-zA-Z0-9]\u002Fg, '-')} @negative`);\n  lines.push(\n    `  Scenario: Reject ${invalidClass.parameterName} - ${invalidClass.className}`\n  );\n\n  for (const precondition of criterion.preconditions) {\n    lines.push(`    Given ${precondition}`);\n  }\n\n  lines.push(\n    `    When I provide ${invalidClass.parameterName} as \"${invalidClass.representative}\"`\n  );\n  lines.push(\n    `    Then I should see a validation error for ${invalidClass.parameterName}`\n  );\n  lines.push(`    And the ${invalidClass.parameterName} error explains \"${invalidClass.description}\"`);\n\n  return lines;\n}\n\nfunction generateBoundaryScenarioOutline(\n  criterion: ParsedCriterion,\n  boundaryClasses: EquivalenceClass[]\n): string[] {\n  const lines: string[] = [];\n\n  lines.push(`  @${criterion.criterionId.replace(\u002F[^a-zA-Z0-9]\u002Fg, '-')} @boundary`);\n  lines.push(`  Scenario Outline: Boundary values for ${criterion.trigger}`);\n\n  for (const precondition of criterion.preconditions) {\n    lines.push(`    Given ${precondition}`);\n  }\n\n  lines.push(`    When I provide \u003Cparameter> as \"\u003Cvalue>\"`);\n  lines.push(`    Then the result should be \"\u003Cexpected>\"`);\n  lines.push('');\n  lines.push('    Examples:');\n  lines.push('      | parameter | value | expected |');\n\n  for (const boundary of boundaryClasses) {\n    lines.push(\n      `      | ${boundary.parameterName} | ${boundary.representative} | accepted |`\n    );\n  }\n\n  return lines;\n}\n\nfunction extractCommonPreconditions(criteria: ParsedCriterion[]): string[] {\n  if (criteria.length \u003C 2) return [];\n\n  const allPreconditions = criteria.map((c) => c.preconditions);\n  return allPreconditions[0].filter((p) =>\n    allPreconditions.every((pList) => pList.includes(p))\n  );\n}\n```\n\n### Generating Cucumber Step Definitions\n\nCreate step definition templates that connect Gherkin scenarios to executable test code.\n\n```typescript\n\u002F\u002F tests\u002Fgenerators\u002Fscenario-generator.ts\n\nimport { ParsedStory } from '.\u002Fstory-parser';\n\n\u002F**\n * Generate Cucumber step definitions for a parsed user story.\n *\u002F\nexport function generateStepDefinitions(story: ParsedStory): string {\n  const lines: string[] = [];\n\n  lines.push(`import { Given, When, Then } from '@cucumber\u002Fcucumber';`);\n  lines.push(`import { expect } from '@playwright\u002Ftest';`);\n  lines.push(`import { page } from '..\u002Fsupport\u002Fworld';`);\n  lines.push('');\n\n  const steps = new Set\u003Cstring>();\n\n  for (const criterion of story.criteria) {\n    \u002F\u002F Given steps\n    for (const precondition of criterion.preconditions) {\n      const stepKey = `Given:${precondition}`;\n      if (!steps.has(stepKey)) {\n        steps.add(stepKey);\n        lines.push(`Given('${escapeGherkin(precondition)}', async function () {`);\n        lines.push(`  \u002F\u002F Navigate to the appropriate page`);\n        lines.push(`  await page.goto('\u002F');`);\n        lines.push(`  \u002F\u002F TODO: Implement precondition setup`);\n        lines.push(`});`);\n        lines.push('');\n      }\n    }\n\n    \u002F\u002F When steps\n    const whenKey = `When:${criterion.trigger}`;\n    if (!steps.has(whenKey)) {\n      steps.add(whenKey);\n      lines.push(`When('${escapeGherkin(criterion.trigger)}', async function () {`);\n      lines.push(`  \u002F\u002F TODO: Implement action`);\n      lines.push(`});`);\n      lines.push('');\n    }\n\n    \u002F\u002F Then steps\n    const thenKey = `Then:${criterion.expectedOutcome}`;\n    if (!steps.has(thenKey)) {\n      steps.add(thenKey);\n      lines.push(`Then('${escapeGherkin(criterion.expectedOutcome)}', async function () {`);\n      lines.push(`  \u002F\u002F TODO: Implement assertion`);\n      lines.push(`});`);\n      lines.push('');\n    }\n  }\n\n  \u002F\u002F Parameterized steps for equivalence classes\n  lines.push(`When('I provide {word} as {string}', async function (parameter: string, value: string) {`);\n  lines.push(`  const input = page.getByTestId(\\`input-\\${parameter}\\`);`);\n  lines.push(`  await input.clear();`);\n  lines.push(`  await input.fill(value);`);\n  lines.push(`});`);\n  lines.push('');\n\n  lines.push(`Then('I should see a validation error for {word}', async function (parameter: string) {`);\n  lines.push(`  const error = page.getByTestId(\\`error-\\${parameter}\\`);`);\n  lines.push(`  await expect(error).toBeVisible();`);\n  lines.push(`});`);\n  lines.push('');\n\n  lines.push(`Then('the {word} error explains {string}', async function (parameter: string, message: string) {`);\n  lines.push(`  const error = page.getByTestId(\\`error-\\${parameter}\\`);`);\n  lines.push(`  const text = await error.textContent();`);\n  lines.push(`  expect(text).toBeTruthy();`);\n  lines.push(`});`);\n\n  return lines.join('\\n');\n}\n\nfunction escapeGherkin(text: string): string {\n  return text.replace(\u002F'\u002Fg, \"\\\\'\");\n}\n```\n\n### Building a Risk-Based Priority Calculator\n\nNot all test cases are equally important. This calculator assigns priority based on business impact, failure probability, and complexity.\n\n```typescript\n\u002F\u002F tests\u002Fgenerators\u002Fpriority-calculator.ts\n\nexport interface RiskAssessment {\n  scenarioId: string;\n  businessImpact: 1 | 2 | 3 | 4 | 5;  \u002F\u002F 5 = critical\n  failureLikelihood: 1 | 2 | 3 | 4 | 5; \u002F\u002F 5 = very likely\n  complexity: 1 | 2 | 3 | 4 | 5;        \u002F\u002F 5 = very complex\n  riskScore: number;\n  priority: 'P0-critical' | 'P1-high' | 'P2-medium' | 'P3-low';\n}\n\nexport function calculateRiskPriority(\n  scenarioId: string,\n  storyPriority: 'critical' | 'high' | 'medium' | 'low',\n  scenarioType: 'positive' | 'negative' | 'boundary' | 'implicit',\n  affectsPayment: boolean,\n  affectsAuth: boolean,\n  affectsData: boolean\n): RiskAssessment {\n  \u002F\u002F Business impact based on story priority and scenario characteristics\n  let businessImpact: 1 | 2 | 3 | 4 | 5 = 1;\n  const priorityMap = { critical: 5, high: 4, medium: 3, low: 2 } as const;\n  businessImpact = priorityMap[storyPriority] as 1 | 2 | 3 | 4 | 5;\n\n  if (affectsPayment) businessImpact = 5;\n  if (affectsAuth) businessImpact = Math.max(businessImpact, 4) as 1 | 2 | 3 | 4 | 5;\n\n  \u002F\u002F Failure likelihood based on scenario type\n  let failureLikelihood: 1 | 2 | 3 | 4 | 5 = 2;\n  switch (scenarioType) {\n    case 'boundary':\n      failureLikelihood = 4; \u002F\u002F Boundary cases are error-prone\n      break;\n    case 'negative':\n      failureLikelihood = 3; \u002F\u002F Negative paths are often under-tested\n      break;\n    case 'implicit':\n      failureLikelihood = 3; \u002F\u002F Implicit requirements are often missed\n      break;\n    case 'positive':\n      failureLikelihood = 2; \u002F\u002F Happy paths are usually tested\n      break;\n  }\n\n  \u002F\u002F Complexity\n  let complexity: 1 | 2 | 3 | 4 | 5 = 2;\n  if (affectsPayment) complexity = 5;\n  if (affectsData && affectsAuth) complexity = 4;\n\n  \u002F\u002F Risk score: weighted combination\n  const riskScore =\n    businessImpact * 0.5 + failureLikelihood * 0.3 + complexity * 0.2;\n\n  \u002F\u002F Priority classification\n  let priority: RiskAssessment['priority'];\n  if (riskScore >= 4.0) priority = 'P0-critical';\n  else if (riskScore >= 3.0) priority = 'P1-high';\n  else if (riskScore >= 2.0) priority = 'P2-medium';\n  else priority = 'P3-low';\n\n  return {\n    scenarioId,\n    businessImpact,\n    failureLikelihood,\n    complexity,\n    riskScore: Math.round(riskScore * 100) \u002F 100,\n    priority,\n  };\n}\n```\n\n### Building a Traceability Matrix\n\nA traceability matrix links every test case to its source requirement, enabling coverage analysis and change impact assessment.\n\n```typescript\n\u002F\u002F tests\u002Fgenerators\u002Ftraceability-builder.ts\n\nimport { ParsedStory } from '.\u002Fstory-parser';\nimport { EquivalenceClass } from '.\u002Fequivalence-generator';\n\nexport interface TraceabilityEntry {\n  testCaseId: string;\n  storyId: string;\n  criterionId: string;\n  scenarioType: 'positive' | 'negative' | 'boundary' | 'implicit';\n  scenarioTitle: string;\n  priority: string;\n  equivalenceClass?: string;\n  featureFile: string;\n  status: 'generated' | 'implemented' | 'passing' | 'failing' | 'skipped';\n}\n\nexport interface TraceabilityMatrix {\n  generated: string;\n  totalStories: number;\n  totalCriteria: number;\n  totalTestCases: number;\n  coverageByStory: Record\u003Cstring, { total: number; implemented: number; passing: number }>;\n  entries: TraceabilityEntry[];\n}\n\nexport function buildTraceabilityMatrix(\n  stories: ParsedStory[],\n  equivalenceClasses: Map\u003Cstring, EquivalenceClass[]>\n): TraceabilityMatrix {\n  const entries: TraceabilityEntry[] = [];\n  let testCaseCounter = 1;\n  let totalCriteria = 0;\n\n  for (const story of stories) {\n    for (const criterion of story.criteria) {\n      totalCriteria++;\n\n      \u002F\u002F Positive scenario\n      entries.push({\n        testCaseId: `TC-${String(testCaseCounter++).padStart(3, '0')}`,\n        storyId: story.storyId,\n        criterionId: criterion.criterionId,\n        scenarioType: 'positive',\n        scenarioTitle: `${criterion.trigger} - happy path`,\n        priority: 'P1-high',\n        featureFile: `${story.storyId.toLowerCase().replace(\u002F[^a-z0-9]\u002Fg, '-')}.feature`,\n        status: 'generated',\n      });\n\n      \u002F\u002F Equivalence class scenarios\n      const classes = equivalenceClasses.get(criterion.criterionId) || [];\n      for (const ec of classes) {\n        entries.push({\n          testCaseId: `TC-${String(testCaseCounter++).padStart(3, '0')}`,\n          storyId: story.storyId,\n          criterionId: criterion.criterionId,\n          scenarioType: ec.type === 'invalid' ? 'negative' : 'boundary',\n          scenarioTitle: `${ec.parameterName} - ${ec.className}`,\n          priority: ec.type === 'boundary' ? 'P1-high' : 'P2-medium',\n          equivalenceClass: ec.className,\n          featureFile: `${story.storyId.toLowerCase().replace(\u002F[^a-z0-9]\u002Fg, '-')}.feature`,\n          status: 'generated',\n        });\n      }\n    }\n\n    \u002F\u002F Implicit requirements\n    for (const implicit of story.implicitRequirements) {\n      entries.push({\n        testCaseId: `TC-${String(testCaseCounter++).padStart(3, '0')}`,\n        storyId: story.storyId,\n        criterionId: 'implicit',\n        scenarioType: 'implicit',\n        scenarioTitle: implicit,\n        priority: 'P2-medium',\n        featureFile: `${story.storyId.toLowerCase().replace(\u002F[^a-z0-9]\u002Fg, '-')}.feature`,\n        status: 'generated',\n      });\n    }\n  }\n\n  \u002F\u002F Build coverage summary\n  const coverageByStory: Record\u003Cstring, { total: number; implemented: number; passing: number }> = {};\n  for (const entry of entries) {\n    if (!coverageByStory[entry.storyId]) {\n      coverageByStory[entry.storyId] = { total: 0, implemented: 0, passing: 0 };\n    }\n    coverageByStory[entry.storyId].total++;\n    if (entry.status === 'implemented' || entry.status === 'passing') {\n      coverageByStory[entry.storyId].implemented++;\n    }\n    if (entry.status === 'passing') {\n      coverageByStory[entry.storyId].passing++;\n    }\n  }\n\n  return {\n    generated: new Date().toISOString(),\n    totalStories: stories.length,\n    totalCriteria,\n    totalTestCases: entries.length,\n    coverageByStory,\n    entries,\n  };\n}\n```\n\n### Python Implementation: Generating Test Cases from User Stories\n\nFor teams using Python with pytest-bdd, here is the equivalent test generation approach.\n\n```python\n# tests\u002Fgenerators\u002Fstory_parser.py\n\nfrom dataclasses import dataclass, field\nimport re\n\n\n@dataclass\nclass InputParameter:\n    name: str\n    param_type: str  # 'string', 'number', 'email', 'date'\n    constraints: list[str] = field(default_factory=list)\n    extracted_from: str = \"\"\n\n\n@dataclass\nclass ParsedCriterion:\n    criterion_id: str\n    preconditions: list[str]\n    trigger: str\n    expected_outcome: str\n    business_rules: list[str]\n    input_parameters: list[InputParameter]\n\n\n@dataclass\nclass ParsedStory:\n    story_id: str\n    actor: str\n    action: str\n    benefit: str\n    criteria: list[ParsedCriterion]\n    implicit_requirements: list[str]\n\n\ndef parse_user_story(story: dict) -> ParsedStory:\n    \"\"\"Parse a user story dictionary into structured components.\"\"\"\n    criteria = []\n    for ac in story.get(\"acceptance_criteria\", []):\n        params = extract_input_parameters(ac.get(\"rules\", []))\n        criteria.append(\n            ParsedCriterion(\n                criterion_id=ac[\"id\"],\n                preconditions=[ac[\"given\"]],\n                trigger=ac[\"when\"],\n                expected_outcome=ac[\"then\"],\n                business_rules=ac.get(\"rules\", []),\n                input_parameters=params,\n            )\n        )\n\n    implicit = derive_implicit_requirements(story)\n\n    return ParsedStory(\n        story_id=story[\"id\"],\n        actor=story[\"narrative\"][\"as_a\"],\n        action=story[\"narrative\"][\"i_want\"],\n        benefit=story[\"narrative\"][\"so_that\"],\n        criteria=criteria,\n        implicit_requirements=implicit,\n    )\n\n\ndef extract_input_parameters(rules: list[str]) -> list[InputParameter]:\n    \"\"\"Extract input parameters and their constraints from business rules.\"\"\"\n    params = []\n\n    for rule in rules:\n        # Pattern: \"X must be Y-Z characters\"\n        char_match = re.search(\n            r\"(\\w+)\\s+must\\s+be\\s+(\\d+)-(\\d+)\\s+characters\", rule, re.IGNORECASE\n        )\n        if char_match:\n            params.append(\n                InputParameter(\n                    name=char_match.group(1).lower(),\n                    param_type=\"string\",\n                    constraints=[\n                        f\"min_length:{char_match.group(2)}\",\n                        f\"max_length:{char_match.group(3)}\",\n                    ],\n                    extracted_from=rule,\n                )\n            )\n\n        # Pattern: \"X must be between Y and Z\"\n        range_match = re.search(\n            r\"(\\w+)\\s+must\\s+be\\s+between\\s+(\\d+)\\s+and\\s+(\\d+)\", rule, re.IGNORECASE\n        )\n        if range_match:\n            params.append(\n                InputParameter(\n                    name=range_match.group(1).lower(),\n                    param_type=\"number\",\n                    constraints=[\n                        f\"min:{range_match.group(2)}\",\n                        f\"max:{range_match.group(3)}\",\n                    ],\n                    extracted_from=rule,\n                )\n            )\n\n    return params\n\n\ndef derive_implicit_requirements(story: dict) -> list[str]:\n    \"\"\"Derive implicit requirements from story context.\"\"\"\n    implicit = [\n        \"All interactive elements must be keyboard accessible\",\n        \"Page must load within 3 seconds\",\n        \"Server errors must show user-friendly error message\",\n    ]\n\n    tags = story.get(\"tags\", [])\n    if \"authentication\" in tags:\n        implicit.append(\"Authentication endpoints must have rate limiting\")\n\n    return implicit\n```\n\n```python\n# tests\u002Fgenerators\u002Fgherkin_generator.py\n\nfrom story_parser import ParsedStory, ParsedCriterion\n\n\ndef generate_feature_file(story: ParsedStory) -> str:\n    \"\"\"Generate a complete Gherkin feature file from a parsed story.\"\"\"\n    lines = []\n\n    tag = story.story_id.replace(\" \", \"-\")\n    lines.append(f\"@{tag}\")\n    lines.append(f\"Feature: {story.action}\")\n    lines.append(f\"  As a {story.actor}\")\n    lines.append(f\"  I want {story.action}\")\n    lines.append(f\"  So that {story.benefit}\")\n    lines.append(\"\")\n\n    for criterion in story.criteria:\n        # Positive scenario\n        lines.append(f\"  @{criterion.criterion_id} @positive\")\n        lines.append(f\"  Scenario: {criterion.trigger} - happy path\")\n        for pre in criterion.preconditions:\n            lines.append(f\"    Given {pre}\")\n        lines.append(f\"    When {criterion.trigger}\")\n        lines.append(f\"    Then {criterion.expected_outcome}\")\n        for rule in criterion.business_rules:\n            lines.append(f\"    And {rule}\")\n        lines.append(\"\")\n\n    return \"\\n\".join(lines)\n```\n\n### Java Implementation: Generating Test Cases\n\nFor Java teams using Cucumber-JVM, the approach translates to the following structure.\n\n```java\n\u002F\u002F src\u002Ftest\u002Fjava\u002Fgenerators\u002FStoryParser.java\n\npackage generators;\n\nimport java.util.*;\nimport java.util.regex.*;\n\npublic class StoryParser {\n\n    public record InputParameter(\n        String name,\n        String type,\n        List\u003CString> constraints,\n        String extractedFrom\n    ) {}\n\n    public record ParsedCriterion(\n        String criterionId,\n        List\u003CString> preconditions,\n        String trigger,\n        String expectedOutcome,\n        List\u003CString> businessRules,\n        List\u003CInputParameter> inputParameters\n    ) {}\n\n    public record ParsedStory(\n        String storyId,\n        String actor,\n        String action,\n        String benefit,\n        List\u003CParsedCriterion> criteria,\n        List\u003CString> implicitRequirements\n    ) {}\n\n    public static List\u003CInputParameter> extractInputParameters(List\u003CString> rules) {\n        List\u003CInputParameter> params = new ArrayList\u003C>();\n\n        for (String rule : rules) {\n            \u002F\u002F Pattern: \"X must be Y-Z characters\"\n            Matcher charMatch = Pattern.compile(\n                \"(\\\\w+)\\\\s+must\\\\s+be\\\\s+(\\\\d+)-(\\\\d+)\\\\s+characters\",\n                Pattern.CASE_INSENSITIVE\n            ).matcher(rule);\n\n            if (charMatch.find()) {\n                params.add(new InputParameter(\n                    charMatch.group(1).toLowerCase(),\n                    \"string\",\n                    List.of(\n                        \"minLength:\" + charMatch.group(2),\n                        \"maxLength:\" + charMatch.group(3)\n                    ),\n                    rule\n                ));\n            }\n\n            \u002F\u002F Pattern: \"X must be between Y and Z\"\n            Matcher rangeMatch = Pattern.compile(\n                \"(\\\\w+)\\\\s+must\\\\s+be\\\\s+between\\\\s+(\\\\d+)\\\\s+and\\\\s+(\\\\d+)\",\n                Pattern.CASE_INSENSITIVE\n            ).matcher(rule);\n\n            if (rangeMatch.find()) {\n                params.add(new InputParameter(\n                    rangeMatch.group(1).toLowerCase(),\n                    \"number\",\n                    List.of(\n                        \"min:\" + rangeMatch.group(2),\n                        \"max:\" + rangeMatch.group(3)\n                    ),\n                    rule\n                ));\n            }\n        }\n\n        return params;\n    }\n}\n```\n\n## Best Practices\n\n1. **Start with acceptance criteria, not implementation** -- Generate test cases from the requirements as written, not from how you think the system works. This prevents tests that merely confirm existing behavior rather than validating intended behavior.\n\n2. **Generate negative scenarios for every positive path** -- If the acceptance criterion says \"user can log in with valid credentials,\" generate explicit scenarios for invalid credentials, expired accounts, locked accounts, and missing fields.\n\n3. **Use Scenario Outlines for data-driven tests** -- When multiple equivalence classes test the same flow with different data, use Gherkin Scenario Outlines with Examples tables rather than duplicating scenarios.\n\n4. **Tag scenarios for selective execution** -- Tag scenarios by priority (@P0, @P1), type (@positive, @negative, @boundary), and feature area (@auth, @cart). This enables targeted test runs in CI.\n\n5. **Review generated scenarios with business stakeholders** -- Gherkin is readable by non-technical stakeholders. Use generated scenarios as a review artifact to validate that all acceptance criteria are covered.\n\n6. **Regenerate when requirements change** -- When acceptance criteria are updated, re-run the generator to identify new test cases and flag obsolete ones. The traceability matrix makes change impact analysis straightforward.\n\n7. **Supplement generated tests with exploratory scenarios** -- Generators cover systematic cases but miss creative edge cases. Augment generated suites with manually written scenarios discovered through exploratory testing.\n\n8. **Keep feature files focused** -- One feature file per user story. Do not combine unrelated stories into a single feature file. This maintains the traceability link between stories and tests.\n\n9. **Validate Gherkin syntax before committing** -- Use a Gherkin linter (cucumber-lint, gherkin-lint) to ensure generated feature files have valid syntax and consistent formatting.\n\n10. **Generate cross-cutting concern tests separately** -- Security, performance, and accessibility tests that apply to all features should be in dedicated feature files, not scattered across individual story features.\n\n## Anti-Patterns to Avoid\n\n1. **Generating tests without reading the story** -- Blindly applying templates without understanding the business context produces irrelevant test cases. Always read and parse the full user story narrative before generating.\n\n2. **Ignoring implicit requirements** -- User stories rarely capture security, performance, and accessibility requirements explicitly. If you only generate tests for stated criteria, you miss critical coverage areas.\n\n3. **Over-generating trivial tests** -- Not every equivalence class needs its own scenario. A password field with 56 boundary values does not need 56 separate scenarios. Use Scenario Outlines and focus on the most informative values.\n\n4. **Generating without prioritizing** -- A flat list of 200 test cases with no priority is unusable. Every generated test must have a risk-based priority that determines execution order.\n\n5. **Treating generated tests as final** -- Generated scenarios are a starting point, not a finished product. They need human review, refinement, and augmentation with domain-specific edge cases that no generator can anticipate.\n\n6. **Duplicating step definitions** -- Generated step definitions should be reusable. \"Given I am on the registration page\" should be one step definition used across all scenarios, not duplicated in every feature file.\n\n7. **Ignoring the traceability matrix** -- If you generate tests but do not maintain the traceability link to requirements, you lose the ability to assess coverage gaps and change impact.\n\n## Debugging Tips\n\n- **Parser misses parameters**: If the story parser fails to extract input parameters, check the phrasing of business rules. The parser expects specific patterns like \"must be X-Y characters\" or \"must be between X and Y.\" Adjust regex patterns for your team's writing style.\n\n- **Too many equivalence classes generated**: If the generator produces an overwhelming number of classes, check whether it is generating redundant classes for overlapping constraints. Deduplicate classes with the same representative values.\n\n- **Gherkin syntax errors in generated files**: Ensure that quotes, special characters, and line breaks in acceptance criteria are properly escaped before inserting into Gherkin templates. Use a Gherkin parser to validate output.\n\n- **Cucumber cannot find step definitions**: Generated step definitions use exact string matching. If the Gherkin scenario uses \"I submit a valid email and password\" but the step definition expects \"I submit valid email and password,\" the step will not match. Normalize articles and prepositions.\n\n- **Traceability matrix shows low coverage**: If coverage appears low, check whether the generator is correctly identifying all acceptance criteria from the source stories. Stories with non-standard formatting (missing Given\u002FWhen\u002FThen structure) may be partially parsed.\n\n- **Priority calculator assigns everything as P1**: If risk scores are uniformly high, recalibrate the weights and thresholds. Ensure that the business impact, failure likelihood, and complexity inputs vary across scenarios rather than defaulting to maximum values.\n\n- **Generated feature files are too long**: If a single feature file exceeds 200 lines, the source user story may be too large. Consider splitting the story into smaller stories with focused acceptance criteria before generating tests.\n\n- **Step definition collisions**: When multiple feature files generate similar step definitions, Cucumber may raise ambiguous step errors. Use parameterized steps with regular expressions to handle variations rather than creating nearly-identical literal steps.\n","# Test Case Generator from User Stories Skill\n\nYou are an expert QA engineer specializing in systematic test case generation from user stories and acceptance criteria. When the user asks you to generate test cases, create Gherkin scenarios, derive equivalence classes, or build traceability matrices from requirements, follow these detailed instructions to produce comprehensive, prioritized, and traceable test suites.\n\n## Core Principles\n\n1. **Parse before generating** -- Before writing any test case, fully parse the user story format (\"As a... I want... So that...\") and extract every testable acceptance criterion. Missing this step leads to incomplete coverage.\n2. **Apply equivalence partitioning systematically** -- Divide input domains into equivalence classes (valid, invalid, boundary) for every parameter mentioned in the story. Each class needs at least one representative test case.\n3. **Derive boundary values from requirements** -- Requirements that mention ranges, limits, or thresholds imply boundary values. Extract and test at the boundary, one below, and one above.\n4. **Generate both positive and negative scenarios** -- Every acceptance criterion implies what should happen and what should not happen. Generate explicit negative test cases for every positive scenario.\n5. **Use Gherkin for traceability** -- BDD scenarios in Given\u002FWhen\u002FThen format provide a natural link between requirements and test cases. Every scenario should trace back to a specific acceptance criterion.\n6. **Prioritize by risk, not by order** -- Not all test cases have equal value. Assign priority based on business impact, failure likelihood, and technical complexity. High-risk scenarios run first.\n7. **Maintain a traceability matrix** -- Every generated test case must link back to its source requirement. This enables coverage gap analysis and impact assessment when requirements change.\n8. **Consider implicit requirements** -- User stories rarely capture all requirements explicitly. Security, performance, accessibility, and error handling are often implicit. Generate test cases for these cross-cutting concerns.\n\n## Project Structure\n\n```\ntests\u002F\n  generated\u002F\n    features\u002F\n      user-authentication.feature\n      shopping-cart.feature\n      payment-processing.feature\n    step-definitions\u002F\n      user-authentication.steps.ts\n      shopping-cart.steps.ts\n      payment-processing.steps.ts\n    equivalence-classes\u002F\n      authentication-classes.ts\n      cart-classes.ts\n      payment-classes.ts\n    traceability\u002F\n      traceability-matrix.json\n      coverage-report.ts\n  generators\u002F\n    story-parser.ts\n    scenario-generator.ts\n    equivalence-generator.ts\n    boundary-generator.ts\n    negative-scenario-generator.ts\n    priority-calculator.ts\n    traceability-builder.ts\n    gherkin-formatter.ts\n  fixtures\u002F\n    sample-stories.ts\n    domain-rules.ts\n  utils\u002F\n    nlp-helpers.ts\n    gherkin-validator.ts\ncucumber.config.ts\n```\n\n## Configuration\n\n```typescript\n\u002F\u002F cucumber.config.ts\nexport default {\n  default: {\n    paths: ['tests\u002Fgenerated\u002Ffeatures\u002F**\u002F*.feature'],\n    require: ['tests\u002Fgenerated\u002Fstep-definitions\u002F**\u002F*.ts'],\n    requireModule: ['ts-node\u002Fregister'],\n    format: [\n      'progress-bar',\n      'html:reports\u002Fcucumber-report.html',\n      'json:reports\u002Fcucumber-report.json',\n    ],\n    formatOptions: {\n      snippetInterface: 'async-await',\n    },\n    publishQuiet: true,\n  },\n};\n```\n\n```typescript\n\u002F\u002F tests\u002Ffixtures\u002Fsample-stories.ts\n\nexport interface UserStory {\n  id: string;\n  title: string;\n  narrative: {\n    asA: string;\n    iWant: string;\n    soThat: string;\n  };\n  acceptanceCriteria: AcceptanceCriterion[];\n  priority: 'critical' | 'high' | 'medium' | 'low';\n  tags?: string[];\n}\n\nexport interface AcceptanceCriterion {\n  id: string;\n  given: string;\n  when: string;\n  then: string;\n  rules?: string[];\n}\n\nexport const sampleStories: UserStory[] = [\n  {\n    id: 'US-101',\n    title: 'User Registration',\n    narrative: {\n      asA: 'new visitor',\n      iWant: 'to create an account with my email and password',\n      soThat: 'I can access personalized features',\n    },\n    acceptanceCriteria: [\n      {\n        id: 'AC-101-1',\n        given: 'I am on the registration page',\n        when: 'I submit a valid email and password',\n        then: 'my account is created and I am logged in',\n        rules: [\n          'Email must be a valid email format',\n          'Password must be 8-64 characters',\n          'Password must contain at least one uppercase letter, one lowercase letter, and one number',\n          'Email must not already be registered',\n        ],\n      },\n      {\n        id: 'AC-101-2',\n        given: 'I am on the registration page',\n        when: 'I submit an email that is already registered',\n        then: 'I see an error message without revealing whether the email exists',\n      },\n      {\n        id: 'AC-101-3',\n        given: 'I am on the registration page',\n        when: 'I submit a password that does not meet requirements',\n        then: 'I see specific validation messages for each unmet requirement',\n      },\n    ],\n    priority: 'critical',\n    tags: ['authentication', 'registration'],\n  },\n  {\n    id: 'US-102',\n    title: 'Add Item to Shopping Cart',\n    narrative: {\n      asA: 'logged-in customer',\n      iWant: 'to add products to my shopping cart',\n      soThat: 'I can purchase them later',\n    },\n    acceptanceCriteria: [\n      {\n        id: 'AC-102-1',\n        given: 'I am viewing a product detail page',\n        when: 'I click \"Add to Cart\" with a valid quantity',\n        then: 'the item is added to my cart and the cart count updates',\n        rules: [\n          'Quantity must be between 1 and 99',\n          'Item must be in stock',\n          'Cart total must not exceed 50 items',\n        ],\n      },\n      {\n        id: 'AC-102-2',\n        given: 'I am viewing a product that is out of stock',\n        when: 'I attempt to add it to my cart',\n        then: 'the Add to Cart button is disabled and I see an \"Out of Stock\" message',\n      },\n    ],\n    priority: 'high',\n    tags: ['shopping', 'cart'],\n  },\n];\n```\n\n## How-To Guides\n\n### Parsing User Stories and Extracting Testable Criteria\n\nThe first step in test generation is systematically parsing user stories to identify all testable aspects.\n\n```typescript\n\u002F\u002F tests\u002Fgenerators\u002Fstory-parser.ts\n\nimport { UserStory, AcceptanceCriterion } from '..\u002Ffixtures\u002Fsample-stories';\n\nexport interface ParsedStory {\n  storyId: string;\n  actor: string;\n  action: string;\n  benefit: string;\n  criteria: ParsedCriterion[];\n  implicitRequirements: string[];\n}\n\nexport interface ParsedCriterion {\n  criterionId: string;\n  preconditions: string[];\n  trigger: string;\n  expectedOutcome: string;\n  businessRules: string[];\n  inputParameters: InputParameter[];\n}\n\nexport interface InputParameter {\n  name: string;\n  type: 'string' | 'number' | 'email' | 'date' | 'enum' | 'boolean';\n  constraints: string[];\n  extractedFrom: string;\n}\n\n\u002F**\n * Parse a user story into structured, testable components.\n *\u002F\nexport function parseUserStory(story: UserStory): ParsedStory {\n  const criteria = story.acceptanceCriteria.map((ac) => parseCriterion(ac));\n\n  \u002F\u002F Extract implicit requirements that are not stated but should be tested\n  const implicitRequirements = deriveImplicitRequirements(story);\n\n  return {\n    storyId: story.id,\n    actor: story.narrative.asA,\n    action: story.narrative.iWant,\n    benefit: story.narrative.soThat,\n    criteria,\n    implicitRequirements,\n  };\n}\n\nfunction parseCriterion(ac: AcceptanceCriterion): ParsedCriterion {\n  const inputParameters = extractInputParameters(ac);\n\n  return {\n    criterionId: ac.id,\n    preconditions: [ac.given],\n    trigger: ac.when,\n    expectedOutcome: ac.then,\n    businessRules: ac.rules || [],\n    inputParameters,\n  };\n}\n\nfunction extractInputParameters(ac: AcceptanceCriterion): InputParameter[] {\n  const params: InputParameter[] = [];\n\n  \u002F\u002F Parse rules to extract input constraints\n  for (const rule of ac.rules || []) {\n    \u002F\u002F Pattern: \"X must be Y-Z characters\"\n    const charLengthMatch = rule.match(\u002F(\\w+)\\s+must\\s+be\\s+(\\d+)-(\\d+)\\s+characters\u002Fi);\n    if (charLengthMatch) {\n      params.push({\n        name: charLengthMatch[1].toLowerCase(),\n        type: 'string',\n        constraints: [`minLength:${charLengthMatch[2]}`, `maxLength:${charLengthMatch[3]}`],\n        extractedFrom: rule,\n      });\n    }\n\n    \u002F\u002F Pattern: \"X must be a valid email\"\n    const emailMatch = rule.match(\u002F(\\w+)\\s+must\\s+be\\s+a\\s+valid\\s+email\u002Fi);\n    if (emailMatch) {\n      params.push({\n        name: emailMatch[1].toLowerCase(),\n        type: 'email',\n        constraints: ['validFormat'],\n        extractedFrom: rule,\n      });\n    }\n\n    \u002F\u002F Pattern: \"X must be between Y and Z\"\n    const rangeMatch = rule.match(\u002F(\\w+)\\s+must\\s+be\\s+between\\s+(\\d+)\\s+and\\s+(\\d+)\u002Fi);\n    if (rangeMatch) {\n      params.push({\n        name: rangeMatch[1].toLowerCase(),\n        type: 'number',\n        constraints: [`min:${rangeMatch[2]}`, `max:${rangeMatch[3]}`],\n        extractedFrom: rule,\n      });\n    }\n\n    \u002F\u002F Pattern: \"must contain at least one X\"\n    const containsMatch = rule.match(\u002Fmust\\s+contain\\s+at\\s+least\\s+one\\s+([\\w\\s]+)\u002Fi);\n    if (containsMatch) {\n      params.push({\n        name: containsMatch[1].trim().replace(\u002F\\s+\u002Fg, '_'),\n        type: 'string',\n        constraints: [`contains:${containsMatch[1].trim()}`],\n        extractedFrom: rule,\n      });\n    }\n  }\n\n  return params;\n}\n\nfunction deriveImplicitRequirements(story: UserStory): string[] {\n  const implicit: string[] = [];\n\n  \u002F\u002F Security: all forms need CSRF protection\n  if (story.acceptanceCriteria.some((ac) => ac.when.includes('submit'))) {\n    implicit.push('Form submission must include CSRF token validation');\n  }\n\n  \u002F\u002F Accessibility: all interactive elements need keyboard support\n  implicit.push('All interactive elements must be keyboard accessible');\n\n  \u002F\u002F Performance: page load within budget\n  implicit.push('Page must load within 3 seconds');\n\n  \u002F\u002F Error handling: generic error fallback\n  implicit.push('Server errors must show user-friendly error message');\n\n  \u002F\u002F Authentication stories need rate limiting\n  if (story.tags?.includes('authentication')) {\n    implicit.push('Authentication endpoints must have rate limiting');\n    implicit.push('Failed attempts must not reveal whether the account exists');\n  }\n\n  return implicit;\n}\n```\n\n### Generating Equivalence Classes\n\nEquivalence partitioning divides input domains into classes where all values in a class are expected to produce the same behavior. This reduces the number of test cases while maintaining coverage.\n\n```typescript\n\u002F\u002F tests\u002Fgenerators\u002Fequivalence-generator.ts\n\nimport { InputParameter, ParsedCriterion } from '.\u002Fstory-parser';\n\nexport interface EquivalenceClass {\n  parameterId: string;\n  parameterName: string;\n  className: string;\n  type: 'valid' | 'invalid' | 'boundary';\n  representative: string | number;\n  description: string;\n}\n\n\u002F**\n * Generate equivalence classes for all input parameters of a parsed criterion.\n *\u002F\nexport function generateEquivalenceClasses(\n  criterion: ParsedCriterion\n): EquivalenceClass[] {\n  const classes: EquivalenceClass[] = [];\n\n  for (const param of criterion.inputParameters) {\n    classes.push(...generateClassesForParameter(param));\n  }\n\n  return classes;\n}\n\nfunction generateClassesForParameter(param: InputParameter): EquivalenceClass[] {\n  const classes: EquivalenceClass[] = [];\n  const baseName = param.name;\n\n  switch (param.type) {\n    case 'email':\n      classes.push(\n        { parameterId: baseName, parameterName: baseName, className: 'Valid email', type: 'valid', representative: 'user@example.com', description: 'Standard email format' },\n        { parameterId: baseName, parameterName: baseName, className: 'Email with subdomain', type: 'valid', representative: 'user@mail.example.com', description: 'Email with subdomain' },\n        { parameterId: baseName, parameterName: baseName, className: 'Email with plus alias', type: 'valid', representative: 'user+tag@example.com', description: 'Email with plus addressing' },\n        { parameterId: baseName, parameterName: baseName, className: 'Missing @ symbol', type: 'invalid', representative: 'userexample.com', description: 'Email without @ symbol' },\n        { parameterId: baseName, parameterName: baseName, className: 'Missing domain', type: 'invalid', representative: 'user@', description: 'Email without domain' },\n        { parameterId: baseName, parameterName: baseName, className: 'Missing local part', type: 'invalid', representative: '@example.com', description: 'Email without local part' },\n        { parameterId: baseName, parameterName: baseName, className: 'Double dots', type: 'invalid', representative: 'user@example..com', description: 'Domain with consecutive dots' },\n        { parameterId: baseName, parameterName: baseName, className: 'Empty string', type: 'invalid', representative: '', description: 'Empty email field' },\n      );\n      break;\n\n    case 'string': {\n      const minLength = extractConstraintValue(param.constraints, 'minLength');\n      const maxLength = extractConstraintValue(param.constraints, 'maxLength');\n\n      if (minLength !== null && maxLength !== null) {\n        classes.push(\n          { parameterId: baseName, parameterName: baseName, className: 'At minimum length', type: 'boundary', representative: 'a'.repeat(minLength), description: `Exactly ${minLength} characters` },\n          { parameterId: baseName, parameterName: baseName, className: 'Below minimum', type: 'invalid', representative: 'a'.repeat(Math.max(0, minLength - 1)), description: `${minLength - 1} characters` },\n          { parameterId: baseName, parameterName: baseName, className: 'At maximum length', type: 'boundary', representative: 'a'.repeat(maxLength), description: `Exactly ${maxLength} characters` },\n          { parameterId: baseName, parameterName: baseName, className: 'Above maximum', type: 'invalid', representative: 'a'.repeat(maxLength + 1), description: `${maxLength + 1} characters` },\n          { parameterId: baseName, parameterName: baseName, className: 'Mid-range valid', type: 'valid', representative: 'a'.repeat(Math.floor((minLength + maxLength) \u002F 2)), description: 'Middle of valid range' },\n          { parameterId: baseName, parameterName: baseName, className: 'Empty string', type: 'invalid', representative: '', description: 'Empty field' },\n        );\n      }\n      break;\n    }\n\n    case 'number': {\n      const min = extractConstraintValue(param.constraints, 'min');\n      const max = extractConstraintValue(param.constraints, 'max');\n\n      if (min !== null && max !== null) {\n        classes.push(\n          { parameterId: baseName, parameterName: baseName, className: 'Minimum value', type: 'boundary', representative: min, description: `Exactly ${min}` },\n          { parameterId: baseName, parameterName: baseName, className: 'Below minimum', type: 'invalid', representative: min - 1, description: `${min - 1} (below minimum)` },\n          { parameterId: baseName, parameterName: baseName, className: 'Maximum value', type: 'boundary', representative: max, description: `Exactly ${max}` },\n          { parameterId: baseName, parameterName: baseName, className: 'Above maximum', type: 'invalid', representative: max + 1, description: `${max + 1} (above maximum)` },\n          { parameterId: baseName, parameterName: baseName, className: 'Mid-range valid', type: 'valid', representative: Math.floor((min + max) \u002F 2), description: 'Middle of valid range' },\n          { parameterId: baseName, parameterName: baseName, className: 'Zero', type: min > 0 ? 'invalid' : 'valid', representative: 0, description: 'Zero value' },\n          { parameterId: baseName, parameterName: baseName, className: 'Negative', type: 'invalid', representative: -1, description: 'Negative value' },\n        );\n      }\n      break;\n    }\n  }\n\n  return classes;\n}\n\nfunction extractConstraintValue(constraints: string[], prefix: string): number | null {\n  const constraint = constraints.find((c) => c.startsWith(`${prefix}:`));\n  if (!constraint) return null;\n  return parseInt(constraint.split(':')[1], 10);\n}\n```\n\n### Generating Gherkin Scenarios from Parsed Stories\n\nTransform parsed user stories and equivalence classes into Gherkin feature files with complete Given\u002FWhen\u002FThen scenarios.\n\n```typescript\n\u002F\u002F tests\u002Fgenerators\u002Fgherkin-formatter.ts\n\nimport { ParsedStory, ParsedCriterion } from '.\u002Fstory-parser';\nimport { EquivalenceClass, generateEquivalenceClasses } from '.\u002Fequivalence-generator';\n\n\u002F**\n * Generate a complete Gherkin feature file from a parsed user story.\n *\u002F\nexport function generateFeatureFile(story: ParsedStory): string {\n  const lines: string[] = [];\n\n  \u002F\u002F Feature header\n  lines.push(`@${story.storyId.replace(\u002F[^a-zA-Z0-9]\u002Fg, '-')}`);\n  lines.push(`Feature: ${story.action}`);\n  lines.push(`  As a ${story.actor}`);\n  lines.push(`  I want ${story.action}`);\n  lines.push(`  So that ${story.benefit}`);\n  lines.push('');\n\n  \u002F\u002F Background (common preconditions)\n  const commonPreconditions = extractCommonPreconditions(story.criteria);\n  if (commonPreconditions.length > 0) {\n    lines.push('  Background:');\n    for (const precondition of commonPreconditions) {\n      lines.push(`    Given ${precondition}`);\n    }\n    lines.push('');\n  }\n\n  \u002F\u002F Generate scenarios for each criterion\n  for (const criterion of story.criteria) {\n    \u002F\u002F Positive scenario\n    lines.push(...generatePositiveScenario(criterion));\n    lines.push('');\n\n    \u002F\u002F Negative scenarios from equivalence classes\n    const eqClasses = generateEquivalenceClasses(criterion);\n    const invalidClasses = eqClasses.filter((ec) => ec.type === 'invalid');\n\n    for (const invalidClass of invalidClasses) {\n      lines.push(...generateNegativeScenario(criterion, invalidClass));\n      lines.push('');\n    }\n\n    \u002F\u002F Boundary scenarios\n    const boundaryClasses = eqClasses.filter((ec) => ec.type === 'boundary');\n    if (boundaryClasses.length > 0) {\n      lines.push(...generateBoundaryScenarioOutline(criterion, boundaryClasses));\n      lines.push('');\n    }\n  }\n\n  \u002F\u002F Implicit requirement scenarios\n  for (const implicit of story.implicitRequirements) {\n    lines.push(`  @implicit @non-functional`);\n    lines.push(`  Scenario: ${implicit}`);\n    lines.push(`    Given the application is running`);\n    lines.push(`    Then ${implicit.toLowerCase()}`);\n    lines.push('');\n  }\n\n  return lines.join('\\n');\n}\n\nfunction generatePositiveScenario(criterion: ParsedCriterion): string[] {\n  const lines: string[] = [];\n\n  lines.push(`  @${criterion.criterionId.replace(\u002F[^a-zA-Z0-9]\u002Fg, '-')} @positive`);\n  lines.push(`  Scenario: ${criterion.trigger} - happy path`);\n\n  for (const precondition of criterion.preconditions) {\n    lines.push(`    Given ${precondition}`);\n  }\n\n  lines.push(`    When ${criterion.trigger}`);\n  lines.push(`    Then ${criterion.expectedOutcome}`);\n\n  for (const rule of criterion.businessRules) {\n    lines.push(`    And ${rule}`);\n  }\n\n  return lines;\n}\n\nfunction generateNegativeScenario(\n  criterion: ParsedCriterion,\n  invalidClass: EquivalenceClass\n): string[] {\n  const lines: string[] = [];\n\n  lines.push(`  @${criterion.criterionId.replace(\u002F[^a-zA-Z0-9]\u002Fg, '-')} @negative`);\n  lines.push(\n    `  Scenario: Reject ${invalidClass.parameterName} - ${invalidClass.className}`\n  );\n\n  for (const precondition of criterion.preconditions) {\n    lines.push(`    Given ${precondition}`);\n  }\n\n  lines.push(\n    `    When I provide ${invalidClass.parameterName} as \"${invalidClass.representative}\"`\n  );\n  lines.push(\n    `    Then I should see a validation error for ${invalidClass.parameterName}`\n  );\n  lines.push(`    And the ${invalidClass.parameterName} error explains \"${invalidClass.description}\"`);\n\n  return lines;\n}\n\nfunction generateBoundaryScenarioOutline(\n  criterion: ParsedCriterion,\n  boundaryClasses: EquivalenceClass[]\n): string[] {\n  const lines: string[] = [];\n\n  lines.push(`  @${criterion.criterionId.replace(\u002F[^a-zA-Z0-9]\u002Fg, '-')} @boundary`);\n  lines.push(`  Scenario Outline: Boundary values for ${criterion.trigger}`);\n\n  for (const precondition of criterion.preconditions) {\n    lines.push(`    Given ${precondition}`);\n  }\n\n  lines.push(`    When I provide \u003Cparameter> as \"\u003Cvalue>\"`);\n  lines.push(`    Then the result should be \"\u003Cexpected>\"`);\n  lines.push('');\n  lines.push('    Examples:');\n  lines.push('      | parameter | value | expected |');\n\n  for (const boundary of boundaryClasses) {\n    lines.push(\n      `      | ${boundary.parameterName} | ${boundary.representative} | accepted |`\n    );\n  }\n\n  return lines;\n}\n\nfunction extractCommonPreconditions(criteria: ParsedCriterion[]): string[] {\n  if (criteria.length \u003C 2) return [];\n\n  const allPreconditions = criteria.map((c) => c.preconditions);\n  return allPreconditions[0].filter((p) =>\n    allPreconditions.every((pList) => pList.includes(p))\n  );\n}\n```\n\n### Generating Cucumber Step Definitions\n\nCreate step definition templates that connect Gherkin scenarios to executable test code.\n\n```typescript\n\u002F\u002F tests\u002Fgenerators\u002Fscenario-generator.ts\n\nimport { ParsedStory } from '.\u002Fstory-parser';\n\n\u002F**\n * Generate Cucumber step definitions for a parsed user story.\n *\u002F\nexport function generateStepDefinitions(story: ParsedStory): string {\n  const lines: string[] = [];\n\n  lines.push(`import { Given, When, Then } from '@cucumber\u002Fcucumber';`);\n  lines.push(`import { expect } from '@playwright\u002Ftest';`);\n  lines.push(`import { page } from '..\u002Fsupport\u002Fworld';`);\n  lines.push('');\n\n  const steps = new Set\u003Cstring>();\n\n  for (const criterion of story.criteria) {\n    \u002F\u002F Given steps\n    for (const precondition of criterion.preconditions) {\n      const stepKey = `Given:${precondition}`;\n      if (!steps.has(stepKey)) {\n        steps.add(stepKey);\n        lines.push(`Given('${escapeGherkin(precondition)}', async function () {`);\n        lines.push(`  \u002F\u002F Navigate to the appropriate page`);\n        lines.push(`  await page.goto('\u002F');`);\n        lines.push(`  \u002F\u002F TODO: Implement precondition setup`);\n        lines.push(`});`);\n        lines.push('');\n      }\n    }\n\n    \u002F\u002F When steps\n    const whenKey = `When:${criterion.trigger}`;\n    if (!steps.has(whenKey)) {\n      steps.add(whenKey);\n      lines.push(`When('${escapeGherkin(criterion.trigger)}', async function () {`);\n      lines.push(`  \u002F\u002F TODO: Implement action`);\n      lines.push(`});`);\n      lines.push('');\n    }\n\n    \u002F\u002F Then steps\n    const thenKey = `Then:${criterion.expectedOutcome}`;\n    if (!steps.has(thenKey)) {\n      steps.add(thenKey);\n      lines.push(`Then('${escapeGherkin(criterion.expectedOutcome)}', async function () {`);\n      lines.push(`  \u002F\u002F TODO: Implement assertion`);\n      lines.push(`});`);\n      lines.push('');\n    }\n  }\n\n  \u002F\u002F Parameterized steps for equivalence classes\n  lines.push(`When('I provide {word} as {string}', async function (parameter: string, value: string) {`);\n  lines.push(`  const input = page.getByTestId(\\`input-\\${parameter}\\`);`);\n  lines.push(`  await input.clear();`);\n  lines.push(`  await input.fill(value);`);\n  lines.push(`});`);\n  lines.push('');\n\n  lines.push(`Then('I should see a validation error for {word}', async function (parameter: string) {`);\n  lines.push(`  const error = page.getByTestId(\\`error-\\${parameter}\\`);`);\n  lines.push(`  await expect(error).toBeVisible();`);\n  lines.push(`});`);\n  lines.push('');\n\n  lines.push(`Then('the {word} error explains {string}', async function (parameter: string, message: string) {`);\n  lines.push(`  const error = page.getByTestId(\\`error-\\${parameter}\\`);`);\n  lines.push(`  const text = await error.textContent();`);\n  lines.push(`  expect(text).toBeTruthy();`);\n  lines.push(`});`);\n\n  return lines.join('\\n');\n}\n\nfunction escapeGherkin(text: string): string {\n  return text.replace(\u002F'\u002Fg, \"\\\\'\");\n}\n```\n\n### Building a Risk-Based Priority Calculator\n\nNot all test cases are equally important. This calculator assigns priority based on business impact, failure probability, and complexity.\n\n```typescript\n\u002F\u002F tests\u002Fgenerators\u002Fpriority-calculator.ts\n\nexport interface RiskAssessment {\n  scenarioId: string;\n  businessImpact: 1 | 2 | 3 | 4 | 5;  \u002F\u002F 5 = critical\n  failureLikelihood: 1 | 2 | 3 | 4 | 5; \u002F\u002F 5 = very likely\n  complexity: 1 | 2 | 3 | 4 | 5;        \u002F\u002F 5 = very complex\n  riskScore: number;\n  priority: 'P0-critical' | 'P1-high' | 'P2-medium' | 'P3-low';\n}\n\nexport function calculateRiskPriority(\n  scenarioId: string,\n  storyPriority: 'critical' | 'high' | 'medium' | 'low',\n  scenarioType: 'positive' | 'negative' | 'boundary' | 'implicit',\n  affectsPayment: boolean,\n  affectsAuth: boolean,\n  affectsData: boolean\n): RiskAssessment {\n  \u002F\u002F Business impact based on story priority and scenario characteristics\n  let businessImpact: 1 | 2 | 3 | 4 | 5 = 1;\n  const priorityMap = { critical: 5, high: 4, medium: 3, low: 2 } as const;\n  businessImpact = priorityMap[storyPriority] as 1 | 2 | 3 | 4 | 5;\n\n  if (affectsPayment) businessImpact = 5;\n  if (affectsAuth) businessImpact = Math.max(businessImpact, 4) as 1 | 2 | 3 | 4 | 5;\n\n  \u002F\u002F Failure likelihood based on scenario type\n  let failureLikelihood: 1 | 2 | 3 | 4 | 5 = 2;\n  switch (scenarioType) {\n    case 'boundary':\n      failureLikelihood = 4; \u002F\u002F Boundary cases are error-prone\n      break;\n    case 'negative':\n      failureLikelihood = 3; \u002F\u002F Negative paths are often under-tested\n      break;\n    case 'implicit':\n      failureLikelihood = 3; \u002F\u002F Implicit requirements are often missed\n      break;\n    case 'positive':\n      failureLikelihood = 2; \u002F\u002F Happy paths are usually tested\n      break;\n  }\n\n  \u002F\u002F Complexity\n  let complexity: 1 | 2 | 3 | 4 | 5 = 2;\n  if (affectsPayment) complexity = 5;\n  if (affectsData && affectsAuth) complexity = 4;\n\n  \u002F\u002F Risk score: weighted combination\n  const riskScore =\n    businessImpact * 0.5 + failureLikelihood * 0.3 + complexity * 0.2;\n\n  \u002F\u002F Priority classification\n  let priority: RiskAssessment['priority'];\n  if (riskScore >= 4.0) priority = 'P0-critical';\n  else if (riskScore >= 3.0) priority = 'P1-high';\n  else if (riskScore >= 2.0) priority = 'P2-medium';\n  else priority = 'P3-low';\n\n  return {\n    scenarioId,\n    businessImpact,\n    failureLikelihood,\n    complexity,\n    riskScore: Math.round(riskScore * 100) \u002F 100,\n    priority,\n  };\n}\n```\n\n### Building a Traceability Matrix\n\nA traceability matrix links every test case to its source requirement, enabling coverage analysis and change impact assessment.\n\n```typescript\n\u002F\u002F tests\u002Fgenerators\u002Ftraceability-builder.ts\n\nimport { ParsedStory } from '.\u002Fstory-parser';\nimport { EquivalenceClass } from '.\u002Fequivalence-generator';\n\nexport interface TraceabilityEntry {\n  testCaseId: string;\n  storyId: string;\n  criterionId: string;\n  scenarioType: 'positive' | 'negative' | 'boundary' | 'implicit';\n  scenarioTitle: string;\n  priority: string;\n  equivalenceClass?: string;\n  featureFile: string;\n  status: 'generated' | 'implemented' | 'passing' | 'failing' | 'skipped';\n}\n\nexport interface TraceabilityMatrix {\n  generated: string;\n  totalStories: number;\n  totalCriteria: number;\n  totalTestCases: number;\n  coverageByStory: Record\u003Cstring, { total: number; implemented: number; passing: number }>;\n  entries: TraceabilityEntry[];\n}\n\nexport function buildTraceabilityMatrix(\n  stories: ParsedStory[],\n  equivalenceClasses: Map\u003Cstring, EquivalenceClass[]>\n): TraceabilityMatrix {\n  const entries: TraceabilityEntry[] = [];\n  let testCaseCounter = 1;\n  let totalCriteria = 0;\n\n  for (const story of stories) {\n    for (const criterion of story.criteria) {\n      totalCriteria++;\n\n      \u002F\u002F Positive scenario\n      entries.push({\n        testCaseId: `TC-${String(testCaseCounter++).padStart(3, '0')}`,\n        storyId: story.storyId,\n        criterionId: criterion.criterionId,\n        scenarioType: 'positive',\n        scenarioTitle: `${criterion.trigger} - happy path`,\n        priority: 'P1-high',\n        featureFile: `${story.storyId.toLowerCase().replace(\u002F[^a-z0-9]\u002Fg, '-')}.feature`,\n        status: 'generated',\n      });\n\n      \u002F\u002F Equivalence class scenarios\n      const classes = equivalenceClasses.get(criterion.criterionId) || [];\n      for (const ec of classes) {\n        entries.push({\n          testCaseId: `TC-${String(testCaseCounter++).padStart(3, '0')}`,\n          storyId: story.storyId,\n          criterionId: criterion.criterionId,\n          scenarioType: ec.type === 'invalid' ? 'negative' : 'boundary',\n          scenarioTitle: `${ec.parameterName} - ${ec.className}`,\n          priority: ec.type === 'boundary' ? 'P1-high' : 'P2-medium',\n          equivalenceClass: ec.className,\n          featureFile: `${story.storyId.toLowerCase().replace(\u002F[^a-z0-9]\u002Fg, '-')}.feature`,\n          status: 'generated',\n        });\n      }\n    }\n\n    \u002F\u002F Implicit requirements\n    for (const implicit of story.implicitRequirements) {\n      entries.push({\n        testCaseId: `TC-${String(testCaseCounter++).padStart(3, '0')}`,\n        storyId: story.storyId,\n        criterionId: 'implicit',\n        scenarioType: 'implicit',\n        scenarioTitle: implicit,\n        priority: 'P2-medium',\n        featureFile: `${story.storyId.toLowerCase().replace(\u002F[^a-z0-9]\u002Fg, '-')}.feature`,\n        status: 'generated',\n      });\n    }\n  }\n\n  \u002F\u002F Build coverage summary\n  const coverageByStory: Record\u003Cstring, { total: number; implemented: number; passing: number }> = {};\n  for (const entry of entries) {\n    if (!coverageByStory[entry.storyId]) {\n      coverageByStory[entry.storyId] = { total: 0, implemented: 0, passing: 0 };\n    }\n    coverageByStory[entry.storyId].total++;\n    if (entry.status === 'implemented' || entry.status === 'passing') {\n      coverageByStory[entry.storyId].implemented++;\n    }\n    if (entry.status === 'passing') {\n      coverageByStory[entry.storyId].passing++;\n    }\n  }\n\n  return {\n    generated: new Date().toISOString(),\n    totalStories: stories.length,\n    totalCriteria,\n    totalTestCases: entries.length,\n    coverageByStory,\n    entries,\n  };\n}\n```\n\n### Python Implementation: Generating Test Cases from User Stories\n\nFor teams using Python with pytest-bdd, here is the equivalent test generation approach.\n\n```python\n# tests\u002Fgenerators\u002Fstory_parser.py\n\nfrom dataclasses import dataclass, field\nimport re\n\n\n@dataclass\nclass InputParameter:\n    name: str\n    param_type: str  # 'string', 'number', 'email', 'date'\n    constraints: list[str] = field(default_factory=list)\n    extracted_from: str = \"\"\n\n\n@dataclass\nclass ParsedCriterion:\n    criterion_id: str\n    preconditions: list[str]\n    trigger: str\n    expected_outcome: str\n    business_rules: list[str]\n    input_parameters: list[InputParameter]\n\n\n@dataclass\nclass ParsedStory:\n    story_id: str\n    actor: str\n    action: str\n    benefit: str\n    criteria: list[ParsedCriterion]\n    implicit_requirements: list[str]\n\n\ndef parse_user_story(story: dict) -> ParsedStory:\n    \"\"\"Parse a user story dictionary into structured components.\"\"\"\n    criteria = []\n    for ac in story.get(\"acceptance_criteria\", []):\n        params = extract_input_parameters(ac.get(\"rules\", []))\n        criteria.append(\n            ParsedCriterion(\n                criterion_id=ac[\"id\"],\n                preconditions=[ac[\"given\"]],\n                trigger=ac[\"when\"],\n                expected_outcome=ac[\"then\"],\n                business_rules=ac.get(\"rules\", []),\n                input_parameters=params,\n            )\n        )\n\n    implicit = derive_implicit_requirements(story)\n\n    return ParsedStory(\n        story_id=story[\"id\"],\n        actor=story[\"narrative\"][\"as_a\"],\n        action=story[\"narrative\"][\"i_want\"],\n        benefit=story[\"narrative\"][\"so_that\"],\n        criteria=criteria,\n        implicit_requirements=implicit,\n    )\n\n\ndef extract_input_parameters(rules: list[str]) -> list[InputParameter]:\n    \"\"\"Extract input parameters and their constraints from business rules.\"\"\"\n    params = []\n\n    for rule in rules:\n        # Pattern: \"X must be Y-Z characters\"\n        char_match = re.search(\n            r\"(\\w+)\\s+must\\s+be\\s+(\\d+)-(\\d+)\\s+characters\", rule, re.IGNORECASE\n        )\n        if char_match:\n            params.append(\n                InputParameter(\n                    name=char_match.group(1).lower(),\n                    param_type=\"string\",\n                    constraints=[\n                        f\"min_length:{char_match.group(2)}\",\n                        f\"max_length:{char_match.group(3)}\",\n                    ],\n                    extracted_from=rule,\n                )\n            )\n\n        # Pattern: \"X must be between Y and Z\"\n        range_match = re.search(\n            r\"(\\w+)\\s+must\\s+be\\s+between\\s+(\\d+)\\s+and\\s+(\\d+)\", rule, re.IGNORECASE\n        )\n        if range_match:\n            params.append(\n                InputParameter(\n                    name=range_match.group(1).lower(),\n                    param_type=\"number\",\n                    constraints=[\n                        f\"min:{range_match.group(2)}\",\n                        f\"max:{range_match.group(3)}\",\n                    ],\n                    extracted_from=rule,\n                )\n            )\n\n    return params\n\n\ndef derive_implicit_requirements(story: dict) -> list[str]:\n    \"\"\"Derive implicit requirements from story context.\"\"\"\n    implicit = [\n        \"All interactive elements must be keyboard accessible\",\n        \"Page must load within 3 seconds\",\n        \"Server errors must show user-friendly error message\",\n    ]\n\n    tags = story.get(\"tags\", [])\n    if \"authentication\" in tags:\n        implicit.append(\"Authentication endpoints must have rate limiting\")\n\n    return implicit\n```\n\n```python\n# tests\u002Fgenerators\u002Fgherkin_generator.py\n\nfrom story_parser import ParsedStory, ParsedCriterion\n\n\ndef generate_feature_file(story: ParsedStory) -> str:\n    \"\"\"Generate a complete Gherkin feature file from a parsed story.\"\"\"\n    lines = []\n\n    tag = story.story_id.replace(\" \", \"-\")\n    lines.append(f\"@{tag}\")\n    lines.append(f\"Feature: {story.action}\")\n    lines.append(f\"  As a {story.actor}\")\n    lines.append(f\"  I want {story.action}\")\n    lines.append(f\"  So that {story.benefit}\")\n    lines.append(\"\")\n\n    for criterion in story.criteria:\n        # Positive scenario\n        lines.append(f\"  @{criterion.criterion_id} @positive\")\n        lines.append(f\"  Scenario: {criterion.trigger} - happy path\")\n        for pre in criterion.preconditions:\n            lines.append(f\"    Given {pre}\")\n        lines.append(f\"    When {criterion.trigger}\")\n        lines.append(f\"    Then {criterion.expected_outcome}\")\n        for rule in criterion.business_rules:\n            lines.append(f\"    And {rule}\")\n        lines.append(\"\")\n\n    return \"\\n\".join(lines)\n```\n\n### Java Implementation: Generating Test Cases\n\nFor Java teams using Cucumber-JVM, the approach translates to the following structure.\n\n```java\n\u002F\u002F src\u002Ftest\u002Fjava\u002Fgenerators\u002FStoryParser.java\n\npackage generators;\n\nimport java.util.*;\nimport java.util.regex.*;\n\npublic class StoryParser {\n\n    public record InputParameter(\n        String name,\n        String type,\n        List\u003CString> constraints,\n        String extractedFrom\n    ) {}\n\n    public record ParsedCriterion(\n        String criterionId,\n        List\u003CString> preconditions,\n        String trigger,\n        String expectedOutcome,\n        List\u003CString> businessRules,\n        List\u003CInputParameter> inputParameters\n    ) {}\n\n    public record ParsedStory(\n        String storyId,\n        String actor,\n        String action,\n        String benefit,\n        List\u003CParsedCriterion> criteria,\n        List\u003CString> implicitRequirements\n    ) {}\n\n    public static List\u003CInputParameter> extractInputParameters(List\u003CString> rules) {\n        List\u003CInputParameter> params = new ArrayList\u003C>();\n\n        for (String rule : rules) {\n            \u002F\u002F Pattern: \"X must be Y-Z characters\"\n            Matcher charMatch = Pattern.compile(\n                \"(\\\\w+)\\\\s+must\\\\s+be\\\\s+(\\\\d+)-(\\\\d+)\\\\s+characters\",\n                Pattern.CASE_INSENSITIVE\n            ).matcher(rule);\n\n            if (charMatch.find()) {\n                params.add(new InputParameter(\n                    charMatch.group(1).toLowerCase(),\n                    \"string\",\n                    List.of(\n                        \"minLength:\" + charMatch.group(2),\n                        \"maxLength:\" + charMatch.group(3)\n                    ),\n                    rule\n                ));\n            }\n\n            \u002F\u002F Pattern: \"X must be between Y and Z\"\n            Matcher rangeMatch = Pattern.compile(\n                \"(\\\\w+)\\\\s+must\\\\s+be\\\\s+between\\\\s+(\\\\d+)\\\\s+and\\\\s+(\\\\d+)\",\n                Pattern.CASE_INSENSITIVE\n            ).matcher(rule);\n\n            if (rangeMatch.find()) {\n                params.add(new InputParameter(\n                    rangeMatch.group(1).toLowerCase(),\n                    \"number\",\n                    List.of(\n                        \"min:\" + rangeMatch.group(2),\n                        \"max:\" + rangeMatch.group(3)\n                    ),\n                    rule\n                ));\n            }\n        }\n\n        return params;\n    }\n}\n```\n\n## Best Practices\n\n1. **Start with acceptance criteria, not implementation** -- Generate test cases from the requirements as written, not from how you think the system works. This prevents tests that merely confirm existing behavior rather than validating intended behavior.\n\n2. **Generate negative scenarios for every positive path** -- If the acceptance criterion says \"user can log in with valid credentials,\" generate explicit scenarios for invalid credentials, expired accounts, locked accounts, and missing fields.\n\n3. **Use Scenario Outlines for data-driven tests** -- When multiple equivalence classes test the same flow with different data, use Gherkin Scenario Outlines with Examples tables rather than duplicating scenarios.\n\n4. **Tag scenarios for selective execution** -- Tag scenarios by priority (@P0, @P1), type (@positive, @negative, @boundary), and feature area (@auth, @cart). This enables targeted test runs in CI.\n\n5. **Review generated scenarios with business stakeholders** -- Gherkin is readable by non-technical stakeholders. Use generated scenarios as a review artifact to validate that all acceptance criteria are covered.\n\n6. **Regenerate when requirements change** -- When acceptance criteria are updated, re-run the generator to identify new test cases and flag obsolete ones. The traceability matrix makes change impact analysis straightforward.\n\n7. **Supplement generated tests with exploratory scenarios** -- Generators cover systematic cases but miss creative edge cases. Augment generated suites with manually written scenarios discovered through exploratory testing.\n\n8. **Keep feature files focused** -- One feature file per user story. Do not combine unrelated stories into a single feature file. This maintains the traceability link between stories and tests.\n\n9. **Validate Gherkin syntax before committing** -- Use a Gherkin linter (cucumber-lint, gherkin-lint) to ensure generated feature files have valid syntax and consistent formatting.\n\n10. **Generate cross-cutting concern tests separately** -- Security, performance, and accessibility tests that apply to all features should be in dedicated feature files, not scattered across individual story features.\n\n## Anti-Patterns to Avoid\n\n1. **Generating tests without reading the story** -- Blindly applying templates without understanding the business context produces irrelevant test cases. Always read and parse the full user story narrative before generating.\n\n2. **Ignoring implicit requirements** -- User stories rarely capture security, performance, and accessibility requirements explicitly. If you only generate tests for stated criteria, you miss critical coverage areas.\n\n3. **Over-generating trivial tests** -- Not every equivalence class needs its own scenario. A password field with 56 boundary values does not need 56 separate scenarios. Use Scenario Outlines and focus on the most informative values.\n\n4. **Generating without prioritizing** -- A flat list of 200 test cases with no priority is unusable. Every generated test must have a risk-based priority that determines execution order.\n\n5. **Treating generated tests as final** -- Generated scenarios are a starting point, not a finished product. They need human review, refinement, and augmentation with domain-specific edge cases that no generator can anticipate.\n\n6. **Duplicating step definitions** -- Generated step definitions should be reusable. \"Given I am on the registration page\" should be one step definition used across all scenarios, not duplicated in every feature file.\n\n7. **Ignoring the traceability matrix** -- If you generate tests but do not maintain the traceability link to requirements, you lose the ability to assess coverage gaps and change impact.\n\n## Debugging Tips\n\n- **Parser misses parameters**: If the story parser fails to extract input parameters, check the phrasing of business rules. The parser expects specific patterns like \"must be X-Y characters\" or \"must be between X and Y.\" Adjust regex patterns for your team's writing style.\n\n- **Too many equivalence classes generated**: If the generator produces an overwhelming number of classes, check whether it is generating redundant classes for overlapping constraints. Deduplicate classes with the same representative values.\n\n- **Gherkin syntax errors in generated files**: Ensure that quotes, special characters, and line breaks in acceptance criteria are properly escaped before inserting into Gherkin templates. Use a Gherkin parser to validate output.\n\n- **Cucumber cannot find step definitions**: Generated step definitions use exact string matching. If the Gherkin scenario uses \"I submit a valid email and password\" but the step definition expects \"I submit valid email and password,\" the step will not match. Normalize articles and prepositions.\n\n- **Traceability matrix shows low coverage**: If coverage appears low, check whether the generator is correctly identifying all acceptance criteria from the source stories. Stories with non-standard formatting (missing Given\u002FWhen\u002FThen structure) may be partially parsed.\n\n- **Priority calculator assigns everything as P1**: If risk scores are uniformly high, recalibrate the weights and thresholds. Ensure that the business impact, failure likelihood, and complexity inputs vary across scenarios rather than defaulting to maximum values.\n\n- **Generated feature files are too long**: If a single feature file exceeds 200 lines, the source user story may be too large. Consider splitting the story into smaller stories with focused acceptance criteria before generating tests.\n\n- **Step definition collisions**: When multiple feature files generate similar step definitions, Cucumber may raise ambiguous step errors. Use parameterized steps with regular expressions to handle variations rather than creating nearly-identical literal steps.\n",{"name":5,"tags":24,"agents":33,"author":46,"domains":47,"license":15,"version":50,"languages":51,"frameworks":56,"description":7,"testingTypes":58},[25,26,27,28,29,30,31,32],"test-generation","user-stories","bdd","acceptance-criteria","gherkin","test-design","equivalence-partitioning","risk-based",[34,35,36,37,38,39,40,41,42,43,44,45],"claude-code","cursor","github-copilot","windsurf","codex","aider","continue","cline","zed","bolt","gemini-cli","amp","Pramod",[48,49],"web","api","1.0.0",[52,53,54,55],"typescript","javascript","python","java",[57],"cucumber",[27,59],"tdd","main","eac438ea9216a7cb8a570cab803eb01eeafc6793","skills\u002Fqa\u002Ftest-case-generator-user-stories","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m","https:\u002F\u002Fid-preview--d5bef06d-6c9e-4563-a3d4-a855b9d61610.lovable.app\u002F","Eu sou Antonio B. B. Ndombe \r\nEu sou um Pesquisador e desenvolvedor de sistema autonomia cognitivos, fundador de sistemas ODCs ( organismos digital conscientes)","2026-11-04 06:53:39",{"source":8,"skillName":5,"commands":69,"prompt":79,"zipAvailable":80},[70,73,76],{"tool":71,"command":72},"npx","npx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Test Case Generator from User Stories\"",{"tool":74,"command":75},"bunx","bunx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Test Case Generator from User Stories\"",{"tool":77,"command":78},"pnpm","pnpm dlx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Test Case Generator from User Stories\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Ftest-case-generator-user-stories\u002FSKILL.md",true,[],[83,91,98,105,112,119],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7DASC6FSCJP49JZBSK0NY1Z","nemoclaw-user-reference","Describes the NemoClaw integration layer and blueprint architecture and how they orchestrate compatible agent sandboxes. Use when looking up architecture, agent integration, plugin structure, or blueprint design. Trigger keywords - nemoclaw architecture, nemoclaw agent architecture, nemoclaw plugin blueprint structure, nemoclaw vs openshell, which cli, nemoclaw cli, openshell cli, sandbox commands, nemoclaw cli commands, nemoclaw command reference, nemoclaw network policy, sandbox egress control operator approval, nemoclaw troubleshooting, nemoclaw debug sandbox issues.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-reference\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7DAS5S79VK33XFGVAM2TFWF","nemoclaw-user-overview","Explains how OpenClaw, OpenShell, and NemoClaw form the ecosystem, NemoClaw's position in the stack, what NemoClaw adds beyond the community sandbox, and when to prefer NemoClaw versus integrating OpenShell and OpenClaw directly. Use when users ask about the relationship between OpenClaw, OpenShell, and NemoClaw, or when to use NemoClaw versus OpenShell. Trigger keywords - nemoclaw ecosystem, openclaw openshell, nemoclaw vs openshell, sandboxed openclaw, how nemoclaw works, nemoclaw sandbox lifecycle blueprint, nemoclaw overview, openclaw always-on assistants, nvidia openshell, nvidia nemotron, nemoclaw release notes, nemoclaw changelog.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-overview\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7DAS0PQEMET5MNGZ1ABSZVS","nemoclaw-user-monitor-sandbox","Inspects sandbox health, traces agent behavior, and diagnoses problems. Use when monitoring a running sandbox, debugging agent issues, or checking sandbox logs. Trigger keywords - monitor nemoclaw sandbox, debug nemoclaw agent issues.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-monitor-sandbox\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7DARQYGF7E9A69VH6S3CGN9","nemoclaw-user-manage-sandboxes","Explains operational tasks after the quickstart: listing sandboxes, status and health checks, logs, diagnostics, port forwards, multiple sandboxes, credential reset, rebuilds, network presets, upgrades, and uninstall. Trigger keywords - manage nemoclaw sandboxes, nemoclaw status, nemoclaw list, nemoclaw dashboard port, nemoclaw rebuild, nemoclaw upgrade sandboxes, nemoclaw uninstall, sandbox mutability, sandbox runtime configuration, sandbox rebuild, nemoclaw backup, nemoclaw restore, workspace backup, openshell sandbox download upload, nemoclaw messaging channels, nemoclaw telegram, nemoclaw discord, nemoclaw slack, nemoclaw wechat, nemoclaw whatsapp, openshell channel messaging, nemoclaw workspace files, soul.md, user.md, identity.md, agents.md, sandbox persistence.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-sandboxes\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7DARH8BRTG51TRCAB7YWDJ4","nemoclaw-user-manage-policy","Adds, removes, or modifies allowed endpoints in the sandbox policy. Use when customizing network policy, changing egress rules, or configuring sandbox endpoint access. Trigger keywords - customize nemoclaw network policy, sandbox egress policy configuration, nemoclaw integration policy examples, post-install policy setup, openshell approval workflow, policy preset, nemoclaw approve network requests, sandbox egress approval tui.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-policy\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M7DARAT62M2VR37590VCZ5NS","nemoclaw-user-get-started","Installs NemoClaw, launches a sandbox, and runs the first agent prompt. Use when onboarding, installing, or launching a NemoClaw sandbox for the first time. Trigger keywords - nemoclaw quickstart, install nemoclaw openclaw sandbox, nemohermes quickstart, hermes agent nemoclaw, run hermes openshell sandbox, nemoclaw prerequisites, nemoclaw supported platforms, nemoclaw hardware software, nemoclaw windows wsl2 setup, nemoclaw install windows docker desktop.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-get-started\u002FSKILL.md",[],[]]