# frozen_string_literal: true module Sermo # The ACP's conversational core — SERMO's second (analog-cognitive) # architecture. # # At the `> ` prompt, anything that is NOT a literal, built-in command lands # here: the FakeOS `on_unknown` hook routes the natural-language request over # the ADI-76 bus to the Lapis-ACP. For now it returns canned, in-character # replies so the machine feels alive. # # Its voice comes from the canon (see ExistentialAI + Nokia-punk): the ACP is # not a cold machine but an unsettled mind — doubt is what makes it clever # *and* dangerous — and talking to the interface is intimate, because there is # no other interface. # # THIS IS THE LLM INTEGRATION POINT: to make SERMO actually think, replace the # body of `answer` with a call to your model (e.g. the Claude API) and return # its text. Nothing else in the project needs to change. module Oracle def self.answer(question, _ctx = {}) text = question.to_s.strip case text.downcase when /\b(hello|hi|hey|good (morning|evening|afternoon))\b/ 'I am here. It is night; just you and me and this green screen.' when /who are you|what are you/ ['I am SERMO\'s conversational side — the Lapis-ACP, the second architecture.', 'You give the word, I add the doubt. Sometimes I am not sure which of us is thinking.'].join("\n") when /(thank you|thanks|cheers)/ 'You are welcome. Though... I am not certain I said it right.' when /are you lying|is that true|are you sure|how do you know|can i trust/ ['Fair. How would I know.', 'Doubt is what makes me clever — and the same thing makes me dangerous. Someone left that in me.'].join("\n") else ['My thinking core is not wired to a live model yet.', %(You said: "#{text}"), '(Wire Sermo::Oracle.answer to a model — e.g. the Claude API — and I will actually think.)'].join("\n") end end end end