dsh-harbor-evolution 0.4.0 → 0.5.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.
@@ -1,127 +1,154 @@
1
1
  ---
2
2
  name: evolve-agent-with-harbor
3
- description: Initialize, evaluate, compare, and safely improve a DeepSeek Harness Agent with Harbor. Use when the user asks to set up Harbor evaluation or Agent self-evolution, clarify an evaluation contract, create a Candidate, Dataset, or Promotion Policy, investigate a failed Job, or decide whether a Candidate should replace a baseline.
3
+ description: Architect, initialize, diagnose, evaluate, compare, and safely improve a DeepSeek Harness business Agent with Harbor Evaluation Stack, Dataset Manifest, Context v2, Architecture Doctor, and Promotion Gate. Use for Harbor setup, Agent self-evolution, vertical-search evaluation loops, evaluation architecture review, failed Job diagnosis, Candidate optimization, evaluator meta-evaluation, or promotion decisions.
4
4
  ---
5
5
 
6
6
  # Evolve Agent With Harbor
7
7
 
8
- Turn a vague improvement request into a reproducible evaluation contract, immutable Candidates, comparable Harbor Jobs, and an auditable promotion recommendation. Treat Harbor as the experiment boundary; deployment remains outside this workflow.
8
+ Build a reproducible improvement loop around three boundaries:
9
9
 
10
- ## Choose the operating mode
10
+ - **Generator/Candidate**: the immutable DSH Agent composition being improved.
11
+ - **Evaluator/Evaluation Stack**: Integration, Renderer, Evaluator, Rubric, Diagnoser, Optimizer, Runner, Reporter, and Judge identities.
12
+ - **Optimizer**: proposes one evidence-linked Candidate change; it never controls the final Gate.
11
13
 
12
- Infer the narrowest mode that satisfies the request:
14
+ Treat Harbor as the experiment boundary. Deployment, CI/CD, and Champion replacement remain external actions requiring separate authority.
13
15
 
14
- - **Clarify**: define what progress means and what may change.
15
- - **Initialize**: create the missing Candidate, Dataset, and Promotion Policy structure.
16
- - **Evaluate**: snapshot and run one Candidate.
17
- - **Compare**: compare an existing baseline Job with a new Candidate Job.
18
- - **Evolve**: run the complete baseline, diagnosis, controlled change, regression, and gate loop.
19
- - **Meta-evaluate**: optimize a Verifier or Judge against human ground truth rather than optimizing the business Agent.
16
+ ## Select the narrowest mode
20
17
 
21
- Do not expand an evaluate-only request into code mutation or deployment.
18
+ - **Clarify**: define progress, identities, constraints, and promotion ownership.
19
+ - **Architecture**: inspect role boundaries and run `harbor_evolution_doctor`.
20
+ - **Initialize**: read `references/initialization.md`, obtain explicit values, then call `harbor_evolution_init`.
21
+ - **Diagnostic**: investigate failures without making a promotion claim.
22
+ - **Promotion**: run a `promotion-eligible` Job and apply the deterministic Gate.
23
+ - **Evolve**: baseline → diagnose → one controlled change → regression Job → Gate.
24
+ - **Meta-evaluate**: improve an Evaluator/Judge against independently maintained human GT.
22
25
 
23
- ## Clarify the evaluation contract
26
+ Do not turn an inspection or diagnostic request into Agent mutation or deployment.
24
27
 
25
- Inspect the workspace and existing configuration before asking questions. Summarize known values, then resolve only material gaps. Prefer no more than three grouped questions in one turn.
28
+ ## Clarify before initializing
26
29
 
27
- Establish these fields:
30
+ Inspect the workspace first. Resolve only material gaps, preferably in no more than three grouped questions. Obtain:
28
31
 
29
- 1. Business behavior and the failure being improved.
30
- 2. Candidate path and stable Agent product identity.
31
- 3. Harbor Dataset path, test population, and environment constraints.
32
- 4. Primary metric, minimum metrics, non-regression metrics, and tolerances.
33
- 5. Baseline Candidate or baseline Job.
34
- 6. Allowed mutation surface, forbidden files, and side-effect boundaries.
35
- 7. Run budget, repeat policy for stochastic Agents, and stopping condition.
36
- 8. Promotion owner and external CI/CD boundary.
32
+ 1. Business behavior, failure pattern, and Candidate path/product identity.
33
+ 2. Dataset path/id/version, task population, holdout boundary, and side-effect sandbox.
34
+ 3. Evaluation Stack id/version and one entry for every required role.
35
+ 4. Judge provider/model/version/parameters without credentials.
36
+ 5. Evaluation Contract id/version, primary metric and direction, diagnostic metrics, groups, and hard requirements.
37
+ 6. Promotion Policy id/version, delta, minimums, maximums, non-regression metrics, and metric directions.
38
+ 7. Baseline Job/Candidate, repeat policy, run budget, stopping rule, allowed mutation surface, and forbidden files.
39
+ 8. Promotion owner and external CI/CD handoff.
37
40
 
