name: study-file-organization description: Directory structure, naming conventions, and git workflow for organizing studies.
Study File Organization & Rules
Complete reference for how to organize files, directories, and git workflow when running studies.
Directory Layout
All work lives in sessions/. Inside sessions, files are organized by topic (a general area of study). Each topic gets a directory with a descriptive alias derived from the user's request.
Example: "I want to study status quo bias among older people" → topic_status-quo-bias-age
If the directory already has topic folders, make sure your topic name is unique.
Within each topic, create one or more studies — self-contained collections of files that do something (create an agent list, run a simulation, etc.). Studies are named with snake-case post-fix indices: _a, _b, etc.
sessions/
topic_<alias>/
README.md
.git
study_a/
study_b/
study_c/
Creating a Study
Use the create_study_project.py tool to scaffold the structure:
python create_study_project.py sessions/topic_<alias>/<study_name>
This produces:
.git
README.md
requirements.txt
Makefile
refs/
DOCKERFILE
data/
raw/
.gitkeep
cooked/
.gitkeep
uploaded/
.gitkeep
edsl_jobs/
job_a/
study_agent_list.py
study_scenario_list.py
study_model_list.py
run_job.py
job_b/
…
analysis/
computed_objects/
writeup/
planning.md
report.md
report.css
appendix.md
tables/
plots/
numbers/
Report Formatting
CSS: Copy the Expected Parrot branded stylesheet into every study's writeup directory:
cp /Users/johnhorton/tools/ep/macaw/ep-agent/report.css <study_root>/writeup/report.css
The Makefile's report.html target must use --css=report.css to apply this stylesheet. Use this template for the report targets:
# --- Report ---
writeup/report.html: writeup/report.md PLOTS TABLES
cd writeup && pandoc report.md -o report.html --standalone --css=report.css
writeup/report.pdf: writeup/report.md PLOTS TABLES
cd writeup && pandoc report.md -o report.pdf --pdf-engine=xelatex
report: writeup/report.html writeup/report.pdf
No duplicate title: The report.md file uses a YAML frontmatter block with title: and date:. Pandoc renders the title as an H1 heading automatically. Do NOT also include an # H1 heading in the body — this causes the title to appear twice. Start the body with ## Summary or another H2.
Correct format:
---
title: "My Study Title"
date: 2026-01-15
---
## Summary
The body starts here with an H2...
Wrong format (title appears twice):
---
title: "My Study Title"
date: 2026-01-15
---
# My Study Title
## Summary
...
Rules
Always create this file structure for each study and do a
git init. Also createchecklist.md(seeskills/study-checklist/SKILL.md).Use README.md as your lab notebook — write what you did at each step:
PURPOSE Author Timestamp LOG EntriesGit-add every new file immediately after creating it.
All file interactions are git-mediated. At good stopping points, create a detailed git commit.
IMPORTANT: The Makefile runs EDSL scripts from
edsl_jobs/(cd edsl_jobs && python ...). All git commands must be run from the study root (the directory containing the Makefile). Alwayscdback to the study root and verify your working directory before anygit add/git commit.Do not run Python files directly. Write scripts into
analysis/and wire them into the Makefile. Usemaketargets to execute them (e.g.,make plots,make writeup/report.html). Analysis scripts create plots/tables written towriteup/tablesorwriteup/plots.Snake-case names for outputs. Name scripts after what they produce:
table_growth_over_time.py→writeup/tables/growth_over_time.csvplot_growth_over_time.py→writeup/plots/growth_over_time.png- Each has a corresponding Makefile recipe.
PLOT and TABLES phony targets in the Makefile are dependencies for the overall report.
Follow-up studies use
git subtreeto pull predecessors intorefs/.IMPORTANT: Both repos must have at least one commit before adding a subtree.
Step-by-step:
- Ensure the predecessor has at least one commit:
git -C <path_to_predecessor> log --oneline -1 - Create the new study and make an initial commit
- From inside the new study's git repo:
git subtree add --prefix=refs/<predecessor_study_name> <absolute_path_to_predecessor> main --squash - Verify:
ls refs/<predecessor_study_name>/ - If any step fails, log the error to
errors.jsonl(seeskills/error-logging/SKILL.md) immediately, then fix and retry
- Ensure the predecessor has at least one commit:
Intermediate datasets (transformed raw data, fitted models, etc.) go in
computed_objects/.Add packages to
requirements.txtas needed.EDSL code goes in the
edsl_jobs/directory. Readskills/edsl-study-files/SKILL.mdfor the standard file templates and export conventions.User-uploaded data goes in
data/uploads. Data is also added to the repo unless too large.Use the SearchExpectedParrot tool to search Expected Parrot for EDSL objects. Use it directly instead of writing Python scripts with
Coop().list().Single report file rule: Only ONE report markdown in
writeup/— that isreport.md. To elaborate on results or extend the report, editreport.mdrather than creating new files. Allowed.mdfiles inwriteup/:report.md,survey.md(auto-generated),planning.md(working notes),appendix.md(supplementary material). After any analysis run, runpython check_writeup.py <study_dir>to verify compliance.