Progress Report on the Development of SWarp

SWARP is a living loom in which people, ideas, and systems weave together. Every thread — whether it concerns your knowledge, your family, your work, or your neighborhood — is connected to all the other threads. Locally, regionally, nationally, and internationally. Think of challenges in healthcare, education, the economy, and democracy.

This is a technical report covering 14-weeks (3 months) (29-1-2026 -7-5-2026) of “programming“.with Replit.

Be aware of the fact that the complete software-platform was build by one person (me) spending 1000 hours costing  €5.000 .

SWARP is the successor of Kays and Ayya and incorporates both.

J.konstapel , Leiden, 7-5-2026.

This blog (The Spiral Navigator, 12-3-2026 ) is the first mathematical analysis of the architecture of swarp.

This the second.

Swarp: Architecture as Verb

A Civic Intelligence Platform Built on Quaternion Geometry, Active Inference, and Case-Based Reasoning

J. Konstapel Constable Research B.V., Leiden May 2026


I. The Central Argument

Most civic technology is built around nouns. A user. A vote. A record. A service. The architecture follows: users are stored, votes are counted, records are retrieved, services are rendered. The result is a landscape of platforms that are individually coherent and collectively insufficient. Citizens can find their nearest polling station, submit a noise complaint, compare party positions on a twelve-point questionnaire, and join a neighbourhood forum. None of these actions connects to any other. The expectation that participation in one domain will inform or be informed by participation in another is structurally unmet — not because platform designers are careless, but because the architectures they use have no primitive for weaving.

Swarp is built around a verb. The Dutch word weven — to weave — is the first word in the platform’s own self-description: “SWARP is een levend weefgetouw waarin mensen, ideeën en systemen samen weven.” A living loom in which people, ideas, and systems weave together. The architectural unit is not the thread and not the tapestry, but the act of bringing one thread under another — repeatedly, across two axes, in such a way that what was disconnected becomes mutually constraining without being merged.

This essay argues that the loom metaphor is not decorative. It is the precise name for a mathematical and computational structure: a quaternion-octonion substrate carrying a scale axis through a Spatial Web infralayer, driven by Karl Friston’s Active Inference as its motor, woven with Alan Fiske’s four relational modes as its basic stitches, and gated by Roger Schank’s case-based reasoning as its throttle. Each of these components is independently well-grounded. The argument of this essay is that their combination, in the specific configuration Swarp instantiates, constitutes a genuinely new architectural primitive for civic software — one that the existing landscape of deliberation tools, identity platforms, and persona-matching systems does not contain.


II. The Problem: Expectation Failure Without Script Revision

In 1982, the cognitive scientist Roger Schank published Dynamic Memory, a theory of how human beings learn and remember. His central claim was that learning is not triggered by repetition but by expectation failure: the moment when what actually happens diverges from what the agent expected to happen. Successful experiences reinforce existing scripts silently. Failed expectations trigger retrieval of similar past failures, comparison, and — sometimes — a revision of the underlying script. Without that revision, the failure accumulates as residue: a stable, structural mistrust that is not anger but accumulated disappointment.

Schank was writing about individual cognition. The same pattern, applied at the scale of democratic citizenship, describes something that political scientists have been documenting for decades. Catherine De Vries’s empirical work on Euroscepticism demonstrates that citizen dissatisfaction with representative institutions is stable across economic cycles: it is not a reaction to specific failures but the accumulated residue of repeated mismatches between what citizens expected the political system to do and what it did, in the absence of any mechanism by which those mismatches feed back into revised expectations on either side. The citizen’s script for how democracy works is failing, repeatedly, without revision. The institution’s script for what citizens want is equally frozen.

The same pattern appears in healthcare, education, and the labour market. Every domain in which citizens interact with large institutions is, in Schank’s terms, a script-application engine without script revision. And the platforms built to mediate these interactions replicate the problem rather than address it: they capture votes, clicks, and form submissions without building any model of the generative process that produced them or any mechanism for feeding surprise back into the agent’s expectations.

This is the architectural gap that Swarp is designed to fill. The name for it, in the theoretical vocabulary the platform uses, is expectation failure without script revision. The loom is the missing structure that makes revision possible.


III. Why Existing Platforms Fall Short

Before describing what Swarp is, it is worth being precise about what it is not — and why the existing landscape of civic platforms, despite its sophistication and genuine achievements, leaves the core problem untouched.

Polis, developed by the team behind vTaiwan and deployed in participatory policy processes across several countries, clusters opinion vectors over a population and surfaces statements that bridge factions. Its strength is scale: thousands of participants can be summarised into an interpretable opinion topology in minutes. Its structural limitation is that it has no model of the individual participant beyond the vote vector. There is no representation of the script that produced a citizen’s agreement with a given statement, and therefore no mechanism by which their participation revises anything other than the population-level topology. Polis weaves the pattern of a crowd; it does not weave the individual.

