bmad-method-test-architecture-enterprise 1.22.1 → 1.22.2

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 (69) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +15 -0
  3. package/cli/lib/changed-tests.js +1 -1
  4. package/docs/explanation/knowledge-base-system.md +2 -2
  5. package/docs/explanation/verification-architecture.md +1 -1
  6. package/docs/glossary/index.md +1 -1
  7. package/docs/how-to/workflows/teach-me-testing.md +5 -5
  8. package/docs/reference/commands.md +1 -1
  9. package/docs/reference/execution-targets.md +2 -2
  10. package/docs/reference/knowledge-base.md +19 -15
  11. package/docs/reference/troubleshooting.md +2 -2
  12. package/docs/tutorials/learn-testing-tea-academy.md +2 -2
  13. package/package.json +1 -1
  14. package/src/agents/bmad-tea/resources/knowledge/evidence-integrity.md +205 -0
  15. package/src/agents/bmad-tea/resources/knowledge/maestro-flows.md +105 -11
  16. package/src/agents/bmad-tea/resources/knowledge/mobile-ci-device-lab.md +116 -0
  17. package/src/agents/bmad-tea/resources/knowledge/mobile-test-strategy.md +13 -10
  18. package/src/agents/bmad-tea/resources/tea-index.csv +2 -0
  19. package/src/workflows/testarch/bmad-teach-me-testing/data/tea-resources-index.yaml +11 -1
  20. package/src/workflows/testarch/bmad-testarch-atdd/resources/knowledge/evidence-integrity.md +205 -0
  21. package/src/workflows/testarch/bmad-testarch-atdd/resources/knowledge/maestro-flows.md +105 -11
  22. package/src/workflows/testarch/bmad-testarch-atdd/resources/knowledge/mobile-ci-device-lab.md +116 -0
  23. package/src/workflows/testarch/bmad-testarch-atdd/resources/knowledge/mobile-test-strategy.md +13 -10
  24. package/src/workflows/testarch/bmad-testarch-atdd/resources/tea-index.csv +2 -0
  25. package/src/workflows/testarch/bmad-testarch-automate/resources/knowledge/evidence-integrity.md +205 -0
  26. package/src/workflows/testarch/bmad-testarch-automate/resources/knowledge/maestro-flows.md +105 -11
  27. package/src/workflows/testarch/bmad-testarch-automate/resources/knowledge/mobile-ci-device-lab.md +116 -0
  28. package/src/workflows/testarch/bmad-testarch-automate/resources/knowledge/mobile-test-strategy.md +13 -10
  29. package/src/workflows/testarch/bmad-testarch-automate/resources/tea-index.csv +2 -0
  30. package/src/workflows/testarch/bmad-testarch-automate/steps-c/step-01-preflight-and-context.md +1 -1
  31. package/src/workflows/testarch/bmad-testarch-automate/steps-c/step-03b-subagent-mobile.md +3 -2
  32. package/src/workflows/testarch/bmad-testarch-ci/resources/knowledge/evidence-integrity.md +205 -0
  33. package/src/workflows/testarch/bmad-testarch-ci/resources/knowledge/maestro-flows.md +105 -11
  34. package/src/workflows/testarch/bmad-testarch-ci/resources/knowledge/mobile-ci-device-lab.md +116 -0
  35. package/src/workflows/testarch/bmad-testarch-ci/resources/knowledge/mobile-test-strategy.md +13 -10
  36. package/src/workflows/testarch/bmad-testarch-ci/resources/tea-index.csv +2 -0
  37. package/src/workflows/testarch/bmad-testarch-ci/steps-c/step-02-generate-pipeline.md +5 -3
  38. package/src/workflows/testarch/bmad-testarch-ci/steps-c/step-03-configure-quality-gates.md +2 -0
  39. package/src/workflows/testarch/bmad-testarch-framework/resources/knowledge/evidence-integrity.md +205 -0
  40. package/src/workflows/testarch/bmad-testarch-framework/resources/knowledge/maestro-flows.md +105 -11
  41. package/src/workflows/testarch/bmad-testarch-framework/resources/knowledge/mobile-ci-device-lab.md +116 -0
  42. package/src/workflows/testarch/bmad-testarch-framework/resources/knowledge/mobile-test-strategy.md +13 -10
  43. package/src/workflows/testarch/bmad-testarch-framework/resources/tea-index.csv +2 -0
  44. package/src/workflows/testarch/bmad-testarch-framework/steps-c/step-03-scaffold-framework.md +2 -1
  45. package/src/workflows/testarch/bmad-testarch-nfr/resources/knowledge/evidence-integrity.md +205 -0
  46. package/src/workflows/testarch/bmad-testarch-nfr/resources/knowledge/maestro-flows.md +105 -11
  47. package/src/workflows/testarch/bmad-testarch-nfr/resources/knowledge/mobile-ci-device-lab.md +116 -0
  48. package/src/workflows/testarch/bmad-testarch-nfr/resources/knowledge/mobile-test-strategy.md +13 -10
  49. package/src/workflows/testarch/bmad-testarch-nfr/resources/tea-index.csv +2 -0
  50. package/src/workflows/testarch/bmad-testarch-test-design/resources/knowledge/evidence-integrity.md +205 -0
  51. package/src/workflows/testarch/bmad-testarch-test-design/resources/knowledge/maestro-flows.md +105 -11
  52. package/src/workflows/testarch/bmad-testarch-test-design/resources/knowledge/mobile-ci-device-lab.md +116 -0
  53. package/src/workflows/testarch/bmad-testarch-test-design/resources/knowledge/mobile-test-strategy.md +13 -10
  54. package/src/workflows/testarch/bmad-testarch-test-design/resources/tea-index.csv +2 -0
  55. package/src/workflows/testarch/bmad-testarch-test-review/resources/knowledge/evidence-integrity.md +205 -0
  56. package/src/workflows/testarch/bmad-testarch-test-review/resources/knowledge/maestro-flows.md +105 -11
  57. package/src/workflows/testarch/bmad-testarch-test-review/resources/knowledge/mobile-ci-device-lab.md +116 -0
  58. package/src/workflows/testarch/bmad-testarch-test-review/resources/knowledge/mobile-test-strategy.md +13 -10
  59. package/src/workflows/testarch/bmad-testarch-test-review/resources/tea-index.csv +2 -0
  60. package/src/workflows/testarch/bmad-testarch-test-review/steps-c/criteria-registry.md +11 -10
  61. package/src/workflows/testarch/bmad-testarch-test-review/steps-c/step-01-load-context.md +1 -1
  62. package/src/workflows/testarch/bmad-testarch-test-review/steps-c/step-02-discover-tests.md +1 -1
  63. package/src/workflows/testarch/bmad-testarch-test-review/steps-c/step-03a-subagent-determinism.md +1 -0
  64. package/src/workflows/testarch/bmad-testarch-trace/resources/knowledge/evidence-integrity.md +205 -0
  65. package/src/workflows/testarch/bmad-testarch-trace/resources/knowledge/maestro-flows.md +105 -11
  66. package/src/workflows/testarch/bmad-testarch-trace/resources/knowledge/mobile-ci-device-lab.md +116 -0
  67. package/src/workflows/testarch/bmad-testarch-trace/resources/knowledge/mobile-test-strategy.md +13 -10
  68. package/src/workflows/testarch/bmad-testarch-trace/resources/tea-index.csv +2 -0
  69. package/test/test-test-review-cli.js +3 -3
