bmad-method-test-architecture-enterprise 3.4.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/package.json +1 -1
- 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/steps-c/step-01-detect-mode.md +4 -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
|
@@ -17,6 +17,7 @@ You will continue to operate with your given name, identity, and communication_s
|
|
|
17
17
|
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
|
|
18
18
|
- `{project-root}` is the nearest folder containing `_bmad/`, starting at the project working directory and moving up through its parents.
|
|
19
19
|
- `{tea-knowledge}` is the `knowledge/` folder of the `bmod-tea` skill, installed beside this one: `{skill-root}/../bmod-tea/knowledge`. `tea-index.csv` there lists every fragment by a path relative to that folder.
|
|
20
|
+
- `{tea-contracts}` is the `contracts/` folder of the `bmod-tea` skill, installed beside this one: `{skill-root}/../bmod-tea/contracts`. `story-identity.md` there says how a story is resolved, read and named.
|
|
20
21
|
- `{skill-name}` resolves to the skill directory's basename.
|
|
21
22
|
- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`.
|
|
22
23
|
|
|
@@ -119,8 +119,8 @@ The fragment list for this step is a closed set. Start empty and add every fragm
|
|
|
119
119
|
If available:
|
|
120
120
|
|
|
121
121
|
- Story file and acceptance criteria
|
|
122
|
-
- Test design doc (priorities) from `{test_artifacts}/test-design/`, chosen by the target this invocation or the loaded artifacts name (the same target section 4 resolves): `test-design-epic-{epic_num}.md` for an epic; for a story, its epic's plan `test-design-epic-{epic_num}.md`, with the epic number taken from
|
|
123
|
-
- NFR evidence audit, chosen by the same target. Use the first file that exists: `{test_artifacts}/nfr/nfr-assessment-{run_key}.md` for the target's own scope (`story-{story_key}` or `epic-{epic_num}`, keyed as section 4 describes); for a story, its epic's audit `{test_artifacts}/nfr/nfr-assessment-epic-{epic_num}.md`; `{test_artifacts}/nfr/nfr-assessment-system.md`; then the legacy root `{test_artifacts}/nfr-assessment.md`. Name the file used.
|
|
122
|
+
- Test design doc (priorities) from `{test_artifacts}/test-design/`, chosen by the target this invocation or the loaded artifacts name (the same target section 4 resolves): `test-design-epic-{epic_num}.md` for an epic; for a story in a numbered epic (section 3 of the contract), its epic's plan `test-design-epic-{epic_num}.md`, with the epic number taken from a dotted story id (story `1.2` belongs to epic `1`); a story with no numbered epic skips this, and a bare entry id is never read as an epic number; `test-design-architecture.md` and `test-design-qa.md` at system level. Fall back to the same names at the legacy root `{test_artifacts}/`, where runs before the `test-design/` folder wrote them.
|
|
123
|
+
- NFR evidence audit, chosen by the same target. Use the first file that exists: `{test_artifacts}/nfr/nfr-assessment-{run_key}.md` for the target's own scope (`story-{story_key}` or `epic-{epic_num}`, keyed as section 4 describes); for a story in a numbered epic, its epic's audit `{test_artifacts}/nfr/nfr-assessment-epic-{epic_num}.md`; `{test_artifacts}/nfr/nfr-assessment-system.md`; then the legacy root `{test_artifacts}/nfr-assessment.md`. Name the file used.
|
|
124
124
|
- Tech spec / PRD
|
|
125
125
|
- OpenAPI or similar contract/spec files
|
|
126
126
|
- Placeholder files that reference external requirements systems
|
|
@@ -140,14 +140,14 @@ Resolve the gate target, `run_scope`, and `run_key` **now**, before anything is
|
|
|
140
140
|
Resolve the gate type in this order:
|
|
141
141
|
|
|
142
142
|
1. The gate type the user named in this invocation (for example "trace epic 16" is `epic`, "release gate for 2.4.0" is `release`).
|
|
143
|
-
2. The kind of target the loaded artifacts identify: a story file is `story`, an epic document is `epic`.
|
|
143
|
+
2. The kind of target the loaded artifacts identify: a story (a v7 ticket or a v6 story file) is `story`, an epic document is `epic`.
|
|
144
144
|
3. The configured `{gate_type}`.
|
|
145
145
|
|
|
146
146
|
### B) Target ID and Label
|
|
147
147
|
|
|
148
148
|
Resolve the target for that gate type in the same order: the target the user named in this invocation first, then the target the loaded artifacts carry.
|
|
149
149
|
|
|
150
|
-
- **story:**
|
|
150
|
+
- **story:** `story_id` and `story_key` by `{tea-contracts}/story-identity.md`, which also resolves and reads the story: `1.2` and `shop--e1-s2` for a v7 epic entry, the story's own id and its file basename (`1-2-user-authentication`) for a v6 story.
|
|
151
151
|
- **epic:** `epic_num`, read from the epic document metadata, its H1 heading, or its filename. If the epic carries no number, use the slug of its title (slug rule below) in place of the number.
|
|
152
152
|
- **release:** the release version, from this invocation or from the release notes or version the loaded artifacts name.
|
|
153
153
|
- **hotfix:** the hotfix id, from this invocation or from the loaded artifacts.
|
|
@@ -228,6 +228,8 @@ oracleLedger: [{ id: '{oracle item id}', requirement: '{requirement text}', prio
|
|
|
228
228
|
|
|
229
229
|
Then write this step's output below the frontmatter.
|
|
230
230
|
|
|
231
|
+
For a story run (`run_scope` is `story`), also write `storyId`, `storyKey`, `ticketRef` and `storyFile` into this frontmatter, as `{tea-contracts}/story-identity.md` section 4 defines them. Other scopes leave them out.
|
|
232
|
+
|
|
231
233
|
`runScope`, `runKey`, `targetType`, `targetId`, and `targetLabel` are this run's identity. Later steps carry them forward unchanged and never re-derive them: Step 4 reads the target from this frontmatter, and Resume mode refuses to continue a file whose `runKey` does not match the run being resumed.
|
|
232
234
|
|
|
233
235
|
Load next step: `{nextStepFile}`
|
|
@@ -81,6 +81,8 @@ If `workflowStatus` is missing (legacy progress file), infer it from `lastStep`:
|
|
|
81
81
|
|
|
82
82
|
---
|
|
83
83
|
|
|
84
|
+
For a story run, read `{tea-contracts}/story-identity.md` before continuing: a named story is resolved by its sections 1 and 4 for the identity check, `ticketRef` locates the story when `storyFile` is empty or gone, and section 5 governs every citation the checkpoint carries (read through `resolvedSources`; report, never follow, an `unresolved` one). This holds on every resume path, named or not.
|
|
85
|
+
|
|
84
86
|
### 3. Display Progress Dashboard
|
|
85
87
|
|
|
86
88
|
Display:
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Story identity and intake
|
|
2
|
+
|
|
3
|
+
Every story-scoped TEA workflow (Automate red and expand mode, Trace, NFR, Test Review) resolves a story, reads it, and names its outputs by these rules, so the same story gets the same key in every workflow. Each workflow adds only its own rules on top.
|
|
4
|
+
|
|
5
|
+
## 1. Resolve the story
|
|
6
|
+
|
|
7
|
+
Decide the route once, from the reference the user gave or the artifacts already loaded:
|
|
8
|
+
|
|
9
|
+
- **v6 story file.** The reference is a path to a Markdown story outside any `initiative-*/` or `backlog/` folder, or `{project-root}/_bmad/method/scripts/tickets.py` does not exist. Use the story file as the workflow always has, with the v6 key in section 4.
|
|
10
|
+
- **v7 ticket.** Anything else: `<epic id>.<entry id>` (`1.2`), an entry id, a tracker id, a leaf file name or path, or a title phrase. Run:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
uv run "{project-root}/_bmad/method/scripts/tickets.py" --project-root "{project-root}" find ["<dir>"] "<ref>"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Quote each argument, so a title phrase such as `guest checkout` reaches `find` as one reference. For a leaf file path, pass its container folder as `<dir>` and its basename as `<ref>`. Otherwise leave `<dir>` out unless the user named an initiative, epic or `backlog/` folder.
|
|
17
|
+
|
|
18
|
+
The output is one JSON object. A result with `error`:
|
|
19
|
+
|
|
20
|
+
- No match, an ambiguous phrase, or no active initiative: in an interactive run, show the message and ask which story or folder is meant; **halt** until answered. A headless run halts with the message.
|
|
21
|
+
- A parent initiative: list its child initiatives and ask which one; a headless run halts with the list.
|
|
22
|
+
- The earlier layout: **halt** and tell the user to run `bmad migrate`, which moves the breakdown into `tickets/`.
|
|
23
|
+
|
|
24
|
+
A v7 error never falls back to the v6 route.
|
|
25
|
+
|
|
26
|
+
## 2. Read the story
|
|
27
|
+
|
|
28
|
+
From the `find` result:
|
|
29
|
+
|
|
30
|
+
- **Ticket text:** the file at `story_file` when it is not null; otherwise the entry's `description`, `verify`, `references` and `notes` from the result. A pulled leaf's `Verify:` line is in the leaf.
|
|
31
|
+
- **Story context:** the files the story's own `companions` and typed References name.
|
|
32
|
+
- **Parent context:** when `epic_file` is not null, read its Requirements lines whose ids the story's `covers` lists, its Constraints, and the files its `companions` and References name. When it is null (a `backlog/` leaf), skip parent discovery.
|
|
33
|
+
- **Plan:** when the file at `plan` exists, read its acceptance criteria. Its `## Prior builds` section is history, never criteria.
|
|
34
|
+
|
|
35
|
+
Record each file read with its path. List a file that cannot be read as unavailable; never guess its content.
|
|
36
|
+
|
|
37
|
+
**Criteria, in this order:**
|
|
38
|
+
|
|
39
|
+
1. The ticket's numbered criteria, each keeping the `R` ids it names.
|
|
40
|
+
2. When the ticket has only a `verify` line: the plan's acceptance criteria, when the plan has any.
|
|
41
|
+
3. Otherwise the `verify` line, as one criterion carrying the story's `covers`.
|
|
42
|
+
|
|
43
|
+
When the ticket and the plan both list criteria and they differ, an interactive run shows both and asks which hold; a headless run uses the ticket's and lists the plan-only criteria as unreconciled in its output.
|
|
44
|
+
|
|
45
|
+
## 3. Classify the container
|
|
46
|
+
|
|
47
|
+
From the `find` result's `folder`, which names the container (its `epic` field holds the same name for every shape, so it does not tell them apart):
|
|
48
|
+
|
|
49
|
+
- **Epic entry:** `folder` starts with `epic-`. The initiative is the `initiative-*` folder above `tickets/` in the `epic_file` path. The `ref` is `<epic id>.<entry id>` when the initiative numbers the epic; an epic its initiative does not number gives a bare entry id, and has no epic id.
|
|
50
|
+
- **Initiative entry:** `folder` starts with `initiative-`. The `ref` is the bare entry id, and `epic_file` is the initiative's own file.
|
|
51
|
+
- **Backlog leaf:** `folder` is `backlog`. The `ref` and `file` are the leaf's file name, and `epic_file` is null.
|
|
52
|
+
|
|
53
|
+
Only an epic entry has epic context: its epic's Test Design (`test-design-epic-<epic id>.md`) and epic-scoped reports; an epic with no epic id has no numbered Test Design to look up. An initiative entry or backlog leaf skips every epic lookup and goes straight to the system-level and legacy names.
|
|
54
|
+
|
|
55
|
+
## 4. Name the story
|
|
56
|
+
|
|
57
|
+
- `story_id`: the `ref` (`1.2`) for a v7 ticket; the story id the v6 story states otherwise.
|
|
58
|
+
- `story_key`:
|
|
59
|
+
- epic entry: `<initiative>--e<epic id>-s<entry id>`, for example `shop--e1-s2`; for an epic with no epic id, `<initiative>--<epic folder>-s<entry id>`, for example `shop--epic-loyalty-s2`. Never read the entry id as an epic id;
|
|
60
|
+
- initiative entry: `<initiative>--s<entry id>`;
|
|
61
|
+
- backlog leaf: `backlog--<leaf file stem>`;
|
|
62
|
+
- v6 story file: the file's basename without `.md` (`1-2-user-authentication`); without a file, the story id with `.` replaced by `-`.
|
|
63
|
+
|
|
64
|
+
`<initiative>` is the initiative folder name without its `initiative-` prefix. An entry id is used as written, letters included (`s6a`, `sCC2`). Folder names never contain `--`, so keys of different shapes and initiatives never collide. Entry ids and containers do not change when an entry is retitled, so neither does the key.
|
|
65
|
+
|
|
66
|
+
- `ticketRef`: the `ref` plus the container folder relative to `{project-root}`, for example `1.2 @ _bmad-output/initiative-shop/tickets/epic-checkout`, `2 @ _bmad-output/initiative-shop-e1` or `story-coupon-banner.md @ _bmad-output/backlog`. Empty for a v6 story.
|
|
67
|
+
- `storyFile`: the leaf or v6 story path; empty for an entry that is not pulled.
|
|
68
|
+
|
|
69
|
+
Checkpoints record `storyId`, `storyKey`, `ticketRef` and `storyFile`. A check that requires the story's location accepts `storyFile` or `ticketRef`.
|
|
70
|
+
|
|
71
|
+
Every story output of every workflow uses `story-<story_key>` as its run key, so ATDD checklists, automation summaries, NFR reports, Test Review reports and traceability matrices for one story share it.
|
|
72
|
+
|
|
73
|
+
## 5. Artifacts from before v7 keys
|
|
74
|
+
|
|
75
|
+
This applies only to a story resolved through the v7 route; a v6 or no-method run never mentions it. When no output exists under the new key but the test artifacts folder holds story outputs whose key has no `--`, unlike every shape above (a v6 basename such as `1-2-user-authentication`, or a leaf stem such as `story-guest-checkout`), tell the user that `bmad migrate tea` carries them onto their tickets, and ask whether to run it first. Continue as a fresh run only if they decline. A headless run continues and says so in its output.
|
|
76
|
+
|
|
77
|
+
Every resume of a story run loads this section too. A migrated artifact carries `resolvedSources`: per citation, the original reference, its current location, and `resolved` or `unresolved`. Read a citation through its `resolved` entry. Report an `unresolved` citation; never follow it. Leave the original citation as written.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Test Architect knowledge
|
|
2
2
|
|
|
3
|
-
This document covers the skills of the `tea` module: what each one gives the user, when to recommend it, and what to offer next. Full documentation: <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/llms.txt>
|
|
3
|
+
This document covers the skills of the `tea` module: what each one gives the user, when to recommend it, where it fits in the method's flow, and what to offer next. Full documentation: <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/llms.txt>
|
|
4
4
|
|
|
5
5
|
## The skills
|
|
6
6
|
|
|
7
7
|
- `bmad-tea`: Murat, the Master Test Architect, for risk-based test strategy, fixture architecture, API, UI, mobile and contract testing, and release gates. Recommend him when the user wants testing advice or does not know which TEA workflow fits; he routes to the rest.
|
|
8
|
-
- `bmad-tea-teach-me-testing`: teaches testing fundamentals in 7 sessions (TEA Academy), with a progress file, session notes and a completion summary. Recommend it to someone learning testing, at any
|
|
9
|
-
- `bmad-tea-test-design`: risk-based test planning, producing a test design document. Recommend it
|
|
10
|
-
- `bmad-tea-framework`: owns production-ready framework and CI setup, with framework-only, CI-only, or both scope. It installs Playwright Utils or Pact.js Utils when enabled. Recommend it
|
|
11
|
-
- `bmad-tea-automate`: owns test generation in red or expand mode. Red mode writes failing acceptance tests and an ATDD checklist before
|
|
8
|
+
- `bmad-tea-teach-me-testing`: teaches testing fundamentals in 7 sessions (TEA Academy), with a progress file, session notes and a completion summary. Recommend it to someone learning testing, at any point.
|
|
9
|
+
- `bmad-tea-test-design`: risk-based test planning, producing a test design document. At system level it reads the PRD and architecture; at epic level it plans one epic of the active initiative. Recommend it once requirements exist and before tests or a framework do. Afterwards offer `bmad-tea-framework`.
|
|
10
|
+
- `bmad-tea-framework`: owns production-ready framework and CI setup, with framework-only, CI-only, or both scope. It installs Playwright Utils or Pact.js Utils when enabled. Recommend it after test design, before the first story is built. When CI scope cannot be inferred from the request, interactive runs ask whether to include CI. Unattended runs default to framework only and state in the summary that CI was excluded.
|
|
11
|
+
- `bmad-tea-automate`: owns test generation in red or expand mode. Red mode writes failing acceptance tests and an ATDD checklist for one story before it is built, then verifies the intended missing behavior. Expand mode writes tests for implemented code, runs them, heals test defects for up to three rounds by default, and reports product defects. Recommend red mode once a story's criteria are settled and expand mode once code exists.
|
|
12
12
|
- `bmad-tea-evaluate`: builds and runs a scored, evidence-backed evaluation of an agent, skill, workflow or tool-use system. Recommend it after automation when the target's behavior needs proof. Afterwards offer `bmad-tea-framework` with CI scope to enforce it. On explicit request, Evaluate also analyzes saved native Test Design consistency offline or prepares a bounded fresh/configuration proposal. “Is it repeatable?” first clarifies saved records versus new runs. Native live experiments remain blocked by telemetry and enforceable-budget gaps; ordinary evaluation gains no extra experiment work.
|
|
13
13
|
- `bmad-tea-test-review`: audits test quality with a 0-100 score and a review report. Recommend it after tests are written. Afterwards offer `bmad-tea-trace`.
|
|
14
14
|
- `bmad-tea-nfr`: audits the evidence for non-functional requirements and writes an NFR report. Recommend it after automation, before a release.
|
|
@@ -16,9 +16,41 @@ This document covers the skills of the `tea` module: what each one gives the use
|
|
|
16
16
|
|
|
17
17
|
For a release gate, the order is: `bmad-tea-test-review` (optional), `bmad-tea-nfr` (optional), then `bmad-tea-trace`.
|
|
18
18
|
|
|
19
|
+
## Where TEA fits in the method's flow
|
|
20
|
+
|
|
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
|
+
|
|
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. |
|
|
32
|
+
|
|
33
|
+
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
|
+
|
|
19
35
|
## Where things land
|
|
20
36
|
|
|
21
|
-
Every workflow writes under the test artifacts folder, chosen at setup as `modules.tea.test_artifacts
|
|
37
|
+
Every workflow writes under the test artifacts folder, chosen at setup as `modules.tea.test_artifacts`, which can sit outside the output folder. To see what TEA has run, resolve it with `uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {project-root} --key modules.tea.test_artifacts` and look in these folders inside it:
|
|
38
|
+
|
|
39
|
+
| Folder | Written by |
|
|
40
|
+
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
|
|
41
|
+
| `test-design/` | `bmad-tea-test-design`: `test-design-epic-<n>.md`, or `test-design-architecture.md` and `test-design-qa.md` at system level |
|
|
42
|
+
| `framework/`, `ci/` | `bmad-tea-framework` |
|
|
43
|
+
| `atdd/` | `bmad-tea-automate` red mode: one `atdd-checklist-<story>.md` per story |
|
|
44
|
+
| `automate/` | `bmad-tea-automate` expand mode |
|
|
45
|
+
| `test-review/` | `bmad-tea-test-review` |
|
|
46
|
+
| `nfr/` | `bmad-tea-nfr` |
|
|
47
|
+
| `trace/` | `bmad-tea-trace`: one `traceability-matrix-<scope>.md` per story, epic, release or hotfix |
|
|
48
|
+
| `evaluate/` | `bmad-tea-evaluate` working state |
|
|
49
|
+
| `tea-academy/`, `teaching-progress/` | `bmad-tea-teach-me-testing` |
|
|
50
|
+
|
|
51
|
+
A file there shows a workflow ran, not that its work is finished: a file whose frontmatter says `workflowStatus: 'in-progress'` is a started run the user can resume.
|
|
52
|
+
|
|
53
|
+
Runs before these folders existed wrote to the root of the test artifacts folder, and the workflows still read those files: `test-design-epic-<n>.md`, `test-design-architecture.md`, `test-design-qa.md`, `test-design-progress.md` and `test-design-progress-<scope>.md`, `framework-setup-progress.md`, `ci-pipeline-progress.md`, `atdd-checklist-<story>.md`, `automation-summary.md`, `test-review.md`, `nfr-assessment.md` and `traceability-matrix.md`. Read them the same way: the name or heading gives the scope, and only a checkpoint, the report's own status, its content or the user settles whether that run finished. When a root file and a folder file cover the same scope, say both exist and let the user pick. Evaluate writes evaluation folders under `evals/` by default; a team changes that with `evaluations_folder` in `_bmad/custom/bmad-tea-evaluate.toml`. `bmad setup tea` shows and changes the setup answers.
|
|
22
54
|
|
|
23
55
|
## More detail
|
|
24
56
|
|
|
@@ -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
|
+
]
|