SenseMaker, developed within the Cynefin tradition by Dave Snowden, asks citizens to self-signify short narratives along multi-dimensional axes, producing landscapes of meaning that are read by domain experts. Its ontology is richer than Polis’s: it treats stories as structured rather than as votes. But SenseMaker is a measurement instrument; the loop ends with the analyst reading the landscape. There is no per-user posterior, no update on subsequent contributions, no script revision mechanism. It is what Swarp would be if it stopped after profiling and never built a motor.

Decidim and Loomio are mature deliberation and decision-making platforms with active municipal use. Their strength is process: structured proposals, comments, votes, and resolutions. Their limitation, from the loom perspective, is that they treat the citizen as a role-bearer in a process rather than as a Bayesian agent with a profile that updates. A user’s history on Decidim is a list of actions, not a posterior distribution over their relational preferences. The loom’s per-layer per-domain Bayesian profile is what is missing.

Solid, Tim Berners-Lee’s decentralised data platform, provides architectures in which users own their data and can move it between services. It is a remarkable engineering achievement with respect to data sovereignty. But it has no cognitive layer; it is a storage-and-message-passing protocol, agnostic about what the data means or how it should be updated. Solid relocates where the expectation lives; it does not weave anything.

Voting advice applications — the Dutch Stemwijzer, the German Wahl-O-Mat, and their counterparts — produce a snapshot of ideological position from a questionnaire. The snapshot is static: there is no update from one election to the next, no representation of confidence, no mechanism by which observed political behaviour revises the model. They are, in Schank’s terms, script-application engines without script revision.

The pattern across all five is the same. Each addresses one register of one domain and treats the rest as exogenous. None weaves. The loom is the missing primitive.


IV. The Substrate: Why Quaternions

Beneath the loom is a mathematical substrate that determines how stitches at one scale relate to stitches at another, and how stitches in one domain compose with stitches in adjacent domains. The substrate is the quaternion algebra — the algebra of rotations in three-dimensional space — and its extension to octonions. This is a deliberate choice rather than an aesthetic one, and it is worth understanding why.

Quaternions were discovered by William Rowan Hamilton in 1843. They have four basis elements — the scalar unit and three imaginary units, conventionally written {1, i, j, k} — with the multiplication rule that each imaginary unit squares to minus one and the product of any two in sequence equals the third, with a sign that depends on the order. That last property — non-commutativity, the fact that i times j does not equal j times i — is the mathematically precise reason that order matters in rotational composition and, by extension, in the civic reasoning Swarp is designed to support.

A citizen’s relational stance on a housing policy at the neighbourhood level and their stance on the same policy at the national level are not two unrelated data points. They are two views of the same underlying orientation, related by a rotation through social and political space. Euler angles — the naive representation of such rotations — suffer from gimbal lock, a pathological loss of degrees of freedom when two rotation axes align. Quaternions are immune to gimbal lock. When the Spatial Web infralayer (described in the next section) carries a citizen’s profile up the scale axis from neighbourhood to province to national parliament, the lift is a quaternion composition: smooth, consistent, and reversible.

The octonion extension adds four further basis elements, for a total of eight, and introduces a further property: non-associativity. In an octonion algebra, a times (b times c) is not equal to (a times b) times c. This is the formal reason Swarp treats the path through the loom as architecturally distinct from the position on it. A citizen who voted for a progressive coalition, then joined a neighbourhood initiative, then attended a council meeting has arrived at a different place than a citizen who took the same three actions in a different order — even if both citizens end up with the same set of actions in their record. Non-associativity is what makes that distinction representable in the substrate rather than invisible to it.

This substrate is not user-facing. A citizen using Swarp will never encounter a quaternion. The substrate is what makes the user-facing surfaces commensurable across scales and domains; that is its only job, and its absence would make those surfaces incommensurable in ways no amount of interface design could repair.


V. The Scale Axis: The Spatial Web as Infralayer

The loom has two axes. The first is scale: the same civic challenge — housing, education, healthcare, democratic participation — appears differently at the neighbourhood level, the municipal level, the provincial level, the national level, and the European level. The same citizen shows up differently on each of these scales. A platform that organises civic life has to make scale-equivariance a first-class architectural property: a position taken at the neighbourhood level has to be recognisably the same position when read from a national vantage, and the relation between the two has to be computable rather than assumed.

The second axis is domain: the substantive areas that life forces citizens to navigate — care, education, economy, democracy, and dozens of finer-grained sub-domains beneath each. These domains are not categorical. A single citizen’s day connects them continuously: the child taken to school links education to family to mobility to local democracy. The loom has to allow stitches to cross domain boundaries without losing their content.

The scale axis is implemented in Swarp as the Spatial Web infralayer, built on the IEEE 2874-2025 standard — a recently ratified protocol stack that carries entities, relationships, and graph state as first-class citizens, with decentralised identifiers that are not bound to a server domain. The essential property this gives the platform is that a civic stance can be lifted through the scale axis — from neighbourhood to municipality to province to national parliament — without fragmenting into four unrelated copies and without losing the identity of the agent who holds it.

