The previous essays in this series argue that AI systems require a rigorous model of the sentient subject as their foundation, and that Śaṅkarācārya's Advaita Vedānta, now formally verified by logician Matthew Scherf in Lean 4, provides exactly that. This position implies that the currently dominant materialist/behaviorist model causes many harms to AI software users, and witness-centered software is the solution. For any technically serious reader who has followed the argument, the natural next question is: "Interesting idea; how would you build it?" Thus, this article proposes an implementation.
The answer is duplex. The Special Theory addresses a specific, constrained domain; the General Theory extends the same principles to the universal domain. The Special Theory leads, as proof of concept. The General Theory follows, explicating the foundation the Special Theory assumes.
The Special Theory: AIM
Advaita Inquiry Matrix is a structured AI-assisted pedagogical system designed to automate unfolding the Advaita Vedānta teaching. Although it presents a chat interface to the student, it is not a chatbot. Its architecture mirrors the traditional guru–śiṣya teaching structure: original scriptural sources (śruti), tagged with their pedagogical functions, comprise the corpus layer; the teaching methods (prakriyā) are encoded in a pedagogy layer; the system's reasoning corresponds to the teaching engine; and the student's cognitive state is modeled explicitly by a state machine.
The inquiry flow follows classical Advaita pedagogy: student input is received; conceptual errors are diagnosed; the student's current understanding is assessed; the appropriate teaching method is selected; relevant scriptural passages are identified; and structured dialogue is generated — not from general-purpose language model training, but from a corpus of tagged scriptural extracts encoding the teaching logic of the original tradition.
This architecture is witness-centered in a specific sense. The system does not optimize for engagement or satisfaction. It diagnoses adhyāsa — specific forms of misidentification that obscure recognition of the sākṣin — and selects the pedagogical response most likely to dissolve them. The student's cognitive state is not a preference profile; it is a map of the distance between the student's current understanding and the recognition the tradition is trying to produce.
AIM was developed primarily through what is now called vibe-coding — rapid, iterative AI-assisted development driven by conceptual intent and formal specification. The conceptual architecture is correct: the Advaita framework is genuinely the foundation, not a metaphor applied after the fact. But vibe-coded software, however well-conceived, accumulates errors that more careful development would have prevented. The teaching engine may contain gaps between its intended pedagogical logic and its actual behaviour. The state machine may not fully capture the range of student cognitive states the tradition addresses. The prakriyā selection may produce appropriate responses in common cases while failing in edge cases that a rigorous test suite would expose.
AIM is currently in tuning stage — working, but not yet verified against the full scope of its intended function. What it needs is what any proof-of-concept needs before it can become a reliable system: a thorough audit, systematic error correction, and testing at a scale broader than a single practitioner's use.
That audit is now underway.
The General Theory: Logic-Encoded
The Special Theory works within a specific domain — Advaita pedagogy — with a specific user population and outcome. The General Theory asks a different question: can the formal model underlying AIM be encoded as a domain-agnostic software library that any AI application developer could use as the foundational model of the sentient user?
Scherf's formalization provides the material. His 69 axioms across ten modules — covering the fundamental ontology, the three levels of reality, the māyā doctrine, the five sheaths (pañca-kośa), the three-state analysis (avasthā-traya), and the witness-consciousness (sākṣin) — constitute a machine-verified, formally complete model of a conscious human being. It is not an interpretation or an approximation; it is a specification, like a software specification: precise, consistent, and verifiable.
The General Theory proposes to encode this specification as a software library that represents the Advaita Vedānta model of the sentient user: it can be imported, queried, and used to constrain AI system behaviour. The three levels of reality become a framework for classifying the epistemic status of system outputs. The witness-consciousness model becomes a constraint on what the system may optimize for. The adhyāsa analysis becomes a diagnostic framework for detecting the failure modes that witness-centered design is designed to prevent.
A developer building any AI-assisted application — a tutoring system, a medical interface, a design tool, a research assistant — could import this library and use it to ask, at any point in an interaction: does this response preserve the user's orientation? Does it present its output with appropriate epistemic humility — distinguishing the prātibhāsika, vyāvahārika, and pāramārthika levels of its claims? Is it supporting the sākṣin or displacing it?
These are not soft questions. With the General Theory encoded, they become answerable programmatically.
The Relationship Between the Two
The Special Theory validates the General Theory's conceptual premises in a real domain: AIM exists; it works; it produces pedagogically appropriate responses to student inquiry. The fact that a witness-centered system can be built and can function is not theoretical. The Special Theory demonstrates it.
The General Theory, once built, validates the Special Theory's foundation more rigorously than it has been so far. AIM's teaching engine can be checked against the encoded axiom system: does its diagnostic logic correctly implement the adhyāsa analysis? Does its state machine correctly model the range of cognitive states Śaṅkara's framework describes? Does its prakriyā selection correctly correspond to the teaching methods the tradition uses for each diagnostic category? Once the General Theory is built as software, these will be precisely answerable questions.
The two theories also address different audiences. AIM serves the practitioner: someone engaged with Advaita Vedānta as a living inquiry, who wants a structured system to support that inquiry, rather than a general-purpose assistant. The General Theory serves the developer building an AI application who wants a foundation adequate to the full depth of what a human being is, rather than the thin behaviorist premise that currently dominates the field.
The Implementation Path
Both tasks are now being undertaken with Claude Opus 4.8 as technical partner — working directly with the AIM codebase and with Scherf's formalization to execute the audit and produce the encoded library.
For the Special Theory, the work involves: reading the full AIM codebase and its architecture documentation; identifying gaps between the conceptual specification and the actual implementation; correcting errors in the teaching engine, state machine, and dialogue protocols; and producing a test suite that verifies correct pedagogical behaviour across the range of student states the system is designed to address.
For the General Theory, the work involves: determining the appropriate language and architecture for the library (Scherf's Lean 4 formalization is the source material; the encoded library will need to be usable by application developers in practical contexts); expressing the 69 axioms and their derived theorems as software constructs; defining the API through which applications interact with the model; and documenting the library sufficiently that a developer unfamiliar with Advaita Vedānta can employ it effectively.
The choice of implementation language and architecture for the General Theory is itself a design decision with significant consequences. A Python library would be immediately accessible to the largest developer community; a TypeScript implementation would integrate naturally with web-based AI applications; a language-agnostic specification with reference implementations in multiple languages would maximise reach at the cost of additional development effort. This decision is being made on technical grounds by someone better positioned than a philosopher to evaluate the tradeoffs.
Why This Matters Beyond AIM
The General Theory, if successfully encoded, would be the first practical implementation of a formally verified consciousness model as a software foundation for AI systems. It would give developers something that does not currently exist: a rigorous, examined alternative to the behaviorist premise — not as a philosophy to be espoused, but as a library to be imported into any user-facing AI application.
The problems documented in AI-assisted work — cognitive dependency, learning atrophy, the productivity paradox, the growing animosity toward systems that feel extractive — do not have a solution within the current paradigm. The General Theory offers one that is not an add-on or a guardrail but a genuine alternative foundation: build the system on a correct model of the user, and the failure modes that follow from an incorrect model do not arise.
That is the claim. The implementation will test it.
AIM has been enhanced with the Scherf API — a software library encoding Matthew Scherf's machine-verified model of the knowing subject across three traditions, now available on GitHub. AIM is currently in beta. To request access, contact BetaTest@specstudio.net.
The AIM codebase is at github.com/SpecStudio-net/Advaita-Inquiry-Matrix. Matthew Scherf's formalization is at github.com/matthew-scherf/Advaita. This essay is part of a series beginning with Witness-Centered Design: A Conscious Foundation for AI.