bmad-method-test-architecture-enterprise 2.0.1 → 2.0.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/README.md +4 -3
- package/cli/lib/build-prompt.js +8 -4
- package/cli/lib/resolve-tea-config.js +6 -9
- package/cli/lib/run-agent.js +2 -1
- package/cli/lib/safe-log.js +7 -0
- package/cli/lib/trace-command.js +628 -0
- package/cli/lib/trace-live.js +101 -0
- package/cli/lib/workflow-cli.js +250 -0
- package/cli/test-review.js +9 -1
- package/cli/trace.js +258 -0
- package/package.json +4 -2
- package/skills/bmad-testarch-trace/checklist.md +35 -38
- package/skills/bmad-testarch-trace/steps-c/step-01-load-context.md +5 -0
- package/skills/bmad-testarch-trace/steps-c/step-02-discover-tests.md +1 -0
- package/skills/bmad-testarch-trace/steps-c/step-03-map-criteria.md +7 -0
- package/skills/bmad-testarch-trace/steps-c/step-04-analyze-gaps.md +40 -1
- package/skills/bmad-testarch-trace/steps-c/step-05-gate-decision.md +22 -1
- package/skills/bmad-testarch-trace/trace-template.md +1 -0
- package/skills/bmad-testarch-trace/workflow.yaml +3 -3
- package/skills/bmod-tea/bmod.toml +1 -1
|
@@ -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 generation in red and expand modes with automatic run-and-heal, combined framework and CI setup, CI/CD quality gates, and structured testing education. The CI and ATDD commands remain available with existing customizations. Part of the BMad Method ecosystem.",
|
|
34
|
-
"version": "2.0.
|
|
34
|
+
"version": "2.0.2",
|
|
35
35
|
"author": {
|
|
36
36
|
"name": "Murat K Ozcan (TEA Creator) & Brian (BMad) Madison"
|
|
37
37
|
},
|
package/README.md
CHANGED
|
@@ -59,16 +59,16 @@ Each skill can run directly in a fresh session.
|
|
|
59
59
|
|
|
60
60
|
| Skill | Command | Menu | Use it to |
|
|
61
61
|
| ------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | ---- | ---------------------------------------------------- |
|
|
62
|
-
| [Test Review](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-test-review/) | `/bmad-testarch-test-review` | RV | Audit test quality and score findings |
|
|
63
62
|
| [Automate](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-automate/) | `/bmad-testarch-automate` | TA | Generate red acceptance scaffolds or expand coverage |
|
|
63
|
+
| [Test Review](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-test-review/) | `/bmad-testarch-test-review` | RV | Audit test quality and score findings |
|
|
64
64
|
| [Test Design](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-test-design/) | `/bmad-testarch-test-design` | TD | Plan risks, coverage, and NFR evidence |
|
|
65
65
|
| [Framework](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/setup-test-framework/) | `/bmad-testarch-framework` | TF | Set up a test framework, CI, or both |
|
|
66
66
|
| [NFR](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-nfr-assess/) | `/bmad-testarch-nfr` | NR | Audit implemented NFR evidence |
|
|
67
|
+
| [Trace](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-trace/) | `/bmad-testarch-trace` | TR | Map requirements to tests and decide a release gate |
|
|
67
68
|
| [Teach Me Testing](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/teach-me-testing/) | `/bmad-teach-me-testing` | TMT | Learn testing through seven sessions |
|
|
68
69
|
|
|
69
|
-
|
|
70
|
+
Evaluate:
|
|
70
71
|
|
|
71
|
-
- [Trace](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-trace/): `/bmad-testarch-trace`, menu `TR`. Map requirements to tests and decide a release gate.
|
|
72
72
|
- [Evaluate](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/tutorials/evaluate-your-first-skill/): `/bmad-testarch-evaluate`, menu `EV`. Build and run a behavioral evaluation.
|
|
73
73
|
|
|
74
74
|
Framework and CI setup share one skill, `bmad-testarch-framework`.
|
|
@@ -114,6 +114,7 @@ npm install --save-dev bmad-method-test-architecture-enterprise
|
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
- [`tea-test-review`](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/reference/tea-test-review-cli/) runs the review skill against changed tests and returns a gate verdict.
|
|
117
|
+
- [`tea-trace`](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/reference/tea-trace-cli/) maps requirements to existing evidence and returns a coverage gate.
|
|
117
118
|
- [`tea-evaluate`](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/reference/tea-evaluate-cli/) checks, runs, scores, and compares behavioral evaluations.
|
|
118
119
|
|
|
119
120
|
For `tea-evaluate`, install `eval-quality` alongside TEA in the evaluations folder:
|
package/cli/lib/build-prompt.js
CHANGED
|
@@ -291,9 +291,12 @@ function buildPrompt({
|
|
|
291
291
|
'fragment set, Pact MCP) instead of inferring the flags.',
|
|
292
292
|
'The two *_installed values above were read from the project manifest by the CLI. Do not re-derive them, and do',
|
|
293
293
|
'not open package.json for them: they are the second half of each mandate gate, stated here for the same reason the flags are.',
|
|
294
|
-
'One
|
|
295
|
-
'(mypy, pyright, tsc)
|
|
296
|
-
'(package.json scripts, a Makefile)
|
|
294
|
+
'One evidence check is allowed beyond the review set and the context list: when H10 turns on whether a static',
|
|
295
|
+
'type checker (mypy, pyright, tsc) checks a type-assignability test, read the CI workflow files',
|
|
296
|
+
'(.github/workflows), scripts they invoke (package.json scripts, a Makefile), and the checker configuration',
|
|
297
|
+
'(such as pyproject.toml, mypy.ini, pyrightconfig.json, or tsconfig.json) for that question. Resolve the',
|
|
298
|
+
"checker's effective file scope: a CI command without file targets may use the config's files or include list.",
|
|
299
|
+
'H10 fires if the checker never reads the reviewed test file, even when CI runs the checker.',
|
|
297
300
|
'tea_execution_mode and tea_capability_probe are the orchestration pair step-03-quality-evaluation.md branches on,',
|
|
298
301
|
'resolved the same way the fragment keys above are: an explicit CLI flag, then [modules.tea] in the project config,',
|
|
299
302
|
'then the module default. Both are stated because step-03 reads both, and "auto" with probing off resolves to',
|
|
@@ -344,7 +347,8 @@ function buildPrompt({
|
|
|
344
347
|
JSON.stringify(contextFiles, null, 2),
|
|
345
348
|
'---END CONTEXT---',
|
|
346
349
|
'',
|
|
347
|
-
'Read only the artifacts named above
|
|
350
|
+
'Read only the artifacts named above, except for the H10 checker evidence allowed earlier.',
|
|
351
|
+
'Never go looking for a story, PRD, or test design that the context list did',
|
|
348
352
|
'not name: with no human present to confirm what you found, an unrequested artifact is a nondeterministic input.',
|
|
349
353
|
'',
|
|
350
354
|
'Context may RAISE a finding — a test that contradicts its acceptance criteria, a changed code path no assertion',
|
|
@@ -56,11 +56,6 @@ const SNAPSHOT_DEFAULTS = {
|
|
|
56
56
|
test_framework: 'auto',
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
const WORKFLOW_CUSTOM_PATHS = [
|
|
60
|
-
path.join('_bmad', 'custom', 'bmad-testarch-test-review.toml'),
|
|
61
|
-
path.join('_bmad', 'custom', 'bmad-testarch-test-review.user.toml'),
|
|
62
|
-
];
|
|
63
|
-
|
|
64
59
|
const PACT_MCP_VALUES = ['mcp', 'none'];
|
|
65
60
|
// step-03-quality-evaluation.md's requestable modes. `auto` asks the capability
|
|
66
61
|
// probe to pick; the other three are honoured as stated.
|
|
@@ -285,7 +280,7 @@ function parseToml(content, label) {
|
|
|
285
280
|
}
|
|
286
281
|
|
|
287
282
|
/** Resolve trusted skill defaults and project workflow overrides from the same configuration source. */
|
|
288
|
-
function readWorkflowCustomization(source, skillRoot, projectRoot) {
|
|
283
|
+
function readWorkflowCustomization(source, skillRoot, projectRoot, skillName = 'bmad-testarch-test-review') {
|
|
289
284
|
if (!skillRoot) return {};
|
|
290
285
|
const defaultsPath = path.join(skillRoot, 'customize.toml');
|
|
291
286
|
let merged = {};
|
|
@@ -294,7 +289,9 @@ function readWorkflowCustomization(source, skillRoot, projectRoot) {
|
|
|
294
289
|
} catch (error) {
|
|
295
290
|
if (error.code !== 'ENOENT') throw configError(`Failed to load ${defaultsPath}: ${error.message}`);
|
|
296
291
|
}
|
|
297
|
-
|
|
292
|
+
if (!/^[a-z0-9][a-z0-9-]*$/.test(skillName)) throw configError('Workflow skill name must be a lowercase kebab-case name');
|
|
293
|
+
const workflowPaths = ['.toml', '.user.toml'].map((suffix) => path.join('_bmad', 'custom', skillName + suffix));
|
|
294
|
+
for (const relativePath of workflowPaths) {
|
|
298
295
|
const content = source.read(relativePath);
|
|
299
296
|
if (content !== null) merged = mergeTables(merged, parseToml(content, source.label(relativePath)));
|
|
300
297
|
}
|
|
@@ -497,10 +494,10 @@ const KEY_TO_INSTALLED_FIELD = {
|
|
|
497
494
|
* manifest rather than left to the agent.
|
|
498
495
|
* @throws {Error} With code TEA_CONFIG_INVALID on unusable config content.
|
|
499
496
|
*/
|
|
500
|
-
function resolveTeaConfig({ projectRoot, flags = {}, baseRef, skillRoot }) {
|
|
497
|
+
function resolveTeaConfig({ projectRoot, flags = {}, baseRef, skillRoot, skillName }) {
|
|
501
498
|
const source = configSource(projectRoot, baseRef);
|
|
502
499
|
const file = readTeaConfigFile(projectRoot, baseRef, source);
|
|
503
|
-
const workflowCustomization = readWorkflowCustomization(source, skillRoot, projectRoot);
|
|
500
|
+
const workflowCustomization = readWorkflowCustomization(source, skillRoot, projectRoot, skillName);
|
|
504
501
|
|
|
505
502
|
const values = {};
|
|
506
503
|
const sources = {};
|
package/cli/lib/run-agent.js
CHANGED
|
@@ -38,6 +38,7 @@ const path = require('node:path');
|
|
|
38
38
|
const { spawn, spawnSync } = require('node:child_process');
|
|
39
39
|
const { AGENT_ADAPTERS, DEFAULT_CAPABILITIES, RUNNER_CAPABILITIES, bridgedArgsRefused, resolveModel } = require('./agent-adapters');
|
|
40
40
|
const { launchPrefix } = require('./isolation-primitives');
|
|
41
|
+
const { neutralizeWorkflowCommands } = require('./safe-log');
|
|
41
42
|
|
|
42
43
|
const STDERR_TAIL_LINES = 20;
|
|
43
44
|
const DEFAULT_TIMEOUT_MS = 1_800_000; // 30 minutes
|
|
@@ -280,7 +281,7 @@ function agentAnswer({ outcome, stdout, stderr }, { command: spawned, agentComma
|
|
|
280
281
|
if (outcome.status !== 0) {
|
|
281
282
|
const stderrTail = (stderr || '').trim().split('\n').slice(-STDERR_TAIL_LINES).join('\n');
|
|
282
283
|
if (stderrTail) {
|
|
283
|
-
console.error(`Agent stderr (last ${STDERR_TAIL_LINES} lines):\n${stderrTail}`);
|
|
284
|
+
console.error(`Agent stderr (last ${STDERR_TAIL_LINES} lines):\n${neutralizeWorkflowCommands(stderrTail)}`);
|
|
284
285
|
}
|
|
285
286
|
// A signal-killed child (OOM, an external kill, anything outside the
|
|
286
287
|
// ETIMEDOUT case already handled above) reports status as null; naming
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Keep captured agent text from becoming a GitHub Actions workflow command. */
|
|
2
|
+
function neutralizeWorkflowCommands(value) {
|
|
3
|
+
// The runner recognizes legacy ##[ commands anywhere in a log line.
|
|
4
|
+
return String(value).replaceAll('##[', '# #[').replaceAll('::', ': :');
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
module.exports = { neutralizeWorkflowCommands };
|