consolidate

consolidate is a command for Claude Code 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 for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the ijfw plugin — 34 skills, 22 commands, 37 agents, 6 hooks shipped together

Good fit 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.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ferroxlabs/ijfw/consolidate
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.

Clone the repo
git clone --depth 1 https://github.com/FerroxLabs/ijfw

Made for: Claude Code.

Or install ijfw, the plugin that ships this one along with the rest of its 34 skills, 22 commands, 37 agents, 6 hooks.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for consolidate

Your own site · 80×15
<a href="https://agentmods.dev/commands/ferroxlabs/ijfw/consolidate"><img src="https://agentmods.dev/badge/commands/ferroxlabs/ijfw/consolidate.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00021 $0.00859
Opus 5.5 $0.00008 $0.00344
Sonnet 5.5 $0.00004 $0.00172
Haiku 4.5 $0.00002 $0.00086

Measured 1mo ago against content hash a5d49b977adb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (214 stars, last pushed 2d ago), licensed MIT. It adds 21 tokens to every session and 859 once invoked, about $0.0001 per session on Opus 5.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

capture-observation

Append one observation, question, hypothesis, or concern to TASKSTATE.md as lean, append-only task memory, leaving other artifacts and work undisturbed. Use when something surfaces mid-work, a hypothesis needs logging, or a concern is too small for decision-interview or targeted-questions. Do not use for a decision…

Mozurok/fhorja.dev · 105 tokens

compact-task-memory

Produce a lossy compaction of TASKSTATE.md when task memory outgrows a useful size, keeping canonical decisions and the next step, dropping stale facts. Use when memory spans 5+ completed slices and feels heavy, resume cost grows, known facts are mostly resolved, or before a session pause. Do not use in early…

Mozurok/fhorja.dev · 104 tokens

init-workspace-flow-questions

Phase 8 Questions of init-workspace-flow.

griddynamics/rosetta · 16 tokens

code-locate

Locate code paths and line ranges for a described behavior: up to 10 candidates with HIGH/MEDIUM/LOW confidence and a search trail, plus a proposed SOURCEOFTRUTH.md update. Use when the first question is where one specific behavior lives and paths are unknown. Do not use when paths are explicit, the codebase is tiny…

Mozurok/fhorja.dev · 0 tokens

_registry-protocol

This protocol is MANDATORY for ALL commands, agents, and phases.

Chappygo-OS/Atomic-Spec · 0 tokens

harvest-session-learnings

Scan the session and task artifacts for reusable lessons (what was tried, what failed and why, what surprised us) and propose entries to append to LEARNINGS.md, the produce-side counterpart to what task-init reads. Use on demand mid-task after a hard-won fix or surprising failure, or at closure to sweep a long…

Mozurok/fhorja.dev · 116 tokens