Skip to main content

Crate tj_core

Crate tj_core 

Source
Expand description

tj-core: append-only event log + derived SQLite state for Task Journal.

Modules§

artifacts
Artifact extraction — regex-based scrape of structured references out of free-form event text. Captures the bits that turn a journal entry into a real ledger of what shipped: commit hashes, PR URLs, ticket IDs, branch names, file paths.
classifier
Event classifier: takes a chat chunk + recent task context, returns suggested event_type + task_id + confidence.
completeness
Capture completeness: deterministic, read-only detection of structural gaps in a task’s captured history. Measure + flag only — no mutation.
consolidate
Memory consolidation (Pillar C): distil a project’s recurring decisions and constraints into a handful of durable semantic/procedural facts with a single LLM call.
db
dream
Dream — offline memory passes over session transcripts.
embed
Embedding substrate for semantic memory (Pillar A).
event
finalize
Finalize — bring a legacy task to a finished shape.
frontmatter
Pure renderer: a task’s settled knowledge → a Claude-memory frontmatter file. One-directional (Task-Journal → Claude memory). No fs, no DB, no JSONL.
fts
FTS5 query sanitization.
llm
Pluggable LLM backend for the journal’s optional AI operations (consolidation, dream backfill). One small trait, several adapters, picked by name so this public package can grow new providers without touching callers.
memory
Global cross-project memory index (Pillar B).
pack
Pack assembler: turns events + derived state into compact resume Markdown.
paths
project_hash
recall
Read-only proactive-recall engine. Given the current tool context, return the most relevant prior confirmed rejection/decision events so the agent doesn’t re-walk a ruled-out path. Shared by the PostToolUse push path (claude-memory-60m) and the MCP-output push path (7km).
reminder
Compact, read-only reminder of the active task, re-injected after a compaction so the post-compaction agent retains its task + constraints.
session
Claude Code session JSONL parser and backfill logic.
session_id
Live Claude Code session id helpers.
storage
title
Human-readable title derivation for auto-opened tasks.

Constants§

SCHEMA_VERSION
On-disk + on-wire schema version for events and packs. Bump when a breaking change is made to the JSONL event shape or the pack JSON envelope. Single source of truth across the workspace — never inline.

Functions§

new_task_id
Build a fresh task identifier of the form tj-<10 lowercase base32>.