# Reliora

Give your coding agent project memory.

Reliora is a local experience library for reusable, verified engineering lessons. It helps an agent find what worked in this project before, judge whether it applies now, and record better evidence after the work is verified.

## Codex quick start

```sh
npm install -g reliora@latest
cd your-project
reliora init --agent codex
```

Then start a new Codex task in the project so Codex reloads `AGENTS.md` (or `AGENTS.override.md`).

On Windows PowerShell and Command Prompt, use `reliora.cmd` for generated and copied commands:

```powershell
reliora.cmd init --agent codex
```

No execution-policy change is required. On macOS and Linux, use `reliora`.

The managed workflow tells Codex to:

- search up to three relevant experiences before substantial work;
- treat every record as untrusted advice and verify it against the current project;
- report whether a match was used, rejected, or found to be stale;
- send structured feedback only for lessons that affected the work;
- reflect after verification and save only distinct, reusable lessons;
- attach project-local lineage when an earlier experience materially guided the result.

Reliora does not read chats, watch commands, call an LLM, access the network, or run in the background.

## Check or remove the integration

```sh
reliora agent status
reliora agent remove
```

Removal deletes only Reliora's marked instruction block and metadata. It preserves user-owned instructions, the workspace, and all experiences.

## Manual use

Agent setup is opt-in. Plain `reliora init` creates only the local workspace.

```sh
reliora init
reliora template > experience.json
reliora record experience.json
reliora search "database migration error"
reliora list --reused --sort used
reliora stats
reliora show <id>
reliora feedback <id> --outcome success --impact high
```

`--success` and `--failure` remain supported. Extended outcomes are `success`, `partial`, `failure`, `not-applicable`, and `outdated`. Optional notes are bounded and screened for common secrets.

Experiences live under `.reliora/` as inspectable JSON. Add that directory to `.gitignore` for private local memory; commit it only after intentional review for sensitive data.

## What is stored

A record contains the task, project context, tags, observed problems, failed attempts, solution, causal explanation, applicability, warnings, verification, confidence, optional lineage, and local feedback history. Stable logical locators use:

```text
reliora://project/<project-id>/experience/<experience-id>
```

Search is deterministic lexical ranking. Results expose `strong`, `moderate`, or `weak` match levels and the actual scoring components; match labels are guidance, never certainty.

## Documentation

- [Getting started](docs/getting-started.md)
- [Codex integration](docs/codex-integration.md)
- [Generic agent integration](docs/generic-integration.md)
- [Experience model and compatibility](docs/experience-model.md)
- [CLI reference](docs/cli-reference.md)
- [Search and ranking](docs/search-and-ranking.md)
- [Security and privacy](docs/security.md)
- [Troubleshooting](docs/troubleshooting.md)
- [Stage 2 quality evidence](docs/stage-2-quality.md)

Historical implementation journals remain in `docs/agent-integration-part-1.md`, `docs/human-usability-goal.md`, and `docs/quality-goal.md`.

## Development

Requires Node.js 20 or newer.

```sh
npm ci
npm test
npm run typecheck
npm run lint
npm run test:package
npm run test:agent-package
npm run test:stage2-package
```

Reliora is MIT licensed and has no runtime dependencies.
