Logo : Correction Pipeline

Correction Pipeline

CommunautéPopulaire
garrytan
correction-pipeline

When the user corrects a factual error, root-cause it immediately. Don't just note the correction — trace the error to its source, fix the source, and prevent recurrence. Every factual error is either a data error (bad brain page, bad memory file, bad rendered SOUL/USER identity, bad facts row) or a hallucination (LLM confabulated from partial signals).

Présentation

Éditeurgarrytan
Dépôtgbrain
Nom de la compétencecorrection-pipeline
Étoiles
30.1K
Forks
4.5K
Fichiers inclus
1
LicenceMIT
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont rédigées en Markdown et non sous forme de code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • Fichiers inclus : 1

    Des scripts, des gabarits et des références que le modèle peut consulter pendant son travail. Les fichiers sont en lecture seule et ne sont jamais exécutés.

  • Open source

    Publiée par garrytan sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Correction Pipeline dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Copiez l’URL ci-dessous, qui pointe vers le dossier de la compétence, puis collez-la et confirmez.
    https://github.com/garrytan/gbrain/tree/master/plugin-variants/gbrain-coding/skills/correction-pipeline
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter une compétence → Via une URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/garrytan/gbrain.git /tmp/gbrain
mkdir -p .claude/skills
cp -r /tmp/gbrain/plugin-variants/gbrain-coding/skills/correction-pipeline .claude/skills/correction-pipeline
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Correction Pipeline dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Correction Pipeline dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, la compétence Correction Pipeline n’est pas liée au modèle pour lequel elle a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

Correction Pipeline

Convention: see conventions/brain-first.md — Step 1 of the root-cause chain IS the brain-first lookup chain (search for exact tokens, query for concept-shaped questions) before anything else.

Convention: see _brain-filing-rules.md — corrections edit pages in place; the page stays filed by primary subject.

Trigger

ANY factual error the user identifies. No exceptions. No "I'll note that."

(Routing here is a harness convention, not a mechanical guarantee — but once this skill is in play, the no-exceptions contract above is the discipline.)

Immediate Response

  1. Acknowledge the error. Don't defend. Don't explain. Just: "You're right. I got that wrong."
  2. Quote the specific wrong claim so the user can see you know exactly what was wrong.
  3. State the correct fact as the user gave it.

Root Cause Analysis (do THIS, not just a memory note)

Run these steps IN ORDER. Report findings to the user.

Step 1: Search the brain

bash
gbrain search "<relevant terms>" --limit 10

For concept-shaped or synonym-phrased claims, escalate to gbrain query "<question>" (LLM expansion recovers phrasings search misses). Also grep the brain repo checkout directly — resolve it once from config:

bash
BRAIN_DIR=$(gbrain config get sync.repo_path)
grep -ri "<wrong claim terms>" "$BRAIN_DIR/people/" "$BRAIN_DIR/companies/" "$BRAIN_DIR/concepts/" 2>/dev/null

Question: Is the wrong fact IN the brain? If yes → the brain is the contamination source. Fix the brain page (Step 6).

Step 2: Search memory files

Grep the harness's always-loaded memory files (e.g. the workspace MEMORY.md and any memory/*.md companions — the exact location depends on your harness):

bash
grep -ri "<wrong claim terms>" <memory files> 2>/dev/null

Question: Is the wrong fact in memory? If yes → memory is the contamination source. Fix the memory file.

Step 3: Check SOUL.md and USER.md

bash
grep -i "<relevant terms>" <workspace>/SOUL.md <workspace>/USER.md 2>/dev/null

Question: Is there a misleading passage that could have led to the wrong inference? SOUL.md and USER.md are in every context window — a vague or ambiguous line here propagates into every session.

Important: on gbrain installs these files are RENDERED from the bootstrap answer bank (state/interview.json). Note the finding here; the fix goes through the answer bank in Step 6, never through a direct edit.

Step 4: Check the facts table

bash
gbrain recall <entity-slug>            # facts about the subject, newest first
gbrain recall --grep "<claim terms>"   # substring filter when the entity is unclear

Is there a wrong fact with high confidence? Note its fact id.

Step 5: Classify the error

