consolidate

consolidate is a command for coding agents from FerroxLabs/ijfw. It costs 21 tokens per session (859 once invoked), scanned A, original, MIT.

A project-memory maintenance command that turns repeated notes into lasting guidance and removes or updates outdated information. It can also compare project knowledge with shared knowledge for that project.

In plain words
What is it for?
Use it to promote recurring patterns from a project journal, reconcile newer decisions with older ones, clean stale knowledge, and optionally share suitable project lessons globally.
Why use it?
It prevents useful decisions from remaining buried in session notes and helps keep conflicting or stale guidance from misleading future work.

Command

Part of the claude plugin — 18 commands, 37 agents, 1 MCP server shipped together

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/ferroxlabs/ijfw/consolidate
Clone the repo
git clone --depth 1 https://github.com/FerroxLabs/ijfw

Or install claude, the plugin that ships this one along with the rest of its 18 commands, 37 agents, 1 MCP server.

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 consolidate

README.md
[![agentmods](https://agentmods.dev/badge/commands/ferroxlabs/ijfw/consolidate.svg)](https://agentmods.dev/commands/ferroxlabs/ijfw/consolidate)
Your own site
<a href="https://agentmods.dev/commands/ferroxlabs/ijfw/consolidate"><img src="https://agentmods.dev/badge/commands/ferroxlabs/ijfw/consolidate.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 859 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.00021 $0.00859
Opus 5 $0.00010 $0.00430
Sonnet 5 $0.00004 $0.00172
Haiku 4.5 $0.00002 $0.00086

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

Security

Grade A, and why

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.

claude/commands/consolidate.md · 88 lines

How it starts

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

Run the IJFW dream cycle on project memory using the architect agent.

Inputs to read

  • .ijfw/memory/project-journal.md -- append-only timeline
  • .ijfw/memory/knowledge.md -- curated decisions/patterns
  • .ijfw/memory/handoff.md -- latest session handoff (if present)
  • ~/.ijfw/memory/global-knowledge.md -- cross-project preferences (this project's namespace only)
  • .ijfw/sessions/*.md -- session markers
  • ~/.claude/projects/<encoded>/memory/*.md -- Claude native project memory (read-only mirror)

Algorithm

1. Promote (journal → knowledge)

Scan the journal for entries that meet the promotion threshold:

  • Same topic/pattern referenced in >=3 journal entries AND
  • Spanning >=2 distinct session IDs AND
  • Not already present in knowledge.md

For each qualifying pattern, write a structured entry to knowledge.md:

---
type: pattern
summary: <1-line>
stored: <ISO timestamp>
tags: [derived, from, content]
---
<consolidated statement>

**Why:** <extracted rationale>
**How to apply:** <extracted guidance>

2. Reconcile contradictions

Detect pairs of entries where a later statement supersedes an earlier one (e.g., "use REST" followed later by "migrated to GraphQL"). For each:

  • Mark the older entry with superseded: true and a superseded_by_date field.
  • Do NOT delete -- history matters for audit trails.
  • Add a reconciliation note to knowledge.md explaining the transition.

3. Prune stale journal

  • Entries older than 14 days that never reached promotion threshold: archive to .ijfw/sessions/archive/journal-<YYYY-MM>.md, remove from active journal.
  • Keep the last 30 days regardless of promotion status.

4. Compress knowledge base

  • Merge near-duplicate entries (same summary, same type, overlapping content).
  • Deduplicate by structural similarity, preserving the most recent/complete version.
  • Stay under ~2000 tokens total. If larger, cluster and archive oldest cluster.

5. Cross-project promotion (opt-in)

If a pattern is referenced in >=3 different projects (via global-knowledge namespace inspection) OR the user explicitly flags it with globalize: true:

  • Promote to ~/.ijfw/memory/global/<facet>.md (preferences/patterns/stack/anti-patterns/lessons).
  • Facet classification by architect agent using concise rule: the "what I like" axis → preferences; reusable solution → patterns; tool/framework knowledge → stack; "never do this" → anti-patterns; hard-won insight → lessons.

Read the full file on GitHub · 88 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 · 88 lines · 21 tokens per session scan A a5d49b977adb

Subscribe to this mod's changes

consolidate is a command published in the GitHub repository FerroxLabs/ijfw (210 stars, last pushed 11d ago), licensed MIT. It adds 21 tokens to every session and 859 once invoked, about $0.0001 per session on Opus 5. 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.

Related

Other commands, from other repositories

compact-task-memory

Produce a lossy compaction summary of TASKSTATE.md when task memory has grown beyond a useful working size, preserving canonical decisions and recommended next step while dropping stale facts. Distinct from sync-task-state (incremental, append-only, never lossy) and state-reconcile (drift repair, no shrinking). Use…

Mozurok/fhorja.dev · 175 tokens

capture-observation

Append a single observation, question, hypothesis, or concern to TASKSTATE.md as task memory without disrupting in-progress work or requiring a full state sync. Lean append-only; never restructures other artifacts. Use when something surfaces mid-work that should be remembered for later (during planning…

Mozurok/fhorja.dev · 171 tokens

brain

General-purpose interface to the project's brain, plus a config mode for wiring the brain on first install (or repointing it at a different location).

aidemd-mcp/server · 0 tokens

init-workspace-flow-questions

Phase 8 Questions of init-workspace-flow.

griddynamics/rosetta · 16 tokens

review-code

Read ALL memory bank code rules + best practices, check the files that changed, and APPLY fixes so they adhere. The active counterpart to /scan (which is read-only). Use after an AI session, before commit, to make changed files compliant.

chohra-med/expo_boilerplate · 50 tokens

core-review

Review code changes against SpecOps project-specific patterns. Catches recurring failure modes from real PRs — tool abstraction violations, generated file drift, cross-platform gaps, variable inconsistencies, and more. Complements full-review-gate (generic quality) and pr-fix (applying bot comments).

sanmak/specops · 0 tokens