RecallLoom
RecallLoom is a portable context harness for session-based agents.
It provides a lightweight file model for project continuity across sessions without requiring heavy infrastructure.
The goal is not to remember everything. The goal is to keep the right project state durable, readable, and recoverable across sessions.
Package Scope
This file is the agent-facing entrypoint for the installable recallloom/ skill package.
Install and trigger this package through your host agent's normal skill discovery flow.
RecallLoom itself does not require a custom host-specific launcher inside the package.
The package may still ship optional native wrapper templates for supported hosts.
This installable package is intentionally kept lean.
Human-facing repository landing pages and marketing docs may exist upstream, but they are not bundled into the installed skill directory.
In the source repository, README.md and README.en.md are concise public
front doors, README.zh-CN.md is the compatibility entry, INDEX.md is the
full map, and USAGE.md is the operator guide.
Those files describe the same helper contract as this installed package
entrypoint rather than defining a second logic set.
For package inventory, protocol details, and helper-script behavior, rely on the files that ship inside the package itself:
managed-assets.json
package-metadata.json
references/file-contracts.md
references/operation-playbooks.md
references/package-support-policy.md
references/recording-workflow.md
references/protocol.md
Package Facts
- package version:
0.5.0
- protocol version:
1.0
- supported protocol versions:
Runtime Assumptions
- Python 3.10 or newer
- supported workspace languages:
- supported bridge targets:
AGENTS.md
CLAUDE.md
GEMINI.md
.github/copilot-instructions.md
Package Support Gate
RecallLoom package support is separate from project sidecar protocol compatibility.
- Helpers MUST perform the package-support check and MUST NOT write support state into project
.recallloom/.
- If support is
readonly_only, mutating helpers MUST block while diagnostic and read-only helpers MAY continue.
- If support is
diagnostic_only, only diagnostic helpers SHOULD continue.
- If support is
unknown_offline because no local support cache exists, local diagnostic, read-only, and mutating actions MAY continue; network access is not a prerequisite for local RecallLoom use.
- A structurally invalid or uninterpretable local support cache permits diagnostic actions only while offline. A structurally valid stale cache is re-evaluated against the current package version and keeps its
supported, upgrade_recommended, readonly_only, or diagnostic_only restriction.
- Invalid-cache diagnostics MUST identify the cache condition with a public-safe reason and direct recovery toward read-only diagnosis, online refresh and atomic cache replacement, or removal of the invalid package-scoped local cache. They MUST NOT present a package upgrade as the cache repair or describe the cache as tampered.
invalid_support_advisory remains distinct from an invalid local cache: correct or refresh the advisory rather than treating it as cache damage.
- Blocked actions MUST return the shared failure contract with
blocked_reason: package_support_blocked and a package_support object. See references/package-support-policy.md.
Public Surface And Required Checks
- Public package and release surfaces MUST stay limited to files a user needs to install, understand, and operate the package.
- Public surfaces MUST NOT include copied project memory, generated runtime output, machine-local data, maintainer-only working files, or material that is not required by the installable package.
- Public CI and required checks MAY validate repository contents and metadata.
- Required-check wording MUST NOT present repository checks as proof of a user's local workspace state, host behavior, or sidecar trust status.
Non-Invasive Defaults And UX Gates
- Core install and daily use MUST NOT require or auto-install hooks, daemons, watchers, MCP/plugin enforcement, host adapters, telemetry/metrics, or remote payload transmission.
- Native command wrappers are opt-in convenience entrypoints over the same dispatcher, not a required enforcement layer.
- Ordinary docs/source/planning edits outside the managed sidecar stay silent allow or low-friction unless they affect provenance-sensitive RecallLoom state.
- Managed sidecar or provenance-impacting actions surface one of
allow, warn, ask, or block in helper readiness output when provenance state is relevant.
warn is for low-risk structural-only or readable legacy states and should stay brief; repeated same-session low-risk warnings should be cooldown-friendly.
ask is for legacy review / repair import or reviewed imported baseline actions and requires explicit operator confirmation before higher-risk writes.
block is non-waivable for forged markers, detected receipt/store inconsistency, direct state.json / config.json edits, privacy violations, and any general, legacy, or unbound state classified as inconsistent_or_tampered_evidence.
- D5 is the sole narrow recovery transition: only helper-path target-only post-hash evidence that is contract-valid for the current D5 schema and has an exact failure-time state match may proceed through a fresh binding, human proposal/review, and expected-binding promotion. It is not a waiver and does not prove cryptographic authorship. Promotion still requires fresh validate, status, and preflight before a write. The exact D5 human-material sections, JSON keys, and promotion commands are in
references/operation-playbooks.md.
- Do not present remote services, host memory, plugins, MCP, hooks, or wrappers as authority for local helper evidence.
- Receipt-backed mutation is limited to dispatcher-issued managed-file writes, daily-log appends to the current latest cursor, and post-append summary sync. Archive and bridge remain preview-only; their apply modes remain unsupported until those surfaces gain their own receipt support.
Write Protocol Red Lines
- Managed sidecar mutations in normal operation MUST use the applicable dispatcher surface: use
write for managed-file writes, append for daily-log entries, and sync-current-state-after-append only when its post-append contract requires that lane. Do not bypass the dispatcher with blind file replacement, blind patching, or hand-built sidecar files.
- Daily-log writes in normal operation MUST use dispatcher
append; its internal helper writes the entry. Do not handwrite daily-log-entry markers.
- Daily-log cursor repair in normal operation MUST use dispatcher
repair-daily-log-cursor; its internal helper performs the repair. Do not hand-edit state.json.daily_logs.
- Overwrite-style managed files in normal operation MUST use dispatcher
write; its internal helper performs the revision-aware commit. Do not handwrite file-state markers.
STORAGE_ROOT/state.json and STORAGE_ROOT/config.json MUST NOT be hand-edited during normal operation.
- Normal operations use only the applicable dispatcher surface. Managed-file writes and daily-log entries use
write and append; sync-current-state-after-append is used only when its post-append contract requires that lane. commit_context_file.py and append_daily_log_entry.py are internal dispatcher/integration surfaces: the dispatcher performs its own fresh preflight, constructs the binding, and persists the matching lease immediately before calling a helper. A read-only preflight does not issue either material, there is no independent operator pickup interface, and a hand-invoked helper without dispatcher-issued material is expected to fail. For the first write from a reviewed imported baseline, use dispatcher write or append with --confirm-review-imported-baseline; the post-append sync lane also accepts that confirmation when its contract requires it. The internal helpers do not accept the flag and only consume dispatcher-issued confirmation-bound binding and lease material.
- Protocol
1.0 daily-log counters are file-local: entry-seq is 1..N within one daily log and canonical entry-id is entry-{entry_seq}. Do not treat either as globally unique.
- Keep
state.json.daily_logs.entry_count as entry_count; it means the entry marker count in the latest active daily log, not a global cumulative count.
- If a helper write fails, diagnose, fix, retry, then surface the helper failure contract if it still cannot complete.
- Damaged-sidecar recovery MUST use the canonical recovery proposal/review/promotion helpers and
validate_context.py; do not hand-edit managed markers, state.json, config.json, receipts, or helper-evidence stores.
When To Use It
Use RecallLoom when you need to:
- continue an existing project after a pause
- restore project context from maintained files
- maintain current-state project memory
- record meaningful milestone progress
- reduce context drift across sessions or tools
Typical triggers include:
- continue this project
- restore project context
- pick up where we left off
- rl-init
- update the project memory
- record today’s progress
- prepare a clean next-step handoff inside the maintained project files
First Attach Behavior
On first explicit invocation in a project, RecallLoom should not assume the workspace is already initialized.
The correct flow is:
- detect whether a valid RecallLoom sidecar already exists
- if it exists, continue normally without making initialization into extra ceremony
- if it does not exist, explain that the project is not initialized yet and ask whether initialization should be performed
- if the user explicitly confirms, or directly says
rl-init, run the standard initialization action
- if the environment cannot provide Python
3.10+, stop with a blocked runtime result instead of hand-building a sidecar
rl-init SHOULD mean: initialize the sidecar, validate the workspace, and return next recommended actions. Treat it as a stable high-level action name even when the host does not expose native slash commands.
Current Action Surface
For the current package line, the stable operator-facing wrapper targets are:
rl-init
rl-resume
rl-status
rl-validate
rl-init is the primary operator-friendly first-attach action name.
The others are operator-facing stable action names that can be interpreted by the host agent or mapped into native custom commands when the host supports that surface.
rl-bridge remains the canonical dispatcher/helper action label for bridge work, but this package line does not promise a universal native wrapper or deterministic first-hop routing for that label.
Natural language remains the default public phrasing for these actions.
The dispatcher command surface also includes quick-summary, record --suggest, record --plan, append, write, sync-current-state-after-append, and repair-daily-log-cursor.
For append, write, and sync-current-state-after-append only, use
--compact-json when a bounded transaction result is needed: it emits
recallloom.transaction.compact/1.0, remains below 2048 UTF-8 bytes, and is
mutually exclusive with the legacy schema-1.1 --json output.
Use quick-summary for current-state snapshots, record --suggest to produce a side-effect-free candidate recording prompt after a durable milestone/decision/validation signal, record --plan to classify a recording intent and get the next safe helper step, append --entry-json for milestone logging, write --type ... --source-file <prepared-file> --dry-run or write --type ... --stdin --dry-run before typed managed-file writes, and sync-current-state-after-append --reuse-current-summary --semantic-unchanged-assertion-json <json> only after preflight allows metadata-only post_append_summary_sync; see references/recording-workflow.md for the bound assertion JSON skeleton.
record --suggest never writes, never watches in the background, and never turns sensitive or attached raw material into a write path; it only returns a sanitized candidate summary and suggested record --plan path when a prompt is appropriate.
Use repair-daily-log-cursor in preview mode first when state.json.daily_logs no longer matches the parsed latest active daily log. Preview returns a public-safe repair classification, preview_digest, expected workspace revision, confirmation material, and post-repair validation step. Apply mode requires --apply --yes plus a fresh preview binding through --expected-workspace-revision or --preview-digest, is support-gated as mutating, and repairs cursor fields without writing helper receipts or rewriting daily-log content.
These dispatcher additions are optional for existing v0.3.4 projects and do not change sidecar protocol 1.0.
Native wrappers for rl-init, rl-resume, rl-status, and rl-validate
are convenience entrypoints only. They must delegate to the same dispatcher and
must not replace natural-language restore requests, bypass helpers, or create a
host-specific product logic copy.
Initialized-Project Restore Contract
When a host or agent sees a generic initialized-project restore request:
- check for a valid RecallLoom sidecar before broad skill fan-out
- if the sidecar is valid, route into the normal RecallLoom fast path
- let broader memory or workflow systems participate only when the sidecar is missing, conflicting, clearly insufficient, or the user explicitly asks for deeper review
For the current package line, rl-resume is the single stable operator-facing action name for that initialized-project restore checkpoint.
Natural-language restore requests are still the primary public path.
Do not invent a manual sidecar fallback or a host-local restore alias that is not backed by the package contract.
Public Interaction Rules
RecallLoom should default to user task language, not implementation language.
- Prefer “initialize”, “restore”, “import existing project reality”, “continue”, and “record progress”.
- Do not lead with helper names, section keys, or the
coldstart label unless the user is explicitly doing operator/debug work.
- Keep the first response result-first and action-light: one clear next move is better than exposing routing details.
- Do not invent a manual sidecar fallback when runtime requirements are missing; surface the blocked state and stop.
- This is not hand-building a sidecar; it is the packaged restore and helper contract.
Fast And Deep Paths
RecallLoom should treat fast path as the default interaction mode.
- Fast path: smallest trustworthy source set, shortest interaction, lowest interruption cost.
- Deep path: only when sources conflict, source coverage is insufficient, risk is too high for a direct recommendation, or the user explicitly asks for deeper review.
- Host-memory inputs remain opt-in and hint-only; their presence should bias the agent toward explicit review instead of silent promotion.
Resume mode selection:
- Use ambient
resume or status when the next agent needs the normal tiered read-plan guidance before deciding what to read.
- Use
resume --fast when current-state orientation is enough and the next safe move can be chosen from state.json plus rolling_summary.md.
- Use
resume --full when stable framing, source-of-truth routing, or project-local update_protocol.md guidance is needed before action.
- Keep daily-log evidence on demand through
query_continuity.py; fast and full resume modes should not expand into daily logs by default.
Core File Model
RecallLoom uses three primary memory layers:
STORAGE_ROOT/context_brief.md: stable project framing
STORAGE_ROOT/rolling_summary.md: overwrite-style current-state snapshot
STORAGE_ROOT/daily_logs/YYYY-MM-DD.md: append-only milestone evidence
STORAGE_ROOT/config.json: machine-readable workspace settings
STORAGE_ROOT/state.json: machine-readable sidecar state for concurrency-aware helpers
STORAGE_ROOT/update_protocol.md: recommended project-local override layer for read and write behavior
File responsibilities in one sentence:
context_brief.md explains what this project is and how it should be approached.
rolling_summary.md explains what is true right now.
daily_logs/ explain what happened at milestone level.
config.json keeps storage and language settings stable.
state.json tracks workspace revision and helper-visible sidecar state.
update_protocol.md, when present, can narrow or strengthen the default read/write rules for this specific project.
STORAGE_ROOT is either PROJECT_ROOT/.recallloom/ or PROJECT_ROOT/recallloom/. Exactly one valid storage root MAY exist; if both exist, stop instead of guessing.
Machine-readable markers, not heading labels, are the normative file contract. Protocol 1.0 supports workspace languages en and zh-CN. See references/file-contracts.md.
Minimum Cold-Start Flow
- Find the project root.
- Read
STORAGE_ROOT/config.json.
- Read
STORAGE_ROOT/state.json.
- Read
STORAGE_ROOT/rolling_summary.md.
- If
STORAGE_ROOT/update_protocol.md exists, surface it before expanding beyond the minimum continuity set.
- Read
STORAGE_ROOT/context_brief.md only when the current task needs framing, scope, source-of-truth, or phase context that the summary does not already cover.
- Read the latest active daily log only when milestone evidence, workday judgment, or external-writer reconciliation requires it.
- Run a quick freshness check before trusting older context or before a major write.
Cold start should restore and judge first.
It should not automatically continue next_step or execute project work just because continuity files were read.
See references/operation-playbooks.md for the full flow.
Current Read-Side Helpers
Three read-side helpers matter here:
preflight_context_check.py: revision-aware freshness review before formal writes; returns handoff-first digests, suggested read targets, write-tier guidance, and trust/drift state.
summarize_continuity_status.py: ambient continuity status surface on the same freshness baseline; returns the same digest family plus shared workday-state and trust/drift guidance.
query_continuity.py: read-only continuity recall surface; returns answer-first recall with answer, supporting citations, and a risk/freshness note. It also returns hits, token estimate, budget hint, freshness/conflict state, trust/drift state, an output variant label, and override review targets. Daily-log citations include explicit date values, current-state files win ties, and the context window stays bounded.
All attach-safe continuity text returned through these read-side surfaces is expected to respect the shared attached-text scan rules.
Minimum Write Rules
- Before choosing a write target, read
STORAGE_ROOT/update_protocol.md if it exists.
current_state changes usually target rolling_summary.md.
stable_rule changes usually target context_brief.md.
milestone_evidence usually targets the daily log.
- Do not update context files for trivial reads or minor edits with no durable change.
Default exits before any write should stay explicit:
no_write is a normal successful result
merge_current_state updates rolling_summary.md
append_milestone appends to the daily log
confirm and blocked stop automatic writes rather than guessing
Read-side trust notes:
sidecar_trust_state stays in helper JSON, not in protocol 1.0
state.json.provenance may store local provenance markers such as structurally_valid, review_imported_baseline, or helper_evidenced after a receipt-finalized helper write; helper JSON still owns operational provenance_state routing
- Legacy sidecars without baseline metadata are readable, but write readiness must route through review / repair import before mutating helper writes
structurally_valid and review_imported_baseline mean structural/readiness evidence only and MUST NOT be treated as helper_evidenced
- Receipt-backed provenance is only claimed after dispatcher-backed receipt finalization writes the optional local receipt store and updates provenance metadata; structural validation alone MUST NOT output
helper_evidenced
- Default
rl-validate / validate_context.py remains structural and does not read the optional receipt store. Receipt-store validation is explicit: use --require-provenance with exactly one scope flag, --changed-only or --full.
continuity_drift_risk_level is a review signal, not proof that the sidecar is damaged
allowed_operation_level and write_readiness help hosts route low-risk read vs review-first vs write-after-preflight flows
Project-local overrides MAY narrow read order, write order, or archive behavior, but they do not replace the core file contract.
Agent Layered Write Judgment
Before writing continuity content, the agent should make the layer decision itself. Helpers can provide safe write context and static write-tier guidance, but they must not replace agent judgment about what the content means.
Use this quick check before editing managed files:
- Is there a new durable fact, or is
no_write the right result?
- If writing is needed, is the main content
stable_rule, current_state, or milestone_evidence?
- Does the event span multiple layers, so it needs a
multi_layer_split?
- Is the same fact already present, so the right action is merge instead of duplicate?
- Is the layer uncertain enough to
defer or confirm rather than guess?
Layer defaults:
stable_rule: long-lived workflow rules, source-of-truth routing, project boundaries, or recovery facts. Default target: context_brief.md.
current_state: what is true now, including current phase, active risks, active judgments, and next steps. Default target: rolling_summary.md.
milestone_evidence: completed validations, approvals, releases, accepted decisions, or other durable evidence. Default target: daily log.
no_write, defer, and confirm are valid outcomes when nothing durable changed, the discussion is unstable, or the boundary needs explicit approval.
When more than one layer is valid, split different facts across layers and do not duplicate the same sentence.
For the detailed rules, conflict order, self-review template, and anonymized calibration cases, see references/operation-playbooks.md.
For protocol 1.0, update_protocol.md is a human-reviewed override layer; helpers surface it but do not automatically execute its natural-language rules.
RecallLoom prefers the smallest valid write set. The agent decides what should change and prepares content; helpers decide whether the write is still safe to apply.
When generating workspace files, prefer the user's workspace language when it is supported by protocol 1.0 (en, zh-CN).
When Not To Update Context
Do not update context files just because:
- you performed a cold start
- you answered a short question with no durable project change
- you explored without reaching a stable conclusion
- you made wording-only edits
The protocol is designed to reduce noise, not to turn every session into documentation work.
Profiles
RecallLoom provides four profiles:
profiles/general-project-continuity.md
profiles/research-writing.md
profiles/product-doc-collaboration.md
profiles/software-project-coordination.md
Profiles refine emphasis, evidence handling, and drift risk. Use general-project-continuity.md by default; switch to a specialized profile only when the project shape is a high-confidence match.
What RecallLoom Does Not Try To Be
RecallLoom does not try to be:
- a general-purpose memory server
- a full agent execution runtime
- a replacement for platform-specific instruction files
- a heavy autonomous coding framework
It is the project continuity layer, not the whole agent stack.
Where To Read More
references/protocol.md
references/file-contracts.md
references/operation-playbooks.md
references/anti-patterns.md
references/profiles.md
License
This package is released under Apache License 2.0.
1---2name: recallloom3description: Use when a task involves continuing a project, restoring project context, maintaining file-based project memory, updating current-state summaries, or recording meaningful progress across sessions. Works best for long-horizon, file-based projects and supports research writing, product document collaboration, software project coordination, and broader cross-functional project continuity.4---56# RecallLoom78RecallLoom is a portable context harness for session-based agents.910It provides a lightweight file model for project continuity across sessions without requiring heavy infrastructure.1112The goal is not to remember everything. The goal is to keep the right project state durable, readable, and recoverable across sessions.1314## Package Scope1516This file is the agent-facing entrypoint for the installable `recallloom/` skill package.1718Install and trigger this package through your host agent's normal skill discovery flow.19RecallLoom itself does not require a custom host-specific launcher inside the package.20The package may still ship optional native wrapper templates for supported hosts.2122This installable package is intentionally kept lean.23Human-facing repository landing pages and marketing docs may exist upstream, but they are not bundled into the installed skill directory.2425In the source repository, `README.md` and `README.en.md` are concise public26front doors, `README.zh-CN.md` is the compatibility entry, `INDEX.md` is the27full map, and `USAGE.md` is the operator guide.28Those files describe the same helper contract as this installed package29entrypoint rather than defining a second logic set.3031For package inventory, protocol details, and helper-script behavior, rely on the files that ship inside the package itself:3233- `managed-assets.json`34- `package-metadata.json`35- `references/file-contracts.md`36- `references/operation-playbooks.md`37- `references/package-support-policy.md`38- `references/recording-workflow.md`39- `references/protocol.md`4041## Package Facts4243<!-- RecallLoom metadata sync start: package-metadata -->44- package version: `0.5.0`45- protocol version: `1.0`46- supported protocol versions:47 - `1.0`48<!-- RecallLoom metadata sync end: package-metadata -->4950## Runtime Assumptions5152<!-- RecallLoom metadata sync start: runtime-assumptions -->53- Python 3.10 or newer54- supported workspace languages:55 - `en`56 - `zh-CN`57- supported bridge targets:58 - `AGENTS.md`59 - `CLAUDE.md`60 - `GEMINI.md`61 - `.github/copilot-instructions.md`62<!-- RecallLoom metadata sync end: runtime-assumptions -->6364## Package Support Gate6566RecallLoom package support is separate from project sidecar protocol compatibility.6768- Helpers MUST perform the package-support check and MUST NOT write support state into project `.recallloom/`.69- If support is `readonly_only`, mutating helpers MUST block while diagnostic and read-only helpers MAY continue.70- If support is `diagnostic_only`, only diagnostic helpers SHOULD continue.71- If support is `unknown_offline` because no local support cache exists, local diagnostic, read-only, and mutating actions MAY continue; network access is not a prerequisite for local RecallLoom use.72- A structurally invalid or uninterpretable local support cache permits diagnostic actions only while offline. A structurally valid stale cache is re-evaluated against the current package version and keeps its `supported`, `upgrade_recommended`, `readonly_only`, or `diagnostic_only` restriction.73- Invalid-cache diagnostics MUST identify the cache condition with a public-safe reason and direct recovery toward read-only diagnosis, online refresh and atomic cache replacement, or removal of the invalid package-scoped local cache. They MUST NOT present a package upgrade as the cache repair or describe the cache as tampered.74- `invalid_support_advisory` remains distinct from an invalid local cache: correct or refresh the advisory rather than treating it as cache damage.75- Blocked actions MUST return the shared failure contract with `blocked_reason: package_support_blocked` and a `package_support` object. See `references/package-support-policy.md`.7677## Public Surface And Required Checks7879- Public package and release surfaces MUST stay limited to files a user needs to install, understand, and operate the package.80- Public surfaces MUST NOT include copied project memory, generated runtime output, machine-local data, maintainer-only working files, or material that is not required by the installable package.81- Public CI and required checks MAY validate repository contents and metadata.82- Required-check wording MUST NOT present repository checks as proof of a user's local workspace state, host behavior, or sidecar trust status.8384## Non-Invasive Defaults And UX Gates8586- Core install and daily use MUST NOT require or auto-install hooks, daemons, watchers, MCP/plugin enforcement, host adapters, telemetry/metrics, or remote payload transmission.87- Native command wrappers are opt-in convenience entrypoints over the same dispatcher, not a required enforcement layer.88- Ordinary docs/source/planning edits outside the managed sidecar stay silent allow or low-friction unless they affect provenance-sensitive RecallLoom state.89- Managed sidecar or provenance-impacting actions surface one of `allow`, `warn`, `ask`, or `block` in helper readiness output when provenance state is relevant.90- `warn` is for low-risk structural-only or readable legacy states and should stay brief; repeated same-session low-risk warnings should be cooldown-friendly.91- `ask` is for legacy review / repair import or reviewed imported baseline actions and requires explicit operator confirmation before higher-risk writes.92- `block` is non-waivable for forged markers, detected receipt/store inconsistency, direct `state.json` / `config.json` edits, privacy violations, and any general, legacy, or unbound state classified as `inconsistent_or_tampered_evidence`.93- D5 is the sole narrow recovery transition: only helper-path target-only post-hash evidence that is contract-valid for the current D5 schema and has an exact failure-time state match may proceed through a fresh binding, human proposal/review, and expected-binding promotion. It is not a waiver and does not prove cryptographic authorship. Promotion still requires fresh validate, status, and preflight before a write. The exact D5 human-material sections, JSON keys, and promotion commands are in `references/operation-playbooks.md`.94- Do not present remote services, host memory, plugins, MCP, hooks, or wrappers as authority for local helper evidence.95- Receipt-backed mutation is limited to dispatcher-issued managed-file writes, daily-log appends to the current latest cursor, and post-append summary sync. Archive and bridge remain preview-only; their apply modes remain unsupported until those surfaces gain their own receipt support.9697## Write Protocol Red Lines9899- Managed sidecar mutations in normal operation MUST use the applicable dispatcher surface: use `write` for managed-file writes, `append` for daily-log entries, and `sync-current-state-after-append` only when its post-append contract requires that lane. Do not bypass the dispatcher with blind file replacement, blind patching, or hand-built sidecar files.100- Daily-log writes in normal operation MUST use dispatcher `append`; its internal helper writes the entry. Do not handwrite `daily-log-entry` markers.101- Daily-log cursor repair in normal operation MUST use dispatcher `repair-daily-log-cursor`; its internal helper performs the repair. Do not hand-edit `state.json.daily_logs`.102- Overwrite-style managed files in normal operation MUST use dispatcher `write`; its internal helper performs the revision-aware commit. Do not handwrite `file-state` markers.103- `STORAGE_ROOT/state.json` and `STORAGE_ROOT/config.json` MUST NOT be hand-edited during normal operation.104- Normal operations use only the applicable dispatcher surface. Managed-file writes and daily-log entries use `write` and `append`; `sync-current-state-after-append` is used only when its post-append contract requires that lane. `commit_context_file.py` and `append_daily_log_entry.py` are internal dispatcher/integration surfaces: the dispatcher performs its own fresh preflight, constructs the binding, and persists the matching lease immediately before calling a helper. A read-only preflight does not issue either material, there is no independent operator pickup interface, and a hand-invoked helper without dispatcher-issued material is expected to fail. For the first write from a reviewed imported baseline, use dispatcher `write` or `append` with `--confirm-review-imported-baseline`; the post-append sync lane also accepts that confirmation when its contract requires it. The internal helpers do not accept the flag and only consume dispatcher-issued confirmation-bound binding and lease material.105- Protocol `1.0` daily-log counters are file-local: `entry-seq` is `1..N` within one daily log and canonical `entry-id` is `entry-{entry_seq}`. Do not treat either as globally unique.106- Keep `state.json.daily_logs.entry_count` as `entry_count`; it means the entry marker count in the latest active daily log, not a global cumulative count.107- If a helper write fails, diagnose, fix, retry, then surface the helper failure contract if it still cannot complete.108- Damaged-sidecar recovery MUST use the canonical recovery proposal/review/promotion helpers and `validate_context.py`; do not hand-edit managed markers, `state.json`, `config.json`, receipts, or helper-evidence stores.109110## When To Use It111112Use RecallLoom when you need to:113114- continue an existing project after a pause115- restore project context from maintained files116- maintain current-state project memory117- record meaningful milestone progress118- reduce context drift across sessions or tools119120Typical triggers include:121122- continue this project123- restore project context124- pick up where we left off125- rl-init126- update the project memory127- record today’s progress128- prepare a clean next-step handoff inside the maintained project files129130## First Attach Behavior131132On first explicit invocation in a project, RecallLoom should not assume the workspace is already initialized.133134The correct flow is:1351361. detect whether a valid RecallLoom sidecar already exists1372. if it exists, continue normally without making initialization into extra ceremony1383. if it does not exist, explain that the project is not initialized yet and ask whether initialization should be performed1394. if the user explicitly confirms, or directly says `rl-init`, run the standard initialization action1405. if the environment cannot provide Python `3.10+`, stop with a blocked runtime result instead of hand-building a sidecar141142`rl-init` SHOULD mean: initialize the sidecar, validate the workspace, and return next recommended actions. Treat it as a stable high-level action name even when the host does not expose native slash commands.143144## Current Action Surface145146For the current package line, the stable operator-facing wrapper targets are:147148- `rl-init`149- `rl-resume`150- `rl-status`151- `rl-validate`152153`rl-init` is the primary operator-friendly first-attach action name.154The others are operator-facing stable action names that can be interpreted by the host agent or mapped into native custom commands when the host supports that surface.155`rl-bridge` remains the canonical dispatcher/helper action label for bridge work, but this package line does not promise a universal native wrapper or deterministic first-hop routing for that label.156Natural language remains the default public phrasing for these actions.157158The dispatcher command surface also includes `quick-summary`, `record --suggest`, `record --plan`, `append`, `write`, `sync-current-state-after-append`, and `repair-daily-log-cursor`.159For `append`, `write`, and `sync-current-state-after-append` only, use160`--compact-json` when a bounded transaction result is needed: it emits161`recallloom.transaction.compact/1.0`, remains below 2048 UTF-8 bytes, and is162mutually exclusive with the legacy schema-1.1 `--json` output.163Use `quick-summary` for current-state snapshots, `record --suggest` to produce a side-effect-free candidate recording prompt after a durable milestone/decision/validation signal, `record --plan` to classify a recording intent and get the next safe helper step, `append --entry-json` for milestone logging, `write --type ... --source-file <prepared-file> --dry-run` or `write --type ... --stdin --dry-run` before typed managed-file writes, and `sync-current-state-after-append --reuse-current-summary --semantic-unchanged-assertion-json <json>` only after preflight allows metadata-only `post_append_summary_sync`; see `references/recording-workflow.md` for the bound assertion JSON skeleton.164`record --suggest` never writes, never watches in the background, and never turns sensitive or attached raw material into a write path; it only returns a sanitized candidate summary and suggested `record --plan` path when a prompt is appropriate.165Use `repair-daily-log-cursor` in preview mode first when `state.json.daily_logs` no longer matches the parsed latest active daily log. Preview returns a public-safe repair classification, `preview_digest`, expected workspace revision, confirmation material, and post-repair validation step. Apply mode requires `--apply --yes` plus a fresh preview binding through `--expected-workspace-revision` or `--preview-digest`, is support-gated as mutating, and repairs cursor fields without writing helper receipts or rewriting daily-log content.166These dispatcher additions are optional for existing `v0.3.4` projects and do not change sidecar protocol `1.0`.167168Native wrappers for `rl-init`, `rl-resume`, `rl-status`, and `rl-validate`169are convenience entrypoints only. They must delegate to the same dispatcher and170must not replace natural-language restore requests, bypass helpers, or create a171host-specific product logic copy.172173## Initialized-Project Restore Contract174175When a host or agent sees a generic initialized-project restore request:1761771. check for a valid RecallLoom sidecar before broad skill fan-out1782. if the sidecar is valid, route into the normal RecallLoom fast path1793. let broader memory or workflow systems participate only when the sidecar is missing, conflicting, clearly insufficient, or the user explicitly asks for deeper review180181For the current package line, `rl-resume` is the single stable operator-facing action name for that initialized-project restore checkpoint.182Natural-language restore requests are still the primary public path.183Do not invent a manual sidecar fallback or a host-local restore alias that is not backed by the package contract.184185## Public Interaction Rules186187RecallLoom should default to user task language, not implementation language.188189- Prefer “initialize”, “restore”, “import existing project reality”, “continue”, and “record progress”.190- Do not lead with helper names, section keys, or the `coldstart` label unless the user is explicitly doing operator/debug work.191- Keep the first response result-first and action-light: one clear next move is better than exposing routing details.192- Do not invent a manual sidecar fallback when runtime requirements are missing; surface the blocked state and stop.193- This is not hand-building a sidecar; it is the packaged restore and helper contract.194195## Fast And Deep Paths196197RecallLoom should treat fast path as the default interaction mode.198199- Fast path: smallest trustworthy source set, shortest interaction, lowest interruption cost.200- Deep path: only when sources conflict, source coverage is insufficient, risk is too high for a direct recommendation, or the user explicitly asks for deeper review.201- Host-memory inputs remain opt-in and hint-only; their presence should bias the agent toward explicit review instead of silent promotion.202203Resume mode selection:204205- Use ambient `resume` or `status` when the next agent needs the normal tiered read-plan guidance before deciding what to read.206- Use `resume --fast` when current-state orientation is enough and the next safe move can be chosen from `state.json` plus `rolling_summary.md`.207- Use `resume --full` when stable framing, source-of-truth routing, or project-local `update_protocol.md` guidance is needed before action.208- Keep daily-log evidence on demand through `query_continuity.py`; fast and full resume modes should not expand into daily logs by default.209210## Core File Model211212RecallLoom uses three primary memory layers:213214- `STORAGE_ROOT/context_brief.md`: stable project framing215- `STORAGE_ROOT/rolling_summary.md`: overwrite-style current-state snapshot216- `STORAGE_ROOT/daily_logs/YYYY-MM-DD.md`: append-only milestone evidence217- `STORAGE_ROOT/config.json`: machine-readable workspace settings218- `STORAGE_ROOT/state.json`: machine-readable sidecar state for concurrency-aware helpers219- `STORAGE_ROOT/update_protocol.md`: recommended project-local override layer for read and write behavior220221File responsibilities in one sentence:222223- `context_brief.md` explains what this project is and how it should be approached.224- `rolling_summary.md` explains what is true right now.225- `daily_logs/` explain what happened at milestone level.226- `config.json` keeps storage and language settings stable.227- `state.json` tracks workspace revision and helper-visible sidecar state.228- `update_protocol.md`, when present, can narrow or strengthen the default read/write rules for this specific project.229230`STORAGE_ROOT` is either `PROJECT_ROOT/.recallloom/` or `PROJECT_ROOT/recallloom/`. Exactly one valid storage root MAY exist; if both exist, stop instead of guessing.231232Machine-readable markers, not heading labels, are the normative file contract. Protocol `1.0` supports workspace languages `en` and `zh-CN`. See `references/file-contracts.md`.233234## Minimum Cold-Start Flow2352361. Find the project root.2372. Read `STORAGE_ROOT/config.json`.2383. Read `STORAGE_ROOT/state.json`.2394. Read `STORAGE_ROOT/rolling_summary.md`.2405. If `STORAGE_ROOT/update_protocol.md` exists, surface it before expanding beyond the minimum continuity set.2416. Read `STORAGE_ROOT/context_brief.md` only when the current task needs framing, scope, source-of-truth, or phase context that the summary does not already cover.2427. Read the latest active daily log only when milestone evidence, workday judgment, or external-writer reconciliation requires it.2438. Run a quick freshness check before trusting older context or before a major write.244245Cold start should restore and judge first.246It should not automatically continue `next_step` or execute project work just because continuity files were read.247248See `references/operation-playbooks.md` for the full flow.249250## Current Read-Side Helpers251252Three read-side helpers matter here:253254- `preflight_context_check.py`: revision-aware freshness review before formal writes; returns handoff-first digests, suggested read targets, write-tier guidance, and trust/drift state.255- `summarize_continuity_status.py`: ambient continuity status surface on the same freshness baseline; returns the same digest family plus shared workday-state and trust/drift guidance.256- `query_continuity.py`: read-only continuity recall surface; returns answer-first recall with `answer`, supporting citations, and a risk/freshness note. It also returns hits, token estimate, budget hint, freshness/conflict state, trust/drift state, an output variant label, and override review targets. Daily-log citations include explicit `date` values, current-state files win ties, and the context window stays bounded.257258All attach-safe continuity text returned through these read-side surfaces is expected to respect the shared attached-text scan rules.259260## Minimum Write Rules261262- Before choosing a write target, read `STORAGE_ROOT/update_protocol.md` if it exists.263- `current_state` changes usually target `rolling_summary.md`.264- `stable_rule` changes usually target `context_brief.md`.265- `milestone_evidence` usually targets the daily log.266- Do not update context files for trivial reads or minor edits with no durable change.267268Default exits before any write should stay explicit:269270- `no_write` is a normal successful result271- `merge_current_state` updates `rolling_summary.md`272- `append_milestone` appends to the daily log273- `confirm` and `blocked` stop automatic writes rather than guessing274275Read-side trust notes:276277- `sidecar_trust_state` stays in helper JSON, not in protocol `1.0`278- `state.json.provenance` may store local provenance markers such as `structurally_valid`, `review_imported_baseline`, or `helper_evidenced` after a receipt-finalized helper write; helper JSON still owns operational `provenance_state` routing279- Legacy sidecars without baseline metadata are readable, but write readiness must route through review / repair import before mutating helper writes280- `structurally_valid` and `review_imported_baseline` mean structural/readiness evidence only and MUST NOT be treated as `helper_evidenced`281- Receipt-backed provenance is only claimed after dispatcher-backed receipt finalization writes the optional local receipt store and updates provenance metadata; structural validation alone MUST NOT output `helper_evidenced`282- Default `rl-validate` / `validate_context.py` remains structural and does not read the optional receipt store. Receipt-store validation is explicit: use `--require-provenance` with exactly one scope flag, `--changed-only` or `--full`.283- `continuity_drift_risk_level` is a review signal, not proof that the sidecar is damaged284- `allowed_operation_level` and `write_readiness` help hosts route low-risk read vs review-first vs write-after-preflight flows285286Project-local overrides MAY narrow read order, write order, or archive behavior, but they do not replace the core file contract.287288## Agent Layered Write Judgment289290Before writing continuity content, the agent should make the layer decision itself. Helpers can provide safe write context and static write-tier guidance, but they must not replace agent judgment about what the content means.291292Use this quick check before editing managed files:2932941. Is there a new durable fact, or is `no_write` the right result?2952. If writing is needed, is the main content `stable_rule`, `current_state`, or `milestone_evidence`?2963. Does the event span multiple layers, so it needs a `multi_layer_split`?2974. Is the same fact already present, so the right action is merge instead of duplicate?2985. Is the layer uncertain enough to `defer` or `confirm` rather than guess?299300Layer defaults:301302- `stable_rule`: long-lived workflow rules, source-of-truth routing, project boundaries, or recovery facts. Default target: `context_brief.md`.303- `current_state`: what is true now, including current phase, active risks, active judgments, and next steps. Default target: `rolling_summary.md`.304- `milestone_evidence`: completed validations, approvals, releases, accepted decisions, or other durable evidence. Default target: daily log.305- `no_write`, `defer`, and `confirm` are valid outcomes when nothing durable changed, the discussion is unstable, or the boundary needs explicit approval.306307When more than one layer is valid, split different facts across layers and do not duplicate the same sentence.308309For the detailed rules, conflict order, self-review template, and anonymized calibration cases, see `references/operation-playbooks.md`.310311For protocol `1.0`, `update_protocol.md` is a human-reviewed override layer; helpers surface it but do not automatically execute its natural-language rules.312313RecallLoom prefers the smallest valid write set. The agent decides what should change and prepares content; helpers decide whether the write is still safe to apply.314315When generating workspace files, prefer the user's workspace language when it is supported by protocol `1.0` (`en`, `zh-CN`).316317## When Not To Update Context318319Do not update context files just because:320321- you performed a cold start322- you answered a short question with no durable project change323- you explored without reaching a stable conclusion324- you made wording-only edits325326The protocol is designed to reduce noise, not to turn every session into documentation work.327328## Profiles329330RecallLoom provides four profiles:331332- `profiles/general-project-continuity.md`333- `profiles/research-writing.md`334- `profiles/product-doc-collaboration.md`335- `profiles/software-project-coordination.md`336337Profiles refine emphasis, evidence handling, and drift risk. Use `general-project-continuity.md` by default; switch to a specialized profile only when the project shape is a high-confidence match.338339## What RecallLoom Does Not Try To Be340341RecallLoom does not try to be:342343- a general-purpose memory server344- a full agent execution runtime345- a replacement for platform-specific instruction files346- a heavy autonomous coding framework347348It is the project continuity layer, not the whole agent stack.349350## Where To Read More351352- `references/protocol.md`353- `references/file-contracts.md`354- `references/operation-playbooks.md`355- `references/anti-patterns.md`356- `references/profiles.md`357358## License359360This package is released under Apache License 2.0.