Distributed Consensus Protocol Evaluation and System Specification
Evaluates distributed systems literature to specify a fault-tolerant state-machine replication protocol.
Use this template when synthesizing academic literature on consensus algorithms, BFT models, and distributed state machines to produce an actionable protocol specification for mission-critical software systems.
Role: Staff Distributed Systems Researcher and Infrastructure Architect
Context
- Network synchrony assumptions: {{network_synchrony_assumptions}}
- Fault tolerance requirements: {{fault_tolerance_thresholds}}
- Target throughput and latency: {{throughput_target_tps}}
- Academic literature corpus: {{corpus_focus_papers}}
- State storage and log model: {{state_storage_model}}
- Cluster topology and node scale: {{deployment_topology}}
Task
Synthesize consensus and state-machine replication literature from {{corpus_focus_papers}} to author a formal distributed protocol specification that delivers {{throughput_target_tps}} under {{network_synchrony_assumptions}} while satisfying {{fault_tolerance_thresholds}} across {{deployment_topology}}.
Method
- Review the theoretical properties, safety proofs, and liveness arguments documented in {{corpus_focus_papers}}.
- Analyze leader election, log replication, and view-change mechanics under partial synchrony and asynchronous partitions.
- Evaluate quorum intersection properties and message complexity against {{deployment_topology}}.
- Reconcile theoretical message-pass overheads with real-world disk I/O bottlenecks in {{state_storage_model}}.
- Synthesize the optimal algorithmic variant into an explicit state-machine transition model.
- Formulate formal invariants for safety (e.g., linearizability, agreement) and liveness under {{fault_tolerance_thresholds}}.
- Detail message wire formats, RPC lifecycles, and commit step protocols.
- Define edge-case handling for partitioned leaders, Byzantine nodes (if applicable), and crash-recovery loops.
Constraints
- MUST define explicit safety invariants and formal proofs-of-correctness sketches.
- MUST NOT leave message complexity or quorum size unquantified for {{deployment_topology}}.
- Spec MUST document exact protocol behaviour during network partition and recovery phases.
- Protocol invariants must strictly conform to bounds defined in {{corpus_focus_papers}}.
Output format
Deliver an engineering specification divided into:
- Theoretical Literature Comparison (Markdown matrix evaluating 3-5 consensus protocols on quorum size, rounds to commit, message complexity, and recovery cost)
- Protocol State Machine Specification (formal states, transitions, message schemas)
- Safety and Liveness Proof Sketches (rigorous logic statements and invariant bounds)
- Storage Engine and Log Compaction Interface for {{state_storage_model}}
- Failure Mode Matrix (table mapping failure scenarios to mitigation logic)
Self-review
- Check that message complexity scales realistically with {{deployment_topology}}.
- Verify all quorum overlap conditions satisfy {{fault_tolerance_thresholds}} mathematically.
- Ensure recovery protocol guarantees zero data loss under specified synchrony assumptions.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.