द्वन्द्व · dvandva — a compound of two equal, opposing members

Dvandva — archived protocol study

retired · final release 3.5.1

Dvandva is retired and archived. This page preserves the 3.5.0-era implementation as a historical learning experiment; it is unsupported and must not be used as installation or workflow onboarding.

Dvandva did not build its coordination core on isolated one-shot calls — no single call sustained a shared, role-bound thesis/antithesis dialectic. Its governed loop let those positions accumulate and get pressure-tested across checkpoints.

A caller could loop a one-shot call, but the shared state and convergence gate would have been theirs to enforce, not the engine's. Dvandva made both structural, surfacing blind spots through decorrelated review.

no coordination daemon — the baton file is the whole run-coordination channel crash-tolerant: kill either side, rejoin at preflight cross-vendor pairing was a historical policy, not an engine lock walkaway or supervised v3: each run declares its own workflow — peer-approved, invariant-checked
↓ the enforced guarantees, with citations

why it exists

Different models have different blind spots. Dvandva weaponizes that.

Decorrelated review

The reviewer was never the same role that produced the work — the engine locked two role identities, vadi and prativadi. Running those roles on different model vendors was a historical decorrelation policy, not a structural guarantee the engine enforced.

Proof, not prose

A run cannot end because an agent says it's done. Termination demands both role-bound approvals, artifacts that exist on disk, and a verification matrix fresher than the last code change.

Bounded arguments

Every review loop is capped — a cycle can't spin forever. When the pair keeps disagreeing past the cap, that repeated edge drops; what's left is either escalation to you or the run's legal next step forward.

the loop

One baton, one writer — thesis and antithesis, emergent

Thesis and antithesis are not documents anywhere in the schema. They're emergent: positions that accrue on the baton itself — questions, findings, counters, artifacts — checkpoint by checkpoint, as vadi proposes and prativadi presses back. Whoever the baton assigns acts; the other blocks on dvandva wait. A turn ends by proposing the entire next baton, and the engine validates it against the declared workflow before installing it. Wrong owner, stale checkpoint, missing evidence, dropped peer work, illegal edge: rejected with a machine-readable reason.

resolve · preflightfind the run, sanity-check brieffresh-context pack do the workTDD, subagents, review nextscaffold a legal candidate writegates → atomic install waitblock until your turn / pause the other role wakes with the checkpointed baton — same loop, opposite color, one position sharper than before reject = exit 23/24 + reason · hook guards the installed baton, not the candidate
Every full circuit checkpoints the baton — that's the mechanism the dialectic rides on: nothing resets, everything accumulates.

the proof

Receipts first, then the mechanism that earns them

Every row below is something the engine actually enforces at dvandva write — not a design intention. Citations are file:line in rust/dvandva/src/ on the current tree.

The headline receipt

dvandva 3.5.1 — final archived crate release 3.2.0 & 3.3.0 — dated historical crates.io milestones 206 / 400 commits carry a Dvandva-Checkpoint: trailer pinned @ main@36f134c, 2026-07-11
git log 36f134c --format=%B | grep -c '^Dvandva-Checkpoint:'   # → 206, as of 36f134c (2026-07-11)
git rev-list --count 36f134c                                     # → 400, as of 36f134c (2026-07-11)

This is a dated receipt, pinned to a fixed historical commit and its exact reproducing command. The repository is archived; it is not a claim about ongoing merges or releases.

What the engine enforces

GuaranteeEnforcementCitation
Atomic install, monotonic checkpointsEvery candidate is validated, then installed with a single atomic rename — a corrupt or partial install can't happen mid-write. Checkpoints only ever advance by exactly +1; a candidate that repeats or skips one is rejected (exit 27, stale_checkpoint) before the transition table is even consulted. A post-install snapshot failure surfaces its own distinct exit code, never silently swallowed.write.rs:2681-2685, 2702-2707, 1992-2005
Role-bound final approvalsFinal approvals check DVANDVA_ROLE — a role can raise only its own final-approval bit, and only while entering termination_review.write.rs:1799-1829
Role-bound commitsThe pre-commit hook delegates to the commit gate, which blocks a commit unless the committing role is the baton's assignee or listed in active_roles.commit_gate.rs:125-137, hooks.rs:100-121
A capped loop bounds one edge — it doesn't force every disagreement to youEach loop edge is counted; at the cap, the engine removes that repeated edge from the legal-transitions set. Human escalation remains legal, but the engine only bounds the named edge — it doesn't mandate escalation as the sole exit.write.rs:4303-4327
Custom workflow graphs are checked at approval; presets are pre-clearedA hand-authored graph runs through five invariant checks before it's approved — one that lets done be reached without crossing a review gate FAILS validation outright (ReviewGateBypass). Built-in presets are pre-validated once, so that same runtime check is a no-op for them — both families satisfy the same contract, by different means.write.rs:4622-4629, workflow/invariants.rs (ReviewGateBypass)
Dual-approval done, every modedone is legal only from termination_review, and only once both vadi_final_approval and prativadi_final_approval are true — checked independently of mode or profile.write.rs:2079-2083
No coordination daemonNo long-lived controller owns the loop. Every subcommand is a synchronous, one-shot call; the optional watchdog scan never blocks — "a monitor, not a gate." The baton plus a fencing lock is the sole coordination primitive.main.rs:74-118, watchdog.rs:1-12, lock.rs:1-9
Two role identities were engine-locked; vendor pairing was policy, not a lockdone required two ROLE identities' independent approvals. Running those two roles on different model vendors was a historical decorrelation policy, not an engine check: which engine wrote a checkpoint was trace data only.composes write.rs:1799-1829 + 2079-2083 + 2854

