Logo di Parallel Reconcile Merge

Parallel Reconcile Merge

Community
AnthonyAlcaraz
parallel-reconcile-merge

Controlled-parallelism window for a tree pipeline (Ch5 Tree Pipeline + "The architecture of controlled parallelism" + state reducers, Examples 5-7/5-8/5-16). Dispatches independent branches that read different data and write to separate channels, isolates errors per-branch so one branch's failure neither cascades nor corrupts shared state, then reconciles the survivors with a reducer-style deterministic merge and decides completion as all-or-nothing or partial-coverage. Surfaces the union of every branch's red flags — a failed branch never silently drops a flag. Use when a planning node has verified true independence between branches (fraud / provider / pricing verification; parallel hypothesis tests). NOT for branches that share mutable state or make joint decisions (that is uncoordinated parallelism, the failure mode), NOT for strictly sequential dependent steps, NOT as a thread pool (this is the isolation+merge contract; the concurrency mechanism is a production swap).

Panoramica

Pubblicato daAnthonyAlcaraz
Repositoryagentic-graph-rag-skills
Nome della skillparallel-reconcile-merge
Stelle
29
Fork
9
File inclusi
2
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 2

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da AnthonyAlcaraz su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Parallel Reconcile Merge in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/reasoning-planning/parallel-reconcile-merge
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills.git /tmp/agentic-graph-rag-skills
mkdir -p .claude/skills
cp -r /tmp/agentic-graph-rag-skills/skills/reasoning-planning/parallel-reconcile-merge .claude/skills/parallel-reconcile-merge
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Parallel Reconcile Merge in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Parallel Reconcile Merge non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Parallel Reconcile Merge non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Parallel Reconcile-Merge

Overview

Parallelism itself is not the enemy — uncoordinated parallelism is. The chapter's safe pattern embeds a parallel window inside a sequential control flow: planning verifies the branches are truly independent, the branches run simultaneously reading different data sources and writing to separate channels, and only the merge node combines them.

This skill implements the execution + reconciliation half:

  • Per-branch error isolation (tree-pipeline error aggregation): each branch runs in isolation; an exception is caught and recorded in that branch's own result. "One branch's failure shouldn't cascade to others or corrupt shared state." Branches receive a copy of context and never write shared state — only the merge node combines them.
  • Reducer-style deterministic merge (Example 5-8): merge successful branch values with a reducer (add, extend, union, max, min) so the result is "deterministic merging regardless of execution order."
  • Completion policy: all_or_nothing (every branch must succeed) vs partial_coverage (a quorum suffices — "sometimes three successful branches out of four provide sufficient coverage").
  • Flag union: any red flag from any branch is surfaced; a failed sibling never silently drops another branch's flag.

In the DevOps latency investigation (account 123456789012), the planner spawns parallel hypothesis tests — database connection-pool metrics and payment-service memory profiles — reading different data sources. The pool branch raises a pool_exhausted flag; the memory branch comes back normal. Reconcile surfaces the flag, merges both findings, and (under all-or-nothing for a confirmation phase) reports completion only if both branches succeeded. The analogous claims case runs fraud / provider-credentials / medical-necessity branches the same way: any flag from any branch affects the final decision.

When to Use

  • A planning node has verified branch independence (different data sources, no shared decision, no shared mutable state)
  • Parallel hypothesis tests, multi-aspect verification (fraud / pricing / credentials), parallel research tracks
  • You need deterministic merge + a quorum/all-or-nothing completion policy + flag aggregation

Phrases: "merge parallel branches", "reconcile branch results", "controlled parallelism", "error isolation across branches", "all-or-nothing vs partial coverage", "state reducer merge".

When NOT to Use

  • Branches share mutable state or make a joint decision (uncoordinated parallelism — the documented failure mode; serialize or re-decompose first)
  • Strictly sequential dependent steps (use a sequential pipeline)
  • You actually need concurrency tuning — this is the isolation+merge contract; swap in threads/asyncio/Send API for the dispatch mechanism in production

Process

StepInputActionOutputVerification
1branch_fns (name -> fn), contextlib.execute_branches(...)list of BranchResulta raising branch yields ok=False and does NOT abort siblings
2branch values + reducer namelib.reduce_field(values, REDUCERS[name])merged valuemerge is order-independent for commutative reducers
3results + mode + min_success + reducerlib.reconcile(...)MergeOutcomeall_or_nothing fails if any branch failed; partial_coverage completes at quorum; flags are unioned
4branch_fns + context (+policy)lib.run_parallel_window(...)end-to-end MergeOutcomesucceeded/failed partition matches branch outcomes

