Install Extension

Local engineering intelligence

Understand codebases, not just generate code.

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.

Hover to understand. Index once. Keep knowledge local.

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 symbols

It is not another Copilot, autocomplete tool, or PR comment bot. It is an engineering understanding system.

Onboarding, architecture, and AI-assisted quality — without cognitive overload.

Teams encode decisions in markdown; MergeCore retrieves them locally so explanations stay business-context aware and stack-aware (Laravel first).

Local repository intelligence

Indexes on workspace open, re-indexes on save, and builds a live knowledge store that stays on your machine.

Local RAG database

Each repository gets its own retrieval layer for functions, architecture notes, conventions, and business logic references.

Markdown as engineering memory

README, architecture.md, decisions.md, agents.md, and .cursorrules become active context for explanations.

Hover explanations

Function summary, inputs/outputs, pros, cons/risks, related systems, and architectural context — in the editor.

Adaptive explanation depth

Junior, mid, senior, and expert modes — from fundamentals to architecture critique, concurrency, and enterprise scale.

Local-first by default

Source, embeddings, and business logic stay local. Optional Ollama for richer explanations — never required for core cognition.

// Rule Packs

Fourteen first-party packs shipping today.

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.

Current rule packs
Laravel
PHP core rules
Filament
Admin panels
Pest
PHP testing
Livewire
Full-stack PHP
Alpine
Lightweight JS
React
Component rules
TypeScript
Type & app rules
Vue
Composition API
Python
Service rules
PyTorch
ML & training
Go
API & concurrency
Tauri
Desktop & Rust
Swift
Apple platforms
SwiftUI
Declarative UI
Future rule packs
More Frameworks
Web & app packs
More Test Runners
Coverage & quality
Node
Backend JS services
Domain Packs
Team-specific rules
More Frameworks
Web & app packs
More Test Runners
Coverage & quality
Node
Backend JS services
Domain Packs
Team-specific rules
More Frameworks
Web & app packs
More Test Runners
Coverage & quality
Node
Backend JS services
Domain Packs
Team-specific rules

Rule packs are structured, not hand-wavy.

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

pack.json

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.

  • Defines metadata like pack ID, title, version, tags, and compatibility details.
  • Points at the files the pack exposes, such as rubric, smells, and agent instructions.
  • Acts as the single lookup point when a host wants to load the pack correctly.

Rules & scoring

rubric.json

This is the scoring source of truth. It defines the rules, severities, penalties, and detection hints that shape how MergeCore judges a change.

  • Holds stable rule IDs, categories, titles, descriptions, and severity levels.
  • Controls how findings affect score so review output stays consistent and traceable.
  • Lets packs gate or tune rules for stack-specific contexts like Filament or Pest.

Human-facing shorthand

smells.json

The smell index translates deeper rules into named patterns people recognise quickly, which helps with triage, wording, and fix guidance.

  • Maps named smells back to rubric rules through rule references.
  • Adds quick summaries, layers, and typical-fix guidance for common problems.
  • Keeps reviewer wording practical without losing the rule-level source underneath.

How reviewers should think

agents.md

Agent instructions explain tone, priorities, evidence rules, and how the reviewer should apply the pack instead of just dumping raw rule text.

  • Defines stance like security before style and evidence before invention.
  • Keeps AI-assisted review aligned with the same language and standards across teams.
  • Bridges the gap between structured rules and useful, readable feedback.

Same code. Depth that matches the reader.

MergeCore changes how it explains systems based on developer level — so mixed-skill teams share one cognition layer without drowning juniors or boring seniors.

Junior

Junior mode

Fundamentals, concepts, common mistakes, simple reasoning.

  • fundamentals
  • concepts
  • common-mistakes
  • simple-reasoning
Mid

Mid-level mode

Practical architecture, maintainability, workflow reasoning.

  • architecture
  • maintainability
  • workflow
  • delivery
Senior

Senior mode

Scalability, hidden coupling, tradeoffs, operational concerns.

  • scalability
  • coupling
  • tradeoffs
  • operations
Expert

Expert mode

Architecture critique, performance, concurrency, enterprise scale.

  • critique
  • performance
  • concurrency
  • enterprise

Same depth. A different reasoning lens.

Profiles bias how MergeCore weighs tradeoffs — ship-fast, enterprise governance, security, performance, or AI-generated side effects — without changing explanation mode.

Balanced

Default

Balanced engineering reasoning.

Ship-fast

Startup MVP

Ship-fast bias with reversible decisions.

Governance

Enterprise

Governance, consistency, long-lived systems.

Hot path

Performance

Latency, throughput, and resource cost.

Threat model

Security

Threat model and abuse paths.

Bus factor

Solo founder

Cognitive load and bus-factor survival.

Explore

Rapid prototyping

Exploration over permanence.

AI-aware

AI safety

Side effects of AI-generated systems.

Intelligence runs locally. Cloud only manages access.

Authentication, billing, licensing, and seats can live in the cloud later — your code does not need to leave the machine for Phase 1 cognition.

