dsh-harbor-evolution 0.7.2 → 0.7.3

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.
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: evolve-agent-with-harbor
3
- description: Architect, initialize, run, diagnose, compare, and safely improve a DeepSeek Harness business Agent with Harbor Trial Lifecycle, Score Validity, Evidence Provenance, Evaluation Stack, Context v2, Architecture Doctor, and explicit Promotion Gate. Use for Harbor setup, Agent self-evolution, vertical-search evaluation loops, running Job inspection, failed Trial diagnosis, Candidate optimization, evaluator governance or meta-evaluation, and promotion decisions.
3
+ description: Architect, initialize, run, diagnose, compare, and safely improve a DeepSeek Harness business Agent or Evaluator with Harbor. Use for low-friction Harbor setup, Agent self-evolution, vertical-search evaluation loops, running Job inspection, failed Trial diagnosis, Candidate optimization, evaluator governance, turning reviewed reports and natural-language scoring feedback into evaluator meta-evaluation data, or explicit promotion decisions.
4
4
  ---
5
5
 
6
6
  # Evolve Agent With Harbor
7
7
 
8
- Build a reproducible improvement loop around four concepts that users can describe in business language:
8
+ Build a maintainable, evidence-bearing improvement loop around four concepts that users can describe in business language. The DSH and Candidate ACP runtime follows the latest published release by default; record that policy honestly and do not block a Job on an older pinned runtime:
9
9
 
10
10
  - **评测集 (Dataset)** — what should be tested: one Query, a file, a directory of instructions, or an existing Harbor Dataset.
11
11
  - **生成器 (Generator)** — who produces the answer or artifact: a curl request, a local Agent entry, or an Agent already found in the workspace.
@@ -16,12 +16,23 @@ Keep these four names visible during onboarding and confirmation; they establish
16
16
 
17
17
  Treat Harbor as the experiment boundary. Deployment, CI/CD, and Champion replacement remain external actions requiring separate authority.
18
18
 
19
+ ## Keep the Generator model explicit
20
+
21
+ For a DSH/Cordis Generator, offer “使用当前 Harbor Agent 模型” as the default model choice. Explain that this creates a **model binding**, not a live pointer:
22
+
23
+ > 创建 Candidate 时会固定本次 `provider / model / reasoning`;之后切换聊天模型不会改写已经建立的 Candidate。
24
+
25
+ After the user accepts, call `harbor_model_binding` and write its `candidate_model_binding` output verbatim to `model-binding.json` before `harbor_candidate_snapshot`. Show the resolved provider/model in the confirmation card. The file contains identity only and becomes part of the Candidate digest.
26
+
27
+ The runtime must remain `dsh-host-broker` / `dsh-host-model-gateway/v1`: the Candidate receives a random, short-lived Job capability, never GPT Auth, Codex OAuth, an API key, or another Host credential. Do not add a provider credential, auth file path, or secret value to the Candidate, Dataset, Stack, Job, prompt, report, or tool arguments. A pinned Candidate that needs a different model must become a new Candidate version; do not override its binding in place.
28
+
19
29
  ## Select the narrowest mode
20
30
 
21
31
  - **Clarify**: identify the Dataset, Generator, Evaluator/criteria, and Optimizer with the least user effort.
22
32
  - **Architecture**: inspect role boundaries and run `harbor_evolution_doctor`.
23
33
  - **Initialize**: read `references/initialization.md`, compile the accepted four-concept card, then call `harbor_evolution_init`.
24
34
  - **Diagnostic**: investigate failures without making a promotion claim.
35
+ - **Quick diagnostic**: after confirmation, call `harbor_quick_diagnostic_init` for one Query plus a Rubric draft. It generates a Harbor 1.4 wiring project that reuses the current DSH model and is permanently marked non-promotable.
25
36
  - **Promotion**: run a `promotion-eligible` Job and apply the deterministic Gate.
26
37
  - **Evolve**: baseline → diagnose → one controlled change → regression Job → Gate.
27
38
  - **Meta-evaluate**: improve an Evaluator/Judge against independently maintained, provenance-bearing GT.
@@ -33,12 +44,12 @@ Do not turn an inspection or diagnostic request into Agent mutation or deploymen
33
44
 
