From forge
Facilitates Residuality Theory sessions — Barry O'Reilly's methodology for arriving at software architectures that survive unpredicted stress through random simulation. Use when designing architecture from scratch, stress-testing an existing architecture, discovering hidden coupling, preparing for production, exploring how a system will survive in a changing business environment, or discussing stressors, residues, attractors, criticality, or contagion analysis.
npx claudepluginhub caiokf/forgeThis skill uses the workspace's default tool permissions.
This skill provides knowledge and facilitation guidance for Residuality Theory sessions — a methodology developed by Barry O'Reilly that uses random simulation of stress to produce software architectures capable of surviving unanticipated changes in complex business environments.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Share bugs, ideas, or general feedback.
This skill provides knowledge and facilitation guidance for Residuality Theory sessions — a methodology developed by Barry O'Reilly that uses random simulation of stress to produce software architectures capable of surviving unanticipated changes in complex business environments.
This skill should be used when:
Residuality Theory rests on a counter-intuitive claim: random simulation of stress produces better architectures than prediction, requirements analysis, reuse of patterns, or reactive change management.
Software operates in hyperliminal environments — complicated, ordered software executing inside complex, disordered business contexts. The business context is non-ergodic: its future cannot be predicted from its past. Traditional engineering methods (requirements, risk, patterns) were imported from disciplines where the environment is stable. In software, they lead to under-engineering, over-engineering, or both.
The goal of the architect is criticality — the right balance of structure that allows the system to survive unknown stressors — not correctness.
| Concept | Definition |
|---|---|
| Stressor | Any fact about the context currently unknown to you. NOT just a failure mode. Includes business changes, regulatory shifts, conceptual breakdowns, market moves. |
| Attractor | A recurring state that a complex system returns to. Business systems shift between attractors over time. The number of attractors is orders of magnitude smaller than the number of possible stressors. |
| Residue | What is left over of the architecture after it is exposed to a stressor. The fundamental unit of software architecture. Each residue describes changes needed for the architecture to survive in a given attractor. |
| Naïve architecture | The simplest architecture that solves the stated problem. The starting point — intentionally simple, not pattern-loaded. |
| Residual architecture | The integrated collection of all residues, compressed into a single coherent architecture. |
| Criticality | The point where the architecture begins to survive stressors it was NOT designed for. Indicated by "looping" — new stressors are already survived by existing residues or combinations of residues. |
| Hyperliminal coupling | Invisible coupling between components that is only revealed when the system is stressed. Causes contagion — errors that ripple across component boundaries. |
| Contagion | How stress spreads through the system. Analyzed using incidence matrices. |
| NKP | N = number of nodes/components, K = number of links between them, P = bias/predictability of node behavior. Criticality is finding the right balance. |
| Residual Index (Ri) | Empirical measure: Ri = (Y - X) / S, where Y = stressors survived by residual architecture, X = stressors survived by naïve architecture, S = total stressors. Ri > 0 = improvement. |
This distinction is critical. Do not conflate stressors with traditional concepts:
| Concept | Why It Differs from Stressors |
|---|---|
| Requirements | Snapshot of one stakeholder's model at one moment. Subject to change. |
| Risks | Require assigned probability and impact — numbers that are usually just opinions. |
| Scenarios | Limited to what stakeholders think is likely. Lack lateral thinking. |
| Edge cases | Assume the current abstraction is correct and anomalies are at the edges. |
| Chaos engineering | Tests running production infrastructure. Linear, concrete, not accessible at design time. |
| Resilience | About returning to the same attractor. Residuality is about transitioning between attractors. |
Stressor rules:
Understand or define the simplest architecture that solves the stated problem. This is the starting point — it should be intentionally simple. If working with an existing system, describe its current state as the naïve architecture.
Map the movement of data between actors in the system. Actors can be people, groups, companies, or software components. Describe the system as a network of flows, NOT as processes or use cases. Flow analysis avoids the trap of decomposition by process steps.
The core of the session. Randomly simulate the business environment by generating stressors — things that could happen that have not been considered. Work through:
For each stressor, identify:
Continue until criticality indicators appear:
Build an incidence matrix: components as columns, stressors as rows. Place 1 where a stressor affects a component, 0 where it does not. Analyze using the seven triggers:
Use the matrix to optimize N, K, and P toward criticality.
Compress all residues into a single coherent architecture. Apply FMEA (Failure Mode Effects Analysis) and ATAM (Architecture Trade-off Analysis Method) as final engineering checks. The residual architecture should make it easy for the software to move between residues as the business context shifts between attractors.
Build a residual incidence matrix — the same stressors against the new components — to verify that mean vulnerability has decreased. Comparing the naïve matrix (Phase 4) with the residual matrix demonstrates the K reduction visually.
Generate a NEW list of stressors never used in the analysis. Apply them to both the naïve and residual architectures. Count survivors using strict binary Yes/No — no "Maybe" or partial answers. Calculate the Residual Index:
Ri = (Y - X) / S where -1 ≤ Ri ≤ 1
Ri > 0 indicates positive movement toward criticality.
Generate a markdown document using templates/residuality-analysis.md containing:
| File | Content |
|---|---|
references/facilitator-prompts.md | Detailed facilitator prompts for each session phase |
references/core-theory.md | Deeper theory: Kauffman networks, attractors, NKP, architectural walking |
templates/residuality-analysis.md | Output template for the analysis artifact |