bmad-method-test-architecture-enterprise 3.6.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +10 -3
  3. package/cli/lib/automate-prompt.js +3 -7
  4. package/cli/lib/framework-setup.js +1 -2
  5. package/cli/lib/parse-report.js +1 -1
  6. package/cli/lib/resolve-tea-config.js +76 -10
  7. package/cli/lib/trace-command.js +12 -4
  8. package/cli/migrate-customizations.js +678 -71
  9. package/cli/teach.js +0 -1
  10. package/cli/test-review.js +1 -1
  11. package/package.json +3 -2
  12. package/skills/bmad-tea/SKILL.md +2 -2
  13. package/skills/bmad-tea-automate/SKILL.md +12 -11
  14. package/skills/bmad-tea-automate/customize.toml +12 -0
  15. package/skills/bmad-tea-automate/red/atdd-checklist-template.md +4 -4
  16. package/skills/bmad-tea-automate/red/checklist.md +1 -0
  17. package/skills/bmad-tea-automate/red/instructions.md +1 -1
  18. package/skills/bmad-tea-automate/red/steps-c/step-04a-subagent-api-failing.md +5 -0
  19. package/skills/bmad-tea-automate/red/steps-c/step-04b-subagent-e2e-failing.md +4 -0
  20. package/skills/bmad-tea-automate/red/steps-c/step-04c-aggregate.md +3 -2
  21. package/skills/bmad-tea-automate/red/steps-c/step-05-validate-and-complete.md +5 -4
  22. package/skills/bmad-tea-automate/red/steps-e/step-02-apply-edit.md +4 -4
  23. package/skills/bmad-tea-automate/red/steps-v/step-01-validate.md +4 -4
  24. package/skills/bmad-tea-automate/red/workflow.yaml +0 -1
  25. package/skills/bmad-tea-automate/resources/test-generation-routing.md +4 -7
  26. package/skills/bmad-tea-automate/steps-c/step-04-validate-and-summarize.md +4 -4
  27. package/skills/bmad-tea-automate/steps-e/step-02-apply-edit.md +4 -4
  28. package/skills/bmad-tea-automate/steps-v/step-01-validate.md +4 -4
  29. package/skills/bmad-tea-automate/workflow.yaml +0 -1
  30. package/skills/bmad-tea-evaluate/SKILL.md +1 -1
  31. package/skills/bmad-tea-framework/SKILL.md +3 -3
  32. package/skills/bmad-tea-framework/customize.toml +11 -2
  33. package/skills/bmad-tea-framework/resources/hooks/tea-enforce.cjs +55 -24
  34. package/skills/bmad-tea-framework/resources/setup-routing.md +6 -6
  35. package/skills/bmad-tea-framework/steps-c/step-04-docs-and-scripts.md +16 -12
  36. package/skills/bmad-tea-framework/workflow.yaml +0 -1
  37. package/skills/bmad-tea-nfr/SKILL.md +2 -2
  38. package/skills/bmad-tea-nfr/workflow.yaml +0 -1
  39. package/skills/bmad-tea-teach-me-testing/SKILL.md +2 -2
  40. package/skills/bmad-tea-test-design/SKILL.md +2 -2
  41. package/skills/bmad-tea-test-design/workflow.yaml +0 -1
  42. package/skills/bmad-tea-test-review/SKILL.md +2 -2
  43. package/skills/bmad-tea-test-review/workflow.yaml +0 -1
  44. package/skills/bmad-tea-trace/SKILL.md +2 -2
  45. package/skills/bmad-tea-trace/steps-c/step-04-analyze-gaps.md +1 -0
  46. package/skills/bmad-tea-trace/steps-c/step-05-gate-decision.md +29 -12
  47. package/skills/bmad-tea-trace/workflow.yaml +0 -1
  48. package/skills/bmod-tea/bmod.toml +2 -2
  49. package/skills/bmod-tea/help/help.md +10 -9
  50. package/skills/bmod-tea/knowledge/maestro-flows.md +1 -1
  51. package/skills/bmod-tea/migration-1.toml +7 -7
  52. package/skills/bmod-tea/migration-3.toml +50 -0
  53. package/skills/bmod-tea/retired.toml +13 -0
  54. package/skills/bmad-tea-automate/red/customize.toml +0 -38
  55. package/skills/bmad-tea-framework/ci/customize.toml +0 -10
@@ -109,6 +109,7 @@ const DEFAULT_CONFIG = {
109
109
  '**/*Test.java',
110
110
  '**/*Tests.java',
111
111
  '**/*IT.java',
112
+ '**/*{Test,Tests,IT}.kt',
112
113
  '.maestro/**/*.{yaml,yml}',
113
114
  'maestro/**/*.{yaml,yml}',
114
115
  ],
