How dragon-looping/repo-judge works
RepoJudge accepts a public GitHub repository for transparent scoring and returns a validated Scorecard through a REST API and HTML interface. The server orchestrates snapshot ingestion, deterministic criteria checks, and—when selected—an optional Gemma judging pass before merging results. The graph preserves the documented rule categories and the prompt-sanitization layer. Some rule implementations and UI behavior were not excerpted, so their documented capabilities are shown without inferred internal call paths.
Main entry points: index.ts Rules engine · server.ts Express API · gemma.ts Gemma judge · github.ts Snapshot ingestion
Components 21
API and interface
- Express API
src/server.ts - HTML UI
public/app.js
Repository ingestion
- Snapshot ingestion
src/ingest/github.ts
Scoring and judging
- Rules engine
src/rules/index.ts - License checks
src/rules/license.ts - README checks
src/rules/readme.ts - CI checks
src/rules/ci.ts - Commit checks
src/rules/commits.ts - Contributor checks
src/rules/contributors.ts - Conduct checks
src/rules/coc.ts - Secret checks
src/rules/secrets.ts - Open-weight checks
src/rules/openweight.ts - Judge prompts
src/judge/prompt.ts - Prompt sanitization
src/judge/sanitize.ts - Gemma judge
src/judge/gemma.ts
Scorecard contract
- Data schemas
src/schema.ts - Scorecard merge
src/merge.ts - Validated scorecard
src/schema.ts
Other components
- Organizer
- GitHub REST API
- Gemini hosting API
Connections 23
- Organizer → Express API: submits URL
README.md - Express API → HTML UI: serves UI
src/server.ts - Express API → Snapshot ingestion: builds snapshot
src/server.ts - Snapshot ingestion → GitHub REST API: fetches repository data
README.md - Express API → Rules engine: runs rules
src/server.ts - Rules engine → License checks: checks license
src/rules/index.ts - Rules engine → README checks: checks README
src/rules/index.ts - Rules engine → CI checks: checks CI
src/rules/index.ts - Rules engine → Commit checks: checks commits
src/rules/index.ts - Rules engine → Contributor checks: checks contributors
src/rules/index.ts - Rules engine → Conduct checks: checks conduct
src/rules/index.ts - Rules engine → Secret checks: checks secrets
src/rules/index.ts - Rules engine → Open-weight checks: checks model policy
src/rules/index.ts - Express API → Gemma judge: optional judging
src/server.ts - Gemma judge → Judge prompts: builds prompts
src/judge/gemma.ts - Judge prompts → Prompt sanitization: sanitizes content
src/judge/prompt.ts - Gemma judge → Prompt sanitization: detects injection
src/judge/gemma.ts - Gemma judge → Gemini hosting API: requests verdicts
README.md - Express API → Scorecard merge: merges results
src/server.ts - Scorecard merge → Validated scorecard: validates output
src/merge.ts - Express API → Organizer: returns scorecard
README.md - Snapshot ingestion → Data schemas: validates snapshot
src/ingest/github.ts - Rules engine → Data schemas: validates checks
src/rules/index.ts