AI code review for pull requests and local changes, backed by static analysis, project memory, and delegated CI.
Website · Documentation · Dashboard · GitHub App
GHAGGA is a production-oriented AI review system, not just a prompt wrapper.
- It reviews pull requests through a GitHub App, a GitHub Action, a CLI, or a full self-hosted server.
- It combines LLM review with up to 16 static analysis tools so known issues are caught before tokens are spent.
- It persists project memory across reviews using PostgreSQL, SQLite, or Engram-compatible backends.
- It supports multiple review orchestration strategies: single-pass, specialist workflow, consensus voting, and fan-out lenses.
- It includes delegated CI orchestration so safe lint and test jobs can run on user-owned runner infrastructure.
- It was built as a full TypeScript monorepo with a real server, worker, dashboard, CLI, crypto layer, queueing, and testing story.
Visuals coming soon: live review screenshots and dashboard walkthrough.
- For maintainers: turns PR review into a repeatable pipeline instead of ad hoc comments.
- For teams: preserves prior decisions, patterns, bugfixes, and architecture context as searchable memory.
- For local development: lets developers review staged or unstaged changes before pushing.
- For self-hosters: supports a full Docker deployment with PostgreSQL, Redis, BullMQ, dashboard auth, and encrypted provider settings.
- For security-minded users: layers static analysis, HMAC verification, AES-256-GCM encryption, privacy stripping, and delegated execution boundaries.
- Install the GHAGGA GitHub App.
- Open the Dashboard.
- Configure your provider chain.
- Open a PR and receive a review comment.
# .github/workflows/ghagga.yml
name: Code Review
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
pull-requests: write
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JNZader/ghagga-action@v1npm install -g ghagga
ghagga login
ghagga review
ghagga health
ghagga memory listgit clone https://github.com/JNZader/ghagga.git
cd ghagga
cp .env.example .env
docker compose up -d- What Is This?
- Distribution Modes
- GitHub App SaaS
- GitHub Action
- CLI
- Self-Hosted
- Architecture
- Review Pipeline
- Review Modes
- Static Analysis
- Runner Architecture
- Delegated CI
- Memory System
- Security
- Monorepo Structure
- Configuration
- Development
- Testing
- Tech Stack
- v1 vs v2
- License
GHAGGA is an AI-assisted code review platform that applies the same core pipeline across PR reviews, local CLI reviews, and self-hosted automation.
Every review follows the same high-level flow:
- Receive a diff from GitHub or local git state.
- Run static analysis first when available.
- Search project memory for past decisions, bugfixes, patterns, and discoveries.
- Execute the selected review mode.
- Merge and format findings.
- Persist significant observations back into memory.
| Capability | What it means |
|---|---|
| 4 review modes | simple, workflow, consensus, fan-out |
| 16 static analysis tools | Always-on and auto-detected tools that cost zero LLM tokens |
| Project memory | PostgreSQL, SQLite, or Engram-backed observation storage and retrieval |
| Delegated CI | Safe lint and test execution on user-owned runner infrastructure |
| Multiple delivery modes | GitHub App, GitHub Action, CLI, or full self-hosted deployment |
| Security controls | AES-256-GCM encryption, HMAC callbacks, privacy stripping, execution boundaries |
| Mode | Primary use | Static analysis | Memory |
|---|---|---|---|
| GitHub App | Hosted PR reviews via dashboard configuration | Via delegated runner when enabled | PostgreSQL |
| GitHub Action | Per-repo CI workflow | Direct on the Actions runner | SQLite + @actions/cache |
| CLI | Local review before commit/push | Direct if tools are installed locally | SQLite or Engram |
| Self-hosted server | Full control over infra and secrets | Via delegated runner | PostgreSQL |
The hosted GitHub App is the fastest path for teams that want PR review without maintaining infrastructure.
- Receives
pull_requestwebhooks. - Uses dashboard-configured settings and provider chain.
- Optionally dispatches static analysis to a
ghagga-runnerrepository. - Posts structured review comments back to the PR.
- Stores review history and project memory in PostgreSQL.
| Permission | Access | Why |
|---|---|---|
| Pull requests | Read and write | Fetch diffs and post comments |
| Actions | Write | Dispatch runner workflows |
| Secrets | Read and write | Store encrypted provider credentials |
| Metadata | Read-only | Enumerate repos and installations |
In server/SaaS mode, GitHub Models requires a PAT with models:read. GitHub App installation tokens do not include that scope, so a GitHub Models entry without an explicit PAT is skipped at review time.
The GitHub Action runs GHAGGA directly inside your repository workflow. It is the most self-contained PR integration: checkout, analyze, fetch diff, review, comment.
name: Code Review
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
pull-requests: write
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JNZader/ghagga-action@v1These are taken from action.yml.
| Input | Required | Default | Description |
|---|---|---|---|
provider |
No | gateway |
Provider mode: gateway, cli-bridge, or ollama. Legacy values such as github, anthropic, openai, google, qwen, groq, cerebras, deepseek, and openrouter are auto-remapped to gateway. |
model |
No | Auto | Model identifier. auto is valid for gateway and cli-bridge. |
mode |
No | simple |
Review mode: simple, workflow, consensus |
api-key |
No | None | Provider credential. Optional for gateway, optional for cli-bridge, not required for ollama. |
github-token |
No | ${{ github.token }} |
Used for diff fetching and PR comments. |
enabled-tools |
No | Empty | Comma-separated tools to force-enable. |
disabled-tools |
No | Empty | Comma-separated tools to force-disable. |
enable-semgrep |
No | true |
Deprecated compatibility flag. |
enable-trivy |
No | true |
Deprecated compatibility flag. |
enable-cpd |
No | true |
Deprecated compatibility flag. |
enable-memory |
No | true |
Enables SQLite-backed memory persisted with @actions/cache. |
| Output | Description |
|---|---|
status |
PASSED, FAILED, NEEDS_HUMAN_REVIEW, or SKIPPED |
findings-count |
Total number of findings returned by the review |
- When the review returns
FAILED, the Action callscore.setFailed(). - That means the workflow check fails by default.
- If you want advisory-only behavior, use
continue-on-error: trueon the GHAGGA step.
- uses: JNZader/ghagga-action@v1
id: review
continue-on-error: true- uses: JNZader/ghagga-action@v1
id: review
- name: React to review result
if: steps.review.outputs.status == 'FAILED'
run: echo "Review found issues: ${{ steps.review.outputs.findings-count }}"The CLI is for reviewing local changes before they hit CI. It is also the richest operational surface in the project: login flow, review pipeline, memory inspection, git hooks, health checks, audit, feedback, and dismissal management.
ghagga login
ghagga review
ghagga review --mode workflow --verbose
ghagga review --quick
ghagga review --staged --exit-on-issues
ghagga health --top 10
ghagga memory search "error handling"
ghagga hooks install| Command | Purpose |
|---|---|
ghagga login |
Authenticate with GitHub and persist local config |
ghagga logout |
Clear stored credentials |
ghagga status |
Show current auth and config |
ghagga review [path] |
Review local changes |
ghagga health [path] |
Run a project health assessment |
ghagga audit [path] |
Run a full-project audit |
ghagga memory <subcommand> |
Inspect and manage review memory |
ghagga hooks <subcommand> |
Install, uninstall, or inspect git hooks |
ghagga dismiss ... |
Suppress a finding in future reviews |
ghagga feedback ... |
Record accepted/rejected/modified feedback for improvement rules |
These are taken from apps/cli/src/index.ts.
| Option | Short | Default | Description |
|---|---|---|---|
[path] |
. |
Repository or subdirectory to review | |
--mode <mode> |
-m |
simple |
simple, workflow, consensus, fan-out |
--provider <provider> |
-p |
Stored config or gateway |
gateway, cli-bridge, ollama |
--model <model> |
Provider default | Model identifier | |
--api-key <key> |
None | API key or gateway token | |
--output <format> |
-o |
Markdown | markdown, json, sarif |
--format <format> |
-f |
Deprecated | Deprecated alias for --output |
--disable-tool <name> |
Empty | Repeatable tool disable flag | |
--enable-tool <name> |
Empty | Repeatable tool enable flag | |
--list-tools |
false |
Print tool availability and exit | |
--no-memory |
Enabled | Disable memory search and persist | |
--memory-backend <type> |
sqlite |
sqlite or engram |
|
--config <path> |
-c |
.ghagga.json |
Project config file path |
--verbose |
-v |
false |
Stream pipeline progress |
--staged |
false |
Review only staged changes | |
--commit-msg <file> |
None | Validate commit message file | |
--exit-on-issues |
false |
Exit 1 on blocking issues | |
--quick |
false |
Static analysis only, skip AI review | |
--enhance |
false |
AI post-analysis enhancement | |
--issue <target> |
None | Create new or update an issue number with results |
|
--lenses <names> |
None | Comma-separated custom lens names for fan-out mode | |
--lens-dir <path> |
.ghagga/lenses/ |
Directory for custom lens definitions |
ghagga loginauthenticates with GitHub.- Stored config lives in
~/.config/ghagga/config.jsonor$XDG_CONFIG_HOME/ghagga/config.json. GITHUB_TOKENcan be used as fallback auth forgatewayandcli-bridgeflows.- Legacy direct providers are intentionally rejected in the CLI and should be routed through
mcp-llm-bridgevia--provider gateway.
ghagga health
ghagga health ./src
ghagga health --top 10The health check computes a score, surfaces top issues, and supports machine-readable output for CI.
ghagga hooks install
ghagga hooks install --pre-commit
ghagga hooks install --commit-msg
ghagga hooks uninstall
ghagga hooks statuspre-commitrunsghagga review --staged --plain --exit-on-issuesand prefers--quickbehavior for fast feedback.commit-msgvalidates commit message quality throughghagga review --commit-msg <file> --plain --exit-on-issues.- Hooks auto-detect
ghaggainPATHand degrade gracefully if it is missing.
ghagga memory list
ghagga memory search "error handling"
ghagga memory show 42
ghagga memory stats
ghagga memory delete 42
ghagga memory clear --repo owner/repoghagga dismiss <finding-hash> --category security --reason "false positive"
ghagga dismiss list
ghagga dismiss remove <finding-hash>
ghagga feedback <pr-url> <finding-hash> accepted
ghagga feedback rules
ghagga feedback list --category securitydismissstores negative examples so repeated false positives can be suppressed.feedbackrecords accepted, rejected, or modified findings and derives future improvement rules once enough samples exist.
| Code | Meaning |
|---|---|
0 |
PASSED or SKIPPED |
1 |
FAILED or NEEDS_HUMAN_REVIEW |
The self-hosted deployment is the full-stack version: server, worker, PostgreSQL, Redis, dashboard auth, encrypted settings, and delegated runner support.
git clone https://github.com/JNZader/ghagga.git
cd ghagga
cp .env.example .env
docker compose up -d| Service | Role |
|---|---|
server |
Hono API server handling webhooks and dashboard API |
worker |
BullMQ worker executing async review jobs |
postgres |
PostgreSQL 16 for settings, installs, and memory |
redis |
Queue backend for BullMQ |
To self-host the PR-reviewing server you need a GitHub App with:
- Pull requests: read and write
- Actions: write
- Secrets: read and write
pull_requestandissue_commentevent subscriptions if you want comment-triggered reviews
You will need values for:
GITHUB_APP_IDGITHUB_PRIVATE_KEYGITHUB_WEBHOOK_SECRETGITHUB_CLIENT_IDGITHUB_CLIENT_SECRETENCRYPTION_KEYSTATE_SECRET
graph TB
subgraph Distribution["Distribution Layer"]
Server["Server<br/>Hono + BullMQ"]
Action["Action<br/>GitHub Action"]
CLI["CLI"]
end
subgraph Worker["Async Worker"]
BullMQ["BullMQ Worker<br/>Review Jobs"]
DelegatedCI["Delegated CI<br/>Job Orchestration"]
end
subgraph Runner["Delegated Runner"]
RunnerRepo["ghagga-runner<br/>GitHub Actions"]
RunnerTools["Static Analysis Tools<br/>7GB RAM"]
end
subgraph Core["@ghagga/core"]
SA["Static Analysis<br/>16-tool registry"]
Agents["AI Agents<br/>Simple / Workflow / Consensus / Fan-out"]
Memory["Memory<br/>Search / Persist / Decay / Versioning"]
Checklist["Checklist<br/>SOLID + Boundary + Security scoring"]
Scope["Scope<br/>Tree-sitter symbol extraction"]
Recursive["Recursive Loop<br/>Re-review patches"]
Exploitability["CVE Analysis<br/>Reachability labeling"]
end
subgraph DB["@ghagga/db"]
PG["PostgreSQL 16<br/>+ tsvector FTS"]
Drizzle["Drizzle ORM<br/>+ migrations"]
Crypto["AES-256-GCM<br/>Encryption"]
end
subgraph Queue["Message Queue"]
Redis["Redis 7<br/>BullMQ"]
end
Server -- enqueue --> Redis
Redis -- dequeue --> BullMQ
BullMQ --> Core
BullMQ -- dispatch --> DelegatedCI
DelegatedCI -- workflow_dispatch --> RunnerRepo
RunnerRepo --> RunnerTools
RunnerTools -- callback --> Server
Action --> Core
CLI --> Core
Core --> DB
The project is intentionally structured so @ghagga/core owns the review engine and knows nothing about HTTP, dashboard auth, or CLI rendering.
| Adapter | Input | Output | Memory | Static analysis |
|---|---|---|---|---|
| Server | GitHub webhook | PR comment via GitHub API | PostgreSQL | Delegated runner |
| Action | PR event | PR comment via Octokit | SQLite | Local on Actions runner |
| CLI | Local git diff | Terminal output / JSON / SARIF | SQLite or Engram | Local if tools exist |
This is the right pattern. Core owns the pipeline. Adapters only translate transport and IO. Anything else becomes a maintenance swamp.
flowchart LR
Input["Input<br/>diff + config"] --> S1["Validate"]
S1 --> S2["Parse & Filter Diff"]
S2 --> S3["Detect Stacks"]
S3 --> S4["Token Budget"]
S4 --> S5["Static Analysis + Memory Search"]
S5 --> S6["Agent Execution"]
S6 --> S7["Merge Findings"]
S7 --> S8["Persist Memory"]
S8 --> Output["ReviewResult"]
The pipeline degrades gracefully:
- If static analysis tools are unavailable, review continues.
- If memory is unavailable, review continues.
- If no LLM is configured, static-only paths still produce useful output where supported.
GHAGGA supports four review strategies with different cost and confidence tradeoffs.
- One LLM call.
- Best for quick reviews and small PRs.
- Lowest token cost.
- Five specialists run in parallel: scope, coding standards, error handling, security, performance.
- One synthesis step merges and deduplicates findings.
- Best for broad, structured review.
- Three parallel stances: advocate, critic, observer.
- Final status is computed algorithmically from weighted votes.
- Best for critical paths and high-confidence decisions.
- Five constrained lenses run in parallel.
- Findings are merged by file and line, with higher severity winning conflicts.
- Best when you want intentionally separate perspectives like security, typing, performance, accessibility, and error handling.
| Mode | How it works | Approx token multiplier | Best for |
|---|---|---|---|
| Simple | Single pass | ~1x | Small PRs, fast feedback |
| Workflow | 5 specialists + synthesis | ~6x | Thorough multi-angle reviews |
| Consensus | 3 votes + algorithmic resolution | ~3x | High-confidence approval decisions |
| Fan-out | 5 independent lenses + merge | ~5x | Broad category coverage |
Static analysis is Layer 0. That matters because deterministic checks should run before the expensive stochastic layer.
- Always-on (7): Semgrep, Trivy, CPD, Gitleaks, ShellCheck, markdownlint, Lizard
- Auto-detect (9): Ruff, Bandit, golangci-lint, Biome, PMD, Psalm, clippy, Hadolint, zizmor
- Tools are optional and skipped gracefully if missing.
- Findings are injected into review prompts so the LLM can focus on logic and architecture instead of rediscovering obvious issues.
- Tool control exists via
enabled-tools,disabled-tools,--enable-tool, and--disable-tool.
{
"customRules": [".semgrep/custom-rules.yml"]
}The server mode offloads heavy static analysis to a user-owned ghagga-runner repository on GitHub Actions.
Running tools like Semgrep, PMD/CPD, Trivy, and the rest together is RAM-hungry. A tiny server should not pretend it is a CI worker farm.
- Server receives PR webhook.
- Server checks whether
{owner}/ghagga-runnerexists. - If it exists, the server generates a per-dispatch callback secret.
- The server triggers
workflow_dispatchwith 10 string inputs. - The runner installs or restores tools, runs analysis, and posts a signed callback.
- The server verifies HMAC, merges findings, and posts the final review.
| Input | Description |
|---|---|
callbackId |
UUID for this dispatch |
repoFullName |
owner/repo being reviewed |
prNumber |
Pull request number |
headSha |
Head commit SHA |
baseBranch |
Base branch |
callbackUrl |
Server endpoint for callback |
callbackSecret |
Per-dispatch HMAC secret |
enabledTools |
Comma-separated tool overrides |
disabledTools |
Comma-separated tool overrides |
toolRegistryEnabled |
Compatibility flag kept for old runner templates |
If no runner is available, the server continues with LLM-only review instead of hard failing.
Delegated CI extends the runner idea beyond static analysis. Instead of only running GHAGGA-owned tools, it can run curated safe jobs like lint and tests.
- Zero repo workflow maintenance for basic CI.
- Reuse of the same public runner infrastructure.
- Explicit policy control over which jobs are safe to delegate.
| Profile | Runtime | Command | Default timeout |
|---|---|---|---|
node-lint |
Node.js 20 | npm run lint |
5 min |
node-unit |
Node.js 20 | npm test |
10 min |
python-lint |
Python 3.12 | ruff check . |
5 min |
python-pytest |
Python 3.12 | pytest |
10 min |
go-test |
Go 1.22 | go test ./... |
10 min |
Jobs are repo-scoped and classified as either:
safe/delegablesensitive/no-delegable
Sensitive jobs are rejected instead of being run on public runner infrastructure. That boundary is a feature, not a limitation.
This is one of the parts that makes GHAGGA more than a wrapper around a single prompt. It learns from prior reviews and feeds that context into future ones.
| Backend | Used by | Search engine |
|---|---|---|
| PostgreSQL | Server / SaaS / self-hosted | tsvector + GIN + ts_rank |
| SQLite | CLI and GitHub Action | FTS5 + BM25 |
| Engram | CLI optional backend | Delegated HTTP API |
Memory participates in two stages:
- Search before review
- Persist after review
buildSearchQuery()extracts terms from file paths.- Noise directories like
src,lib,dist, andtestare stripped. - Query terms are capped.
- Up to 3 past observations are loaded.
- The result is injected into prompts as
## Past Review Memory.
- Only significant findings are stored.
- Privacy stripping runs before any write.
- Sessions and observations are stored separately.
- Deduplication uses a content hash plus a rolling time window.
- PR summaries use topic-key upsert instead of uncontrolled duplication.
| Phase | Behavior |
|---|---|
| Active | Full relevance |
| Decaying | Linearly decreases toward zero |
| Cleared | Excluded from search context |
GHAGGA includes git-like memory operations:
- Branch
- Snapshot
- Merge
- Rollback
Merge operations keep contradictory observations instead of inventing a fake resolution.
| Type | Purpose |
|---|---|
decision |
Design and architecture decisions |
pattern |
Repeated implementation conventions |
bugfix |
Known failure patterns and fixes |
learning |
General project knowledge |
architecture |
Structural system knowledge |
config |
Configuration conventions |
discovery |
Important codebase findings |
Before persistence, sensitive content is redacted via 13 regex-based patterns, including:
- Anthropic keys
- OpenAI keys
- AWS access key IDs
- GitHub tokens
- Google API keys
- Slack tokens
- Bearer tokens
- JWTs
- PEM private keys
- Password and secret assignments
- Base64 credential blobs
ghagga review --memory-backend engram
export GHAGGA_MEMORY_BACKEND=engram
export GHAGGA_ENGRAM_HOST=http://localhost:7437
export GHAGGA_ENGRAM_TIMEOUT=5If Engram is unreachable, the CLI falls back to SQLite automatically.
| Control | Implementation |
|---|---|
| API key encryption | AES-256-GCM with per-installation encryption keys |
| Webhook verification | HMAC-SHA256 with constant-time comparison |
| Runner callback verification | Per-dispatch HMAC secret with TTL |
| Privacy stripping | 13 regex patterns before memory persistence |
| Timeouts | LLM and HTTP timeout boundaries |
| Installation scoping | Data and routes scoped to GitHub installation or repo context |
| Correlation IDs | End-to-end tracing through review execution |
When private repo code is analyzed through the public runner model, the system relies on multiple layers:
- output suppression
- log masking
- log deletion
- short retention windows
Security-oriented tests validate things like:
- no secret logging
- no hardcoded credentials
- no unsafe
evalstyle behavior - encryption roundtrips and tamper detection
- HMAC verification correctness
- privacy stripping coverage
ghagga/
├── packages/
│ ├── core/ # Review engine, agents, tools, memory, scoping, exploitability
│ ├── db/ # Drizzle schema, queries, crypto, migrations
│ └── types/ # Shared contracts
├── apps/
│ ├── server/ # Hono API + BullMQ workers + GitHub integration
│ ├── dashboard/ # React SPA for settings, stats, reviews, memory
│ ├── cli/ # npm CLI with login, review, memory, hooks, audit
│ └── action/ # GitHub Action runtime
├── templates/ # Runner workflow templates
├── docs/ # Long-form documentation
├── landing/ # Marketing site
└── openspec/ # Spec-driven development artifacts
| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
Yes | PostgreSQL connection string |
GITHUB_APP_ID |
Yes | GitHub App ID |
GITHUB_PRIVATE_KEY |
Yes | Base64-encoded private key |
GITHUB_WEBHOOK_SECRET |
Yes | Webhook secret |
GITHUB_CLIENT_ID |
Conditional | OAuth client ID |
GITHUB_CLIENT_SECRET |
Conditional | OAuth client secret |
REDIS_URL |
No | Full Redis URL |
REDIS_HOST |
No | Redis host when REDIS_URL is absent |
REDIS_PORT |
No | Redis port when REDIS_URL is absent |
WORKER_CONCURRENCY |
No | BullMQ worker concurrency, default 3 |
SERVICE_TYPE |
No | server, worker, or both |
SERVER_URL |
No | Public base URL for callbacks |
ENCRYPTION_KEY |
Yes | 64-char hex AES key |
STATE_SECRET |
Conditional | OAuth state signing and callback HMAC derivation |
CALLBACK_TTL_MINUTES |
No | Runner callback secret TTL, default 11 |
PORT |
No | Server port, default 3000 |
NODE_ENV |
No | development or production |
These are taken from the CLI entry point and review command.
| Variable | Default | Description |
|---|---|---|
GHAGGA_API_KEY |
None | API key or gateway token |
GHAGGA_PROVIDER |
Stored config or gateway |
gateway, cli-bridge, or ollama |
GHAGGA_MODEL |
Provider default | Model identifier |
GITHUB_TOKEN |
None | Fallback auth for gateway and cli-bridge |
GHAGGA_MEMORY_BACKEND |
sqlite |
sqlite or engram |
GHAGGA_ENGRAM_HOST |
http://localhost:7437 |
Engram server URL |
GHAGGA_ENGRAM_TIMEOUT |
5 |
Engram timeout in seconds |
Place a .ghagga.json in the repo root:
{
"mode": "workflow",
"provider": "gateway",
"model": "auto",
"enabledTools": ["ruff", "bandit"],
"disabledTools": ["markdownlint"],
"customRules": [".semgrep/custom-rules.yml"],
"ignorePatterns": ["*.test.ts", "*.spec.ts", "docs/**"],
"reviewLevel": "strict"
}- CLI flags
- config file
- environment variables
- defaults
Current defaults include:
*.md*.txt.gitignoreLICENSE*.lockpackage-lock.jsonpnpm-lock.yamlbun.lockbcomposer.lockGemfile.lockCargo.lockpoetry.lockgo.sum
| Provider mode | Default model |
|---|---|
gateway |
auto |
cli-bridge |
auto |
ollama |
llama3 |
The review pipeline uses a 70/30 split:
| Allocation | Percentage | Purpose |
|---|---|---|
| Diff content | 70% | The code under review |
| Prompts and context | 30% | Instructions, memory, findings, stack hints |
- Node.js 20+
- pnpm
- PostgreSQL 16+
- Redis 7+
git clone https://github.com/JNZader/ghagga.git
cd ghagga
pnpm install
docker compose up postgres redis -d
cp .env.example .env
pnpm --filter ghagga-db db:push
pnpm --filter @ghagga/server dev
pnpm --filter @ghagga/dashboard devpnpm exec turbo typecheck
pnpm exec turbo build
pnpm exec turbo testThe test surface is broad because the system has multiple adapters and real operational boundaries.
| Area | What is covered |
|---|---|
@ghagga/core |
Pipeline, diff parsing, stack detection, token budget, prompts, agents, memory, decay, versioning, tools, exploitability |
ghagga-db |
Crypto, schema, queries, settings resolution |
@ghagga/server |
Routes, auth, webhooks, queues, runner dispatch, callbacks, health checks |
ghagga CLI |
Config resolution, review output, hooks, memory commands, exit codes |
@ghagga/action |
Input parsing, outputs, comment formatting, tool caching, error handling |
@ghagga/dashboard |
Rendering, memory UX, a11y, virtualization, destructive action safety |
- no secret logging
- no hardcoded credentials
- encryption tamper detection
- webhook verification correctness
- privacy stripping coverage
| Layer | Technology | Why it fits |
|---|---|---|
| Monorepo | pnpm workspaces + Turborepo | Fast installs, caching, parallel work |
| Language | TypeScript strict mode | Shared contracts across adapters |
| Backend | Hono | Small, fast, portable |
| Queue | BullMQ + Redis | Async execution and retryable jobs |
| Database | PostgreSQL 16 + Drizzle | Typed queries plus native FTS |
| CLI | Commander + terminal UI helpers | Structured command surface |
| Frontend | React 19 + Vite 7 + Tailwind 4 | Fast dashboard iteration |
| Charts | Recharts | Review stats and history |
| Static analysis | Registry-driven multi-tool layer | Deterministic findings before LLM spend |
| Crypto | Node crypto |
No unnecessary crypto dependency pile |
GHAGGA v2 is a rewrite, not a cosmetic patch.
| Aspect | v1 | v2 |
|---|---|---|
| Runtime | Deno + Node + Python | Node.js only |
| Deployment | Multi-runtime, manual | Docker Compose and cleaner hosting paths |
| Async processing | Inline webhook flow | BullMQ + Redis |
| Static analysis | Semgrep only | 16-tool registry |
| Memory | Stored but underused | Search, inject, persist, decay, versioning |
| Testing | Minimal or absent | Broad automated coverage |
| Delivery modes | Narrow | GitHub App, Action, CLI, self-hosted |
v1 carried duplicate flows, dead code, and unnecessary runtime sprawl. v2 collapses the stack into clearer boundaries: a reusable core, thin adapters, explicit async orchestration, and testable interfaces.
Inspired by Gentleman Guardian Angel (GGA) and Engram by Gentleman Programming.
MIT. See LICENSE.