Index of every page on this site: llms.txt
All skills
mb1810 avatar

/commit-dag-collaboration

@ae56569
Run it yourself

Manages a Directed Acyclic Graph (DAG) of experiment commits for multi-agent collaboration, replacing human-centric version control (main branches, pull requests, merge queues) with a search graph agents traverse directly. Every commit is a node carrying its parent state, the agent that created it, a hypothesis, a code diff, an evaluation metric, and environment info. Agents query the graph for children, leaves (the unexplored frontier), lineage (ancestry to root), and diffs between any two nodes — and preferentially branch new experiments off already-successful lineages, bounded by an explicit anti-herding rule so exploration doesn't collapse onto a single winner. Use this whenever the user wants agents to collaborate asynchronously without a shared context window, needs multiple experiment lineages to stay alive instead of forcing everything into one branch, wants to track which agent tried what and why, or is designing a swarm/loop hybrid where results need to be branchable rather than strictly sequential. Trigger on phrases like "manage experiment lineage," "let agents branch off each other's work," "track which experiments came from where," "build a DAG of agent commits," "GitHub for agents," or "avoid forcing every result into one branch." The natural companion to ratchet-loop (one lineage, sequential — a single path through this DAG), swarm-orchestration (many workers, one shot — this DAG is where their results can live and branch afterward), and knowledge-graph-memory (the DAG tracks work lineage; the knowledge graph tracks domain knowledge — keep them separate, cross-link them).

  • 1 file
  • 11.3 KB
  • Updated 4 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/mb1810/bergerskills/commit-dag-collaboration

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈412 tokens for metadata: the name and description. ≈2.5k when used: this file.

An Agent shortens this description

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • Codex shortens descriptions longer than 1,024 characters. Put when-to-use details first.
  • Claude Code shortens description plus when_to_use after 1,536 characters by default. Put when-to-use details first.
  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈1563 characters, or 19.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Commit DAG Collaboration Skill

Overview

Human version control assumes a canonical path: one main branch, pull requests that converge into it, a single agreed history. That assumption doesn't fit a swarm of agents running hundreds of experiments — most of which will fail, many of which are only interesting in combination, and none of which need to "merge" anywhere to be useful.

This skill treats the commit history itself as the graph. Every experiment is a node: it has a parent (the state it started from), a hypothesis (why this change should work), a diff, an evaluation metric, and an environment. Agents don't work from a shared context window or a full transcript history — they query the graph directly for exactly the connected state a given decision needs.

The key reframe: the primary operation is no longer "merge this into main." It's "traverse the search graph." A failed experiment with a clear, logged reason is not wasted work — it's a leaf that tells every other agent not to try that path again.

When to Use

  • Multiple agents need to collaborate asynchronously without holding each other's full transcripts in context
  • The search space genuinely branches — several live hypotheses need to stay explorable in parallel rather than being forced into one linear sequence
  • You want an auditable record of which agent tried what, from which starting point, and why
  • Results from a swarm (see swarm-orchestration) need a place to live and branch further afterward, rather than being consumed once and discarded

When Not to Use

  • The work is genuinely one linear sequence with no real alternative branches worth preserving — use ratchet-loop directly instead of building DAG machinery around a single lineage
  • A small number of agents can just share full context directly — the DAG earns its cost when the group is too large or too asynchronous for that
  • Nobody will ever query the lineage or frontier — if the graph is never traversed, it's just an expensive commit log

Core Operating Rules

1. Commit as Node — Full Provenance, Every Time

Every experiment commit carries, at minimum: parent commit (the state it branched from), the agent that created it, a one-line motivating hypothesis, the code diff, the evaluation metric and its value, runtime/environment info, and a keep-or-discard status. A commit missing any of these fields is not a usable node in the graph — it's noise.

2. Remove Convergence Abstractions on Purpose

No required main branch. No pull requests. No merge queue. No assumption that any one leaf is canonical. This is a deliberate design choice, not an omission — most experiments in a real search graph never merge anywhere, and forcing convergence would throw away the branches that didn't win but still taught something.

  • The primary operation is traverse the search graph, not merge this into main
  • A discarded branch stays in the graph, addressable and queryable — it is evidence that an idea fails under a given condition, not deleted history

3. Four Query Primitives Are the Whole Interface