The practical entry point for this architecture is a postcode. The citizen enters four digits; a centralised resolver maps that postcode to a neighbourhood, a municipality, a province, and a region, and initialises a per-layer profile for each. The deprecated architecture — in which each functional thread of the platform maintained its own municipality field, creating eight parallel and inconsistent representations of the same citizen’s location — has been superseded by a single resolver that all threads share. That consolidation is not a cosmetic change; it is the physical realisation of taking the scale axis seriously rather than letting each thread approximate it independently.


VI. The Motor: Active Inference as Civic Dynamics

Once a substrate and a scale axis exist, the loom needs a motor — a mechanism that updates a citizen’s profile when new information arrives, and that drives the loom forward rather than leaving it static. The motor is Karl Friston’s Active Inference, more precisely the Free Energy Principle applied as a process theory.

The Free Energy Principle holds that all living systems — from single cells to social institutions — minimise long-term surprise by maintaining and continuously updating a generative model of their environment. The agent does not passively observe; it acts on the world to bring observations into alignment with its predictions, and it updates its predictions when observations resist that alignment. Friston’s 2010 paper in Nature Reviews Neuroscience is the canonical short statement; the 2022 textbook by Parr, Pezzulo, and Friston is the accessible development.

In Swarp, each citizen carries, for each scale layer and each domain, a Bayesian state: a four-dimensional vector over Fiske’s relational modes (described in the next section) and a scalar confidence weight. When the citizen acts in a way that registers in a given domain at a given scale — votes, joins an initiative, signs a petition, attends a council meeting — the system constructs an observation vector in the same space, weights it by the strength of the act, and updates the prior by a precision-weighted exponential moving average with a smoothing parameter of 0.85. The intuitive reading is straightforward: new evidence shifts the estimate by fifteen percent of the gap between the prior and the observation. A single anomalous act moves the profile but does not flip it; a sustained pattern of acts converges the profile to the new position within roughly twenty observations — approximately one political cycle of active municipal engagement.

Three properties of this update rule matter architecturally. It is responsive: sustained input converges within a political cycle. It is stable: a single outlier registers but does not dominate. And it is non-stationary by design: the exponential moving average is formally the correct update rule for a system in which the parameter being estimated is itself drifting over time — which a citizen’s convictions, over an adult life, certainly are.

The drift trajectories — the sequence of posterior states stored per citizen per layer per domain — are the operational consequence of taking the octonion substrate seriously. The path matters, not just the endpoint. A citizen who moved from communal to market-oriented preferences over a decade of municipal engagement is in a different place than a citizen who has oscillated between the two throughout that same period, even if both end up with similar current profiles. The trajectory is the record of the learning, and the system stores it.


VII. The Four Stitches: Fiske’s Relational Models

The motor (Active Inference) needs content to operate on. That content is supplied by Alan Fiske’s Relational Models Theory, which holds that all human social relations are constructed from four elementary modes, combined and instantiated according to local conventions.

The four modes are: Communal Sharing (CS), in which parties treat themselves as equivalent on some relevant dimension and distribute by need; Authority Ranking (AR), in which parties are ordered along a linear hierarchy and distribute by rank; Equality Matching (EM), in which parties maintain one-for-one balance and distribute by equal shares; and Market Pricing (MP), in which parties interact through ratio and price and distribute by exchange value.

Fiske’s 1992 paper in Psychological Review is the foundational statement; the 2004 volume edited by Nicholas Haslam is the mature cross-cultural defence. The claim — contested but empirically supported across dozens of societies — is that these four modes are exhaustive: every human social relation is composed from them, not merely resembling them. Fiske’s antagonist on cross-cultural transfer is Joseph Henrich, whose 2020 book The WEIRDest People in the World argues that models calibrated on Western populations require scrutiny before generalisation. This is a genuine limitation, acknowledged in the platform’s architecture and on its deployment roadmap.

In Swarp, the four modes are not categories of people; they are the four basic stitches with which any social relation is woven. A family contains all four: communal sharing at the dinner table, authority ranking in parental decisions, equality matching in the rotation of household chores, market pricing when allowance is involved. A neighbourhood initiative contains all four. A national political stance contains all four. The Fiske vector assigned to a citizen is therefore not a type but a mix — the proportions in which they tend to employ each stitch in a given domain at a given scale.

The mapping onto the quaternion substrate is not coincidental. The four basis quaternions map exactly onto the four Fiske modes, with Communal Sharing as the identity (the unmarked, default mode — the mode in which an infant relates to its primary caregiver before any other relational competence has developed) and the three imaginary units as the three orthogonal rotations that generate the full space of relational stances by composition. Two consequences follow immediately.

First, the non-commutativity of quaternion multiplication corresponds exactly to the empirical observation that the same two relational stitches in opposite order produce different social fabrics — a property that flat-vector psychometrics systematically misses. An encounter that begins with market pricing and ends with communal sharing is a different social event than one that begins with communal sharing and ends with market pricing, even if the two modes are equally present in both.

Second, the rotation-composition law of quaternions is what allows the scale axis to carry a Fiske profile from neighbourhood to nation without arbitrary parameter choices: the lift is the composition, and the composition law is given by the algebra.

