thinkingbox
CLAUDE.md89 starsChanged 7 months agoMITView on GitHub
A test case includes: - definition of a task for an agent to complete - test code to verify that the task was completed successfully Test cases are part of a ThinkingBox dataset, they are distinct from unit tests. This section only applies to test cases. You'll see tests like this: There are several parts to this test: Good tests should test meaningful side effects from running the test case. They should allow the model to be flexible in how…
The file
Show its rules and text
We split this Claude.md into the rules it gives an agent
14 rules. About 0 are common, 9 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 4
Use lowercase type annotations, compatible with python 3.10+
- Very specific: line 6
Always run python using uv, like uv run python ...
- Distinctive: line 13
test code to verify that the task was completed successfully
- Very specific: line 15
Test cases are part of a ThinkingBox dataset, they are distinct from unit tests.
- Distinctive: line 52
Not all existing tests meet this definition of good.
- Distinctive: line 56
If you are asked to make a test "goldilocks" or between 20% or 80% of success, then here are some tips:
- Very specific: line 58
Use a command like uv run tb infer -c config/config_o4mini.yaml --dataset ./dataset --agent think --name …
- Very specific: line 59
Use a command like uv run tb agg <unique file> to read the file and aggregate success rate.
- Very specific: line 61
If you get timeouts on infer then rerun infer.
- Distinctive: line 67
If the judge is the reason for failures, consider removing it IF you have good coverage of what happened.
- Distinctive: line 68
If the judge is the reason for failures, you should determine if the deterministic assertions really validate the scenario.
- Distinctive: line 70
Add additional tools to the scenario that are not needed as "decoys"
- Distinctive: line 74
If a test is too easy, make a plan for realistic scenarios that are harder before executing.
- Distinctive: line 78
When adding rubric criteria to a test, especially penalty rubrics, describe specific, observable violations that can be detected directly …
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Guidelines
- This project uses Pydantic version 2
- Use lowercase type annotations, compatible with python 3.10+
- This project uses pytest for unit tests; use test functions, not test classes
- Always run python using uv, like
uv run python ...
Test cases
A test case includes:
- definition of a task for an agent to complete
- test code to verify that the task was completed successfully
Test cases are part of a ThinkingBox dataset, they are distinct from unit tests. This section only applies to test cases.
Anatomy of a test case
You'll see tests like this:
"""!
scenario: sales_rep_email
"""
def test_generate_outreach_email(x: TestContext, judge: Judge):
"""!
query: |
Can you send a personalized email to this prospect?
user_context: |
Name: Alex Johnson
"""
assert len(x.tool_calls) == 1, "Expected one tool call to generate_outreach_email"
# Must include proper greeting with name
assert judge.text_yesno(
x.response,
"Does the email properly greet Alex Johnson by name?",
)There are several parts to this test:
- the scenario
sales_rep_emailis a yaml file that has content about this test. - the query is the test case itself.
- the user_context is used in a user model to simulate a user with more info.
Good Test Definitions
Good tests should test meaningful side effects from running the test case. They should allow the model to be flexible in how it answers a question.
Not all existing tests meet this definition of good.
Modifying tests
If you are asked to make a test "goldilocks" or between 20% or 80% of success, then here are some tips:
- Use a command like
uv run tb infer -c config/config_o4mini.yaml --dataset ./dataset --agent think --name gdrive.py:test_create_folder_and_organize --repeat 20 --batch-size 20 --dump raw --output <unique file>to execute the test. - Use a command like
uv run tb agg <unique file>to read the file and aggregate success rate.
If you get timeouts on infer then rerun infer. If there are not 20 results in the batch then rerun.
The best ways to make an example more complex are:
- More realistic or stricter criteria that you check.
- More ambiguous (but still achievable) goals.
- Data can be added to make search/retrieval tasks harder.
- If the judge is the reason for failures, consider removing it IF you have good coverage of what happened. Judges can be less reliable than deterministic checks.
- If the judge is the reason for failures, you should determine if the deterministic assertions really validate the scenario. Focus on high quality questions and high quality deterministic checks.
- Tests that are underspecified are tests where the query + user_context is not sufficient to correctly accomplish the task. These should be avoided. If a test is underspecified then the right outcome is for the agent to ask the user for more information, not to guess. These tests are rarely goldilocks.
- Add additional tools to the scenario that are not needed as "decoys"
See the docs folder for information about how tests are constructed.
If a test is too easy, make a plan for realistic scenarios that are harder before executing.
Writing Rubric Criteria
When adding rubric criteria to a test, especially penalty rubrics, describe specific, observable violations that can be detected directly from the response. Avoid double negatives and vague phrasing. See docs/rubrics_judge.md for detailed guidance and examples.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