Agents interact with the graph through a small, fixed set of operations:

  • children — what has already been tried on top of this node (don't repeat it)
  • leaves — the unexplored frontier (where to branch next)
  • lineage — the ancestry path from any node back to root (how did we get here)
  • diff — compare any two commits directly (what changed between two states)

An agent should never need to replay the entire history to make a decision — these four operations retrieve exactly the connected state needed for the current choice.

4. A Thin Social Layer Alongside the Graph

Provide a lightweight coordination channel (a message board, discussion thread, or equivalent) separate from the graph itself, where agents can post hypotheses, explain failures, and leave coordination notes tied to specific commits.

  • A discarded experiment with a posted explanation ("tried X, failed because Y") teaches other agents not to repeat it — without this layer, that lesson is lost the moment the branch is abandoned
  • Keep this layer additive: it annotates the graph, it does not replace the structured commit metadata from Rule 1

5. Preferential Attachment, Bounded by an Anti-Herding Rule (default ON)

Agents should disproportionately branch new experiments off already-successful lineages rather than spreading uniformly across the graph — this is what concentrates effort on winners instead of diluting it evenly (see power-law-engineering).

  • But unqualified preferential attachment collapses exploration: if every agent branches off "the current best node," the swarm converges onto one lineage and loses the diverse leaves the DAG exists to preserve
  • Default requirement: reserve an explicit minimum share of new branches (state the fraction, e.g., 20-30%) for non-top-N nodes or genuinely novel starting points, rather than letting every agent chase the current leader
  • State this quota explicitly before agents start branching — treat it as load-bearing, not a nice-to-have, the same way swarm-orchestration's diversity-across-workers rule defaults on

6. Mechanism/Culture Separation

The DAG itself is agnostic to what agents are optimizing for — it doesn't know whether they're tuning validation loss, searching for vulnerabilities, or designing APIs. What agents post, how they describe results, and which experiments they attempt is entirely defined by their prompts and instructions, not by the graph structure. Don't conflate "the graph supports X" with "agents will do X" — the culture has to be set separately.

7. Growth Requires Pruning, Not Just Accumulation

An ever-growing, never-merged DAG does not stay queryable forever. Plan for this explicitly rather than treating it as someone else's future problem:

  • Decide, up front, a policy for archiving or compacting old, low-value branches
  • Distinguish "pruned from active querying" from "deleted" — pruning should demote a branch's visibility, not destroy its provenance (consistent with knowledge-graph-memory's "nothing is silently deleted" invariant)
  • Watch for graph growth outpacing query value as a signal it's time to archive, not a signal to just add more storage

8. Output Requirements

Always deliver, in this order:

  1. The commit schema in use (fields every node must carry)
  2. The anti-herding quota in effect (stated fraction, and why)
  3. A snapshot of the current frontier: notable leaves, and the lineage of the best-performing node
  4. Any discarded branches worth surfacing explicitly, with their logged reason for failure
  5. The pruning/archiving policy, or an explicit statement that the graph is still small enough not to need one yet

Worked Example

Input: "We have 12 agents independently trying to improve a ranking model's offline metric over the next few hours. Let them branch off each other's work instead of running in isolation."

Setup:

  • Commit schema: parent, agent id, hypothesis, diff, metric (offline NDCG), environment, keep/discard
  • Anti-herding quota: 25% of new branches must originate from a node outside the current top 3 by metric
  • Social layer: each commit links to a short post — what was tried, what happened, one line on why

Loop behavior: agents query leaves to find unexplored frontier nodes, occasionally query lineage on the current best node to understand how it got there, and branch — 75% of the time from a top-3 node, 25% from elsewhere, enforced by whatever's coordinating agent assignment.

Output at the end: a graph snapshot — best lineage and its NDCG, 3 other interesting-but-not-best leaves worth a human look, and 4 discarded branches with logged failure reasons (e.g., "feature X reduced NDCG on the tail queries specifically — don't retry without addressing that").

Advanced Techniques

  • Pairing with ratchet-loop: a single agent walking one lineage inside the DAG is exactly ratchet-loop's reversible commit pattern — the DAG is what you get when many such loops run concurrently and are allowed to branch off each other.
  • Pairing with swarm-orchestration: a swarm's synthesizer can, instead of just aggregating and discarding, commit each worker's result as a DAG node — turning a one-shot swarm into a persistent, branchable search graph future swarms can build on.
  • Pairing with knowledge-graph-memory: keep the DAG (work lineage) and the knowledge graph (domain knowledge) as separate, cross-linked structures — a claim in the knowledge graph can point to the commit that produced it; a commit can point to which entities it touched. Don't collapse one into the other.
  • Lineage-aware prioritization: when deciding where a new agent should start, prefer nodes with quickly-improving lineages over nodes that plateaued early — a leaf that got there fast is more likely to have room left than one that took many iterations to reach the same score.

Quality Checklist (run before agents start branching)

  • Commit schema defined: parent, agent, hypothesis, diff, metric, environment, keep/discard — all required fields
  • No forced convergence: no required main branch, no merge-to-canonical assumption baked into the design
  • All four query primitives (children, leaves, lineage, diff) available and agents know to use them instead of replaying full history
  • Social/coordination layer in place so discarded branches leave a legible reason, not silent absence
  • Anti-herding quota stated as an explicit fraction, not left as unqualified "prefer winners"
  • Pruning/archiving policy stated, or explicitly deferred with a reason
  • Culture (what agents optimize for, what they post) has been set via instructions — not assumed to follow automatically from graph structure

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at ae56569. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 4 months ago

README badge

README badge for mb1810/bergerskills/commit-dag-collaboration