feat: Full code review, bug fixes, and philosophy book generation

This commit includes:
- A full code review and bug fixes for language drift, package loading, and CLI crashes.
- The generated 15,000-word philosophy manuscript.
- CODE_REVIEW.md and CHANGELOG.md documenting the process.
This commit is contained in:
Gemini AI
2026-05-20 21:15:11 +00:00
parent dddf5c4a80
commit 13bce7500c
13 changed files with 1160 additions and 198 deletions
+17 -21
View File
@@ -321,12 +321,12 @@ Generate a detailed outline with:
content: Optional[RawContent] = None,
sources: Optional[list[dict]] = None,
) -> OpusState:
"""Ingest raw content from multiple sources.
Args:
content: Pre-loaded raw content
sources: List of source configurations (github, local, s3)
"""
"""Ingest raw content from multiple sources."""
# Skip if we already have content and weren't given specific new sources/content
if self.state and self.state.raw_content and not content and not sources:
print("️ Using existing raw content.")
return self.state
if sources:
from opus_orchestrator.utils.multi_source_ingest import ingest_multiple
@@ -335,7 +335,6 @@ Generate a detailed outline with:
result = await ingest_multiple(
sources=sources,
github_token=self.config.github_token,
# AWS keys would come from environment
)
content = RawContent(
@@ -399,29 +398,26 @@ Generate a detailed outline with:
# =========================================================================
async def snowflake_stage_1(self) -> str:
"""Stage 1: One sentence summary.
Take your one-paragraph story summary and cut it down to one sentence.
"""
"""Stage 1: One sentence summary."""
print("❄️ SNOWFLAKE STAGE 1: One sentence summary...")
raw_content = self.state.raw_content.text if self.state.raw_content else ""
user_prompt = f"""Create a ONE SENTENCE summary of this story concept.
user_prompt = f"""You are analyzing a collection of source materials to synthesize a new story.
## SOURCE CONTENT:
{raw_content}
The sentence should contain:
- Protagonist's name (or descriptor)
## TASK:
Synthesize the core narrative conflict and outcome from the source content into ONE compelling sentence.
The sentence must contain:
- Protagonist's name or descriptor
- Their goal
- The conflict/obstacle
- The central conflict/obstacle
- The stakes
Example: "In a world where magic is forbidden, a young mage must master forbidden arts to save her dying brother, even if it means sparking a war with the ruling theocracy."
## Your seed content:
{raw_content}
## Task:
Write ONE compelling sentence that captures the entire story.
"""
response = await self.agents["architect"].call_llm(
system_prompt="You are an expert story architect. Create concise, compelling summaries.",