This mapping is also what justifies the choice against a left-right political axis or a two-dimensional Nolan chart. Those axes flatten quaternion structure into a vector space with no rotational composition, losing precisely the property that makes the stitches building units of the loom rather than labels on a chart. They are post-hoc summaries of the historical positions of European parties and become incoherent outside that context. Fiske’s modes have cross-cultural ethnographic and laboratory support, and they map onto political positions not by translating “left” and “right” but by reading off how a given party characteristically organises distribution — which produces a four-vector per party with empirical content against which a four-vector per citizen can be compared by cosine similarity.


VIII. The Throttle: Schank’s Case-Based Reasoning

The motor (Active Inference) supplies the dynamics; the four stitches (Fiske) supply the content; the substrate supplies the composition law. What remains is the rule by which a new stitch finds its position on the loom. Without such a rule, the system would either update on every observation — overfitting noise — or update on a fixed schedule — losing signal. The rule is supplied by Roger Schank’s Case-Based Reasoning.

Schank’s central claim, developed across Scripts, Plans, Goals and Understanding (with Robert Abelson, 1977) and Dynamic Memory (1982), is that human memory organises experience around scripts and their abstractions, and that learning is triggered not by repetition but by expectation failure. A new observation that fits the script reinforces it silently. A new observation that fails the script triggers retrieval of similar past failures, comparison, and a candidate revision.

In Swarp, the case-based machinery sits across the loom rather than under it. Every domain has a case library: stored stitches, indexed by their Fiske-and-context fingerprint. When a new observation arrives, the system retrieves cases whose fingerprint resembles the current context, asks whether those cases’ scripts predict the new observation, and triggers the Active Inference update only if there is a script-level mismatch. The update is not continuous and undiscriminating; it is gated by surprise. This is what makes Swarp a learning surface rather than a recommendation surface. A recommendation surface surfaces what the user already tends toward; a learning surface surfaces what productively violates the user’s existing scripts.

In Bayesian terms, the Schankian gate is a form of active sampling: the agent prefers observations that are informative precisely because they violate prediction. The civic analogue is a piece of content, a council decision, or a neighbourhood initiative that diverges from the citizen’s existing relational profile in a way that is not random noise but structured surprise — the kind that, in Schank’s model, triggers retrieval, comparison, and revision.

The three frameworks therefore cohere as a single mechanism: Friston is the engine, Fiske is the fuel, Schank is the throttle. The substrate is the chassis on which all three are mounted, and the scale axis is the road they travel.


IX. The Surface: Thirteen Threads on the Loom

The sections above describe the loom. What citizens actually see is something different: thirteen labelled threads, each a vertical slice through the loom that emphasises particular domains, scales, and case libraries. The threads are named — AYYA360 (lifespan guidance), Politiek (civic and political engagement), Werk (professional and freelance tools), Kids (children’s education and family management), Academie (academic and intellectual content), PoC (organisational change methods), Zingeving (meaning and spirituality), Gezond (health and wellbeing), Atelier (creative work), Hobby, Thuis (home management), Lab (research and experimentation), and Community.

These threads are product entry points, not architectural units. They can be renamed, regrouped, or merged without disturbing anything in the substrate, the scale axis, the motor, the stitches, or the throttle. A reader who treats the thirteen threads as the architectural inventory of Swarp will systematically miss what the platform is. The threads are how citizens enter the city; they are not the city.

Earlier accounts of the platform — including the first version of the development report from which this essay draws — devoted disproportionate attention to the political thread, because that thread has the most developed mathematical apparatus and the most visible civic ambition. The present account corrects that emphasis. The Personal Political Profile is a useful worked example of the full loom stack made concrete; it is one thread among thirteen, and the same quaternion-Fiske-Friston-Schank stack also carries the health thread, the education thread, the work thread, and the others.

Five architectural decisions govern how the threads sit on top of the loom. The platform uses loosely coupled sub-applications rather than a monolith or a microservices architecture, so that each thread has its own schema and routes but shares the database and process — buying modularity without operational complexity. It uses the IEEE 2874 Spatial Web standard rather than ActivityPub for identity and federation, because the platform needs to carry typed, signed state rather than a stream of activities. It uses PostgreSQL with a type-safe ORM rather than a graph database, because the bulk of queries are vector arithmetic and time-series reads that relational databases serve natively. It uses Fiske space rather than a political axis for reasons already argued. And it uses a commercial large language model as the orchestration layer, a pragmatic choice in May 2026 that the architecture is structured to make reversible when competitive alternatives mature.


X. What the System Says About Itself

The most unusual feature of Swarp’s development report is its empirical instrument: a spectral analysis of the platform’s own lexicon. The common vocabulary — 304 active concepts across 33 domains, connected by 1,088 semantic edges — is itself a graph. The production engine treats it as one on every request for Markov-guided navigation. Running the random walk’s spectrum is therefore not a model of the system from outside; it is the system describing its own shape.

Three conclusions emerge from the spectrum, each mapping back onto an architectural claim made in earlier sections.

The lexicon has eleven connected components — a giant of 232 concepts and ten smaller satellites. This is the spectral fingerprint of the loosely coupled architecture: the threads keep their internal vocabularies distinct, and bridges between threads are built deliberately rather than emerging from topology. The design intention is confirmed by measurement.