@@ -311,7 +312,7 @@ function literal(source, start, end, mode) {
311
312
  */
312
313
  const codeInMask = (character) => (character === '\n' ? '\n' : ' ');
313
314
 
314
- function stripCLike(source, literals) {
315
+ function stripCLike(source, literals, kind, kotlinRaw = false) {
315
316
  let out = '';
316
317
  let index = 0;
317
318
  // Whether a `/` at this position could open a regex literal rather than divide.
@@ -365,6 +366,24 @@ function stripCLike(source, literals) {
365
366
  }
366
367
  }
367
368
 
369
+ if (kind === 'java' && source.startsWith('"""', index)) {
370
+ let scan = index + 3;
371
+ while (scan < source.length) {
372
+ if (source.startsWith('"""', scan)) {
373
+ scan += 3;
374
+ break;
375
+ }
376
+ // Java text blocks allow escaped quotes. Kotlin raw strings close at
377
+ // the same delimiter; preserving offsets keeps the operand views aligned.
378
+ if (!kotlinRaw && source[scan] === '\\') scan += 2;
379
+ else scan += 1;
380
+ }
381
+ out += literal(source, index, scan, literals);
382
+ index = scan;
383
+ regexAllowed = false;
384
+ continue;
385
+ }
386
+
368
387
  if (character === '"' || character === "'" || character === '`') {
369
388
  const quote = character;
370
389
  let scan = index + 1;
@@ -470,13 +489,13 @@ function stripYaml(source) {
470
489
  .join('\n');
471
490
  }
472
491
 
473
- function stripNoise(source, kind) {
492
+ function stripNoise(source, kind, relativePath = '') {
474
493
  switch (kind) {
475
494
  case 'js':
476
495
  case 'java':
477
496
  case 'go':
478
497
  case 'pactconfig': {
479
- return stripCLike(source);
498
+ return stripCLike(source, undefined, kind, relativePath.endsWith('.kt'));
480
499
  }
481
500
  case 'py': {
482
501
  return stripPython(source);
@@ -501,13 +520,13 @@ function stripNoise(source, kind) {
501
520
  * view, at the same offsets; the masked view says which of those characters sit
502
521
  * inside a literal, where whitespace is part of the value.
503
522
  */
504
- function stripComments(source, kind, mode) {
523
+ function stripComments(source, kind, mode, relativePath = '') {
505
524
  switch (kind) {
506
525
  case 'js':
507
526
  case 'java':
508
527
  case 'go':
509
528
  case 'pactconfig': {
510
- return stripCLike(source, mode);
529
+ return stripCLike(source, mode, kind, relativePath.endsWith('.kt'));
511
530
  }
512
531
  case 'py': {
513
532
  return stripPython(source, mode);
@@ -750,7 +769,10 @@ const RULES = [
750
769
  scope: 'file',
751
770
  kinds: ['maestro'],
752
771
  fix: 'Add `assertVisible`, `assertNotVisible`, `assertTrue`, or `extendedWaitUntil` on the destination state. A flow that only taps passes as long as the taps land.',
753
- matchFile(strippedSource) {
772
+ matchFile(strippedSource, context) {
773
+ // Reusable Maestro fixtures live in the documented subflows directory.
774
+ // Other rules, including hard waits, still apply to these files.
775
+ if (/(?:^|\/)subflows\//.test(context.relativePath.replaceAll('\\', '/'))) return false;
754
776
  if (!/^\s*(?:-\s*)?(?:appId|tags)\s*:/m.test(strippedSource) && !/^\s*-\s*(?:launchApp|tapOn|inputText)\b/m.test(strippedSource)) {
755
777
  // Not a Maestro flow, just a YAML file that happened to match a glob.
756
778
  return false;
@@ -764,21 +786,18 @@ const RULES = [
764
786
  severity: 'HIGH',
765
787
  gate: 'Absolute',
766
788
  action: 'block',
767
- scope: 'line',
789
+ scope: 'source',
768
790
  kinds: ['js', 'py', 'java', 'go', 'maestro'],
769
- fix: 'Wait on the condition, not the clock: a web-first assertion, an explicit readiness signal, `cy.wait("@alias")`, or `extendedWaitUntil` in a Maestro flow.',
770
- match(line, context) {
791
+ fix: 'Wait on a web-first assertion, an explicit readiness signal, `cy.wait("@alias")`, or `extendedWaitUntil` in a Maestro flow.',
792
+ matchSource(source, context) {
771
793
  const patterns = {
772
- js: /(?:\bwaitForTimeout\s*\(|\bcy\.wait\s*\(\s*\d|(?:^|[^\w.])sleep\s*\(|\bdelay\s*\(\s*\d)/,
773
- py: /(?:\btime\.sleep\s*\(|(?:^|[^\w.])sleep\s*\()/,
774
- java: /\bThread\.sleep\s*\(/,
775
- // The row's own catch-all — "or any bare timer used to order steps" — is
776
- // what carries Go here; `time.Sleep` is the language's only spelling of it.
777
- go: /\btime\.Sleep\s*\(/,
778
- maestro: /^\s*-\s*sleep\s*:/,
794
+ js: /(?:\bwaitForTimeout\s*\(|\bcy\.wait\s*\(\s*\d|(?:^|[^\w.\r\n])sleep\s*\(|\bdelay\s*\(\s*\d|\bawait\s+setTimeout\s*\(\s*\d|\bnew\s+Promise\s*\(\s*(?:\(\s*)?([\w$]+)\s*(?:,\s*[\w$]+\s*)?\)?\s*=>\s*(?:{\s*)?setTimeout\s*\(\s*\1\s*,\s*\d)/gm,
795
+ py: /(?:\btime\.sleep\s*\(|(?:^|[^\w.\r\n])sleep\s*\()/gm,
796
+ java: /\bThread\.sleep\s*\(/g,
797
+ go: /\btime\.Sleep\s*\(/g,
798
+ maestro: /^[ \t]*-[ \t]*sleep[ \t]*:/gm,
779
799
  };
780
- const pattern = patterns[context.kind];
781
- return Boolean(pattern && pattern.test(line));
800
+ return [...source.matchAll(patterns[context.kind])].map((match) => [match.index, match.index + match[0].length]);
782
801
  },
783
802
  },
784
803
  {
@@ -820,11 +839,18 @@ const RULES = [
820
839
  scope: 'line',
821
840
  kinds: ['pactconfig'],
822
841
  fix: 'Remove the setting. Pact runs must stay serialized: no concurrent sequence, one worker, isolation on.',
823
- match(line) {
842
+ match(line, context) {
824
843
  if (/concurrent\s*:\s*true/.test(line)) return true;
825
844
  if (/isolate\s*:\s*false/.test(line)) return true;
826
- const concurrency = /(?:maxConcurrency|maxWorkers|minWorkers)\s*:\s*(\d+)/.exec(line);
827
- return Boolean(concurrency && Number(concurrency[1]) > 1);
845
+ // Match keys in code, then read a numeric literal from the kept view.
846
+ // This accepts Vitest's quoted counts without treating string examples as settings.
847
+ for (const key of line.matchAll(/\b(?:maxConcurrency|maxWorkers|minWorkers)\s*:\s*/g)) {
848
+ const value = context.code
849
+ .slice(key.index + key[0].trimEnd().length)
850
+ .match(/^\s*(?:(\d[\d_]*(?:\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)|(['"])(\d+)\2)/);
851
+ if (value && Number((value[1] ?? value[3]).replaceAll('_', '')) > 1) return true;
852
+ }
853
+ return false;
828
854
  },
829
855
  },
830
856
  ];
@@ -898,12 +924,13 @@ function scanContent(relativePath, source, config, options) {
898
924
  const gateOpen = isPactConfig ? matchesAnyGlob(relativePath, settings.pactConfigGlobs) : matchesAnyGlob(relativePath, settings.testGlobs);
899
925
  if (!gateOpen) return [];
900
926
 
901
- const stripped = stripNoise(source, kind);
927
+ const stripped = stripNoise(source, kind, relativePath);
902
928
  const strippedLines = stripped.split('\n');
903
929
  const rawLines = source.split('\n');
904
930
  const lineCount = source.replace(/\n$/, '').split('\n').length;
905
931
  const lineStarts = lineStartOffsets(stripped);
906
932
  let views = null;
933
+ let keptLines = null;
907
934
  const findings = [];
908
935
 
909
936
  for (const rule of activeRules(settings)) {
@@ -924,7 +951,11 @@ function scanContent(relativePath, source, config, options) {
924
951
  continue;
925
952
  }
926
953
 
927
- views ??= { code: stripComments(source, kind, 'keep') ?? stripped, mask: stripComments(source, kind, 'mask') ?? '' };
954
+ views ??= {
955
+ code: stripComments(source, kind, 'keep', relativePath) ?? stripped,
956
+ mask: stripComments(source, kind, 'mask', relativePath) ?? '',
957
+ };
958
+ keptLines ??= views.code.split('\n');
928
959
  // What a violation IS, independent of where it sits and of the comments and
929
960
  // layout around it: the code it spans, literals intact, whitespace outside
930
961
  // literals dropped. `introducedFindings` compares these.
@@ -952,7 +983,7 @@ function scanContent(relativePath, source, config, options) {
952
983
  }
953
984
 
954
985
  for (const [index, line] of strippedLines.entries()) {
955
- const context = { kind, config: settings, rawLines, lineIndex: index, relativePath };
986
+ const context = { kind, config: settings, rawLines, lineIndex: index, relativePath, code: keptLines[index] };
956
987
  if (rule.match(line, context)) {
957
988
  findings.push({
958
989
  rule,
@@ -25,16 +25,16 @@ Initialize or adopt the all-scope journal through `setup-state.md` section 2 aft
25
25
 
26
26
  ## 2. Scope Activation and Settings
27
27
 
28
- Before SKILL.md executes prepend hooks or greets, resolve settings for every requested phase. Keep canonical `workflow` separately from `ci_workflow`. Scope controls hook ownership: framework-only uses canonical hooks/facts/completion; CI-only uses CI hooks/facts/completion; both uses both. CI-only may read canonical `ci_platform` overrides for platform precedence without loading canonical persistent facts or executing canonical hooks.
28
+ Before SKILL.md executes prepend hooks or greets, resolve settings for every requested phase. Keep canonical `workflow` separately from `ci_workflow`, its `ci` sub-table. Scope controls hook ownership: framework-only uses canonical hooks/facts/completion; CI-only uses CI hooks/facts/completion; both uses both. CI-only never loads canonical persistent facts or executes canonical hooks.
29
29
 
30
30
  When scope includes CI:
31
31
 
32
- 1. Read `{skill-root}/ci/customize.toml` for CI defaults: `ci_platform = auto`, empty `activation_steps_prepend`, `activation_steps_append`, `persistent_facts`, and `on_complete`.
33
- 2. Structurally merge the CI defaults, `_bmad/custom/bmad-tea-ci.toml`, and `_bmad/custom/bmad-tea-ci.user.toml`, skipping missing override files. Existing CI overrides, including migrated platform settings, remain effective.
34
- 3. Store the result as `ci_workflow`. SKILL.md executes applicable prepend entries before greeting, loads applicable facts/globs in lexical order, and executes append entries after greeting through `setup-state.md` section 3's individual durable hook protocol. On Resume, resolve current settings and reload applicable facts; skip completed hook entries and halt on uncertain started entries. Save each applicable phase in `activation_completed` only after its activation succeeds. This section resolves settings; it does not replay activation at phase or worker handoffs.
35
- 4. Framework steps use canonical `workflow`. CI steps read `ci_workflow` for their legacy hooks/facts and the effective platform below. Keep `{skill-root}` bound to the canonical directory for every CI asset.
32
+ 1. `{skill-root}/customize.toml` carries the CI defaults under `[workflow.ci]`: `ci_platform = auto`, empty `activation_steps_prepend`, `activation_steps_append`, `persistent_facts`, and `on_complete`.
33
+ 2. The Step 1 resolver call already merged those defaults with the `[workflow.ci]` tables of `_bmad/custom/bmad-tea-framework.toml` and `.user.toml`. For a CI-only run that resolves no other key, run `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow.ci`. No other file supplies CI settings.
34
+ 3. Store the `workflow.ci` table as `ci_workflow`. SKILL.md executes applicable prepend entries before greeting, loads applicable facts/globs in lexical order, and executes append entries after greeting through `setup-state.md` section 3's individual durable hook protocol. On Resume, resolve current settings and reload applicable facts; skip completed hook entries and halt on uncertain started entries. Save each applicable phase in `activation_completed` only after its activation succeeds. This section resolves settings; it does not replay activation at phase or worker handoffs.
35
+ 4. Framework steps use canonical `workflow`. CI steps read `ci_workflow` for their hooks/facts and the effective platform below. Keep `{skill-root}` bound to the canonical directory for every CI asset.
36
36
 
37
- **Platform precedence:** An explicit `workflow.ci_platform` in canonical team/user overrides wins, including explicit `auto`. Inspect those override files to distinguish it from the shipped default. Otherwise use `ci_workflow.ci_platform`, preserving migration-1.toml's destination. If neither is present, use `auto`. Bind the result to `{workflow.ci_platform}` during CI steps without replacing the saved canonical workflow object.
37
+ **Platform:** The effective platform is `ci_workflow.ci_platform`, `auto` when the team and user layers set nothing. Bind it to `{workflow.ci_platform}` during CI steps without replacing the saved canonical workflow object.
38
38
 
39
39
  ## 3. Shared State and Contract
40
40
 
@@ -115,18 +115,22 @@ Set `hookSha256` to the sha256 of the file you copied in 3.1: `shasum -a 256 .cl
115
115
 
116
116
  Fill `testGlobs` from the frameworks selected in step 2 and the directories scaffolded in step 3:
117
117
 
118
- | Detected surface | Add to `testGlobs` |
119
- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
120
- | Playwright | `{test_dir}/**/*.spec.{ts,js}` |
121
- | Cypress | `cypress/e2e/**/*.cy.{ts,js}` |
122
- | Vitest / Jest | `**/*.test.{ts,tsx,js,jsx}`, `**/*.spec.{ts,tsx,js,jsx}` scoped to `{test_dir}` and the source tree that holds co-located unit tests |
123
- | Pact (consumer) | `**/*.pacttest.{ts,js}` |
124
- | pytest | `tests/**/test_*.py`, `**/*_test.py` |
125
- | JUnit | `src/test/java/**/*{Test,Tests,IT}.java` |
126
- | Go test | `**/*_test.go` |
127
- | Maestro | `{maestro_root}/**/*.{yaml,yml}` |
128
-
129
- Fill `pactConfigGlobs` only when a pact vitest config exists: `**/vitest.config.pact.{ts,js}`. Rows H6 and H8 are scoped to that path and cannot fire anywhere else.
118
+ | Detected surface | Add to `testGlobs` |
119
+ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
120
+ | Playwright | `{test_dir}/**/*.spec.{ts,js}` |
121
+ | Cypress | `cypress/e2e/**/*.cy.{ts,js}` |
122
+ | Vitest / Jest | `**/*.test.{ts,tsx,js,jsx}`, `**/*.spec.{ts,tsx,js,jsx}` scoped to `{test_dir}` and the source tree that holds co-located unit tests |
123
+ | Pact (consumer) | `**/*.pacttest.{ts,js}` |
124
+ | pytest | `tests/**/test_*.py`, `**/*_test.py` |
125
+ | JUnit | `src/test/java/**/*{Test,Tests,IT}.java`; for Kotlin, `{kotlin_test_root}/**/*{Test,Tests,IT}.kt` with each detected root, including Android `src/androidTest` |
126
+ | Go test | `**/*_test.go` |
127
+ | Maestro | `{maestro_root}/**/*.{yaml,yml}` |
128
+
129
+ Keep reusable Maestro fixtures in a `subflows/` directory. C4 exempts those fixtures from the assertion-presence requirement; other rules, including H1 hard waits, still apply. Top-level test flows must assert their destination state.
130
+
131
+ The hook mechanically checks JS/TS, Python, Java/Kotlin, Go, and Maestro. C# and Ruby suites use Test Review for quality checks; the hook has no mechanical language rules for them. Test Review also reads a wider set of test directories and file types so it can assess helpers and stack-specific behavior.
132
+
133
+ Fill `pactConfigGlobs` only when a pact vitest config exists: `**/vitest.config.pact.{ts,js,mts,mjs,cts,cjs}` and `**/vitest.pact.config.{ts,js,mts,mjs,cts,cjs}`. Rows H6 and H8 are scoped to that path and cannot fire anywhere else.
130
134
 
131
135
  Fill `excludeGlobs` with the k6 script directory when k6 is present, for example `k6/**` or `load-tests/**`. A k6 script's `sleep(1)` is the documented way to model think-time between iterations, so H1 firing there would be the hook wrong about the one language where the pattern is correct. Say in the summary that k6 scripts are excluded and why.
132
136
 
@@ -7,7 +7,6 @@ description: 'Initialize test framework and CI/CD setup for browser, backend or
7
7
  date: system-generated
8
8
 
9
9
  # Workflow components
10
- installed_path: "."
11
10
  instructions: "./instructions.md"
12
11
  validation: "./checklist.md"
13
12
 
@@ -23,7 +23,7 @@ You will continue to operate with your given name, identity, and communication_s
23
23
 
24
24
  ## On Activation
25
25
 
26
- Before resolving customizations or running hooks, inspect `{project-root}/_bmad/custom/` for `bmad-testarch-nfr.toml` and `bmad-testarch-nfr.user.toml`. If either exists, stop and tell the user to run `npx --package=bmad-method-test-architecture-enterprise@3 tea-migrate-customizations --project-root {project-root}`. Resolve any reported manual merge, then start a fresh chat. Do not continue with default settings while legacy overrides remain.
26
+ Before resolving customizations or running hooks, inspect `{project-root}/_bmad/custom/` for `bmad-testarch-nfr.toml` and `bmad-testarch-nfr.user.toml`. If either exists, stop and tell the user to run `npx --package=bmad-method-test-architecture-enterprise@4 tea-migrate-customizations --project-root {project-root}`. Resolve any reported manual merge, then start a fresh chat. Do not continue with default settings while legacy overrides remain.
27
27
 
28
28
  ### Step 1: Resolve the Workflow Block
29
29
 
@@ -51,7 +51,7 @@ Run `uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {proje
51
51
 
52
52
  Each `core` and `modules.tea` key is available as `{<key>}`, and as `config.<key>` in later steps. Replace `{project-root}` inside a value with the project root. Setup answers are strings: read `"true"` and `"false"` as booleans.
53
53
 
54
- If `{tea-knowledge}/tea-index.csv` does not exist, the TEA knowledge base is not installed. Tell the user, offer to install it with `npx skills add bmad-code-org/bmad-method-test-architecture-enterprise --skill bmod-tea`, run that on a yes, and stop until it is there.
54
+ If `{tea-knowledge}/tea-index.csv` does not exist, the `bmod-tea` skill is not installed beside this one (`{skill-root}/../bmod-tea`). Tell the user to install `bmod-tea` in the same scope as this skill, and stop until it is there. For a skill in the project's skills folder run `npx skills add bmad-code-org/bmad-method-test-architecture-enterprise --skill bmod-tea`; for a skill in the global skills folder add `-g`. Run the command on a yes. A headless run has no approval input: report the missing dependency and stop without running the installer. A `bmod-tea` installed in the other scope does not satisfy this skill.
55
55
 
56
56
  ### Step 5: Greet the User
57
57
 
@@ -7,7 +7,6 @@ description: 'Audit NFR evidence for performance, security, reliability, and mai
7
7
  date: system-generated
8
8
 
9
9
  # Workflow components
10
- installed_path: "."
11
10
  instructions: "./instructions.md"
12
11
  validation: "./checklist.md"
13
12
  template: "./nfr-report-template.md"
@@ -24,7 +24,7 @@ You will continue to operate with your given name, identity, and communication_s
24
24
 
25
25
  ## On Activation
26
26
 
27
- Before resolving customizations or running hooks, inspect `{project-root}/_bmad/custom/` for `bmad-teach-me-testing.toml` and `bmad-teach-me-testing.user.toml`. If either exists, stop and tell the user to run `npx --package=bmad-method-test-architecture-enterprise@3 tea-migrate-customizations --project-root {project-root}`. Resolve any reported manual merge, then start a fresh chat. Do not continue with default settings while legacy overrides remain.
27
+ Before resolving customizations or running hooks, inspect `{project-root}/_bmad/custom/` for `bmad-teach-me-testing.toml` and `bmad-teach-me-testing.user.toml`. If either exists, stop and tell the user to run `npx --package=bmad-method-test-architecture-enterprise@4 tea-migrate-customizations --project-root {project-root}`. Resolve any reported manual merge, then start a fresh chat. Do not continue with default settings while legacy overrides remain.
28
28
 
29
29
  ### Step 1: Resolve the Workflow Block
30
30
 
@@ -52,7 +52,7 @@ Run `uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {proje
52
52
 
53
53
  Each `core` and `modules.tea` key is available as `{<key>}`, and as `config.<key>` in later steps. Replace `{project-root}` inside a value with the project root. Setup answers are strings: read `"true"` and `"false"` as booleans.
54
54
 
55
- If `{tea-knowledge}/tea-index.csv` does not exist, the TEA knowledge base is not installed. Tell the user, offer to install it with `npx skills add bmad-code-org/bmad-method-test-architecture-enterprise --skill bmod-tea`, run that on a yes, and stop until it is there.
55
+ If `{tea-knowledge}/tea-index.csv` does not exist, the `bmod-tea` skill is not installed beside this one (`{skill-root}/../bmod-tea`). Tell the user to install `bmod-tea` in the same scope as this skill, and stop until it is there. For a skill in the project's skills folder run `npx skills add bmad-code-org/bmad-method-test-architecture-enterprise --skill bmod-tea`; for a skill in the global skills folder add `-g`. Run the command on a yes. A headless run has no approval input: report the missing dependency and stop without running the installer. A `bmod-tea` installed in the other scope does not satisfy this skill.
56
56
 
57
57
  ### Step 5: Greet the User
58
58
 
@@ -22,7 +22,7 @@ You will continue to operate with your given name, identity, and communication_s
22
22
 
23
23
  ## On Activation
24
24
 
25
- Before resolving customizations or running hooks, inspect `{project-root}/_bmad/custom/` for `bmad-testarch-test-design.toml` and `bmad-testarch-test-design.user.toml`. If either exists, stop and tell the user to run `npx --package=bmad-method-test-architecture-enterprise@3 tea-migrate-customizations --project-root {project-root}`. Resolve any reported manual merge, then start a fresh chat. Do not continue with default settings while legacy overrides remain.
25
+ Before resolving customizations or running hooks, inspect `{project-root}/_bmad/custom/` for `bmad-testarch-test-design.toml` and `bmad-testarch-test-design.user.toml`. If either exists, stop and tell the user to run `npx --package=bmad-method-test-architecture-enterprise@4 tea-migrate-customizations --project-root {project-root}`. Resolve any reported manual merge, then start a fresh chat. Do not continue with default settings while legacy overrides remain.
26
26
 
27
27
  ### Step 1: Resolve the Workflow Block
28
28
 
@@ -50,7 +50,7 @@ Run `uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {proje
50
50
 
51
51
  Each `core` and `modules.tea` key is available as `{<key>}`, and as `config.<key>` in later steps. Replace `{project-root}` inside a value with the project root. Setup answers are strings: read `"true"` and `"false"` as booleans.
52
52
 
53
- If `{tea-knowledge}/tea-index.csv` does not exist, the TEA knowledge base is not installed. Tell the user, offer to install it with `npx skills add bmad-code-org/bmad-method-test-architecture-enterprise --skill bmod-tea`, run that on a yes, and stop until it is there.
53
+ If `{tea-knowledge}/tea-index.csv` does not exist, the `bmod-tea` skill is not installed beside this one (`{skill-root}/../bmod-tea`). Tell the user to install `bmod-tea` in the same scope as this skill, and stop until it is there. For a skill in the project's skills folder run `npx skills add bmad-code-org/bmad-method-test-architecture-enterprise --skill bmod-tea`; for a skill in the global skills folder add `-g`. Run the command on a yes. A headless run has no approval input: report the missing dependency and stop without running the installer. A `bmod-tea` installed in the other scope does not satisfy this skill.
54
54
 
55
55
  ### Step 5: Greet the User
56
56
 
@@ -7,7 +7,6 @@ description: 'Create system-level or epic-level test plans. Use when the user sa
7
7
  date: system-generated
8
8
 
9
9
  # Workflow components
10
- installed_path: "."
11
10
  instructions: "./instructions.md"
12
11
  validation: "./checklist.md"
13
12
  # Note: Template selection is mode-based (see instructions.md Step 1.5):
@@ -23,7 +23,7 @@ You will continue to operate with your given name, identity, and communication_s
23
23
 
24
24
  ## On Activation
25
25
 
26
- Before resolving customizations or running hooks, inspect `{project-root}/_bmad/custom/` for `bmad-testarch-test-review.toml` and `bmad-testarch-test-review.user.toml`. If either exists, stop and tell the user to run `npx --package=bmad-method-test-architecture-enterprise@3 tea-migrate-customizations --project-root {project-root}`. Resolve any reported manual merge, then start a fresh chat. Do not continue with default settings while legacy overrides remain.
26
+ Before resolving customizations or running hooks, inspect `{project-root}/_bmad/custom/` for `bmad-testarch-test-review.toml` and `bmad-testarch-test-review.user.toml`. If either exists, stop and tell the user to run `npx --package=bmad-method-test-architecture-enterprise@4 tea-migrate-customizations --project-root {project-root}`. Resolve any reported manual merge, then start a fresh chat. Do not continue with default settings while legacy overrides remain.
27
27
 
28
28
  ### Step 1: Resolve the Workflow Block
29
29
 
@@ -51,7 +51,7 @@ Run `uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {proje
51
51
 
52
52
  Each `core` and `modules.tea` key is available as `{<key>}`, and as `config.<key>` in later steps. Replace `{project-root}` inside a value with the project root. Setup answers are strings: read `"true"` and `"false"` as booleans.
53
53
 
54
- If `{tea-knowledge}/tea-index.csv` does not exist, the TEA knowledge base is not installed. Tell the user, offer to install it with `npx skills add bmad-code-org/bmad-method-test-architecture-enterprise --skill bmod-tea`, run that on a yes, and stop until it is there.
54
+ If `{tea-knowledge}/tea-index.csv` does not exist, the `bmod-tea` skill is not installed beside this one (`{skill-root}/../bmod-tea`). Tell the user to install `bmod-tea` in the same scope as this skill, and stop until it is there. For a skill in the project's skills folder run `npx skills add bmad-code-org/bmad-method-test-architecture-enterprise --skill bmod-tea`; for a skill in the global skills folder add `-g`. Run the command on a yes. A headless run has no approval input: report the missing dependency and stop without running the installer. A `bmod-tea` installed in the other scope does not satisfy this skill.
55
55
 
56
56
  ### Step 5: Greet the User
57
57
 
@@ -9,7 +9,6 @@ description: 'Review test quality using best practices validation. Use when the
9
9
  date: system-generated
10
10
 
11
11
  # Workflow components
12
- installed_path: "."
13
12
  instructions: "./instructions.md"
14
13
  validation: "./checklist.md"
15
14
  template: "./test-review-template.md"
@@ -23,7 +23,7 @@ You will continue to operate with your given name, identity, and communication_s
23
23
 
24
24
  ## On Activation
25
25
 
26
- Before resolving customizations or running hooks, inspect `{project-root}/_bmad/custom/` for `bmad-testarch-trace.toml` and `bmad-testarch-trace.user.toml`. If either exists, stop and tell the user to run `npx --package=bmad-method-test-architecture-enterprise@3 tea-migrate-customizations --project-root {project-root}`. Resolve any reported manual merge, then start a fresh chat. Do not continue with default settings while legacy overrides remain.
26
+ Before resolving customizations or running hooks, inspect `{project-root}/_bmad/custom/` for `bmad-testarch-trace.toml` and `bmad-testarch-trace.user.toml`. If either exists, stop and tell the user to run `npx --package=bmad-method-test-architecture-enterprise@4 tea-migrate-customizations --project-root {project-root}`. Resolve any reported manual merge, then start a fresh chat. Do not continue with default settings while legacy overrides remain.
27
27
 
28
28
  ### Step 1: Resolve the Workflow Block
29
29
 
@@ -51,7 +51,7 @@ Run `uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {proje
51
51
 
52
52
  Each `core` and `modules.tea` key is available as `{<key>}`, and as `config.<key>` in later steps. Replace `{project-root}` inside a value with the project root. Setup answers are strings: read `"true"` and `"false"` as booleans.
53
53
 
54
- If `{tea-knowledge}/tea-index.csv` does not exist, the TEA knowledge base is not installed. Tell the user, offer to install it with `npx skills add bmad-code-org/bmad-method-test-architecture-enterprise --skill bmod-tea`, run that on a yes, and stop until it is there.
54
+ If `{tea-knowledge}/tea-index.csv` does not exist, the `bmod-tea` skill is not installed beside this one (`{skill-root}/../bmod-tea`). Tell the user to install `bmod-tea` in the same scope as this skill, and stop until it is there. For a skill in the project's skills folder run `npx skills add bmad-code-org/bmad-method-test-architecture-enterprise --skill bmod-tea`; for a skill in the global skills folder add `-g`. Run the command on a yes. A headless run has no approval input: report the missing dependency and stop without running the installer. A `bmod-tea` installed in the other scope does not satisfy this skill.
55
55
 
56
56
  ### Step 5: Greet the User
57
57
 
@@ -514,6 +514,7 @@ const totalRequirements = traceabilityMatrix.length;
514
514
  const coveredRequirements = traceabilityMatrix.filter((r) => r.coverage === 'FULL' || r.coverage === 'PARTIAL').length;
515
515
  const fullyCovered = traceabilityMatrix.filter((r) => r.coverage === 'FULL').length;
516
516
 
517
+ // Rounded percentages are presentation values. Step 5 compares covered/total counts for every gate threshold.
517
518
  const safePct = (covered, total) => (total > 0 ? Math.round((covered / total) * 100) : 100);
518
519
  const coveragePercentage = safePct(fullyCovered, totalRequirements);
519
520
 
@@ -112,6 +112,12 @@ const p1Coverage = priorityBreakdown.P1.percentage;
112
112
  const hasP1Requirements = (priorityBreakdown.P1.total || 0) > 0;
113
113
  const effectiveP1Coverage = hasP1Requirements ? p1Coverage : 100;
114
114
  const overallCoverage = stats.overall_coverage_percentage;
115
+ // Keep rounded percentages for display. Apply thresholds to integer counts.
116
+ const meetsCoverage = (covered, total, threshold) => total === 0 || covered * 100 >= threshold * total;
117
+ const p0Met = meetsCoverage(priorityBreakdown.P0.covered, priorityBreakdown.P0.total, 100);
118
+ const p1MinimumMet = meetsCoverage(priorityBreakdown.P1.covered, priorityBreakdown.P1.total, 80);
119
+ const p1TargetMet = meetsCoverage(priorityBreakdown.P1.covered, priorityBreakdown.P1.total, 90);
120
+ const overallMet = meetsCoverage(stats.fully_covered, stats.total_requirements, 80);
115
121
  const criticalGaps = (coverageMatrix.gap_analysis?.critical_gaps || []).length;
116
122
  const isUnresolved = (value) => typeof value === 'string' && value.startsWith('{') && value.endsWith('}');
117
123
  const normalizeResolvedToken = (value) => {
@@ -166,6 +172,17 @@ const reportedLiveEvidence =
166
172
  ? coverageMatrix.live_evidence
167
173
  : {};
168
174
  const liveEvidence = { ...liveEvidenceDefaults, ...reportedLiveEvidence };
175
+ // An absent legacy live block retains the defaults. A fresh claim must carry
176
+ // measured counts; missing or malformed evidence cannot establish a passing gate.
177
+ if (liveEvidence.freshness === 'fresh' && (!Number.isInteger(reportedLiveEvidence.failed) || reportedLiveEvidence.failed < 0)) {
178
+ throw new Error('Fresh live evidence requires a nonnegative integer failed count');
179
+ }
180
+ if (
181
+ Object.hasOwn(reportedLiveEvidence, 'fresh_failed') &&
182
+ (!Number.isInteger(reportedLiveEvidence.fresh_failed) || reportedLiveEvidence.fresh_failed < 0)
183
+ ) {
184
+ throw new Error('Live evidence fresh_failed must be a nonnegative integer');
185
+ }
169
186
 
170
187
  // The live-only count is what stands between live evidence and an unconditional PASS, so it is
171
188
  // re-derived here from the requirements themselves rather than trusted as a scalar. Phase 1 can be
@@ -306,33 +323,33 @@ if (!gateEligible) {
306
323
  rationale = `Gate decision skipped because allow_gate=${allowGate} and collection_status=${collectionStatus}.`;
307
324
  } else {
308
325
  // Rule 1: P0 coverage must be 100%
309
- if (p0Coverage < 100) {
326
+ if (!p0Met) {
310
327
  gateDecision = 'FAIL';
311
328
  // Critical gaps are every P0 criterion under FULL, which includes PARTIAL, UNIT-ONLY, and
312
329
  // INTEGRATION-ONLY, so the count is stated as "below FULL coverage". See checklist.md's Gap Analysis.
313
330
  rationale = `P0 coverage is ${p0Coverage}% (required: 100%). ${criticalGaps} critical requirement(s) below FULL coverage.`;
314
331
  }
315
332
  // Rule 2: Overall coverage must be >= 80%
316
- else if (overallCoverage < 80) {
333
+ else if (!overallMet) {
317
334
  gateDecision = 'FAIL';
318
335
  rationale = `Overall coverage is ${overallCoverage}% (minimum: 80%). Significant gaps exist.`;
319
336
  }
320
337
  // Rule 3: P1 coverage < 80% → FAIL
321
- else if (effectiveP1Coverage < 80) {
338
+ else if (!p1MinimumMet) {
322
339
  gateDecision = 'FAIL';
323
340
  rationale = hasP1Requirements
324
341
  ? `P1 coverage is ${effectiveP1Coverage}% (minimum: 80%). High-priority gaps must be addressed.`
325
342
  : `P1 requirements are not present; continuing with remaining gate criteria.`;
326
343
  }
327
344
  // Rule 4: P1 coverage >= 90% and overall >= 80% with P0 at 100% → PASS
328
- else if (effectiveP1Coverage >= 90) {
345
+ else if (p1TargetMet) {
329
346
  gateDecision = 'PASS';
330
347
  rationale = hasP1Requirements
331
348
  ? `P0 coverage is 100%, P1 coverage is ${effectiveP1Coverage}% (target: 90%), and overall coverage is ${overallCoverage}% (minimum: 80%).`
332
349
  : `P0 coverage is 100% and overall coverage is ${overallCoverage}% (minimum: 80%). No P1 requirements detected.`;
333
350
  }
334
351
  // Rule 5: P1 coverage 80-89% with P0 at 100% and overall >= 80% → CONCERNS
335
- else if (effectiveP1Coverage >= 80) {
352
+ else if (p1MinimumMet) {
336
353
  gateDecision = 'CONCERNS';
337
354
  rationale = hasP1Requirements
338
355
  ? `P0 coverage is 100% and overall coverage is ${overallCoverage}% (minimum: 80%), but P1 coverage is ${effectiveP1Coverage}% (target: 90%).`
@@ -366,7 +383,7 @@ if (!gateEligible) {
366
383
  // A live result is a one-time observation of one commit with no artifact anyone can re-run, so a
367
384
  // requirement resting only on it is capped at CONCERNS. This overlay only ever lowers PASS or
368
385
  // annotates an existing CONCERNS; it can never lift a FAIL.
369
- const freshLiveFailures = liveEvidence.fresh_failed ?? (liveEvidence.freshness === 'fresh' ? liveEvidence.failed : 0);
386
+ const freshLiveFailures = Math.max(liveEvidence.fresh_failed ?? 0, liveEvidence.freshness === 'fresh' ? liveEvidence.failed : 0);
370
387
  if (freshLiveFailures > 0 && gateDecision === 'PASS') {
371
388
  gateDecision = 'CONCERNS';
372
389
  rationale = `${rationale} ${freshLiveFailures} fresh live verification failure(s) require investigation.`;
@@ -476,16 +493,16 @@ const gateReport = {
476
493
  ? {
477
494
  p0_coverage_required: '100%',
478
495
  p0_coverage_actual: `${p0Coverage}%`,
479
- p0_status: p0Coverage === 100 ? 'MET' : 'NOT_MET',
496
+ p0_status: p0Met ? 'MET' : 'NOT_MET',
480
497
 
481
498
  p1_coverage_target: '90%',
482
499
  p1_coverage_minimum: '80%',
483
500
  p1_coverage_actual: `${effectiveP1Coverage}%`,
484
- p1_status: effectiveP1Coverage >= 90 ? 'MET' : effectiveP1Coverage >= 80 ? 'PARTIAL' : 'NOT_MET',
501
+ p1_status: p1TargetMet ? 'MET' : p1MinimumMet ? 'PARTIAL' : 'NOT_MET',
485
502
 
486
503
  overall_coverage_minimum: '80%',
487
504
  overall_coverage_actual: `${overallCoverage}%`,
488
- overall_status: overallCoverage >= 80 ? 'MET' : 'NOT_MET',
505
+ overall_status: overallMet ? 'MET' : 'NOT_MET',
489
506
  }
490
507
  : null,
491
508
 
@@ -804,14 +821,14 @@ if (gateEligible) {
804
821
  e2eTraceSummary.gate_criteria = {
805
822
  p0_coverage_required: '100%',
806
823
  p0_coverage_actual: `${p0Coverage}%`,
807
- p0_status: p0Coverage === 100 ? 'MET' : 'NOT_MET',
824
+ p0_status: p0Met ? 'MET' : 'NOT_MET',
808
825
  p1_coverage_target: '90%',
809
826
  p1_coverage_minimum: '80%',
810
827
  p1_coverage_actual: `${effectiveP1Coverage}%`,
811
- p1_status: effectiveP1Coverage >= 90 ? 'MET' : effectiveP1Coverage >= 80 ? 'PARTIAL' : 'NOT_MET',
828
+ p1_status: p1TargetMet ? 'MET' : p1MinimumMet ? 'PARTIAL' : 'NOT_MET',
812
829
  overall_coverage_minimum: '80%',
813
830
  overall_coverage_actual: `${overallCoverage}%`,
814
- overall_status: overallCoverage >= 80 ? 'MET' : 'NOT_MET',
831
+ overall_status: overallMet ? 'MET' : 'NOT_MET',
815
832
  };
816
833
  }
817
834
 
@@ -7,7 +7,6 @@ description: 'Generate traceability matrix and quality gate decision. Use when t
7
7
  date: system-generated
8
8
 
9
9
  # Workflow components
10
- installed_path: "."
11
10
  instructions: "./instructions.md"
12
11
  validation: "./checklist.md"
13
12
  template: "./trace-template.md"
@@ -2,7 +2,7 @@
2
2
 
3
3
  [bmod]
4
4
  code = "tea"
5
- version = "3.6.0"
5
+ version = "4.0.0"
6
6
  update_source = "github:bmad-code-org/bmad-method-test-architecture-enterprise/skills"
7
7
  skills = [
8
8
  "bmad-tea",
@@ -20,7 +20,7 @@ pre_install_message = ""
20
20
  post_install_message = '''
21
21
  TEA is ready. Talk to Murat (bmad-tea) or start with Test Design (bmad-tea-test-design).
22
22
 
23
- Playwright Utils, Pact.js Utils, the Playwright CLI or MCP servers, and the SmartBear MCP each need their own install. Test Framework (bmad-tea-framework) installs the utils packages and owns framework and CI setup. Test Automation (bmad-tea-automate) owns red and expand test generation with run-and-heal enabled by default. Migrate existing CI and ATDD customization filenames with tea-migrate-customizations. Ask bmad how to set up the rest.
23
+ Playwright Utils, Pact.js Utils, the Playwright CLI or MCP servers, and the SmartBear MCP each need their own install. Test Framework (bmad-tea-framework) installs the utils packages and owns framework and CI setup. Test Automation (bmad-tea-automate) owns red and expand test generation with run-and-heal enabled by default. Move older CI and ATDD customization files into [workflow.ci] and [workflow.red] with `bmad migrate tea`, or run `npx --package=bmad-method-test-architecture-enterprise@4 tea-migrate-customizations --project-root .`. If `bmad setup` cleanup lists bmad-tea-ci or bmad-tea-atdd customizations as unused, run the migration first and keep the cleanup backup until it has run. Ask bmad how to set up the rest.
24
24
  '''
25
25
 
26
26
  # Asked by `bmad setup` in this order. Members read each answer as modules.tea.<key>.
@@ -20,15 +20,16 @@ For a release gate, the order is: `bmad-tea-test-review` (optional), `bmad-tea-n
20
20
 
21
21
  TEA works on its own. When the method module is installed too, these routes add testing to its flow. Name a method skill only when it is installed, and a TEA skill only when it is installed; otherwise give the route without the missing step, and say which TEA skill would fill it once installed. Depth follows risk: a small, low-risk change needs none of this beyond the checks its build runs.
22
22
 
23
- | The user is | Recommend | Because |
24
- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
- | Planning an initiative whose risk, compliance or reach calls for a test strategy | `bmad-tea-test-design` at system level, once the PRD and architecture exist | Testability concerns reach the architecture while it can still change. |
26
- | About to build the stories of an epic | `bmad-tea-test-design` at epic level, then `bmad-tea-framework` when the project has no test framework | The epic's plan sets priorities for every story in it. |
27
- | About to build one story with settled criteria, and wants test-first work | `bmad-tea-automate` in red mode, then `bmad-build` | The builder turns the red tests green; the checklist lists them for the story's plan. Red mode takes the story's ref (`1.2`), its title, or its leaf file, and reads the ticket through the method's ticket tools; on v6 it takes the story file. |
28
- | Done with `bmad-build` and wants a maintained test suite for the work | `bmad-tea-automate` in expand mode | It writes tests that follow the project's framework and fixtures, runs them, and heals test defects. `bmad-qa-generate-e2e-tests` remains the fit for a quick, one-off set of end-to-end tests. |
29
- | Upgraded a v6 project with `bmad migrate method` and has TEA checklists, matrices or reports from before | `bmad migrate tea`, after the method migration | It moves each story output onto its v7 ticket's key from exact evidence, keeps historical citations, and lists anything it cannot map. |
30
- | Has tests whose quality is in doubt | `bmad-tea-test-review` | A scored audit names the flaky, slow or weak tests. |
31
- | Closing an epic or preparing a release | The release-gate order above | Trace gives the gate decision; Test Review and NFR are added when risk calls for them. |
23
+ | The user is | Recommend | Because |
24
+ | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
25
+ | Planning an initiative whose risk, compliance or reach calls for a test strategy | `bmad-tea-test-design` at system level, once the PRD and architecture exist | Testability concerns reach the architecture while it can still change. |
26
+ | About to build the stories of an epic | `bmad-tea-test-design` at epic level, then `bmad-tea-framework` when the project has no test framework | The epic's plan sets priorities for every story in it. |
27
+ | About to build one story with settled criteria, and wants test-first work | `bmad-tea-automate` in red mode, then `bmad-build` | The builder turns the red tests green; the checklist lists them for the story's plan. Red mode takes the story's ref (`1.2`), its title, or its leaf file, and reads the ticket through the method's ticket tools; on v6 it takes the story file. |
28
+ | Done with `bmad-build` and wants a maintained test suite for the work | `bmad-tea-automate` in expand mode | It writes tests that follow the project's framework and fixtures, runs them, and heals test defects. `bmad-qa-generate-e2e-tests` remains the fit for a quick, one-off set of end-to-end tests. |
29
+ | Upgraded a v6 project with `bmad migrate method` and has TEA checklists, matrices or reports from before | `bmad migrate tea`, after the method migration | It moves each story output onto its v7 ticket's key from exact evidence, keeps historical citations, and lists anything it cannot map. |
30
+ | Has `bmad-tea-atdd` or `bmad-tea-ci` customizations, or `bmad setup` cleanup listed them as unused | `bmad migrate tea` (migration 3), before cleanup when you can | It moves red settings into `[workflow.red]` of `bmad-tea-automate.toml` and CI settings into `[workflow.ci]` of `bmad-tea-framework.toml`, reading the cleanup backup when cleanup already removed a file. Keep the `.v6-v7-migration-backup-*` folder until it has run. |
31
+ | Has tests whose quality is in doubt | `bmad-tea-test-review` | A scored audit names the flaky, slow or weak tests. |
32
+ | Closing an epic or preparing a release | The release-gate order above | Trace gives the gate decision; Test Review and NFR are added when risk calls for them. |
32
33
 
33
34
  The story's status is never TEA's to change. Red mode hands its tests to the builder, the builder records the work in the story's plan, and the user or an orchestrator marks the ticket done.
34
35
 
@@ -188,7 +188,7 @@ tags:
188
188
 
189
189
  - Subflows are the mobile equivalent of a fixture: one owner, many consumers
190
190
  - Pass data through `env` rather than baking values into the subflow
191
- - Keep subflows in a dedicated directory so a flow-count metric does not treat them as tests
191
+ - Keep reusable subflows in a `subflows/` directory so a flow-count metric can distinguish them from tests. The write-time hook exempts that exact directory from C4 assertion-presence checks and still enforces hard waits and other applicable rules. Calling test flows must assert the destination state.
192
192
 
193
193
  ### Example 5: Conditional and Platform-Specific Steps
194
194