Commit Graph
85 Commits
Author SHA1 Message Date
tommy0103 4f048bcd10 chore: update README.md 2026-06-18 00:13:11 +08:00
tommy0103 9ea5b8b5b4 feat: add Codex transcript indexing and dual-source retrieval
Obelisk now indexes ~/.codex/ sessions alongside Claude Code, storing
  both under a unified schema with a  column for provenance.
  Includes DB migration to ~/.obelisk/, guardian thread filtering, and
  source-aware query helpers.
2026-06-17 23:58:26 +08:00
tommy0103 12407227cc feat: index Codex sessions alongside Claude Code with source tagging
Add `source` column to sessions and messages ('claude' | 'codex').
  Discover and parse Codex JSONL files from ~/.codex/sessions/, mapping
  Codex thread/item structures to the same schema (messages, tool_calls,
  tool_results, subagents). Move DB to ~/.obelisk/ with legacy migration.
  Add rebuild-to-temp-then-swap for safe full rebuilds. On the app side:
  source filter toggle, collapsible untitled session fold, configurable
  codexDir in Settings, and a dev script. Update SKILL.md and query
  helpers to expose source fields and accept source filter opt.
2026-06-17 23:40:36 +08:00
tommy0103 e3ca1735b9 feat(app): link memory to source session with focus-scroll navigation
Add a clickable session link in MemoryList detail panel that navigates
  to the source session and scrolls to the originating message. Refactor
  SessionDetail focus logic into a reusable focusPendingMessage() that
  reads ?focus=<uuid> from the route query, scrolls the target into view,
  and applies a pulse animation that fades out.
2026-06-17 01:15:16 +08:00
tommy0103 b071cf7232 chore: switch license from MIT to AGPL-3.0 and add demo screenshot 2026-06-15 02:48:04 +08:00
tommy0103 c50706daef docs: rewrite README to cover both skill and app sides
Restructure the README around the dual nature of Obelisk: agent-first
  skill for querying session history, plus Electron desktop app for
  browsing sessions, memories, activity, and recap cards. Trim verbose
  implementation details and add app screenshot.
2026-06-15 02:38:04 +08:00
tommy0103 3822bda89e feat: evolve retrieval layer with content_type, memory FTS, forget(), and recap references
Extract schema DDL into scripts/schema.sql. Add content_type and is_meta
  columns to messages for transcript control-plane filtering. Introduce
  FTS5-backed memory recall with safe tokenization, memory soft-delete via
  forget() through the renamed --attune runtime, and anchors on memory
  records. Expand query helpers (includeMeta, thread opts, overview
  project-path awareness). Add per-card recap retrieval and writing
  references under references/recap/.
2026-06-15 02:25:21 +08:00
tommy0103 42c7c0da66 fix(app): suppress empty-state flash by gating on data-loaded flag
Add a  flag set after initial data fetch completes so
  SessionList and RecapList don't briefly show their empty/onboarding
  states before content arrives.
2026-06-15 02:07:13 +08:00
tommy0103 b7506ee765 feat(app): add Settings view, configurable claude dir, and recap docs refactor
Introduce a Settings view for configuring the Claude data directory
  (with WSL auto-detection on Windows), sidebar project grouping module,
  and an empty-state onboarding screen for SessionList. Refactor
  recap-patterns.md into per-card reference files under references/recap/
  with separate retrieval and writing guides. Remove the legacy panel.html.
  On the data layer: incremental indexing via changedPaths, per-session
  live-update IPC (obelisk:session-updated), and session dirty-tracking
  in the renderer.
2026-06-15 01:44:32 +08:00
tommy0103 9fc7f202f0 feat(app): add weekly recap cards with swipeable story UI and export
Introduce a Spotify-Wrapped-style recap feature: five themed cards
  (Cover, Path, Vibe, Workflow, Closing) rendered per archetype palette,
  with keyboard/swipe navigation and image export via capture IPC. Add
  RecapList, RecapDetail, RecapExport views and recap component library.
  Wire recap:list/read/updated IPC channels through preload, document the
  retrieval-to-card contract in references/recap-patterns.md, and bundle
  dist-renderer for production use.
2026-06-14 03:16:49 +08:00
tommy0103 4eec6b38c9 feat(app): embed indexer in Electron with file-watching service and UI refinements
Extract schema DDL into scripts/schema.sql shared between CLI and app.
  Add an in-process chokidar-based indexer-service that watches ~/.claude/projects
  for JSONL changes, debounces, and triggers background rebuilds via a worker
  thread. Rename Usage view to Activity, flesh out MemoryDetail and SubagentDetail
  views, and refine App.vue layout/routing. The main process now starts/stops the
  indexer lifecycle and notifies renderer windows on index updates.