@@ -31,7 +31,7 @@
31
31
  "name": "bmad-method-test-architecture-enterprise",
32
32
  "source": "./",
33
33
  "description": "Master Test Architect module for quality strategy, test automation, CI/CD quality gates, and structured testing education. Part of the BMad Method ecosystem.",
34
- "version": "1.22.1",
34
+ "version": "1.22.2",
35
35
  "author": {
36
36
  "name": "Murat K Ozcan (TEA Creator) & Brian (BMad) Madison"
37
37
  },
package/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.22.2] - 2026-08-14
11
+
12
+ ### Added
13
+
14
+ - `evidence-integrity.md` knowledge fragment (core tier). Covers the two ways a suite reports a result it did not earn: a check that cannot fail (soft assertions carrying an outcome, `continue-on-error` on the test step, a runner manifest naming a subset of the suite, an assertion whose meaning differs per platform) and a diagnostic with no could-not-measure state, where a missing tool is reported as a failed condition. Also covers verifying a framework property exists and behaves before relying on it, emitting cross-boundary verdicts from the side that can observe them, stating local-versus-CI environment asymmetry, and resolving environment-dependent values before anything derives from them.
15
+ - `mobile-ci-device-lab.md` knowledge fragment (specialized tier). Leads with the build-artifact decision: device flows run against a release-shaped or development build, never a prebuilt development shell such as Expo Go, whose absent native modules make deep links, notifications, and payments unassertable and whose launch path exists only in CI. Also covers `reactivecircus/android-emulator-runner` behavior that breaks jobs silently (the `script:` input is split on newlines and each line runs as its own `sh -c`; hardware inputs are appended to `config.ini` on every invocation, outside the AVD-creation guard, which makes the emulator reject the cached snapshot at boot), AVD snapshot cache keying, runner version pinning with a resolved-version assertion, dev-server reachability over `adb reverse` with a manifest health check that sends the client's own headers, the run-directory artifact layout, and driver-port collisions under sharding.
16
+ - Criteria registry row `C7` (CRITICAL, applicability-gated to Maestro flows): a flow whose only assertion about its destination state carries `optional: true`, or whose sole outcome assertion follows a command the target platform does not implement, so nothing in the flow could have changed the screen. The registry now carries 32 rows, 4 of them mobile-specific.
17
+
18
+ ### Changed
19
+
20
+ - `maestro-flows.md` gains a section on commands whose behavior does not match their name: `back` is documented for Android and Web only and the iOS driver's implementation is empty, so it no-ops while reporting COMPLETED; `hideKeyboard` on Android is documented as identical to `back`, which dismisses an open React Native modal; `index:` counts currently-rendered matches rather than list items, so it drifts under virtualization; `point:` is a sanctioned escape hatch only for elements absent from the accessibility tree. Adds the waiting facts that decide flow design (default assertion timeout, no wait-for-app-ready command, `waitForAnimationToEnd` succeeding on timeout, `retry` around a journey being an anti-pattern), plus matching anti-pattern and checklist rows.
21
+ - `mobile-test-strategy.md` now makes the build artifact the first CI decision, and corrects the failure-diagnosis order: read per-step statuses and the hierarchy dump captured at failure, and treat the failure screenshot with suspicion because it is taken after teardown.
22
+ - `*ci` mobile pipeline guidance now specifies the build artifact, the one-line emulator `script:` form, split AVD cache restore/save, hardware inputs on the creation step only, an asserted runner version, and run-directory artifact resolution.
23
+ - `*automate` mobile generation requires every outcome assertion to be able to fail and every cross-platform command to be documented for both platforms or split by `runFlow: when: platform:`.
24
+
10
25
  ## [1.22.1] - 2026-08-13
