diff --git a/README.md b/README.md index 4978ba2..eea8ba2 100644 --- a/README.md +++ b/README.md @@ -7,186 +7,185 @@ [![stars](https://img.shields.io/github/stars/tommy0103/obelisk?style=flat-square)](https://github.com/tommy0103/obelisk/stargazers) [![version](https://img.shields.io/github/v/tag/tommy0103/obelisk?label=version&style=flat-square)](https://github.com/tommy0103/obelisk/releases) -[![license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE) +[![license](https://img.shields.io/badge/license-AGPL--3.0-blue.svg?style=flat-square)](LICENSE) -Every past session, subagent, and workflow -- queryable by your agent. - -**Humans should not browse session history. Agents should query it.** +Every past Claude Code and Codex session -- queryable by your agent, browsable by you.
+## Two sides of the same index + +Obelisk has two sides that share one SQLite index: + +**Skill side** — an agent skill that lets coding agents search and query their own session history. The agent writes JS queries, runs them locally, answers in plain language. + +**App side** — an Electron desktop app for humans to browse sessions, manage memories, view usage stats, and see weekly recap cards. + +Both read from the same `~/.obelisk/obelisk.sqlite` database. The indexer reads Claude Code transcripts from `~/.claude/projects` and Codex transcripts from `~/.codex/sessions`. + +## Codex support + +Obelisk indexes Claude Code and Codex into the same SQLite schema instead of keeping separate databases. Rows carry a `source` value (`claude` or `codex`), and Codex IDs are prefixed with `codex:` so they cannot collide with Claude session IDs. + +Codex root threads become normal Obelisk sessions. Codex child threads are attached through the same `subagents` table when parent-thread metadata is available. Codex does not emit Claude-style workflow metadata, so workflow tables may be empty for Codex-only history. + +For live app refresh, Obelisk watches `~/.claude/projects` and `~/.codex/sessions`. It does not watch the whole `~/.codex` root. Codex's `session_index.jsonl` is used as lightweight title/update metadata during indexing, not as the message transcript source. + +## Skill: agent-first retrieval +
- Obelisk in action -
-

Ask in plain language. The agent writes the query, runs it, answers.

+ Obelisk App
-## Not a session browser - -Most history tools help humans find old chats. - -Obelisk is built for agents. It exposes past work as structured data: sessions, -messages, tool calls, subagents, workflows, file history, failures, parent -chains, and human-approved markdown memories. The agent writes the query, runs -it locally, and answers in plain language. - -You don't manage history. You ask questions about past work. - -## Why Obelisk - -| Session library | Obelisk | -|---|---| -| Find an old chat | Answer a question about past work | -| Human browses snippets | Agent writes and runs a query | -| Search result list | Structured context and reasoning | -| Sessions as documents | Sessions as queryable memory | -| Good for recall | Good for investigation | - -## What you can ask +You can use obelisk like: ``` -/obelisk 上次 auth bug 最后到底改了哪些文件,为什么这么改 -/obelisk 这个文件最近在哪些 sessions 里被反复修改 -/obelisk 找出最近失败的 tool calls,它们分别发生在哪些任务里 -/obelisk 那个 review workflow 的 subagents 各自结论是什么 -/obelisk 我之前有没有试过这个方案,结果为什么放弃了 +/obelisk-skill 上次 auth bug 最后到底改了哪些文件,为什么这么改 +/obelisk-skill 这个文件最近在哪些 sessions 里被反复修改 +/obelisk-skill 找出最近失败的 tool calls,它们分别发生在哪些任务里 +/obelisk-skill 那个 review workflow 的 subagents 各自结论是什么 +/obelisk-skill recap this week ``` -Anything Claude Code has done before -- sessions, tool calls, subagents, workflows -- becomes structured, queryable memory. Ask in your own words. - -## Install +### Install ```bash npx skills add tommy0103/obelisk-skill ``` -Or manually: copy `obelisk/` into your project's `.claude/skills/`. +Or manually: copy `obelisk-skill/` into your project's `.claude/skills/` Then in any Claude Code session: ``` -/obelisk +/obelisk-skill ``` First run builds the index (~5 seconds for 100 sessions). After that it rebuilds incrementally. -### Requires - -- Node.js 22+ (uses built-in node:sqlite with FTS5) -- Claude Code with skills support. - -## How it works +### How it works ``` You ask a question ↓ Agent writes a JS query against the SQLite index ↓ -Runs it via node runtime.mjs --query