mirror of
https://github.com/Sea-Haven-Industries/pr-reviewer.git
synced 2026-09-30 02:13:14 +00:00
Feed the reviewer a distilled digest of the Sea Haven engineering-handbook so findings reflect our naming, commit, PR, secrets, and IaC conventions instead of generic code-review judgment. A new handbook module keeps an app-managed shallow clone of the (private) handbook, distills the review-relevant pages into a compact conventions checklist via the Fireworks model once a day, caches it under ~/.cache, and hands it to the reviewer to inject into every review's system prompt. The refresh runs in-process at the start of each worker cycle; failures keep the last good digest and back off, so a handbook outage never blocks reviews. Set HANDBOOK_ENABLED=false to disable. Extract a shared fireworks_complete helper used by both the reviewer and the distiller, so the handbook provider needs no reviewer reference and the guidance callable is set once at construction. Clone auth uses a Basic http.extraHeader (GitHub git-over-HTTPS rejects Bearer), and the distiller wraps its answer in delimiters to strip a reasoning model's chain-of-thought preamble. Adds GET /api/handbook and a header status line. Stdlib-only, no new dependencies.
19 lines
318 B
Text
19 lines
318 B
Text
# Secrets and local env
|
|
.env
|
|
|
|
# Local review cache (SQLite + WAL/SHM sidecars)
|
|
pr_cache.db
|
|
pr_cache.db-*
|
|
|
|
# Handbook clone/digest, only if configured repo-local (default is ~/.cache/pr-reviewer)
|
|
handbook_cache/
|
|
handbook_digest.json
|
|
|
|
# Python virtualenv and caches
|
|
.venv/
|
|
__pycache__/
|
|
*.pyc
|
|
*.pyo
|
|
|
|
# OS cruft
|
|
.DS_Store
|