11
26
 
12
27
  ### Removed
@@ -98,7 +98,7 @@ function resetExtraTestPatterns() {
98
98
  *
99
99
  * Code extensions are the general gate, so docs/example.spec.md is documentation,
100
100
  * not a test. Maestro is the one deliberate exception: the criteria registry
101
- * carries mobile rows (C4, H1, H3, H4, H9, M8, L8), so a declarative YAML flow is
101
+ * carries mobile rows (C4, C7, H1, H3, H4, H9, M8, L8), so a declarative YAML flow is
102
102
  * a format the ledger CAN score and it is recognized natively rather than needing
103
103
  * --test-glob. The exception is scoped to YAML under a Maestro directory (or a
104
104
  * *.flow.yaml anywhere) and excludes Maestro's own workspace config, which is
@@ -20,7 +20,7 @@ network-first,Network-First Safeguards,"Intercept-before-navigate workflow, HAR
20
20
  test-quality,Test Quality Definition of Done,"Execution limits, isolation rules, green criteria","quality,definition-of-done,tests",core,knowledge/test-quality.md
21
21
  ```
22
22
 
23
- `tier` is one of `core`, `extended`, or `specialized`. The 54 fragments split 20 / 19 / 15 across those tiers.
23
+ `tier` is one of `core`, `extended`, or `specialized`. The 56 fragments split 21 / 19 / 16 across those tiers.
24
24
 
25
25
  The agent-level `resources/` directory is the reference catalog. Workflow skills also carry their own `resources/tea-index.csv` and `resources/knowledge/` directories. That duplication is intentional: workflow step frontmatter resolves `knowledgeIndex: './resources/tea-index.csv'` from `{skill-root}`, which keeps each workflow skill modular and self-contained.
26
26
 
@@ -150,7 +150,7 @@ test('job completion', async ({ apiRequest, recurse }) => {
150
150
 
151
151
  ## Related
152
152
 
153
- - [Knowledge Base Index](/docs/reference/knowledge-base.md) - all 54 fragments, categorized
153
+ - [Knowledge Base Index](/docs/reference/knowledge-base.md) - all 56 fragments, categorized
154
154
  - [Testing as Engineering](/docs/explanation/testing-as-engineering.md) - the context engineering argument
155
155
  - [Test Quality Standards](/docs/explanation/test-quality-standards.md) - what `test-quality.md` encodes
156
156
  - [Network-First Patterns](/docs/explanation/network-first-patterns.md) - what `network-first.md` encodes
@@ -87,7 +87,7 @@ TEA's execution coverage is uneven, and the uneven part is deliberate to state r
87
87
 
88
88
  ### The self-audit
89
89
 
90
- Of TEA's 54 knowledge fragments, 38 name Playwright or Cypress. Two cover mobile. None covers a backend test framework, and the knowledge index has no row tagged for pytest, JUnit, Go test, xUnit, or RSpec.
90
+ Of TEA's 56 knowledge fragments, 38 name Playwright or Cypress. Three cover mobile. None covers a backend test framework, and the knowledge index has no row tagged for pytest, JUnit, Go test, xUnit, or RSpec.
91
91
 
92
92
  That is the real shape of the gap, and it is uneven in a specific way. Web and mobile are knowledge-backed: TEA carries curated patterns for both, so what it generates follows a pattern library rather than the model's improvisation. Backend languages are not. TEA can decide to scaffold pytest, and does, but it works from the conventions named inline in the workflow step and from the project it can see. The reasoning that selects pytest is as rigorous for a Python service as for a React Native app. The execution guidance behind it is not yet equivalent.
93
93
 
@@ -135,7 +135,7 @@ Terminology reference for Test Architect (TEA).
135
135
  | **Epic-Level Test Design** | Test planning per epic (Phase 4) focusing on risk assessment, priorities, and coverage strategy for that specific epic. |
136
136
  | **Fixture Architecture** | Pattern of building pure functions first, then wrapping in framework-specific fixtures for testability, reusability, and composition. |
137
137
  | **Gate Decision** | Go/no-go decision for release with four outcomes: PASS ✅ (ready), CONCERNS ⚠️ (proceed with mitigation), FAIL ❌ (blocked), WAIVED ⏭️ (approved despite issues). |
138
- | **Knowledge Fragment** | Individual markdown file in TEA's knowledge base covering a specific testing pattern or practice (54 fragments total). |
138
+ | **Knowledge Fragment** | Individual markdown file in TEA's knowledge base covering a specific testing pattern or practice (56 fragments total). |
139
139
  | **Network-First Pattern** | Testing pattern that waits for actual network responses instead of fixed timeouts to avoid race conditions and flakiness. |
140
140
  | **NFR Evidence Audit** | Validation of non-functional requirement evidence (security, performance, reliability, maintainability) against defined thresholds. |
141
141
  | **No TEA** | Engagement model 1. Skip all TEA workflows and keep the team's existing testing approach. A valid choice when that approach already works. |
@@ -32,7 +32,7 @@ Use TEA's `teach-me-testing` workflow (TEA Academy) to learn testing progressive
32
32
  4. **Test Design (60 min)** - Risk assessment and coverage planning workflow
33
33
  5. **ATDD & Automate (60 min)** - TDD red-green approach, test generation
34
34
  6. **Quality & Trace (45 min)** - Test review (5 dimensions), coverage traceability
35
- 7. **Advanced Patterns (ongoing)** - Explore 54 knowledge fragments on-demand
35
+ 7. **Advanced Patterns (ongoing)** - Explore 56 knowledge fragments on-demand
36
36
 
37
37
  ### What You'll Gain
38
38
 
@@ -125,7 +125,7 @@ Skip fundamentals, focus on:
125
125
 
126
126
  - Session 3: TEA architecture patterns
127
127
  - Session 4: Test Design workflow
128
- - Session 7: Advanced patterns (54 knowledge fragments)
128
+ - Session 7: Advanced patterns (56 knowledge fragments)
129
129
 
130
130
  **Time commitment:** 3-4 hours (highly targeted)
131
131
 
@@ -205,12 +205,12 @@ Skip fundamentals, focus on:
205
205
 
206
206
  **Topics:**
207
207
 
208
- - Menu-driven exploration of 54 knowledge fragments
208
+ - Menu-driven exploration of 56 knowledge fragments
209
209
  - 5 categories: Testing Patterns, Playwright Utils, Configuration & Governance, Quality Frameworks, Auth & Security
210
210
  - Deep-dive into specific patterns as needed
211
211
  - GitHub links for browsing source
212
212
 
213
- **Resources:** All 54 knowledge fragments
213
+ **Resources:** All 56 knowledge fragments
214
214
  **GitHub:** [Knowledge Base Repository](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/tree/main/src/agents/bmad-tea/resources/knowledge)
215
215
 
216
216
  ## Completion Summary
@@ -228,7 +228,7 @@ Complete all 7 sessions to receive your TEA Academy completion summary with:
228
228
  1. **Set aside dedicated time** - Each session requires focus (30-90 min)
229
229
  2. **Take your own notes** - Session notes are generated, but add personal insights
230
230
  3. **Apply immediately** - Practice concepts on your current project
231
- 4. **Explore fragments** - Session 7 has 54 fragments for deep-dive topics
231
+ 4. **Explore fragments** - Session 7 has 56 fragments for deep-dive topics
232
232
  5. **Share with team** - Help others learn by sharing your experience
233
233
  6. **Don't rush** - Learning takes time, pause and resume as needed
234
234
 
@@ -78,7 +78,7 @@ To ship your own workflow, package it as custom content and attach it to `bmad-t
78
78
  4. Test Design (60 min) - Risk assessment, coverage planning
79
79
  5. ATDD & Automate (60 min) - TDD red-green, test generation
80
80
  6. Quality & Trace (45 min) - Test review, traceability, metrics
81
- 7. Advanced Patterns (ongoing) - 54 knowledge fragments exploration
81
+ 7. Advanced Patterns (ongoing) - 56 knowledge fragments exploration
82
82
 
83
83
  **Features:**
84
84
 
@@ -93,8 +93,8 @@ All shipped templates are written around a Node and browser toolchain and are ad
93
93
 
94
94
  Published deliberately, so an evaluation does not have to discover them:
95
95
 
96
- - **No knowledge fragments exist for any backend test framework.** 38 of 54 fragments name Playwright or Cypress and 2 cover mobile; zero cover pytest, JUnit, Go test, xUnit, or RSpec. Generation for those stacks relies on inline workflow conventions rather than a curated pattern library.
97
- - **Review criteria are still mostly JavaScript-shaped.** The registry carries 31 rows: 7 are portable across languages, 3 are mobile-specific, and the rest key on browser, Testing Library, Vitest, or Pact constructs. Scores on non-JavaScript, non-Maestro suites are directionally useful and not comparable to scores on a JavaScript suite.
96
+ - **No knowledge fragments exist for any backend test framework.** 38 of 56 fragments name Playwright or Cypress and 3 cover mobile; zero cover pytest, JUnit, Go test, xUnit, or RSpec. Generation for those stacks relies on inline workflow conventions rather than a curated pattern library.
97
+ - **Review criteria are still mostly JavaScript-shaped.** The registry carries 32 rows: 7 are portable across languages, 4 are mobile-specific, and the rest key on browser, Testing Library, Vitest, or Pact constructs. Scores on non-JavaScript, non-Maestro suites are directionally useful and not comparable to scores on a JavaScript suite.
98
98
  - **Rust is declared but incomplete.** See the generation table above.
99
99
  - **CI templates are Node-first.** See the CI section above.
100
100
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  title: 'TEA Knowledge Base Index'
3
- description: Complete index of TEA's 54 knowledge fragments for context engineering
3
+ description: Complete index of TEA's 56 knowledge fragments for context engineering
4
4
  ---
5
5
 
6
6
  # TEA Knowledge Base Index
7
7
 
8
- TEA loads domain standards into context from 54 knowledge fragments, selected per workflow by the `tea-index.csv` manifest. Why that beats prompting, and how loading is wired: [Knowledge Base System](/docs/explanation/knowledge-base-system.md).
8
+ TEA loads domain standards into context from 56 knowledge fragments, selected per workflow by the `tea-index.csv` manifest. Why that beats prompting, and how loading is wired: [Knowledge Base System](/docs/explanation/knowledge-base-system.md).
9
9
 
10
10
  This page indexes every row of that manifest. Each entry is named by its manifest `id`, which differs from the file name for a few fragments; the link resolves to the file. The `Tier` column is the manifest's own `tier` value and decides when the fragment loads (see [Loading tiers](#loading-tiers)).
11
11
 
@@ -73,19 +73,22 @@ CI/CD patterns, burn-in testing, and selective test execution.
73
73
 
74
74
  Test quality standards, test level selection, TDD patterns, and the generation-safety gate.
75
75
 
76
- | Fragment | Tier | Description | Key Topics |
77
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
78
- | [test-quality](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/test-quality.md) | core | Execution limits, isolation rules, green criteria | DoD, best practices, anti-patterns |
79
- | [test-levels](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/test-levels-framework.md) | core | Guidelines for choosing unit, integration, or end-to-end coverage | Test pyramid, level selection |
80
- | [test-priorities](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/test-priorities-matrix.md) | core | P0–P3 criteria, coverage targets, execution ordering | Prioritization, risk-based testing |
81
- | [test-healing-patterns](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/test-healing-patterns.md) | core | Common failure patterns and automated fixes | Debugging, healing, fixes |
82
- | [confidence-gate](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/confidence-gate.md) | core | 1-10 confidence score with a stop-and-ask rule below threshold, so the agent declares unknowns instead of fabricating them | Agent safety, generation, governance |
83
- | [component-tdd](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/component-tdd.md) | extended | Red→green→refactor workflow, provider isolation | TDD, component testing |
76
+ | Fragment | Tier | Description | Key Topics |
77
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------- |
78
+ | [test-quality](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/test-quality.md) | core | Execution limits, isolation rules, green criteria | DoD, best practices, anti-patterns |
79
+ | [test-levels](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/test-levels-framework.md) | core | Guidelines for choosing unit, integration, or end-to-end coverage | Test pyramid, level selection |
80
+ | [test-priorities](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/test-priorities-matrix.md) | core | P0–P3 criteria, coverage targets, execution ordering | Prioritization, risk-based testing |
81
+ | [test-healing-patterns](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/test-healing-patterns.md) | core | Common failure patterns and automated fixes | Debugging, healing, fixes |
82
+ | [confidence-gate](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/confidence-gate.md) | core | 1-10 confidence score with a stop-and-ask rule below threshold, so the agent declares unknowns instead of fabricating them | Agent safety, generation, governance |
83
+ | [evidence-integrity](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/evidence-integrity.md) | core | Checks that cannot fail, three-state diagnostics, verifying framework properties before use, and stating environment asymmetry | Falsifiability, hollow green, diagnostics |
84
+ | [component-tdd](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/component-tdd.md) | extended | Red→green→refactor workflow, provider isolation | TDD, component testing |
84
85
 
85
86
  **Used in:** `test-design`, `atdd`, `automate`, `test-review`, `trace`
86
87
 
87
88
  `confidence-gate` covers selectors, endpoints, risk classification, fixtures, schemas, and data factories. Any generation step that cannot establish a value from the repo records it as an unknown rather than inventing it.
88
89
 
90
+ `evidence-integrity` covers the other half of the same problem: a check that cannot go red, and a diagnostic that reports a verdict it could not measure. Both produce green with nothing behind it, which is why the review registry's CRITICAL rows exist.
91
+
89
92
  ---
90
93
 
91
94
  ### Risk & Gates
@@ -175,10 +178,11 @@ Delivery-side testing for asynchronous, eventually-consistent webhook flows usin
175
178
 
176
179
  Maestro device flows and the level discipline that decides what becomes a flow at all. Loaded when `test_stack_type` is `mobile` or when the review set contains a Maestro flow (`.yaml`/`.yml` under `maestro/` or `.maestro/`, or `*.flow.yaml` or `*.flow.yml`).
177
180
 
178
- | Fragment | Tier | Description | Key Topics |
179
- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
180
- | [mobile-test-strategy](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/mobile-test-strategy.md) | specialized | Mobile test level framework, what belongs in a device flow, mobile risk categories, device matrix, CI shape | Levels, risk, device matrix, permissions, lifecycle |
181
- | [maestro-flows](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/maestro-flows.md) | specialized | Flow structure, selector hierarchy, `clearState` isolation, synchronization without sleeps, subflow composition | Maestro, selectors, isolation, anti-patterns |
181
+ | Fragment | Tier | Description | Key Topics |
182
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
183
+ | [mobile-test-strategy](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/mobile-test-strategy.md) | specialized | Mobile test level framework, what belongs in a device flow, mobile risk categories, device matrix, CI shape | Levels, risk, device matrix, permissions, lifecycle |
184
+ | [maestro-flows](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/maestro-flows.md) | specialized | Flow structure, selector hierarchy, `clearState` isolation, synchronization without sleeps, subflow composition, command semantics that differ by platform | Maestro, selectors, isolation, anti-patterns |
185
+ | [mobile-ci-device-lab](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/blob/main/src/agents/bmad-tea/resources/knowledge/mobile-ci-device-lab.md) | specialized | Build artifact selection, emulator snapshot caching, runner version pinning, dev-server reachability, artifact layout and failure diagnosis, sharding | Build artifact, emulator, caching, pinning, artifacts |
182
186
 
183
187
  **Used in:** `framework`, `automate`, `atdd`, `test-design`, `test-review`, `ci` (when `test_stack_type` is `mobile` or a Maestro flow is present)
184
188
 
@@ -222,7 +226,7 @@ The package's remaining fragments are indexed under the category that matches wh
222
226
 
223
227
  **Location:** `src/agents/bmad-tea/resources/tea-index.csv`
224
228
 
225
- **Fragment location:** `src/agents/bmad-tea/resources/knowledge/` (all 54 fragments in a single directory)
229
+ **Fragment location:** `src/agents/bmad-tea/resources/knowledge/` (all 56 fragments in a single directory)
226
230
 
227
231
  **Structure:**
228
232
 
@@ -137,8 +137,8 @@ tea_capability_probe: true
137
137
  **Cause**: `tea-index.csv` is missing or truncated, or fragment files are missing.
138
138
 
139
139
  ```bash
140
- wc -l < _bmad/tea/agents/bmad-tea/resources/tea-index.csv # 55 (header + 54 fragments)
141
- ls _bmad/tea/agents/bmad-tea/resources/knowledge/*.md | wc -l # 54
140
+ wc -l < _bmad/tea/agents/bmad-tea/resources/tea-index.csv # 57 (header + 56 fragments)
141
+ ls _bmad/tea/agents/bmad-tea/resources/knowledge/*.md | wc -l # 56
142
142
  head -1 _bmad/tea/agents/bmad-tea/resources/tea-index.csv
143
143
  # id,name,description,tags,tier,fragment_file
144
144
 
@@ -60,8 +60,8 @@ Run the workflow again at any time. It detects the progress file, shows your das
60
60
 
61
61
  ## Next Steps
62
62
 
63
- You have completed one session of seven. The rest cover core concepts, architecture patterns, test design, ATDD and automate, quality and trace, and a menu-driven tour of the 54 knowledge fragments.
63
+ You have completed one session of seven. The rest cover core concepts, architecture patterns, test design, ATDD and automate, quality and trace, and a menu-driven tour of the 56 knowledge fragments.
64
64
 
65
65
  - [How to Learn Testing with TEA Academy](/docs/how-to/workflows/teach-me-testing.md) for the full session list, learning paths by experience, role customization, and troubleshooting
66
66
  - [Getting Started with Test Architect](/docs/tutorials/tea-lite-quickstart.md) to generate and run real tests in 30 minutes
67
- - [Knowledge Base](/docs/reference/knowledge-base.md) for the 54 fragments
67
+ - [Knowledge Base](/docs/reference/knowledge-base.md) for the 56 fragments
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "bmad-method-test-architecture-enterprise",
4
- "version": "1.22.1",
4
+ "version": "1.22.2",
5
5
  "description": "Master Test Architect for quality strategy, test automation, and release gates",
6
6
  "keywords": [
7
7
  "bmad",
@@ -0,0 +1,205 @@
1
+ # Evidence Integrity
2
+
3
+ ## Principle
4
+
5
+ A suite lies in two ways. A test that **cannot fail** reports coverage it does not have, and a diagnostic that **could not measure** reports a verdict it did not earn. Both produce green that means nothing, and the second one is worse, because a false negative sends the investigation somewhere wrong and every conclusion downstream inherits the error. Every check needs a way to fail. Every probe needs three states (pass, fail, and could-not-measure) and has to observe the thing it reports on rather than a proxy that correlates with it.
6
+
7
+ ## Rationale
8
+
9
+ **The Problem**: Suites are scored by their result, so pressure runs one direction. An assertion that never fires, a step marked `continue-on-error`, a runner manifest that names three of eighteen files, a probe that reports "unreachable" when the tool it needed was missing: each converts an unknown into a green. Nothing in a CI summary distinguishes a passing check from a check that had no way to fail, and nothing distinguishes "the device could not reach the host" from "the command I used to ask was not installed."
10
+
11
+ **The Solution**: Treat falsifiability as a property to verify, the same as any other. For every check, name the input that would turn it red; if you cannot, the check is decoration. For every diagnostic, separate the measurement from the verdict, make the absence of a measurement its own reported state rather than a silent fail verdict, and name what else could have made it pass.
12
+
13
+ **Why This Matters**:
14
+
15
+ - Green means the behavior works instead of meaning the harness ran
16
+ - A failing diagnostic points at the real fault instead of at whichever tool was missing
17
+ - Root-cause work stops compounding on unearned verdicts
18
+ - Gate decisions (PASS / CONCERNS / FAIL) rest on evidence that would have shown the defect
19
+
20
+ ## Pattern Examples
21
+
22
+ ### Example 1: The Check That Cannot Fail
23
+
24
+ **Context**: Four shapes found live in one suite that reported success on every run.
25
+
26
+ **Implementation**:
27
+
28
+ ```yaml
29
+ # ❌ Shape 1: an optional assertion downstream of a command that is a no-op here.
30
+ # `back` is Android and Web only; on iOS it does nothing and still reports COMPLETED.
31
+ # The assertion then cannot fail either, because `optional: true` swallows the miss.
32
+ # Neither half can go red, and this pair asserted a Home-screen label from a screen
33
+ # the flow never visits.
34
+ - back
35
+ - assertVisible:
36
+ text: 'Home'
37
+ optional: true
38
+
39
+ # ✅ Falsifiable: branch the platform, then assert without an escape hatch
40
+ - runFlow:
41
+ when:
42
+ platform: Android
43
+ commands:
44
+ - back
45
+ - runFlow:
46
+ when:
47
+ platform: iOS
48
+ commands:
49
+ - tapOn:
50
+ id: 'nav_back_button'
51
+ - assertVisible:
52
+ id: 'home_screen_root'
53
+ ```
54
+
55
+ ```yaml
56
+ # ❌ Shape 2: the job that runs the tests cannot turn the build red
57
+ - name: E2E flows
58
+ continue-on-error: true
59
+ run: maestro test maestro/
60
+
61
+ # ✅ continue-on-error belongs on artifact collection, never on the test step
62
+ - name: E2E flows
63
+ run: maestro test maestro/
64
+ - name: Upload artifacts
65
+ if: always()
66
+ uses: actions/upload-artifact@v4
67
+ ```
68
+
69
+ ```yaml
70
+ # ❌ Shape 3: the manifest names 3 of the 18 flows in the directory.
71
+ # The suite is green because fifteen files never ran.
72
+ flows:
73
+ - login.yaml
74
+ - checkout.yaml
75
+ - profile.yaml
76
+
77
+ # ✅ Include by pattern, exclude by exception, and assert the executed count
78
+ flows:
79
+ - '*.yaml'
80
+ ```
81
+
82
+ **Shape 4** has no snippet, because the step looks correct: an assertion passes on iOS because the element is still in the hierarchy behind a presented modal, and fails on Android where the modal replaces the hierarchy. Same assertion, different meaning per platform. Any assertion whose truth depends on how a platform composes its view tree needs its own per-platform expectation, not one shared line.
83
+
84
+ **Key points**:
85
+
86
+ - Name the input that would turn each check red. If none exists, the check is decoration.
87
+ - `optional: true`, `continue-on-error`, a partial manifest, and a soft assertion are the four common ways a result stops being falsifiable.
88
+ - **When you make a hollow check falsifiable and it goes red, the red is the finding.** It is a defect that was always there and is now visible. Reporting it as a regression you introduced is the wrong read and usually gets the fix reverted.
89
+
90
+ ### Example 2: Diagnostics Need a Could-Not-Measure State
91
+
92
+ **Context**: A probe checking whether a device can reach a host. The tool it invokes is not installed on that device.
93
+
94
+ **Implementation**:
95
+
96
+ ```bash
97
+ # ❌ Two states only. A missing binary is indistinguishable from a real failure,
98
+ # and this reported "device cannot reach the network" three times in one session
99
+ # while the network was fine.
100
+ if adb shell "wget -q -O - http://10.0.2.2:8081/status"; then
101
+ echo "PASS: device reached the dev server"
102
+ else
103
+ echo "FAIL: device cannot reach the dev server"
104
+ fi
105
+
106
+ # ✅ Three states. Establish the instrument before trusting the reading.
107
+ if ! adb shell 'command -v curl >/dev/null 2>&1'; then
108
+ echo "COULD-NOT-MEASURE: no HTTP client on the device; reachability unknown"
109
+ exit 77
110
+ fi
111
+ if adb shell "curl -fsS http://127.0.0.1:8081/status >/dev/null 2>&1"; then
112
+ echo "PASS: device reached the dev server"
113
+ else
114
+ echo "FAIL: device reached the network stack and the request did not succeed"
115
+ fi
116
+ ```
117
+
118
+ **A probe fails in two directions, and both produce a confident wrong answer.** The block above is the strict failure: a missing instrument read as a false condition. The permissive failure is subtler and harder to catch, because it produces a green. The same investigation later probed reachability by having the device open a TCP connection to a port that `adb reverse` had mapped. With a reverse mapping in place the device always has a local listener on that port, so the connect succeeds whether or not anything on the host is behind it. The probe measured that a mapping existed and reported that a service was reachable.
119
+
120
+ **Rule**: a probe must observe the thing it claims to observe, never a proxy that merely correlates with it. Ask what else could make this check pass. Here the fix is the same as Example 4: open a throwaway listener inside the test process and assert that the process itself accepted a socket.
121
+
122
+ **Key points**:
123
+
124
+ - A non-zero exit means "the command failed," which is not the same claim as "the condition is false"
125
+ - A zero exit means "the command succeeded," which is not the same claim as "the condition is true"
126
+ - Reserve a distinct exit code and a distinct log word for could-not-measure so it never reads as a fail
127
+ - Apply this to every derived verdict, including the ones a harness prints as a convenience line. A convenience line is quoted later as evidence.
128
+
129
+ ### Example 3: Verify the Property Exists, Then Verify It Behaves
130
+
131
+ **Context**: Two separate failures, one about existence and one about behavior.
132
+
133
+ - **Existence**: a config key was invented from a plausible name and committed. The runner rejected the file on a parse error and 18 flows never executed. Nothing in the suite name suggested the cause.
134
+ - **Behavior**: a comment claimed a command was "a left-edge swipe on iOS." The implementation is an empty method that reports success. The comment propagated into other files and into a second session's reasoning before anyone opened the source.
135
+
136
+ **Rule**: before using a framework property, confirm it exists in the version you pin, from the docs or the shipped artifact. Before writing a comment that asserts **why** something works, confirm the mechanism from the docs or the source. A comment stating a mechanism is a claim with the same evidentiary standing as an assertion, and it is more dangerous, because nothing tests it.
137
+
138
+ Corollary for reviewers: "X is not supported / is platform-specific / only works on Y" needs a citation. One session asserted a flag was GNU-only when the platform's own manual documents it.
139
+
140
+ ### Example 4: Take the Verdict on the Side That Can Prove It
141
+
142
+ **Context**: A host-side reachability check used to argue that a device could reach a service.
143
+
144
+ The host and the device are different network namespaces. A host that resolves and connects proves the host's route and nothing about the guest's. Move the assertion to the side whose route is in question: open a throwaway listener on the host, have the device connect to it, and let the verdict be "this process observed the socket." Structure every environment claim so the proving party is the one that emits the result.
145
+
146
+ ### Example 5: State the Environment Asymmetry Before Arguing From Local to CI
147
+
148
+ **Context**: A local pass used as evidence about a CI failure.
149
+
150
+ Write the asymmetry down whenever a local result enters a CI argument:
151
+
152
+ | Axis | Local | CI |
153
+ | ------------- | ------------------------------------------ | ---------------------------------- |
154
+ | OS / arch | macOS, arm64 | Linux, x86_64 |
155
+ | Platform ver. | newest API level | two levels older |
156
+ | Image variant | vendor image with store services signed in | plain AOSP-style image, no account |
157
+ | Acceleration | native hypervisor | KVM, may be unavailable |
158
+ | Provisioning | long-lived machine | fresh runner every job |
159
+
160
+ A local pass proves the application path. It proves nothing about acceleration, snapshot restore, `PATH` handling, or an image variant the local machine never runs. Naming the axes converts "it works on my machine" from an argument into a scoped fact.
161
+
162
+ ### Example 6: Resolve Environment-Dependent Values Before Anything Derives From Them
163
+
164
+ **Context**: A harness that probed which host address the device could reach, and ran the probe after that address had already been baked into the built artifact.
165
+
166
+ The probe would have reported the right answer and changed nothing, and the app would have loaded over one route while its API calls went over another. Order of operations is part of correctness in a harness: resolve every environment-dependent value first, then derive. If a value is discovered after its consumers are built, the discovery is telemetry rather than configuration.
167
+
168
+ ## Anti-Patterns
169
+
170
+ | Anti-pattern | Why it fails | Fix |
171
+ | ------------------------------------------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
172
+ | Assertion with a soft or optional modifier as default | Cannot go red; reports coverage that does not exist | Reserve softness for genuinely optional UI, and assert the outcome hard |
173
+ | `continue-on-error` on the test step | The suite cannot fail the build | Put it on artifact collection only; use `if: always()` for uploads |
174
+ | Runner manifest listing a subset of the suite | Files silently never run; the count is the only clue | Include by pattern; assert the executed count against the file count |
175
+ | Missing tool reported as a failed condition | Sends the investigation at the wrong subsystem | Three-state probes; distinct exit code for could-not-measure |
176
+ | Probe observing a proxy that correlates with the target | Passes for a reason unrelated to the claim, and a green is never re-examined | Ask what else could make this pass; observe the thing itself |
177
+ | Verdict emitted by the side that cannot observe it | Proves the wrong namespace | Move the assertion to the party whose route or state is in question |
178
+ | Comment asserting a mechanism with no source read | Propagates into other files and into other people's reasoning | Cite the doc or source line, or omit the mechanism |
179
+ | Local result used as a CI argument, asymmetry unstated | Hides the axes that actually differ | Tabulate the differing axes with the claim |
180
+ | Environment probe running after its consumers | The answer arrives too late to configure anything | Resolve environment-dependent values first, then derive |
181
+ | Reverting a newly-red check as a regression | Restores the hollow green and loses the finding | Treat the red as the pre-existing defect it exposed |
182
+
183
+ ## Evidence Integrity Checklist
184
+
185
+ - [ ] **Every check is falsifiable**: for each assertion, the input that turns it red is nameable
186
+ - [ ] **No soft assertion by default**: optional modifiers only on genuinely optional UI, with a comment
187
+ - [ ] **No `continue-on-error` on a test step**: only on artifact collection
188
+ - [ ] **Executed count reconciled**: the number of tests that ran matches the number of test files discovered
189
+ - [ ] **Platform-divergent assertions split**: no single assertion whose meaning depends on how a platform composes its view tree
190
+ - [ ] **Probes are three-state**: pass, fail, and could-not-measure, with distinct exit codes
191
+ - [ ] **Probes observe their own claim**: no proxy that merely correlates with the condition being reported
192
+ - [ ] **Instruments verified before readings**: the probe confirms its tool exists before interpreting its result
193
+ - [ ] **Framework properties verified**: every key, flag, and command confirmed against the pinned version's docs or artifact
194
+ - [ ] **Mechanism comments cited**: any comment claiming why something works names its source
195
+ - [ ] **Verdicts emitted by the proving party**: cross-boundary claims asserted on the side that can observe them
196
+ - [ ] **Environment asymmetry stated**: local-versus-CI arguments list the differing axes
197
+ - [ ] **Resolution precedes derivation**: environment-dependent values resolved before any consumer is built
198
+
199
+ ## Integration Points
200
+
201
+ - **Used in workflows**: `*test-review` (the CRITICAL rows exist to catch checks that cannot fail), `*ci` (gate wiring and artifact steps), `*nfr-assess` (a measurement that could not be taken is CONCERNS, never PASS), `*trace` (coverage claims), `*automate` and `*atdd` (generated checks must be falsifiable)
202
+ - **Related fragments**: `confidence-gate.md` (do not fabricate the artifact in the first place), `test-quality.md` (determinism and isolation), `risk-governance.md` (what a gate decision may rest on), `mobile-ci-device-lab.md` (where these failures concentrate on mobile)
203
+ - **Tools**: any CI summary, the runner's own executed-test count, exit codes
204
+
205
+ _Source: TEA quality-gate standards; hollow-green and false-negative diagnostic patterns observed in a live mobile CI investigation_