Section 6.9 experiment: A 100-line minimal Coding Harness in pure Python stdlib (with safe_path boundary check, 3 atomic tools, SKILL.md progressive disclosure, and a 6-turn live repair trajectory)
| File / folder | Description | Size |
|---|---|---|
| 📁 ../ | Up one level | - |
| 📁 sample_output/ | Subfolder | - |
| 📁 workspace/ | Subfolder | - |
| 📄 README.md | 2.1 KB | |
| 📄 mini_harness.py | 6.5 KB |
This experiment implements a complete, minimal coding harness in under 170 lines of pure Python standard library code (zero third-party dependencies):
read_file, write_file, and bash (with safe_path workspace boundary checks and a 15-second command timeout).workspace/.agents/skills/*/SKILL.md and injects only a one-line summary (< 50 tokens) into the system prompt. When the model sees a task related to a Skill, it calls read_file on demand to read the full SKILL.md checklist.messages until all unit tests and ledger reconciliation checks pass.Only the Python 3 standard library and an AI Builder Space API key. It runs on any machine.
cd 6_9_mini_harness
export AI_BUILDER_TOKEN=sk_your_key
python3 mini_harness.py
You can also pass a custom instruction:
python3 mini_harness.py --task "Add a max_discount=50.0 cap parameter to settle_order in settlement.py, and add a unit test that passes"
By default, the task asks the agent to fix the order settlement function in workspace/settlement.py. When you run it, you will see a complete 6-turn closed-loop trajectory (a reference log is saved in sample_output/deepseek_run.txt):
read_file to read .agents/skills/settlement-reconcile/SKILL.md.settlement.py, test_settlement.py, and verify_ledger.py, then runs bash to reproduce the two bugs (premature per-item rounding and pre-discount coupon threshold checking).write_file to fix the code, then runs both unittest and verify_ledger.py in bash as required by the SKILL.md checklist.exit_code=0, it outputs the final summary and exits the loop.