Semi-automatic suite: the agent runs inside CodeForge; check scores with hidden tests + session metrics.
Quick harness smoke (node). Good for catching retrieve/read loops; not your real C# workload.
Closer to ContextRouter: dotnet test, classlibs, docs-driven features, VIP navigation, and a scaffold task (create solution from a C01 card).
npm run bench -- list
npm run bench -- setup CS1 --label bonsai --open # or CS2 / CS3 / CS4
# New Chat in that folder → bonsai → paste the printed prompt
npm run bench -- check latest
npm run bench -- report
npm run bench -- selftest CS # validates fixtures + solutions
# Headless (uses active server/model from ~/.CodeForge/ai/settings.json)
npm run build:extensions
node benchmarks/bench.mjs run T1 --label baseline-qwen35b
# Optional: --server <id> --model <id> --weak off
# Calibrate one model (harness classifies weak vs strong from protocol)
node benchmarks/bench.mjs calibrate --model qwen3.6-35b --reps 3
# Optional lab A/B:
node benchmarks/bench.mjs calibrate --weak-model qwen3.6-35b --strong-model Qwen3-32B-exl3-4.0bpw --reps 3In the app: CodeForge Settings → Benchmark (pick Model → Run). Suite packaged at resources/calibrate-bench/ via npm run sync:calibrate-bench.
Headless results include loopExit, steps, refusals, protocol (parse/tool-name failures), and toolCallMode (native | content | none). Protocol counters are also appended to ~/.CodeForge/ai/model-profiles/<server>/<model>/runs.jsonl (rollup in rollup.json).
Score (0–100): hidden 60 · visible 15 · protected untouched 10 · checks 10 · no junk files 5.
- CS5 (review): 6 bugs planted in
billing-bugs(visible tests still pass). The agent writesBUGS.mdwithpath:linereferences; the manifest lives intasks/CS5-review-billing-bugs/bugs.manifest.json(outside the fixture). Score: F1 × 80 · protected 10 ·BUGS.mdexists 10 (±3 line tolerance). - CS6 (long): cards C01–C05 with "Depends on:" lines. Hidden tests run per card (only that card's tests are compiled in); the hidden ratio is the average over cards.
Every result also reports falseDone (the agent claimed green while tests were red) and
harness (chars of harness text injected into the conversation).
Tasks that test the ability to find and understand code:
- "Where is X defined?"
- "Who calls function Y?"
- "Show me all implementations of interface Z"
Tasks that test the ability to identify and fix bugs:
- Error message diagnosis
- Logic error correction
- Type error fixes
Tasks that test the ability to implement new functionality:
- Add new API endpoint
- Create new component
- Implement business logic
Tasks that test the ability to improve code structure:
- Extract function/class
- Rename with all references
- Move code between files
Tasks that test the ability to create tests:
- Unit test generation
- Integration test generation
- Edge case identification
Tasks that test code understanding:
- "How does X work?"
- "What is the data flow?"
- "Explain the architecture of Y"
Tasks that test Git intelligence:
- "What changed recently?"
- "Who broke this test?"
- "Summarize PR changes"
- Success Rate: Percentage of tasks completed correctly
- Time to Success: Average time to complete tasks
- Edit Acceptance Rate: Percentage of AI edits accepted by user
- Test Pass Rate: Percentage of generated tests that pass
- Correction Count: Number of corrections needed per task
- Tokens Consumed: Total tokens used per task
- Latency: Response time measurements
- Context Retrieval Precision: Quality of retrieved context
- Security Violations: Number of policy violations
# Run all benchmarks
npm run benchmark
# Run specific category
npm run benchmark -- --category=bugfix
# Run with specific model
npm run benchmark -- --model=gpt-4o- Create a new JSON file in the appropriate category folder
- Follow the schema:
{
"id": "unique-id",
"category": "bugfix",
"difficulty": "medium",
"description": "Fix the null pointer exception",
"setup": {
"files": {
"src/example.ts": "..."
}
},
"expected": {
"files_modified": ["src/example.ts"],
"test_command": "npm test",
"validation": "..."
}
}