2026-06-13 03:42:01 +08:00
tommy0103 b524339d85 feat(app): add Electron desktop UI and evolve memory/retrieval layer
Introduce an Electron app with session browser, memory list, and usage
  views (vanilla JS + Vue scaffolding). On the data layer: add content_type
  and is_meta to messages for transcript control-plane filtering, introduce
  FTS5-backed memory recall with safe tokenization, support memory archival
  via forget() through the renamed --attune runtime, and expose anchors on
  memory records.
2026-06-12 22:20:29 +08:00
tommy0103 b52f57b538 feat(memory): enforce English-only memory indexing with CJK guardrail
Memory layer is now English-indexed: memories() query terms and
  remember() summaries must be English. Adds a runtime assertion that
  rejects CJK text in both paths, guiding the agent to translate
  non-English user requests before querying or writing memories.
  Ensures consistent retrieval regardless of conversation language.
2026-06-10 03:50:38 +08:00
tommy0103 89b53d4570 docs: establish helper-first retrieval as default entry point
Make overview() + memories() + search() the standard first pass for
  broad retrieval tasks, with sql() positioned as an escalation path for
  exact joins/aggregations. Add a Default First Pass section to SKILL.md,
  a copyable first-pass pattern to query-patterns.md, and update
  retrieval-semantics.md to reinforce the helper-before-sql principle.
2026-06-10 03:28:15 +08:00
tommy0103 10b51d8878 fix(indexer): derive project_path from message cwd instead of slug decoding
The old slug-to-path conversion (replace hyphens with slashes) was
  lossy and wrong for paths containing hyphens. Now infers project_path
  from the most-frequent observed cwd across session messages, falling
  back to slug decoding only when no cwd data exists. Adds
  refreshSessionProjectPaths() to backfill existing sessions on rebuild.
2026-06-10 03:15:32 +08:00
tommy0103 807e5141fa feat(query): add overview() for project-aware session/memory discovery
Resolves current project from cwd, lists all known projects with session
  and memory counts, and returns the current project's recent sessions and
  memories in one call. Enables the agent to orient itself at the start of
  a retrieval without multiple exploratory queries.
2026-06-10 03:04:11 +08:00
tommy0103 34f3a164ab feat(memory): persistent memory layer with remember/recall CodeAct API
Add a memories table (survives index rebuilds) for agent-written
  conclusions with provenance (session, message range, project). The agent
  writes markdown files via Write tool (user-approved), then registers
  them via a --remember CodeAct script with remember(). Recall via
  memories() in --query scripts, filtered by project/session/time.

  Separates query (read-only, assertReadOnlySql) from remember (write)
  execution contexts in runtime.mjs.
2026-06-10 02:05:27 +08:00
tommy0103 dff88bbb37 refactor(skill): extract retrieval-semantics.md, compress pitfalls.md Move query design principles (scope/plan/structure/evidence) and field
semantics (context types, ordering, project scopes) out of pitfalls.md
  into a new retrieval-semantics.md. Pitfalls.md becomes a compact debug
  checklist: missing columns, FTS errors, over-large output, empty results.
  SKILL.md query routing updated to point at the three reference tiers.
2026-06-07 20:31:31 +08:00
tommy0103 0128881d04 docs: add learned-facet detail pass and session-window pitfall
Teach the agent to derive second-pass filters from first-pass evidence
  instead of pulling large message windows. Add the pattern and a pitfall
  warning against defaulting to LIMIT 25 transcript browsing.
2026-06-07 18:35:08 +08:00
tommy0103 700ca0bdd3 docs: sharpen query routing, output budget, and field-name pitfalls 2026-06-07 18:23:00 +08:00
tommy0103 3ded54f642 docs: add one-shot synthesis pattern and turn-cost pitfall
Teach the agent to keep intermediate retrieval inside the query script
  and return compact evidence in a single turn, instead of spending
  multiple conversation rounds showing raw results. Add the pattern to
  query-patterns.md and the rationale to pitfalls.md.
2026-06-07 17:41:24 +08:00
tommy0103 297ef01eaf refactor(docs): restructure SKILL.md into progressive-disclosure layers
Split the monolithic skill prompt into three tiers:
  - Core API (search/context/sql) stays in the first prompt
  - Structured helpers listed as one-liners with filter signatures
  - Detailed patterns and pitfalls extracted to references/

  Add references/query-patterns.md (copyable CodeAct recipes) and
  references/pitfalls.md (scope, FTS, ordering, compactness traps).
  Clarify project scope semantics (slug vs path vs cwd) throughout.
  Add ORDER BY timestamp DESC to failures() for newest-first default.