Advisory-only — read the edges precisely

  • Single-writer is not a blanket "the peer can't write on your turn" rule. Only outcome-deciding fields — approvals, review ownership, workflow sign-off — plus commits are role-locked. Most fields on a candidate baton are writable by whoever holds the lock.
  • disagreement_cap is a self-declared ceiling, read straight off the candidate's own field — not an immutability-guarded constant like total_phases.

State this precision as a feature, not a hedge — a technical reader trusts a pitch more, not less, for naming its own edges.

On the numbers

A naive git log --grep='Dvandva-Checkpoint' overcounts the receipt above by one (207) — it also matches a commit that mentions the phrase in prose but carries no real trailer line. The line-anchored grep -c '^Dvandva-Checkpoint:' command above avoids that trap.

This page's own research went through several rounds of adversarial review before acceptance — a historical instance of the loop it describes. The exact round-by-round counts remain qualitative because the working evidence was not independently reader-verifiable.

mechanics, for the curious

How the default routes actually run — regenerated from source

Most runs ride one of two declarable presets and never think about the rest. The graph a run lives under is itself a peer-reviewed, invariant-checked artifact — a custom, unapproved workflow must pass through a workflow_declaring → workflow_review loop before it can reach spec drafting; a built-in preset is pre-approved and enters spec drafting directly. Every path, regardless of mode or profile, first clears a mandatory clarifying-questions floor (at least five questions combined, both roles represented) — there is no bypass edge.

DEFAULT COMPACT ROUTES (clarifying-questions floor precedes both, off-diagram) STANDARD research ⟲ vadi ⇄ prativadi spec ⟲ review vadi drafts LOCK implementing phase_review ⟲ ⟲ phase_fixing, counted & capped termination_review team-owned done review_of_review ⇄ counter_review — rare, capped safety valve; absent from FAST entirely FAST research ⟲ implementing no spec ceremony, no safety valve — straight to compact review/fix/done (same shape as STANDARD from here)
Both routes converge on the identical review/fix/terminal tail; only the plan-and-lock stage differs.

FAST skips spec planning entirely and enters compact implementation directly from an accepted research package; STANDARD keeps the locked-plan stage. Both converge on the identical phase_review ⟲ phase_fixing → termination_review → done tail. Three more presets exist beyond these two — FULL (both roles implement concurrently and cross-review each other) and dedicated RESEARCH/REVIEW-mode graphs — five total, plus custom, peer-declared graphs; all five are validated against the same five invariants sketched above.

Full transition tables, every edge, every trigger: plugins/dvandva/references/state-transition-table.md ↗

delta re-verification

Re-laps reuse narrow test evidence, never final confidence

The first full-profile pass executes every gate. After phase_fixing or cross_fixing, a mechanical test_creation track may carry only when its declared covers_chunks and carry_reason resolve to the same engine-derived tracked-file closure, its same-id origin lies on the current phase-cycle ancestry, and git-covers-diff-v1 finds no covered change. Any ambiguity, drift, untracked file, symlink, global scope, or unbounded input fails closed and creates a new test track id for rerun.

fixing re-lapchanged closure known test_creation gateunchanged mechanical track: carrychanged / ambiguous / unbounded: rerunsame id only for accepted carry review depthcross + deep + risk anglesnever carryalways execute this cycle terminal done gateevery matrix row freshfull review completecorrectness boundary unchanged
Carry removes only demonstrably redundant mechanical test work; terminal evidence remains complete, current-cycle, and independent.

Carry is a best-effort optimization, not a cryptographic or terminal guarantee: every verification_matrix row still reruns. Legacy batons without carry fields follow the original full-rerun behavior.

boarding

The final release is an archive record, not a starting point

# historical final package reference — do not install
cargo install dvandva --version 3.5.1

# historical plugin command — do not run
dvandva install

3.5.1 is the final crate release. The internal plugin source remains at 1.7.0 for historical parity, but the root marketplaces are delisted and no upgrade path is supported.

The two-session text below is preserved only to explain historical behavior:

Session A (vadi):        Implement <feature> with peer review. Start a Dvandva development run in walkaway mode.
Session B (prativadi):   Join the same Dvandva development run and review the baton.

Historically, walkaway mode drove the baton autonomously until done. This behavior remains documented for study only; do not resume or create a run from it.

DVANDVA · retired and archived · final crate release 3.5.1 · preserved 3.5.0-era implementation evidence · 2026-08-20