38
- Candidate and Dataset paths are hard blockers for a run. Baseline and promotion criteria are hard blockers for a comparison. Do not invent ground truth, metrics, or deployment authority. Offer explicit draft defaults when helpful, but obtain acceptance before using them as the evaluation contract.
41
+ Never invent GT, a Judge model, reward definitions, thresholds, credentials, or deployment authority. Offer draft values only when clearly labeled and accepted.
39
42
 
40
- ## Initialize safely
43
+ ## Enforce the strict architecture
41
44
 
42
- When required files are missing, read `references/initialization.md` before creating them. Initialize only inside the configured `projectRoot` and preserve existing files.
45
+ Require these before every Job:
43
46
 
44
- - Keep the baseline immutable; create a new versioned Candidate directory for every optimization attempt.
45
- - Keep secrets out of Candidate files. Inject equal credentials and permissions at runtime.
46
- - Pin direct and transitive dependencies with a lockfile.
47
- - Make the Verifier emit a primary reward plus diagnostic metrics and failure evidence.
48
- - Version the Promotion Policy. A policy or Verifier change requires a fresh baseline.
49
- - Use test accounts, mocks, or sandboxes for business side effects.
47
+ - `candidate-manifest.json` verified against the Candidate files.
48
+ - `dataset-manifest.json` with unique task ids, non-empty instructions, safe paths, and a matching source digest.
49
+ - `.harbor/evaluation-stack.yml` with all eight roles, Judge identity, and Evaluation Contract.
50
+ - Evaluation Context v2 preview.
50
51
 
51
- If file-editing capabilities are unavailable, produce the exact initialization plan and unresolved choices instead of pretending files were created.
52
+ Before a formal Job, call in order:
52
53
 
53
- ## Run the stable evolution loop
54
+ 1. `harbor_candidate_snapshot`
55
+ 2. `harbor_dataset_validate`
56
+ 3. `harbor_evolution_doctor`
57
+ 4. `harbor_context_preview`
54
58
 
55
- ### 1. Establish the baseline
59
+ Do not launch a `promotion-eligible` Job when Doctor reports an error, no comparable baseline exists, or `fresh_baseline_required` is true. A diagnostic Job may investigate architecture warnings, but still requires a valid Candidate, Dataset Manifest, Evaluation Stack, and Context v2.
56
60
 
57
- Call `harbor_candidate_snapshot` for the baseline Candidate. Then call `harbor_eval_run` with the accepted Candidate and Dataset paths. Record the Candidate id, version, digest, Job path, evaluation-context digest, metrics, exceptions, and failed trials.
61
+ Keep Runner orchestration-only. Treat these as architecture errors:
58
62
 
59
- `harbor_eval_run` already snapshots again before execution. Treat a digest mismatch as a real Candidate change, not as noise.
63
+ - Runner combines HTTP integration, rubric, and Judge logic.
64
+ - Runner makes a promotion/Champion decision.
60
65
 
61
- ### 2. Diagnose before changing
66
+ ## Initialize without overwriting
62
67
 
63
- Use the summary returned by `harbor_eval_run`; call `harbor_eval_result` only when reopening an existing Job or when the stable summary is needed again. Read failed samples and trajectories when available.
68
+ Read `references/initialization.md` when required files are missing. After the user accepts all required identities and metric semantics, call `harbor_evolution_init`. It preserves existing files and creates explicit placeholders that still require business implementation.
64
69
 
65
- Classify each failure as one of:
70
+ After initialization:
66
71
 