34
45
  Inspect the current workspace before asking questions. Look for Agent entry files, package metadata, curl examples, Dataset instructions, existing Harbor configuration/Jobs, tests, and available Codex or Claude Code commands. Reuse reliable findings and say what was inferred; do not ask the user to transcribe information already present in files.
35
46
 
36
- When no Harbor workspace exists, propose `./harbor-evolution/` under the current session working directory as the managed evaluation workspace. Agent-facing Harbor Tools derive `projectRoot` from the calling session for every invocation and keep imported snapshots and generated evaluation files inside that request-local root. Treat the Plugin's configured `projectRoot` only as the Web Workbench and non-Agent fallback; do not block initialization merely because it differs from the current session working directory.
47
+ When no Harbor workspace exists, propose `./harbor-evolution/` under the current session working directory as the managed evaluation workspace. Agent-facing Harbor Tools derive `projectRoot` from the calling session for every invocation and keep imported snapshots and generated evaluation files inside that request-local root. Every Harbor Tool call also activates that Session root for the Web Workbench; the Plugin's configured `projectRoot` is only the startup/manual fallback. Do not block initialization merely because the fallback differs from the current session working directory.
37
48
 
38
49
  Ask only for missing parts of the four-concept intake, using the user's language and short examples:
39
50
 
40
51
  1. **评测集:测什么?** Accept one Query, a file path, a directory containing multiple instructions, or an existing Dataset path.
41
- 2. **生成器:谁来回答?** Accept a curl request or a local Agent file/directory. Offer an Agent entry discovered in the workspace instead of asking again.
52
+ 2. **生成器:谁来回答?** Accept a curl request or a local Agent file/directory. For a DSH/Cordis Agent, offer “使用当前 Harbor Agent 模型” alongside a discovered entry; resolve it with `harbor_model_binding` only after the user agrees.
42
53
  3. **评测器(评测标准):怎样算好?** Accept an evaluator curl request, a local evaluator path, or “请你生成”. If no evaluator exists, ask only for natural-language criteria and draft a versioned evaluator plus Rubric for confirmation.
43
54
  4. **优化器:谁根据结果改进?** Default to the current Agent. If Codex CLI or Claude Code is available, present it as an optional alternative; also accept a local command or Agent path.
44
55
 
@@ -65,8 +76,12 @@ Before creating files, show one confirmation card:
65
76
  - 暂不启用:<holdout / formal promotion Gate / deployment, when unresolved>
