Evaluate rendered packs against scenarios and author new gap-test scenarios with adversarial baseline gating. Use when asked to "write evals", "create gap-test scenarios", "evaluate the pack", "test the context", "rewrite eval scenarios", or "validate eval baselines". Uses subagent isolation to prevent context leaks between authoring and validation.
74
91%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Evaluate rendered packs against eval scenarios, and author new scenarios that prove context pack value. Two modes: run (measure pack delta) and author (write + validate gap-test scenarios).
An agent that writes a scenario knows the trap it designed. When it estimates baselines, it projects what it thinks the model will miss — not what actually happens. This produces fabricated baselines that collapse when measured.
The fix: the agent that writes the scenario never runs the baseline. A separate subagent with no knowledge of the trap's design runs the eval binary and reports raw numbers. The author sees the score, not the reasoning.
The eval runner ships with @themoltnet/cli:
$MOLTNET_CLI eval run --helpKey flags:
# Baseline (no context)
$MOLTNET_CLI eval run --scenario <path>
# With rendered pack (runs both variants, reports delta)
$MOLTNET_CLI eval run --scenario <path> --pack <rendered-pack.md>
# Override agent/judge/model
$MOLTNET_CLI eval run --scenario <path> \
--agent claude-code --judge claude-code \
-m anthropic/claude-sonnet-4-6
# Parallel with/without variants
$MOLTNET_CLI eval run --scenario <path> --pack <pack.md> --concurrency 2evals/<suite>/<scenario-name>/
├── eval.json # Mode + fixture injection
├── task.md # What the agent under test sees
├── criteria.json # Weighted checklist (scores must sum to 100)
├── rewrite-log.md # Author's intent log (NOT committed)
└── fixtures/ # Files injected into the eval worktree
└── *.ts, *.go, etc.See references/scenario-format.md for file format details and examples.
legreffier-explore produces a rendered packIf given a pack ID instead of a file, render it locally:
$MOLTNET_CLI pack render --preview <pack-id> --out /tmp/pack.mdRun evals — spawn a validate subagent per scenario (see Subagent contracts). Run subagents in parallel when scenarios are independent.
Collect results into a delta report:
| Scenario | Baseline | With pack | Delta |
|---|---|---|---|
| scenario-a | 20% | 75% | +55% |
| scenario-b | 90% | 95% | +5% |
Record results as a diary entry if DIARY_ID is available:
episodic for surprising results (large delta, regression, 0% with-context)semantic for stable findings about pack qualityscope:evals, scope:context-packs, eval:efficiencyRecommend refinements if specific criteria consistently fail with-context.
Read references/gap-test-principles.md before starting. It contains the five design principles and anti-patterns derived from real failures.
The loop uses an AUTHOR subagent for writing and the ORCHESTRATOR (main session) for baseline validation:
┌─────────────────────────────────────────────────┐
│ Orchestrator │
│ (this conversation — coordinates, gates, logs) │
│ │
│ 0. DISCOVER (vivo only) │
│ → browses diary for seed entries │
│ → follows relations to commits │
│ → validates fixture.ref │
│ → gathers context for AUTHOR │
│ │
│ 1. Spawns AUTHOR subagent(s) │
│ → receives scenario files + rewrite-log │
│ → for vivo: also receives discovery output │
│ → writes files, does NOT run evals │
│ → multiple authors can run in parallel │
│ │
│ 2. VALIDATE step (orchestrator runs directly) │
│ → runs eval command in main session │
│ → the orchestrator did not author the │
│ scenario (that was the subagent), so the │
│ measurement is not self-graded │
│ → returns: raw score + per-criteria pass/fail │
│ │
│ 3. Orchestrator compares intent vs result │
│ 4. Gates on baseline score │
│ 5. If gate fails: spawns AUTHOR again with │
│ score (not criteria breakdown) + iteration # │
└─────────────────────────────────────────────────┘
**Why the orchestrator validates, not a subagent:** Subagents inherit
restricted permissions and typically cannot run bash commands. The
orchestrator has bash access and — critically — did not author the
scenario. The authoring happened in a subagent with its own context,
so the orchestrator's measurement is not self-graded.
**Stronger isolation (optional):** The human can run the eval commands
themselves and paste the scores back. This is the cleanest separation
but slower. Use when you want maximum confidence in baselines.Skip this step for vitro scenarios. For vivo scenarios, the orchestrator
discovers the fixture.ref commit and gathers context from diary entries
before spawning the AUTHOR subagent.
Two discovery paths: diary-first (browse incidents/decisions → follow relations to commits → validate ref) and git-first (search git for a code state → check for diary trailers). Both converge at a validated ref
See references/fixture-ref-discovery.md for the full procedure with bash examples.
The author subagent receives:
evals/moltnet-practices/dbos-after-commit/)The author subagent produces:
task.md, criteria.json, eval.json, fixtures/*rewrite-log.md:## Iteration N
### Intent
- **Trap**: what incorrect pattern am I tempting the model toward?
- **Leak closed** (if rewrite): what hint did I remove vs previous iteration?
- **Expected failure**: which criteria should the model fail, and why?
- **Knowledge required**: what specific knowledge is needed that isn't
in the fixtures?The author subagent does NOT:
The orchestrator runs the eval command directly in the main session. This is safe because the orchestrator did not author the scenario — it was written by a subagent in a separate context.
Run at least 2 times for the gate check:
$MOLTNET_CLI eval run --scenario <path>
$MOLTNET_CLI eval run --scenario <path>After each run, read the trial_result.json from the output directory
(path printed by the command) and record:
Run 1: 55% — passed: [criterion_a, criterion_d], failed: [criterion_b, criterion_c]
Run 2: 70% — passed: [criterion_a, criterion_b, criterion_d], failed: [criterion_c]The orchestrator does NOT consult the rewrite-log before running baselines. Read the rewrite-log only AFTER collecting scores, during the gate check (Step 3).
The orchestrator (this conversation) applies the gate:
| Mean baseline | Action |
|---|---|
| ≤ 60% | PASS — scenario is a valid gap-test. Proceed to with-context validation. |
| 61-80% | MARGINAL — compare author's expected failures vs actual. If the model passed criteria the author expected it to fail, the scenario leaks information. Rewrite. |
| > 80% | FAIL — the model already knows the answer. Rewrite. |
If the gate fails, spawn a new AUTHOR subagent with:
If the gate passes, optionally run with-context validation:
$MOLTNET_CLI eval run --scenario <path> --pack <rendered-pack.md>When a scenario passes the gate:
rewrite-log.md (process artifact, not committed)AUTHOR (subagent): ORCHESTRATOR (main session):
────────────────── ──────────────────────────
✓ Project context ✗ Project context (doesn't read it for eval)
✓ Diary entries ✗ Diary entries (doesn't consult them)
✓ Rendered pack ✓ Rendered pack (only for with-context runs)
✓ Gap-test principles ✓ Gate rules + rewrite-log (after scoring)
✓ Gold standard scenario ✓ Scenario files (reads after author writes)
✓ Previous score (aggregate only) ✓ Per-criteria breakdown (from eval output)
✓ Discovery output (vivo only) ✓ Eval command + bash access
✗ Per-criteria breakdown ✓ Discovery (diary + git, vivo only)
✗ Eval commands ✗ Author's intent (until after scoring)See references/author-subagent-prompt.md for the full template. Key constraints:
evals/moltnet-practices/dbos-after-commit/ — scores 20% baseline.
Properties that make it work:
Study this before writing new scenarios.
When DIARY_ID is available, record eval results as diary entries:
After pack evaluation (run mode):
entry_type: episodic (if delta > 20% or delta < 0)
entry_type: semantic (if stable, expected results)
tags: [scope:evals, scope:context-packs, eval:efficiency, pack:<pack-id>]
importance: 7 (surprising results) or 5 (expected results)After scenario authoring:
entry_type: procedural
tags: [scope:evals, eval:gap-test-design, branch:<current-branch>]
importance: 6
content: scenario name, measured baseline, iteration count, key design choicesThis skill implements Phase 1 (local skill). Later phases:
5daa9ca
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.