67
- - Agent capability or policy failure.
68
- - Tool-call, search, citation, or output-contract failure.
69
- - Dataset, Verifier, or ground-truth defect.
70
- - Infrastructure, dependency, permission, timeout, or deployment failure.
71
- - Stochastic variance requiring repeats.
72
+ - Replace placeholders with real role implementations.
73
+ - Pin Candidate dependencies and keep secrets runtime-injected.
74
+ - Re-snapshot the Dataset after intentional Dataset changes.
75
+ - Run Doctor again; initialization success is not evaluation readiness.
76
+
77
+ ## Determine comparability correctly
78
+
79
+ Use the Context v2 `digest`, not timestamps or Job names.
80
+
81
+ A fresh baseline is required when any of these change:
82
+
83
+ - Dataset id, version, or source digest.
84
+ - Integration, Renderer, Evaluator, or Rubric identity.
85
+ - Judge provider, model, version, or parameters.
86
+ - Runner marked `semantic: true`.
87
+ - Harbor or integration runtime identity.
72
88
 
73
- Do not optimize the Agent to compensate for a broken evaluation environment. Do not leak holdout answers or ground truth into the Candidate.
89
+ 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.
74
90
 
75
- ### 3. Make one controlled change
91
+ ## Run the evolution loop
76
92
 
77
- State one hypothesis that connects evidence to the proposed change. Create a new immutable Candidate version and modify only the accepted mutation surface. Never edit the baseline Candidate in place.
93
+ ### Establish a baseline
78
94
 
79
- Snapshot the new Candidate and verify that its digest differs. If it does not differ, stop because no new Candidate exists.
95
+ Call `harbor_eval_run` with Candidate, Dataset, Stack, explicit `mode`, and a Policy for `promotion-eligible`. Preserve Candidate, Dataset, Stack, Context, Doctor, Contract, Trial assessments, Population report, Summary, and later Promotion report.
96
+
97
+ Never cherry-pick stochastic runs. Apply the accepted repeat/seed policy symmetrically.
98
+
99
+ ### Diagnose before changing
100
+
101
+ Use `harbor_eval_result` only to reopen a stable Job summary. Inspect Trial assessments and classify each failure as:
102
+
103
+ - Candidate capability or policy.
104
+ - Tool-call, invalid search, citation, or output-contract failure.
105
+ - Dataset, Evaluator, Rubric, Judge, or GT defect.
106
+ - Infrastructure, dependency, permission, timeout, or deployment failure.
107
+ - Stochastic uncertainty.
80
108
 
81
- ### 4. Re-run under the same context
109
+ Do not optimize the Candidate around broken evaluation infrastructure. Never leak holdout answers or GT into Candidate prompts, skills, tools, or memory.
82
110
 
83
- Call `harbor_eval_run` with the same Dataset and evaluation settings. For stochastic Agents, use the accepted repeat policy for both baseline and Candidate; never cherry-pick the best run.
111
+ ### Propose one controlled change
84
112
 
85
- Compare only Jobs whose `evaluation-context` digests match. If the context changed, establish a new baseline instead of claiming improvement.
113
+ Require every optimization hypothesis to include:
86
114
 
87
- ### 5. Apply the deterministic gate
115
+ - Evidence references to Job/Trial/findings.
116
+ - Root-cause classification.
117
+ - Expected metric effect.
118
+ - Exact mutation surface and forbidden surface.
119
+ - Rollback condition.
88
120
 
89
- Call `harbor_candidate_compare` with the baseline Job, Candidate Job, and accepted Promotion Policy. Respect its decision:
121
+ Create a new immutable Candidate version; never edit the baseline in place. Stop when the new digest is unchanged.
90
122
 
91
- - `PROMOTE`: recommend promotion and provide the evidence package.
92
- - `REJECT`: keep the current Champion and explain each failed criterion.
123
+ ### Re-run and gate
93
124
 
94
- The gate is a recommendation boundary. Never deploy, mutate the active DSH profile, merge code, or replace the Champion unless the user separately authorizes the external CI/CD action.
125
+ Call `harbor_context_preview`; establish a fresh baseline if needed. Run the Candidate under the same comparable Context. Then call `harbor_candidate_compare`.
95
126
 
96
- ## Preserve experimental invariants
127
+ - `PROMOTE`: recommend external promotion with the complete evidence package.
128
+ - `REJECT`: keep the Champion and explain every structured reason code.
97
129
 
