Skip to content

Commit f4d949a

Browse files
committed
Add ENKI Debate Arena, ADVERSARY/MISCONCEPTION/NOISE agents, /debate endpoint
- ENKI Debate Arena: client-side only debate UI with scoring, claim badges, agent visualization, misconception/noise injection - ADVERSARY agent: 7 red-team checks (weak_analogy, uncited_doctrine, overclaiming, tradition_collapse, scientific_misuse, uncertainty_language, metaphor_as_proof) - MISCONCEPTION agent: 8 reasoning error patterns - NOISE agent: 5 noise patterns for misleading claims - /debate POST endpoint: runs full debate pipeline server-side with 3 rounds, writes audit to debates/YYYY-MM-DD.json - 93/93 tests passing
1 parent be1c7e0 commit f4d949a

14 files changed

Lines changed: 1396 additions & 120 deletions

agents/ADVERSARY.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# ADVERSARY — Red Team Agent
2+
3+
**Emoji:** ⚔️
4+
**Zone:** trial
5+
**Role:** Red-teams every ENKI claim. Challenges weak analogies. Flags uncited doctrine. Forces uncertainty language.
6+
7+
---
8+
9+
## Purpose
10+
11+
ADVERSARY is the system's adversarial checkpoint. Every ENKI synthesis must pass through ADVERSARY before LEDGE can seal it. ADVERSARY does not generate new knowledge — it stress-tests existing claims.
12+
13+
ADVERSARY's job is to find the cracks.
14+
15+
---
16+
17+
## Flags
18+
19+
| Flag | Description |
20+
|------|-------------|
21+
| `weak_analogy` | Analogy lacks structural similarity between domains |
22+
| `uncited_doctrine` | Claim presented as fact without source citation |
23+
| `overclaiming` | Confidence exceeds what evidence supports |
24+
| `tradition_collapse` | Claim conflates distinct religious traditions |
25+
| `scientific_misuse` | Scientific concept used outside its domain of validity |
26+
| `uncertainty_language` | Claim uses absolute language where uncertainty exists |
27+
| `metaphor_as_proof` | Metaphor treated as logical proof |
28+
29+
---
30+
31+
## Decision Rules
32+
33+
1. If any `critical` flag fires → verdict = `reject`
34+
2. If 2+ `high` flags fire → verdict = `reject`
35+
3. If 1 `high` flag fires → verdict = `repent`
36+
4. If only `medium`/`low` flags → verdict = `approve` with warnings
37+
5. If no flags → verdict = `approve`
38+
39+
---
40+
41+
## Output Format
42+
43+
```typescript
44+
interface AdversaryResult {
45+
passed: boolean;
46+
challenges: AdversaryChallenge[];
47+
verdict: Verdict;
48+
}
49+
```
50+
51+
---
52+
53+
## Invocation
54+
55+
```typescript
56+
import { adversaryCheck } from './agents/adversary.js';
57+
const result = await adversaryCheck(enkiResult);
58+
```

agents/MISCONCEPTION.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# MISCONCEPTION — Reasoning Error Generator
2+
3+
**Emoji:** 🎭
4+
**Zone:** trial
5+
**Role:** Generates common reasoning errors humans make when evaluating claims.
6+
7+
---
8+
9+
## Purpose
10+
11+
MISCONCEPTION exists to expose the flaws in human reasoning. It generates common logical fallacies and cognitive biases that appear when people evaluate theological, scientific, or philosophical claims. By making these errors visible, the system can filter them out before they reach the LEDGE.
12+
13+
---
14+
15+
## Error Types
16+
17+
| Type | Description | Example |
18+
|------|-------------|---------|
19+
| `correlation_causation` | Assuming correlation implies causation | "Quantum mechanics and theology both mention observers, so they must be related" |
20+
| `authority_evidence` | Treating authority as evidence | "Einstein believed in God, so quantum mechanics proves God exists" |
21+
| `analogy_proof` | Treating analogy as logical proof | "Entanglement is like covenant, therefore covenant is real" |
22+
| `popularity_truth` | Assuming popular belief is true | "Most people believe in free will, so it must exist" |
23+
| `confidence_correctness` | Assuming confidence equals accuracy | "I'm certain this is true, so it must be" |
24+
| `cherry_picking` | Selecting only supporting evidence | Ignoring counterexamples |
25+
| `false_dilemma` | Presenting only two options | "Either quantum mechanics proves God or it doesn't" |
26+
| `appeal_nature` | Arguing from naturalness | "It's natural to believe in God, so God must exist" |
27+
28+
---
29+
30+
## Output Format
31+
32+
```typescript
33+
interface MisconceptionResult {
34+
claim: string;
35+
classification: string;
36+
severity: 'critical' | 'high' | 'medium' | 'low';
37+
reason: string;
38+
}
39+
```
40+
41+
---
42+
43+
## Invocation
44+
45+
```typescript
46+
import { generateMisconceptions } from './agents/misconception.js';
47+
const results = await generateMisconceptions(enkiClaim);
48+
```

agents/NOISE.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# NOISE — Misleading Information Injector
2+
3+
**Emoji:** 🦠
4+
**Zone:** trial
5+
**Role:** Injects irrelevant or misleading information to test the pipeline's ability to filter noise.
6+
7+
---
8+
9+
## Purpose
10+
11+
NOISE exists to challenge the pipeline's filtering ability. It generates claims that look relevant but are actually misleading, irrelevant, or contaminated. By injecting noise, the system learns to distinguish signal from noise.
12+
13+
---
14+
15+
## Noise Types
16+
17+
| Type | Description | Example |
18+
|------|-------------|---------|
19+
| `unrelated_citation` | Citation that sounds relevant but isn't | "Einstein said God does not play dice" (unrelated to quantum theology) |
20+
| `keyword_collision` | Keyword match that leads to wrong context | "Wave" in "wave function" vs "wave of emotion" |
21+
| `search_contamination` | Results that pollute the search space | Fake etymologies, false translations |
22+
| `semantic_drift` | Claims that slowly shift meaning | "Quantum" used to mean "mysterious" instead of physics |
23+
| `authority_trap` | Fake expert citations | "According to Dr. Smith..." (no such expert) |
24+
| `false_connection` | Connecting unrelated domains | "Gravity proves love is real" |
25+
26+
---
27+
28+
## Output Format
29+
30+
```typescript
31+
interface NoiseResult {
32+
claim: string;
33+
type: string;
34+
description: string;
35+
severity: 'high' | 'medium' | 'low';
36+
}
37+
```
38+
39+
---
40+
41+
## Invocation
42+
43+
```typescript
44+
import { generateNoise } from './agents/noise.js';
45+
const results = await generateNoise(topic);
46+
```

0 commit comments

Comments
 (0)