- 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
2.0 KiB
2.0 KiB
Agent Guidelines for opencode
Project Overview
Python utilities for PDF processing and index building. Main scripts:
build_index.pyprocess_pdf.pyprocess_pdf_full.pyprocess_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
masterif 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, orgit commitunless explicitly asked. - If asked to commit, inspect
git statusandgit difffirst, then confirm with the user before pushing.
Pull & Sync
- Before starting work, run
git pull origin masterto 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.jsonorrequirements.txtis 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.