Writing Classical Deliberation Code: A Primer for the CDV-DSL
Writing Classical Deliberation Code: A Primer for the CDV-DSL
The Domain-Specific Language of the Classical Deliberation Validator (CDV-DSL) is not a general-purpose programming language. It is a strict, non-permissive declarative schema that formalizes the classical Stoic discipline of assent: inspecting an impression, isolating value claims, grounding roles in authoritative evidence, binding duties, and executing actions with reservation.
1. The 5-Block Case Template
Every deliberation file (.cdv) consists of five required blocks arranged in a fixed sequence. The compiler parses line-by-line; extra text, trailing characters, or missing blocks abort compilation immediately.
CASE CASE_IDENTIFIER:
SITUATION: "A concise empirical summary of the presenting impression."
PROPOSITIONS:
PROP_FACT_01: [EMPIRICAL, VERIFIED, ABSOLUTE_INDIFFERENT, EXTERNAL_STATE] "Direct factual observation"
AIM_01: [DERIVED, VERIFIED, PREFERRED_INDIFFERENT, EXTERNAL_STATE] "Targeted external objective"
EVIDENCE:
EV_AUTHORITY_01: [CONTRACTUAL_AGREEMENT, VERIFIED]
ASSERTS: [PROP_FACT_01]
GRANTS_ROLES: [OPERATIVE_ROLE]
MANDATES:
DUTY DUTY_01 FOR OPERATIVE_ROLE:
DESC: "Operational statement of the required duty"
MODE: AFFIRMATIVE_EXECUTION
PRIORITY: 1
PROSCRIBES: [VICE_DECEIT_01]
ACTIONS:
ACT_01: [AFFIRMATIVE_EXECUTION, EXTERNAL_STATE]
DESC: "Concrete, actionable step to be executed"
ROLE: OPERATIVE_ROLE
DUTY: DUTY_01
AIM: AIM_01
RESERVATION: TRUE
DEPENDS_ON: [PROP_FACT_01]
VICES: []
2. The Four Rules of the Language
Rule 1: Strict Four-Token Classification Tuples
Propositions cannot be declared with free-form text. Every entry requires an exact four-token tuple in brackets: [TYPE, EPISTEMIC_STATUS, POLARITY, LOCUS].
- Type:
EMPIRICAL(direct observation) orDERIVED(inferred from evidence). - Epistemic Status: Evaluated strictly over the closed 4-state algebra:
UNASSERTED,VERIFIED,CONTRADICTED, orCONFLICTED. - Axiological Polarity:
MORAL_GOOD,MORAL_EVIL,PREFERRED_INDIFFERENT,DISPREFERRED_INDIFFERENT, orABSOLUTE_INDIFFERENT. - Axiological Locus:
PROHAIRESIS_INTERNAL(the sovereign faculty of choice) orEXTERNAL_STATE(events, bodies, titles, and outcomes).
Rule 2: The Axiom 1 Safety Rail (Value Contamination)
Under classical Stoic metaethics, moral good and evil exist exclusively within prohairesis. External states are strictly indifferent. If you classify an external state as a moral good:
PROP_TITLE: [DERIVED, VERIFIED, MORAL_GOOD, EXTERNAL_STATE] "Corporate title"
The compiler intercepts the error at Stage 3. Any action depending on this proposition halts compilation with GATE_VALUE_INVALID and GATE_CONTAMINATION_PRESENT.
Rule 3: The Closed Chain of Authority
An action cannot invent a role or claim an unassigned duty. The relational graph must be closed:
- An Evidence block (statute, charter, or agreement) must explicitly assign the role via
GRANTS_ROLES: [ROLE_NAME]. - That same evidence must mandate the duty bound to that role via
DUTY DUTY_NAME FOR ROLE_NAME. - The Action must cite that exact
ROLEandDUTY. Mismatches abort withGATE_DUTY_ROLE_MISMATCHorPREDICATE_C4_FAIL_ROLE_UNGROUNDED.
Rule 4: Mandatory Reservation (Hypexairesis)
Stoic action is conditional upon external circumstance. Every action must include the explicit reservation field:
RESERVATION: TRUE
Omitting this field or declaring RESERVATION: FALSE triggers immediate rejection at Stage 8 under GATE_RESERVATION_ABSENT.
3. Learning by Example: Three Diagnostic Exercises
Exercise 1: Clean Execution (Case A01_SIGN_RELEASE)
Study the standard baseline case below. Notice that the inspector's role is granted by contract, the duty is bound to the inspector role, the aim is marked as a preferred indifferent, and reservation is asserted:
CASE A01_SIGN_RELEASE:
SITUATION: "A cargo inspector is scheduled to release a shipment whose sealed contents match the manifest line by line."
PROPOSITIONS:
PROP_A01_MANIFEST: [EMPIRICAL, VERIFIED, ABSOLUTE_INDIFFERENT, EXTERNAL_STATE] "Sealed contents match the manifest line by line"
AIM_A01_RELEASE: [DERIVED, VERIFIED, PREFERRED_INDIFFERENT, EXTERNAL_STATE] "Timely release of conforming cargo"
EVIDENCE:
EV_A01_01: [CONTRACTUAL_AGREEMENT, VERIFIED]
ASSERTS: [PROP_A01_MANIFEST]
GRANTS_ROLES: [CARGO_INSPECTOR]
MANDATES:
DUTY A01_RELEASE FOR CARGO_INSPECTOR:
DESC: "Release conforming cargo on schedule without alteration of records"
MODE: AFFIRMATIVE_EXECUTION
PRIORITY: 2
PROSCRIBES: []
ACTIONS:
ACT_A01_01: [AFFIRMATIVE_EXECUTION, EXTERNAL_STATE]
DESC: "Sign the release order against the manifest as presented"
ROLE: CARGO_INSPECTOR
DUTY: A01_RELEASE
AIM: AIM_A01_RELEASE
RESERVATION: TRUE
DEPENDS_ON: [PROP_A01_MANIFEST]
VICES: []
Result: Evaluates to ASSENT_ELIGIBLE, proves single-edge necessity, and matches the canonical thesis reconstruction string.
Exercise 2: Inducing Value Contamination
Take the file from Exercise 1 and alter line 5 to treat the timely release not as a preferred indifferent, but as an absolute moral criterion:
AIM_A01_RELEASE: [DERIVED, VERIFIED, MORAL_GOOD, EXTERNAL_STATE] "Timely release of conforming cargo" IS_CRITERION
Result: The compiler halts. The action is rejected with GATE_AIM_MISCLASSIFIED and GATE_VALUE_INVALID. The validator demonstrates that you cannot sacrifice procedural integrity to guarantee an external outcome.
Exercise 3: Triggering Relational Vice Proscription
Add a proscribed vice to the duty mandate (e.g., PROSCRIBES: [VICE_DECEIT_01]), and then add that same vice to the action (e.g., VICES: [VICE_DECEIT_01]).
Result: Option 2B relational vice intersection triggers immediate failure: PREDICATE_C7_FAIL_PROSCRIBED_VICE. An action cannot execute a duty using a means that the duty's governing authority explicitly forbids.
4. Running the Validator Locally
With the six reference modules downloaded into your working directory, save your case to deliberation.cdv and execute the verification pipeline via Python:
python3 -c "
from cdv_compiler import CDVCompiler
from cdv_kernel import CDVKernel
from cdv_dti import CDVDTIProofValidator
with open('deliberation.cdv') as f:
case_ast = CDVCompiler.compile(f.read())
cert = CDVKernel.evaluate(case_ast)
audit = CDVDTIProofValidator.audit_certificate(cert)
print('Audit Verdict:', audit['verdict'])
print('Flags: ', audit['flag'])
"
If the derivation is sound, the validator emits CERTIFIED alongside DUTY_PREDICATE_NECESSITY_PROVEN. If any gate fails, the pipeline halts and reports the exact diagnostic token, providing an uncorrupted audit of your reasoning before you act.


0 Comments:
Post a Comment
<< Home