bmad-tea-evaluate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEvaluate
评估
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. ) resolve from the skill root.
references/inspection.md - resolves to this skill's installed directory (where
{skill-root}lives).customize.toml - is the nearest ancestor of the working directory that contains an
{project-root}directory._bmad - resolves to the skill directory's basename.
{skill-name} - Resolve sibling files such as and
references/...fromassets/....{skill-root}
- 裸路径(如 )相对于 skill 根目录解析。
references/inspection.md - 解析为此 skill 的安装目录(其中包含
{skill-root})。customize.toml - 是工作目录中最近的、包含
{project-root}目录的祖先目录。_bmad - 解析为 skill 目录的 basename。
{skill-name} - 诸如 和
references/...等同级文件从assets/...解析。{skill-root}
On Activation
激活时
Before resolving customizations or running hooks, inspect for and . If either exists, stop and tell the user to run . Resolve any reported manual merge, then start a fresh chat. Do not continue with default settings while legacy overrides remain.
{project-root}/_bmad/custom/bmad-testarch-evaluate.tomlbmad-testarch-evaluate.user.tomlnpx --package=bmad-method-test-architecture-enterprise@3 tea-migrate-customizations --project-root {project-root}在解析自定义配置或运行 hooks 之前,检查 中是否存在 和 。如果其中任何一个存在,请停止并告知用户运行 。完成工具报告的任何手动合并后,让用户开始新的聊天。只要遗留覆盖配置仍然存在,就不得使用默认设置继续执行。
{project-root}/_bmad/custom/bmad-testarch-evaluate.tomlbmad-testarch-evaluate.user.tomlnpx --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 workflowIf 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:
workflow- — defaults
{skill-root}/customize.toml - — team overrides
{project-root}/_bmad/custom/{skill-name}.toml - — personal overrides
{project-root}/_bmad/custom/{skill-name}.user.toml
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.
codeid运行:
uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow如果脚本失败,则按照 base → team → user 的顺序读取以下三个文件,并使用与 resolver 相同的结构合并规则,自行解析 block:
workflow- — 默认值
{skill-root}/customize.toml - — 团队覆盖配置
{project-root}/_bmad/custom/{skill-name}.toml - — 个人覆盖配置
{project-root}/_bmad/custom/{skill-name}.user.toml
缺失的文件将被跳过。标量值会被覆盖,表会深度合并,以 或 为键的表数组会替换匹配项并追加新项,所有其他数组则直接追加。
codeidStep 2: Execute Prepend Steps
步骤 2:执行 Prepend Steps
Execute each entry in in order before proceeding.
{workflow.activation_steps_prepend}在继续之前,按顺序执行 中的每个条目。
{workflow.activation_steps_prepend}Step 3: Load Persistent Facts
步骤 3:加载持久化事实
Treat every entry in 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.
{workflow.persistent_facts}file:{project-root}将 中的每个条目视为贯穿本次 workflow 运行的基础上下文。以 为前缀的条目是相对于 解析的路径或 glob;展开它们,并按词法路径顺序加载每个匹配文件作为事实。其他所有条目均按原样作为事实。
{workflow.persistent_facts}file:{project-root}Step 4: Load Config
步骤 4:加载配置
Run . If the script fails, merge , and 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.
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.tomlmodules.teabmad setup teaEach 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.
coremodules.tea{<key>}config.<key>{project-root}"true""false"{tea_evaluations_folder}{workflow.evaluations_folder}{project-root}运行:。如果脚本失败,则按照上述合并规则,依次自行合并 、 和 。如果 缺失或没有 表,则告知用户尚未设置 TEA,请其先运行 ,然后停止。
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.tomlmodules.teabmad setup tea每个 和 键在后续步骤中均可作为 和 使用。将值中的 替换为项目根目录。设置项答案均为字符串:将 和 读取为布尔值。
coremodules.tea{<key>}config.<key>{project-root}"true""false"{tea_evaluations_folder}{workflow.evaluations_folder}{project-root}Step 5: Greet the User
步骤 5:问候用户
Greet , speaking in .
{user_name}{communication_language}使用 与 打招呼。
{communication_language}{user_name}Step 6: Execute Append Steps
步骤 6:执行 Append Steps
Execute each entry in in order.
{workflow.activation_steps_append}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 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 , and any 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 .
references/{tea_evaluations_folder}evaluation.jsonrequirements.mdauthoring-log.md<evaluation-folder>/ci/evaluation-ci-plan.json{test_artifacts}/evaluate/<evaluationId>/gap-report.mdrequirements.digestdigestBytesassets/README.mdassets/Read before delegating any authoring work. Use its bounded worker tasks and authoring ledger throughout the loop when the host supports subagents.
references/authoring-routing.mdNever 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.
eval-qualityeval-qualityEvaluate 由十二个阶段组成一个连续循环,应内联执行,而不是拆分为独立的 step 文件:每个阶段的具体实践都记录在其对应的 指南中,进入该阶段时再加载。除非 adopter 指定了其他位置,否则应在 下工作。恢复执行时,在选择阶段之前,读取现有的 inspection 记录、、任何 、任何 、任何 ,以及任何 。在进入阶段 3 之前,要求 adopter 在声明中作出确认,并将 与 eval-quality 针对已提交文件计算的 进行比较;否则返回 intake。前提条件满足时,从第一个未完成的阶段继续,或从 adopter 指定的阶段继续。 说明了如何填写 下的每个模板。
references/{tea_evaluations_folder}evaluation.jsonrequirements.mdauthoring-log.md<evaluation-folder>/ci/evaluation-ci-plan.json{test_artifacts}/evaluate/<evaluationId>/gap-report.mdrequirements.digestdigestBytesassets/README.mdassets/在委派任何 authoring 工作之前,读取 。如果宿主支持 subagents,应在整个循环中使用其中有界的 worker 任务和 authoring ledger。
references/authoring-routing.md绝不要自行即兴实施某阶段的具体实践,也绝不要在 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.mdStage 2: Intake
阶段 2:Intake
Capture behavioral requirements and constraints the adopter confirms. Load .
references/intake.md捕获由 adopter 确认的行为需求和约束。加载 。
references/intake.mdStage 3: Corpus
阶段 3:Corpus
Design the probe corpus. Load .
references/corpus.md设计 probe corpus。加载 。
references/corpus.mdStage 4: Contract
阶段 4:Contract
Author the Behavioral Evaluation Contract. Load . Stamp its with eval-quality's over the confirmed bytes, matching .
references/contract.mdsourceSpecDigestdigestBytesrequirements.mdevaluation.jsonrequirements.digest编写 Behavioral Evaluation Contract。加载 。使用 eval-quality 的 对已确认的 字节计算结果,将其写入 ,并确保与 中的 匹配。
references/contract.mddigestBytesrequirements.mdsourceSpecDigestevaluation.jsonrequirements.digestStage 5: Oracles
阶段 5:Oracles
Design oracles and rubrics. Load .
references/oracles.md设计 oracles 和 rubrics。加载 。
references/oracles.mdStage 6: Adapters
阶段 6:Adapters
Scaffold the execution-target registry and adapters. Load .
references/adapters.mdWhen the contract, oracles and registry are filled, copy to 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 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 .
assets/evaluator-conditions.template.jsonpolicy/evaluator-conditions.jsonmodelSnapshotsystemPromptDigesttea-skill-runnerevaluation.json.judgejudge.modelSnapshotjudgepolicy/scoring-policy.jsoncontrolled-mutationhistoricalgameabilitypolicyIdevaluation.json.trialsminimumTrialCountBefore the first , load and author every 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 ; for TeA's own package, run from the repository root. Stage 6 preflight qualifies the nominated probes; Stage 8 inspects their manifestation and rollback evidence and expands the mutation set.
tea-evaluate checkreferences/mutation.mdmutations/<mutationId>.mutation.jsoncontrolled-mutationcorpus-index.jsonnpm exec --prefix {tea_evaluations_folder} -- tea-evaluate digest --evaluation <evaluation-folder>node cli/evaluate.js digest --evaluation <evaluation-folder>For an adopter installation, run , then , then . For TeA's own package, run , then , then 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.
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.jsonnpm exec --prefix {tea_evaluations_folder} -- eval-quality seal --in <evaluation-folder>/contract.json --out <evaluation-folder>/sealed-brief.jsonnode 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.jsonAfter seal succeeds, copy to 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 ; for TeA's own package, run 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.
assets/evaluation-folder.gitignore<evaluation-folder>/.gitignoreruns/references/run.mdnpm exec --prefix {tea_evaluations_folder} -- tea-evaluate preflight --evaluation <evaluation-folder> --partition developmentnode cli/evaluate.js preflight --evaluation <evaluation-folder> --partition developmentevaluation.jsonpartitionPlan--partition--partition held-out搭建 execution-target registry 和 adapters 的脚手架。加载 。
references/adapters.md当 contract、oracles 和 registry 均已填写完成后,将 复制为 ,并填写目标的 和 。tea-skill-runner registry 需要真实的 model snapshot。对于带 rubric 的确定性 evaluator,声明 并填写 ;其他情况则删除未使用的模板 block。确保已从安装模板复制 ;如果任何 probe 采用 、 或 路线,则填写该文件。向 adopter 询问其 和 thresholds,然后将 设置为大于或等于 的值。
assets/evaluator-conditions.template.jsonpolicy/evaluator-conditions.jsonmodelSnapshotsystemPromptDigestevaluation.json.judgejudge.modelSnapshotjudgepolicy/scoring-policy.jsoncontrolled-mutationhistoricalgameabilitypolicyIdevaluation.json.trialsminimumTrialCount在首次运行 之前,加载 ,并为阶段 3 中每个 probe 所命名的 编写内容。使用由 adopter 拥有的目标、一次精确替换,以及该 probe 的可观察缺陷签名。写入这些文件后,刷新 。对于 adopter 的安装实例,运行 ;对于 TeA 自身的 package,在 repository 根目录下运行 。阶段 6 的 preflight 负责验证候选 probes 是否合格;阶段 8 将检查其表现和回滚证据,并扩展 mutation 集合。
tea-evaluate checkreferences/mutation.mdcontrolled-mutationmutations/<mutationId>.mutation.jsoncorpus-index.jsonnpm exec --prefix {tea_evaluations_folder} -- tea-evaluate digest --evaluation <evaluation-folder>node cli/evaluate.js digest --evaluation <evaluation-folder>对于 adopter 的安装实例,运行 ,然后运行 ,最后运行 。对于 TeA 自身的 package,在 repository 根目录下运行 ,然后运行 ,最后运行 。本地 CLI 和 binary 使用该根目录下唯一的 eval-quality 安装。在首次出现非零退出码时停止;报告相应命令、退出码和 stderr,然后才能修改 artifact 并重新运行该阶段。
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.jsonnpm exec --prefix {tea_evaluations_folder} -- eval-quality seal --in <evaluation-folder>/contract.json --out <evaluation-folder>/sealed-brief.jsonnode 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.jsonseal 成功后,在首次 preflight 创建 之前,将 复制到 。在 live preflight 之前,遵循 中的 Git 隔离流程;即使工作文件彼此分离,Git worktrees 仍会共享 refs。对于 adopter 的安装实例,运行 ;对于 TeA 自身的 package,在 repository 根目录下运行 。此步骤验证选定的 registry 能够启动并满足 clean control。仅当 声明了 时才必须提供该 flag;如果针对多个 partition 的 preflight 未提供 ,则会以 64 退出。held-out preflight()只能在 development review 完成后运行。失败时停止并报告命令、退出码和 stderr;仅在 preflight 成功后完成 adapter wiring。
runs/assets/evaluation-folder.gitignore<evaluation-folder>/.gitignorereferences/run.mdnpm exec --prefix {tea_evaluations_folder} -- tea-evaluate preflight --evaluation <evaluation-folder> --partition developmentnode cli/evaluate.js preflight --evaluation <evaluation-folder> --partition developmentevaluation.jsonpartitionPlan--partition--partition held-outStage 7: Evaluator
阶段 7:Evaluator
Choose or build the evaluation layer. Load .
references/evaluator.md选择或构建 evaluation layer。加载 。
references/evaluator.mdStage 8: Mutation
阶段 8:Mutation
Apply and roll back controlled mutations. Load .
references/mutation.md应用并回滚 controlled mutations。加载 。
references/mutation.mdStage 9: Harness
阶段 9:Harness
Scaffold the runner and scoring policy. Load .
references/harness.md搭建 runner 和 scoring policy 的脚手架。加载 。
references/harness.mdStage 10: Run
阶段 10:Run
Run the clean and mutated arms and score them. Load .
references/run.md运行 clean arm 和 mutated arm 并进行评分。加载 。
references/run.mdStage 11: Gaps
阶段 11:Gaps
Interpret a weak result and close the gap. Load .
references/gaps.md解读薄弱结果并弥合缺口。加载 。
references/gaps.mdStage 12: CI
阶段 12:CI
Inspect the adopter's repository, place each check in a tier, write and hand it to with CI setup scope. Load .
<evaluation-folder>/ci/evaluation-ci-plan.jsonbmad-tea-frameworkreferences/ci.md检查 adopter 的 repository,将每项 check 归入相应 tier,编写 ,并以 CI setup scope 将其移交给 。加载 。
<evaluation-folder>/ci/evaluation-ci-plan.jsonbmad-tea-frameworkreferences/ci.mdOn Complete
完成时
Run:
uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow.on_completeIf the resolver succeeds and returns a non-empty , execute that value as the final terminal instruction before exiting.
workflow.on_completeIf 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 并正常退出。