Initial commit
This commit is contained in:
111
commands/debate-new.md
Normal file
111
commands/debate-new.md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
description: Create a new debate with interactive setup
|
||||
argument-hint: [slug] (optional)
|
||||
---
|
||||
|
||||
# Create New Debate
|
||||
|
||||
## Step 1: Motion
|
||||
|
||||
"**What's your debate motion?**
|
||||
|
||||
You can write it in any of these formats:
|
||||
|
||||
**Formal styles:**
|
||||
- `This house believes that` [proposition] — British Parliamentary
|
||||
- `This house would` [action] — Policy debate
|
||||
- `Resolved:` [statement] — American Parliamentary
|
||||
|
||||
**Or state it directly** (we'll keep it as-is)
|
||||
|
||||
Your motion:"
|
||||
|
||||
## Step 2: Slug
|
||||
|
||||
**If `$1` argument provided:**
|
||||
1. Use `$1` as the slug
|
||||
2. Validate format (lowercase, numbers, hyphens only)
|
||||
3. Check it doesn't exist as a directory
|
||||
4. If valid: skip to Step 3
|
||||
5. If invalid format: explain requirements and ask for new slug
|
||||
6. If exists: list existing debates and ask for different name
|
||||
|
||||
**If no argument provided:**
|
||||
1. After receiving motion, auto-generate 2-3 slug suggestions from motion keywords
|
||||
2. Present: "Suggested slugs:
|
||||
1. [auto-generated-1]
|
||||
2. [auto-generated-2]
|
||||
3. [auto-generated-3]
|
||||
|
||||
Pick a number, or type your own (lowercase, hyphens only):"
|
||||
3. Validate chosen/custom slug:
|
||||
- Check format (lowercase, numbers, hyphens only)
|
||||
- Check doesn't exist as a directory
|
||||
- If format invalid: explain and ask again
|
||||
- If exists: list existing debates and ask for different name
|
||||
|
||||
## Step 3: Definitions & Scope (Optional)
|
||||
|
||||
"**Optional refinements:**
|
||||
|
||||
Type 'definitions' to define key terms, 'scope' to set debate focus, or 'skip' to continue:"
|
||||
|
||||
**If user types 'definitions':**
|
||||
- Suggest 2-3 key terms from the motion that might need defining
|
||||
- For each term: "Define '[term]':" (record definition)
|
||||
|
||||
**If user types 'scope':**
|
||||
- Ask: "Specify the debate's scope or focus:"
|
||||
- Record scope
|
||||
|
||||
**If user types 'skip':**
|
||||
- Proceed to creation
|
||||
|
||||
## Step 4: Create Debate
|
||||
|
||||
Once all information is gathered:
|
||||
|
||||
1. Create directory: `{slug}/`
|
||||
2. Create `{slug}/arguments/` directory
|
||||
3. Create `{slug}/debate.md` with JSON frontmatter:
|
||||
|
||||
```markdown
|
||||
{
|
||||
"debate_id": "{slug}",
|
||||
"current_exchange": 0,
|
||||
"current_phase": "awaiting_arguments",
|
||||
"cumulative_scores": {
|
||||
"proposition": {"total": 0, "count": 0},
|
||||
"opposition": {"total": 0, "count": 0}
|
||||
}
|
||||
}
|
||||
|
||||
# Motion
|
||||
|
||||
{formalized motion}
|
||||
|
||||
## Definitions
|
||||
|
||||
{if any definitions were provided:}
|
||||
- **{term}**: {definition}
|
||||
|
||||
## Scope
|
||||
|
||||
{scope if provided}
|
||||
```
|
||||
|
||||
4. Create `{slug}/scores.json`:
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
5. Confirm to user:
|
||||
|
||||
"✓ Debate '{slug}' created successfully!
|
||||
|
||||
**Motion**: {full formalized motion}
|
||||
{if definitions: **Definitions**: {count} terms defined}
|
||||
{if scope: **Scope**: {scope}}
|
||||
|
||||
Run `/debate-run {slug} 8` to start the debate. Exchange 0 (opening statements) runs automatically, then specify how many rebuttal exchanges to run."
|
||||
145
commands/debate-report.md
Normal file
145
commands/debate-report.md
Normal file
@@ -0,0 +1,145 @@
|
||||
---
|
||||
description: Generate comprehensive debate report with analysis and visualization
|
||||
argument-hint: [slug]
|
||||
---
|
||||
|
||||
# Generate Debate Report
|
||||
|
||||
Analyzes the debate and generates a comprehensive report with argument graph visualization.
|
||||
|
||||
## Arguments
|
||||
|
||||
- `$1`: Debate slug (optional if only 1 debate exists)
|
||||
|
||||
## Step 1: Determine Debate
|
||||
|
||||
**If `$1` provided:**
|
||||
- Use it
|
||||
|
||||
**If no `$1`:**
|
||||
- List debates
|
||||
- If 0: "No debates found."
|
||||
- If 1: Auto-use that debate
|
||||
- If 2+: "Which debate? {list}"
|
||||
|
||||
## Step 2: Convert Argument Graph to PNG
|
||||
|
||||
Try to convert `{debate}/argument-graph.mmd` to PNG image:
|
||||
|
||||
```bash
|
||||
mmdc -i {debate}/argument-graph.mmd -o {debate}/argument-graph.png -t dark -b transparent -s 4
|
||||
```
|
||||
|
||||
**If conversion succeeds:**
|
||||
- Note: "✓ Graph visualization created"
|
||||
- Set `image_exists = true`
|
||||
- Continue to Step 3
|
||||
|
||||
**If conversion fails:**
|
||||
|
||||
Check if `mmdc` (mermaid-cli) is installed:
|
||||
```bash
|
||||
which mmdc || command -v mmdc
|
||||
```
|
||||
|
||||
**If not installed, present options:**
|
||||
|
||||
"**Graph visualization requires mermaid-cli (not currently installed).**
|
||||
|
||||
Choose how to proceed:
|
||||
|
||||
**1. Install and retry** - Install [mermaid-cli](https://github.com/mermaid-js/mermaid-cli) then run this command again
|
||||
- npm: `npm install -g @mermaid-js/mermaid-cli`
|
||||
- Docker: `docker pull minlag/mermaid-cli` (requires creating a shell alias for `mmdc`)
|
||||
|
||||
**2. Convert manually** - Convert the graph yourself and continue
|
||||
- Copy contents of `{debate}/argument-graph.mmd`
|
||||
- Convert online at: https://mermaid.live
|
||||
- Download PNG and save as `{debate}/argument-graph.png`
|
||||
- Reply: **'Image provided, continue'**
|
||||
|
||||
**3. Skip visualization** - Generate report without the graph image
|
||||
- Reply: **'Skip image, continue'**"
|
||||
|
||||
Wait for user input:
|
||||
- If "1": Exit with message "Install mermaid-cli and re-run `/debate-report {slug}`"
|
||||
- If "2": Set `image_exists = true`, continue to Step 3
|
||||
- If "3": Set `image_exists = false`, continue to Step 3
|
||||
|
||||
## Step 3: Generate Comprehensive Report
|
||||
|
||||
Use Task tool with subagent_type "general-purpose" to generate analysis:
|
||||
|
||||
**Prompt:**
|
||||
|
||||
```
|
||||
Generate a comprehensive debate report for the debate at {debate}/.
|
||||
|
||||
Read and analyze:
|
||||
- Motion from @{debate}/debate.md
|
||||
- All arguments in @{debate}/arguments/
|
||||
- Scores from @{debate}/scores.json
|
||||
- Debate state and cumulative scores from @{debate}/debate.md frontmatter
|
||||
|
||||
Your task is to write a compelling, high-level analysis in **500-600 words** that captures the intellectual battle and hooks readers. This is a summary for someone who hasn't read the full debate yet—make it engaging and insightful, not exhaustive.
|
||||
|
||||
**Required structure:**
|
||||
|
||||
# [Motion Title]
|
||||
|
||||
## The Question
|
||||
1-2 sentences capturing what's at stake and why it matters
|
||||
|
||||
## The Clash
|
||||
100-150 words on the fundamental disagreement. What core assumptions or frameworks divide the sides?
|
||||
|
||||
## Turning Points
|
||||
150-200 words on 2-3 key moments that shifted the debate's trajectory. Focus on the most dramatic or intellectually significant developments.
|
||||
|
||||
## The Verdict
|
||||
100-150 words: Final scores (zero-sum totals), strongest/weakest arguments with IDs, and your assessment of who won and why
|
||||
|
||||
{if image_exists:}
|
||||
## Argument Graph
|
||||
|
||||

|
||||
{/if}
|
||||
|
||||
**Style guidelines:**
|
||||
- Use rich markdown: headings (##, ###), **bold**, *italic*
|
||||
- Match tone to debate topic (serious debates = analytical tone, lighter topics = can be more engaging)
|
||||
- Strictly avoid em-dashes and en-dashes
|
||||
- Focus on clarity and intellectual substance over exhaustive detail
|
||||
- 500-600 words total (strictly enforced)
|
||||
|
||||
Output ONLY the complete markdown content for the README.md file.
|
||||
```
|
||||
|
||||
Save agent output to `{debate}/README.md`.
|
||||
|
||||
## Step 4: Completion Message
|
||||
|
||||
**If image exists:**
|
||||
```
|
||||
✓ Debate report generated successfully!
|
||||
|
||||
**Generated files:**
|
||||
- {debate}/README.md (comprehensive analysis)
|
||||
- {debate}/argument-graph.png (visual graph)
|
||||
|
||||
View the report: `cat {debate}/README.md`
|
||||
```
|
||||
|
||||
**If image skipped:**
|
||||
```
|
||||
✓ Debate report generated successfully!
|
||||
|
||||
**Generated file:**
|
||||
- {debate}/README.md (comprehensive analysis)
|
||||
|
||||
Note: Graph visualization was skipped. You can generate it later by:
|
||||
1. Installing [mermaid-cli](https://github.com/mermaid-js/mermaid-cli): `npm install -g @mermaid-js/mermaid-cli`
|
||||
2. Running: `mmdc -i {debate}/argument-graph.mmd -o {debate}/argument-graph.png -t dark -b transparent`
|
||||
|
||||
View the report: `cat {debate}/README.md`
|
||||
```
|
||||
55
commands/debate-run.md
Normal file
55
commands/debate-run.md
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
description: Run debate exchanges between proposition and opposition
|
||||
argument-hint: [slug] [num-exchanges]
|
||||
---
|
||||
|
||||
# Run Debate
|
||||
|
||||
List available debates by checking for directories with debate.md files.
|
||||
|
||||
## Arguments
|
||||
|
||||
- `$1`: Debate slug (optional if only 1 debate exists)
|
||||
- `$2`: Number of exchanges (optional, will ask if not provided)
|
||||
|
||||
## Behavior
|
||||
|
||||
### Determine Debate Slug
|
||||
|
||||
**If `$1` provided:**
|
||||
- Validate it exists
|
||||
- Use it
|
||||
|
||||
**If no `$1`:**
|
||||
- List debates from context above
|
||||
- If 0: "No debates found. Create one with `/debate-new`"
|
||||
- If 1: Auto-use that debate
|
||||
- If 2+: "Which debate? {list}"
|
||||
|
||||
### Determine Exchange Count
|
||||
|
||||
**If `$2` provided:**
|
||||
- Use it
|
||||
|
||||
**If no `$2`:**
|
||||
- Ask: "How many exchanges?"
|
||||
|
||||
## Execution
|
||||
|
||||
Once both parameters are validated:
|
||||
|
||||
Invoke the debate-orchestrator skill with:
|
||||
- Debate slug: {slug}
|
||||
- Number of exchanges: {N}
|
||||
|
||||
The skill manages:
|
||||
- State machine progression (awaiting_arguments → awaiting_judgment cycles)
|
||||
- Parallel debater coordination and judge evaluation
|
||||
- Argument file creation and scoring
|
||||
- State persistence across interruptions
|
||||
|
||||
## Completion
|
||||
|
||||
The skill reports final scores when all exchanges complete.
|
||||
|
||||
Run `/debate-report {slug}` to generate comprehensive debate report and visualization.
|
||||
Reference in New Issue
Block a user