# hivelore [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/Doucs91/hivelore  
**GitHub Stars:** 4  
**npm Downloads (last month):** 1456  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/hivelore

## Description
Deterministic gate: blocks any commit whose diff reintroduces a documented team mistake.

## Tools
Capabilities this server exposes over MCP:

- **get_briefing** — ⭐ Ranked team policy for a task and the files you will edit — each memory as a one-line `rule`, `must_read` only when anchored to a passed file
- **mem_get** — Fetch one record in full after a briefing
- **mem_save** — Save repo policy knowledge (decision, gotcha, convention, attempt, architecture) — with a one-line `rule` and an optional doc `source
- **mem_update** — Amend an existing record in place — anchors, rule, source, body
- **mem_tried** — Record a failed approach so future agents do not repeat it (optionally arming a sensor in the same call)
- **propose_sensor** — ⭐ Turn a captured lesson into a **validated** guardrail: a regex/AST pattern, a command oracle, or a **checklist** — a required verification whenever a change touches given paths
- **pre_commit_check** — Diff against known gotchas, decisions, and stale anchors
- **why** — ⭐ Why is this code like this? `file` or `file:line` → anchored rules, sensors and checklists guarding it (and whether the line matches one), doc warnings, the commit that last changed the line, past fixes
- **report_friction** — Record friction with Hivelore itself, locally. Never sends anything — a human reviews with `hivelore report` and decides what becomes an issue
- **mem_search** — Full-text or semantic search across context records
- **mem_relevant_to** — Ranked context records for a task when project context is already loaded
- **mem_feedback** — Report applied/rejected or referenced corrected/verified outcomes; optionally link a sensor catch
- **mem_verify** — Check anchor freshness, detect stale records
- **code_map** — Look up symbols without manual grep when code-map is indexed
- **code_search** — Semantic search over exported symbols (needs `@hivelore/embeddings` + `hivelore index code-search`)
- **scaffold_test** — Generate a pending post-incident test from a lesson + the `sensors propose --kind test` line to arm it (monorepo-aware)
- **mem_session_end** — Local handoff for unfinished work (`NEXT.md` or a personal recap) — never shared corpus

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "hivelore": {
    "command": "npx",
    "args": ["-y","@hivelore/cli"]
  }
}
```

## Documentation

## What hivelore MCP server does

The hivelore MCP server provides a repo-native context and policy layer for AI coding agents. It stores team knowledge such as decisions, conventions, architecture notes, gotchas, failed attempts, and session recaps in Markdown records. Records can be tied to paths or symbols so that guidance remains connected to the code it describes.

Its purpose is narrower than a general memory database. Hivelore carries non-obvious repository rules into an agent session, then checks whether a proposed change conflicts with those rules. Examples include preserving a particular identifier format, using approved status values, or avoiding edits to an applied migration.

## How it works

Running `hivelore init` creates a `.ai/` context policy layer in the repository. An agent can begin with `get_briefing`, which returns compact project context and ranks deeper breadcrumbs by task relevance. Later calls can retrieve individual records, search the knowledge base, or obtain context relevant to a task whose project state is already loaded.

Knowledge is maintained throughout the work. Agents can save decisions and lessons, record approaches that failed, amend records with missing anchor paths, and store a session recap. `mem_verify` checks whether anchors still describe the current code, while enforcement can identify stale critical records or missing required context.

A captured lesson can become a guardrail through `propose_sensor`. Hivelore validates that the proposed pattern is silent on the current code before it can be trusted as a blocking check. The resulting policy can be evaluated with `pre_commit_check`, Git hooks, CI enforcement, or MCP ordering rules. Command-based sensors can also route a repository-owned test or invariant script to a lesson. These commands are opt-in, run with a scrubbed environment, and must pass on the current tree; blocking shell or test sensors also require reproducible proof that the command fails against the incident state.

## Tools and capabilities

The hivelore MCP server exposes tools for several parts of the knowledge lifecycle:

- `get_briefing` provides project context, decisions, gotchas, and ranked breadcrumbs in one call.
- `mem_save`, `mem_tried`, `mem_update`, `mem_search`, `mem_relevant_to`, and `mem_get` manage and retrieve context records.
- `mem_verify` detects stale anchors, and `mem_session_end` records a handoff for a later session.
- `propose_sensor` validates a lesson before turning it into a guardrail.
- `pre_commit_check` compares a diff with known decisions, gotchas, and anchor freshness.
- `code_map` looks up indexed symbols, while `code_search` provides semantic search over exported symbols when the embeddings package and code-search index are available.
- `scaffold_test` creates a pending post-incident test and the command needed to arm it.
- `report_friction` records local feedback about Hivelore for later human review.

## Limitations and notes

Hivelore complements tests, type checks, observability, security scanners, and evaluations rather than replacing them. It does not provide a general runtime oracle for functional correctness. Command sensors depend on tests or invariant scripts supplied by the repository, and an unrunnable command warns rather than blocking by default. A pending test stub cannot arm a blocking sensor.

The hivelore MCP server depends on current repository knowledge being recorded and anchored. Stale anchors are detectable, but the tool cannot infer every undocumented team rule. Code search also has additional prerequisites: `@hivelore/embeddings` and an index created with `hivelore index code-search`.

_Full upstream README: https://allmcps.com/mcp/hivelore/readme_