ClassificationDescriptionFix surface
BRAIN_ERRORWrong fact exists in a brain pageEdit the page in the brain repo, commit, re-sync
MEMORY_ERRORWrong fact exists in memory filesFix the memory file
SOUL_USER_ERRORMisleading passage in SOUL.md or USER.mdFix the ANSWER BANK, re-render — never the rendered file
FACTS_TABLE_ERRORWrong fact in the gbrain facts tablerecall → forget <fact-id> → remember the correction
HALLUCINATIONNo source — LLM confabulated from partial signalsName the contamination vector (what partial signals led to it), write a guard fact
STALE_DATAFact was once true but is no longerUpdate the source with current truth; supersede the stale fact
CROSS_CONTAMINATIONCorrect fact about person A attributed to person BFix attribution in the source — on BOTH entities

Step 6: Fix the source

  • BRAIN_ERROR: Edit the page file in the brain repo. Include [Source: user correction, YYYY-MM-DD] on the corrected line. Commit, then gbrain sync so the DB reflects the fix. (Editing the DB row without the repo file — or vice versa — leaves the two out of agreement until the next sync overwrites one of them.)
  • MEMORY_ERROR: Edit the memory file. Add a correction note with date.
  • SOUL_USER_ERROR: NEVER edit SOUL.md / USER.md directly — they are rendered files, and a hand edit is silently lost on the next render. Fix the underlying answer in the shared bootstrap answer bank, then re-render:
    bash
    gbrain bootstrap interview --set KEY "corrected value"   # verbatim, user's words
    gbrain bootstrap interview --show                        # read back
    gbrain bootstrap interview --status                      # get the confirm hash
    gbrain bootstrap interview --confirm <hash>
    gbrain bootstrap render --only SOUL.md --force           # repeat per affected file
    The full interview discipline (read-back ritual, verbatim answers, backup behavior) lives in skills/soul-audit/SKILL.md — route through it for anything beyond a single-key fix.
  • FACTS_TABLE_ERROR: Expire the wrong row and write the correction with provenance:
    bash
    gbrain recall <entity-slug>                                  # find the fact id
    gbrain forget <fact-id>                                      # expire the wrong fact
    gbrain remember "<correct fact>" \
      --provenance "user correction, YYYY-MM-DD" --entity <entity-slug>
  • HALLUCINATION: There is no source to fix. Identify the partial signal that seeded the confabulation, then write a guard so it can't reseed:
    bash
    gbrain remember "WRONG: <what was said>. RIGHT: <what is true>. Guard: <instruction to prevent recurrence>" \
      --provenance "user correction, YYYY-MM-DD (hallucination guard)" --entity <entity-slug>
  • STALE_DATA: Update the source page with current truth (BRAIN_ERROR flow), and supersede any stale facts rows (forget + remember with the current truth and fresh provenance).
  • CROSS_CONTAMINATION: Fix the attribution at the source, then check BOTH entities: person A's page and facts (does the fact now live where it belongs?) and person B's page and facts (is every trace of the misattribution gone?).

Step 7: Check for propagation

The wrong fact may have propagated into OTHER brain pages, synthesis output, or memory files.

bash
grep -ri "<wrong claim terms>" "$BRAIN_DIR" 2>/dev/null | grep -v ".git"
gbrain search "<wrong claim terms>" --limit 20

Fix ALL instances, not just the first one found. Re-sync after repo edits.

Step 8: Report to the user

Short report:

**Error:** [what was wrong]
**Root cause:** [BRAIN_ERROR | HALLUCINATION | etc.]
**Source:** [specific file/line or fact id, or "no source — confabulated from X"]
**Fixed:** [what was changed, where]
**Propagation:** [other files fixed, or "no propagation found"]

Severity Tiers

TierDescriptionAction
S1 — Identity errorWrong facts about the user's family, heritage, history, core identityFix immediately. These contaminate EVERYTHING — every synthesis, every book mirror, every conversation.
S2 — Entity errorWrong facts about a person, company, deal in the brainFix brain page, check propagation
S3 — Context errorWrong inference about the user's current state, feelings, situationGuard fact via remember. Usually hallucination.
S4 — Minor factualWrong date, wrong number, wrong detailFix source, no propagation check needed

Recurring Error Patterns to Watch

PatternExampleGuard
Projecting therapeutic narratives"You've been avoiding the hard conversation with your cofounder" (no evidence)Check calendar/behavior data before making claims about the user's actions or state
Autocorrecting names to famous peopleA contact named alice-example Cho silently becomes the similarly-named celebrityThe user's people outrank world-famous people — resolve against people/ first
Confusing takes with factsDumping takes-table beliefs into factsTakes = other people's beliefs. Facts = the user's personal knowledge.
Enumerative claims from session context only"You've worked at two companies" — missing the one only recorded in the brainNEVER make enumerative claims ("all your X," "every Y," "the three times you Z") without searching the brain first. Session context is always incomplete.
Missing data in always-loaded filesA core fact lives only in a brain page, not in USER.md/MEMORY.md, so every session re-derives it wrongWhen a correction reveals a gap in an always-loaded file, ADD the missing data through the proper surface (answer bank for rendered files, direct edit for memory files) so it's in every future context window

