# AI use cases for Encephalon (isaachinman/encephalon)

Repo: [isaachinman/encephalon](https://github.com/isaachinman/encephalon) | Use cases: 4 | Page: https://dedupedai.com/use-cases/isaachinman-encephalon/

Encephalon is a TypeScript package that stores durable, Git-tracked JSON knowledge records inside a repository and makes them searchable through a CLI and a synchronous JavaScript API.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Record a team decision that future agents can find: https://dedupedai.com/use-cases/isaachinman-encephalon/record-team-decisions-for-agents/
- Replace an outdated decision without losing history: https://dedupedai.com/use-cases/isaachinman-encephalon/replace-outdated-decision-keep-history/
- Give an agent project context in one batched call: https://dedupedai.com/use-cases/isaachinman-encephalon/give-agent-project-context-in-one-call/
- Resolve conflicting knowledge records after a merge: https://dedupedai.com/use-cases/isaachinman-encephalon/resolve-knowledge-conflicts-after-merge/

## How to record a team decision that future agents can find with Encephalon

Repo: [isaachinman/encephalon](https://github.com/isaachinman/encephalon) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Store a decision as a Git-tracked record and find it again with compact search.

**Who it is for:** A developer or tech lead who has just settled an architecture or API choice and wants coding agents to respect it in later tasks.

**The problem:** Decisions made in one task get lost between agent sessions, so later agents re-decide the same questions.

**The outcome:** The decision is saved as a repository-local record that search returns to any agent working in the repo.

### Steps

1. Run `npm install --save-dev encephalon` at the Git repository root.
2. Run `npx --no-install encephalon init` to create the baseline and the managed block in AGENTS.md and CLAUDE.md.
3. Run `npx --no-install encephalon add --id auth-tokens --kind decision --subject api.authentication --source agent --data '{"summary":"Use signed bearer tokens","rationale":["Support non-browser clients"]}' --text 'authentication tokens'` to record the decision.
4. Run `npx --no-install encephalon search --compact 'authentication tokens'` to confirm the record is found.
5. Commit the new records and the instruction file changes with your normal Git workflow.

### Prompt to paste into your agent

```text
In the repository <repo-path>, install Encephalon as a dev dependency, run init, then add one decision record about <decision topic> using a new ID. Expected output: JSON from compact search that includes the new record ID. Verify that the search for a term from the decision returns that ID.
```

### Caveat

Records are repository-local and travel with Git, so the package adds no hosted storage, accounts or access control.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/isaachinman-encephalon/record-team-decisions-for-agents/

## How to replace an outdated decision without losing history with Encephalon

Repo: [isaachinman/encephalon](https://github.com/isaachinman/encephalon) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Supersede an old record with a new one so agents see the current choice and the past.

**Who it is for:** A maintainer whose earlier decision no longer matches how the project works.

**The problem:** Editing or deleting an old decision would erase history, while leaving it active would mislead agents.

**The outcome:** A new active record replaces the old head, and the old record stays readable as superseded history.

### Steps

1. Run `npx --no-install encephalon search --compact 'authentication tokens'` to find the current subject and active record.
2. Run `npx --no-install encephalon add --id auth-tokens-v2 --kind decision --subject api.authentication --source agent --supersedes auth-tokens --data '{"summary":"Use short-lived signed bearer tokens"}' --text 'authentication tokens'` to add the replacement.
3. Run `npx --no-install encephalon search --compact --include-superseded authentication` to confirm both records are visible with their status.
4. Run `npx --no-install encephalon show --id auth-tokens --active-only` to confirm the old record is no longer returned as active.

### Prompt to paste into your agent

```text
In the repository <repo-path>, find the active decision for <subject>, then add a replacement record that supersedes it. Expected output: the add result and a compact search that includes superseded records. Verify that the old record ID is not returned by show with --active-only.
```

### Caveat

A replacement must supersede every active head with the same kind and subject, so search the subject first.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/isaachinman-encephalon/replace-outdated-decision-keep-history/

## How to give an agent project context in one batched call with Encephalon

Repo: [isaachinman/encephalon](https://github.com/isaachinman/encephalon) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Fetch several searches and records together so an agent starts a task with context.

**Who it is for:** A developer starting a task with a coding agent that needs the relevant decisions before editing code.

**The problem:** Running many separate searches and lookups slows the agent and clutters its working context.

**The outcome:** One gather command returns matching search results and named records in the order requested.

### Steps

1. Run `npx --no-install encephalon list --kind decision` to see the decision records in the repository.
2. Run `npx --no-install encephalon gather --search authentication --search tokens --show auth-tokens` to fetch searches and a record in one call.
3. Run `npx --no-install encephalon show --id auth-tokens --active-only` if the agent needs one record in full.

### Prompt to paste into your agent

```text
In the repository <repo-path>, run gather with two search terms related to <task topic> and one known record ID. Expected output: results in the same order as the requested searches and shows. Verify that a missing show ID returns null and an empty search returns an empty array.
```

### Caveat

A gather accepts at most 16 searches and 64 shows, and each response has a 4 MiB budget, so narrow large requests.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/isaachinman-encephalon/give-agent-project-context-in-one-call/

## How to resolve conflicting knowledge records after a merge with Encephalon

Repo: [isaachinman/encephalon](https://github.com/isaachinman/encephalon) | Difficulty: Advanced | Time: 30 minutes | Basis: From the README

Validate merged records and add one record that supersedes every conflicting head.

**Who it is for:** A developer merging a branch where two people recorded different decisions for the same subject.

**The problem:** Conflicting active heads make reads return both answers, and deleting history to fix it is not allowed.

**The outcome:** A resolving record supersedes all conflicting heads, and validation passes again.

### Steps

1. Merge the other branch with your usual Git workflow. (inferred, check the README)
2. Run `npx --no-install encephalon validate` to list the conflicting active heads.
3. Run `npx --no-install encephalon add --id <resolved-id> --kind <kind> --subject <subject> --source agent --supersedes <head-a> --supersedes <head-b> --data '<resolved summary as JSON>' --text '<search terms>'`, repeating --supersedes for each conflicting head. (inferred, check the README)
4. Run `npx --no-install encephalon validate` again to confirm no conflicts remain.

### Prompt to paste into your agent

```text
In the repository <repo-path>, after a merge, run validate, then add one resolving record for subject <subject> that supersedes all conflicting heads. Expected output: validation errors before the fix and a clean validation after it. Verify that no old record file was deleted or edited.
```

### Caveat

Until a conflict is resolved, reads return every conflicting head as active, and history must never be deleted to repair it.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/isaachinman-encephalon/resolve-knowledge-conflicts-after-merge/
