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>
6.3 KiB
id, name, artifact_type, description, version
| id | name | artifact_type | description | version |
|---|---|---|---|---|
| vsm-framework | vsm_framework | content | Stafford Beer's Viable System Model reference for economic analysis | 1.0.0 |
Stafford Beer's Viable System Model (VSM)
The Viable System Model (VSM) is a model of the organisational structure of any autonomous system capable of producing itself. It was created by management cybernetician Stafford Beer in his books Brain of the Firm (1972) and The Heart of Enterprise (1979).
Core Principle: Viability
A viable system is any system organised in such a way as to meet the demands of surviving in a changing environment. One of the prime features of systems that survive is that they are adaptable. The VSM expresses a model for a viable system, which is an abstracted cybernetic description applicable to any organisation that is a going concern.
The Five Systems
System 1 (S1) — Operations
The primary activities that produce the organisation's purpose. These are the operational units that directly create value. Each operational element is itself a viable system (the principle of recursion).
In economic terms: Productive enterprises, factories, farms, workshops, individual labourers performing specialised tasks, merchant operations.
Key properties: Autonomy within constraints, self-organisation, direct engagement with the environment.
System 2 (S2) — Coordination
The information channels and bodies that allow the primary activities in System 1 to communicate with each other and that allow System 3 to monitor and coordinate activities. System 2 dampens oscillations and resolves conflicts between operational units.
In economic terms: Market price mechanisms, trade customs, standard weights and measures, commercial law, banking clearinghouses, trade guilds.
Key properties: Anti-oscillatory, dampening, scheduling, conflict resolution, standardisation.
System 3 (S3) — Control / Operational Management
The structures and controls that establish the rules, resources, rights, and responsibilities of System 1 and provide an interface between Systems 1 and Systems 4/5. System 3 represents the day-to-day control of the organisation. It optimises the internal environment.
In economic terms: Government regulation of trade, taxation policy, labour laws, enforcement of contracts, the "invisible hand" as emergent internal regulation, guilds and corporations governing members.
Key properties: Internal regulation, resource allocation, accountability, synergy extraction, performance management.
System 3* (S3*) — Audit / Monitoring
The audit and monitoring channel that allows System 3 to verify information coming from System 1 through channels other than those provided by System 2. System 3* provides sporadic, direct access to operational reality.
In economic terms: Market inspections, quality checks, auditing of accounts, surprise investigations into trade practices, verification of weights and measures.
Key properties: Sporadic direct investigation, reality checking, bypassing normal reporting channels.
System 4 (S4) — Intelligence / Adaptation
The bodies and processes that look outward to the environment to monitor how the organisation needs to adapt to remain viable. System 4 captures all relevant information about the outside-and-then environment. It is responsible for strategic responses.
In economic terms: Foreign intelligence about trade opportunities, market research, new technology adoption, colonial exploration and trade route development, understanding of foreign economic systems.
Key properties: Environmental scanning, future orientation, strategic planning, modelling, research and development.
System 5 (S5) — Policy / Identity
The policy-making body that balances demands from Systems 3 and 4 and defines the identity, values, and purpose of the organisation. System 5 provides closure to the whole system and represents its supreme authority.
In economic terms: Sovereign authority, constitutional principles governing economic policy, national economic identity, the philosophical foundations of economic systems (mercantilism vs. free trade), the overarching purpose of the commonwealth.
Key properties: Identity, ethos, supreme command, policy closure, balancing internal and external perspectives.
Key Concepts
Recursion
Every viable system contains and is contained in a viable system. The same five-system structure recurs at every level of organisation. A workshop is a viable system within a factory, which is a viable system within an industry, which is a viable system within a national economy.
Variety
A measure of the number of possible states of a system. The Law of Requisite Variety (Ashby's Law) states that only variety can absorb variety. A controller must have at least as much variety as the system it controls.
Requisite Variety
The principle that for effective regulation, the variety of the regulator must match the variety of the system being regulated. This is achieved through variety attenuation (reducing the variety coming up from operations) and variety amplification (increasing the variety of management's responses).
Attenuation and Amplification
Variety engineering mechanisms. Attenuation reduces variety (e.g., reporting summaries, statistical aggregation, standardisation). Amplification increases variety (e.g., delegation, empowerment, decentralisation).
Algedonic Signals
Emergency signals that bypass the normal management hierarchy to alert higher systems of critical situations requiring immediate attention. Named from the Greek words for pain (algos) and pleasure (hedone).
In economic terms: Market panics, famine signals, sudden price collapses, trade embargoes, economic crises that demand immediate sovereign intervention.
Autonomy
The degree of freedom granted to operational units (System 1) to self-organise within constraints set by System 3. Beer argued that maximum autonomy consistent with systemic cohesion yields maximum viability.
Viability
The capacity of a system to maintain a separate existence and survive in a changing environment. A viable system continuously adapts while maintaining its identity.