hyperagent · diff
git:20260328.50282b7 to git:20260328.733b94a
223 added, 293 removed. Audit A to A.
What this update changes in the checks
No check changed: every fixed check gives the same answer before and after this update.
A tripped check is a label, not a verdict: read the matched text and the lines below. This week's updates that newly trip a check.
---
name: hyperagent
- description: "Run a self-improving optimization loop inspired by the Hyperagents/Darwin Gödel Machine framework. Unlike linear autoresearch, this skill explores a TREE of solutions where the agent can modify both its task-solving code AND its own improvement strategy. Use when asked to 'run hyperagent', 'self-improving optimization', 'evolve this', or when optimization requires exploring fundamentally different approaches rather than incremental tuning."
- compatibility: Requires python3, git, and a POSIX shell. Bundled scripts use only the Python standard library.
+ description: Run a self-referential self-improving agent loop where a meta-agent iteratively modifies a task-agent's code to optimize for any measurable target. Based on Facebook Research's Hyperagents paper (arXiv:2603.19461). Use when asked to "run hyperagent", "self-improve this", "optimize with self-modification", or "evolve this agent/script".
+ compatibility: Requires python3, git. The bundled scripts use only the Python standard library.
---
# Hyperagent
- A self-improving optimization framework that goes beyond linear experiment loops. Based on the Darwin Gödel Machine (DGM-H) pattern from Meta AI research (arxiv:2603.19461), combined with the disciplined measurement infrastructure of autoresearch.
+ Self-referential self-improvement: a meta-agent that modifies a task-agent (and itself) to optimize any measurable objective.
- **Key difference from autoresearch:** Autoresearch runs a linear sequence of experiments with a fixed improvement strategy. Hyperagent explores a *tree* of solutions where each node can modify not just the task code but also *how it searches for improvements*. The meta-logic itself evolves.
+ Inspired by Facebook Research's *Hyperagents* paper (arXiv:2603.19461), which demonstrated that agents combining a task-solver and a self-modifying meta-level into a single editable program can achieve open-ended, compounding improvements that transfer across domains.
- ## Core Concepts
+ ## How It Works
- ### The Hyperagent Structure
+ A hyperagent is a system with two components in a single editable codebase:
- A hyperagent is a unified program with two editable components:
+ 1. **Task Agent** — solves the target task (benchmark, code generation, data processing, etc.)
+ 2. **Meta Agent** — analyzes task performance history and proposes modifications to the task agent's code (and optionally its own code)
- 1. **Task Agent** — the code that solves the target problem (benchmark runner, feature implementation, prompt template, etc.)
- 2. **Meta Agent** — the strategy for generating improvements. Unlike autoresearch's fixed loop, this is *part of the editable code*. The agent can change how it searches.
+ The key insight from the paper: when the meta-level modification procedure is itself editable, the system can improve not just task performance but also the mechanism that generates future improvements — enabling compounding, transferable gains.
- Both components live in the same editable workspace. When the meta agent generates a child variant, it can modify the task code, the meta strategy, or both.
+ ## Core Principles
- ### Archive of Stepping Stones
+ 1. **Self-referential modification**
- Instead of a single linear "best so far," hyperagent maintains a *population archive* — a tree of scored variants. Each variant is a potential parent for the next generation. This prevents getting stuck in local optima by preserving diverse approaches.
+ The meta-agent can modify the task-agent's code AND its own strategy. Both live in the same editable workspace. This enables metacognitive self-improvement: improving how you improve.
- ### Metacognitive Self-Modification
+ 2. **Population-based exploration (archive)**
- The agent doesn't just look for better solutions. It looks for *better ways of looking for better solutions*. If it detects that its current improvement strategy is plateauing, it can rewrite the strategy itself.
+ Don't just keep the best variant — maintain an archive of all successful variants as stepping stones. Parent selection favors high performers with unexplored potential.
- ## When to Use Hyperagent vs. Autoresearch
+ 3. **Empirical evaluation gates everything**
- | Situation | Use |
- |-----------|-----|
- | Optimizing a known metric with incremental changes | Autoresearch |
- | Tuning hyperparameters or config values | Autoresearch |
- | Exploring fundamentally different algorithmic approaches | **Hyperagent** |
- | The search space is large with many local optima | **Hyperagent** |
- | You want the system to discover novel strategies | **Hyperagent** |
- | Prompt engineering with structural variation | **Hyperagent** |
- | Evolving reward functions or evaluation criteria | **Hyperagent** |
- | Budget is tight and you need efficiency | Autoresearch |
+ No change is accepted without measurement. Every candidate is evaluated against the task benchmark with repeated trials.
- ## Up-Front Q&A
+ 4. **Persistent memory and performance tracking**
- Before starting, gather or confirm:
+ The system maintains a structured history of all experiments, hypotheses, and outcomes. Later generations build on earlier insights — no rediscovering dead ends.
- 1. **Objective** — what are we optimizing?
- 2. **Primary metric** — name, unit, direction (higher/lower is better)
- 3. **Evaluation command** — how to score a variant
- 4. **Correctness gates** — non-negotiable constraints
- 5. **Scope** — what files may be modified
- 6. **Budget** — max iterations, max time, max cost (tokens/API calls)
- 7. **Exploration breadth** — how many children per parent? (default: 2-3)
- 8. **Archive size limit** — max stepping stones to maintain (default: 20)
+ 5. **Transfer across domains**
- ## Workspace Setup
+ Meta-level improvements (performance tracking, evaluation strategies, hypothesis generation patterns) are domain-agnostic and can be transferred to new tasks.
- 1. Create a dedicated worktree:
+ ## Available Scripts
- ```bash
- git worktree add ../hyperagent-<goal>-<date> -b hyperagent/<goal>-<date>
- ```
+ - **`scripts/common.py`** — shared utilities (archive management, metrics, reporting)
+ - **`scripts/init_session.py`** — initialize a hyperagent session, scaffold the workspace
+ - **`scripts/run_task.py`** — evaluate a task-agent variant and record metrics
+ - **`scripts/log_variant.py`** — log evaluated record, decide disposition, update archive and reports
+ - **`scripts/render_report.py`** — generate HTML report of the full evolutionary history
+ - **`scripts/select_parent.py`** — select a parent from the archive for the next generation
- 2. Initialize the workspace:
+ > **Note:** There is no `generate_variant.py` script — the meta-agent role (hypothesis generation and code modification) is performed by the LLM agent itself, not by a script.
- ```
- .hyperagent/
- ├── archive.jsonl # All variants (the stepping stone archive)
- ├── tree.json # Parent-child relationships
- ├── meta_strategy.md # Current meta-agent strategy (editable by the agent)
- ├── improvements.md # Agent's diary of insights
- ├── report.html # Visual report
- └── plots/ # Charts
- ```
+ All scripts are non-interactive, expose `--help`, emit structured JSON on stdout, and keep diagnostics on stderr.
- 3. Create required files:
- - `hyperagent.md` — session contract (like autoresearch.md)
- - `hyperagent.sh` — evaluation script
- - `hyperagent.checks.sh` — correctness gates (if needed)
- - `.hyperagent/meta_strategy.md` — the meta-agent's improvement strategy
+ ## Default Workflow
- 4. Ensure `.hyperagent/` stays untracked:
+ 1. **Initialize** the session after defining the optimization target:
```bash
- rg -qxF '.hyperagent/' .git/info/exclude || printf '\n.hyperagent/\n' >> .git/info/exclude
+ python3 scripts/init_session.py \
+ --goal "Improve prompt accuracy on math benchmark" \
+ --metric-name accuracy \
+ --unit pct \
+ --direction higher \
+ --task-command ./task.sh \
+ --checks-command ./checks.sh \
+ --scope src/agent.py \
+ --max-generations 50
```
- ## Required Files
+ 2. **Evaluate the baseline** (generation 0):
- ### `hyperagent.md`
+ ```bash
+ python3 scripts/run_task.py \
+ --id gen-000 \
+ --hypothesis "Control: unmodified task agent" \
+ --change-summary "No modifications" \
+ --baseline \
+ --output .hyperagent/gen-000.json
- The durable session contract. A fresh agent should be able to resume from this.
+ python3 scripts/log_variant.py --input .hyperagent/gen-000.json
+ ```
- ```markdown
- # Hyperagent: <goal>
+ 3. **Selection → Modification → Evaluation loop**:
- ## Objective
- <What is being optimized and why.>
+ ```bash
+ # Select a parent from the archive
+ python3 scripts/select_parent.py --output .hyperagent/parent.json
- ## Configuration
- - Primary metric:
- - Unit:
- - Direction:
- - Evaluation command:
- - Correctness gates:
- - Budget: <max iterations> iterations, <max time>
- - Exploration breadth: <children per parent>
- - Archive size limit: <max stepping stones>
+ # Generate a variant (meta-agent proposes modifications)
+ # This is where YOU (the LLM agent) act as the meta-agent:
+ # - Read the parent's code and performance history
+ # - Hypothesize an improvement
+ # - Apply code modifications
+ # - Record what you changed and why
- ## Scope
- - In scope:
- - Off limits:
+ # Evaluate the variant
+ python3 scripts/run_task.py \
+ --id gen-001 \
+ --hypothesis "Add chain-of-thought prompting to improve reasoning" \
+ --change-summary "Wrap task prompt in step-by-step reasoning template" \
+ --parent gen-000 \
+ --output .hyperagent/gen-001.json
- ## Archive Summary
- Total variants: <N>
- Best score: <score> (variant <id>)
- Tree depth: <max depth>
+ python3 scripts/log_variant.py --input .hyperagent/gen-001.json
+ ```
- ## What We've Learned
- <Key wins, dead ends, structural insights, meta-strategy changes.>
+ 4. **Render reports** at any time:
- ## Meta-Strategy Evolution Log
- <Track when and why the meta strategy was modified.>
- ```
+ ```bash
+ python3 scripts/render_report.py
+ ```
- ### `.hyperagent/meta_strategy.md`
+ ## Up-Front Q&A
- This is the *editable* improvement strategy. The agent reads this before generating each child variant. **The agent can and should modify this file when it discovers better ways to search.**
+ Before starting, gather or confirm:
- Initial template:
+ 1. **Objective** — what are we optimizing?
+ 2. **Primary metric** — exact name, unit, direction (lower/higher)
+ 3. **Task command** — the script that runs the task agent and emits `METRIC name=value` lines
+ 4. **Correctness gates** — tests or checks that must pass for a variant to be kept
+ 5. **Scope** — which files can the meta-agent modify?
+ 6. **Meta-scope** — can the meta-agent modify its own strategy? (default: yes)
+ 7. **Generation budget** — max generations before stopping
+ 8. **Minimum improvement threshold** — default 1%
- ```markdown
- # Meta Strategy
+ ## Workspace Setup
- ## Current Approach
- Generate improvements by:
- 1. Analyze the parent's code and score
- 2. Identify the most likely bottleneck or weakness
- 3. Propose a single targeted change with a clear hypothesis
- 4. Prefer structural changes over parameter tweaks when score is plateauing
+ 1. Prefer a **dedicated worktree** on a fresh branch:
- ## Exploration Heuristics
- - If last 3 children from same parent all failed: try a fundamentally different parent
- - If score plateau detected (variance < 1% over 5 variants): switch to exploratory mode
- - In exploratory mode: make larger structural changes, try unconventional approaches
- - If a new best is found: generate 2-3 children from it (exploit the breakthrough)
+ ```bash
+ git worktree add ../hyperagent-<goal>-<date> -b hyperagent/<goal>-<date>
+ ```
- ## Self-Modification Triggers
- Modify this strategy when:
- - 5+ consecutive children show no improvement regardless of parent
- - A child that was expected to fail succeeds (the model of what works is wrong)
- - The agent detects it's repeating hypothesis patterns
+ 2. Create:
+ - `hyperagent.md` — checked in, durable session brief with full evolutionary history
+ - `task.sh` — checked in, benchmark runner (emits `METRIC name=value`)
+ - `checks.sh` — checked in, correctness gates
+ - `.hyperagent/` — local artifact directory, NOT checked in
- ## Hypothesis Generation Rules
- - Each hypothesis must explain WHY the change should help
- - No "try X and see" without a causal theory
- - Maintain a hypothesis inventory to avoid repetition
- ```
+ 3. Ensure artifacts stay untracked:
- ### `.hyperagent/improvements.md`
+ ```bash
+ rg -qxF '.hyperagent/' .git/info/exclude || printf '\n.hyperagent/\n' >> .git/info/exclude
+ ```
- The agent's diary. Written by the agent, for the agent. Track insights, patterns, dead ends, and meta-observations about the search process itself.
+ ## The Meta-Agent Role
- ```markdown
- # Improvements Diary
+ **You (the LLM) are the meta-agent.** Your job each generation is:
- ## Iteration 1
- - Parent: node-0 (baseline)
- - Observation: <what I noticed>
- - Hypothesis: <what I think will work>
- - Result: <what happened>
- - Insight: <what I learned>
+ 1. **Select parent** — use `scripts/select_parent.py` or choose based on the archive
+ 2. **Analyze** — read the parent's code, performance history, and past experiment outcomes
+ 3. **Hypothesize** — propose a specific, testable modification with a causal theory for why it should help
+ 4. **Modify** — apply code changes to the task agent (and optionally to your own strategy notes in `hyperagent.md`)
+ 5. **Evaluate** — run `scripts/run_task.py` to measure the variant
+ 6. **Log** — use `scripts/log_variant.py` to record the result and update the archive
+ 7. **Reflect** — update `hyperagent.md` with what you learned
- ## Meta-Observations
- - <Patterns about the search process itself>
- ```
+ ### Meta-Level Self-Modification
- ## The Algorithm
+ The meta-agent can improve its own process by updating:
+ - **Strategy notes** in `hyperagent.md` (hypothesis generation patterns, evaluation heuristics)
+ - **Memory entries** in `.hyperagent/memory.jsonl` (qualitative insights, correction plans)
+ - **The task evaluation protocol** (adding secondary metrics, changing trial counts)
- ### 1. Initialize
+ These meta-improvements compound across generations and transfer to new tasks.
- ```
- Create baseline variant (node-0)
- Evaluate baseline → score
- Add to archive: {id: "node-0", score: <score>, parent: null, depth: 0}
- Initialize meta_strategy.md with default strategy
- ```
+ ## Required Files
- ### 2. Select Parent
+ ### `hyperagent.md`
- Use a selection mechanism that balances exploitation and exploration:
+ The durable contract and evolutionary history. A fresh agent can resume from this.
- ```python
- def select_parent(archive):
- """
- Score-weighted selection with fertility penalty.
- High-performing variants are more likely to be selected.
- Variants that have already produced many children are penalized.
- """
- for variant in archive:
- # Base weight from performance (normalize scores to 0-1)
- weight = normalize(variant.score)
-
- # Fertility penalty: reduce weight for over-bred parents
- children_count = count_children(variant.id)
- fertility_penalty = 1.0 / (1.0 + children_count)
-
- variant.selection_weight = weight * fertility_penalty
-
- # Probabilistic selection weighted by adjusted scores
- return weighted_random_choice(archive)
- ```
+ ```markdown
+ # Hyperagent: <goal>
- ### 3. Generate Child (Metacognitive Self-Modification)
+ ## Objective
+ <What is being optimized and why.>
- ```
- Read meta_strategy.md
- Read parent's code and score
- Read improvements.md for context
- Read archive summary for landscape awareness
+ ## Configuration
+ - Primary metric:
+ - Unit:
+ - Direction:
+ - Minimum improvement: X%
+ - Task command:
+ - Correctness gates:
+ - Generation budget:
- Generate child by:
- 1. Analyze parent's weaknesses
- 2. Form hypothesis (per meta_strategy rules)
- 3. Apply code changes to task agent
- 4. Optionally: modify meta_strategy.md if triggers are met
- 5. Record changes in improvements.md
- ```
+ ## Scope
+ - Task agent files:
+ - Meta-agent can self-modify: yes/no
- ### 4. Evaluate Child
+ ## Archive
+ `.hyperagent/archive.jsonl`
- ```
- Run hyperagent.sh → collect METRIC lines
- Run hyperagent.checks.sh → verify correctness
- Score the child
- ```
+ ## Lineage
+ <Tree showing parent→child relationships and which variants were kept>
- ### 5. Update Archive
+ ## Meta-Strategy
+ <Current approach to hypothesis generation — updated as the meta-agent learns>
- ```
- Add child to archive regardless of score (diversity matters)
- Update tree.json with parent-child relationship
- If archive exceeds size limit:
- Prune lowest-scoring variants that are NOT ancestors of the current best
- Never prune the baseline or the current best
- ```
+ ## What We've Learned
+ <Key wins, dead ends, transferable insights>
- ### 6. Loop or Terminate
+ ## Performance Tracking
+ <Best variant, improvement trajectory, current plateau status>
+ ```
- Continue until:
- - Budget exhausted (iterations, time, or cost)
- - Convergence detected (no improvement in N iterations across all branches)
- - User interrupts
- - All promising branches exhausted
+ ### `task.sh`
- ### 7. Report
+ Bash script that runs the task agent and emits `METRIC name=value` lines:
- Generate `.hyperagent/report.html` with:
- - Tree visualization of all variants
- - Score evolution across the tree
- - Best path from root to best variant
- - Meta-strategy evolution timeline
- - Key insights from improvements.md
+ ```bash
+ #!/bin/bash
+ set -euo pipefail
+ # Run the task agent
+ python3 src/agent.py --input data/test.json 2>/dev/null
+ # The agent script should emit: METRIC accuracy=0.85
+ ```
- ## Archive Record Format
+ ## Archive Structure
- Each variant in `.hyperagent/archive.jsonl`:
+ The archive (`.hyperagent/archive.jsonl`) stores every variant ever evaluated:
```json
{
- "id": "node-007",
- "parent_id": "node-003",
- "depth": 3,
- "timestamp": "2026-03-27T22:00:00Z",
- "hypothesis": "Restructuring the prompt template to use chain-of-thought will improve accuracy",
- "change_summary": "Rewrote prompt template with explicit reasoning steps",
- "files_touched": ["prompts/evaluate.txt"],
- "meta_strategy_modified": false,
+ "id": "gen-007",
+ "generation": 7,
+ "parent_id": "gen-003",
+ "timestamp": "2026-03-27T20:00:00Z",
+ "hypothesis": "Add few-shot examples to improve pattern recognition",
+ "change_summary": "Inserted 3 domain-specific examples into the task prompt",
+ "files_touched": ["src/agent.py"],
"metric_name": "accuracy",
"direction": "higher",
"warmup_trials": [0.82, 0.83],
- "measured_trials": [0.87, 0.86, 0.88, 0.87, 0.86],
- "summary": {
- "median": 0.87,
- "mean": 0.868,
- "min": 0.86,
- "max": 0.88
- },
+ "measured_trials": [0.85, 0.86, 0.84, 0.85, 0.87],
+ "summary": {"median": 0.85, "mean": 0.854, "min": 0.84, "max": 0.87},
"checks": "passed",
"disposition": "keep",
"children_count": 0,
- "selection_weight": null
+ "meta_modifications": ["Updated strategy notes with few-shot pattern"],
+ "reason": "Improved by 3.2% over parent gen-003 (0.824). Checks passed."
}
```
- ## Tree Record Format
-
- `.hyperagent/tree.json`:
+ ## Parent Selection
- ```json
- {
- "nodes": {
- "node-0": {"score": 0.72, "depth": 0, "children": ["node-1", "node-2"]},
- "node-1": {"score": 0.78, "depth": 1, "children": ["node-3", "node-4"]},
- "node-2": {"score": 0.69, "depth": 1, "children": []},
- "node-3": {"score": 0.87, "depth": 2, "children": ["node-5"]},
- "node-4": {"score": 0.75, "depth": 2, "children": []},
- "node-5": {"score": 0.91, "depth": 3, "children": []}
- },
- "best": "node-5",
- "best_path": ["node-0", "node-1", "node-3", "node-5"]
- }
- ```
+ Selection probability for a parent is proportional to:
+ - **Performance score** (higher is better for archive diversity)
+ - **Inverse of children count** (favor unexplored high-performers)
- ## Measurement Protocol
+ This balances exploitation (good variants) with exploration (understudied variants).
- Same as autoresearch — discipline matters even in exploratory search:
+ ```bash
+ python3 scripts/select_parent.py
+ # Output: {"selected_parent": "gen-003", "score": 0.824, "children": 1, "reason": "High performer with few children"}
+ ```
- 1. **Warm up**: 2+ warmup trials (discarded)
- 2. **Measure**: 5+ measured trials
- 3. **Summarize**: Use median as primary decision statistic
- 4. **Threshold**: Pre-declare minimum meaningful improvement (default 1%)
+ ## Decision Rules
- ## Meta-Strategy Self-Modification
+ - **`keep`** — variant beats current best by ≥ threshold, checks pass
+ - **`discard`** — variant is worse, equal, or improvement below threshold
+ - **`checks_failed`** — metric improved but correctness gates failed
+ - **`crash`** — variant could not be evaluated
- This is what makes hyperagent different from autoresearch. The agent should modify `.hyperagent/meta_strategy.md` when:
+ ## Plateau Detection
- ### Trigger: Plateau Detection
- If the last 5 variants across all branches show <1% variance in scores:
- - Switch from exploitation to exploration mode
- - Try larger structural changes
- - Consider completely different algorithmic approaches
- - Record the strategy change in improvements.md
+ Track improvement velocity. Stop or pivot when:
+ - 3+ consecutive generations with no improvement
+ - Hypothesis diversity drops (recycling ideas)
+ - Improvement velocity < 0.1% per generation over last 5
- ### Trigger: Surprise Success
- If a child scores significantly better than predicted:
- - Analyze WHY it worked when the model predicted otherwise
- - Update the hypothesis generation rules
- - Generate 2-3 children from this variant to exploit the breakthrough
+ ## Loop Behavior
- ### Trigger: Hypothesis Repetition
- If the agent is generating similar hypotheses to earlier ones:
- - Stop and review improvements.md
- - Identify which hypothesis TYPES have been tried
- - Force the next N hypotheses to be from an untried category
- - Categories: algorithmic, structural, data, prompt, parameter, architectural
+ Run autonomously until:
+ - Generation budget exhausted
+ - Plateau detected (3 consecutive non-improvements)
+ - All promising hypotheses explored
+ - User interrupts
- ### Trigger: Dead Branch
- If a parent has produced 3+ children all scoring worse:
- - Mark the branch as exhausted
- - Reduce the parent's selection weight to near-zero
- - Select a different parent from the archive, preferring under-explored ones
+ During the loop:
+ - One hypothesis per generation
+ - Record dead ends explicitly
+ - Keep the worktree clean between variants (revert discarded changes)
+ - Update `hyperagent.md` after every generation
## Common Pitfalls
- ### 1. Archive Explosion
- The tree can grow fast. Prune aggressively:
- - Archive older than 20 variants: prune bottom 25% by score (preserving ancestors of best)
- - Never let archive exceed 50 variants
+ ### 1. Meta-Agent Overfitting Its Own Strategy
+ **Symptom:** Meta-strategy becomes over-specialized to early successes
+ **Fix:** Periodically review and broaden the strategy; try categorically different approaches
- ### 2. Meta-Strategy Drift
- The agent may modify its meta strategy in ways that are counterproductive:
- - Keep a log of ALL meta strategy changes in improvements.md
- - If performance degrades after a meta-strategy change, revert it
- - Never allow meta-strategy changes more than once per 5 iterations
+ ### 2. Archive Bloat
+ **Symptom:** Archive grows large, selection becomes slow
+ **Fix:** Archive old generations after 50 variants; maintain a compact summary
- ### 3. Exploration Without Exploitation
- Diverse exploration is good, but not at the cost of never deepening a promising branch:
- - After finding a new best, always generate at least 2 children before exploring elsewhere
- - Track "exploitation ratio" — at least 40% of iterations should be children of top-3 variants
+ ### 3. Self-Modification Destabilizing the Loop
+ **Symptom:** Meta-agent modifies evaluation or logging in ways that break the loop
+ **Fix:** Keep outer-loop scripts (init, run, log, select) immutable. Only modify task code and strategy notes.
- ### 4. Cost Control
- Hyperagent uses more tokens than linear autoresearch:
- - Track cumulative token/API cost
- - Set hard budget limits in hyperagent.md
- - Default: 50 iterations max, 20 archive slots
+ ### 4. Hypothesis Recycling
+ **Symptom:** Later generations retry earlier failed ideas
+ **Fix:** Always read `.hyperagent/memory.jsonl` before proposing. Explicitly check against dead ends.
- ## Resume Behavior
+ ## Transfer Protocol
- When resuming:
- 1. Read `hyperagent.md`
- 2. Read `.hyperagent/archive.jsonl` and `.hyperagent/tree.json`
- 3. Read `.hyperagent/meta_strategy.md` (may have been modified by previous runs)
- 4. Read `.hyperagent/improvements.md` for context
- 5. Identify the current best and under-explored branches
- 6. Continue from the most promising frontier
+ To transfer meta-improvements to a new domain:
- ## Output
+ 1. Extract meta-strategy from `hyperagent.md` "What We've Learned" section
+ 2. Copy `.hyperagent/memory.jsonl` as starting knowledge
+ 3. Initialize new session with transferred strategy as initial context
+ 4. The meta-agent starts with accumulated wisdom instead of from scratch
- At the end of a session, produce:
+ ## Report Generation
- 1. **Best variant** — the code state with the highest score
- 2. **Best path** — the chain of changes from baseline to best
- 3. **Tree report** — visual HTML report of the exploration tree
- 4. **Learnings** — key insights from improvements.md
- 5. **Meta-strategy final state** — how the improvement strategy evolved
- 6. **Recommendation** — whether to continue exploring or ship the current best
+ ```bash
+ python3 scripts/render_report.py
+ ```
+
+ Generates `.hyperagent/report.html` with:
+ - Lineage tree visualization
+ - Performance over generations
+ - Best-so-far trend
+ - Disposition breakdown
+ - Per-variant trial distributions
+ - Meta-strategy evolution timeline