Knowledge & memory tools

Signature reference for Leif's persistent-state tools — self-document, bootstrap context, notes, checkpoints, and the synthesized history reads. Complements the conceptual Memory & State page.

The signature-level reference for Leif’s persistent-state tools. For when to reach for which layer — the conceptual model — read Memory & State first; this page is the parameter detail.

Self-document & living docs

read_self

read_self(section="all")

Read Leif’s self-document, or one named section.

bootstrap_context / update_bootstrap_context

bootstrap_context(scope="shtops", include_content=True)
update_bootstrap_context(scope="shtops", content="", mode="append",
                         section=None, target="docs", importance="normal",
                         document_path=None)

bootstrap_context loads a scope’s living docs + latest handoff; pass the scope matching the subsystem you’re about to work in. update_bootstrap_context writes them back — mode="append" (default) adds, target selects docs vs. handoff. Keep these current as state changes.

Notes

save_note(content, category="reference", tags=None, project_id=None,
          channel_id="context", source="ai_generated", user_id="AI",
          metadata=None)
get_recent_notes(category=None, limit=10)
search_notes(query, category=None, tags=None, channel_id=None, source=None,
             user_id=None, limit=5, offset=0)

Lightweight free-form memory. category and tags are the main retrieval handles — set them on write so search_notes can find things later.

Checkpoints & progress

For in-flight multi-step work that needs to resume cleanly in a later session.

save_progress(user_id, original_request, current_step=0, total_steps=0,
              completed_steps=None, pending_steps=None, next_action=None,
              context_summary=None, key_findings=None, files_modified=None,
              files_pending=None, is_complete=False, task_id=None, ...)
load_progress(user_id, task_id)
list_active_tasks(user_id)
cleanup_old_checkpoints(user_id=None, max_age_days=7)

save_progress has many optional fields — only user_id and original_request are required; fill in the step/findings fields that matter for resumption.

Synthesized history reads

Higher-level views over stored conversation history — good for orienting at the start of a conversation.

get_topic_overview(topic, limit=20)
get_person_summary(person_name, limit=20)
conversation_analytics(analysis_type, date_range=None)
search_past_conversations(query, person=None, date_range=None, sentiment=None, limit=5)
get_daily_review()

get_daily_review is the morning-briefing read over pending decisions, commitments, and check-ins. search_past_conversations searches imported prior discussion (filter by person, date_range, sentiment).