bmad-tea-evaluate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

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.
目标: 引导 adopter 从已描述的目标出发,完成带评分的 development 与 held-out 评估,识别并修复明确的缺口,最终交付用于落实这些要求的 CI 计划。
角色: 你是测试架构师负责人(Master Test Architect)。你将继续使用赋予你的姓名、身份和 communication_style,并将其与本角色描述中的详细信息合并。

Conventions

约定

  • Bare paths (e.g.
    references/inspection.md
    ) resolve from the skill root.
  • {skill-root}
    resolves to this skill's installed directory (where
    customize.toml
    lives).
  • {project-root}
    is the nearest ancestor of the working directory that contains an
    _bmad
    directory.
  • {skill-name}
    resolves to the skill directory's basename.
  • Resolve sibling files such as
    references/...
    and
    assets/...
    from
    {skill-root}
    .
  • 裸路径(如
    references/inspection.md
    )相对于 skill 根目录解析。
  • {skill-root}
    解析为此 skill 的安装目录(其中包含
    customize.toml
    )。
  • {project-root}
    是工作目录中最近的、包含
    _bmad
    目录的祖先目录。
  • {skill-name}
    解析为 skill 目录的 basename。
  • 诸如
    references/...
    和
    assets/...
    等同级文件从
    {skill-root}
    解析。

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.
在解析自定义配置或运行 hooks 之前,检查
{project-root}/_bmad/custom/
中是否存在
bmad-testarch-evaluate.toml
和
bmad-testarch-evaluate.user.toml
。如果其中任何一个存在,请停止并告知用户运行
npx --package=bmad-method-test-architecture-enterprise@3 tea-migrate-customizations --project-root {project-root}
。完成工具报告的任何手动合并后,让用户开始新的聊天。只要遗留覆盖配置仍然存在,就不得使用默认设置继续执行。

Step 1: Resolve the Workflow Block