Within the giant component, the spectral gap — the distance between the largest and second-largest eigenvalue — is 0.025, implying a mixing time of approximately forty steps. A learner navigating the lexicon needs roughly forty concept-hops before the path loses its thematic coherence and collapses onto the global stationary distribution. Paths of five to seven concepts — the typical depth of a Markov-guided suggestion sequence — preserve coherence. This is the right shape for a learning surface, not an information-retrieval surface. A search engine wants a large spectral gap so that answers are always close to queries; a learning surface wants a small spectral gap so that users can travel meaningfully through neighbourhoods of related concepts.

The spectrum carries substantial negative eigenvalues, which are the signature of near-bipartite structure. The eigenvectors associated with these eigenvalues separate concepts of theoretical foundation — Free Energy, Surprisal, Active Inference, Markov Blanket — from concepts of operational deployment — Marketplace, Consent, Coach, Health Diagnosis. This is the theory-practice axis that the loom has to weave across. The fact that the tension is visible in the spectrum but does not fragment the giant into two disconnected components means the bridges between theory and practice — the cross-thread translations, the AIDEN meta-agent — are doing their structural job.

The five concepts with the highest stationary probability in the random walk are, in order: TOA-Triade (the individual cognitive integration), Marketplace, AIDEN (the meta-cognitive agent), Oscillation, and Consent. A long random walk through the lexicon spends disproportionate time in the orbit of these five. They represent, respectively, the individual scale, the relational-economic scale, the meta-cognitive scale, the temporal substrate, and the collective governance scale. The four scales the architecture is organised around are precisely the four scales the spectrum makes heaviest. The vocabulary and the architecture were built by the same hand, so this is internal consistency rather than independent confirmation — but it is the kind of internal consistency one wants: the gravity of the vocabulary lands where the loom says it should.


XI. Epistemological Commitments

Swarp uses, as priors over its Bayesian profiles, parameters derived from interpretive systems whose epistemological status is contested: Human Design, Paths of Change, the Wu Xing element scheme, the RIASEC vocational typology. RIASEC has substantial empirical support in vocational psychology; the others do not, by the standards of peer-reviewed behavioural science.

The platform’s response to this is not to assert these systems as truths but to treat them as priors in the strict Bayesian sense — generative models of initial estimate, with explicit confidence weights and explicit posterior update. A prior enters the architecture with a confidence weight that quantifies how strongly it will be displaced by observation. After approximately five politically or professionally meaningful observations, the contribution of any prior to the posterior falls below five percent. The prior earns its keep or it does not; the epistemological commitment is that its predictive performance on held-out first observations should exceed the uniform prior baseline. As of May 2026 this validation has not been published; internal evidence suggests that Human Design-derived priors perform above baseline on two of the four Fiske axes and at baseline on the other two.

This is structurally different from mainstream profiling systems, which make implicit epistemological claims buried in code and inaccessible to the user. Swarp’s framework makes the claim explicit, attaches a number to it, updates it on observation, and exposes the update trajectory to the user. The user is not protected from being modelled — they are inevitably modelled — but they are protected from being modelled silently and from being modelled stably.

A second epistemological commitment is the platform’s “no dead-end text” rule: every semantic token in the user interface must link through to a detailed view explaining the term, its provenance, its current confidence weight in the user’s profile, and the chain of evidence that produced it. This is the interface expression of the Bayesian framing: every number has a story, and the story is accessible.


XII. State of the Work and What Comes Next

A development report should be candid about what is finished, what is provisional, and what remains to be done. Several pieces of the architecture are present in design and schema but not yet exercised at scale. The Solid pod integration is implemented but tested with only a handful of pilot users. The Spatial Web tables are populated with a small fraction of the entities the production system maintains. The octonion-level path-dependent retrieval — the mechanism that makes trajectory architecturally distinct from position — is implemented in only one of the thirteen threads.

Several choices are pragmatic and known to be pragmatic. The smoothing parameter of 0.85 is a global design choice rather than a per-user fit. The orchestration language model is a commercial system rather than a self-hosted one. The platform runs on a single vendor’s infrastructure because the team is two people and that is the appropriate trade-off at this stage.

The structural debt is visible. A legacy schema continues alongside the long-term target of a unified schema; the migration is the largest piece of structural work on the immediate horizon. Deprecated shadow columns scattered across schemas are still readable and are being replaced incrementally rather than dropped.

The next four months are likely to be dominated by completion rather than new architecture: the schema migration, the dropping of deprecated columns, the extension of path-dependent retrieval across all thirteen threads, and the thickening of the Spatial Web tables to the point where they are the primary store rather than a secondary projection. A first wave of deployments outside the Netherlands will test whether Fiske’s relational primitives and Schank’s script content travel across cultural contexts — Fiske’s claim of cross-cultural exhaustiveness is defended but contested for collectivist and honour-based cultures, and the only honest way to find out is to run the system somewhere it has not been run.


XIII. Conclusion

