import sys import os def load_harness(name): path = f"harness/{name}.md" if not os.path.exists(path): return f"Harness '{name}' not found at {path}" with open(path, 'r') as f: content = f.read() # Extract the content between ## Context and ## Reference Anchors lines = content.split('\n') harness_body = [] in_body = False for line in lines: if line.startswith("## Context"): in_body = True continue if line.startswith("## Core Quirks") and in_body: # We keep the quirks section pass if line.startswith("## Reference Anchors") and in_body: break if in_body: harness_body.append(line) return "\n".join(harness_body) if __name__ == "__main__": if len(sys.argv) < 2: print("Usage: python3 harness/loader.py ") else: print(load_harness(sys.argv[1]))