Argumentative Lineage
When to Use
- You are running a WinDAGs swarm (or any multi-agent discourse topology) and need to audit
why the final synthesis reached a particular conclusion — not just what it said.
- An operator or reviewer asks "which agent first claimed X, and what triggered it?" — i.e.,
they need reasoning provenance, not just output.
- You are building a swarm where conflicting agent claims must be traceable: legal analysis,
security review, medical triage, policy evaluation, or any domain where "show your work"
is a compliance or trust requirement.
NOT for:
- Single-agent, single-turn outputs where there is no discourse graph to traverse.
- Data pipeline lineage (column-to-column provenance) — use
data-lineage-tracker instead.
- Debugging swarm execution failures or hangs — use
dag-execution-tracer or dag-failure-analyzer.
Core Concepts
SwarmSpan — One agent processing one triggering message. Recorded by SwarmTracer.wrapExecutor().
Carries: spanId, agentId, skillId, triggerMessageId, producedMessageIds, durationMs,
promptHash, outputHash, discourse[], status. Every span is the unit of argumentative work.
LineageEdge — A directed edge fromMessageId → toMessageId through agentId and spanId,
optionally labelled with a SwarmDiscourse relationship (supports, contradicts, qualifies,
synthesises). The lineage graph is the raw substrate; the Toulmin layer annotates it with claim /
data / warrant semantics.
Argument Chain — The output of SwarmTracer.getArgumentChain(messageId): an ordered sequence
of { messageId, agent, act, relationship, thesis } tuples from the seed message to the target,
extracted by walking traceLineage() and filtering for messages that carry discourse metadata.
This is the machine-readable form of Toulmin lineage.
Toulmin Annotation Layer — Maps SwarmDiscourse fields onto Toulmin roles:
act: "assert" + relationship: "supports" → Data (grounds for an upstream claim)
act: "assert" + relationship: "none" on the seed → Claim (root thesis)
act: "question" / "challenge" → surfaces the Warrant (implicit bridge being probed)
act: "synthesise" → Backing or resolution of a qualifier / rebuttal branch
relationship: "contradicts" → Rebuttal candidate requiring resolution or qualification
Digest-with-Zoom — A two-level presentation pattern: (1) a one-line digest per agent output
showing [agent] —[relationship]→ thesis for rapid scanning, and (2) a zoom view for any
sub-claim that expands the full six-element Toulmin breakdown and traces lineage back to the seed.
Enables operators to stay at altitude until a specific claim needs scrutiny.
Implementation Pattern
// 1. Instantiate tracer before swarm execution
const tracer = new SwarmTracer('my-swarm-name');
// 2. Wrap the agent executor — all spans captured automatically
const tracedExecutor = tracer.wrapExecutor(baseAgentExecutor);
// 3. Run the swarm, routing every published message through recordMessage()
const result = await executeSwarm(config, {
agentExecutor: tracedExecutor,
onMessage: (msg) => tracer.recordMessage(msg),
});
// 4. Finalize to get the complete SwarmTrace
const trace = tracer.finalize(result.convergenceReason, config.agents);
// 5. Annotate argument chain for any terminal message
function annotateArgumentChain(tracer, messageId) {
const chain = tracer.getArgumentChain(messageId);
// chain is Array<{ messageId, agent, act, relationship, thesis }>
return chain.map((node, i) => {
const toulminRole =
i === 0 ? 'Claim'
: node.relationship === 'supports' ? 'Data'
: node.relationship === 'contradicts'? 'Rebuttal'
: node.act === 'synthesise' ? 'Backing/Resolution'
: node.act === 'question' ? 'Warrant (probed)'
: 'Qualifier';
return { ...node, toulminRole };
});
}
// 6. Digest-with-zoom: render a scannable one-liner per agent output
function digestWithZoom(trace, targetMessageId) {
const chain = annotateArgumentChain(tracer, targetMessageId);
// DIGEST — one line per node
const digest = chain.map(n =>
`[${n.agent}] —${n.relationship}→ "${n.thesis}" (${n.toulminRole})`
).join('\n');
// ZOOM — full Toulmin expansion of the target message
const claim = chain.find(n => n.toulminRole === 'Claim');
const data = chain.filter(n => n.toulminRole === 'Data');
const warrant = chain.find(n => n.toulminRole === 'Warrant (probed)');
const backing = chain.filter(n => n.toulminRole === 'Backing/Resolution');
const rebuttal = chain.filter(n => n.toulminRole === 'Rebuttal');
return { digest, zoom: { claim, data, warrant, backing, rebuttal } };
}
// 7. Contradiction audit — find unresolved rebuttals
function unresolvedContradictions(trace) {
const contradictions = tracer.findContradictions();
const synthesisIds = new Set(
trace.messages
.filter(m => m.discourse?.act === 'synthesise')
.flatMap(m => tracer.impactAnalysis(m.id).map(d => d.id))
);
return contradictions.filter(c => !synthesisIds.has(c.message.id));
}
Key method signatures from swarm-tracer.ts:
new SwarmTracer(swarmName: string, traceId?: string)
tracer.wrapExecutor(executor: (agent, triggeringMessage, allMessages) => Promise<publications[]>)
tracer.recordMessage(message: SwarmMessage): void
tracer.finalize(convergenceReason: string, agents: SwarmAgent[]): SwarmTrace
tracer.traceLineage(messageId: string): SwarmMessage[] — ancestors in causal order, seed first
tracer.getArgumentChain(messageId: string): Array<{ messageId, agent, act, relationship, thesis }>
tracer.findContradictions(): Array<{ message, contradicts, thesis }>
tracer.impactAnalysis(messageId: string): SwarmMessage[] — downstream messages
SwarmTrace.stats carries contradictionCount, synthesisCount, maxLineageDepth,
discourseRelationshipCounts — use these for a fast epistemic health summary before diving
into individual chains.
Key References
Toulmin, S. (1958). The Uses of Argument. Cambridge University Press. — Foundational
six-element model (Claim / Data / Warrant / Backing / Qualifier / Rebuttal) that this
skill projects onto swarm discourse graphs.
workgroup-ai/packages/core/src/topologies/swarm-tracer.ts — Source implementation.
SwarmTracer, SwarmSpan, LineageEdge, SwarmTrace, SwarmTraceStats interfaces
and all query methods cited above live here. Read before extending.
Dung, P.M. (1995). "On the Acceptability of Arguments and its Fundamental Role in
Nonmonotonic Reasoning, Logic Programming and n-Person Games." Artificial Intelligence
77(2): 321–357. — Argumentation frameworks; relevant when modelling contradicts edges
as attack relations and synthesise edges as defeat/reinstatement.
windags/skills/toulmin-argument-analysis/SKILL.md — Companion skill for single-argument
Toulmin analysis. Use argumentative-lineage when the argument spans multiple agent turns;
use toulmin-argument-analysis when auditing a single agent's output in isolation.
1---2name: argumentative-lineage3version: 0.1.04description: >5 Track the full Toulmin epistemic ancestry of every claim produced by a multi-agent swarm.6 Each agent output is tagged with an argument chain (claim / data / warrant / relationship)7 derived from SwarmTracer spans and LineageEdge records, so operators can zoom into any8 sub-claim and see precisely which agents asserted it, what triggered each assertion, and9 how contradictions propagated or were synthesised away. The SwarmTracer pattern — wrapping10 the SwarmAgentExecutor to capture spans, record messages, and build a lineage graph — is11 the concrete runtime substrate. Argumentative lineage lifts that graph into the Toulmin12 vocabulary so reasoning provenance is both machine-queryable and human-interpretable.13author: soma-windags-graft14tags:15 - argumentation16 - toulmin17 - swarm18 - provenance19 - lineage20 - multi-agent21 - epistemic-transparency22pairs-with:23 - toulmin-argument-analysis24 - dag-execution-tracer25 - swarm-discourse-coordinator26 - logical-fallacy-detector27metadata:28 source: https://skillmd.com/skills/curiositech/argumentative-lineage29---3031# Argumentative Lineage3233## When to Use3435- You are running a WinDAGs swarm (or any multi-agent discourse topology) and need to audit36 **why** the final synthesis reached a particular conclusion — not just what it said.37- An operator or reviewer asks "which agent first claimed X, and what triggered it?" — i.e.,38 they need reasoning provenance, not just output.39- You are building a swarm where conflicting agent claims must be traceable: legal analysis,40 security review, medical triage, policy evaluation, or any domain where "show your work"41 is a compliance or trust requirement.4243NOT for:44- Single-agent, single-turn outputs where there is no discourse graph to traverse.45- Data pipeline lineage (column-to-column provenance) — use `data-lineage-tracker` instead.46- Debugging swarm execution failures or hangs — use `dag-execution-tracer` or `dag-failure-analyzer`.4748## Core Concepts4950**SwarmSpan** — One agent processing one triggering message. Recorded by `SwarmTracer.wrapExecutor()`.51Carries: `spanId`, `agentId`, `skillId`, `triggerMessageId`, `producedMessageIds`, `durationMs`,52`promptHash`, `outputHash`, `discourse[]`, `status`. Every span is the unit of argumentative work.5354**LineageEdge** — A directed edge `fromMessageId → toMessageId` through `agentId` and `spanId`,55optionally labelled with a `SwarmDiscourse` relationship (`supports`, `contradicts`, `qualifies`,56`synthesises`). The lineage graph is the raw substrate; the Toulmin layer annotates it with claim /57data / warrant semantics.5859**Argument Chain** — The output of `SwarmTracer.getArgumentChain(messageId)`: an ordered sequence60of `{ messageId, agent, act, relationship, thesis }` tuples from the seed message to the target,61extracted by walking `traceLineage()` and filtering for messages that carry discourse metadata.62This is the machine-readable form of Toulmin lineage.6364**Toulmin Annotation Layer** — Maps `SwarmDiscourse` fields onto Toulmin roles:65- `act: "assert"` + `relationship: "supports"` → **Data** (grounds for an upstream claim)66- `act: "assert"` + `relationship: "none"` on the seed → **Claim** (root thesis)67- `act: "question" / "challenge"` → surfaces the **Warrant** (implicit bridge being probed)68- `act: "synthesise"` → **Backing** or resolution of a qualifier / rebuttal branch69- `relationship: "contradicts"` → **Rebuttal** candidate requiring resolution or qualification7071**Digest-with-Zoom** — A two-level presentation pattern: (1) a one-line digest per agent output72showing `[agent] —[relationship]→ thesis` for rapid scanning, and (2) a zoom view for any73sub-claim that expands the full six-element Toulmin breakdown and traces lineage back to the seed.74Enables operators to stay at altitude until a specific claim needs scrutiny.7576## Implementation Pattern7778```79// 1. Instantiate tracer before swarm execution80const tracer = new SwarmTracer('my-swarm-name');8182// 2. Wrap the agent executor — all spans captured automatically83const tracedExecutor = tracer.wrapExecutor(baseAgentExecutor);8485// 3. Run the swarm, routing every published message through recordMessage()86const result = await executeSwarm(config, {87 agentExecutor: tracedExecutor,88 onMessage: (msg) => tracer.recordMessage(msg),89});9091// 4. Finalize to get the complete SwarmTrace92const trace = tracer.finalize(result.convergenceReason, config.agents);9394// 5. Annotate argument chain for any terminal message95function annotateArgumentChain(tracer, messageId) {96 const chain = tracer.getArgumentChain(messageId);97 // chain is Array<{ messageId, agent, act, relationship, thesis }>9899 return chain.map((node, i) => {100 const toulminRole =101 i === 0 ? 'Claim'102 : node.relationship === 'supports' ? 'Data'103 : node.relationship === 'contradicts'? 'Rebuttal'104 : node.act === 'synthesise' ? 'Backing/Resolution'105 : node.act === 'question' ? 'Warrant (probed)'106 : 'Qualifier';107108 return { ...node, toulminRole };109 });110}111112// 6. Digest-with-zoom: render a scannable one-liner per agent output113function digestWithZoom(trace, targetMessageId) {114 const chain = annotateArgumentChain(tracer, targetMessageId);115116 // DIGEST — one line per node117 const digest = chain.map(n =>118 `[${n.agent}] —${n.relationship}→ "${n.thesis}" (${n.toulminRole})`119 ).join('\n');120121 // ZOOM — full Toulmin expansion of the target message122 const claim = chain.find(n => n.toulminRole === 'Claim');123 const data = chain.filter(n => n.toulminRole === 'Data');124 const warrant = chain.find(n => n.toulminRole === 'Warrant (probed)');125 const backing = chain.filter(n => n.toulminRole === 'Backing/Resolution');126 const rebuttal = chain.filter(n => n.toulminRole === 'Rebuttal');127128 return { digest, zoom: { claim, data, warrant, backing, rebuttal } };129}130131// 7. Contradiction audit — find unresolved rebuttals132function unresolvedContradictions(trace) {133 const contradictions = tracer.findContradictions();134 const synthesisIds = new Set(135 trace.messages136 .filter(m => m.discourse?.act === 'synthesise')137 .flatMap(m => tracer.impactAnalysis(m.id).map(d => d.id))138 );139 return contradictions.filter(c => !synthesisIds.has(c.message.id));140}141```142143Key method signatures from `swarm-tracer.ts`:144- `new SwarmTracer(swarmName: string, traceId?: string)`145- `tracer.wrapExecutor(executor: (agent, triggeringMessage, allMessages) => Promise<publications[]>)`146- `tracer.recordMessage(message: SwarmMessage): void`147- `tracer.finalize(convergenceReason: string, agents: SwarmAgent[]): SwarmTrace`148- `tracer.traceLineage(messageId: string): SwarmMessage[]` — ancestors in causal order, seed first149- `tracer.getArgumentChain(messageId: string): Array<{ messageId, agent, act, relationship, thesis }>`150- `tracer.findContradictions(): Array<{ message, contradicts, thesis }>`151- `tracer.impactAnalysis(messageId: string): SwarmMessage[]` — downstream messages152153`SwarmTrace.stats` carries `contradictionCount`, `synthesisCount`, `maxLineageDepth`,154`discourseRelationshipCounts` — use these for a fast epistemic health summary before diving155into individual chains.156157## Key References1581591. Toulmin, S. (1958). *The Uses of Argument*. Cambridge University Press. — Foundational160 six-element model (Claim / Data / Warrant / Backing / Qualifier / Rebuttal) that this161 skill projects onto swarm discourse graphs.1621632. `workgroup-ai/packages/core/src/topologies/swarm-tracer.ts` — Source implementation.164 `SwarmTracer`, `SwarmSpan`, `LineageEdge`, `SwarmTrace`, `SwarmTraceStats` interfaces165 and all query methods cited above live here. Read before extending.1661673. Dung, P.M. (1995). "On the Acceptability of Arguments and its Fundamental Role in168 Nonmonotonic Reasoning, Logic Programming and n-Person Games." *Artificial Intelligence*169 77(2): 321–357. — Argumentation frameworks; relevant when modelling `contradicts` edges170 as attack relations and `synthesise` edges as defeat/reinstatement.1711724. `windags/skills/toulmin-argument-analysis/SKILL.md` — Companion skill for single-argument173 Toulmin analysis. Use argumentative-lineage when the argument spans multiple agent turns;174 use toulmin-argument-analysis when auditing a single agent's output in isolation.