Spaces:
Paused
Paused
|
Download .agents/AGENTS.md from paras9909/opticparse-python: direct link, hf CLI and curl.
- Browser
- Download file 2.56 kB
-
https://huggingface.co/spaces/paras9909/opticparse-python/resolve/main/.agents/AGENTS.md
- Command line
-
hf download hf://spaces/paras9909/opticparse-python/.agents/AGENTS.md
-
curl -L -o AGENTS.md https://huggingface.co/spaces/paras9909/opticparse-python/resolve/main/.agents/AGENTS.md
2.56 kB
Project-Wide Agent Rules — OpticParse Monorepo
These rules apply to ALL agents working in this repository, regardless of which service they are modifying.
Repository Structure
This is a polyglot monorepo containing two independent microservices:
| Service | Language | Directory | Render URL |
|---|---|---|---|
| OpticParse | Python / FastAPI | Repository root | opticparse-python-sg.onrender.com |
| PhishVision | TypeScript / Express | opticparse-js/ |
opticparse-1opticparse-node-sg.onrender.com |
Strict Isolation Rules
- Never cross service boundaries. If you are fixing OpticParse, do NOT
touch files inside
opticparse-js/. If you are fixing PhishVision, do NOT touchserver.pyor other root-level Python files. render.yamlownership: Lines 1–19 belong to OpticParse. Lines 21–39 belong to PhishVision. Never edit the other service's block.
Git Workflow
- Never push directly to
main. Always create afix/<service>-<description>branch. - Use conventional commit format:
fix(opticparse): <description>for bug fixesfeat(opticparse): <description>for new featureschore(opticparse): <description>for maintenance- Replace
opticparsewithphishvisionfor the Node service.
- After pushing, create a Draft Pull Request and halt for user review.
Security Rules
- Never commit
.envfiles. They contain API keys and database credentials. - Never log API keys — not even partially. Use
***masking if needed. - Never hardcode secrets in source code. Always use
os.getenv()(Python) orprocess.env(TypeScript).
Testing Requirements
- Python (OpticParse): Run
python -m pytest test_server.py -vbefore committing. - TypeScript (PhishVision): Run
npx tsc --noEmitbefore committing. - If any test or compilation fails, fix it before committing. No exceptions.
AI Provider Rotation
Both services share the same set of free AI provider API keys. When adding or modifying providers:
- Follow the existing data structure (
AI_PROVIDERSdict in Python,AIProviderinterface in TypeScript). - Add new providers to the END of the rotation list.
- Update BOTH services if a provider key changes or a model is deprecated.
Documentation
- Preserve all existing comments and docstrings unless directly related to your code change.
- New public endpoints must include OpenAPI documentation.
- Update
README.mdif adding new endpoints or changing the API contract.