AnalyzeConceptCorruption

⚠️ MUST USE BEFORE RepairConcepts! Analyzes [[knowledge-graph]] [[concept]] corruption patterns to identify what needs repair without making any changes to your memory files. This diagnostic tool reveals [[concept]] families and their variants to help plan SAFE [[graph]] repair operations that preserve semantic meaning.

When to Use This Tool

Key Features

Parameters

ParameterTypeRequiredDescriptionExample
conceptFamilystringYesConcept family to analyze (base concept to search for)“tool”, “agent”, “test”
maxResultsintNoMaximum variants to show (default 50)100

Usage Examples

Basic Concept Family Analysis

{
  "conceptFamily": "tool"
}

Analyzes all concept variants containing “tool” - shows [[tools]] (plural), [[MCP-tool]], [[tool-agent]], etc.

Large-Scale Analysis

{
  "conceptFamily": "agent",
  "maxResults": 100
}

Comprehensive analysis of “agent” concept family with extended result limit for thorough review.

Testing Concept Analysis

{
  "conceptFamily": "test"
}

Reveals test-related concepts: [[tests]], [[testing]], [[test-agent]], [[test-coverage]], [[TestRunner.cs]], etc.

MCP Concept Review

{
  "conceptFamily": "MCP"
}

Shows MCP-related variants: [[MCP]], [[mcp]], [[MCP-server]], [[MCP tools]], etc.

Output Interpretation Guide

Safe to Merge (Low Risk)

DANGEROUS to Merge (High Risk)

Pattern Categories Explained

Singular/Plural

Singular/Plural:
  • tool (245x)
  • tools (89x)

Safe to consolidate “tools” → “tool” - standard pluralization cleanup.

Compound (with -)

Compound (with -):
  • coding-agent (34x)
  • test-agent (12x)
  • MCP-server (67x)

⚠️ CAREFUL: These are often SPECIFIC TYPES. [[coding-agent]] is NOT the same as [[agent]]!

File Paths

File Paths:
  • GraphTools.cs (23x)
  • /src/Tools/VectorTools.cs (8x)

🚨 NEVER MERGE WITH GENERIC CONCEPTS: File paths are references, not conceptual [[WikiLinks]].

With Suffix

With Suffix:
  • agent-framework (45x)
  • tool-architecture (18x)

⚠️ REVIEW CAREFULLY: Often distinct concepts that should NOT be merged with base term.

Suggested Repairs

The tool generates specific RepairConcepts commands based on detected patterns:

Safe Repair Example

Fix plural forms:
  RepairConcepts conceptsToReplace='tools,Tools,TOOLS' canonicalConcept='tool'

This consolidation is SAFE - just standardizing singular/plural and casing.

Potentially Dangerous Repair Example

Fix compound forms:
  RepairConcepts conceptsToReplace='coding-agent,test-agent,deployment-agent' canonicalConcept='agent'

⚠️ DANGEROUS! This would destroy specificity - [[coding-agent]] is a specialized agent type, not generic [[agent]].

Critical Warnings

DO NOT Blindly Run Suggested Repairs

The tool suggests repairs based on PATTERNS, not SEMANTIC MEANING. Always review:

  1. Are these truly duplicates or distinct concepts?
  2. Would consolidation lose important semantic information?
  3. Are any of these class names, file references, or specific entity types?

Understanding the Difference

Common Patterns

Graph Health Assessment Workflow

  1. Run AnalyzeConceptCorruption on key concept families (tool, agent, test, MCP)
  2. Review output to understand fragmentation patterns
  3. Identify safe consolidations (plurals, casing) vs dangerous ones (compounds, file paths)
  4. Plan repair operations with semantic safety in mind

Before Major Refactoring

Run analysis on relevant concept families before using RepairConcepts to ensure you understand the full impact of proposed changes.

Knowledge Graph Audits

Periodic analysis reveals how [[concept]] usage evolves and where consistency improvements are needed.

New Concept Introduction

Before adding new concepts, check if similar ones exist to avoid creating duplicate concepts with different names.

Troubleshooting

Result: “Found 0 unique variants”

Cause: No concepts match the conceptFamily search term Solution: Try different search terms - use base words like “tool” not compounds like “tool-system”

Too Many Results

Cause: Very common concept family with hundreds of variants Solution: Increase maxResults parameter or focus on more specific concept families

Missing Expected Variants

Cause: Concepts use different naming than expected Solution: Run SearchMemories to find how the concept is actually used in your knowledge base

Compound vs Simple Forms Unclear

Cause: Uncertain if compound is specific type or just variation Solution: Use SearchMemories with the compound concept to see how it’s used contextually

Example Analysis Session

Step 1: Analyze the Concept Family

{
  "conceptFamily": "tool",
  "maxResults": 50
}

Step 2: Review Output

=== Concept Family Analysis: 'tool' ===
Found 15 unique variants

Singular/Plural:
  • tool (245x)
  • tools (89x)
  • Tools (12x)

Compound (with -):
  • MCP-tool (34x)
  • tool-agent (23x)

File Paths:
  • VectorTools.cs (18x)
  • GraphTools.cs (15x)

=== SUGGESTED REPAIRS ===
Fix plural forms:
  RepairConcepts conceptsToReplace='tools,Tools' canonicalConcept='tool'

Step 3: Evaluate Safety

Step 4: Plan Repairs

Only consolidate the SAFE plurals:

{
  "conceptsToReplace": "tools,Tools",
  "canonicalConcept": "tool",
  "dryRun": true
}

Ma Protocol Compliance

AnalyzeConceptCorruption follows Maenifold’s Ma Protocol principles:

This tool embodies the Ma principle of creating space for understanding before action - analyze first, repair second, never the reverse.