Skip to content

Domain Model

Entities

Installation

Represents a GitHub App installation (one org or user account).

FieldTypeDescription
idUUIDInternal ID
githubInstallationIdnumberGitHub's installation ID
accountLoginstringGitHub org/user login
accountTypeOrganization or UserAccount type
statusInstallationStatusactive or inactive

Repository

A repository tracked by ClearPR under an installation.

FieldTypeDescription
idUUIDInternal ID
installationIdUUIDFK to Installation
githubRepoIdnumberGitHub's repo ID
fullNamestringowner/repo format
settingsJSONPer-repo config overrides
indexingStatusenumpending, in_progress, completed, failed

Review

A single review execution for a PR.

FieldTypeDescription
idUUIDInternal ID
repositoryIdUUIDFK to Repository
prNumbernumberPR number
prShastringHead commit SHA at review time
triggerenumauto, manual, rerun
statusenumqueued, processing, completed, failed, skipped
rawDiffLinesnumberTotal raw diff lines
semanticDiffLinesnumberLines after filtering
noiseReductionPctnumberPercentage of noise removed
modelUsedstringLLM model ID

PrMemoryEntry

A stored review comment with its vector embedding.

FieldTypeDescription
idUUIDInternal ID
repositoryIdUUIDFK to Repository
prNumbernumberSource PR
commentTextstringThe review comment
codeContextstringSurrounding diff hunk
outcomeenumaccepted or dismissed
embeddingvector(512)For similarity search

Value Objects

NameModulePurpose
LanguageDiff EngineFile language detection
DiffHunkDiff EngineOne contiguous block of changes
SeverityReviewcritical, warning, info
ReviewStatusReviewState machine for review lifecycle
TokenBudgetReviewToken allocation per prompt section
FeedbackOutcomeMemoryWhether feedback was acted on
InstallationStatusGitHubActive/inactive state
DeliveryIdWebhookGitHub delivery UUID

Released under the MIT License.