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
@@ -18,7 +18,7 @@ A project with none of those signals, whose merged `[modules.tea]` holds only su
18
18
  # The state every rule below moves toward.
19
19
  target = """
20
20
  - `_bmad/config.toml` `[modules.tea]` uses these supported keys: `test_artifacts`, `tea_use_playwright_utils`, `tea_use_pactjs_utils`, `tea_pact_mcp`, `tea_browser_automation`, `tea_execution_mode`, `tea_capability_probe`, `test_stack_type`, `test_framework`, `auto_validate`, `auto_heal_failures`, `max_healing_iterations`, `use_mcp_healing`. Every stored value is a string; v6 booleans (`true`, `false`) become `"true"` and `"false"`. Omitted healing options keep their runtime defaults: `auto_validate = "true"`, `auto_heal_failures = "true"`, `max_healing_iterations = "3"`, and `use_mcp_healing = "true"`.
21
- - A v6 `ci_platform` other than `auto` lives in `_bmad/custom/bmad-tea-ci.toml` as `ci_platform = "<value>"` under `[workflow]`.
21
+ - A v6 `ci_platform` other than `auto` lives in `_bmad/custom/bmad-tea-framework.toml` as `ci_platform = "<value>"` under `[workflow.ci]`.
22
22
  - A v6 `tea_evaluations_folder` other than `evals` lives in `_bmad/custom/bmad-tea-evaluate.toml` as `evaluations_folder = "<folder>"` under `[workflow]`, relative to the project root.
23
23
  - `risk_threshold`, `test_design_output`, `test_review_output` and `trace_output` are gone; no skill reads them.
24
24
  - `_bmad/tea/config.yaml`, `_bmad/tea/module-help.csv` and any classic-installer copies of TEA's agents or workflows under `_bmad/tea/` are removed, so the CLI and the skills read only the v7 install.
@@ -26,9 +26,9 @@ target = """
26
26
 
27
27
  precautions = """
28
28
  - Read before writing. Show the user the plan (each key and where it goes) and wait for approval.
29
- - Edit only the `[modules.tea]` tables of `_bmad/config.toml`, `_bmad/custom/config.toml` and `_bmad/custom/config.user.toml`, and the two customization files `_bmad/custom/bmad-tea-ci.toml` and `_bmad/custom/bmad-tea-evaluate.toml`. Keep every other table, key and comment in those files as it is, and merge into a customization file that already exists instead of replacing it.
29
+ - Edit only the `[modules.tea]` tables of `_bmad/config.toml`, `_bmad/custom/config.toml` and `_bmad/custom/config.user.toml`, and the two customization files `_bmad/custom/bmad-tea-framework.toml` and `_bmad/custom/bmad-tea-evaluate.toml`. Keep every other table, key and comment in those files as it is, and merge into a customization file that already exists instead of replacing it.
30
30
  - Never delete a file outside version control. Removing the leftovers is a commit the user chooses; offer it and stop there.
31
- - Preserve `_bmad/custom/bmad-testarch-atdd.toml`, `_bmad/custom/bmad-testarch-atdd.user.toml`, `_bmad/custom/bmad-testarch-automate.toml` and `_bmad/custom/bmad-testarch-automate.user.toml` until `tea-migrate-customizations` moves them. The combined skill resolves the selected mode's customizations.
31
+ - Preserve `_bmad/custom/bmad-testarch-atdd.toml`, `_bmad/custom/bmad-testarch-atdd.user.toml`, `_bmad/custom/bmad-testarch-automate.toml` and `_bmad/custom/bmad-testarch-automate.user.toml` until `bmad migrate tea` (migration-3) or `tea-migrate-customizations` moves their settings into `[workflow.red]` of `bmad-tea-automate.toml`. The combined skill reads red settings only from that table.
32
32
  - Never run `bmad setup` from inside this migration; it owns the rest of `_bmad/`. When `[modules.tea]` is missing from every layer, stop and tell the user to run `bmad setup tea` first and to run this migration again afterwards.
33
33
  """
34
34
 