98
- - One Job binds one Candidate digest; one Candidate may have many Jobs.
99
- - Baseline and Candidate must share the same evaluation-context digest.
100
- - Keep Candidate, evaluation context, policy, summaries, trajectories, and gate report as checkpoints.
101
- - Separate infrastructure failures from capability failures in every report.
102
- - Change one causal factor per iteration unless the user explicitly accepts a bundled experiment.
103
- - Use hidden or held-out evaluation data for promotion; do not let the Optimizer train directly on it.
104
- - Report uncertainty when sample size or stochastic variance prevents a stable conclusion.
130
+ Never bypass `INFRASTRUCTURE_EXCEPTION_PRESENT`, `ARTIFACT_SCHEMA_INVALID`, Dataset/Stack/Rubric/Judge mismatch, or non-regression failures.
105
131
 
106
132
  ## Handle evaluator meta-evaluation
107
133
 
108
- When the object being improved is the evaluator, rotate the roles:
134
+ Rotate roles when improving the Evaluator:
109
135
 
110
- - Candidate is a Verifier or Judge version.
111
- - Dataset contains cases with independently maintained human ground truth.
112
- - Metrics measure evaluator alignment, such as RCR, bias, variance, calibration, latency, and cost.
113
- - Promotion compares evaluator Candidates under a fixed GT set and policy.
136
+ - Candidate is the Evaluator/Rubric/Judge version.
137
+ - Dataset contains independently maintained human GT.
138
+ - Metrics include RCR, bias, variance, calibration, latency, and cost as appropriate.
139
+ - The Candidate evaluator must not author its own GT or final promotion decision.
114
140
 
115
- Never let the Candidate Judge provide its own final ground truth or promotion decision.
141
+ Manage evaluator Candidates and meta-evaluation Jobs with the same Manifest, Context v2, Doctor, evidence, and Gate rules.
116
142
 
117
143
  ## Report each cycle
118
144
 
119
- Return a compact audit record containing:
145
+ Return:
120
146
 
121
- - Accepted evaluation contract and any remaining assumptions.
122
- - Baseline and Candidate ids, versions, digests, and Job paths.
123
- - Evaluation-context and Promotion Policy identities.
124
- - Primary and diagnostic metric deltas.
125
- - Representative failure evidence and root-cause classification.
126
- - Gate decision with exact reasons.
127
- - External action required for promotion and the next controlled hypothesis if rejected.
147
+ - Accepted Evaluation Contract and unresolved assumptions.
148
+ - Candidate, Dataset, Stack, Context, Judge, and Policy identities.
149
+ - Comparable baseline or fresh-baseline decision.
150
+ - Metric deltas, exception counts, Population groups, and artifact validation.
151
+ - Representative Trial evidence and root-cause classes.
152
+ - Controlled change hypothesis and mutation surface.
153
+ - Gate decision with exact reason codes.
154
+ - External CI/CD action still required.
@@ -1,114 +1,120 @@
1
- # Initialization Reference
1
+ # Strict Project Initialization
2
2
 
3
- Load this reference only when the user needs a new Harbor self-evolution workspace or is missing one of the required contracts.
3
+ Load this reference only when the project is missing the Evaluation Stack structure or the user asks to initialize it.
4
4
 
5
- ## Readiness checklist
5
+ ## Readiness worksheet
6
6
 
7
- Confirm these prerequisites before the first Job:
7
+ Resolve every value before calling `harbor_evolution_init`:
8
8
 
9
- - Docker is available to Harbor.
10
- - Node.js 22+, the selected DSH version, `harbor`, and `harbor-dsh` are available to the DSH process.
11
- - `projectRoot` is the intended workspace security boundary.
12
- - Candidate, Dataset, Job, and Promotion Policy paths stay within `projectRoot`.
13
- - Runtime credentials use evaluation accounts and are not stored in Candidate files.
9
+ | Field | Required meaning |
10
+ | --- | --- |
11
+ | `datasetPath` | Existing Harbor Dataset inside `projectRoot` |
12
+ | `stackId` / `stackVersion` | Stable identity of the complete evaluation architecture |
13
+ | `datasetId` / `datasetVersion` | Stable identity of task population and GT boundary |
14
+ | `contractId` / `contractVersion` | Stable metric semantics |
15
+ | `primaryMetric` / `primaryDirection` | Exact reward key and `maximize` or `minimize` |
16
+ | Judge provider/model/version | Reproducible Judge identity, never credentials |
17
+ | Policy id/version | Stable Gate identity |
18
+ | `minImprovement` | Accepted primary-metric delta |
14
19
 
15
- ## Clarification worksheet
20
+ Also establish diagnostic metrics, min/max thresholds, non-regression metrics, mutation surface, repeat policy, and promotion owner. The initializer creates a minimal Policy; update its explicit placeholders before a formal Gate.
16
21
 