Rationalizations

Agent rationalizationDocumented rebuttal
"Just let the branches share state — it's simpler."Shared mutable state across parallel branches is exactly the uncoordinated-parallelism failure Cognition documents. The chapter's branches "read from different knowledge graph regions and write their findings to separate channels that only the orchestrator combines."
"If one branch fails, fail the whole thing."Only under all-or-nothing. The chapter notes "three successful branches out of four provide sufficient coverage" for many tasks — partial-coverage is a first-class mode. Pick the mode per task; do not hard-fail by default.
"A crashed branch — just drop it and its flags."Error isolation records the failure; flag union still surfaces every flag from every branch. A dropped flag (e.g. a fraud signal) is a silent correctness hole. Failure isolation is not the same as discarding signal.
"Combine the branch scores any way — order won't matter."Only commutative reducers are order-safe. The reducer pattern (Example 5-8) exists precisely so merge is "deterministic regardless of execution order"; ad-hoc combination reintroduces race-order dependence.

Red Flags

  • Branches mutate context and expect siblings to see it. They get copies by design; a branch relying on another branch's write is not independent and should not be in this window.
  • all_or_nothing chosen for an exploratory fan-out. One flaky branch fails the whole window when partial coverage would have sufficed — wrong mode for the task.
  • Flags empty but a branch reported a problem in its value. The branch is not surfacing red flags through the flags channel; the merge cannot union what it cannot see.

Non-Negotiable Verification

  1. Run the benchmark battery. python cli.py benchmark must report:
    • a raising branch is isolated (ok=False) and siblings still run
    • all_or_nothing completes only when every branch succeeds
    • partial_coverage completes at the quorum and fails below it
    • flags are unioned across branches (including from non-failing siblings)
    • reducer merge is order-independent for a commutative reducer
    • succeeded/failed partition matches branch outcomes
  2. Verify CLI help. Exits 0 and prints the SKILL.md description.

Security Posture

  • Prompt injection. Branch results are untrusted - branches typically run LLM reasoning over untrusted sources. The merge treats values and flags as data (reducers, unions), never executing them; one compromised branch can bias the merged value but cannot rewrite siblings' channels, because branches get context copies and only the merge node combines.
  • Data exfiltration. No network calls, no file writes in the window itself. The merge concentrates findings from every branch into one outcome - apply per-branch data-access policy upstream, since the merged report sees everything any branch saw.
  • Privilege escalation. No shell invocation, no eval. The guarded property is signal integrity: flag union guarantees a failed or malicious sibling cannot suppress another branch's fraud/red flag, and completion policy - not any single branch - decides whether the window counts as done.

Source Attribution

Distilled from Agentic GraphRAG (O'Reilly, by Anthony Alcaraz and Sam Julien) Ch5 — Reasoning & Planning: "Tree Pipeline: Parallel Exploration" (Example 5-7), "State management across pipelines" reducer pattern (Example 5-8), and "The Multi-Agent Debate" / "The architecture of controlled parallelism" (Example 5-16) — independence verification, per-branch error isolation, and the ontologically-validated merge.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Parallel Reconcile Merge?

Controlled-parallelism window for a tree pipeline (Ch5 Tree Pipeline + "The architecture of controlled parallelism" + state reducers, Examples 5-7/5-8/5-16). Dispatches independent branches that read different data and write to separate channels, isolates errors per-branch so one branch's failure neither cascades nor corrupts shared state, then reconciles the survivors with a reducer-style deterministic merge and decides completion as all-or-nothing or partial-coverage. Surfaces the union of every branch's red flags — a failed branch never silently drops a flag. Use when a planning node has...

Perché usare Parallel Reconcile Merge su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Parallel Reconcile Merge è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Parallel Reconcile Merge in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/reasoning-planning/parallel-reconcile-merge. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Parallel Reconcile Merge?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Parallel Reconcile Merge?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Parallel Reconcile Merge: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Parallel Reconcile Merge è gratuita?

Sì. È pubblicata su GitHub da AnthonyAlcaraz con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