mrhavens
|
8cf833c729
|
feat: Content-Based Purpose Inference
Added content_infer.py - analyzes existing content to infer purpose:
- ContentPurposeInferer class
- Analyzes blog posts, articles, text
- Detects signals: tutorials, explainers, transformation stories, etc.
- Returns purpose, confidence, reasoning
Updated intake.py to weight all signals:
1. Explicit flags (weight: 1.0)
2. Content inference (weight: 0.4) - NEW
3. Keyword classification (weight: 0.3)
4. Conversational (weight: 0.5)
Now if you point at a blog:
- Tutorial posts → LEARN_HANDS_ON
- Explainers → UNDERSTAND
- Transformation stories → TRANSFORM
- Reviews/Comparisons → DECIDE
- Reference docs → REFERENCE
- Journey/Biography → BE_INSPIRED
|
2026-03-13 20:50:36 +00:00 |
|
mrhavens
|
b46e87ff76
|
feat: Nonfiction Intake System - All Three Paths
This commit completes Issue #18 (Purpose Classifier), adds Intake Agent
and CLI integration:
1. PURPOSE CLASSIFIER (Issue #18 - DONE earlier)
- Keyword-based classification into 6 ReaderPurposes
- LLM-enhanced classification for nuanced cases
2. INTAKE AGENT (NEW - addresses Issue #20, #23)
- Created opus_orchestrator/nonfiction/intake.py
- Intelligent agent that combines:
* Explicit flags (--purpose, --category)
* Keyword classification (auto-detect)
* Conversational questions (when ambiguous)
- IntakeAgent class with process() method
- determine_intake() convenience function
- get_questions() for conversational mode
- Source tracking: explicit | classifier | intake | hybrid
3. CLI INTEGRATION (Issue #23)
- Added --purpose flag: learn, understand, transform, decide, reference, inspire
- Added --category flag: business, leadership, memoir, etc.
- Both passed to orchestrator
Usage:
# Explicit
opus generate --book-type nonfiction --purpose transform --category self_help
# Auto-classify
opus generate --book-type nonfiction --concept "How to build a startup"
# Programmatic
result = await determine_intake(
concept="Leadership for introverts",
purpose="transform", # or None for auto
category="leadership",
mode="auto" # or "conversational"
)
|
2026-03-13 20:46:06 +00:00 |
|