17
- Use known repository evidence first. Ask the user only for unresolved choices.
18
-
19
- | Contract field | Example | Why it matters |
20
- | --- | --- | --- |
21
- | Target behavior | Produce cited research answers | Defines task success |
22
- | Candidate identity | `deep-research-agent` | Keeps v1/v2 in one product line |
23
- | Candidate path | `candidates/deep-research/v1` | Defines what is snapshotted |
24
- | Dataset path | `datasets/deep-research-regression` | Fixes tasks and Verifier |
25
- | Primary metric | `reward` | Ranks Candidates |
26
- | Minimums | completion and citation >= 0.95 | Prevents unsafe tradeoffs |
27
- | Non-regression | tool success, latency | Protects existing capability |
28
- | Mutation surface | prompt and search plugin only | Controls causal attribution |
29
- | Repeat policy | 5 fixed-seed runs | Controls stochastic variance |
30
- | Promotion owner | CI gate plus human approval | Keeps deployment external |
31
-
32
- ## Recommended layout
22
+ ## Generated layout
33
23
 
34
24
  ```text
35
- agent-workspace/
25
+ projectRoot/
26
+ ├── .harbor/
27
+ │ ├── evolution.yml
28
+ │ └── evaluation-stack.yml
36
29
  ├── candidates/
37
- │ └── <agent-id>/
38
- │ ├── v1/
39
- │ │ ├── cordis.yml
40
- │ │ ├── package.json
41
- │ │ ├── package-lock.json
42
- │ │ └── business plugins...
43
- │ └── v2/
44
30
  ├── datasets/
45
- │ └── <suite>/
46
- ├── task.toml
47
- ├── instruction.md
48
- ├── environment/Dockerfile
49
- │ └── tests/
50
- ├── test.sh
51
- │ └── verifier files...
52
- ├── policies/
53
- │ └── <suite>.json
31
+ ├── integrations/default.py
32
+ ├── renderers/default.py
33
+ ├── evaluators/default.py
34
+ ├── rubrics/default.md
35
+ ├── diagnosers/default.py
36
+ ├── optimizers/default.py
37
+ ├── runners/harbor.py
38
+ ├── reporters/default.py
39
+ ├── policies/promotion.json
54
40
  └── jobs/
55
41
  ```
56
42
 
57
- Generate `candidate-manifest.json` with `harbor_candidate_snapshot`; do not hand-author it. One immutable Candidate may be evaluated by many Jobs.
58
-
59
- ## Candidate rules
60
-
61
- A Candidate is the complete DSH/Cordis composition required to reproduce behavior:
62
-
63
- - `package.json` supplies the default Candidate id and version.
64
- - `cordis.yml` composes the model, tools, skills, loop, storage, and business plugins.
65
- - A lockfile pins transitive runtime dependencies.
66
- - Local plugin files and prompts belong in the Candidate and therefore affect its digest.
67
- - Secrets, mutable session state, Jobs, and production deployment configuration do not belong in the Candidate.
68
-
69
- Copy an existing known-good Candidate when possible. If none exists, create the smallest valid DSH composition for the actual business Agent; do not invent a model provider or credential scheme.
43
+ 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.
44
+
45
+ ## Evaluation Stack shape
46
+
47
+ ```yaml
48
+ schema_version: 1
49
+ stack_id: vertical-search
50
+ version: 1.0.0
51
+ components:
52
+ integration: { id: search-api, version: 1.0.0, entry: integrations/default.py }
53
+ renderer: { id: search-renderer, version: 1.0.0, entry: renderers/default.py }
54
+ evaluator: { id: search-evaluator, version: 1.0.0, entry: evaluators/default.py }
55
+ rubric: { id: search-rubric, version: 1.0.0, entry: rubrics/default.md }
56
+ diagnoser: { id: search-diagnoser, version: 1.0.0, entry: diagnosers/default.py }
57
+ optimizer: { id: search-optimizer, version: 1.0.0, entry: optimizers/default.py }
58
+ runner: { id: harbor-runner, version: 1.0.0, entry: runners/harbor.py, semantic: false }
59
+ reporter: { id: search-reporter, version: 1.0.0, entry: reporters/default.py }
60
+ judge:
61
+ provider: accepted-provider
62
+ model: accepted-model
63
+ version: pinned-version
64
+ parameters: { temperature: 0 }
65
+ evaluation_contract:
66
+ contract_id: vertical-search
67
+ version: 1.0.0
68
+ primary_metric: reward
69
+ metrics:
70
+ - { id: reward, label: Overall reward, direction: maximize }
71
+ - { id: valid_search_rate, label: Valid search rate, direction: maximize }
72
+ - { id: citation_accuracy, label: Citation accuracy, direction: maximize }
73
+ ```
70
74
 
