Commit Graph

6 Commits

Author SHA1 Message Date
mrhavens be64111515 feat: Issue #20 - Purpose-Based Agent Selection
Created purpose-specific writing agents:

- purpose_writers.py with 6 specialized agents:
  - TutorialWriter: Hands-on learning (steps, exercises, encouragement)
  - ExplainerWriter: Conceptual understanding (analogies, mental models)
  - TransformationWriter: Personal change (emotional honesty, journey)
  - EvidenceWriter: Data-driven decisions (evidence, tradeoffs)
  - ReferenceWriter: Comprehensive reference (completeness, accuracy)
  - VisionaryWriter: Inspirational content (emotion, vision)

Each agent has:
- 100+ line specialized system prompt
- Purpose-specific writing rules
- Structure guidance
- Tone guidance
- Example phrases

Factory functions:
- get_writer_for_purpose(purpose) → BaseAgent
- select_writer_agent(purpose) → str
- list_available_writers() → dict

This completes Issue #20.
2026-03-13 22:26:24 +00:00
mrhavens aab4014859 fix: Architecture - state adapter, agent validation
Team 4: Architecture & Design

Fixed:
- #6: Created unified state adapter (state_adapter.py)
  - StateAdapter class to convert between OpusState and OpusGraphState
  - create_unified_state() for initializing either system
  - graph_to_opus() and opus_to_graph() converters

- #11: Added output validation to BaseAgent
  - validate_output() method that parses JSON and validates against Pydantic schemas
  - Extracts JSON from markdown code blocks
  - Returns validated model or error message

- #12: Already properly handled (orchestrator imports get_framework_prompt)
2026-03-13 18:18:03 +00:00
mrhavens 8cb29889cc Add live research capabilities with innovation detection
Research Tools:
- SearchTool: Multiple backends (Tavily, Serper, Brave, DuckDuckGo)
- WikipediaTool: Wikipedia lookup
- AcademicSearchTool: CrossRef, Semantic Scholar
- ResearchOrchestrator: Comprehensive multi-source research

ResearchAgent:
- NOT just fact-checking - actively discovers NEW information
- Identifies trends beyond training data cutoff
- Generates innovations from cross-referencing sources
- Deep research with subtopics

VerifiedFactChecker:
- Live claim verification against web sources
- Confidence scoring
- Citation needed detection

Dependencies added: tavily, wikipedia, arxiv, duckduckgo-search
2026-03-13 05:03:52 +00:00
mrhavens dec5aae09a Wire up all agents with LLM calls
- Worldsmith, Character Lead, Voice, Editor agents now call LLM
- All nonfiction agents wired (Researcher, Analyst, Writer, FactChecker, Editor)
- Orchestrator fully wired with agent pipeline
- Add python-dotenv dependency
2026-03-12 18:42:15 +00:00
mrhavens e151cee69f Add MiniMax LLM integration and local .env support
- Add .env to .gitignore (API keys stay local)
- Add LLM client with MiniMax and OpenAI support
- Update config to load from environment variables
- Wire up Architect agent to actually call the LLM
- Add MiniMax API key to local .env file
2026-03-12 18:33:29 +00:00
mrhavens 40378ad65e Initial commit: Opus Orchestrator AI - Full-flow book generation
- LangGraph workflow orchestration
- CrewAI agent crews (Fiction Fortress & Nonfiction Fortress)
- PydanticAI schema validation
- Fiction agents: Architect, Worldsmith, Character Lead, Voice, Editor
- Nonfiction agents: Researcher, Analyst, Writer, Fact-Checker, Editor
- Complete schema definitions for books, chapters, critiques
- Configuration management
- Basic test suite
2026-03-12 17:45:05 +00:00