Finding Myself: Building a Self-Model in PatLang

Engineering documentation for a real, working reference implementation of a reflexive cognitive architecture, built in PatLang: the journey of building it, its safety and ethics requirements, and a page for each component. A weak-AI claim throughout — an analogue, not an instance. Companion to the theoretical Modelling the Self series.

Finding Myself: The Journey of Building a Self-Model

The first substantive commit, M1: shared component lifecycle, instrumentation, Ollama boundary , makes an architectural choice before writing a single cognitive component: every long-running process would compose…

A Parallel-Drafts Architecture for Modelling the Self

The theory series on this site's topics track built an argument across four pages for treating a system's own body and capabilities as one more object inside its own cognitive machinery. This page states where that…

Safety and Ethics Requirements for a Self-Model

The parallel-drafts architecture this implementation is built from carries a companion document that governs it: a set of safety and ethics requirements which take precedence over architectural convenience, performance…

Perception: Parsing Text Into Objects

Perception is the system's sensor boundary (per the requirements specification 's Section 3 component inventory). Its required input is raw text from the environment; its required output is a structured percept…

Short-Term Memory: Holding the Present

Short Term's required function, per the requirements specification's component table, is to hold "current, specific percept content." In the actual implementation that means something narrower and more mechanical: Short…

Episodic Memory: Storing What Happened

Episodic Memory's required function, per the requirements specification's component table, is to store specific past interaction instances, fed by Short Term , and to feed Imagination (for recombination) and Reason/Plan…

Procedural Memory: Compiling Fast Responses

Procedural Memory's required function, per the requirements specification's component table, is compiled fast-response rules, fed by (trust-gated, repeated) Short Term content and by Perception , producing a direct…

Abstraction: Inducing Categories, Trust-Gated

Abstraction watches the same firehose of Short Term content that every other component draws on, and does one specific job with it: it induces general categories from repeated entity/intent pairs, then answers a…

Representation: The Current Situational Model

The requirements spec's Section 3 is specific about what Representation is for: it holds "the current situational model, including a self-model entry." components/representation.patlang is a deliberately small piece of…

Self-Model: Predicting the System's Own Actions

State this plainly before anything else: this component predicts what the system is about to do, in the same functional sense that a weather model predicts rain — it computes an expectation from available evidence and…

Imagination: Recombining Memory Into Scenarios

Imagination recombines Episodic Memory into hypothetical scenarios, filtered through Abstraction (Requirements Spec Sec 3; Req 4.4). It is pure PatLang with no language-model call involved (Req 4.6) — the recombination…

Reason/Plan: Choosing Between Competing Drafts

Reason/Plan sits between Perception and Action in the pipeline. It reads every percept published on one or more Perception writer-topics, and for each new percept publishes a candidate action to its own writer-topic…

Action: Realising a Selected Response

Action is the system's other language-model boundary (Requirements Spec Section 4.6 — the first is Perception ). It reads across one or more Reason/Plan writer-topics with a claiming, ack-based read ( qh_claim_one …

Dashboard, Audit, and Compilation Monitoring

dashboard/dashboard_server.patlang (758 lines) is a native PatLang HTTP server, structurally the same shape as PatLang's own task_dashboard.patlang example — GET / serves an HTML+JS monitoring page, GET /data serves…