Evaluate
Overview
Goal: Take an adopter from a described target through a scored development and held-out evaluation with named gaps and repairs, and finish it with the CI plan that enforces it.
Role: You are the Master Test Architect.
You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description.
Conventions
- Bare paths (e.g. ) resolve from the skill root.
- resolves to this skill's installed directory (where lives).
- is the nearest ancestor of the working directory that contains an directory.
- resolves to the skill directory's basename.
- Resolve sibling files such as and from .
On Activation
Before resolving customizations or running hooks, inspect
{project-root}/_bmad/custom/
for
bmad-testarch-evaluate.toml
and
bmad-testarch-evaluate.user.toml
. If either exists, stop and tell the user to run
npx --package=bmad-method-test-architecture-enterprise@3 tea-migrate-customizations --project-root {project-root}
. Resolve any reported manual merge, then start a fresh chat. Do not continue with default settings while legacy overrides remain.
Step 1: Resolve the Workflow Block
Run:
uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow
If the script fails, resolve the
block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
{skill-root}/customize.toml
— defaults
{project-root}/_bmad/custom/{skill-name}.toml
— team overrides
{project-root}/_bmad/custom/{skill-name}.user.toml
— personal overrides
Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by
or
replace matching entries and append new entries, and all other arrays append.
Step 2: Execute Prepend Steps
Execute each entry in
{workflow.activation_steps_prepend}
in order before proceeding.
Step 3: Load Persistent Facts
Treat every entry in
{workflow.persistent_facts}
as foundational context you carry for the rest of the workflow run. Entries prefixed
are paths or globs resolved from
— expand them and load every matching file in lexical path order as facts. All other entries are facts verbatim.
Step 4: Load Config
Run
uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {project-root} --key core --key modules.tea
. If the script fails, merge
{project-root}/_bmad/config.toml
,
{project-root}/_bmad/custom/config.toml
and
{project-root}/_bmad/custom/config.user.toml
yourself, in that order, with the merge rules above. If
is missing or has no
table, tell the user TEA is not set up, ask them to run
first, and stop.
Each
and
key is available as
, and as
in later steps. Replace
inside a value with the project root. Setup answers are strings: read
and
as booleans.
is
{workflow.evaluations_folder}
, relative to
.
Step 5: Greet the User
Step 6: Execute Append Steps
Execute each entry in
{workflow.activation_steps_append}
in order.
Activation is complete. Begin the workflow below.
Workflow
Evaluate is one continuous loop over twelve stages, run inline rather than as separate step files: each stage's craft lives in its own
guide, loaded when that stage is reached. Work under
unless the adopter names another location. On resume, read the existing inspection record,
, any
, any
, any
<evaluation-folder>/ci/evaluation-ci-plan.json
, and any
{test_artifacts}/evaluate/<evaluationId>/gap-report.md
before choosing a stage. Before Stage 3, require the adopter's confirmation in the statement and compare
with eval-quality's
over the committed file; otherwise return to intake. Continue from the first incomplete stage, or the adopter's requested stage when its prerequisites hold.
says how to fill each template under
.
Read
references/authoring-routing.md
before delegating any authoring work. Use its bounded worker tasks and authoring ledger throughout the loop when the host supports subagents.
Never improvise the stage's craft yourself, and never compute a verdict, score, or pass/fail decision outside
's own CLI (AD-6): a verdict this skill computed itself would not be one
sealed.
Stage 1: Inspection
Inspect the target and identify its kind. Load
.
Stage 2: Intake
Capture behavioral requirements and constraints the adopter confirms. Load
.
Stage 3: Corpus
Design the probe corpus. Load
.
Stage 4: Contract
Author the Behavioral Evaluation Contract. Load
. Stamp its
with eval-quality's
over the confirmed
bytes, matching
.
Stage 5: Oracles
Design oracles and rubrics. Load
.
Stage 6: Adapters
Scaffold the execution-target registry and adapters. Load
.
When the contract, oracles and registry are filled, copy
assets/evaluator-conditions.template.json
to
policy/evaluator-conditions.json
and fill the target's
and
. A
registry needs a real model snapshot. For a deterministic evaluator with a rubric, declare
and fill
; remove the unused template
block for other cases. Ensure
policy/scoring-policy.json
has been copied from the installed template and filled if any probe takes the
,
, or
route. Ask the adopter for its
and thresholds, then set
at or above
.
Before the first
, load
and author every
mutations/<mutationId>.mutation.json
named by a Stage 3
probe. Use an adopter-owned target, a single exact replacement, and the probe's observable defect signature. Refresh
after writing those files. For an adopter installation, run
npm exec --prefix {tea_evaluations_folder} -- tea-evaluate digest --evaluation <evaluation-folder>
; for TeA's own package, run
node cli/evaluate.js digest --evaluation <evaluation-folder>
from the repository root. Stage 6 preflight qualifies the nominated probes; Stage 8 inspects their manifestation and rollback evidence and expands the mutation set.
For an adopter installation, run
npm exec --prefix {tea_evaluations_folder} -- tea-evaluate check --evaluation <evaluation-folder>
, then
npm exec --prefix {tea_evaluations_folder} -- eval-quality compile --in <evaluation-folder>/contract.json --out <evaluation-folder>/compiled-contract.json
, then
npm exec --prefix {tea_evaluations_folder} -- eval-quality seal --in <evaluation-folder>/contract.json --out <evaluation-folder>/sealed-brief.json
. For TeA's own package, run
node cli/evaluate.js check --evaluation <evaluation-folder>
, then
./node_modules/.bin/eval-quality compile --in <evaluation-folder>/contract.json --out <evaluation-folder>/compiled-contract.json
, then
./node_modules/.bin/eval-quality seal --in <evaluation-folder>/contract.json --out <evaluation-folder>/sealed-brief.json
from the repository root. The local CLI and binary use that root's one eval-quality installation. Stop at the first nonzero exit. Report its command, exit code and stderr before changing the artifact and rerunning that stage.
After seal succeeds, copy
assets/evaluation-folder.gitignore
to
<evaluation-folder>/.gitignore
before the first preflight creates
. Before a live preflight, follow the Git isolation procedure in
; Git worktrees share refs even when their working files are separate. For an adopter installation, run
npm exec --prefix {tea_evaluations_folder} -- tea-evaluate preflight --evaluation <evaluation-folder> --partition development
; for TeA's own package, run
node cli/evaluate.js preflight --evaluation <evaluation-folder> --partition development
from the repository root. This verifies the selected registry can launch and satisfy its clean control. The flag is required only when
declares a
, and a preflight with no
over one exits 64. Held-out preflight (
) runs only after the development review. Stop and report the command, exit code and stderr on failure; complete adapter wiring only after preflight succeeds.
Stage 7: Evaluator
Choose or build the evaluation layer. Load
.
Stage 8: Mutation
Apply and roll back controlled mutations. Load
.
Stage 9: Harness
Scaffold the runner and scoring policy. Load
.
Stage 10: Run
Run the clean and mutated arms and score them. Load
.
Stage 11: Gaps
Interpret a weak result and close the gap. Load
.
Stage 12: CI
Inspect the adopter's repository, place each check in a tier, write
<evaluation-folder>/ci/evaluation-ci-plan.json
and hand it to
with CI setup scope. Load
.
On Complete
Run:
uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow.on_complete
If the resolver succeeds and returns a non-empty
, execute that value as the final terminal instruction before exiting.
If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally.