Skip to content

Instantly share code, notes, and snippets.

View MisreadableMind's full-sized avatar
✍️
Hacking around

Vitalii Ratyshnyi MisreadableMind

✍️
Hacking around
View GitHub Profile

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

description Initialize a .memory-bank folder with structured project documentation templates
allowed-tools Bash, Read, Write, Glob, Grep, AskUserQuestion

Initialize a Memory Bank for the current project. Memory Bank is a .memory-bank folder in the project root that serves as a persistent knowledge base storing structured documentation about the project: goals, architecture, conventions, tech stack, and current tasks.

Steps

1. Check for existing Memory Bank

@MisreadableMind
MisreadableMind / style-guide.md
Created February 23, 2026 20:14
Style Guide Command for Claude Code, just place it under .claude/commands and run like/style-guide "additional hints/instructions"
description Analyze the project's existing styles and generate a comprehensive style guide
allowed-tools Read, Write, Edit, Glob, Grep, Bash
argument-hint <output-file-path (e.g. style-guide.html)>

Analyze the current project's codebase to extract its design system, then generate a standalone style guide HTML page documenting it. Write the output to: $ARGUMENTS (default to style-guide.html in the current working directory if no argument given).


"""
Schema-Guided Reasoning (SGR) Demo with OpenAI
This Python code demonstrates Schema-Guided Reasoning (SGR) with OpenAI. It:
- Implements a business agent capable of planning and reasoning
- Implements tool calling using only SGR and simple dispatch
- Uses a simple (inexpensive) non-reasoning model for that
To give this agent something to work with, we ask it to help with running
a small business - selling courses to help achieve AGI faster.
function drawNestedSetsTree(data, node) {
let map = new Map();
data.sort((a, b) => {
return a.left - b.left;
});
data.forEach((item) => {
map.set(item.left, item);
});
let resultData = {
children: []