Add tracked README to apps/, crons/, scripts/, tasks/, .worktrees/ documenting each directory's intent, subfolders, and lifecycle. Codify the pattern as .claude/rules/directory-readme.md so future directories follow it. .gitignore now exempts only .worktrees/README.md (replacing the unused .gitkeep exemption); .claude/rules/git.md § Worktrees points to the new README and documents the .worktrees/project/<project-name>/<repo>/ slot for independent project clones (own .git, not harness branches); docs/architecture/container-runtime.md moves .worktrees/ into the canonical tree. context/IDENTITY.md gains three lessons from this session: README-over-.gitkeep for tracked-empty dirs, "treat X same as Y" interpretation discipline, and semantic-subfolder enumeration in directory READMEs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.5 KiB
1.5 KiB
scripts/
Orchestrator scripts that run on the host, not inside the sandbox. Provisioning, Ralph execution, and the cron runtime live here.
| File | Purpose |
|---|---|
install.sh |
Curl-piped installer — bootstraps a fresh harness checkout |
ralph.sh |
Ralph loop runner: scripts/ralph.sh [--harness=…] <taskdesc> |
cron-runtime.ts |
Croner runtime — scans crons/*.md, schedules, fires each job |
__tests__/ |
Vitest unit tests (vitest.config.ts at repo root targets this) |
Conventions
- Bash scripts use
set -euo pipefailand anERRtrap so silent exits surface asERROR:lines (seeinstall.shheader for the pattern). - TypeScript scripts are run via
tsxfrom the rootpackage.jsonscripts; tests run viapnpm test. - Scripts here are orchestrator-scope only. Anything an in-sandbox
agent needs lives under
workspace/orinstall/. PerCLAUDE.md, application code does not belong inscripts/.
Adding a script
- Drop it in
scripts/with a one-line purpose comment in its header. - Add a row to the table above.
- If it's TypeScript, add a unit test under
scripts/__tests__/. - If it's a long-running entry point, wire a
pnpmscript in the rootpackage.jsonrather than expecting users to invoke it directly.