Metadata-Version: 2.4
Name: novus-rag
Version: 11.9.202
Summary: The brain and the memory for your AI agents: a structural map of your projects, served over MCP.
Author: JSNavas
License: MIT
Requires-Python: <3.15,>=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: lancedb==0.30.2
Requires-Dist: pyarrow==26.0.1
Requires-Dist: pandas==3.1.1
Requires-Dist: numpy==2.5.5
Requires-Dist: openai==2.36.0
Requires-Dist: anthropic==2.12.0
Requires-Dist: mcp==1.27.1
Requires-Dist: fastmcp==3.2.4
Requires-Dist: httpx==0.28.1
Requires-Dist: tree-sitter==0.27.0
Requires-Dist: tree-sitter-language-pack==1.28.0
Requires-Dist: python-dotenv==1.2.2
Requires-Dist: requests==2.34.2
Requires-Dist: pytest==9.2.0
Requires-Dist: pytest-asyncio==1.5.0
Requires-Dist: rich==15.0.0
Dynamic: license-file

# 🧠 NOVUS RAG

**The context of your projects, available to your coding agent.**

NOVUS RAG is an MCP server that analyses your repositories and gives Codex, Claude Code, OpenCode,
Antigravity and other agents a structural map of the code: real dependencies, routes, tables, documented business
rules and the project's own conventions. Every fact comes with a verifiable `path:line`.

