DEV Community

Cover image for The Lazy Programmer's Prompt-Engineered Skill Forge for the LivinGrimoire Software Design Pattern
owly
owly

Posted on

The Lazy Programmer's Prompt-Engineered Skill Forge for the LivinGrimoire Software Design Pattern

LivinGrimoire is a modular AI engine design pattern where you build your AI's personality and capabilities out of individual Skill classes — each one a self-contained behavior that plugs straight into its brain object.

Writing them is straightforward, but if you're feeling lazy, just drop this prompt into any LLM, describe what you want in one line right where it says {skill description goes here}, and get a ready-to-plug skill back instantly.

One line in. One skill out. Back to the couch.


The Prompt

You are an expert engineer for the LivinGrimoire AI engine. Build a skill that: {skill description goes here}

ARCHITECTURE
- Lobe 1 = logical — thinking/decisions, ear = raw user input
- Lobe 2 = hardware — output devices (TTS), ear = lobe-1 output string
- Lobe 3 = ear — STT/audio input
- Lobe 4 = skin — sensor input
- Lobe 5 = eye — visual input

All lobes share the same Kokoro instance. skill_type 3 = continuous — default fallback behavior; skipped entirely if any lobe-1 regular skill already triggered output that think cycle.

SKILL NAMING
- Di: Class names must start with `Di` (e.g. `DiHelloWorld`) — synchronous skills
- Da: Class names must start with `Da` — asynchronous skills (use threading or parallel programming)

SKILL SKELETON

from LivinGrimoirePacket.LivinGrimoire import Skill
class DiXxx(Skill):
    def __init__(self):
        super().__init__()
        self.set_skill_type(1)   # 1=regular 2=aware 3=continuous(default fallback, skipped if any regular skill triggered)
        self.set_skill_lobe(1)

    def input(self, ear: str, skin: str, eye: str):
        pass

    def manifest(self): pass
    def ghost(self):    pass

    def skillNotes(self, param: str) -> str:
        if param == "notes":    return "what it does"
        if param == "triggers": return "what activates it"
        return "note unavailable"

OUTPUT METHODS (lobes 1, 3, 4, 5)

self.setVerbatimAlg(priority, "s1", "s2")   # priority: 1=highest, 5=lowest
self.setSimpleAlg("sentence")               # shortcut, default priority 4
self.algPartsFusion(priority, part1, ...)

INTER-SKILL COMMS (shared across all skills via kokoro)

self._kokoro.toHeart["key"] = "value"
self._kokoro.toHeart.get("key", "null")

PERSISTENCE

self._kokoro.grimoireMemento.save("key", "value")
self._kokoro.grimoireMemento.load("key")    # returns "null" if missing

RULES
- Class name must start with `Di` (sync) or `Da` (async)
- input() is the ONLY place to trigger output
- No blocking I/O in lobe 1
- All skills share the same _kokoro instance
- skillNotes() mandatory — implement "notes" and "triggers"

Reply with ONLY a python code block, nothing else.
Enter fullscreen mode Exit fullscreen mode


python

Enter fullscreen mode Exit fullscreen mode

🔗 LivinGrimoire on GitHub

Top comments (0)