Local repository intelligence
Indexes on workspace open, re-indexes on save, and builds a live knowledge store that stays on your machine.
Local engineering intelligence
MergeCore is a persistent engineering cognition layer for your repository — local indexing, local RAG, markdown memory, and hover explanations that teach architecture without shipping your source to the cloud.
The workflow
MergeCore indexes on workspace open, watches the repo, builds a private knowledge store under .mergecore/rag/, and explains functions with summary, risks, related systems, and architectural context — tuned from junior through expert depth.
MergeCore: Index Repository · Set Explanation Mode · Set Intelligence Profile · Hover PHP symbolsIt is not another Copilot, autocomplete tool, or PR comment bot. It is an engineering understanding system.
Why it helps
Teams encode decisions in markdown; MergeCore retrieves them locally so explanations stay business-context aware and stack-aware (Laravel first).
Indexes on workspace open, re-indexes on save, and builds a live knowledge store that stays on your machine.
Each repository gets its own retrieval layer for functions, architecture notes, conventions, and business logic references.
README, architecture.md, decisions.md, agents.md, and .cursorrules become active context for explanations.
Function summary, inputs/outputs, pros, cons/risks, related systems, and architectural context — in the editor.
Junior, mid, senior, and expert modes — from fundamentals to architecture critique, concurrency, and enterprise scale.
Source, embeddings, and business logic stay local. Optional Ollama for richer explanations — never required for core cognition.
Laravel-first, plus Filament, Pest, Livewire, Alpine, React, TypeScript, Vue, Python, PyTorch, Go, Tauri, Swift, and SwiftUI. Roadmap next: more frameworks, test runners, Node, and team domain packs.
How Packs Work
MergeCore packs are made of a few clear files with different jobs: one says what the pack is, one defines the rules and scoring, one gives human shorthand for common problems, and one explains how an AI reviewer should apply the pack in practice.
Manifest & wiring
The pack manifest tells MergeCore what the pack is called, which version it is, which files it publishes, and how hosts should resolve the rest of the pack.
Rules & scoring
This is the scoring source of truth. It defines the rules, severities, penalties, and detection hints that shape how MergeCore judges a change.
Human-facing shorthand
The smell index translates deeper rules into named patterns people recognise quickly, which helps with triage, wording, and fix guidance.
How reviewers should think
Agent instructions explain tone, priorities, evidence rules, and how the reviewer should apply the pack instead of just dumping raw rule text.
Explanation modes
MergeCore changes how it explains systems based on developer level — so mixed-skill teams share one cognition layer without drowning juniors or boring seniors.
Fundamentals, concepts, common mistakes, simple reasoning.
Practical architecture, maintainability, workflow reasoning.
Scalability, hidden coupling, tradeoffs, operational concerns.
Architecture critique, performance, concurrency, enterprise scale.
Intelligence profiles
Profiles bias how MergeCore weighs tradeoffs — ship-fast, enterprise governance, security, performance, or AI-generated side effects — without changing explanation mode.
Balanced engineering reasoning.
Ship-fast bias with reversible decisions.
Governance, consistency, long-lived systems.
Latency, throughput, and resource cost.
Threat model and abuse paths.
Cognitive load and bus-factor survival.
Exploration over permanence.
Side effects of AI-generated systems.
Pricing (indicative)
Authentication, billing, licensing, and seats can live in the cloud later — your code does not need to leave the machine for Phase 1 cognition.
Local RAG, hover explanations, single-user features.
Shared standards, organisation configs, seat management.
SSO path, enforced standards, compliance, admin controls.
Self-hosted licensing, air-gapped, custom reasoning packs.
VS Code extension, local index, RAG, hovers, junior–expert modes, intelligence profiles, Laravel first.
In-editor intelligence
Hover tooltips cover what the code does, what enters and exits, why the shape works, what can go wrong, which systems connect, and why the pattern may have been chosen.
Function summary
Does stuff with orders.
Loads the order, authorises the actor, then dispatches FulfilOrderJob when payment clears.
Plain English tied to the symbol under the cursor.
Cons / risks
Might be slow sometimes.
N+1 risk on line items under load; no idempotency key on the charge retry path.
Race conditions, coupling, scalability, and maintainability — named concretely.
Related systems
Uses some services.
OrderController → FulfilOrderJob → Order model → Pest feature test.
Controllers, jobs, models, tests, and routes surface as a map, not a guess.
Markdown intelligence
MergeCore ingests README, architecture.md, decisions.md, agents.md, contributing.md, coding-standards.md, and .cursorrules so teams can encode architecture decisions, conventions, and AI behaviour rules once.
architecture.md and decisions.md bias explanations toward the patterns your team already chose.
agents.md and .cursorrules become contextual engineering rules for local explanations.
Inferred stack conventions (actions, DTOs, Pest-first, TypeScript strict) plus optional .mergecore/conventions.json for team-declared rules.
laravel-core agents.md loads automatically when artisan / Laravel signals are present.
Indexes on open; saves update .mergecore/rag/ incrementally — no manual sync step.
Profiles and RAG stay workspace-local. Lockfiles and manifests still refresh stack detection; source watches refresh the cognition index.
Still available
Secondary to cognition: a local scanner for the categories that wake on-call — race conditions, retries, missing transactions, queue failure modes, and more.
Check-then-act, unsynchronised shared state, and concurrent writes that only fail under real traffic.
Non-idempotent work on retry paths — double charges, duplicate rows, and repeated side effects.
Multi-step writes with no atomic boundary, leaving the system in half-committed states when one step fails.
Infinite retries, no backoff, no dead-letter path — the reason a single bad job can drown the whole worker fleet.
Growing caches without bounds, listeners never torn down, closures that pin large objects for the life of the process.
Loops that fire one query per item. Fast in dev, fatal under real traffic. Number one cause of slow endpoints.
Queries on unindexed columns, sequential scans on tables that will grow, and joins without covering indexes.
Public endpoints with no throttle, outbound calls with no budget, cron paths that fan out unbounded.
Errors swallowed, logs with no correlation id, failures reported as info — the things that make incidents unsolvable at 3am.
Cognition is primary; review and prod-risk remain available as secondary tooling for merge-time judgement.
Engineering reasoning
MergeCore preserves architectural reasoning under pressure — what enters and exits, what couples, what fails in prod, and why a pattern may have been chosen.
Junior depth
This uses a service.
This controller should stay thin: validate the request, call one service/action, return a response. Putting pricing rules here makes them hard to test.
Fundamentals
Senior depth
Looks fine.
The job and HTTP path share a write without an idempotency key; a timeout retry can double-apply under load.
Tradeoff
Memory-aware
Follow best practices.
Per decisions.md, money mutations go through Actions — this helper bypasses that boundary.
Team memory
Offline templates always ship the six-section hover structure; Ollama upgrades prose when a local model is available.
Entry points
Index the repository, set junior-to-expert depth and an intelligence profile, then hover Laravel/PHP symbols. Secondary review commands remain for merge-time checks.
Build or refresh the local RAG store under .mergecore/rag/ — also runs on workspace open.
Switch between junior, mid, senior, and expert explanation depth.
Bias reasoning toward startup, enterprise, security, performance, or AI-safety lenses.
Hover PHP methods and classes for structured architectural explanations.
Secondary: run a pack-aware review on a selection, file, or diff when you want merge-time judgement.
Fits your setup
Humans get hover explanations and indexing in VS Code or Cursor. Agents (Cursor, Codex) query the same local cognition over MCP. Optional Skill tells the agent when to call those tools.
Human path: index the repo, set explanation mode, hover PHP symbols. One extension covers both editors.
Cursor hosts VS Code extensions — you do not need a separate Cursor plugin.
Agent path: expose local RAG, packs, and prod-risk scan as tools. Point MERGECORE_WORKSPACE at the project root.
{
"mcpServers": {
"mergecore": {
"command": "node",
"args": ["/absolute/path/to/MergeCore/mcp/dist/index.js"],
"env": {
"MERGECORE_WORKSPACE": "/absolute/path/to/your/project"
}
}
}
}Tools: mergecore_index, mergecore_retrieve, mergecore_explain_context, mergecore_scan_prod_risks, mergecore_list_packs, mergecore_read_pack_guidance.
Preserve engineering knowledge, onboard faster, and understand AI-generated systems — privately, in the editor.
Install MergeCore