Methodology

Consensus-Driven Polyglot Development

CDPD: A new development lifecycle leveraging MCP to orchestrate LLMs as “Builders” and “Judges”

The Parallax Protocol introduces a fundamentally new approach to software development. Rather than relying on a single implementation that may contain undetected errors, we generate multiple independent implementations and use consensus to determine correctness.

The Super Meta-Language: OCL-P (OCL-Prompted)

Object Constraint Language (OCL) is the perfect candidate for defining specifications. However, for LLMs, we wrap OCL in a structured schema (YAML or JSON) that combines the intent (Natural Language) with the rules (OCL).

We call this the “Golden Spec.”

golden_spec.yaml
spec_id: "LNS-402"
function_name: "calculate_amortization"
description: "Calculates monthly payment for a fixed-rate loan."

inputs:
  - name: "principal"
    type: "float"
  - name: "rate_annual"
    type: "float"
  - name: "months"
    type: "integer"

constraints:
  pre:
    - "self.principal > 0"
    - "self.rate_annual >= 0"
    - "self.months > 0"
  post:
    - "result > 0"
    - "result < self.principal"
  invariant:
    - "self.principal >= result"

implementations_required: [C, Java, Python]

The Agent Prompt Template

To ensure the LLMs adhere to the mathematical rigour of the spec rather than “guessing,” we use a Structured Prompting Strategy. The OCL constraints are injected directly into each agent's system prompt.

agent_prompt.jinja2
SYSTEM_ROLE:
You are a Senior Systems Engineer specialising in {{ target_language }}.
You do not write "clean code"; you write "provably correct code."

TASK:
Implement the function `{{ function_name }}` based on the following
Object Constraint Language (OCL) specification.

STRICT GUIDELINES:
1. INPUT VALIDATION: You must implement the 'pre' conditions as explicit
   assertions or exception checks at the start of the function.
2. OUTPUT VERIFICATION: You must implement the 'post' conditions as
   assertions before returning the value.
3. PURITY: No external libraries unless strictly standard
   (e.g., <math.h>, java.lang.Math).
4. FORMAT: Return ONLY the raw code. No markdown formatting, no commentary.

OCL SPECIFICATION:

Pre-Conditions:
{% for pre in constraints.pre %}
  - {{ pre }}
{% endfor %}

Post-Conditions:
{% for post in constraints.post %}
  - {{ post }}
{% endfor %}

Invariant:
{% for inv in constraints.invariant %}
  - {{ inv }}
{% endfor %}

Naming Metaphors

The methodology can be referred to using various metaphorical names, each emphasising different aspects of the approach:

Parallax (Recommended)

The Optical Metaphor

Views the “Truth” (the Spec) through different “Angles” (Languages). By overlapping views, we eliminate distortion inherent in any single angle.

Rosetta

The Linguistic Metaphor

Named after the Rosetta Stone. The same specification written in multiple “scripts” to ensure meaning is preserved across all.

Chorus

The Musical Metaphor

If one singer hits a wrong note, the accuracy of others drowns it out. The system cares about harmony, not solo performance.

Quorum

The Political Metaphor

You need a quorum of instances to agree before accepting the result as valid. Enterprise-grade and reliable.

Cerberus

The Mythological Metaphor

The three-headed dog. If one head falls asleep or is tricked, the others remain vigilant. Ideal for security contexts.

DIVA

The Acronym

Distributed Implementation Voting Architecture. Sounds like a standard industry framework.

Why This Methodology is Robust

Semantic Independence

Bugs in C (memory leaks) rarely replicate in Java (Garbage Collection) or Python (Dynamic Typing). By crossing the language barrier, we filter out language-specific classes of errors.

AI Arbitration

LLMs are excellent at “Compare and Repair.” They do not need to be perfect coders; they just need to be perfect patchers when guided by a consensus engine.

OCL Anchoring

The OCL specification prevents LLMs from hallucinating features. It forces them to adhere to a mathematical contract, eliminating ambiguity.

The Paradigm Shift

This methodology represents a fundamental transition in software development philosophy:

TDD
Test-Driven Development
CDD
Consensus-Driven Development