@@ -39,7 +39,7 @@ guide = """
39
39
  | v6 key | v7 destination |
40
40
  |---|---|
41
41
  | `test_artifacts`, `tea_use_playwright_utils`, `tea_use_pactjs_utils`, `tea_pact_mcp`, `tea_browser_automation`, `tea_execution_mode`, `tea_capability_probe`, `test_stack_type`, `test_framework`, `auto_validate`, `auto_heal_failures`, `max_healing_iterations`, `use_mcp_healing` | stays in `[modules.tea]` of the layer that holds it, written as strings |
42
- | `ci_platform` | `_bmad/custom/bmad-tea-ci.toml`, `[workflow]` `ci_platform`, only when the effective value is not `auto`; removed from every `[modules.tea]` layer |
42
+ | `ci_platform` | `_bmad/custom/bmad-tea-framework.toml`, `[workflow.ci]` `ci_platform`, only when the effective value is not `auto`; removed from every `[modules.tea]` layer |
43
43
  | `tea_evaluations_folder` | `_bmad/custom/bmad-tea-evaluate.toml`, `[workflow]` `evaluations_folder`, only when the effective value is not `evals`; strip a leading `{project-root}/` when the value has one; removed from every `[modules.tea]` layer |
44
44
  | `risk_threshold`, `test_design_output`, `test_review_output`, `trace_output` | removed from every `[modules.tea]` layer |
45
45
  | any other key | ask the user; it is not a TEA setting v7 reads |
@@ -48,16 +48,16 @@ guide = """
48
48
  3. **Answers recorded only in `config.yaml`.** `bmad setup tea` writes the defaults it is given, so a project that had only a `_bmad/tea/config.yaml` can hold its v6 answers there while `[modules.tea]` holds defaults. For each of the thirteen kept keys where `config.yaml` differs from the effective `[modules.tea]` value and the effective value equals the default in `bmod.toml`, add a plan row that restores the `config.yaml` value in `_bmad/config.toml`. Show these rows apart from the rest and apply each only on approval; a value the user already changed from the default is never overwritten.
49
49
  4. **Apply the approved plan.** Rewrite the `[modules.tea]` values that are not strings, remove the keys the plan moves or drops from every layer that holds them, and write the two customization files. Create `_bmad/custom/` entries only for values that differ from the defaults named above.
50
50
  5. **Leftovers.** Offer to remove the candidates from step 2 as one commit. A `config.yaml` left beside `_bmad/config.toml` is ignored by the skills and read only by `tea-test-review` when `_bmad/config.toml` does not exist, so it is harmless but misleading, and this migration is offered again while it exists. Say so. On a rerun, offer the removal again and show a step 3 row only while its two values still differ.