2026-06-07 16:42:41 +08:00
tommy0103 67513b793f feat(workflow): enrich workflow/agent metadata from workflowProgress;
lightweight workflowTree, build debounce, minor fixes

  - Index phase, label, model, state, duration, tokens per workflow agent
  - Index duration, total_tokens, status, name per workflow run
  - workflowTree returns parsed result + agent summaries instead of
    dumping all messages
  - 30s debounce on buildIndex to avoid repeated directory scans
  - Fix broken BASH_EXIT_PAT (SQLite LIKE has no character classes)
  - Fix SKILL.md step numbering, document FTS5 hyphen limitation
2026-06-04 15:49:57 +08:00
tommy0103 ab828364ad feat(index): capture cwd, skill, turn_duration, is_error from JSONL;
expose FTS5 rank and cwd filter in search()
2026-06-03 19:18:22 +08:00
tommy0103 b12ddab883 fix(failures): use is_error field instead of content pattern matching
Index the is_error boolean from JSONL tool_result blocks into a new
  column, replacing the old ERROR_PATS text-matching approach that
  produced ~90% false positives. Bash exit code pattern kept as fallback.
2026-06-02 09:19:46 +08:00
tommy0103 8d97f934f2 docs: design obelisk claude code benchmark 2026-06-02 01:53:50 +08:00
tommy0103 fb35cca8fe feat(query): unified filter opts across all list-returning APIs
Add sessions() as first-class entry point for session discovery with
  project/time/branch filters. Extend summaries, workflows, failures,
  subagents, fileHistory with the same opts vocabulary that search()
  already had — no more pulling full datasets to filter client-side.
2026-06-02 01:36:47 +08:00
tommy0103 4bfced92b7 feat(obelisk): index session summaries and guide incremental retrieval
- Add generic summaries table (source-agnostic, ready for Codex)
  - Index Claude Code away_summary events as session-level recaps
  - Add summaries() query API
  - Rewrite retrieval strategy in SKILL.md: never pull entire sessions,
    navigate horizontally (by timestamp) or vertically (by parent chain)
2026-06-01 16:52:58 +08:00
tommy0103 a6be5172c3 refactor: split runtime.mjs into db, indexer, query modules
Prepares for adding Codex JSONL support — new indexers can be added
  without touching the query layer.

  - db.mjs: schema, openDb, truncation helpers, shared utilities
  - indexer.mjs: file discovery, JSONL parsing, SQLite writes
  - query.mjs: all query API functions (search, context, raw, etc.)
  - runtime.mjs: thin CLI entry point + VM script executor
2026-05-31 03:29:41 +08:00
tommy0103 fb353f5deb fix(indexer): streaming reads, per-file transactions, and error reporting
- Replace readFileSync+split with chunked line reader (readLines) to
    avoid loading entire JSONL files into memory at once
  - Wrap each file's indexing in its own transaction so one corrupt file
    doesn't roll back the entire index
  - Log warnings to stderr instead of silently swallowing errors in
    indexSubagentMeta, indexWorkflows, and indexHistory
  - Add try/catch around readdirSync calls in discoverJsonlFiles and
    indexWorkflows to survive unreadable directories
  - Push error-pattern filtering in failures() into SQL LIKE clauses
    instead of scanning all tool_results in JS
2026-05-31 02:33:22 +08:00
tommy0103 5593990440 docs(SKILL.md): add raw() usage and sql schema reminder 2026-05-30 04:57:06 +08:00
tommy0103 cf8bd1154e fix(indexer): safe JSON truncation and windowed raw access
- Don't truncate workflow result_json and script (low-volume, must
    stay parseable)
  - Replace blind string truncation on tool_calls.input_json with
    structure-aware truncJson that shortens individual string values
    while keeping the JSON skeleton valid
  - Add raw(uuid, {offset, limit}) API for windowed access to the
    original JSONL line, so truncated content can be recovered on demand
2026-05-30 04:06:42 +08:00
tommy0103 2b02a7b6c8 fix(indexer): preserve session metadata during incremental reindex
Previously the session metadata accumulator started from zero on every
  reindex pass, so an incremental update would overwrite started_at and
  message_count with values derived only from the new lines.

  Now reads the existing session row first and merges new data on top.
2026-05-30 03:53:16 +08:00
tommy0103 1d45c91a8a chore: update README 2026-05-30 03:27:03 +08:00
tommy0103 bc9b6dde72 build(obelisk): let Claude Code search its own session history
- SQLite + FTS5 index over ~/.claude JSONL transcripts.
  - Agent writes JS queries at runtime — same sandbox pattern as workflows.
  - Covers sessions, subagents, workflow executions, tool calls, and full-text search.
2026-05-30 03:21:35 +08:00