-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiscourse.007
More file actions
115 lines (99 loc) · 3.7 KB
/
Copy pathdiscourse.007
File metadata and controls
115 lines (99 loc) · 3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
-- SPDX-License-Identifier: MPL-2.0
-- Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath)
--
-- Example: Discourse-bound semantics (Section 22).
-- Demonstrates Wittgenstein's language games as grammar construct.
--
-- One grammar, one type system, multiple semantic games.
-- Different discourses adopt different interpretation rules.
-- Values pass between discourses via bridge expressions.
-- Types are shared; semantics are not.
-- ============================================================
-- DISCOURSE DECLARATIONS
-- ============================================================
-- Scientific discourse: evidence-weighted, conservative interpretation.
-- Agents in this discourse prioritise statistical evidence.
discourse scientific {
strategy: weighted_evidence
rule confidence_threshold: 0.95
rule sample_size_minimum: 30
weight statistical_evidence: 3
weight anecdotal_evidence: 1
weight expert_opinion: 2
invariant: confidence_threshold >= 0.9
}
-- Adversarial discourse: assume worst case, pessimistic.
-- Agents in this discourse stress-test claims.
discourse adversarial {
strategy: adversarial
rule assume_hostile: true
rule require_proof: true
weight counterexample: 5
weight supporting_evidence: 1
}
-- Consensus discourse: extends scientific, requires agreement.
discourse collaborative extends scientific {
strategy: consensus
rule quorum: 3
rule agreement_threshold: 0.8
}
-- ============================================================
-- DATA CONTEXT
-- ============================================================
@total data review_config = {
min_score: 7,
max_rounds: 3
}
-- ============================================================
-- AGENT using discourse
-- ============================================================
agent Reviewer(caps: Cap[reason]) {
control {
on receive(paper: String) {
-- Enter scientific discourse: branch strategy changes
-- to weighted_evidence, evidence weights apply
enter discourse scientific {
branch traced "scientific_review" {
| accept given {
score: 9,
score >= review_config.min_score
} -> {
send "accepted" to self
trace {
action: "accepted_in_scientific_discourse",
confidence: 0.97
}
}
| reject given {
score: 3,
score < review_config.min_score
} -> {
send "rejected" to self
trace {
action: "rejected_in_scientific_discourse",
confidence: 0.99
}
}
}
}
-- Bridge a value from scientific to adversarial discourse.
-- The value keeps its type but interpretation context changes.
let result = bridge(paper, from: scientific, to: adversarial)
-- Enter adversarial discourse for stress testing
enter discourse adversarial {
branch traced "adversarial_review" {
| challenged given {
counterexample_found: true
} -> {
send "challenged" to self
}
| confirmed given {
counterexample_found: false
} -> {
send "confirmed" to self
}
}
}
}
}
}