@gonzih/debate-coach 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +250 -0
- package/SKILL.md +91 -0
- package/dist/claude.d.ts +26 -0
- package/dist/claude.d.ts.map +1 -0
- package/dist/claude.js +285 -0
- package/dist/claude.js.map +1 -0
- package/dist/database.d.ts +19 -0
- package/dist/database.d.ts.map +1 -0
- package/dist/database.js +157 -0
- package/dist/database.js.map +1 -0
- package/dist/fallacies.d.ts +11 -0
- package/dist/fallacies.d.ts.map +1 -0
- package/dist/fallacies.js +207 -0
- package/dist/fallacies.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +571 -0
- package/dist/index.js.map +1 -0
- package/dist/session.d.ts +22 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +104 -0
- package/dist/session.js.map +1 -0
- package/dist/topics.d.ts +8 -0
- package/dist/topics.d.ts.map +1 -0
- package/dist/topics.js +463 -0
- package/dist/topics.js.map +1 -0
- package/dist/types.d.ts +83 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/llms.txt +104 -0
- package/package.json +50 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export interface ArgumentScore {
|
|
2
|
+
evidence: number;
|
|
3
|
+
logic: number;
|
|
4
|
+
relevance: number;
|
|
5
|
+
originality: number;
|
|
6
|
+
total: number;
|
|
7
|
+
}
|
|
8
|
+
export interface FallacyDetection {
|
|
9
|
+
type: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
explanation: string;
|
|
13
|
+
quote?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ScoredArgument {
|
|
16
|
+
text: string;
|
|
17
|
+
score: ArgumentScore;
|
|
18
|
+
fallacies: FallacyDetection[];
|
|
19
|
+
feedback: string;
|
|
20
|
+
strengtheningSuggestion: string;
|
|
21
|
+
timestamp: string;
|
|
22
|
+
}
|
|
23
|
+
export type DebatePhase = "PRO_ARGUMENTS" | "STEELMAN_READY" | "FLIP_READY" | "CON_ARGUMENTS" | "SYNTHESIS_READY" | "COMPLETED";
|
|
24
|
+
export interface DebateSession {
|
|
25
|
+
id: string;
|
|
26
|
+
profileId: string;
|
|
27
|
+
topic: string;
|
|
28
|
+
proposition: string;
|
|
29
|
+
startedAt: string;
|
|
30
|
+
phase: DebatePhase;
|
|
31
|
+
proPosition: string;
|
|
32
|
+
conPosition: string;
|
|
33
|
+
currentPosition: string;
|
|
34
|
+
proArguments: ScoredArgument[];
|
|
35
|
+
conArguments: ScoredArgument[];
|
|
36
|
+
steelman?: string;
|
|
37
|
+
keyCounterArguments?: string[];
|
|
38
|
+
synthesis?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface Topic {
|
|
41
|
+
id: string;
|
|
42
|
+
title: string;
|
|
43
|
+
proposition: string;
|
|
44
|
+
category: string;
|
|
45
|
+
ageGroup: string;
|
|
46
|
+
difficulty: "easy" | "medium" | "hard";
|
|
47
|
+
tags: string[];
|
|
48
|
+
}
|
|
49
|
+
export interface ProgressReport {
|
|
50
|
+
profileId: string;
|
|
51
|
+
debatesCompleted: number;
|
|
52
|
+
avgProScore: number;
|
|
53
|
+
avgConScore: number;
|
|
54
|
+
avgScore: number;
|
|
55
|
+
fallacyTrend: Record<string, number[]>;
|
|
56
|
+
topFallacies: Array<{
|
|
57
|
+
type: string;
|
|
58
|
+
count: number;
|
|
59
|
+
}>;
|
|
60
|
+
improvementAreas: string[];
|
|
61
|
+
flipSuccessRate: number;
|
|
62
|
+
topicsDebated: string[];
|
|
63
|
+
scoreOverTime: Array<{
|
|
64
|
+
date: string;
|
|
65
|
+
score: number;
|
|
66
|
+
}>;
|
|
67
|
+
}
|
|
68
|
+
export interface DbDebate {
|
|
69
|
+
id: string;
|
|
70
|
+
profile_id: string;
|
|
71
|
+
topic: string;
|
|
72
|
+
proposition: string;
|
|
73
|
+
started_at: string;
|
|
74
|
+
completed: number;
|
|
75
|
+
did_flip: number;
|
|
76
|
+
pro_score: number;
|
|
77
|
+
con_score: number;
|
|
78
|
+
fallacies_caught: number;
|
|
79
|
+
fallacies_total: number;
|
|
80
|
+
arguments_json: string;
|
|
81
|
+
synthesis: string | null;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,uBAAuB,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,WAAW,GACnB,eAAe,GACf,gBAAgB,GAChB,YAAY,GACZ,eAAe,GACf,iBAAiB,GACjB,WAAW,CAAC;AAEhB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE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ACX,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/llms.txt
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# debate-coach MCP Server
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
An MCP server that trains critical thinking through structured debate. Forces students to argue both sides of any topic, detects logical fallacies in real time, scores argument quality, and synthesizes the debate.
|
|
5
|
+
|
|
6
|
+
## Core Philosophy
|
|
7
|
+
Based on the Socratic method and professional debate formats (Lincoln-Douglas, Oxford, Karl Popper). The goal is not to win arguments but to develop the capacity for rigorous, evidence-based reasoning — including the ability to argue positions you personally disagree with.
|
|
8
|
+
|
|
9
|
+
## MCP Tools Available
|
|
10
|
+
|
|
11
|
+
### start_debate
|
|
12
|
+
Starts a debate session. Refines the student's topic into a proper debate proposition. Returns sessionId and instructions.
|
|
13
|
+
- Input: profileId (string), topic (optional string), position (optional string)
|
|
14
|
+
- Output: Proposition, sessionId, step-by-step instructions
|
|
15
|
+
|
|
16
|
+
### submit_argument
|
|
17
|
+
Scores a single argument on 4 dimensions (0-10 total) and detects logical fallacies.
|
|
18
|
+
- Input: sessionId, argument (string)
|
|
19
|
+
- Output: Scores (evidence 0-3, logic 0-3, relevance 0-2, originality 0-2), fallacies detected, feedback, strengthening suggestion
|
|
20
|
+
|
|
21
|
+
### get_steelman
|
|
22
|
+
Generates the strongest possible opposing argument after the student has argued their side (3+ arguments minimum).
|
|
23
|
+
- Input: sessionId
|
|
24
|
+
- Output: Steel-man paragraph + 5 key counter-arguments
|
|
25
|
+
|
|
26
|
+
### flip_sides
|
|
27
|
+
Switches the student to argue the opposing position. Requires get_steelman to be called first.
|
|
28
|
+
- Input: sessionId
|
|
29
|
+
- Output: New position prompt and instructions
|
|
30
|
+
|
|
31
|
+
### complete_debate
|
|
32
|
+
Finalizes the debate, generates synthesis, saves to progress database.
|
|
33
|
+
- Input: sessionId
|
|
34
|
+
- Output: Performance scores, synthesis paragraph, saved to ~/.debate-coach/debates.db
|
|
35
|
+
|
|
36
|
+
### build_argument
|
|
37
|
+
Socratic scaffolding for students who don't know where to start. Takes a rough thought and returns guiding questions.
|
|
38
|
+
- Input: sessionId, thought (rough idea)
|
|
39
|
+
- Output: 4 Socratic questions + one-sentence hint
|
|
40
|
+
|
|
41
|
+
### get_topic_list
|
|
42
|
+
Returns curated debate topics, filterable by category, age group, difficulty.
|
|
43
|
+
- Input: category? (social/science/policy/philosophy/technology/historical/economics/health), ageGroup? (teens/general), difficulty? (easy/medium/hard)
|
|
44
|
+
- Output: 50+ topics with propositions, tags, difficulty ratings
|
|
45
|
+
|
|
46
|
+
### get_progress
|
|
47
|
+
Returns progress report for a student profile.
|
|
48
|
+
- Input: profileId
|
|
49
|
+
- Output: Debates completed, average scores (PRO and CON), fallacy trend over time, top fallacies, improvement areas, score history
|
|
50
|
+
|
|
51
|
+
### get_fallacy_guide
|
|
52
|
+
Reference guide for the 20 logical fallacies the system detects.
|
|
53
|
+
- Input: fallacyType? (specific fallacy key)
|
|
54
|
+
- Output: Full guide or detail on specific fallacy
|
|
55
|
+
|
|
56
|
+
## Logical Fallacies Detected (20)
|
|
57
|
+
ad_hominem, straw_man, false_dichotomy, slippery_slope, hasty_generalization, appeal_to_authority, appeal_to_emotion, circular_reasoning, red_herring, bandwagon, false_equivalence, appeal_to_nature, anecdotal_evidence, post_hoc, tu_quoque, loaded_question, appeal_to_tradition, no_true_scotsman, moving_goalposts, cherry_picking
|
|
58
|
+
|
|
59
|
+
## Argument Scoring Criteria
|
|
60
|
+
- Evidence (0-3): Factual backing, studies, data, expert consensus
|
|
61
|
+
- Logic (0-3): Sound reasoning, no fallacies, valid conclusions
|
|
62
|
+
- Relevance (0-2): Directly supports the proposition
|
|
63
|
+
- Originality (0-2): Nuanced insight vs. generic point
|
|
64
|
+
- Total: 0-10
|
|
65
|
+
|
|
66
|
+
## Debate Session Flow
|
|
67
|
+
1. start_debate → get sessionId and proposition
|
|
68
|
+
2. submit_argument × 3-5 (argue FOR)
|
|
69
|
+
3. get_steelman → see opposing case
|
|
70
|
+
4. flip_sides → switch positions
|
|
71
|
+
5. submit_argument × 3-5 (argue AGAINST)
|
|
72
|
+
6. complete_debate → synthesis + save to DB
|
|
73
|
+
|
|
74
|
+
## Data Storage
|
|
75
|
+
- In-memory: Active debate sessions
|
|
76
|
+
- SQLite at ~/.debate-coach/debates.db: Completed debates, progress history
|
|
77
|
+
- No external data transmission (API calls to Anthropic only)
|
|
78
|
+
|
|
79
|
+
## Model Used
|
|
80
|
+
claude-opus-4-6 with adaptive thinking for all scoring, fallacy detection, steel-manning, and synthesis generation.
|
|
81
|
+
|
|
82
|
+
## Setup
|
|
83
|
+
```bash
|
|
84
|
+
# Install
|
|
85
|
+
npm install -g @gonzih/debate-coach
|
|
86
|
+
|
|
87
|
+
# Configure ANTHROPIC_API_KEY
|
|
88
|
+
export ANTHROPIC_API_KEY=your-key-here
|
|
89
|
+
|
|
90
|
+
# Run as MCP server
|
|
91
|
+
debate-coach
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## MCP Config (Claude Desktop)
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"mcpServers": {
|
|
98
|
+
"debate-coach": {
|
|
99
|
+
"command": "npx",
|
|
100
|
+
"args": ["@gonzih/debate-coach"]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gonzih/debate-coach",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server that trains critical thinking by making students argue both sides of any topic, catching logical fallacies in real time, and scoring argument quality",
|
|
5
|
+
"author": "Gonzih",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"bin": {
|
|
10
|
+
"debate-coach": "dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md",
|
|
15
|
+
"SKILL.md",
|
|
16
|
+
"llms.txt"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"start": "node dist/index.js",
|
|
21
|
+
"dev": "tsx src/index.ts",
|
|
22
|
+
"prepublishOnly": "npm run build"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@anthropic-ai/sdk": "^0.39.0",
|
|
26
|
+
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
27
|
+
"better-sqlite3": "^11.9.1",
|
|
28
|
+
"zod": "^3.24.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/better-sqlite3": "^7.6.12",
|
|
32
|
+
"@types/node": "^22.15.3",
|
|
33
|
+
"tsx": "^4.19.2",
|
|
34
|
+
"typescript": "^5.8.3"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"mcp",
|
|
38
|
+
"debate",
|
|
39
|
+
"critical-thinking",
|
|
40
|
+
"education",
|
|
41
|
+
"logical-fallacies",
|
|
42
|
+
"argumentation",
|
|
43
|
+
"socratic-method",
|
|
44
|
+
"claude"
|
|
45
|
+
],
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "https://github.com/gonzih/debate-coach"
|
|
49
|
+
}
|
|
50
|
+
}
|