This document describes how to safely and effectively use OpenCode (or other AI coding assistants) with this repository. The goal is to avoid accidental modifications to sensitive files while making productive changes.
opencode
# or on a specific task:
opencode --prompt "Add a backup script to this project"- Ensure the working tree is clean:
git status - If you have uncommitted work, either commit it or stash it before asking for AI help.
- Know which files you want the AI to touch (and which it must NOT touch).
Always include relevant context from AGENTS.md in your prompt, or reference these files explicitly:
Read AGENTS.md first. Then read PROJECT_STATUS.md, ROADMAP.md, and SECURITY_REVIEW.md.
Do NOT modify .env, data/, or existing scripts/*.sh (init-env.sh, create-band-structure.sh).
scripts/ai-test.sh # validate everything
git diff # review changes carefully
git diff --stat # quick file summarygit add <intended files>
git commit -m "description of change"Never commit .env or data files.
| Script | Purpose |
|---|---|
scripts/ai-test.sh |
Validate compose files + lint shell scripts |
scripts/ai-task.sh |
Run OpenCode with a task description, guided by AGENTS.md |
scripts/ai-review.sh |
Review current diff with OpenCode without editing |
Read AGENTS.md. The docker-compose.yml has no healthcheck for the app service.
Add one: check http://localhost:80/status.php every 30s. Do NOT modify anything else.
Run scripts/ai-test.sh after making the change.
Read AGENTS.md and ROADMAP.md. Implement a backup script (scripts/backup.sh) that:
- Dumps the MariaDB database using mysqldump
- Tars the nextcloud data directory
- Saves to ./backups/ with a timestamp
- Rotates backups older than 14 days
Run scripts/ai-test.sh after.
Read AGENTS.md and SECURITY_REVIEW.md. Review the docker-compose.yml for any security
issues. Report what you find without making any changes.
.env(secrets, gitignored)data/(runtime state, gitignored).git/(version control internals)
scripts/init-env.shscripts/create-band-structure.sh
Unless the user explicitly asks you to modify them.