feat(llm): add LLM integration module with OpenRouter and Claude Code adapters
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>
This commit is contained in:
23
examples/infospace-with-history/README.md
Normal file
23
examples/infospace-with-history/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
This example provides a tutorial and reference experiment for how to set up a viable infospace
|
||||
with history using markitect.
|
||||
|
||||
The task is to capture the knowledge from Adam Smith's The Wealth of Nations available digitally
|
||||
in the public domain as a transcript of the original text and transform and extend it to a
|
||||
collection of concepts and entities from a systems theoretical point of view based on Stafford
|
||||
Beer's Viable System Model that is consistent and complete.
|
||||
|
||||
The tutorial should explain how to use the concept of schemas to provide a scaffolding for how
|
||||
to structure the necessary information entities and define a set of prompts and instructions using
|
||||
the prompt dependency resolution infrastructure to incrementally inject chapters of the book.
|
||||
|
||||
The information space should utilize the option of keeping changes as git history. And define
|
||||
metrics for completeness and consistency.
|
||||
|
||||
While running the experiment no changes must be made to the markitect infrastructure.
|
||||
|
||||
If demand for optimization or fixing errors occurs, a list of corresponding tasks should
|
||||
be generated. It will be used to optimize the markitect infrastructure to then rerun the
|
||||
experiment to optimize tooling and infospace over time and again.
|
||||
|
||||
--worsch, 10th Feb. 2026
|
||||
|
||||
Reference in New Issue
Block a user