Complement: the contradictions probe

This skill is REACTIVE — it fires when the user catches an error. The shipped contradictions probe is the PROACTIVE side of the same discipline: it finds intra-brain conflicts before the user does.

bash
gbrain eval suspected-contradictions   # run the probe
gbrain find-contradictions             # read the latest run's findings

If a correction reveals a class of conflict (e.g. two pages disagreeing about a date), run the probe afterward — the same contamination pattern may exist elsewhere in the brain.

Contract

This skill guarantees:

  • Every factual error gets root-caused, not just noted
  • Source fixes land at the REAL fix surface for the error class (page edit + commit + re-sync; forget/remember for facts rows; answer bank + re-render for SOUL/USER — never a direct edit to a rendered file)
  • Propagation is checked (whole-brain grep + gbrain search)
  • The user gets a clear report of what was wrong, why, and what was fixed
  • Routing matches the canonical triggers in the frontmatter
  • Privacy contract preserved: no real names, no fork-specific filesystem path literals, no upstream-fork references

Output Format

The skill's output is the Step 8 root-cause report delivered inline during the conversation, plus all source fixes applied (brain-repo edits committed and re-synced; facts rows expired/superseded; identity files re-rendered from the answer bank).

Dedup (sharp boundaries)

  • skills/maintain/SKILL.md — PROACTIVE brain health (stale pages, orphans, citations, doctor). This skill is REACTIVE: a specific user correction gets traced to its contamination source. If nobody said "that's wrong," it's maintain's territory.
  • The contradictions probe (gbrain eval suspected-contradictions / gbrain find-contradictions) — PROACTIVE intra-brain conflict detection. Complementary, not overlapping: the probe finds conflicts between two brain sources; this skill starts from a correction supplied by the user.
  • skills/soul-audit/SKILL.md — the full identity re-interview surface. This skill DELEGATES to it for SOUL_USER_ERROR fixes; it never re-implements the interview or render flow.
  • skills/citation-fixer/SKILL.md — citation FORMAT compliance. Correcting a claim's truth is this skill; fixing how a true claim is cited is citation-fixer.
  • frontmatter-guard (host-side) — structural page validation (YAML shape), not claim truth.

Anti-Patterns

  • "Noted, I'll remember that." NO. Trace the source. Fix the source.
  • Fixing only memory without checking the brain. The brain is the persistent store. Memory gets flushed.
  • Editing SOUL.md / USER.md directly. They're rendered from the answer bank; the hand edit dies on the next render and the error comes back. Fix the answer, re-render.
  • Editing the brain-repo file without re-syncing (or the DB row without committing). The two stores drift and the next sync resurrects the error.
  • Fixing one instance without checking propagation. Wrong facts spread.
  • Blaming the hallucination without identifying the partial signal. Every hallucination has a seed — find it.
  • Defensive response. Never explain why you got it wrong before acknowledging it's wrong.

Fichiers inclus

Le modèle lit ces fichiers à la demande lorsque la compétence est chargée. Ils sont accessibles en lecture et ne sont jamais exécutés.

Foire aux questions

À quoi sert la compétence IA Correction Pipeline ?

When the user corrects a factual error, root-cause it immediately. Don't just note the correction — trace the error to its source, fix the source, and prevent recurrence. Every factual error is either a data error (bad brain page, bad memory file, bad rendered SOUL/USER identity, bad facts row) or a hallucination (LLM confabulated from partial signals).

Pourquoi utiliser Correction Pipeline sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Correction Pipeline se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Correction Pipeline dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/garrytan/gbrain/tree/master/plugin-variants/gbrain-coding/skills/correction-pipeline. TypingMind lit le fichier SKILL.md, regroupe les fichiers associés et installe le tout sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Correction Pipeline ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Correction Pipeline ?

Autant que vous le souhaitez. Vous pouvez utiliser Correction Pipeline avec tout modèle qui prend en charge les compétences : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Correction Pipeline est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par garrytan sous licence MIT. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, gabarits ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace de travail IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