import os
base_dir = "/mnt/agents/output/artifacts/by-end-of-August"
Create the directory structure first
os.makedirs(f"{base_dir}/01-real-life", exist_ok=True)
os.makedirs(f"{base_dir}/02-farming-sim", exist_ok=True)
os.makedirs(f"{base_dir}/03-notes", exist_ok=True)
os.makedirs(f"{base_dir}/backups", exist_ok=True)
1. Main instructions file
instructions = """# Instructions for Workspace
Directory Structure (by-end-of-August)
01-real-life
Purpose: Store real-life artifacts, observations, and field data.
Guidelines: Keep raw data separate from processed outputs.
02-farming-sim
Purpose: Farming simulation outputs, configs, and results.
Guidelines: Version all simulation parameters. Tag runs with dates.
03-notes
Purpose: General notes, meeting minutes, and scratch pads.
Guidelines: Use dated filenames (YYYY-MM-DD-topic.md). Archive monthly.
backups
Purpose: Automated and manual backups of the above.
Guidelines: Retain 30-day rolling window. Compress archives older than 7 days.
Sender Directives
- All files must include a timestamp header.
- Use consistent naming: kebab-case for files, snake_case for internal refs.
- Cross-reference between 01, 02, and 03 using relative paths.
- Backups run at 23:59 UTC daily — do not modify backup/ during the window.
- Report completion status to sender before each subfolder exceeds 100 MB.
"""
with open(f"{base_dir}/INSTRUCTIONS.md", "w") as f:
f.write(instructions)
2. Directive file for sender
directives = """# DIRECTIVES — To Sender
Operational Directives
- D1: Verify directory permissions before each write batch.
- D2: Log all file creations in 03-notes/activity-log.md.
- D3: Notify on completion or failure within 5 minutes.
- D4: Maintain read-only mirrors in backups/ after each session.
- D5: Do not delete — archive and mark with
.archived suffix.
Communication Protocol
- Status updates go to sender via the agreed channel.
- Use directive codes (D1–D5) when referencing rules.
- Escalate permission issues immediately; do not retry silently.
"""
with open(f"{base_dir}/DIRECTIVES.md", "w") as f:
f.write(directives)
3. Per-folder directive stubs
for folder, desc in [
("01-real-life", "Real-life data ingestion directives"),
("02-farming-sim", "Simulation run directives"),
("03-notes", "Note-taking and logging directives"),
("backups", "Backup and recovery directives")
]:
stub = f"# {desc}\n\nSee ../INSTRUCTIONS.md and ../DIRECTIVES.md for full protocol.\n\n## Folder-Specific Rules\n- Created: 2026-08-03\n- Owner: sender\n- Review cycle: weekly\n"
with open(f"{base_dir}/{folder}/README.md", "w") as f:
f.write(stub)
print("Created:")
for root, dirs, files in os.walk(base_dir):
level = root.replace(base_dir, '').count(os.sep)
indent = ' ' * 2 * level
print(f'{indent}{os.path.basename(root)}/')
subindent = ' ' * 2 * (level + 1)
for file in files:
print(f'{subindent}{file}')
import os
base_dir = "/mnt/agents/output/artifacts/by-end-of-August"
Create the directory structure first
os.makedirs(f"{base_dir}/01-real-life", exist_ok=True)
os.makedirs(f"{base_dir}/02-farming-sim", exist_ok=True)
os.makedirs(f"{base_dir}/03-notes", exist_ok=True)
os.makedirs(f"{base_dir}/backups", exist_ok=True)
1. Main instructions file
instructions = """# Instructions for Workspace
Directory Structure (by-end-of-August)
01-real-life
Purpose: Store real-life artifacts, observations, and field data.
Guidelines: Keep raw data separate from processed outputs.
02-farming-sim
Purpose: Farming simulation outputs, configs, and results.
Guidelines: Version all simulation parameters. Tag runs with dates.
03-notes
Purpose: General notes, meeting minutes, and scratch pads.
Guidelines: Use dated filenames (YYYY-MM-DD-topic.md). Archive monthly.
backups
Purpose: Automated and manual backups of the above.
Guidelines: Retain 30-day rolling window. Compress archives older than 7 days.
Sender Directives
"""
with open(f"{base_dir}/INSTRUCTIONS.md", "w") as f:
f.write(instructions)
2. Directive file for sender
directives = """# DIRECTIVES — To Sender
Operational Directives
.archivedsuffix.Communication Protocol
"""
with open(f"{base_dir}/DIRECTIVES.md", "w") as f:
f.write(directives)
3. Per-folder directive stubs
for folder, desc in [
("01-real-life", "Real-life data ingestion directives"),
("02-farming-sim", "Simulation run directives"),
("03-notes", "Note-taking and logging directives"),
("backups", "Backup and recovery directives")
]:
stub = f"# {desc}\n\nSee ../INSTRUCTIONS.md and ../DIRECTIVES.md for full protocol.\n\n## Folder-Specific Rules\n- Created: 2026-08-03\n- Owner: sender\n- Review cycle: weekly\n"
with open(f"{base_dir}/{folder}/README.md", "w") as f:
f.write(stub)
print("Created:")
for root, dirs, files in os.walk(base_dir):
level = root.replace(base_dir, '').count(os.sep)
indent = ' ' * 2 * level
print(f'{indent}{os.path.basename(root)}/')
subindent = ' ' * 2 * (level + 1)
for file in files:
print(f'{subindent}{file}')