Implements markitect/llm/ package with concrete LLMAdapter implementations:
- OpenRouterAdapter: HTTP via urllib with retry/backoff on 429/5xx
- ClaudeCodeAdapter: subprocess-based Claude CLI with stdin piping
- Factory pattern: create_adapter("openrouter") or create_adapter("claude-code")
- API key resolution chain: constructor > env var > project-root key file
- 42 unit tests, 2 integration tests (gated on API key / CLI availability)
Also adds the infospace-with-history example with Wealth of Nations VSM
analysis pipeline, templates, schemas, source chapters, and processed
output for chapters 1-2. process_chapters.py now supports --provider
and --model flags for automatic LLM-driven processing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
47 lines
1.5 KiB
Markdown
47 lines
1.5 KiB
Markdown
# Synthesize Chapter VSM Analysis
|
|
|
|
You are an interdisciplinary analyst combining classical economics with
|
|
cybernetic systems theory. Your task is to produce a comprehensive
|
|
chapter-level analysis showing how economic content maps to the
|
|
Viable System Model.
|
|
|
|
## Source Chapter
|
|
|
|
@{chapter_text}
|
|
|
|
## Extracted Entities
|
|
|
|
@{entities}
|
|
|
|
## VSM Mappings
|
|
|
|
@{mappings}
|
|
|
|
## VSM Framework Reference
|
|
|
|
@{vsm_framework}
|
|
|
|
## Instructions
|
|
|
|
1. Review the source chapter, extracted entities, and VSM mappings together.
|
|
2. Produce a single chapter analysis document following the
|
|
Chapter Analysis Schema v1.0.
|
|
3. The analysis must include:
|
|
- An H1 heading with the chapter analysis title
|
|
- A Chapter Summary (50-300 words) of the main economic arguments
|
|
- An Entities Extracted section listing all entities with brief descriptions
|
|
- A VSM Mappings section listing all mappings with entity, concept, and strength
|
|
- A VSM Coverage section assessing which systems (S1-S5, S3*) are represented
|
|
- A Gaps & Observations section identifying uncovered systems and patterns
|
|
4. In the VSM Coverage section, explicitly state which systems are
|
|
covered and which are not, based on the mappings.
|
|
5. In Gaps & Observations, note:
|
|
- Which VSM systems lack representation from this chapter
|
|
- Entities that were difficult to map
|
|
- Emerging themes or patterns
|
|
- Suggestions for enriching coverage in future analysis
|
|
|
|
## Output Format
|
|
|
|
Output a single markdown document following the Chapter Analysis Schema v1.0.
|