~£19/moIndividual

Solo

Local RAG, hover explanations, single-user features.

~£29–39/seatTeam

Team

Shared standards, organisation configs, seat management.

~£59–99/seatBusiness

Business

SSO path, enforced standards, compliance, admin controls.

CustomEnterprise

Enterprise

Self-hosted licensing, air-gapped, custom reasoning packs.

NowShipped path

Phase 1 MVP

VS Code extension, local index, RAG, hovers, junior–expert modes, intelligence profiles, Laravel first.

Explanations that name risks, not vibes.

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

Weak

Does stuff with orders.

Strong

Loads the order, authorises the actor, then dispatches FulfilOrderJob when payment clears.

Plain English tied to the symbol under the cursor.

Cons / risks

Weak

Might be slow sometimes.

Strong

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

Weak

Uses some services.

Strong

OrderController → FulfilOrderJob → Order model → Pest feature test.

Controllers, jobs, models, tests, and routes surface as a map, not a guess.

Treat docs as active engineering memory.

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 & decisions

architecture.md and decisions.md bias explanations toward the patterns your team already chose.

Agents & Cursor rules

agents.md and .cursorrules become contextual engineering rules for local explanations.

Convention detection

Inferred stack conventions (actions, DTOs, Pest-first, TypeScript strict) plus optional .mergecore/conventions.json for team-declared rules.

Laravel-first packs

laravel-core agents.md loads automatically when artisan / Laravel signals are present.

Live index

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.

Production-risk scan when you need a hard look.

Secondary to cognition: a local scanner for the categories that wake on-call — race conditions, retries, missing transactions, queue failure modes, and more.

race-conditions

Race conditions

Check-then-act, unsynchronised shared state, and concurrent writes that only fail under real traffic.

retry-duplication

Retry duplication

Non-idempotent work on retry paths — double charges, duplicate rows, and repeated side effects.

no-transactions

Missing transactions

Multi-step writes with no atomic boundary, leaving the system in half-committed states when one step fails.

bad-queue-retries

Bad queue retries

Infinite retries, no backoff, no dead-letter path — the reason a single bad job can drown the whole worker fleet.

memory-leaks

Memory leaks

Growing caches without bounds, listeners never torn down, closures that pin large objects for the life of the process.

n-plus-one

N+1 queries

Loops that fire one query per item. Fast in dev, fatal under real traffic. Number one cause of slow endpoints.

missing-indexes

Missing indexes

Queries on unindexed columns, sequential scans on tables that will grow, and joins without covering indexes.

no-rate-limits

No rate limits

Public endpoints with no throttle, outbound calls with no budget, cron paths that fan out unbounded.

weak-logging

Weak logging

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.

Explain tradeoffs, not just syntax.

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

Weak

This uses a service.

Teaches

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

Weak

Looks fine.

Teaches

The job and HTTP path share a write without an idempotency key; a timeout retry can double-apply under load.

Tradeoff

Memory-aware

Weak

Follow best practices.

Teaches

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.

Start with understanding. Review remains optional.

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.

Index repository

Build or refresh the local RAG store under .mergecore/rag/ — also runs on workspace open.

mergecore.indexRepository

Set explanation mode

Switch between junior, mid, senior, and expert explanation depth.

mergecore.setExplanationMode

Set intelligence profile

Bias reasoning toward startup, enterprise, security, performance, or AI-safety lenses.

mergecore.setIntelligenceProfile

Hover intelligence

Hover PHP methods and classes for structured architectural explanations.

editor.action.showHover

Optional review

Secondary: run a pack-aware review on a selection, file, or diff when you want merge-time judgement.

mergecore.reviewFile

Install the editor extension. Connect agents with MCP.

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.

  • Local by default. Indexing, retrieval, and template explanations never need a MergeCore API token.
  • Optional Ollama. Point mergecore.local.ollamaBaseUrl at your local host for embeddings and chat — still on your machine.
  • Licensing later. Cloud can manage auth and seats later; Phase 1 cognition does not depend on it.

VS Code / Cursor extension

Human path: index the repo, set explanation mode, hover PHP symbols. One extension covers both editors.

  1. Build a VSIX: cd extension && npm install && npm run package
  2. Install via Extensions → Install from VSIX… (or use the CI mergecore-vsix artefact)
  3. Open a workspace, run MergeCore: Index Repository, then hover

Cursor hosts VS Code extensions — you do not need a separate Cursor plugin.

Cursor / Codex MCP

Agent path: expose local RAG, packs, and prod-risk scan as tools. Point MERGECORE_WORKSPACE at the project root.

  1. Build the server: cd mcp && npm install && npm run build
  2. Add the stdio server to your MCP host config
  3. Optional: install the MergeCore Skill so the agent prefers MCP over guessing architecture

MCP config (Cursor / Codex)

{
  "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.

A cognition layer for AI-assisted teams.

Preserve engineering knowledge, onboard faster, and understand AI-generated systems — privately, in the editor.

Install MergeCore