← Table of Contents · Page 807 of 868
APPENDIX G: LAB SETUP GUIDE
Part 4 of 7
THE RECOMMENDED LAB REPOSITORY LAYOUT
This is the folder structure to build up over Chapters 65 through 69.
Do not create everything at once, and add each file when its chapter reaches it.
resume_review_agent/
main_loop.py: the core think, act, and observe loop, built in Chapter 65
tool_registry.py: the tools read_file, search_job_posting, and write_report, built in Chapter 65
permission_gate.py: restricts file access to the resumes and reports folders, built in Chapter 65
context_builder.py: selects and formats the relevant messages, built in Chapter 66
compaction.py: summarizes history once a token threshold is passed, built in Chapter 66
progress_notes.md: the scratchpad the agent maintains, created in Chapter 66
hooks.py: pre-execution, post-execution, validation, approval, and continuation hooks, built in Chapter 67
mcp_client_config.json: the connection to a local Model Context Protocol server, built in Chapter 67
tracing.py: span and trace instrumentation, built in Chapter 68
eval_set.json: the fifteen item evaluation dataset, built in Chapter 68
dashboard.py: a simple summary of success rate, cost, and latency, built in Chapter 68
supervisor.py, matcher_agent.py, and writer_agent.py: the multi-agent refactor, built in Chapter 69
model_adapter.py: the single doorway to the model, holding the scripted mock model, built in Chapter 65 and replaced in Chapter 69
hosted_gemini.py: optional code that connects the doorway to Google Gemini, built in Chapter 65, Step 3B
make_sample_data.py, make_more_data.py, make_injection_data.py, make_empty_data.py, and make_eval_set.py: scripts that write the fictional data and the evaluation set, built in Chapters 65 through 68
test_gate.py: the short test that tries to break the permission gate, built in Chapter 65
mini_mcp_server.py, mcp_client.py, and mcp_demo.py: the teaching tool server, its client, and a demonstration, built in Chapter 67
routing.py: model tiers and the cost ledger, built in Chapter 69
eval_runner.py: runs the evaluation set and scores it, built in Chapter 68 and replaced in Chapter 69
sample_data/
resume_01.txt through resume_25.txt: fictional resumes, built in Chapters 65 and 66
job_posting.txt: the fictional job posting, built in Chapter 65
resume_injection_test.txt: the planted prompt injection sample, built in Chapter 67
resume_empty.txt: the planted runaway loop trigger, built in Chapter 68
reports/: written by the agent at run time
logs/: structured run logs and traces, written at run time
Advertisement
Read Aloud:
0:00 / 0:00