@llman-sdd/core 0.5.0 → 0.6.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.
@@ -5,7 +5,7 @@
5
5
  * injected via SpecIo.
6
6
  */
7
7
  import type { CapabilityDoc } from '../spec/ir.ts';
8
- import { specIdOf } from '../spec/ir.ts';
8
+ import { ruleHasRunnableScenario, specIdOf } from '../spec/ir.ts';
9
9
  import { buildReqRegistry } from '../spec/reqRegistry.ts';
10
10
 
11
11
  export type ValidationLevel = 'ERROR' | 'WARNING' | 'INFO';
@@ -140,16 +140,17 @@ export function validateCapability(
140
140
  // (native Gherkin); they carry no rule handle, so no warning or signal —
141
141
  // they simply aren't part of rule accounting.
142
142
 
143
- // Bare-rule aggregate (r134 migrated): rules with no nested executable
144
- // scenario, aggregated per capability (never one issue per rule), INFO so it
145
- // never blocks anything. The real accountability lives in the review
146
- // `pending` signal and the specs-compact workflow.
147
- const bare = rules.filter((r) => r.scenarios.length === 0).length;
148
- if (bare > 0) {
143
+ // Unbound-requirement aggregate (r12/r90): rules without any runnable nested
144
+ // scenario (@skip/@experimental-only or stepless included), aggregated per
145
+ // capability (never one issue per rule), INFO so it never blocks anything.
146
+ // The real accountability lives in the review `unbound` signal, the
147
+ // `spec unbound` feed and the specs-compact workflow.
148
+ const unbound = rules.filter((r) => !ruleHasRunnableScenario(r)).length;
149
+ if (unbound > 0) {
149
150
  push(
150
151
  'INFO',
151
152
  coveragePath(cap),
152
- `${bare} bare rule(s) without any executable scenario — convert to 场景: or compact`,
153
+ `${unbound} unbound requirement(s) without any runnable scenario — bind via 场景: or compact`,
153
154
  );
154
155
  }
155
156
 
@@ -76,7 +76,7 @@ Run the project gates as appropriate:
76
76
  - SDD validation: `llman-sdd validate <id> --strict`
77
77
 
78
78
  **Gate evidence**:
79
- - Close-out runs the configured `bdd.run_command`, so do not run that command again just before close-out; the skip line printed by `--no-check` is not a pass.
79
+ - Close-out runs the configured `specs.check_command`, so do not run that command again just before close-out; the skip line printed by `--no-check` is not a pass.
80
80
  - Gate verdicts MUST come from the real harness: MUST NOT obtain a "pass" via `--no-check`; on harness failure, find the root cause first (leaked env vars, nested-invocation guards, wrong cwd …) — MUST NOT label it an "inherent/self-referential property" and bypass it.
81
81
  - Before/after criteria (counts, baselines) MUST be measured on the change branch (against the freshly computed merge-base); a value measured on the default branch is usually trivially the baseline and proves nothing.
82
82
  - Refactors and bulk replacements: MUST compare the test count before and after; all-green gates with fewer tests is a failure.
@@ -46,7 +46,7 @@ flowchart LR
46
46
  - Write decisions back: resolved decisions go into the change's `proposal.md` "Open Questions" section.
47
47
  - Completion criterion: every pending decision is resolved or explicitly deferred. When not triggered, the default (ask 1–3 questions) behavior is unchanged.
48
48
  4. If a change id is relevant, read its artifacts under `llmanspec/changes/<id>/`.
49
- - When diagnosing validation errors, run `llman-sdd validate <spec> --strict` first for the structural gates (Gherkin / `@req` linkage / dual-write / req_id uniqueness); when `bdd.run_command` is configured, validate executes that harness by default (`--no-check` skips it). Failing items are pinned down in the default TOON output's `items[].issues[]`; `--output human` prints `FAIL <item_type>/<id>` lines.
49
+ - When diagnosing validation errors, run `llman-sdd validate <spec> --strict` first for the structural gates (Gherkin / `@req` linkage / dual-write / req_id uniqueness); when `specs.check_command` is configured, validate executes that harness by default (`--no-check` skips it). Failing items are pinned down in the default TOON output's `items[].issues[]`; `--output human` prints `FAIL <item_type>/<id>` lines.
50
50
  5. Explore options and tradeoffs (2–3 options).
51
51
  6. Assess change scale to determine if full SDD is needed.
52
52
  7. When something crystallizes, offer to capture it (don't auto-write):
@@ -83,11 +83,11 @@ llman-sdd validate <change-id> --strict
83
83
  ```
84
84
  This MUST pass before proceeding; failing items are listed one by one in the validate output's `items[].issues[]` — fix each and re-run.
85
85
 
86
- ### 4a) Optional BDD runner (`bdd:` block)
87
- - Read `llmanspec/config.yaml`. Is there a `bdd:` block?
88
- - **Yes**: `bdd.run_command` declares the project's BDD execution entry; validate executes it by default when its target set includes specs (`--no-check` skips). Authoring follows 4b regardless.
89
- - **No**: if this change involves executable behavior scenarios (Given/When/Then the user will want to run), ask **once, up front** whether to enable a `bdd:` runner block (adds a `bdd:` block to `config.yaml` — runner only, does not change the lifecycle). If **yes**: show the exact `bdd:` block to add (pick a `run_command` matching the project's test framework — `cargo test --features bdd` for rstest-bdd, `pytest {feature_dir} -k {feature_name} -v` for pytest-bdd), let the user confirm or edit, write it to `config.yaml`, then proceed with 4b. If **no**: features still validate structurally; BDD execution responsibility stays with the project test suite.
90
- - **Do NOT silently add the `bdd:` block** — always ask first. Adding it declares the project-wide BDD execution entry.
86
+ ### 4a) Optional BDD runner (`specs:` block)
87
+ - Read `llmanspec/config.yaml`. Is there a `specs:` block?
88
+ - **Yes**: `specs.check_command` declares the project's BDD execution entry; validate executes it by default when its target set includes specs (`--no-check` skips). Authoring follows 4b regardless.
89
+ - **No**: if this change involves executable behavior scenarios (Given/When/Then the user will want to run), ask **once, up front** whether to enable a `specs:` verification runner block (adds a `specs:` block to `config.yaml` — runner only, does not change the lifecycle). If **yes**: show the exact `specs:` block to add (pick a `check_command` matching the project's test framework — `cargo test --features bdd` for rstest-bdd, `pytest {feature_dir} -k {feature_name} -v` for pytest-bdd), let the user confirm or edit, write it to `config.yaml`, then proceed with 4b. If **no**: features still validate structurally; BDD execution responsibility stays with the project test suite.
90
+ - **Do NOT silently add the `specs:` block** — always ask first. Adding it declares the project-wide BDD execution entry.
91
91
 
92
92
  ### 4b) Single-track feature authoring
93
93
  - Planning docs may briefly live on the default branch; **do not** edit `llmanspec/specs/**` on the default branch. After binding, landing specs and implementation happen on the bound branch.
@@ -12,12 +12,12 @@ Validate change/spec format and staleness.
12
12
  ## Steps
13
13
  1. Single item: `llman-sdd validate <id>`; batch: `llman-sdd validate --all` (or `--changes` / `--specs`); use `--strict` in CI/automation.
14
14
  2. On failure, summarize the errors and propose minimal, concrete fixes.
15
- {% if bdd_enabled %}
15
+ {% if specs_enabled %}
16
16
  3. **BDD checks**:
17
17
  - Validate `.feature` Gherkin and `@req` / dual-write gates on the **bound branch**; `.feature` is the harness authority — executable GWT lives only there.
18
18
  - Lifecycle gates: `change start` / `attach` (bind branch), `finalize` (close-out; auto commit `archive(sdd): <id>`, `--no-commit` to skip) / `diff` (read-only).
19
- - `llman-sdd validate --specs` enforces structural and contract gates; when `bdd.run_command` is configured it also executes that harness by default (`--no-check` skips it, `--check` is a compat alias); a placeholder-free command runs at most once per invocation.
20
- - `list --specs --json` shows `morphology` (ruleCount / ruleEnforcedCount / rulePendingCount / acceptanceCount / featureScenarioCount).
19
+ - `llman-sdd validate --specs` enforces structural and contract gates; when `specs.check_command` is configured it also executes that harness by default (`--no-check` skips it, `--check` is a compat alias); a placeholder-free command runs at most once per invocation.
20
+ - `list --specs --json` shows `morphology` (requirementCount / requirementBoundCount / requirementUnboundCount / acceptanceCount / featureScenarioCount).
21
21
  - Change JSON status fields: `stage` (draft/designed/planned/full) / `specsLanded` / `needsSpecsChange` / `readyToImplement` (`show --output json`).
22
22
  {% endif %}
23
23
 
@@ -26,7 +26,7 @@ flowchart LR
26
26
  - **Apply must be all-green first**: don't verify unimplemented changes.
27
27
  - **CRITICAL must be fixed**: zero CRITICAL before archive.
28
28
  - **Rerun the gates yourself**: MUST rerun `llman-sdd validate <id> --strict` (real harness) and the project gates; MUST NOT trust gate verdicts in the implementer's report — a mismatch is CRITICAL.
29
- - **`--no-check` is not evidence**: gate evidence obtained with `--no-check` → CRITICAL. Close-out runs the configured `bdd.run_command`, so do not run that command again just before close-out; the skip line printed by `--no-check` is not a pass.
29
+ - **`--no-check` is not evidence**: gate evidence obtained with `--no-check` → CRITICAL. Close-out runs the configured `specs.check_command`, so do not run that command again just before close-out; the skip line printed by `--no-check` is not a pass.
30
30
  - **Don't ask "should I continue?"**: run the full verification flow and output a complete report.
31
31
 
32
32
  {{ unit("skills/stage-guard") }}
@@ -34,7 +34,7 @@ flowchart LR
34
34
  ## Steps
35
35
  1. Select the change id (or ask the user to pick from `llman-sdd list --json`).
36
36
  2. Fast validation gate: `llman-sdd validate <id> --strict`.
37
- - When diagnosing structural issues (Gherkin parse / `@req` linkage / dual-write / req_id uniqueness), run the structural validation first (when `bdd.run_command` is configured, validate executes that harness by default — `--no-check` skips it; a harness failure lands as an ERROR on its spec item). Failing items are listed one by one in the default TOON output's `items[].issues[]` (`--output human` prints `FAIL <item_type>/<id>` lines above the `Totals` line).
37
+ - When diagnosing structural issues (Gherkin parse / `@req` linkage / dual-write / req_id uniqueness), run the structural validation first (when `specs.check_command` is configured, validate executes that harness by default — `--no-check` skips it; a harness failure lands as an ERROR on its spec item). Failing items are listed one by one in the default TOON output's `items[].issues[]` (`--output human` prints `FAIL <item_type>/<id>` lines above the `Totals` line).
38
38
  3. Read: `llmanspec/specs/**` (`<capability>.feature`, the single source of truth) on the branch, `proposal.md` and `design.md` (if present), `tasks.md`; ignore residual old docs under `changes/<id>/specs/`.
39
39
  4. **Dual-axis review (kept separate so neither masks the other)** — diff against `git diff <merge-base>...HEAD` (merge-base is COMPUTED via `git merge-base <local-default> HEAD`; the stored base_sha is audit-only and MUST NOT feed range math):
40
40
  - **Spec axis**: does the implementation satisfy the `规则:` block requirement statement (free-text description, judged by its semantics) and the nested `场景:` GWT steps? Missing/partial behaviors, wrong implementations, and scope creep not asked for by the spec → suggest minimal fixes or artifact updates. Check where before/after evidence (counts, baselines) was taken: it MUST be measured on the change branch (against the freshly computed merge-base); a value measured on the default branch is usually trivially the baseline and proves nothing.
@@ -55,13 +55,13 @@ flowchart LR
55
55
  | Middle Man (just delegates) | cut it, call direct |
56
56
  | Refused Bequest (subclass rejects most inheritance) | use composition |
57
57
  - The two axes may be reviewed in parallel (sub-agents); the report MUST present them separately, MUST NOT merge or cross-rerank (one axis passing must not mask the other failing).
58
- 5. **BDD verification** — only when `config.yaml` has a `bdd:` block:
58
+ 5. **BDD verification** — only when `config.yaml` has a `specs:` block:
59
59
  - Confirm the change is branch-bound and you are on that branch.
60
- - `llman-sdd validate --specs`: Gherkin + `@req`/dual-write gates; when `bdd.run_command` is configured the harness runs by default (`--no-check` skips it) and a failure maps to an ERROR on the matching spec item.
60
+ - `llman-sdd validate --specs`: Gherkin + `@req`/dual-write gates; when `specs.check_command` is configured the harness runs by default (`--no-check` skips it) and a failure maps to an ERROR on the matching spec item.
61
61
  - Optional read-only review: `llman-sdd change diff <id>` (or `--export-patch <path>`) — review/export only, never an apply step.
62
62
  - Next step after verify passes: `llman-sdd-archive` (not inline finalize here).
63
- {% if bdd_verify_prompt %}
64
- - Extra requirement: {{ bdd_verify_prompt }}
63
+ {% if specs_verify_prompt %}
64
+ - Extra requirement: {{ specs_verify_prompt }}
65
65
  {% endif %}
66
66
  6. Produce a short report: **CRITICAL** (must fix before archive) / **WARNING** (should fix) / **SUGGESTION** (nice to have).
67
67
  7. **Human review gate**: once the report has no CRITICAL findings and before suggesting archive, run `llman-sdd review`: exit code zero → suggest `llman-sdd-archive`; non-zero = CRITICAL → fix via `llman-sdd-apply`, then re-run review; MUST NOT enter finalize/archive with CRITICAL findings open.
@@ -76,7 +76,7 @@ flowchart LR
76
76
  - SDD 校验:`llman-sdd validate <id> --strict`
77
77
 
78
78
  **门禁证据**:
79
- - 收口会执行已配置的 `bdd.run_command`,收口前不必再跑一遍;`--no-check` 打出的跳过说明不是通过。
79
+ - 收口会执行已配置的 `specs.check_command`,收口前不必再跑一遍;`--no-check` 打出的跳过说明不是通过。
80
80
  - 门禁结论 MUST 来自真实 harness:MUST NOT 以 `--no-check` 取得「通过」;harness 失败 MUST 先查根因(环境变量泄漏、嵌套调用守卫、工作目录错误等),MUST NOT 以「固有/自指属性」定性后绕过。
81
81
  - 前后对比类判据(计数、基线)MUST 在 change 分支上测量(相对现算 merge-base);默认分支测得的值通常恒为基线,不构成证据。
82
82
  - 重构或批量替换类 task:MUST 对比改动前后测试用例数;门禁全绿但用例数下降视为失败。
@@ -46,7 +46,7 @@ flowchart LR
46
46
  - 决策回写:已解决的决策写进该 change 的 `proposal.md`「Open Questions」段。
47
47
  - 完成判据:每个待定决策都已解决或显式推迟。未触发时保持默认(问 1–3 个问题)。
48
48
  4. 涉及某个 change id 时,读 `llmanspec/changes/<id>/` 下的工件。
49
- - 诊断校验错误先跑 `llman-sdd validate <spec> --strict` 过结构门禁(Gherkin / `@req` 链接 / 双写 / req_id 唯一性);配置了 `bdd.run_command` 时 validate 缺省执行该 harness(`--no-check` 跳过)。失败项在缺省 TOON 输出的 `items[].issues[]` 逐条指明;`--output human` 输出人读 `FAIL <item_type>/<id>` 行。
49
+ - 诊断校验错误先跑 `llman-sdd validate <spec> --strict` 过结构门禁(Gherkin / `@req` 链接 / 双写 / req_id 唯一性);配置了 `specs.check_command` 时 validate 缺省执行该 harness(`--no-check` 跳过)。失败项在缺省 TOON 输出的 `items[].issues[]` 逐条指明;`--output human` 输出人读 `FAIL <item_type>/<id>` 行。
50
50
  5. 探索 2–3 个选项与权衡。
51
51
  6. 判断变更规模,确定是否走完整 SDD。
52
52
  7. 结论清晰时建议用户记录(勿自动写):
@@ -83,11 +83,11 @@ llman-sdd validate <change-id> --strict
83
83
  ```
84
84
  MUST 通过才能继续;失败项在 validate 输出的 `items[].issues[]` 逐条指明,按条修复后重跑。
85
85
 
86
- ### 4a) 可选 BDD runner(`bdd:` 段)
87
- - 读 `llmanspec/config.yaml` 是否含 `bdd:` 段:
88
- - **有**:`bdd.run_command` 是项目的 BDD 执行入口;validate 在目标集含 spec 时缺省执行它(`--no-check` 跳过)。撰写仍按 4b。
89
- - **无**:若本次 change 含可执行行为场景(用户会想运行的 Given/When/Then),**一次性前置**询问是否启用 `bdd:` runner 段(会向 `config.yaml` 加一个 `bdd:` 段——仅 runner,不改生命周期)。**是**:展示要加的精确 `bdd:` 段(`run_command` 选匹配项目测试框架的——rstest-bdd 用 `cargo test --features bdd`,pytest-bdd 用 `pytest {feature_dir} -k {feature_name} -v`),用户确认或修改后写入 `config.yaml`,再按 4b 继续。**否**:feature 仍做结构校验;BDD 执行责任始终在项目测试套件。
90
- - **MUST NOT 静默添加 `bdd:` 段**——总是先问。添加它会向全项目声明 BDD 执行入口。
86
+ ### 4a) 可选 BDD runner(`specs:` 段)
87
+ - 读 `llmanspec/config.yaml` 是否含 `specs:` 段:
88
+ - **有**:`specs.check_command` 是项目的 BDD 执行入口;validate 在目标集含 spec 时缺省执行它(`--no-check` 跳过)。撰写仍按 4b。
89
+ - **无**:若本次 change 含可执行行为场景(用户会想运行的 Given/When/Then),**一次性前置**询问是否启用 `specs:` 验证 runner 段(会向 `config.yaml` 加一个 `specs:` 段——仅 runner,不改生命周期)。**是**:展示要加的精确 `specs:` 段(`check_command` 选匹配项目测试框架的——rstest-bdd 用 `cargo test --features bdd`,pytest-bdd 用 `pytest {feature_dir} -k {feature_name} -v`),用户确认或修改后写入 `config.yaml`,再按 4b 继续。**否**:feature 仍做结构校验;BDD 执行责任始终在项目测试套件。
90
+ - **MUST NOT 静默添加 `specs:` 段**——总是先问。添加它会向全项目声明 BDD 执行入口。
91
91
 
92
92
  ### 4b) 单轨 feature 撰写
93
93
  - 规划文档可短暂留在默认分支;**不要**在默认分支编辑 `llmanspec/specs/**`。绑定分支后,落地 specs 与实现都在绑定分支上。
@@ -12,12 +12,12 @@ metadata:
12
12
  ## 步骤
13
13
  1. 单个:`llman-sdd validate <id>`;批量:`llman-sdd validate --all`(或 `--changes` / `--specs`);CI/自动化用 `--strict`。
14
14
  2. 校验失败时汇总错误,给出最小可执行的修复建议。
15
- {% if bdd_enabled %}
16
- 3. **BDD 校验**:
15
+ {% if specs_enabled %}
16
+ 3. **Spec 校验**:
17
17
  - 在**绑定分支**上验证 `.feature` Gherkin 与 `@req` / 双写门禁;`.feature` 是 harness 权威——可执行 GWT 只在其中维护。
18
18
  - 生命周期门禁:`change start` / `attach`(绑定分支)、`finalize`(收口;自动提交 `archive(sdd): <id>`,`--no-commit` 跳过)/ `diff`(只读)。
19
- - `llman-sdd validate --specs` 做结构与合约门禁;配置 `bdd.run_command` 时缺省执行该 harness(`--no-check` 跳过,`--check` 为兼容别名),无占位符的命令每次调用至多执行一次。
20
- - `list --specs --json` 查看 `morphology`(ruleCount / ruleEnforcedCount / rulePendingCount / acceptanceCount / featureScenarioCount)。
19
+ - `llman-sdd validate --specs` 做结构与合约门禁;配置 `specs.check_command` 时缺省执行该 harness(`--no-check` 跳过,`--check` 为兼容别名),无占位符的命令每次调用至多执行一次。
20
+ - `list --specs --json` 查看 `morphology`(requirementCount / requirementBoundCount / requirementUnboundCount / acceptanceCount / featureScenarioCount)。
21
21
  - change JSON 状态字段:`stage`(draft/designed/planned/full)/ `specsLanded` / `needsSpecsChange` / `readyToImplement`(`show --output json`)。
22
22
  {% endif %}
23
23
 
@@ -26,7 +26,7 @@ flowchart LR
26
26
  - **必须先 apply 全绿**:未完成实现的 change 跳过验证。
27
27
  - **CRITICAL 必须修复**:归档前清零。
28
28
  - **亲自复跑门禁**:MUST 亲自重跑 `llman-sdd validate <id> --strict`(真实 harness)与项目门禁,MUST NOT 采信实现者报告的门禁结论;复跑结果与报告不符 → CRITICAL。
29
- - **`--no-check` 不是证据**:以 `--no-check` 取得的门禁证据 → CRITICAL。收口会执行已配置的 `bdd.run_command`,收口前不必再跑一遍;`--no-check` 打出的跳过说明不是通过。
29
+ - **`--no-check` 不是证据**:以 `--no-check` 取得的门禁证据 → CRITICAL。收口会执行已配置的 `specs.check_command`,收口前不必再跑一遍;`--no-check` 打出的跳过说明不是通过。
30
30
  - **不要问「要不要继续」**:跑完整验证流程,输出完整报告。
31
31
 
32
32
  {{ unit("skills/stage-guard") }}
@@ -34,7 +34,7 @@ flowchart LR
34
34
  ## 步骤
35
35
  1. 确定 change id(不明确时让用户从 `llman-sdd list --json` 选)。
36
36
  2. 快速校验门禁:`llman-sdd validate <id> --strict`。
37
- - 诊断结构问题(Gherkin 解析 / `@req` 链接 / 双写 / req_id 唯一性)先跑结构校验(配置 `bdd.run_command` 时 validate 缺省执行该 harness,`--no-check` 跳过;harness 失败以 ERROR 落在对应 spec 条目)。失败项在缺省 TOON 输出的 `items[].issues[]` 逐条列出(`--output human` 输出 `FAIL <item_type>/<id>` 行,位于 `Totals` 上方)。
37
+ - 诊断结构问题(Gherkin 解析 / `@req` 链接 / 双写 / req_id 唯一性)先跑结构校验(配置 `specs.check_command` 时 validate 缺省执行该 harness,`--no-check` 跳过;harness 失败以 ERROR 落在对应 spec 条目)。失败项在缺省 TOON 输出的 `items[].issues[]` 逐条列出(`--output human` 输出 `FAIL <item_type>/<id>` 行,位于 `Totals` 上方)。
38
38
  3. 阅读:分支上的 `llmanspec/specs/**`(`<capability>.feature`,唯一事实来源)、`proposal.md` 与 `design.md`(如有)、`tasks.md`;`changes/<id>/specs/` 若有残留旧文档可忽略。
39
39
  4. **双轴审查(两轴分离,互不掩盖)**——对比 diff(`git diff <merge-base>...HEAD`,merge-base 现算 `git merge-base <本地默认分支> HEAD`;存储的 base_sha 仅审计、MUST NOT 参与范围计算):
40
40
  - **合约轴**:实现是否满足 `规则:` 块的需求表述(描述为自由文本,以其语义为准)与嵌套 `场景:` 的 GWT 步骤?缺失/部分实现、错误实现、spec 未要求的超范围改动 → 给最小修复建议或建议更新工件。前后对比类证据(计数、基线)核对测量位置:MUST 在 change 分支上测量(相对现算 merge-base);默认分支测得的值通常恒为基线,不构成证据。
@@ -55,13 +55,13 @@ flowchart LR
55
55
  | Middle Man(只转发) | 删掉直连 |
56
56
  | Refused Bequest(子类拒绝大部分继承) | 改组合 |
57
57
  - 两轴可并行(sub-agent)审查;报告 MUST 分离呈现,MUST NOT 合并或交叉重排(一轴通过不能掩盖另一轴失败)。
58
- 5. **BDD 验证**——仅当 `config.yaml` 含 `bdd:` 段:
58
+ 5. **Spec 验证**——仅当 `config.yaml` 含 `specs:` 段:
59
59
  - 确认 change 已绑定分支且当前在该分支上。
60
- - `llman-sdd validate --specs`:Gherkin + `@req`/双写门禁;配置 `bdd.run_command` 时缺省执行该 harness(`--no-check` 跳过),失败映射为对应 spec 条目的 ERROR。
60
+ - `llman-sdd validate --specs`:Gherkin + `@req`/双写门禁;配置 `specs.check_command` 时缺省执行该 harness(`--no-check` 跳过),失败映射为对应 spec 条目的 ERROR。
61
61
  - 可选只读审查:`llman-sdd change diff <id>`(或 `--export-patch <path>`)——仅审查/导出,绝不当作 apply 步骤。
62
62
  - verify 通过后下一步 `llman-sdd-archive`(勿在此 inline finalize)。
63
- {% if bdd_verify_prompt %}
64
- - 额外要求: {{ bdd_verify_prompt }}
63
+ {% if specs_verify_prompt %}
64
+ - 额外要求: {{ specs_verify_prompt }}
65
65
  {% endif %}
66
66
  6. 输出简短报告:**CRITICAL**(归档前必须修复)/ **WARNING**(建议修复)/ **SUGGESTION**(可选优化)。
67
67
  7. **人审关卡**:报告无 CRITICAL 后、建议归档前跑 `llman-sdd review`:退出码零 → 建议 `llman-sdd-archive`;非零 = CRITICAL → 用 `llman-sdd-apply` 修复后重跑 review;MUST NOT 带 CRITICAL 进入 finalize/archive。