Skip to main content

reflect

Use the reflect skill to persist memories, claims, and inference nodes into the TerminusDB temporal graph. Covers branch lifecycle, trusted session writes, temporal recall, and the separation between session and inference branches.

소스 정보

저장소
Tyler-R-Kendrick/agentic_speculative_knowledge
최근 소스 활동
2026년 4월 10일 14:25
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
reflect
description
Use the reflect skill to persist memories, claims, and inference nodes into the TerminusDB temporal graph. Covers branch lifecycle, trusted session writes, temporal recall, and the separation between session and inference branches.
# Reflect Persist and reason over long-term knowledge in the temporal graph. ## When to use - Writing memories or claims to a persistent Terminus branch - Creating or managing session and inference branches - Querying the temporal graph for trusted or branch-local data - Verifying the separation between trusted and speculative branches ## Quick start ```python from src.terminus.adapter import TerminusMemoryRepository from src.terminus.branch_manager import ( BranchManager, session_branch_name, inference_branch_name, ) repo = TerminusMemoryRepository(url="http://localhost:6363") # Create a session branch branch = repo.ensure_branch(session_branch_name("sess-1")) # Write a claim to the session branch from src.claims.models import Claim claim = Claim(claim_text="Cert rotation caused auth failures.", claim_type="observation") repo.write_claim(branch, claim) # Write a memory from src.normalization.mapper import ClaimToMemoryMapper mapper = ClaimToMemoryMapper() memories = mapper.map_many([claim], session_id="sess-1") for m in memories: m.source_branch = branch repo.write_memory(branch, m) # Query trusted memories trusted = repo.query_memories(branch="session/sess-1") # Query inference nodes on a speculative branch inference_br = repo.ensure_branch(inference_branch_name("sess-1")) nodes = repo.query_inference_nodes(inference_br) ``` ### Branch manager helpers ```python from src.terminus.branch_manager import session_branch_name, inference_branch_name session_branch_name("sess-1") # → "session/sess-1" inference_branch_name("sess-1") # → "inference/sess-1" ``` ## Key APIs | Class | Method | Purpose | |---|---|---| | `TerminusMemoryRepository` | `ensure_branch()` | Create a branch if it does not exist | | `TerminusMemoryRepository` | `write_memory()` | Persist a `CandidateMemory` to a branch | | `TerminusMemoryRepository` | `write_claim()` | Persist a `Claim` to a branch | | `TerminusMemoryRepository` | `write_inference_node()` | Persist an `InferenceNode` to a branch | | `TerminusMemoryRepository` | `write_facet_relation()` | Persist a `FacetRelation` to a branch | | `TerminusMemoryRepository` | `query_memories()` | Read memories from a branch | | `TerminusMemoryRepository` | `query_inference_nodes()` | Read inference nodes from a branch | | `TerminusMemoryRepository` | `query_facet_relations()` | Read facet relations from a branch | | `session_branch_name()` | — | `"session/{id}"` naming helper | | `inference_branch_name()` | — | `"inference/{id}"` naming helper | | `BranchManager` | `create_session_branch()` / `create_inference_branch()` | High-level branch creation | ## Grounding - `src/terminus/adapter.py` — Terminus persistence adapter with fallback store - `src/terminus/branch_manager.py` — branch naming and lifecycle helpers - `src/terminus/schema.py` — document encoding/decoding for Terminus - `tests/unit/test_terminus.py` — unit coverage - `notebooks/04_terminus_temporal_graph_memory.ipynb` — executable walkthrough ## Rules 1. Use `TerminusMemoryRepository` from `src/terminus/adapter.py` for all graph writes and reads. 2. Reuse `session_branch_name()` and `inference_branch_name()` from `src/terminus/branch_manager.py` for branch naming. 3. Keep trusted data on `session/*` branches and speculative data on `inference/*` branches; never mix them. 4. The adapter falls back to an in-process store when Terminus is unreachable — keep both paths aligned. 5. Validate with `tests/unit/test_terminus.py`.
GitHub에서 보기