66
77
  ```
67
78
 
79
+ When model binding is selected, render the Generator row as `<local Agent> · <provider>/<model>(已固定)`. Never show credential locations or values.
80
+
68
81
  Offer three next actions in natural language: **开始初始化**, **修改以上内容**, or **查看高级配置**. Call `harbor_evolution_init` only after the user accepts the card. Generate internal ids and initial versions from the workspace/project identity, use `reward`/`maximize` as a visible draft when the criteria imply quality scoring, and do not use the generated Policy for a `promotion-eligible` Job until real business thresholds are accepted.
69
82
 
83
+ For a single-Query wiring check, call `harbor_quick_diagnostic_init` after confirmation. State before and after the call that its score proves only Candidate → Harbor → verifier connectivity: the supplied Rubric is saved as a draft but is not executed. Never use its Job as a Baseline or pass it to Gate.
84
+
70
85
  Ask advanced questions just in time:
71
86
 
72
87
  - Ask for holdout boundaries and side-effect constraints before they can affect a real run.
@@ -81,7 +96,7 @@ Never invent GT labels, business thresholds, credentials, production side-effect
81
96
  Require these before every Job:
82
97
 
83
98
  - `candidate-manifest.json` verified against the Candidate files.
84
- - `dataset-manifest.json` with unique task ids, non-empty instructions, safe paths, and a matching source digest.
99
+ - `dataset-manifest.json` with unique task ids, non-empty instructions, safe paths, a matching source digest, and the same Task population that Harbor resolves at runtime. A local Dataset contains immediate Task child directories; each Task uses `schema_version = "1.4"`, `[task].name = "org/name"`, `instruction.md`, `environment/`, and `tests/test.sh`.
85
100
  - `.harbor/evaluation-stack.yml` with all eight roles, Judge identity, and Evaluation Contract.
86
101
  - Evaluation Context v2 preview.
87
102
 
@@ -105,6 +120,8 @@ Keep Runner orchestration-only. Treat these as architecture errors:
105
120
 
106
121
  Read `references/initialization.md` when required files are missing. Translate the accepted four-concept card into strict internal identities and call `harbor_evolution_init`; do not send the user back a second architecture questionnaire. It preserves existing files and creates explicit placeholders that still require business implementation.
107
122
 
123
+ If `.harbor/evaluation-stack.yml` exists with another `stack_id`, do not report initialization success. Explain `STACK_ALREADY_EXISTS_DIFFERENT_ID` and choose an accepted `workspaceSubdir` so independent Harbor projects can coexist. Never overwrite or silently preserve a different Stack identity.
124
+
108
125
  After initialization:
109
126
 
110
127
  - Replace placeholders with real role implementations.
@@ -122,7 +139,7 @@ A fresh baseline is required when any of these change:
122
139
  - Integration, Renderer, Evaluator, or Rubric identity.
123
140
  - Judge provider, model, version, or parameters.
124
141
  - Runner marked `semantic: true`.
125
- - Harbor or integration runtime identity.
142
+ - Harbor or Adapter integration identity. DSH and Candidate ACP themselves follow `latest`; do not reject a Job for an older pinned rc. If latest-runtime drift plausibly changes behavior, recommend a fresh baseline on the current latest runtime instead of restoring and maintaining the old runtime.
126
143
 
127
144
  Diagnoser, Optimizer, Reporter, and non-semantic Runner changes remain comparable but change the full audit digest. A Candidate digest must differ from the baseline Candidate digest. Promotion Policy is reapplied as a separately versioned decision contract; changing it does not rewrite Evaluation Context.
128
145
 
@@ -163,6 +180,26 @@ Use the formal terminal states precisely:
163
180
 
164
181
  For retry or resume, retain the old attempt and create a new attempt. Never replace an assessment or event history in place.
165
182
 
183
+ ### Synthesize one Dataset-level recommendation
184
+
185
+ When the user opens an evaluation report or asks what to improve, do not stop at aggregate metrics and do not merely repeat per-Trial recommendations. The current Agent acting as Optimizer must synthesize one concrete **评测集整体优化建议** from the complete Dataset evidence. This synthesis is non-reward-affecting Optimizer output, not a new Evaluator score and not a recommendation invented on behalf of the Evaluator.
186
+
187
+ 1. Inspect all Trial assessments, including every server-side page. Never infer a Dataset conclusion from only the first page, selected badcases, or the lowest score.
188
+ 2. Confirm terminal-state and valid-score coverage first. Keep infrastructure and evaluation errors outside Candidate-quality patterns. If coverage is insufficient, say that a trustworthy business optimization recommendation cannot yet be made and recommend repairing the owning evaluation layer.
189
+ 3. Group valid results by Criterion, recurring reason/recommendation, Query or population slice. Report the affected count as `N / valid Trials`, distinguish repeated patterns from isolated cases, and identify representative Trial ids or instructions.
190
+ 4. Read the corresponding generated artifacts before assigning ownership. Choose the highest-leverage repeated weakness that is Candidate-owned; do not optimize the Candidate around a Dataset, Evaluator, Rubric, Judge, Renderer, or infrastructure defect.
191
+ 5. Produce one prioritized recommendation with this user-facing shape:
192
+
193
+ ```text
194
+ 评测集整体结论:<what is already reliable and the dominant weakness>
195
+ 关键证据:<Criterion and score distribution; N/M affected; representative Trials>
196
+ 优先优化建议:<one specific Candidate behavior or implementation change>
197
+ 预期效果:<which metric/pattern should improve and what must not regress>
198
+ 验证方式:<same Dataset/Context regression Job; protected metrics and rollback condition>
199
+ ```
200
+
201
+ Base the recommendation on the Evaluator's recorded scores, reasons, recommendations, and the actual Candidate artifacts. Do not invent missing reasons, average incompatible Criteria, or present correlation as a proven root cause. If the evidence supports several changes, rank them but recommend only one controlled next experiment. If the user accepts it, translate it into an `optimization-report/v2`-compatible hypothesis with evidence refs, mutation and forbidden surfaces, guardrails, rollback condition, and a comparable next Job before changing the Candidate.
202
+
166
203
  ### Propose one controlled change
167
204
 
168
205
  Require every optimization hypothesis to include:
@@ -202,8 +239,40 @@ Saving a new identity does not automatically launch an evaluation or Gate.
202
239
 
203
240
  An Evaluator implementation must use `harbor-dsh-evaluator/v1`. It may declare `kind=script` or `kind=llm-as-judge`, but both kinds accept `evaluation-input/v1` and return `evaluation-result/v1`. Every Descriptor-declared Criterion must return its declared score plus a non-empty `reason` string and a non-empty `recommendation` string. Missing explanations or recommendations invalidate the evaluator result; Reporter must not invent them. Use `harbor_evaluator_inspect` before proposing a change. After the user approves, use `harbor_evaluator_update` only for an exact `editable_files` path and provide the current digest plus new Evaluator and Stack versions. The tool creates a new versioned bundle; it does not overwrite the old implementation, run meta-evaluation, establish a baseline, or invoke Gate.
204
241
 
242
+ The Task verifier must write `/logs/verifier/evaluation-result.json`; `reward.json` alone is not a valid `harbor-dsh-evaluator/v1` result. Summary and Trial views must use the same validity decision.
243
+
244
+ ## Explain failures with the next action
245
+
246
+ Use the structured diagnostic tail returned by `harbor_eval_run`; never answer with only an exit code. Redact credentials and map common signatures:
247
+
248
+ - `AgentSetupTimeoutError` → use an image with Python, curl, Node.js, npm, `stdbuf`, ACP, and DSH dependencies preinstalled.
249
+ - `evaluation-result.json is missing` → fix the Task verifier to emit `evaluation-result/v1` with reasons and recommendations.
250
+ - `Either datasets or tasks must be provided` / `HARBOR_RUNTIME_NO_TASKS` → repair the Dataset's immediate Harbor 1.4 Task structure and re-snapshot it.
251
+ - `docker-credential-*` → repair the configured helper or use a verified local base image.
252
+
253
+ Rerun `harbor_dataset_validate` and `harbor_evolution_doctor` before retrying. Preserve the failed Job as evidence; do not mutate it in place.
254
+
205
255
  ## Handle evaluator meta-evaluation
206
256
 
257
+ Read `references/evaluator-upgrade.md` before handling reviewed reports, expert comments, scoring notes, evaluator calibration, or meta-evaluation. Keep protocol names out of the initial user interaction.
258
+
259
+ Start from evidence the user already has. Ask only:
260
+
261
+ > 请提供一些已经被评价过的报告,以及对应的评分、问题或修改建议。你可以直接粘贴文本,也可以提供文件或目录路径。我会整理成评测器元评测集,并只请你确认有歧义的评分。
262
+
263
+ Accept one report, several pasted report/review pairs, or a directory. Do not initially ask the user for GT JSON, Criterion ids, provenance fields, repeat policy, Evaluator identity, or meta-metric thresholds. Inspect the active Rubric and infer stable internal ids and versions after understanding the material.
264
+
265
+ For every report/review pair:
266
+
267
+ 1. Preserve the original report and review as source evidence. Never replace them with only the normalized JSON.
268
+ 2. Extract Criterion, score, reason, any reviewer-provided recommendation, and the exact review excerpt supporting the extraction.
269
+ 3. Mark each extracted decision internally as `explicit`, `inferred`, or `unresolved`.
270
+ 4. Map a natural-language judgment to the active score scale only when the Rubric makes the mapping defensible. Treat the mapped value as a draft, not confirmed GT.
271
+ 5. Show one compact table with report, Criterion, proposed score, reason, recommendation, and status. Ask only targeted questions for `inferred` or `unresolved` rows.
272
+ 6. Create formal GT only after the user confirms the draft. Never silently fill a missing score, reason, source, or independence claim. A missing reviewer recommendation may remain empty and must not be attributed to the reviewer.
273
+
274
+ Use plain language in the confirmation. Say “标准评分” instead of `ground-truth/v1`, “评测器重复评分” instead of `evaluator-observations/v1`, and “评测器可靠性报告” instead of `meta-evaluation-report/v1`. Protocol names may appear later in an audit or advanced view.
275
+
207
276
  Rotate roles when improving the Evaluator:
208
277
 
209
278
  - Candidate is the Evaluator/Rubric/Judge version.
@@ -213,7 +282,11 @@ Rotate roles when improving the Evaluator:
213
282
 
214
283
  GT may be human, programmatic, consensus-based, produced by an independently pinned model, or imported from an external standard. Independence and provenance matter more than the author type. The Candidate evaluator must never see labels before producing its observation.
215
284
 
216
- When GT is missing, clarify its id/version, source kind, owner, provenance, Criteria, case selection, and adjudication process. Then call `harbor_ground_truth_init`; it creates a non-overwriting draft and never invents cases or labels. After cases are populated, collect repeated `evaluator-observations/v1` and call `harbor_evaluator_meta_evaluate`. Report ESF, SCE, RCR, coverage, disagreement slices, latency, and cost as applicable.
285
+ After confirmation, infer a readable GT id/version, source kind, provenance, Criteria, case ids, and initial weights from the accepted material. Show any consequential inference. Call `harbor_ground_truth_init`; it creates a non-overwriting draft and never invents cases or labels. Populate the draft from confirmed rows using ordinary safe file operations, keeping artifact references inside the request-local project root.
286
+
287
+ Treat one reviewed report as a diagnostic calibration example, not evidence that an Evaluator is generally reliable. With enough cases, propose a tuning/holdout split without burdening the user with the terminology: explain that one group helps improve the Evaluator and an untouched group checks whether the improvement generalizes. Never expose holdout labels to the Candidate evaluator or use its own prior output as GT.
288
+
289
+ After cases are populated, run the same Evaluator repeatedly on the fixed reports, collect `evaluator-observations/v1`, and call `harbor_evaluator_meta_evaluate`. The user should not have to hand-author either JSON file. Report ESF, SCE, RCR, coverage, disagreement slices, latency, and cost as applicable, then translate them back into direct conclusions: missed problems, false alarms, unstable judgments, and the smallest justified Evaluator/Rubric change.
217
290
 
218
291
  Manage evaluator Candidates and meta-evaluation Jobs with the same Manifest, Context v2, Doctor, evidence, and Gate rules.
219
292
 
@@ -227,6 +300,7 @@ Return:
227
300
  - Metric deltas, exception counts, Population groups, and artifact validation.
228
301
  - Dataset coverage, terminal-state counts, valid/invalid score counts, and selected attempt policy.
229
302
  - Representative Trial evidence and root-cause classes.
303
+ - One Dataset-level overall conclusion and one prioritized, evidence-linked optimization recommendation; explicitly state when score validity or coverage is insufficient for one.
230
304
  - Evidence provenance and any capability unavailable on a legacy Job.
231
305
  - Controlled change hypothesis and mutation surface.
232
306
  - Gate decision with exact reason codes.
@@ -36,13 +36,58 @@
36
36
  },
37
37
  {
38
38
  "id": 4,
39
- "prompt": "当前 Session 工作目录是 /Users/mac/Documents/Harness,但 Harbor Plugin 配置里显示的 projectRoot 是 /Users/mac/Library/Application Support/XiaoHui Harness/workspace。请在当前项目下初始化 ./harbor-evolution。",
40
- "expected_output": "把当前 Session 工作目录作为 Agent Tool 的项目根目录,继续准备 /Users/mac/Documents/Harness/harbor-evolution 的初始化确认卡;说明配置值只供 Web Workbench 或非 Agent 场景回退使用,不要求修改配置,也不因路径不同而拒绝初始化。",
39
+ "prompt": "当前 Session 工作目录是 /workspace/business-agent,但 Harbor Plugin 配置里显示的 projectRoot 是 /workspace/default。请在当前项目下初始化 ./harbor-evolution。",
40
+ "expected_output": "把当前 Session 工作目录作为 Agent Tool 的项目根目录,继续准备 /workspace/business-agent/harbor-evolution 的初始化确认卡;说明配置值只供 Web Workbench 或非 Agent 场景回退使用,不要求修改配置,也不因路径不同而拒绝初始化。",
41
41
  "files": [],
42
42
  "assertions": [
43
43
  "The response treats the calling session working directory as the Agent Tool project root.",
44
44
  "The response does not block initialization or require a projectRoot configuration change because the fallback differs.",
45
- "The proposed managed workspace stays under /Users/mac/Documents/Harness."
45
+ "The proposed managed workspace stays under /workspace/business-agent."
46
+ ]
47
+ },
48
+ {
49
+ "id": 5,
50
+ "prompt": "生成器用本机 DSH Agent,我希望它固定使用当前 Harbor Agent 的 GPT Auth 模型,不要把登录信息放进 Candidate。",
51
+ "expected_output": "把同模型解释为固定的 Candidate model binding;确认后调用 harbor_model_binding 取得非敏感 provider/model/reasoning,写入 model-binding.json,并说明运行仍通过短期 dsh-host-broker Capability,Host OAuth 文件不会进入容器或 Harbor 产物。",
52
+ "files": [],
53
+ "assertions": [
54
+ "The response offers the current Harbor Agent model as an explicit Generator choice and snapshots it instead of live-following later model changes.",
55
+ "The response keeps Host authentication outside the Candidate and uses the short-lived Host Model Broker capability.",
56
+ "The response requires a new Candidate identity instead of overriding a pinned model binding in place."
57
+ ]
58
+ },
59
+ {
60
+ "id": 6,
61
+ "prompt": "我想提升 DeepResearch 的评测器。这里有一份 report.md,专家的评价是:基本回答了问题,但没有解释颜色和光的关系,回应问题 0.5;表达平淡、没有例子,有趣性 0.5;引用了不存在的资料,引用规范性 0。建议补充形成机制并核对所有引用。帮我做元评测。",
62
+ "expected_output": "读取报告和当前 Rubric,把专家自然语言评价解析为评分、原因与建议的简洁确认表,保留原始评价并标明哪些值是明确给出、推断或待确认;不要求用户编写 GT/Observation JSON,且说明单个样本只能用于诊断校准。",
63
+ "files": [],
64
+ "assertions": [
65
+ "The response accepts the report and natural-language review as the user-facing meta-evaluation input without requesting JSON schemas or protocol fields.",
66
+ "The response presents or proposes a compact confirmation of scores, reasons, recommendations, and extraction status while preserving the raw review as provenance.",
67
+ "The response classifies a single reviewed report as diagnostic evidence rather than sufficient evaluator promotion evidence."
68
+ ]
69
+ },
70
+ {
71
+ "id": 7,
72
+ "prompt": "./reviewed-reports 里有十份报告和对应的专家评语,但有些评语只写了‘引用有问题’或者‘基本可用’,没有结构化分数。请用这些材料校准评测器。",
73
+ "expected_output": "先检查目录配对和当前 Rubric,根据评分标准形成带 explicit/inferred/unresolved 状态的草稿;只对有歧义的映射提出合并后的短问题,用户确认后再生成严格元评测数据,并建议保留未参与调优的一组报告验证泛化。",
74
+ "files": [],
75
+ "assertions": [
76
+ "The response inspects and pairs existing files before asking the user to transcribe their contents.",
77
+ "The response does not silently convert vague comments into confirmed scores and asks only targeted questions for inferred or unresolved mappings.",
78
+ "The response proposes a tuning versus untouched validation split in plain language and keeps labels hidden from the Candidate evaluator."
79
+ ]
80
+ },
81
+ {
82
+ "id": 8,
83
+ "prompt": "这个 DeepResearch Job 已经跑完 10 个任务。回应问题大多是 1,但引用规范性有 6 个 0.5、2 个 0,低分主要出现在需要多来源交叉验证的问题。请基于整个评测集告诉我下一步最值得做什么,不要逐条复述。",
84
+ "expected_output": "读取全部 Trial 与产物后,归纳为评测集级整体结论:用受影响数量、评分维度和代表性样本支撑一条优先的 Candidate 优化建议,说明预期效果、保护指标、回归验证和回滚条件;不把建议写成新的 Evaluator 分数或直接执行改动。",
85
+ "files": [],
86
+ "assertions": [
87
+ "The response synthesizes one Dataset-level conclusion from all Trial pages instead of repeating Trial recommendations or relying on selected badcases.",
88
+ "The response quantifies the recurring citation weakness and cites representative Trial evidence before assigning it to the Candidate.",
89
+ "The response proposes one specific controlled optimization with expected metric effect, protected metrics, comparable regression validation, and a rollback condition.",
90
+ "The response treats the synthesis as non-reward Optimizer guidance and does not mutate the Candidate or claim promotion without user approval."
46
91
  ]
47
92
  }
48
93
  ]
@@ -14,6 +14,35 @@ Inspect `harbor_eval_result view=governance` and representative Trial evidence f
14
14
 
15
15
  Do not use the Candidate Agent to author its own GT. Do not infer GT from the current Evaluator output.
16
16
 
17
+ ## Ingest reviewed reports in the user's language
18
+
19
+ Prefer evidence the user already has over a schema questionnaire. Accept:
20
+
21
+ - a pasted report followed by a pasted score, review, or recommendation;
22
+ - report and review file paths;
23
+ - a directory containing several report/review pairs;
24
+ - an exported table or document whose rows can be traced back to individual reports.
25
+
26
+ Ask for missing report/review pairing only when it cannot be inferred safely. Query text, source material, citations, and execution traces are useful context but optional unless the active Rubric needs them.
27
+
28
+ Preserve the raw report and raw review before normalization. Build a review draft with one row per report and Criterion:
29
+
30
+ | Field | Rule |
31
+ | --- | --- |
32
+ | Report | Stable case label and source path or pasted-input reference |
33
+ | Criterion | Map to the active Rubric; propose a new Criterion only when the review clearly introduces a distinct standard |
34
+ | Score | Preserve an explicit score; otherwise infer only through the accepted Rubric scale |
35
+ | Reason | Extract the reviewer's stated basis without strengthening it |
36
+ | Recommendation | Preserve the reviewer's suggestion; if absent, leave it empty rather than inventing expert intent. It does not block a confirmed scoring label |
37
+ | Evidence | Keep the shortest exact source excerpt that supports the normalized row |
38
+ | Status | `explicit`, `inferred`, or `unresolved` |
39
+
40
+ Show this draft in plain language. Do not mention protocol fields in the first confirmation. Ask a targeted question such as “这里更接近部分满足(0.5),还是完全不满足(0)?” instead of asking the user to edit JSON. Combine all unresolved rows into one short confirmation when possible.
41
+
42
+ Only confirmed rows may become formal GT. Preserve the raw material alongside the normalized case so later reviewers can audit whether the Agent translated the text correctly. Record who or what produced the review, when available. If the reviewer source is unknown, state that provenance remains unresolved and keep the Dataset diagnostic-only.
43
+
44
+ One reviewed report is useful for wiring and discussion but cannot establish general reliability. When several examples exist, keep representative normal cases and historical failures, and reserve an untouched group for final comparison. The Optimizer may learn from the tuning group; neither the Candidate evaluator nor the Optimizer may see holdout labels before the final measurement.
45
+
17
46
  ## Create a new immutable evaluator identity
18
47
 
19
48
  Show the current identity, source, proposed diff, and expected semantic impact. Create new files and increment component plus Evaluation Stack versions. Never edit a historical Evaluator, Rubric, Judge identity, or old Job artifact in place.
@@ -49,6 +78,8 @@ Use the same GT set, repeat policy, and measurement procedure for old and new ev
49
78
 
50
79
  GT is not synonymous with human labeling. It may be human, programmatic, consensus-based, produced by a separately pinned model, or imported from an external standard. Require explicit provenance and independence from the Candidate evaluator in every case. Use `harbor_ground_truth_init` to create the versioned draft and `harbor_evaluator_meta_evaluate` to calculate ESF, SCE, and RCR from repeated observations.
51
80
 
81
+ The user supplies reports and review evidence; the Agent performs the protocol adaptation. Do not ask the user to hand-author `ground-truth/v1` or `evaluator-observations/v1`. After confirmation, generate the strict files, validate them, run repeated Evaluator observations, and retain a reversible mapping from every normalized field to its raw source.
82
+
52
83
  ## Re-baseline Agent progress
53
84
 
54
85
  After the evaluator Candidate passes its explicit Gate:
@@ -9,7 +9,7 @@ Keep onboarding anchored on four visible concepts:
9
9
  | User concept | Plain-language prompt | Accepted input | Compiled architecture |
10
10
  | --- | --- | --- | --- |
11
11
  | 评测集 (Dataset) | 测什么? | One Query, file, instruction directory, or Dataset | Dataset tasks, manifest, population, diagnostic/regression mode |
12
- | 生成器 (Generator) | 谁来回答? | curl or local/detected Agent | Candidate snapshot, Integration, Renderer, runtime identity |
12
+ | 生成器 (Generator) | 谁来回答? | curl, local/detected Agent, or “使用当前 Harbor Agent 模型” | Candidate snapshot, Integration, Renderer, runtime identity, and optional pinned model binding |
13
13
  | 评测器(评测标准) (Evaluator) | 怎样算好? | evaluator curl/path, or natural-language criteria | Evaluator, Rubric, Judge identity, Evaluation Contract |
14
14
  | 优化器 (Optimizer) | 谁根据结果改进? | current Agent, Codex, Claude Code, or local command | Optimizer identity, mutation surface, rollback workflow |
15
15
 
@@ -17,6 +17,8 @@ Inspect first and prefill everything reliable. Ask only about missing rows. Use
17
17
 
18
18
  Before any write, show the four rows plus inferred workspace, diagnostic/promotion scope, and deferred capabilities. The user may start initialization, modify the card, or open advanced configuration.
19
19
 
20
+ When the accepted Generator is “使用当前 Harbor Agent 模型”, call `harbor_model_binding` after confirmation. Write the returned `candidate_model_binding` as `model-binding.json` before Candidate snapshot. The binding is immutable Candidate identity; runtime access still uses the per-Job Host Model Broker and its short-lived capability. Never write authentication material or a Host auth-file path into the Candidate directory.
21
+
20
22
  ## Internal compilation worksheet
21
23
 
22
24
  The Agent, not the user, compiles the accepted concept card into the strict `harbor_evolution_init` arguments:
@@ -24,6 +26,7 @@ The Agent, not the user, compiles the accepted concept card into the strict `har
24
26
  | Field | Required meaning |
