Consolidation
Consolidation
Consolidation is nyxCore's institutional memory engine. It extracts structured patterns from development session records across multiple projects and converts them into reusable intelligence that flows into future workflows automatically.
What It Does
You link one or more projects to a consolidation job. The pipeline reads all MemoryEntry records from those projects (your .memory/letter_*.md session checkpoints), sends them through an LLM analysis step, and extracts structured patterns organized into six types.
Those patterns are then available in two ways:
{{consolidations}}— inject specific consolidation results you've linked to a workflow{{project.wisdom}}— auto-inject all consolidations for the linked project, combined with code analysis patterns
Six Pattern Types
| Type | Description | Has Severity? |
|---|---|---|
success |
Breakthroughs, effective solutions, what worked | No |
pain |
Bugs, failures, blockers, time wasters | Yes: low/medium/high/critical |
solution |
Workarounds, fixes, what resolved specific pains | No |
pattern |
Recurring themes, habits, decision-making tendencies | No |
tool |
Libraries, frameworks, services, CLI tools relied upon | No |
architecture |
Design decisions, system patterns, structural choices | No |
Each extracted pattern stores:
interface ExtractedPattern {
type: "success" | "pain" | "solution" | "pattern" | "tool" | "architecture";
title: string; // 5–10 word name
description: string; // 2–4 sentence explanation
evidence: string[]; // 1–3 direct quotes or paraphrases
frequency: number; // how many entries this appeared in
severity?: "low" | "medium" | "high" | "critical"; // pains only
projectRefs: string[]; // project names where observed
tags: string[]; // 2–4 keywords
}
The Pipeline
Step 1 — Content budgeting: Before sending to the LLM, the pipeline enforces two limits:
| Constraint | Value | Reason |
|---|---|---|
MAX_ENTRY_CHARS |
15,000 chars | Per-entry cap (~3,750 tokens) |
MAX_TOTAL_CHARS |
500,000 chars | Total budget (~125K tokens, within Sonnet's 200K context) |
Entries over MAX_ENTRY_CHARS are truncated with a [... truncated for length] marker. The budget loop stops adding entries when the next one would exceed MAX_TOTAL_CHARS.
Step 2 — LLM extraction: The budgeted content is sent to Claude Sonnet at temperature 0.2 (low creativity, high precision) with max 8,192 output tokens. The prompt instructs the model to produce a JSON response with a patterns array and an executive summary.
Step 3 — Response parsing: The parser:
- Strips markdown code fences if present
- Validates
patternsis an array - Filters out patterns missing required
titleordescription - Normalizes optional fields (
evidencedefaults to[],frequencydefaults to1)
Step 4 — Persistence: Patterns are stored as ConsolidationPattern records linked to the parent Consolidation. The executive summary is stored on the Consolidation record itself.
Prompt Hints Format
When a consolidation is injected into a workflow, the generatePromptHints() function formats patterns as structured markdown. The ordering is deliberate — LLMs process early context with higher attention:
# Prompt Hints: {consolidationName}
> Auto-generated from cross-project pattern analysis.
## Known Pitfalls (AVOID)
### {pain.title} [SEVERITY]
{description}
**Evidence:** "quote1"; "quote2"
## Proven Solutions
### {solution.title}
{description}
## Recurring Patterns
- **{pattern.title}** — {description} _(seen in N entries)_
## Architecture Decisions
### {architecture.title}
{description}
## Tool Stack
- **{tool.title}** — {description} [{tags}]
## What Worked Well
- **{success.title}** — {description} _(projectRefs)_
Pains and solutions appear first to front-load warnings and their remediation. Architecture decisions and tool stack come next. Successes close the context.
Project Wisdom
{{project.wisdom}} combines two sources:
Source 1 — Consolidation intelligence: All completed consolidations that include the linked project. Each consolidation's patterns are formatted via generatePromptHints() under a # Consolidation Intelligence heading, with executive summaries appended as subsections.
Source 2 — Code analysis patterns: Patterns detected from the project's linked repositories. These are code-level observations (naming conventions, security practices, test approaches) from the code analysis phase of project sync.
Both sources are concatenated and injected as a single context block. A workflow with {{project.wisdom}} gets the full institutional memory of that project — what was learned from development sessions and what was detected in the actual code.
Many-to-Many Relationships
A consolidation can include multiple projects, and a project can appear in multiple consolidations.
Project A ─┐
├── Consolidation "Q1 Backend Review" ──> patterns
Project B ─┘
Project A ──── Consolidation "Security Audit 2026" ──> patterns
This lets you run cross-project consolidations to detect shared patterns ("this anti-pattern appears in both Project A and Project B") and also targeted single-project consolidations for project-specific analysis.
When to Run a Consolidation
Run a consolidation when:
- You've accumulated a meaningful set of session checkpoints (.memory files) in one or more projects
- You want to surface recurring themes across a sprint or quarter
- You're starting a new project and want to inject lessons from related past work
- A security incident revealed a pattern you want to check across all active projects
The consolidation result is permanent — patterns persist as database records and remain available for injection into any future workflow, even after the original memory entries change.
