loci-consolidate

loci-consolidate is a command for coding agents from codesstar/loci. It costs 0 tokens per session (1,031 once invoked), scanned A, original, MIT.

A command for reviewing recently stored memories, tasks, decisions, and project notes to find patterns and produce new insights.

In plain words
What is it for?
It is for consolidating recent notes over a chosen period, such as the last 24 hours or seven days. It can be run manually or automatically at the first conversation of the day.
Why use it?
It brings related information together so recurring themes or contradictions are easier to notice.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/codesstar/loci/loci-consolidate
Clone the repo
git clone --depth 1 https://github.com/codesstar/loci

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for loci-consolidate

README.md
[![agentmods](https://agentmods.dev/badge/commands/codesstar/loci/loci-consolidate.svg)](https://agentmods.dev/commands/codesstar/loci/loci-consolidate)
Your own site
<a href="https://agentmods.dev/commands/codesstar/loci/loci-consolidate"><img src="https://agentmods.dev/badge/commands/codesstar/loci/loci-consolidate.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,031 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01031
Opus 5 $0.00000 $0.00515
Sonnet 5 $0.00000 $0.00206
Haiku 4.5 $0.00000 $0.00103

Measured 5d ago against content hash e9044b0e0182, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

loci-consolidate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/commands/loci-consolidate.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/loci-consolidate — Memory Consolidation

Consolidate recent memories: review distilled knowledge from the past N days, find cross-domain patterns, and generate insights.

Trigger

  • Manual: user runs /loci-consolidate or /loci-consolidate 7 (custom day range)
  • Auto: first conversation of the day (checked via .loci/last-consolidation.txt)

Process

  1. Gather recent distillations (default: last 24 hours, configurable via argument):

    • Scan decisions/ for files with recent dates in frontmatter
    • Scan tasks/tasks.json for recently added/completed items; use tasks/active.md only as the compact generated view
    • Scan me/ for recently updated files (check updated field)
    • Scan .loci/activity/<current month>.md for recent entries
    • Scan projects/index.md for relevant project index entries; open a project's repo memory only when the current consolidation clearly needs it
    • Scan inbox.md for new entries
  2. If nothing found: Skip silently (auto mode) or report "Nothing to consolidate" (manual mode)

  3. Analyze for patterns — Look for:

    • Recurring themes across domains ("你最近三个决策都在简化架构")
    • Contradictions ("上周说要 focus,这周又加了 3 个新项目")
    • Momentum signals ("连续 5 天完成关键任务")
    • Cross-project connections ("Loci 的 tag 系统和 CYC 的分类策略在收敛")
    • Identity/value shifts ("从 '做更多' 转向 '做更精'")
    • Goal progress — compare recent activity against plan.md goals. Calculate rough progress % where possible ("距离 3/15 发布还有 4 天,完成度约 70%,有风险")
    • Time allocation — estimate time distribution across projects from .loci/activity/<current month>.md and tasks/calendar.json. Flag mismatches with stated goals.
    • Stale tasks — scan tasks/tasks.json for completed tasks older than 7 days or open tasks untouched for 30+ days. Suggest archiving completed ones and reviewing stale ones.
  4. Generate insight entry — Write to me/insights.md as a personal reflection, not as a permanent value:

    ## YYYY-MM-DD
    
    ### Short title
    
    **背景**:What recent evidence produced this thought.
    
    **洞察**:The compressed insight.
    
    **为什么重要**:Why this matters for the user.
    
    **暂定影响**:How it may affect future choices or behavior.
    
    **状态**:observing
    

    If an insight has become durable, promote it to me/values.md or me/learned.md. If it reflects identity/value/behavior evolution, update the current file first and append old/new/reason to me/evolution.md.

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 86 lines · 0 tokens per session scan A e9044b0e0182

Subscribe to this mod's changes

loci-consolidate is a command published in the GitHub repository codesstar/loci (170 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,031 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.