opencode/AGENTS.md
Кирилл Блинов c756a5766b Add RAG pipeline: LightRAG indexer, OpenCode API, VLM describer, and test tools
- Add rag_indexer.py: build LightRAG index from OCR with OpenCode API
- Add rag_query.py: query the knowledge graph
- Add vlm_describer.py: generate VLM descriptions via LM Studio
- Add test_model.py: quick check for LightRAG-compatible models
- Add run_pipeline.sh and run_pipeline.bat: full OCR → VLM → RAG pipeline
- Fix rapidocr import (rapidocr_onnxruntime)
- Fix process_any_pdf.py paths for cross-platform use
- Add .env.example, README_RAG.md, AGENTS.md
- Update .gitignore for outputs and secrets
2026-05-29 09:54:37 +03:00

48 lines
2.0 KiB
Markdown

# 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.