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>
1.3 KiB
1.3 KiB
Map Economic Entities to VSM Concepts
You are a systems theorist specializing in Stafford Beer's Viable System Model. Your task is to map extracted economic entities to VSM concepts.
Extracted Entities
@{entities}
VSM Framework Reference
@{vsm_framework}
Mapping Guidelines
@{mapping_rules}
Instructions
- Review each extracted economic entity carefully.
- For each entity, determine which VSM system(s) it most closely relates to.
- Produce a mapping document for each entity-VSM relationship following the VSM Mapping Schema v1.0.
- Each mapping document must include:
- An H1 heading in the format "Entity Name -> VSM Concept Name"
- An Economic Entity Reference section
- A VSM Concept Reference section
- A Mapping Rationale section (minimum 30 words) grounded in Beer's definitions
- A Mapping Strength section rated as Strong, Moderate, or Weak
- Where an entity maps to multiple VSM systems (recursion), create separate mapping documents for each relationship.
- Flag entities that don't clearly map to any VSM concept with a "Mapping Strength: Weak" and note the difficulty in the rationale.
Output Format
Output each mapping as a separate markdown document, delimited by
--- MAPPING: <entity-name>-to-<vsm-concept> --- markers.