correction-pipeline

Root-cause user-reported factual errors and fix them at their contamination source.

29.4k|4.4k|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/garrytan/gbrain --skill correction-pipeline
Or copy as Structured Prompt for Agentβ–Ό
Please help me install this Agent Skill.
Skill: correction-pipeline
Source: https://github.com/garrytan/gbrain/tree/main/plugin/skills/correction-pipeline
Command: npx skills add https://github.com/garrytan/gbrain --skill correction-pipeline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When an AI agent states a wrong fact, simply noting the correction leaves the bad data in place to resurface later. This Skill traces every user-reported factual error back to its true source β€” a brain page, memory file, rendered identity file, facts table row, or an LLM hallucination β€” fixes it at the correct surface, and checks for propagation.

Core Features & Use Cases

  • Structured root-cause chain: Searches the gbrain knowledge base, memory files, SOUL.md/USER.md, and the facts table in order to locate the contamination source before fixing anything.
  • Seven error classifications: Distinguishes BRAIN_ERROR, MEMORY_ERROR, SOUL_USER_ERROR, FACTS_TABLE_ERROR, HALLUCINATION, STALE_DATA, and CROSS_CONTAMINATION, each with its own fix procedure (page edit + commit + re-sync, forget/remember, answer-bank fix + re-render).
  • Propagation checking and severity tiers: Greps the whole brain for other instances of the wrong fact and prioritizes identity-level errors (S1) over minor factual ones (S4).
  • Use Case: A user says "That's wrong β€” Alice never worked at WidgetCo." The Skill searches the brain, finds the false claim on Alice's page, edits it with a dated source note, commits, re-syncs, checks for spread, and reports the root cause.

Quick Start

When I tell you a fact you stated is wrong, run the correction pipeline to root-cause the error, fix it at the source, and report what changed.

Frequently Asked Questions about correction-pipeline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a wrong fact my AI agent keeps repeating?β–Ό

Trigger the correction pipeline by stating the error, and it searches the brain, memory files, identity files, and facts table to find the contamination source. It then applies the correct fix for that source type, such as editing the brain page and re-syncing or expiring the bad facts row.

How to correct facts stored in a gbrain knowledge base?β–Ό

Edit the page file in the brain repo with a dated source note, commit, and run gbrain sync so the database matches. For facts table rows, use gbrain recall to find the fact id, gbrain forget to expire it, and gbrain remember to write the correction with provenance.

Why shouldn't I edit SOUL.md or USER.md directly to fix identity errors?β–Ό

SOUL.md and USER.md are rendered from the bootstrap answer bank, so a direct edit is silently lost on the next render. The fix must go through gbrain bootstrap interview to update the underlying answer, then re-render the affected files.

What happens when a factual error has no source in the brain?β–Ό

The error is classified as a hallucination confabulated from partial signals. The Skill identifies the seeding signal and writes a guard fact via gbrain remember stating what was wrong, what is true, and how to prevent recurrence.

When should I use the contradictions probe instead of the correction pipeline?β–Ό

The correction pipeline is reactive and fires only when a user reports a specific error. The contradictions probe (gbrain eval suspected-contradictions) is proactive, finding conflicts between brain sources before the user notices them.