# Agent Guidelines for `opencode` ## Project Overview Python utilities for PDF processing and index building. Main scripts: - `build_index.py` - `process_pdf.py` - `process_pdf_full.py` - `process_any_pdf.py` ## Repository Location - **Local path:** `/Users/kirillblinov/development/opencode/OCR/opencode` - **Remote (Gitea):** `https://gts.meratalk.online/keboss/opencode.git` ## Git Rules ### Branching - Default branch: `master` - Create feature/fix branches from `master` if needed. - Prefer short-lived branches; merge back via PR or explicit request. ### Commits - Write concise, meaningful commit messages in English or Russian (match repo style). - Stage only relevant files; never commit secrets or large binaries. - Do **not** run `git push`, `git reset`, `git rebase`, or `git commit` unless explicitly asked. - If asked to commit, inspect `git status` and `git diff` first, then confirm with the user before pushing. ### Pull & Sync - Before starting work, run `git pull origin master` to ensure the latest state. - If there are local changes and the remote has moved, ask the user how to proceed (stash, merge, or reset). ### Remotes - Primary remote: `origin` → `https://gts.meratalk.online/keboss/opencode.git` - Do not add new remotes without user confirmation. ## Environment & Runtime - This is a Python project; no `package.json` or `requirements.txt` is present. - Use system Python or a virtual environment if dependencies are needed. - Do not install packages globally without user confirmation. ## File Handling - **Ignore patterns (`.gitignore`):** `*.pdf`, `output/*.png`, `output_123/*.png`, `__pycache__/`, `*.pyc`, `.DS_Store`, `Thumbs.db` - Do not commit generated outputs (PNGs, PDFs, caches). - Keep source scripts clean and avoid hardcoding absolute paths when possible. ## Communication - If you need to modify repository configuration (`.git/config`, hooks, etc.), ask the user first. - Always summarize what changed before and after any git operation.