bmad-method-test-architecture-enterprise 3.3.0 → 3.5.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/cli/lib/evaluate/test-design-replay.js +3 -2
- package/package.json +2 -2
- package/skills/bmad-tea-automate/SKILL.md +1 -0
- package/skills/bmad-tea-automate/red/atdd-checklist-template.md +7 -2
- package/skills/bmad-tea-automate/red/checklist.md +1 -1
- package/skills/bmad-tea-automate/red/resources/atdd-checklist-2-4-guest-checkout.example.md +5 -2
- package/skills/bmad-tea-automate/red/steps-c/step-01-preflight-and-context.md +12 -14
- package/skills/bmad-tea-automate/red/steps-c/step-01b-resume.md +4 -2
- package/skills/bmad-tea-automate/red/steps-c/step-04c-aggregate.md +7 -5
- package/skills/bmad-tea-automate/red/steps-c/step-05-validate-and-complete.md +5 -3
- package/skills/bmad-tea-automate/steps-c/step-01-preflight-and-context.md +4 -2
- package/skills/bmad-tea-automate/steps-c/step-01b-resume.md +2 -0
- package/skills/bmad-tea-automate/steps-c/step-02-identify-targets.md +1 -1
- package/skills/bmad-tea-evaluate/references/ci.md +2 -2
- package/skills/bmad-tea-framework/resources/framework-setup-progress.example.md +1 -1
- package/skills/bmad-tea-framework/resources/hooks/tea-enforce.cjs +295 -39
- package/skills/bmad-tea-framework/steps-c/step-04-docs-and-scripts.md +2 -2
- package/skills/bmad-tea-nfr/SKILL.md +1 -0
- package/skills/bmad-tea-nfr/steps-c/step-01-load-context.md +4 -2
- package/skills/bmad-tea-nfr/steps-c/step-01b-resume.md +2 -0
- package/skills/bmad-tea-test-design/checklist.md +39 -8
- package/skills/bmad-tea-test-design/steps-c/step-01-detect-mode.md +4 -1
- package/skills/bmad-tea-test-design/steps-c/step-03-risk-and-testability.md +1 -1
- package/skills/bmad-tea-test-design/steps-c/step-04-coverage-plan.md +10 -3
- package/skills/bmad-tea-test-design/steps-c/step-05-generate-output.md +69 -21
- package/skills/bmad-tea-test-design/steps-e/step-02-apply-edit.md +3 -0
- package/skills/bmad-tea-test-design/steps-v/step-01-validate.md +1 -0
- package/skills/bmad-tea-test-design/test-design-qa-template.md +1 -1
- package/skills/bmad-tea-test-review/SKILL.md +2 -1
- package/skills/bmad-tea-test-review/steps-c/step-01-load-context.md +7 -4
- package/skills/bmad-tea-test-review/steps-c/step-01b-resume.md +2 -0
- package/skills/bmad-tea-trace/SKILL.md +1 -0
- package/skills/bmad-tea-trace/steps-c/step-01-load-context.md +6 -4
- package/skills/bmad-tea-trace/steps-c/step-01b-resume.md +2 -0
- package/skills/bmod-tea/bmod.toml +1 -1
- package/skills/bmod-tea/contracts/story-identity.md +77 -0
- package/skills/bmod-tea/help/help.md +38 -6
- package/skills/bmod-tea/migration-2.toml +100 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# TEA's second migration: story outputs written under v6 story keys move onto v7 ticket keys. `bmad migrate` runs a module's `migration-<n>.toml` files in `<n>` order.
|
|
2
|
+
|
|
3
|
+
[migration]
|
|
4
|
+
module = "tea"
|
|
5
|
+
from = "3 with v6 story keys"
|
|
6
|
+
to = "3 with v7 story keys"
|
|
7
|
+
title = "Move TEA story outputs onto their v7 tickets"
|
|
8
|
+
summary = "Finds checklists, summaries, matrices and reports keyed by a v6 story file or a v7 leaf file name, maps each to its v7 ticket from exact evidence, and, once the user approves the plan, renames each to the ticket's key and rewrites its identity fields. Historical citations stay as written; a resolved-source list beside them names where each source lives now. Nothing outside the test artifacts folder changes."
|
|
9
|
+
|
|
10
|
+
# Read-only signals. An unfinished plan, or all three of the rest.
|
|
11
|
+
detect = """
|
|
12
|
+
- `{test_artifacts}/migration-tea-v7.md` exists with a `status` other than `done`: an earlier run stopped part way; resume it ("Resume") before anything else.
|
|
13
|
+
- That plan exists with `status: done` and its unresolved list names every pre-v7 story output still present: the project is already migrated. Report the plan's results and stop, writing nothing. A pre-v7 output the plan does not list is new work: run again with a new dated run section appended to the same plan, keeping its history and the first backup, and a new backup of the files that run touches.
|
|
14
|
+
- `{project-root}/_bmad/method/scripts/tickets.py` exists, and the ticket tree is current v7: `uv run {project-root}/_bmad/method/scripts/tickets.py --project-root {project-root} status <folder>` succeeds for each `initiative-*/` folder and `backlog/` under the output folder (passing the folder works with no active initiative). When one errors with the earlier layout, or `{output_folder}/migration-v6-v7/migration-v6-v7.md` exists without `status: done`, the method migration comes first; say so and stop.
|
|
15
|
+
- The test artifacts folder (`modules.tea.test_artifacts`) holds a story output whose key is not a v7 key. Story outputs are `atdd/atdd-checklist-<key>.md`, `automate/automation-summary-story-<key>.md`, `trace/traceability-matrix-story-<key>.md` with Trace's summary and gate files of the same run key, `nfr/nfr-assessment-story-<key>.md` and `test-review/test-review-story-<key>.md`, the same names at the folder's root, and the fixed root names `automation-summary.md`, `traceability-matrix.md`, `nfr-assessment.md` and `test-review.md` when their content names one story.
|
|
16
|
+
- A v7 key contains `--`: every shape in `bmod-tea/contracts/story-identity.md` section 4 does (`shop--e1-s2`, `shop--epic-loyalty-s2`, `shop--s6a`, `backlog--story-x`), and no pre-v7 key can, since v6 basenames and leaf stems are slugs. A key without `--`, such as `1-2-user-authentication` or `story-guest-checkout`, is a pre-v7 key.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
target = """
|
|
20
|
+
<test_artifacts>/
|
|
21
|
+
atdd/atdd-checklist-<v7 key>.md
|
|
22
|
+
automate/automation-summary-story-<v7 key>.md
|
|
23
|
+
trace/traceability-matrix-story-<v7 key>.md # with its summary and gate files, renamed together
|
|
24
|
+
nfr/nfr-assessment-story-<v7 key>.md
|
|
25
|
+
test-review/test-review-story-<v7 key>.md
|
|
26
|
+
migration-tea-v7.md # the plan, applied moves, and unresolved list
|
|
27
|
+
<project-root>/.tea-v7-migration-backup-<datetime>/ # a copy of the test artifacts folder, made first
|
|
28
|
+
Each moved file keeps its status, steps, evidence and gate decision. Its identity fields name the ticket: `storyId`, `storyKey`, `runKey = story-<v7 key>`, `ticketRef`, target id and label, its own path fields, and links between the files of one Trace run. `migratedFrom` holds the old values. Its citations (`inputDocuments`, `oracleSources`, `oracleLedger` sources) stay verbatim, and `resolvedSources` lists, per citation, `original`, `current` and `status: resolved | unresolved`.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
precautions = """
|
|
32
|
+
- Nothing changes before the user approves the plan. The only writes before approval are the backup and the plan file.
|
|
33
|
+
- Never overwrite a file, and never leave two files with one story key in a workflow folder. An occupied destination, or two sources for one destination, is a conflict the user decides: keep the existing destination, or promote one source to it. Every file not kept at the destination moves unchanged to `<test_artifacts>/migration-tea-v7-preserved/<its path relative to the test artifacts folder>`, outside every workflow's lookups; a root-level file and a folder file with one name therefore land apart. Every preserved destination is in the approved plan and is checked for an existing file before anything moves.
|
|
34
|
+
- Never write outside the test artifacts folder and the backup. Ticket files, plans, stories and the method record are read only.
|
|
35
|
+
- A key prefix or a similar title is never evidence. A file with no exact evidence stays where it is and is listed as unresolved.
|
|
36
|
+
- When the files are under git, every move is a `git mv`, so history follows the file; an untracked file moves with `mv` and no overwrite.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
guide = """
|
|
40
|
+
## Sequence
|
|
41
|
+
|
|
42
|
+
1. Check the signals in `detect`. An unfinished plan goes to "Resume"; otherwise stop when one fails.
|
|
43
|
+
2. Backup ("Backup").
|
|
44
|
+
3. Inventory ("Inventory").
|
|
45
|
+
4. Map each set to a ticket ("Map").
|
|
46
|
+
5. Write the plan and wait for approval ("Plan").
|
|
47
|
+
6. Apply the approved moves ("Apply").
|
|
48
|
+
7. Run every `checklist` item and record its result in the plan. Fix and recheck a failure, or report it; never skip one.
|
|
49
|
+
8. Report ("Report").
|
|
50
|
+
|
|
51
|
+
Under git, commit before step 6 and after it, the message naming the step; never stage the backup. Never push.
|
|
52
|
+
|
|
53
|
+
## Resume
|
|
54
|
+
|
|
55
|
+
Read the unfinished plan. Its approved sets, mappings and conflict decisions stand; never write a new plan over it, and keep the first backup. The plan journals each file with its disposition and state: `adopted` (`pending`, `moved`, `rewritten`), `preserved` (`pending`, `moved`), `unresolved` or `left` (no operation). Resume only pending work: an `adopted` file still at its old path is moved, one at its new path but not `rewritten` gets its identity fields; a `preserved` file still at its old path moves unchanged and is never rewritten. When a file is at neither its old nor its planned path, or a source and its destination both exist, stop and report it. Then continue at step 7.
|
|
56
|
+
|
|
57
|
+
## Backup
|
|
58
|
+
|
|
59
|
+
Read `core.output_folder` and `modules.tea.test_artifacts` with `uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {project-root} --key core.output_folder --key modules.tea.test_artifacts`. Copy the whole test artifacts folder to `{project-root}/.tea-v7-migration-backup-<datetime>/` (`YYYYMMDD-HHMM`), write a `.gitignore` there holding `*`, and confirm the copy holds every file. On a rerun whose plan already exists, keep the first backup.
|
|
60
|
+
|
|
61
|
+
## Inventory
|
|
62
|
+
|
|
63
|
+
List every story output `detect` names that carries a pre-v7 key. Group the files of one run into a set: a Trace matrix with the summary and gate files of its run key; any other output alone. Read each set's frontmatter for `storyId`, `storyKey`, `storyFile`, `runKey` and its citations. A fixed root name whose content names no single story is listed as unresolved, not guessed.
|
|
64
|
+
|
|
65
|
+
## Map
|
|
66
|
+
|
|
67
|
+
Map each set to one ticket from every exact evidence that holds, checked in this order:
|
|
68
|
+
|
|
69
|
+
1. Its `storyFile`. When the file still exists inside the ticket tree, pass its container folder and basename to `tickets.py find`. When it no longer exists, look the path up in the method record `{output_folder}/migration-v6-v7/migration-v6-v7.md`, which states what moved where and each story's v7 entry in prose; read the entry it names.
|
|
70
|
+
2. An `[[entry]]` in any `tickets/tickets.toml` under the output folder whose `v6_key` equals the set's key exactly.
|
|
71
|
+
3. The method record's statement of the story's v7 entry, for the set's `storyId`, the story id its H1 heading states (`Story 1.1: ...`), or its key read as a v6 story file name (for a spec-folder story, its original `stories/<id>-<slug>.md`). A title alone is never evidence.
|
|
72
|
+
|
|
73
|
+
Confirm every mapped ticket with `uv run "{project-root}/_bmad/method/scripts/tickets.py" --project-root "{project-root}" find "<container>" "<ref>"`, always naming the container, so no active initiative is needed, and compute its key from the result by `bmod-tea/contracts/story-identity.md` section 4. Evidence that names no ticket, or pieces of evidence that name different tickets, leave the set unresolved, with each conflicting piece listed in the plan.
|
|
74
|
+
|
|
75
|
+
For each citation in a mapped set, resolve where its source lives now the same way: the record's moves, then `find`. A cited line number is kept as history; never claim it still points at the same text.
|
|
76
|
+
|
|
77
|
+
## Plan
|
|
78
|
+
|
|
79
|
+
Write `{test_artifacts}/migration-tea-v7.md` with frontmatter `type: migration`, `status: draft`, `created`. It lists, per set: the old and new path of every file (a root-level file moves into its workflow's folder), the ticket `ref` and container, the evidence used, the identity fields that change with old and new values, and each citation's resolution. Then every conflict with its options, and every unresolved set with the reason. Show it and wait for approval and a disposition for each conflict.
|
|
80
|
+
|
|
81
|
+
## Apply
|
|
82
|
+
|
|
83
|
+
Under git, make every approved move first and commit the moves alone, so git records each as a rename; then rewrite content in a second commit. Work through the approved sets in plan order. For each: move its files, rewrite the identity fields and `migratedFrom` as `target` says, add `resolvedSources`, and record each file's state in the plan's journal as it changes (`moved`, then `rewritten` for adopted files; `moved` is terminal for preserved ones). A restart goes through "Resume". Leave unresolved sets in place; move each file a conflict decision did not keep to the preserved folder unchanged.
|
|
84
|
+
|
|
85
|
+
## Report
|
|
86
|
+
|
|
87
|
+
Set the plan's `status` to `done`. Report the sets moved, the conflicts and how each was decided, the unresolved sets with their reasons, and the backup folder, which is the user's to delete once satisfied. Say that the workflows now name story outputs by ticket key, and that an unresolved file stays readable at its old path.
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
checklist = [
|
|
91
|
+
"Every approved set's files are at their planned paths, and no source file was overwritten: each destination that existed before the run still holds its original content or the user's chosen disposition.",
|
|
92
|
+
"Under git, each moved tracked file keeps its history (`git log --follow` reaches its commits from before the move), and no commit includes the backup.",
|
|
93
|
+
"No workflow folder holds two files with one story key; each file a conflict decision did not keep is unchanged under `migration-tea-v7-preserved/`. One story may have one set per workflow.",
|
|
94
|
+
"Each adopted checkpoint's `runKey` is `story-<its new key>`, its `storyKey`, `ticketRef` and path fields match its new location, and its status, steps, evidence and gate decision equal the backup copy's.",
|
|
95
|
+
"Each adopted in-progress checkpoint resumes in its workflow by the ticket's ref and, with no story named, as the only candidate, under its new `runKey`.",
|
|
96
|
+
"Every citation in a moved set is verbatim against the backup copy, and has a `resolvedSources` row marked `resolved` with a location that exists, or `unresolved`.",
|
|
97
|
+
"Every preserved file is byte-identical to its backup copy and sits at `migration-tea-v7-preserved/<its original relative path>`.",
|
|
98
|
+
"Running this migration again changes no file, leaves the plan byte-identical, and reports the same unresolved sets; a run stopped after the moves and resumed finishes every file's pending operation without a new plan.",
|
|
99
|
+
"`.tea-v7-migration-backup-<datetime>/` holds every file the test artifacts folder held before the first run.",
|
|
100
|
+
]
|