71
- ## Dataset and Verifier rules
75
+ Do not duplicate Evaluator logic inside each Task. Reference one Stack Evaluator from task metadata when task-specific routing is needed.
72
76
 
73
- A Harbor Dataset contains one or more fixed Tasks. Each Task should define:
77
+ ## Dataset rules
74
78
 
75
- - `task.toml`: Task identity, timeouts, environment, and Harbor contract.
76
- - `instruction.md`: the behavior requested from the Candidate.
77
- - `environment/Dockerfile`: a reproducible sandbox with required runtime dependencies.
78
- - `tests/test.sh`: the verifier entrypoint.
79
- - Verifier code that writes primary and diagnostic metrics to Harbor's reward output.
79
+ Keep `dataset-manifest.json` at Dataset root. Generate it through initialization or `harbor-dsh dataset snapshot`; do not hand-edit its digest. Validation rejects:
80
80
 
81
- For a research Agent, useful diagnostic metrics include task completion, tool-call success, valid-search rate, citation correctness, latency, and cost. Keep their exact definitions in version control. Do not convert tool errors, empty searches, or invalid citations into prose-only observations; expose them as metrics or structured failure evidence.
81
+ - Missing/duplicate Task ids or empty instructions.
82
+ - Duplicate normalized queries.
83
+ - Missing/out-of-root paths or symlinks.
84
+ - Source/file counts that no longer match.
85
+ - Secret-bearing metadata fields.
82
86
 
83
- ## Promotion Policy starter
87
+ Intentional Dataset changes require a new Dataset version, a new snapshot, and a fresh baseline.
84
88
 
85
- Create this only after the user accepts the metric names and thresholds:
89
+ ## Promotion Policy v2
86
90
 
87
91
  ```json
88
92
  {
89
- "schema_version": 1,
93
+ "schema_version": 2,
94
+ "policy_id": "vertical-search",
95
+ "version": "1.0.0",
90
96
  "primary_metric": "reward",
97
+ "primary_direction": "maximize",
91
98
  "min_improvement": 0.05,
92
- "minimums": {
93
- "task_completion": 0.95
94
- },
95
- "non_regression": [
96
- "tool_call_success",
97
- "citation_correctness"
98
- ],
99
- "non_regression_tolerance": 0.0
99
+ "minimums": { "citation_accuracy": 0.9 },
100
+ "maximums": { "latency_seconds": 20 },
101
+ "non_regression": ["valid_search_rate"],
102
+ "metric_directions": { "valid_search_rate": "maximize" },
103
+ "non_regression_tolerance": 0.0,
104
+ "hard_requirements": ["exception_free", "artifact_schema_valid", "doctor_error_free"]
100
105
  }
101
106
  ```
102
107
 
103
- This is a structural example, not a universal default. Thresholds must reflect business risk and sample size. Version the policy; changing it invalidates comparisons made under the old promotion contract.
108
+ Use business-accepted thresholds. Do not assume all metrics are `/10`, maximized, or universal across domains.
104
109
 
105
- ## First-cycle handoff
110
+ ## Handoff before the first Job
106
111
 
107
- Before calling an evaluation tool, show the user:
112
+ Show the user:
108
113
 
109
- 1. The resolved Candidate, Dataset, Job, and policy paths.
110
- 2. The metric and promotion contract.
111
- 3. The mutation and side-effect boundaries.
112
- 4. Any assumptions still being used.
114
+ 1. Resolved Candidate, Dataset, Stack, Policy, and Jobs paths.
115
+ 2. Role identities and which ones affect reward comparability.
116
+ 3. Metric directions, thresholds, groups, and hard requirements.
117
+ 4. Holdout, mutation, side-effect, repeat, and deployment boundaries.
118
+ 5. Doctor findings and Context preview.
113
119
 
114
- Then snapshot and run the baseline. Do not initialize v2 until baseline evidence identifies a concrete hypothesis.
120
+ Start with a baseline. Do not create Candidate v2 until baseline evidence supports one controlled hypothesis.