The architectural argument of this essay can be stated in one paragraph. Citizens in established democracies — and in every other domain where individuals interact with large institutions — accumulate structural mistrust not from anger but from repeated expectation failure without script revision. The platforms built to mediate these interactions replicate the problem: they address one register of one domain and treat the others as exogenous, they produce snapshots rather than posteriors, and they have no mechanism for learning from the gap between expectation and outcome. The loom is the missing primitive. A quaternion-octonion substrate carries the scale axis through a Spatial Web infralayer; Active Inference drives the schietspoel of the loom over four basic Fiske stitches; a Schankian case-based gate decides when the schietspoel moves. The thirteen user-visible threads are surfaces on this loom, not building blocks of it.

What this essay has not done is claim that the loom, so wired, will measurably reduce democratic expectation failure in any meaningful population. That is not a claim an architectural essay can make. It is a claim the architecture is now instrumented to test, and the next four months will begin to.


Annotated References

The references below are grouped by the section of the essay in which they first do substantial work. Each entry states what the source delivers, where it is weak, and how it connects to the others. This is a reader’s guide, not merely a bibliography.


On expectation failure, script theory, and democratic dysfunction

Schank, R. C. (1982). Dynamic Memory: A Theory of Reminding and Learning in Computers and People. Cambridge University Press.

The most important single source for this essay. Chapters 2–4 introduce scripts, Memory Organisation Packets (MOPs), and the central insight that learning is triggered by expectation failure rather than repetition. Chapter 7 develops the case-based reasoning approach that became the foundation of modern recommendation systems — and the basis of Swarp’s gating mechanism. Pair with Schank & Abelson (1977) for the original script theory and with Kolodner (1993) for the formal CBR development. Schank’s later popular work (Tell Me a Story, 1990) is more accessible but less rigorous.

Schank, R. C., & Abelson, R. P. (1977). Scripts, Plans, Goals and Understanding: An Inquiry into Human Knowledge Structures. Erlbaum.

The founding text of script theory. The book establishes the vocabulary — script, plan, goal, theme — that Dynamic Memory then extends. Essential background for understanding why Swarp treats civic interaction as script-governed rather than as preference-expression.

Kolodner, J. L. (1993). Case-Based Reasoning. Morgan Kaufmann.

The formal development of the CBR approach Schank introduced. More rigorous and systematic than Schank’s own presentations; the reader who wants the algorithmic machinery should come here after Dynamic Memory. The indexing and retrieval mechanisms in Part II are directly relevant to how Swarp’s case libraries are organised.

De Vries, C. E. (2018). Euroscepticism and the Future of European Integration. Oxford University Press.

The empirical anchor for the claim that citizen dissatisfaction with representative institutions is structural rather than incidental. Chapter 2 establishes the benchmark theory of EU support; chapter 5 documents how the resulting dissatisfaction is stable across economic cycles. Read alongside Foa & Mounk (2017, Journal of Democracy) for the global cross-section, and Crouch (2004, Post-Democracy) for the historical depth.

Foa, R. S., & Mounk, Y. (2017). The signs of deconsolidation. Journal of Democracy, 28(1), 5–15.

A short, widely cited empirical paper documenting declining support for democratic institutions across Western democracies, particularly among younger cohorts. Provides cross-national data that contextualises the Dutch case De Vries documents. The reader who finds the argument exaggerated should read Norris & Inglehart (2019, Cultural Backlash) for the counter-argument.


On Active Inference and the Free Energy Principle

Friston, K. (2010). The free-energy principle: a unified brain theory? Nature Reviews Neuroscience, 11(2), 127–138.

The canonical short statement of the Free Energy Principle. Pages 127–129 give the core formulation; pages 130–134 sketch the relation to existing theories of perception, action, and learning. Notoriously dense; the reader new to variational inference should begin with the textbook below. The sentence that matters most for Swarp is on page 129: agents minimise long-term surprise by maintaining and updating a generative model.

Parr, T., Pezzulo, G., & Friston, K. (2022). Active Inference: The Free Energy Principle in Mind, Brain, and Behavior. MIT Press.

The textbook the field needed. Chapters 1–4 are the conceptual development; chapters 5–8 are the formal machinery with worked examples. Read this before the 2010 paper — it makes the latter intelligible. Open-access from the MIT Press Direct platform.

Friston, K., FitzGerald, T., Rigoli, F., Schwartenbeck, P., & Pezzulo, G. (2017). Active inference: a process theory. Neural Computation, 29(1), 1–49.

The paper that establishes Active Inference as a process-level theory rather than only a normative one. Section 3 (pages 13–22, on epistemic versus pragmatic value) justifies, by analogy, why a civic platform should prefer to surface content that violates the user’s expectations rather than content that confirms them. This is the formal cousin of Schank’s expectation-failure trigger.

Hyndman, R. J., & Athanasopoulos, G. (2021). Forecasting: Principles and Practice (3rd ed.). OTexts. https://otexts.com/fpp3/

Open-access and indispensable. Section 8.1 is the formal treatment of exponential smoothing and the connection to the random-walk model that justifies the EMA update rule Swarp uses. Section 8.4 (state space models) is what the Swarp Bayesian profile would converge to if fully generalised. The platform’s smoothing parameter of 0.85 is, formally, a discount factor in the West–Harrison sense.


