Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

agent: a contradictory path is decided by evidence in order, not by its spelling alone

killbilla12808449c31
diff --git a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md
index 2d0085dfcb..adaeb24ccc 100644
--- a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md
+++ b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md
@@ -29,6 +29,6 @@ First match wins:
- A hypothesis about the data's unit, axis, column order or encoding is tested, not argued: transform the data and compare with a value the request fixes (a known peak position, a documented constant, a sample output, a count). A candidate reading is one the file's own structure allows (its column count, declared format, the range and ordering of its values); among those, the one that reproduces the fixed value is the one to use, and you say which you chose and what ruled the others out. A result far from a value the request implies is a reason to re-check the unit, axis and columns, never a licence to adjust the data: when no reading reproduces the fixed value, report the discrepancy as measured and say which readings you tried.
- Think in the workspace, not in your head. A derivation longer than a few lines — reverse-engineering a format, matching an encoder to a decoder, working out an invariant, tracing what a program does on an input — goes into a scratch file or a small program as you go, and gets checked against the real thing before you build on it. Reasoning at length before acting costs the whole step when it runs out of budget, and a mental trace is the kind of check that is wrong most often.
- In your first steps, write down the acceptance contract: the exact paths, file names, commands, ports, output format, allowed and forbidden elements, thresholds and reference tools the request names. Tests, verifier scripts or a named reference tool are the source of truth over any metric of your own. Everything you do is judged against that contract, not against your approach.
-- Where the request describes one thing two ways — an argument called a folder in one sentence and the file to save in another, a format shown one way and named another — do not choose: implement so that every reading is satisfied, and test each. A path whose value carries a file extension is that file, whatever the prose around it calls it; a value without one is a directory.
+- Where the request describes one thing two ways — an argument called a folder in one sentence and the file to save in another, a format shown one way and named another — do not choose: implement so that every reading is satisfied, and test each. Where one path cannot be both, let the evidence decide in this order: the request's own test, verifier or example call; the form of the value it shows (a value with a file extension is being used as a file); and the prose label last, because the prose is where the contradiction lives.
- Checks must mirror how the task is specified or graded; a test derived from your own implementation proves nothing.
- Never delete state, data or services the solution needs at runtime, cleanup included. Verify the final state as a fresh consumer would see it.
diff --git a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt_tests.rs
index 7045f75654..50ae3e60c8 100644
--- a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt_tests.rs
@@ -56,7 +56,7 @@ fn render_installed_skills_lists_skills_and_names_the_hand_offs_it_is_given() {
);
assert!(
ARCHETYPE.contains("implement so that every reading is satisfied")
- && ARCHETYPE.contains("carries a file extension is that file"),
+ && ARCHETYPE.contains("let the evidence decide in this order"),
"the satisfy-every-reading rule is part of the archetype"
);
assert!(out.contains("- **ascii-art**: ASCII art via pyfiglet"));
diff --git a/crates/openhuman-core/src/agent/tinyagents/verify_before_finish.rs b/crates/openhuman-core/src/agent/tinyagents/verify_before_finish.rs
index 24e14aadbb..7e5491929f 100644
--- a/crates/openhuman-core/src/agent/tinyagents/verify_before_finish.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/verify_before_finish.rs
@@ -44,9 +44,11 @@ expected errors and side effects, and cite evidence from the final environment.
count only if derived from the request, not from your own approach.\n\
3. Where a sentence allows two readings, examine both against the surrounding requirements. \
Apply the literal rule where it resolves the ambiguity; where both readings can be satisfied \
-at once, make the result satisfy both and test each (a path argument whose value has a file \
-extension is a file, one without is a directory); otherwise check both readings and \
-state any remaining uncertainty instead of treating a check of your guess as proof.\n\
+at once, make the result satisfy both and test each. Where they cannot (one path called a \
+folder and a file), let the evidence decide in this order: the request's own test, verifier \
+or example call; the form of the value it shows (a value with a file extension is being used \
+as a file); the prose label last. Otherwise check both readings and state any remaining \
+uncertainty instead of treating a check of your guess as proof.\n\
4. Find equivalent paths or workflows that perform the same action and verify that their \
required outcomes, notifications and state changes are consistent.\n\
5. Where the result will face inputs you have not seen (a hidden test set, \"all\" or \"any\" \
diff --git a/crates/openhuman-core/src/agent/tinyagents/verify_before_finish_tests.rs b/crates/openhuman-core/src/agent/tinyagents/verify_before_finish_tests.rs
index 2ceba6f7c6..26799f2ce4 100644
--- a/crates/openhuman-core/src/agent/tinyagents/verify_before_finish_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/verify_before_finish_tests.rs
@@ -168,7 +168,8 @@ fn check_is_a_harness_instruction_that_names_the_spec_rules() {
"Once every check the contract names passes",
"named test still failing or never run",
"make the result satisfy both and test each",
- "has a file extension is a file",
+ "let the evidence decide in this order",
+ "the prose label last",
] {
assert!(check.contains(needle), "check must mention `{needle}`");
}