Schema-Driven Workflows
Configuration approach where LLM behavior is governed by explicit schema documents that define structure, conventions, and operational workflows. Central to andrej-karpathy's llm-wiki-pattern for creating disciplined wiki maintainers rather than generic chatbots.
Core Concept
Configuration as Documentation: Schema document (e.g., CLAUDE.md, AGENTS.md, SCHEMA.md) serves as comprehensive instruction manual for LLM behavior. Defines how wiki is structured, what conventions to follow, and what workflows to execute for different operations.
Disciplined Automation: Transforms general-purpose LLM into specialized wiki maintainer through explicit operational instructions. Schema constrains and focuses LLM behavior for consistent, reliable knowledge management.
Schema Components
Structural Definitions:
- Directory organization and file naming conventions
- Page format templates and YAML frontmatter requirements
- Cross-referencing patterns and linking conventions
- Category taxonomies and tagging standards
Operational Workflows:
- Ingest procedures (read → summarize → integrate → cross-reference)
- Query handling (search index → read pages → synthesize → optionally file)
- Maintenance routines (lint for contradictions, orphans, missing links)
- Logging formats and indexing standards
Quality Standards:
- Confidence levels and sourcing requirements
- Cross-reference density expectations
- Contradiction handling procedures
- Update propagation rules
Workflow Examples
Ingest Workflow (from schema):
- Read source completely and extract key information
- Create summary page in wiki/sources/ with metadata
- Update 10-15 relevant existing pages across wiki
- Maintain cross-references and flag contradictions
- Update index.md and append to log.md
- Generate flashcards if applicable
Lint Workflow (from schema):
- Scan for contradictions between pages
- Identify orphan pages with no inbound links
- Find mentioned-but-missing concepts needing pages
- Check for stale content superseded by newer sources
- Suggest new questions and sources to investigate
Co-Evolution Pattern
Human-LLM Collaboration: Schema evolves through usage as human and LLM discover what works for specific domain. Initial framework adapts to actual needs and preferences over time.
Domain Adaptation: General pattern customizes to specific use cases - research wikis have different needs than business intelligence or personal knowledge management.
Workflow Refinement: Operational procedures improve based on experience with what produces highest-quality knowledge accumulation.
Technical Implementation
Schema as Context: LLM reads schema document at start of every session to understand current operational parameters and workflow requirements.
Parseable Formats: Log entries and metadata use consistent formats enabling programmatic analysis and tooling development.
Version Control: Schema documents tracked in git alongside wiki content, providing evolution history and rollback capability.
Benefits
Consistency: Ensures uniform quality and structure across all wiki operations regardless of session or time period.
Reliability: Reduces variability in LLM behavior through explicit instruction rather than relying on implicit understanding.
Maintainability: Schema serves as documentation for wiki structure and operational procedures, enabling debugging and improvement.
Scalability: Well-defined workflows allow wiki to grow systematically without degrading quality or consistency.
Configuration Examples
Directory Structure Rules:
wiki/concepts/ # Technical concepts and methods
wiki/entities/ # People, organizations, tools
wiki/sources/ # Individual source summaries
raw/articles/ # Immutable source documents
Page Format Standards:
---
title: Page Title
category: entities|concepts|projects|sources
created: YYYY-MM-DD
updated: YYYY-MM-DD
tags: [lowercase-hyphenated-tags]
sources: [list-of-raw-source-paths]
confidence: high|medium|low
---
See also
- llm-wiki-pattern
- compounding-artifacts
- persistent-learning
- andrej-karpathy