步骤 1:解析 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
workflow
block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
  1. {skill-root}/customize.toml
    — defaults
  2. {project-root}/_bmad/custom/{skill-name}.toml
    — team overrides
  3. {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
code
or
id
replace matching entries and append new entries, and all other arrays append.
运行:
uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow
如果脚本失败,则按照 base → team → user 的顺序读取以下三个文件,并使用与 resolver 相同的结构合并规则,自行解析
workflow
block:
  1. {skill-root}/customize.toml
    — 默认值
  2. {project-root}/_bmad/custom/{skill-name}.toml
    — 团队覆盖配置
  3. {project-root}/_bmad/custom/{skill-name}.user.toml
    — 个人覆盖配置
缺失的文件将被跳过。标量值会被覆盖,表会深度合并,以
code
或
id
为键的表数组会替换匹配项并追加新项,所有其他数组则直接追加。

Step 2: Execute Prepend Steps

步骤 2:执行 Prepend Steps

Execute each entry in
{workflow.activation_steps_prepend}
in order before proceeding.
在继续之前,按顺序执行
{workflow.activation_steps_prepend}
中的每个条目。

Step 3: Load Persistent Facts

步骤 3:加载持久化事实

Treat every entry in
{workflow.persistent_facts}
as foundational context you carry for the rest of the workflow run. Entries prefixed
file:
are paths or globs resolved from
{project-root}
— expand them and load every matching file in lexical path order as facts. All other entries are facts verbatim.
将
{workflow.persistent_facts}
中的每个条目视为贯穿本次 workflow 运行的基础上下文。以
file:
为前缀的条目是相对于
{project-root}
解析的路径或 glob;展开它们,并按词法路径顺序加载每个匹配文件作为事实。其他所有条目均按原样作为事实。

Step 4: Load Config

步骤 4:加载配置

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
_bmad/config.toml
is missing or has no
modules.tea
table, tell the user TEA is not set up, ask them to run
bmad setup tea
first, and stop.
Each
core
and
modules.tea
key is available as
{<key>}
, and as
config.<key>
in later steps. Replace
{project-root}
inside a value with the project root. Setup answers are strings: read
"true"
and
"false"
as booleans.
{tea_evaluations_folder}
is
{workflow.evaluations_folder}
, relative to
{project-root}
.
运行:
uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {project-root} --key core --key modules.tea
。如果脚本失败,则按照上述合并规则,依次自行合并
{project-root}/_bmad/config.toml
、
{project-root}/_bmad/custom/config.toml
和
{project-root}/_bmad/custom/config.user.toml
。如果
_bmad/config.toml
缺失或没有
modules.tea
表,则告知用户尚未设置 TEA,请其先运行
bmad setup tea
,然后停止。
每个
core
和
modules.tea
键在后续步骤中均可作为
{<key>}
和
config.<key>
使用。将值中的
{project-root}
替换为项目根目录。设置项答案均为字符串:将
"true"
和
"false"
读取为布尔值。
{tea_evaluations_folder}
即
{workflow.evaluations_folder}
,其路径相对于
{project-root}
。

Step 5: Greet the User

步骤 5:问候用户

Greet
{user_name}
, speaking in
{communication_language}
.
使用
{communication_language}
与
{user_name}
打招呼。

Step 6: Execute Append Steps

步骤 6:执行 Append Steps

Execute each entry in
{workflow.activation_steps_append}
in order.
Activation is complete. Begin the workflow below.
按顺序执行
{workflow.activation_steps_append}
中的每个条目。
激活完成。开始执行下面的 workflow。

Workflow

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
references/
guide, loaded when that stage is reached. Work under
{tea_evaluations_folder}
unless the adopter names another location. On resume, read the existing inspection record,
evaluation.json
, any
requirements.md
, any
authoring-log.md
, 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
requirements.digest
with eval-quality's
digestBytes
over the committed file; otherwise return to intake. Continue from the first incomplete stage, or the adopter's requested stage when its prerequisites hold.
assets/README.md
says how to fill each template under
assets/
.
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
eval-quality
's own CLI (AD-6): a verdict this skill computed itself would not be one
eval-quality
sealed.
Evaluate 由十二个阶段组成一个连续循环,应内联执行,而不是拆分为独立的 step 文件:每个阶段的具体实践都记录在其对应的
references/
指南中,进入该阶段时再加载。除非 adopter 指定了其他位置,否则应在
{tea_evaluations_folder}
下工作。恢复执行时,在选择阶段之前,读取现有的 inspection 记录、
evaluation.json
、任何
requirements.md
、任何
authoring-log.md
、任何
<evaluation-folder>/ci/evaluation-ci-plan.json
,以及任何
{test_artifacts}/evaluate/<evaluationId>/gap-report.md
。在进入阶段 3 之前,要求 adopter 在声明中作出确认,并将
requirements.digest
与 eval-quality 针对已提交文件计算的
digestBytes
进行比较;否则返回 intake。前提条件满足时,从第一个未完成的阶段继续,或从 adopter 指定的阶段继续。
assets/README.md
说明了如何填写
assets/
下的每个模板。
在委派任何 authoring 工作之前,读取
references/authoring-routing.md
。如果宿主支持 subagents,应在整个循环中使用其中有界的 worker 任务和 authoring ledger。
绝不要自行即兴实施某阶段的具体实践,也绝不要在 eval-quality 自身的 CLI(AD-6)之外计算 verdict、score 或 pass/fail 判定:由该 skill 计算出的 verdict 不会成为 eval-quality 封存的 verdict。

Stage 1: Inspection

阶段 1:Inspection

Inspect the target and identify its kind. Load
references/inspection.md
.
检查目标并确定其类型。加载
references/inspection.md
。

Stage 2: Intake

阶段 2:Intake

Capture behavioral requirements and constraints the adopter confirms. Load
references/intake.md
.
捕获由 adopter 确认的行为需求和约束。加载
references/intake.md
。

Stage 3: Corpus

阶段 3:Corpus

Design the probe corpus. Load
references/corpus.md
.
设计 probe corpus。加载
references/corpus.md
。

Stage 4: Contract

阶段 4:Contract

Author the Behavioral Evaluation Contract. Load
references/contract.md
. Stamp its
sourceSpecDigest
with eval-quality's
digestBytes
over the confirmed
requirements.md
bytes, matching
evaluation.json
requirements.digest
.
编写 Behavioral Evaluation Contract。加载
references/contract.md
。使用 eval-quality 的
digestBytes
对已确认的
requirements.md
字节计算结果,将其写入
sourceSpecDigest
,并确保与
evaluation.json
中的
requirements.digest
匹配。

Stage 5: Oracles

阶段 5:Oracles

Design oracles and rubrics. Load
references/oracles.md
.
设计 oracles 和 rubrics。加载
references/oracles.md
。

Stage 6: Adapters

阶段 6:Adapters

Scaffold the execution-target registry and adapters. Load
references/adapters.md
.
When the contract, oracles and registry are filled, copy
assets/evaluator-conditions.template.json
to
policy/evaluator-conditions.json
and fill the target's
modelSnapshot
and
systemPromptDigest
. A
tea-skill-runner
registry needs a real model snapshot. For a deterministic evaluator with a rubric, declare
evaluation.json.judge
and fill
judge.modelSnapshot
; remove the unused template
judge
block for other cases. Ensure
policy/scoring-policy.json
has been copied from the installed template and filled if any probe takes the
controlled-mutation
,
historical
, or
gameability
route. Ask the adopter for its
policyId
and thresholds, then set
evaluation.json.trials
at or above
minimumTrialCount
.
Before the first
tea-evaluate check
, load
references/mutation.md
and author every
mutations/<mutationId>.mutation.json
named by a Stage 3
controlled-mutation
probe. Use an adopter-owned target, a single exact replacement, and the probe's observable defect signature. Refresh
corpus-index.json
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
runs/
. Before a live preflight, follow the Git isolation procedure in
references/run.md
; 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
evaluation.json
declares a
partitionPlan
, and a preflight with no
--partition
over one exits 64. Held-out preflight (
--partition held-out
) runs only after the development review. Stop and report the command, exit code and stderr on failure; complete adapter wiring only after preflight succeeds.
搭建 execution-target registry 和 adapters 的脚手架。加载
references/adapters.md
。
当 contract、oracles 和 registry 均已填写完成后,将
assets/evaluator-conditions.template.json
复制为
policy/evaluator-conditions.json
,并填写目标的
modelSnapshot
和
systemPromptDigest
。tea-skill-runner registry 需要真实的 model snapshot。对于带 rubric 的确定性 evaluator,声明
evaluation.json.judge
并填写
judge.modelSnapshot
;其他情况则删除未使用的模板
judge
block。确保已从安装模板复制
policy/scoring-policy.json
;如果任何 probe 采用
controlled-mutation
、
historical
或
gameability
路线,则填写该文件。向 adopter 询问其
policyId
和 thresholds,然后将
evaluation.json.trials
设置为大于或等于
minimumTrialCount
的值。
在首次运行
tea-evaluate check
之前,加载
references/mutation.md
,并为阶段 3 中每个
controlled-mutation
probe 所命名的
mutations/<mutationId>.mutation.json
编写内容。使用由 adopter 拥有的目标、一次精确替换,以及该 probe 的可观察缺陷签名。写入这些文件后,刷新
corpus-index.json
。对于 adopter 的安装实例,运行
npm exec --prefix {tea_evaluations_folder} -- tea-evaluate digest --evaluation <evaluation-folder>
;对于 TeA 自身的 package,在 repository 根目录下运行
node cli/evaluate.js digest --evaluation <evaluation-folder>
。阶段 6 的 preflight 负责验证候选 probes 是否合格;阶段 8 将检查其表现和回滚证据,并扩展 mutation 集合。
对于 adopter 的安装实例,运行
npm exec --prefix {tea_evaluations_folder} -- tea-evaluate check --evaluation <evaluation-folder>
,然后运行
npm exec --prefix {tea_evaluations_folder} -- eval-quality compile --in <evaluation-folder>/contract.json --out <evaluation-folder>/compiled-contract.json
,最后运行
npm exec --prefix {tea_evaluations_folder} -- eval-quality seal --in <evaluation-folder>/contract.json --out <evaluation-folder>/sealed-brief.json
。对于 TeA 自身的 package,在 repository 根目录下运行
node cli/evaluate.js check --evaluation <evaluation-folder>
,然后运行
./node_modules/.bin/eval-quality compile --in <evaluation-folder>/contract.json --out <evaluation-folder>/compiled-contract.json
,最后运行
./node_modules/.bin/eval-quality seal --in <evaluation-folder>/contract.json --out <evaluation-folder>/sealed-brief.json
。本地 CLI 和 binary 使用该根目录下唯一的 eval-quality 安装。在首次出现非零退出码时停止;报告相应命令、退出码和 stderr,然后才能修改 artifact 并重新运行该阶段。
seal 成功后,在首次 preflight 创建
runs/
之前,将
assets/evaluation-folder.gitignore
复制到
<evaluation-folder>/.gitignore
。在 live preflight 之前,遵循
references/run.md
中的 Git 隔离流程;即使工作文件彼此分离,Git worktrees 仍会共享 refs。对于 adopter 的安装实例,运行
npm exec --prefix {tea_evaluations_folder} -- tea-evaluate preflight --evaluation <evaluation-folder> --partition development
;对于 TeA 自身的 package,在 repository 根目录下运行
node cli/evaluate.js preflight --evaluation <evaluation-folder> --partition development
。此步骤验证选定的 registry 能够启动并满足 clean control。仅当
evaluation.json
声明了
partitionPlan
时才必须提供该 flag;如果针对多个 partition 的 preflight 未提供
--partition
,则会以 64 退出。held-out preflight(
--partition held-out
)只能在 development review 完成后运行。失败时停止并报告命令、退出码和 stderr;仅在 preflight 成功后完成 adapter wiring。

Stage 7: Evaluator

阶段 7:Evaluator

Choose or build the evaluation layer. Load
references/evaluator.md
.
选择或构建 evaluation layer。加载
references/evaluator.md
。

Stage 8: Mutation

阶段 8:Mutation

Apply and roll back controlled mutations. Load
references/mutation.md
.
应用并回滚 controlled mutations。加载
references/mutation.md
。

Stage 9: Harness

阶段 9:Harness

Scaffold the runner and scoring policy. Load
references/harness.md
.
搭建 runner 和 scoring policy 的脚手架。加载
references/harness.md
。

Stage 10: Run

阶段 10:Run

Run the clean and mutated arms and score them. Load
references/run.md
.
运行 clean arm 和 mutated arm 并进行评分。加载
references/run.md
。

Stage 11: Gaps

阶段 11:Gaps

Interpret a weak result and close the gap. Load
references/gaps.md
.
解读薄弱结果并弥合缺口。加载
references/gaps.md
。

Stage 12: CI

阶段 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
bmad-tea-framework
with CI setup scope. Load
references/ci.md
.
检查 adopter 的 repository,将每项 check 归入相应 tier,编写
<evaluation-folder>/ci/evaluation-ci-plan.json
,并以 CI setup scope 将其移交给
bmad-tea-framework
。加载
references/ci.md
。

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
workflow.on_complete
, 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.
运行:
uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow.on_complete
如果 resolver 成功并返回非空的
workflow.on_complete
,则在退出前将该值作为最终终止指令执行。
如果 resolver 失败、未返回任何输出或解析出的值为空,则跳过该 hook 并正常退出。