Want to access all premium content?

Become a paying subscriber to get access to all courses, guides like this, prompts and skills library, and $500+ worth of AI tools.

Jev is TypeSafe's decision model. It returns choices and probabilities rather than written answers. You can use it to choose a folder for a note or assess whether that note is relevant to a question.

This guide connects Jev to a second brain: Markdown files organized with a CLAUDE.md map. Jev files incoming notes and selects three for Claude to read. You'll then measure the difference between loading those three and loading the whole collection.

You'll need Claude Code, a Mac with Terminal, and a TypeSafe account. Start with made-up notes while testing.

Step 1: Install Jev. Add your API key and the TypeSafe skill.

Step 2: Build the brain. Create the folders and instructions.

Step 3: Sort incoming notes. Have Jev suggest where each note belongs.

Step 4: Find relevant notes. Shortlist files before Claude answers.

Step 5: Measure the difference. Check retrieval accuracy and estimate the tokens saved.

Step 1: Install Jev

Jev handles the sorting decisions. Claude uses the selected notes to write your answer.

The pricing listed for this guide is $0.042 per million input tokens, with output free and $5 in signup credit. Check the current price and credit in TypeSafe's console before running a larger collection.

Create an API key and enter it in Terminal yourself:

echo 'export TYPESAFE_API_KEY="paste-your-key-here"' >> ~/.zshrc
source ~/.zshrc

These commands save the key in your shell configuration. Keep it out of chat.

Install the official skill:

claude plugin marketplace add typesafe-ai/skills
claude plugin install typesafe@typesafe-ai

Create your folder and start Claude Code:

mkdir -p ~/second-brain && cd ~/second-brain
claude

Check the key setup:

Read the TypeSafe skill and identify the environment variable it expects for the API key.

Check whether that variable is set in this shell. Answer yes or no without printing its value.

If Claude answers no, check whether the key is missing or the expected variable has a different name. Repeat the setup with the correct name if needed.

Step 2: Build the brain

The folder holds your notes. CLAUDE.md explains the layout and tells Claude how to use them.

Set up this folder as a second brain using Markdown files.

Create inbox, notes, people, and projects folders. Add context.md, learnings.md, and decisions.md in the root, each with a heading.

Write a CLAUDE.md under 60 lines explaining the folders and root files.

Include these rules: one topic per file, lowercase filenames with hyphens, cite the files used in each answer, and say when the notes don't contain the answer.

Show the finished folder structure.

Check that the folders and files exist, then read CLAUDE.md in a text editor.

Step 3: Sort incoming notes

Put new notes in inbox. Jev chooses a destination, and the script moves only notes that meet your chosen threshold.

Read the TypeSafe skill and current Jev documentation.

Create six fictional inbox notes, one per file:
1. Northwind invoices are net 30 with a 2% late fee.
2. Maya Lindqvist at Northwind prefers email and no calls before 10am.
3. Receipts must be filed within 14 days.
4. The spring launch page needs its pricing section.
5. Daniel Okafor at Brightline Print needs flyer files two days before a deadline.
6. Remember to water the office plants.

Create scripts/file-inbox. Ask Jev to choose notes, people, projects, or none for each file. Define the categories so general policies go in notes, contact details in people, active work in projects, and unrelated reminders stay in inbox.

Propose a probability threshold before moving anything. Use descriptive lowercase filenames with hyphens, preserve contents, and never overwrite an existing file.

Show the choice, probability, and proposed action. Never print the API key.

Review the script and proposed moves, then ask Claude to run it. The intended result is five filed notes, with the plant reminder left in inbox.

If a choice is wrong, explain the correct destination. Adjust the category definitions and retest before adding more notes.

Step 4: Find relevant notes

Next, have Jev rank notes against your question. Claude can then open a shortlist instead of reading the entire folder.

Create scripts/find-notes.

Given a question, use Jev to assess the relevance of each file in notes, people, and projects. Return the top three paths and scores without printing note contents.

Propose a minimum relevance threshold.

Update CLAUDE.md to run find-notes for questions about this collection, read the returned files, and cite them. If they don't support an answer, say so rather than guessing.

Review the script and instructions, then try:

How does Maya prefer to be contacted?

Check that Maya's note appears first and that Claude names the file in its answer.

Jev still reads the notes to rank them. The reduction comes from sending less note text to Claude. Jev still processes the notes to rank them.

Step 5: Measure the difference

Add more test material:

Create 30 fictional notes across notes, people, and projects. Include specific supplier terms, contact preferences, and project updates.

Write five test questions with known answers and record the expected source file for each in a separate answer file.

Check retrieval before measuring savings:

Run find-notes on the five questions without giving Jev the answer file.

Show whether each expected source appears in the top three and report its score.

Inspect misses. They may come from unclear relevance criteria, missing context, or a limit of three files. After adjusting the finder, try fresh questions too.

Then estimate the difference:

Create scripts/measure.

For each test question, count characters in all files under notes, people, and projects, then count characters in its three shortlisted files.

Estimate tokens as characters divided by four. Show both estimates and the percentage reduction. Don't print note contents.

Label this as a note-text comparison, excluding Jev usage, instructions, tool calls, and Claude's output.

With roughly 35 similarly sized notes, reading three instead of all of them can reduce the note text sent to Claude by around 90%. Your result depends on file sizes and how many notes an answer needs.

Use cases

Once retrieval works on known answers, try these four jobs.

Use case #1: File a batch

Add three fictional inbox notes: a supplier contact, a company policy, and a project update.

Run file-inbox and show the choices, probabilities, and actions.

Check the destinations and confirm the files kept their contents.

Use case #2: Find a specific detail

What does Daniel Okafor need before a deadline?

Run find-notes first and cite the file supporting your answer.

Compare the answer with Daniel's note.

Use case #3: Catch a duplicate

Add an inbox note that repeats the receipt policy in different words.

Before filing it, use Jev to check whether an existing note contains the same information. If it does, leave the new file in inbox and report the matching path. Don't delete or merge anything.

Check that the reported note contains the same policy.

Use case #4: Test a missing answer

What is Maya's phone number?

Maya's card may rank highly because it mentions her. That doesn't mean it contains a phone number. Check that Claude reads the note and says the number isn't recorded.

Confirmed limitations

Jev's choices and scores can be wrong. Review filing decisions and keep uncertain notes in the inbox.

A relevant note may not contain the answer. Claude must check the text rather than rely on its score. Questions spanning several topics may also need more than three files.

The scripts send note text to Jev. Review them before use and keep passwords, banking details, and private client information out of the test collection.

This finder searches notes, people, and projects. It doesn't search the root reference files unless you add them.

The 90% figure compares all note text with three selected notes. Its character-based estimate is rough and excludes Jev processing, instructions, tool calls, and output. Expect a smaller drop in your total bill.

Closing

Start with the six inbox notes and check where each one lands. Then test retrieval with questions whose answers you know before measuring the difference.

Once both scripts work reliably, add a few notes of your own. Keep checking missed answers and uncertain filing choices as the collection grows.

See you in the next one :)