Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
backend:
name: Backend (typecheck, test, build)
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/backend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: apps/backend/package-lock.json
- run: npm ci
- run: npm run typecheck
- run: npm test
- run: npm run build

frontend:
name: Frontend (lint, typecheck, build)
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: apps/frontend/package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run build

schema:
name: Report schema in sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- run: node scripts/sync-report-schema.mjs --check
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ tmp/*
!tmp/.gitkeep

demo
logs
logs
# Evaluation runs (apps/backend/scripts/eval.ts)
eval-results/
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ RepoInsight-AI evaluates:
- Design Decisions
- Resume Readiness

Every AI response is validated before generating the final report.
Every AI response is validated against a schema, and every file and line the model cites is checked against the code it was shown. Invented references are removed, and valid ones include the real code snippet.

---

Expand Down Expand Up @@ -284,6 +284,29 @@ npm run dev

---

# Testing

```bash
cd apps/backend
npm run typecheck # source, tests and scripts
npm test # Vitest: extraction safety, filtering, citations, analyzers, jobs, pipeline
```

GitHub Actions runs the backend checks, the frontend lint and build, and the report schema sync check on every push and pull request.

## Measuring Consistency

The evaluation script analyzes the same repositories several times with the real Gemini API and reports how much scores and citations vary:

```bash
cd apps/backend
npm run eval -- --runs 3 path/to/repo1.zip path/to/repo2.zip
```

Results are saved to `apps/backend/eval-results/`. Each run is a paid Gemini call.

---

# Environment Variables

## Backend
Expand All @@ -301,6 +324,9 @@ MAX_CONCURRENT_JOBS=2
# Optional: prompt size cap; files are ranked by importance and added until it is reached
MAX_PROMPT_TOKENS=150000

# Optional: sampling temperature 0-2 (unset = model default)
GEMINI_TEMPERATURE=0.2

# Optional: save full prompts and model responses (they contain the
# uploaded source code) to the log folder. Keep false in production.
SAVE_DEBUG_ARTIFACTS=false
Expand Down
3 changes: 3 additions & 0 deletions apps/backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ MAX_CONCURRENT_JOBS=2
# Prompt size cap. Files are ranked by importance and added until it is reached.
MAX_PROMPT_TOKENS=150000

# Optional sampling temperature (0-2). Lower = more consistent repeat reviews.
# GEMINI_TEMPERATURE=0.2

# Write full prompts/responses (contain uploaded source code) to the log folder.
# Useful locally; keep false in production.
SAVE_DEBUG_ARTIFACTS=false
Loading
Loading