ghagga-core
v2.6.1
Published
Core review engine for GHAGGA — AI-powered multi-agent code reviewer
Downloads
1,122
Maintainers
Readme
@ghagga/core
Core review engine for GHAGGA — AI-powered multi-agent code reviewer.
This package contains the distribution-agnostic review pipeline, LLM provider integrations, static analysis runners, and all three review modes (simple, workflow, consensus).
Installation
npm install @ghagga/coreUsage
import { reviewPipeline, DEFAULT_SETTINGS } from '@ghagga/core';
const result = await reviewPipeline({
diff: '...unified diff string...',
mode: 'simple', // 'simple' | 'workflow' | 'consensus'
provider: 'github', // 'github' | 'openai' | 'anthropic' | 'google' | 'ollama' | 'qwen'
model: 'gpt-4o-mini',
apiKey: process.env.GITHUB_TOKEN!,
settings: DEFAULT_SETTINGS,
});
console.log(result.status); // 'PASSED' | 'FAILED' | 'NEEDS_HUMAN_REVIEW'
console.log(result.summary);
console.log(result.findings);Review Modes
| Mode | LLM Calls | Best For | |------|-----------|----------| | simple | 1 | Small PRs, quick feedback | | workflow | 6 | Thorough review with 5 specialist agents + synthesis | | consensus | 3 | Same model, three perspectives (for/against/neutral) + algorithmic vote |
Providers
- github — Free via GitHub Models (default)
- openai — OpenAI API (GPT-4o, GPT-4o-mini, etc.)
- anthropic — Anthropic API (Claude Sonnet, Haiku, etc.)
- google — Google AI (Gemini Pro, Flash, etc.)
- ollama — Local models via Ollama (Qwen2.5-Coder, CodeLlama, etc.)
- qwen — Alibaba Cloud DashScope API (Qwen-Coder-Plus, etc.)
Tip: For the CLI experience, use
@ghagga/cliinstead.
License
MIT