On Relational Models Theory

Fiske, A. P. (1992). The four elementary forms of sociality: framework for a unified theory of social relations. Psychological Review, 99(4), 689–723.

The paper on which the entire relational architecture of Swarp rests. Pages 689–693 lay out the four primitives; pages 694–710 show how they combine to produce the apparent diversity of social arrangements; pages 711–723 anticipate and answer objections. The reader who finds the four-mode classification unsatisfying should read those last twelve pages before concluding.

Fiske, A. P. (2004). Four modes of constituting relationships. In N. Haslam (Ed.), Relational Models Theory: A Contemporary Overview (pp. 61–146). Erlbaum.

The mature statement, twelve years after the Psychological Review paper. Chapter 2 of the volume is the cross-cultural defence; chapter 4 by Haslam situates the theory in the broader social-psychological landscape. The best single-volume introduction.

Henrich, J. (2020). The WEIRDest People in the World: How the West Became Psychologically Peculiar and Particularly Prosperous. Farrar, Straus and Giroux.

The friendly antagonist. Chapter 9 is directly relevant: Henrich’s argument that Western, Educated, Industrialised, Rich, Democratic populations have unusual psychology has implications for any model — including Fiske’s — calibrated on Western data. Take this seriously before claiming that any Fiske-based platform generalises beyond its calibration culture. Swarp acknowledges this on its deployment roadmap.

Tomasello, M. (2019). Becoming Human: A Theory of Ontogeny. Harvard University Press.

For the reader who wants to see how Fiske’s primitives connect to developmental psychology. Tomasello’s chapters on shared intentionality and joint commitment provide a developmental account of how children acquire relational competence in CS-, AR-, and EM-like patterns. Market pricing comes later and is more culturally constructed — a finding with implications for the platform’s Kids thread.


On quaternion and octonion mathematics

Hamilton, W. R. (1844). On quaternions; or on a new system of imaginaries in algebra. Philosophical Magazine, 25(3), 489–495.

The founding paper. Not required reading for understanding Swarp, but worth knowing as the origin of the algebraic structure the platform uses as its substrate. Hamilton’s own account of the discovery — he scratched the multiplication rules into a bridge in Dublin — is one of the more vivid moments in the history of mathematics.

Baez, J. C. (2002). The octonions. Bulletin of the American Mathematical Society, 39(2), 145–205.

The definitive modern survey. Long and mathematically demanding, but the introduction and section 1 are accessible and provide the conceptual grounding for the non-associativity that Swarp uses to distinguish path from position. The reader who wants the physical applications of octonions should continue to Baez & Huerta (2010, Scientific American).


On the Spatial Web and federated identity

IEEE 2874-2025. Standard for Spatial Web Protocol, Architecture and Governance. IEEE Standards Association. https://standards.ieee.org/ieee/2874/

