- Add CritiqueCrew initialization in OpusGraph.__init__
- Add use_autogen flag to enable/disable
- Add critique_summary and critique_iterations to state
- Rewrite node_write_chapters with AutoGen critique loop
- Each chapter now gets multi-agent critique (LiteraryCritic, GenreExpert, StoryEditor)
- Iteration loop until approved or max iterations
- Full integration complete
Based on Gemini's analysis:
1. Nodes now return dicts instead of mutating state
2. run() uses stream_mode='values'
3. Falls back to get_state() from checkpointer
4. Uses model_copy() for Pydantic updates
Full pipeline runs end-to-end:
- All 7 pre-writing stages (seed → scene descriptions)
- Style guide generation
- Chapter writing (3 chapters, 2,833 words tested)
Fixed result extraction from graph.stream().
- Proper StateGraph with compiled nodes
- Conditional edges for writing iteration
- Checkpoint memory for resumability
- Structured state with Pydantic
- Node_validate for cross-stage validation
- Writing loop with iterate/next logic
- Full end-to-end workflow
This is the rigorous LangGraph integration.
- Structured OpusState with Pydantic models
- PreWriting schema with Character, ChapterPlan, PlotBeat
- Validation functions for each stage
- Checkpoint save/load to disk
- Workflow nodes for each stage
- Cross-validation between stages
- Structured parsing of LLM outputs
- Snowflake Method (already had)
- Three-Act Structure
- Save the Cat (Blake Snyder)
- Hero's Journey (Joseph Campbell)
- Story Circle (Dan Harmon)
- The 7-Point Plot (The Pantone)
- Fichtean Curve
Pass framework='hero-journey' or 'save-the-cat' etc. to use.
- 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