Skip to content

Commit f585de4

Browse files
committed
Implement governed experience gain v3
1 parent 0c85c38 commit f585de4

79 files changed

Lines changed: 21891 additions & 431 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ research_agent/evaluation/**/data/
2525
research_agent/cache/*
2626
research_agent/cache_*/*
2727

28+
benchmark/data/
29+
benchmark/results/one_layer_vq_real_smoke/*/
30+
31+
# Generated experiment state
32+
/benchmark/runs/
33+
/workplace_paper/
34+
/cache_soak*/
35+
/terminal_tmp/
36+
/soak_*.log
37+
/soak_*.pid
38+
2839
research_agent/.env
2940

3041
research_agent/*_tmp/*

‎CONTEXT.md‎

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Verified Experimentation
2+
3+
This context names the durable records and decisions used to test whether verified experience improves later research attempts. The detailed governing design remains `docs/design/experience-driven-research-loop.md`.
4+
5+
## Language
6+
7+
**Hypothesis**:
8+
A falsifiable proposed change with an expected metric effect and stated applicability conditions.
9+
_Avoid_: Idea, suggestion
10+
11+
**Experiment Attempt**:
12+
One execution of a Hypothesis under a fixed dataset, source, Intervention, seed, budget, environment, and Evaluation Contract.
13+
_Avoid_: Retry, run
14+
15+
**Intervention**:
16+
The schema-valid, executable configuration deliberately varied for one Experiment Attempt.
17+
_Avoid_: Tweak, prompt change, arbitrary config
18+
19+
**Intervention Catalog**:
20+
The versioned allowlist of mutable knobs, permitted values, protected settings, and no-op policy for one decision point.
21+
_Avoid_: Config file, parameter dump
22+
23+
**Manipulation Check**:
24+
The recorded determination of whether an Intervention changed the intended executable configuration and was observed by the runner.
25+
_Avoid_: Recall count, changed prompt
26+
27+
**Trial Provenance**:
28+
The immutable identity of the source, Intervention, execution configuration, dataset plan, environment, Evaluation Contract, and resulting evidence for an Experiment Attempt.
29+
_Avoid_: Code revision, metadata
30+
31+
**Observation**:
32+
The untrusted raw result, artifacts, metrics, timing, and exit status produced by an Experiment Attempt.
33+
_Avoid_: Result, finding
34+
35+
**Evaluation Contract**:
36+
The task-specific, versioned rules that define required evidence, evaluator identity, metrics, validity, and success.
37+
_Avoid_: Test config, prompt rubric
38+
39+
**Verification Record**:
40+
The immutable result of applying an Evaluation Contract to an Observation.
41+
_Avoid_: Judge response, score
42+
43+
**Experience Record**:
44+
The immutable combination of a Hypothesis, Experiment Attempt, Observation, Verification Record, and analysis.
45+
_Avoid_: Memory
46+
47+
**Knowledge Record**:
48+
A reusable abstraction backed by one or more verified Experience Records.
49+
_Avoid_: Reflection, summary
50+
51+
**Recall Context**:
52+
A bounded, cited snapshot of Knowledge Records selected for one decision.
53+
_Avoid_: Chat history, full memory
54+
55+
## Relationships
56+
57+
- A **Hypothesis** has one or more **Experiment Attempts**.
58+
- Each **Experiment Attempt** executes exactly one **Intervention**.
59+
- An **Intervention Catalog** governs every valid **Intervention** at its decision point.
60+
- A **Manipulation Check** compares an **Intervention** with the preceding executable configuration.
61+
- **Trial Provenance** identifies the complete execution conditions of one **Experiment Attempt**.
62+
- An **Experiment Attempt** produces one **Observation**.
63+
- An **Evaluation Contract** produces one **Verification Record** for an **Observation**.
64+
- An **Experience Record** combines the preceding records without changing them.
65+
- A **Knowledge Record** cites one or more verified **Experience Records**.
66+
- A **Recall Context** supplies selected **Knowledge Records** to a later Intervention decision.
67+
68+
## Example dialogue
69+
70+
> **Developer:** “Treatment recalled two Knowledge Records. Does that pass the Manipulation Check?”
71+
>
72+
> **Domain expert:** “No. The Experiment Attempt must execute a different schema-valid Intervention, and its Trial Provenance must show that the runner observed the same configuration digest.”
73+
74+
## Flagged ambiguities
75+
76+
- “run” previously meant both a top-level Research Run and a single training execution. Use **Experiment Attempt** for the latter.
77+
- “code revision” previously mixed generated artifacts with source identity. Use **Trial Provenance** and its separate source and evidence digests.
78+
- “memory gain” previously conflated retrieval with behavior change. Use **Manipulation Check** for behavior change and reserve Experience Gain for verified outcome differences.

‎README.md‎

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ pytest -q
268268

269269
Current local baseline:
270270

271-
- 290 tests passing
271+
- 490 tests passing
272272
- 46 dynamically registered tools
273273
- 5 dynamically registered agents
274274

@@ -301,11 +301,30 @@ The checked-in deterministic contract under
301301
`benchmark/evaluators/deterministic_score/` is a local integration fixture, not
302302
evidence of improvement on Scientist-Bench.
303303

304+
The task-aligned `one_layer_vq` evidence contract under
305+
`benchmark/evaluators/one_layer_vq_smoke/` independently recomputes codebook
306+
utilization, perplexity, reconstruction MSE, and PSNR from raw arrays, and
307+
verifies the canonical CIFAR-10 test-image prefix by pixel digest. The local
308+
real-data runner is under `benchmark/real_smoke/one_layer_vq/`. It is an
309+
execution/evidence smoke contract with a zero baseline, not a scientific
310+
improvement threshold. The checked three-seed method-smoke report found no mean
311+
utilization improvement for the SimVQ-style variant. See
312+
[`benchmark/ONE_LAYER_VQ_REAL_TEST.md`](benchmark/ONE_LAYER_VQ_REAL_TEST.md) for
313+
the calibration and paired no-recall/recall protocol.
314+
315+
In `closed-loop` mode, each Experiment Attempt receives an isolated stage and
316+
agent cache under `<cache>/attempts/iteration-NNN`. Verified Recall Context is
317+
rendered as cited decision guidance for the next attempt, so a retry cannot
318+
silently reuse the previous attempt's completed implementation and submission
319+
stages. Evaluator inputs are copied into immutable per-attempt evidence
320+
snapshots before verification, preventing a later attempt from overwriting an
321+
earlier Observation's artifacts.
322+
304323
## Remaining Validation Roadmap
305324

306-
1. Add task-specific Evaluation Contracts for a representative
307-
Scientist-Bench subset.
308-
2. Run paired memory-off and closed-loop trials on more than one real task.
325+
1. Calibrate versioned task-specific Evaluation Contracts on independent real
326+
runs for a representative Scientist-Bench subset.
327+
2. Run paired no-recall and closed-loop trials on more than one real task.
309328
3. Add scheduled Docker/GPU benchmark execution outside normal pull-request CI.
310329
4. Add a ResearchClawBench Adapter after the internal subset is stable.
311330
5. Validate memory gain separately from the implemented candidate-search gain.

0 commit comments

Comments
 (0)