Switch to LLM-driven agent with zero hard-coded governance logic

Replace old rule-based agent with pure LLM interpretation system.

Agent Changes:
- Rename agent.py → agent_legacy.py (preserve old hard-coded agent)
- Rename agent_refactored.py → agent.py (make LLM agent primary)
- Agent now interprets constitution to understand authority and processes
- No hard-coded checks for specific users, roles, or governance models
- Fully generic: works with any constitutional design

Constitution Interpreter:
- Updated interpret_proposal() to detect authority structures from text
- LLM determines who has decision-making power from constitution
- No assumptions about voting, proposals, or specific governance models

Mastodon Formatting:
- Improved line break handling for bullet points and paragraphs
- Better plain-text formatting for Mastodon posts

Primitives:
- Added support for admin_approval threshold type

Architecture:
- Bot now uses pure LLM interpretation instead of scripted logic
- Each instance can develop implementation guidelines separately
- Guidelines not included in main codebase (instance-specific)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Nathan Schneider
2026-02-08 15:20:00 -07:00
parent bda868cb45
commit a92236e528
6 changed files with 1216 additions and 1106 deletions

File diff suppressed because it is too large Load Diff