It is not a generic code search engine. When you change project or start a task, it tells the agent
what to change and what can break; with the optional Engram memory it also recovers decisions and
pending tasks from earlier sessions. Spanish README: [README.es.md](README.es.md). Start with the
[Quickstart](#quickstart).

## Illustrative example

Ask “modify the order cancellation policy”. NOVUS returns the methods involved, their callers and
exposed routes, the tables the change reads and writes, the documented rules and the related tests
(a file found is not a coverage claim) — before the agent edits a file. This is a condensed example,
not a captured transcript.

```text
TASK: modify order cancellation policy
PROJECT: orders-api (main)
ROUTES: PATCH /orders/:id/cancel -> OrdersController.cancel [src/orders/orders.controller.ts:84]
CALLERS: OrdersService.cancel [src/orders/orders.service.ts:132], PaymentsClient.refund [...]
TABLES: orders (status, cancelled_at), order_lines (read), refunds (insert)
RULES: docs/ORDERS.md#cancellation (30-day window)
RELATED TESTS: src/orders/orders.service.spec.ts
```

The agent edits only the confirmed paths. After editing, `review_change` runs the project's compiler
or linter and checks the naming pattern, security and operations; it lists other callers and the
tests that were not touched.

## Quickstart

**PyPI, no clone — run only your client's line:**

```bash
uv tool install novus-rag
novus-rag init
novus-rag mcp-config codex        # Codex
novus-rag mcp-config claude       # Claude Code
novus-rag mcp-config opencode     # OpenCode
novus-rag mcp-config antigravity  # Antigravity
novus-rag mcp-config pi           # Pi (pi.dev)
# other clients: cursor, cline, gemini, claude-desktop
cd /path/to/your-project && novus-rag sync
```

**From the repo (development):**

```bash
git clone https://github.com/JSNavas/novus-rag.git
cd novus-rag && ./install.sh
novus-rag mcp-config codex        # Codex
novus-rag mcp-config claude       # Claude Code
novus-rag mcp-config opencode     # OpenCode
novus-rag mcp-config antigravity  # Antigravity
novus-rag mcp-config pi           # Pi (pi.dev)
cd /path/to/your-project && novus-rag sync
```

`sync` is progressive: the structural index (AST, schema, business rules) is queryable in about a
minute; summaries, graph and conventions continue in the background and an interrupted run resumes
where it stopped. `novus-rag status` shows the level per pillar and whether the background is still
running.

## Working across projects

This is one of its clearest differentiators. The index follows a route from
the frontend through the gateway to the service and down to the tables it writes, including the
callers on the other side and the shared tables.

When two projects use the same table or call each other over HTTP, the answer says which project
owns the operation and which side consumes it. The optional Engram memory adds the decisions behind
that boundary: which project is the front of which back and why the split exists.

## What comes from where

| Source | What it provides | Needs an LLM? |
|---|---|---|
| Structural index (AST + graph) | dependencies, routes, tables, callers, literal bodies, naming patterns | No |
| LLM pass | file summaries, conventions, business-rule sections | Yes |
| Engram (optional) | tasks and their state, decisions, user conventions, project relations | No |

Literal facts always carry a `path:line`. Anything a model wrote is marked as such, and a user rule
stored in Engram wins over the pattern measured from the code. That separation is deliberate: you can
tell what was extracted, what was inferred and what you configured. Processing depends on the LLM
**and embeddings** providers you choose; both can be local when the provider supports it. Only what
those endpoints receive leaves the machine. See [SECURITY.md](SECURITY.md).

## Freshness and trust

The index describes one committed branch, not your working tree. The answer header says which branch
and commit it used, and when it no longer matches reality.

| Situation | What the answer says | What to do |
|---|---|---|
| Index at the branch tip | fresh RAG | trust it |
| Uncommitted files on the indexed branch | fresh RAG + file list | re-read only those files before editing |
| Different branch | other branch, verified against the index | use it as reference |
| Branch tip moved without re-indexing | no answer, with both commits | `novus-rag update` or `sync` |

## When to use it

Use it when the project has real dependencies between modules or services, documented rules, or
conventions an agent keeps breaking. Repeated tasks in the same codebase benefit the most, because
the index and the memory are already prepared.

It may not pay off for a small, uniform repository, a one-off edit, or a codebase with no
documentation or conventions to protect. Size alone does not decide it: repeated use, complex rules
and the cost of an agent breaking conventions matter more than the file count.

## Stacks and limits

Validated with real tasks: NestJS, Symfony, Laravel (+ DDD), Remix, Vue and KrakenD. Also indexed,
but not yet validated with the same battery: Next.js, React Router 7, React, Angular, Nuxt, Svelte,
Express, Fastify, Python and Rust.

The full matrix and what each level means is in [docs/STACKS.md](docs/STACKS.md). The index is not a
compiler and not a runtime tracer: it reads the repository, its AST, its graph and its documented
rules; it does not execute the application.

## Benchmark

These are measurements on the repository's own demo tasks, not a universal claim:

| What the run measured | Result |
|---|---|
| Models that stopped a task the memory had postponed (7 of 7) | 7 / 7 |
| Activity-log feature: 11 files, compiled, reviewed, merged, by a small model | $0 in that run |
| Small models reaching big-model quality on the same tasks | all 7 |

The free models used in those runs (`beam-free`, `hy4-flash-free`) are no longer served by OpenCode
Go. The current default, `hy4-flash`, is billed by token or plan quota; local embeddings remain free.
Method and conditions: [docs/BENCHMARK.md](docs/BENCHMARK.md).

## Advanced

<details>
<summary><b>Planner and sub-agents</b></summary>

A planner can split a feature into subtasks, each with a cached guide, and hand them to sub-agents
that run in their own threads and copies of the project. Roles, tickets, the cached guide and the
commit style travel inside the brief. Sub-agents commit on their own branch and never merge into the
main branch.

See [docs/ORCHESTRATION.md](docs/ORCHESTRATION.md).

</details>

<details>
<summary><b>Memory details (Engram)</b></summary>

Engram stores tasks and their state, postponements, decisions, your conventions and relations
between projects. NOVUS RAG reads and writes it through `remember`, `forget` and `project_memory`;
Engram's own MCP is optional for direct inspection.

See [docs/ENGRAM.md](docs/ENGRAM.md).

</details>

## Documentation

| Doc | What you will find |
|---|---|
| [docs/INSTALL.md](docs/INSTALL.md) | Requirements, providers, MCP registration, verification, troubleshooting |
| [docs/OPERATIONS.md](docs/OPERATIONS.md) | Daily flow, freshness and git hooks, layered configuration, exclusions |
| [docs/STACKS.md](docs/STACKS.md) | Supported stacks and languages |
| [docs/COMMANDS.md](docs/COMMANDS.md) | Command reference |
| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | Components, chunk types, the six pillars, pipeline, stack detection |
| [docs/MCP-TOOLS.md](docs/MCP-TOOLS.md) | The twelve tools, modes and intent catalog |
| [docs/ORCHESTRATION.md](docs/ORCHESTRATION.md) | A planner and its sub-agents: roles, tickets, the cached guide |
| [docs/BENCHMARK.md](docs/BENCHMARK.md) | Small models as executors, with and without the RAG |
| [docs/AGENT-CONTRACT.md](docs/AGENT-CONTRACT.md) | The contract every agent follows, guarantee markers |
| [docs/INTERNALS.md](docs/INTERNALS.md) | Hang protection, versioned caches |
| [docs/ENGRAM.md](docs/ENGRAM.md) | Optional memory across sessions |
| [docs/DECISIONS.md](docs/DECISIONS.md) | The non-obvious whys, with measurements |

## Compatibility

- Python 3.13-3.14 · macOS and Linux
- Any MCP-capable client over stdio. `novus-rag mcp-config` covers `claude`, `codex`, `opencode`,
  `antigravity`, `pi`, `cursor`, `cline`, `gemini` and `claude-desktop`.

## Contributing

Bug reports with a reproducible task are the most valuable contribution. See
[CONTRIBUTING.md](CONTRIBUTING.md) and, for security issues, [SECURITY.md](SECURITY.md).

## License

[MIT](LICENSE)