51
- 6. **Report.** Give the user the final `[modules.tea]` table, the two customization files that were written, and the leftovers that remain. Run `npx --package=bmad-method-test-architecture-enterprise@3 tea-migrate-customizations --project-root .` to move any other pre-3.0 customization filenames. Resolve a reported old/new value conflict before rerunning it.
51
+ 6. **Report.** Give the user the final `[modules.tea]` table, the two customization files that were written, and the leftovers that remain. Run `npx --package=bmad-method-test-architecture-enterprise@4 tea-migrate-customizations --project-root .` to move any other pre-3.0 customization filenames. Resolve a reported old/new value conflict before rerunning it.
52
52
  """
53
53
 
54
54
  checklist = [
55
55
  "The merged `[modules.tea]` (`_bmad/config.toml` with the custom layers) holds only the thirteen supported v7 keys, each stored value a string; omitted healing options use the shipped defaults.",
56
- "A non-default v6 `ci_platform` is `ci_platform` under `[workflow]` in `_bmad/custom/bmad-tea-ci.toml`.",
56
+ "A non-default v6 `ci_platform` is `ci_platform` under `[workflow.ci]` in `_bmad/custom/bmad-tea-framework.toml`.",
57
57
  "A non-default v6 `tea_evaluations_folder` is `evaluations_folder` under `[workflow]` in `_bmad/custom/bmad-tea-evaluate.toml`, without the `{project-root}/` prefix.",
58
58
  "`risk_threshold`, `test_design_output`, `test_review_output` and `trace_output` are in no `[modules.tea]` layer.",
59
59
  "`ci_platform` and `tea_evaluations_folder` are in no `[modules.tea]` layer.",
60
60
  "`uv run _bmad/scripts/resolve_config.py --project-root . --key modules.tea` prints only supported v7 keys; omitted healing options use the shipped defaults.",
61
- "`uv run _bmad/scripts/resolve_customization.py --skill <evaluate-skill-root> --project-root . --key workflow` prints the migrated Evaluate value; Framework CI scope merges `_bmad/custom/bmad-tea-ci.toml` and its user layer to read the migrated CI value.",
61
+ "`uv run _bmad/scripts/resolve_customization.py --skill <evaluate-skill-root> --project-root . --key workflow` prints the migrated Evaluate value; `--skill <framework-skill-root> --key workflow.ci` prints the migrated CI value.",
62
62
  "Every file the plan listed for removal is either removed in the commit the user chose or reported as still present.",
63
63
  ]
@@ -0,0 +1,50 @@
1
+ # TEA's third migration: the red-mode and CI customization surfaces move into the skills that own them, and personal settings move to the file core merges. `bmad migrate` runs a module's `migration-<n>.toml` files in `<n>` order.
2
+
3
+ [migration]
4
+ module = "tea"
5
+ from = "3 with separate atdd and ci customization files"
6
+ to = "3 with [workflow.red] and [workflow.ci] tables"
7
+ title = "Move TEA red and CI customizations into their owning skills"
8
+ summary = "Moves the settings of bmad-tea-atdd into [workflow.red] of bmad-tea-automate.toml and those of bmad-tea-ci into [workflow.ci] of bmad-tea-framework.toml, team and user layers separately, reading live files first and cleanup backups when `bmad setup` already removed a file. Also offers to move [modules.tea] keys held only by the legacy _bmad/config.user.toml into _bmad/custom/config.user.toml. Nothing is overwritten without your choice."
9
+
10
+ # Read-only signals. Any one of them makes this migration worth offering.
11
+ detect = """
12
+ - `{project-root}/_bmad/custom/` holds `bmad-tea-atdd.toml`, `bmad-tea-atdd.user.toml`, `bmad-tea-ci.toml`, `bmad-tea-ci.user.toml`, `bmad-testarch-atdd.toml`, `bmad-testarch-atdd.user.toml`, `bmad-testarch-ci.toml` or `bmad-testarch-ci.user.toml`.
13
+ - `bmad-tea-framework.toml` or `bmad-tea-framework.user.toml` in `{project-root}/_bmad/custom/` holds `ci_platform` directly under `[workflow]`.
14
+ - A `{project-root}/.v6-v7-migration-backup-*/_bmad/custom/` folder holds one of the files above, or a pre-3.0 `bmad-testarch-<skill>.toml` or `.user.toml` file, and the live `_bmad/custom/` holds neither that file nor its `bmad-tea-*` successor. `bmad setup` cleanup lists these files as unused customizations and deletes them, so a backup can be the only copy left.
15
+ - `{project-root}/_bmad/config.user.toml` exists with a `[modules.tea]` table, live or only as `{project-root}/.v6-v7-migration-backup-*/_bmad/config.user.toml`. Core merges only `_bmad/config.toml`, `_bmad/custom/config.toml` and `_bmad/custom/config.user.toml`, so keys that only this file holds are ignored.
16
+ A project with none of those signals, or one whose plan below is already complete, is migrated; say so and stop.
17
+ """
18
+
19
+ target = """
20
+ - Red-mode settings are `[workflow.red]` in `_bmad/custom/bmad-tea-automate.toml` (team) and `bmad-tea-automate.user.toml` (user). CI settings, `ci_platform` included, are `[workflow.ci]` in `bmad-tea-framework.toml` and `bmad-tea-framework.user.toml`.
21
+ - No `bmad-tea-atdd`, `bmad-tea-ci`, `bmad-testarch-atdd` or `bmad-testarch-ci` file remains in `_bmad/custom/` once its content is verified in the target. `ci_platform` is no longer a key of `[workflow]` in the framework files.
22
+ - Every `[modules.tea]` key that only `_bmad/config.user.toml` held lives in `_bmad/custom/config.user.toml`, keeping its precedence over team values.
23
+ """
24
+
25
+ precautions = """
26
+ - Read before writing. Show the user the plan with each source, its provenance and its destination, and wait for approval.
27
+ - Source order: the live `_bmad/custom/` file first. When a live file is absent, search every `.v6-v7-migration-backup-*/_bmad/custom/` folder that actually contains that exact file; the newest containing copy wins, and a newer backup made after the removal does not hide an older one that has the file. Never modify or delete a backup.
28
+ - Team (`.toml`) and user (`.user.toml`) layers map separately: atdd team to automate team, atdd user to automate user, ci team to framework team, ci user to framework user.
29
+ - A key already present in the target with a different value, or differing values for one key across candidate sources, is a conflict. Show both values and each side's provenance and let the user choose; overwrite nothing without that choice. A headless run stops on a conflict.
30
+ - Remove an old live file only after the target write is re-read and verified. When both an old file and the target exist and differ, keep both and report the conflict.
31
+ - Keep every other table, key and comment in the target files as it is, and merge into a file that already exists instead of replacing it.
32
+ - Run `npx --package=bmad-method-test-architecture-enterprise@4 tea-migrate-customizations --project-root .` for the file moves as a script, with the same source order and conflict rules; it stops on a conflict and changes nothing, and `--keep-existing` keeps the existing value where a backup differs. It records what it restored in `_bmad/custom/.tea-customization-migration.json`, so a rerun is quiet. It does not move `_bmad/config.user.toml` keys; it reports them as not migrated, and this migration moves them.
33
+ """
34
+
35
+ guide = """
36
+ 1. **Inventory.** List, per layer (team, user) and surface (red from atdd, CI from ci), every candidate source: the live files named in the detect signals, and for each absent live file the newest backup folder that contains it. Record each source's provenance (`live` or the backup folder). Add framework override files that set `ci_platform` directly under `[workflow]`. Add every `[modules.tea]` key of `_bmad/config.user.toml`, live or from the newest backup that contains it. A personal override is a candidate even when `_bmad/config.toml` or `_bmad/custom/config.toml` holds the same key, because it takes precedence over those layers. Compare each key only with `_bmad/custom/config.user.toml`, the canonical personal layer.
37
+ 2. **Plan.** Build one row per moved table or key: source file and provenance, destination file and table, and the status (`new`, `same value already present`, `conflict`). Show each conflict with both values. Retired v6 names (`bmad-testarch-atdd`, `bmad-testarch-ci`) are sources too, read before any content rewrite. Wait for approval, and for the user's choice on each conflict. For a `_bmad/config.user.toml` key present in `_bmad/custom/config.user.toml` with a different value, report both values and keep the canonical value unless the user chooses the legacy one.
38
+ 3. **Apply.** For each approved row write the destination, preserving the source text (comments and order) and rewriting `[workflow]` to `[workflow.red]` or `[workflow.ci]`. Re-read and parse the destination to verify it holds every moved key, then remove the old live file. Move a top-level `ci_platform` into `[workflow.ci]` of the same framework file. Move approved legacy `config.user.toml` keys into `[modules.tea]` of `_bmad/custom/config.user.toml`. A backup source is only read.
39
+ 4. **Resume.** A rerun recomputes the plan from disk: a source whose content is fully present in its destination changes nothing, and an interrupted run continues from the files that remain. Record each key or file restored from a backup, and each backup value the user chose to leave out, in the plan (the script uses `_bmad/custom/.tea-customization-migration.json`); a recorded item is never a conflict again, so a destination the user edited after migrating stays quiet. An unrecorded backup value that differs from the destination is a conflict.
40
+ 5. **Report.** Show the destination tables, the files removed, any conflicts left for the user and the files that remain.
41
+ """
42
+
43
+ checklist = [
44
+ "No `bmad-tea-atdd`, `bmad-tea-ci`, `bmad-testarch-atdd` or `bmad-testarch-ci` file remains in `_bmad/custom/`, or each remaining one is reported with its conflict.",
45
+ "`uv run _bmad/scripts/resolve_customization.py --skill <automate-skill-root> --project-root . --key workflow.red` prints the migrated red settings.",
46
+ "`uv run _bmad/scripts/resolve_customization.py --skill <framework-skill-root> --project-root . --key workflow.ci` prints the migrated CI settings, `ci_platform` included.",
47
+ "`[workflow]` of the framework override files holds no `ci_platform`.",
48
+ "Every `[modules.tea]` key that only `_bmad/config.user.toml` held is in `_bmad/custom/config.user.toml`, or the user kept the canonical value.",
49
+ "A second run changes nothing.",
50
+ ]
@@ -0,0 +1,13 @@
1
+ # Skills the tea module no longer ships under these names. `bmad setup` offers to delete any still installed and
2
+ # moves a renamed skill's `_bmad/custom/` files to the new name. A retired name is never reused.
3
+ renamed = [
4
+ { from = "bmad-testarch-automate", to = "bmad-tea-automate" },
5
+ { from = "bmad-testarch-evaluate", to = "bmad-tea-evaluate" },
6
+ { from = "bmad-testarch-framework", to = "bmad-tea-framework" },
7
+ { from = "bmad-testarch-nfr", to = "bmad-tea-nfr" },
8
+ { from = "bmad-testarch-test-design", to = "bmad-tea-test-design" },
9
+ { from = "bmad-testarch-test-review", to = "bmad-tea-test-review" },
10
+ { from = "bmad-testarch-trace", to = "bmad-tea-trace" },
11
+ { from = "bmad-teach-me-testing", to = "bmad-tea-teach-me-testing" },
12
+ ]
13
+ removed = ["bmad-testarch-atdd", "bmad-testarch-ci"]
@@ -1,38 +0,0 @@
1
- # DO NOT EDIT -- overwritten on every update.
2
- #
3
- # Workflow customization surface for bmad-tea-atdd. Mirrors the
4
- # agent customization shape under the [workflow] namespace.
5
-
6
- [workflow]
7
-
8
- # --- Configurable below. Overrides merge per BMad structural rules: ---
9
- # scalars: override wins • arrays (persistent_facts, activation_steps_*): append
10
-
11
- # Steps to run before the standard activation (config load, greet).
12
- # Overrides append. Use for pre-flight loads, compliance checks, etc.
13
-
14
- activation_steps_prepend = []
15
-
16
- # Steps to run after greet but before the workflow begins.
17
- # Overrides append. Use for context-heavy setup that should happen
18
- # once the user has been acknowledged.
19
-
20
- activation_steps_append = []
21
-
22
- # Persistent facts the workflow keeps in mind for the whole run
23
- # (testing standards, framework conventions, compliance constraints).
24
- # Distinct from the runtime memory sidecar — these are static context
25
- # loaded on activation. Overrides append.
26
- #
27
- # Each entry is either:
28
- # - a literal sentence, e.g. "Every test must run deterministically in CI."
29
- # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md"
30
- # (glob patterns are supported; matching files load in lexical path order as facts).
31
-
32
- persistent_facts = []
33
-
34
- # Scalar: executed when the workflow reaches its terminal step in any
35
- # mode (create, validate, edit), after the final outputs are produced.
36
- # Override wins. Leave empty for no custom post-completion behavior.
37
-
38
- on_complete = ""
@@ -1,10 +0,0 @@
1
- # DO NOT EDIT -- overwritten on every update.
2
- # CI scope defaults for bmad-tea-framework. Project overrides live in
3
- # _bmad/custom/bmad-tea-ci.toml and bmad-tea-ci.user.toml.
4
-
5
- [workflow]
6
- activation_steps_prepend = []
7
- activation_steps_append = []
8
- persistent_facts = []
9
- on_complete = ""
10
- ci_platform = "auto"