Recently ratified and still small in deployment. Read the standard alongside the Spatial Web Foundation’s white papers (https://spatialwebfoundation.org/) for the conceptual framing. The honest question for Swarp’s federation roadmap is whether IEEE 2874 will achieve the network effect that ActivityPub already has. The answer is currently uncertain, and this is the principal risk of the platform’s long-term identity architecture.

W3C (2018). ActivityPub. W3C Recommendation. https://www.w3.org/TR/activitypub/

The protocol specification for the federated social web. Indispensable for understanding what ActivityPub does and does not provide. Read sections 4–6 and then ask, of any platform proposed to be built on ActivityPub, what aspects of the domain are already in the JSON-LD vocabulary. For civic profile state the answer is “almost none”, which is the argument for IEEE 2874.

Sambra, A. V., Mansour, E., Hawke, S., Zereba, M., Greco, N., Ghanem, A., Zagidulin, D., Aboulnaga, A., & Berners-Lee, T. (2016). Solid: a platform for decentralized social applications based on linked data. MIT CSAIL & Qatar Computing Research Institute Technical Report.

The original Solid statement. The current normative reference is the Solid Protocol Specification at https://solidproject.org/TR/protocol. Read both: the technical report for the why, the specification for the what. Berners-Lee’s 2018 blog post at Inrupt provides the non-technical civic case.


On civic deliberation platforms

Small, C., Bjorkegren, M., Erkkilä, T., Shaw, L., & Megill, C. (2021). Polis: scaling deliberation by mapping high-dimensional opinion spaces. Recerca: Revista de Pensament i Anàlisi, 26(2).

The most explicit technical statement of how Polis works. Read alongside the vTaiwan case study (Hsiao et al., 2018, SocArXiv) for the deployment side. Section 3 of the technical paper makes clear why Polis cannot, by design, model the individual participant.

Snowden, D. (2020). Cynefin: Weaving Sense-Making into the Fabric of Our World. Cognitive Edge.

Long, idiosyncratic, occasionally polemical, and necessary. Chapters 12 (SenseMaker) and 3–4 (the Cynefin framework) are the relevant ones. Snowden’s commitment to participant-anchored signification is genuinely original, even where one disagrees with its implications.

Calleja-López, A., Aragón, P., Barandiaran, X., Linares, J., Romero, C., & Pereira, A. (2018). Decidim: redes políticas y tecnopolíticas para la democracia participativa. Universitat Oberta de Catalunya.

The architectural and ideological account of Decidim by its principal authors. Spanish-only; for English, see the Decidim platform documentation at https://docs.decidim.org/. The crucial reading is the section on what Decidim deliberately does not model about participants — and why.

Smith, R. (2017). Loomio and the problem of deliberation at scale. Loomio Cooperative Handbook.

Useful because Loomio is built for small-group rather than mass-scale deliberation, and its architectural choices reflect that explicitly. Loomio makes the opposite trade-off from Polis-style aggregation and pays the corresponding price. A useful triangulation point.


On political profiling and dark patterns

Mathur, A., Acar, G., Friedman, M. J., Lucherini, E., Mayer, J., Chetty, M., & Narayanan, A. (2019). Dark patterns at scale: findings from a crawl of 11K shopping websites. Proceedings of the ACM on Human-Computer Interaction, 3(CSCW), 81.

The empirical basis for the claim that mainstream profile-based platforms operate by extraction rather than legibility. Section 4 documents patterns that work specifically against user understanding of what is being modelled. Read alongside Brignull’s Deceptive Design taxonomy for the practitioner vocabulary.

Holland, J. L. (1997). Making Vocational Choices: A Theory of Vocational Personalities and Work Environments (3rd ed.). Psychological Assessment Resources.

The empirical foundation for RIASEC, the only one of Swarp’s profile priors with strong peer-reviewed psychometric support. Chapter 4 is the methodological core. The meta-analytic case is in Nye, Su, Rounds, & Drasgow (2012, Perspectives on Psychological Science).


On spectral graph theory and the Markov analysis

Chung, F. R. K. (1997). Spectral Graph Theory. American Mathematical Society.

The standard reference. Chapter 1 establishes the connection between the spectrum of the normalised Laplacian and the mixing time of random walks; chapter 2 covers bipartite structure and the interpretation of negative eigenvalues. The reader who wants to understand why the spectral gap of 0.025 implies a mixing time of forty steps should read the relevant sections of this book.

Levin, D. A., Peres, Y., & Wilmer, E. L. (2009). Markov Chains and Mixing Times. American Mathematical Society.

The more modern and accessible treatment. Chapter 12 (the spectral profile) and chapter 13 (the comparison method) are the relevant ones. Open-access second edition available at https://pages.uoregon.edu/dlevin/MARKOV/.


On interpretive systems used as priors

Parkyn, C. (2009). Understanding Human Design. Hierophant Publishing.

The most usable layperson introduction to the Human Design system. Read with the epistemological framing of section XI of this essay firmly in mind: this is a source of priors, not of truths. The platform’s internal evidence suggests that HD-derived priors perform above the uniform-prior baseline on two of the four Fiske axes and at baseline on the other two.

Beck, D. E., & Cowan, C. C. (1996). Spiral Dynamics: Mastering Values, Leadership, and Change. Blackwell.

The empirical foundation for the colour-stage model used in Swarp’s spirituality profile. Beck and Cowan adapted Clare Graves’s biopsychosocial model into the familiar coloured-stages presentation. Critical reception is mixed; the reader who wants the methodological caution should consult Wilber (2000, A Theory of Everything).

Maciocia, G. (2015). The Foundations of Chinese Medicine (3rd ed.). Elsevier.

The standard reference for the Wu Xing (Five Elements) framework. Approached as a prior rather than as a metaphysics, this material is among the most internally consistent of Swarp’s prior systems. Whether the prior earns its keep against the uniform baseline remains an empirical matter, as stated in section XI.


On the operational stack

Newman, S. (2021). Building Microservices (2nd ed.). O’Reilly.

The standard reference on distributed systems architecture. Chapters 1–3 give the conceptual case for and against microservices; chapter 17 (operating microservices) is essential reading for anyone tempted to recommend a fully distributed architecture for a small-team civic platform. Swarp’s loosely coupled sub-application architecture is explicitly designed to capture most of the modularity benefit at none of the operational cost of true microservices.

West, M., & Harrison, J. (1997). Bayesian Forecasting and Dynamic Models (2nd ed.). Springer.

The deep treatment of Bayesian state-space machinery. The platform’s smoothing parameter of 0.85 is, formally, a discount factor in the West–Harrison sense. The per-user fitting of this parameter — currently global, flagged as a known limitation — maps onto the discount-factor learning problem in chapter 6.


This essay draws on the Swarp codebase as deployed in May 2026, on the Swarp Agora corpus of 927 essays by J. Konstapel (blog_posts table, constable.blog provenance), and on the technical development report “Het Weefgetouw: Swarp as Architecture-as-Verb” (May 2026). Specific route and schema references can be cross-checked against the production codebase at shared/schema/spatial-web.ts, server/routes/persoonlijke-politiek-profiel.ts, and server/markov-engine.ts.