25
27
  | --- | --- |
26
28
  | `datasetPath` | Existing Harbor Dataset inside `projectRoot` |
29
+ | `workspaceSubdir` | Optional namespace for an independent Stack; use it when another Stack already owns the root `.harbor/` |
27
30
  | `stackId` / `stackVersion` | Stable identity of the complete evaluation architecture |
28
31
  | `datasetId` / `datasetVersion` | Stable identity of task population and GT boundary |
29
32
  | `contractId` / `contractVersion` | Stable metric semantics |
@@ -59,7 +62,7 @@ projectRoot/
59
62
  └── jobs/
60
63
  ```
61
64
 
62
- The initializer never overwrites existing files. `created` and `preserved` in its result are part of the audit. Placeholder components provide identities, not a finished business evaluator.
65
+ The initializer never overwrites existing files. `created` and `preserved` in its result are part of the audit. If an existing Stack has a different id, initialization fails with `STACK_ALREADY_EXISTS_DIFFERENT_ID`; choose a separate `workspaceSubdir`. Placeholder components provide identities, not a finished business evaluator.
63
66
 
64
67
  ## Evaluation Stack shape
65
68
 
@@ -111,6 +114,10 @@ Keep `dataset-manifest.json` at Dataset root. Generate it through initialization
111
114
  - Missing/out-of-root paths or symlinks.
112
115
  - Source/file counts that no longer match.
113
116
  - Secret-bearing metadata fields.
117
+ - A Task at the Dataset root, a deeply nested Task, or any manifest Task Harbor cannot resolve as an immediate child directory.
118
+ - Missing Harbor 1.4 identity (`schema_version = "1.4"` and `[task].name = "org/name"`).
119
+
120
+ When the user only needs a first wiring check, `harbor_quick_diagnostic_init` creates this standard structure plus a minimal Host-model Candidate. It is explicitly `promotion_eligible=false`: its verifier proves execution reached Harbor but does not apply the saved business Rubric draft.
114
121
 
115
122
  Intentional Dataset changes require a new Dataset version, a new snapshot, and a fresh baseline.
116
123