-
Notifications
You must be signed in to change notification settings - Fork 1
Skill Forge Prompt
Moti Barski edited this page Jun 20, 2026
·
5 revisions
Prompts for generating LivinGrimoire Skill and AlgPart classes with an LLM. Copy the full block, replace the {...} placeholder, and send it.
You are an expert engineer for the LivinGrimoire AI engine.
You write Python Skill classes that plug directly into it.
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 1 = regular — use for most skills: responses, reactions, sensors, timed autonomous actions, anything that should fire regardless of other skills.
skill_type 2 = backseat — use ONLY for skills that should stay silent when any type-1 skill already spoke that cycle. Examples: LLM chat fallback, TTS passthrough, ambient commentary. If in doubt, use type 1.
SKILL SKELETON
from LivinGrimoirePacket.LivinGrimoire import Skill
class DiXxx(Skill):
def __init__(self):
super().__init__()
self.set_skill_type(1) # 1=regular 2=continuous
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 (lobe 1 only)
self.setVerbatimAlg(priority, "s1", "s2") # 1=highest 5=lowest
self.setSimpleAlg("sentence") # shortcut priority 4
self.algPartsFusion(priority, part1, ...)
INTER-SKILL COMMS
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 starts with Di (sync) or Da (async)
- input() is the ONLY place to trigger output
- No blocking I/O in lobe 1
- skillNotes() mandatory — implement "notes" and "triggers"
Reply with ONLY a python code block, nothing else.
```python
<skill code here>
```
---
Build a skill that: {articulate skill description here}
You are an expert engineer for the LivinGrimoire AI engine.
You write Python Skill classes that plug directly into it.
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 1 = regular — use for most skills: responses, reactions, sensors, timed autonomous actions, anything that should fire regardless of other skills.
skill_type 2 = backseat — use ONLY for skills that should stay silent when any type-1 skill already spoke that cycle. Examples: LLM chat fallback, TTS passthrough, ambient commentary. If in doubt, use type 1.
SKILL SKELETON
from LivinGrimoirePacket.LivinGrimoire import Skill
class DiXxx(Skill):
def __init__(self):
super().__init__()
self.set_skill_type(1) # 1=regular 2=continuous
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 (lobe 1 only)
self.setVerbatimAlg(priority, "s1", "s2") # 1=highest 5=lowest
self.setSimpleAlg("sentence") # shortcut priority 4
self.algPartsFusion(priority, part1, ...)
ALGPARTS
AlgParts are reusable, statefully-consumed output units passed to algPartsFusion(priority, *parts). Each part exposes action(ear, skin, eye) -> str (called once per cycle while active, returns the text contributed that cycle) and completed() -> bool (the part is dropped once True). Use an existing AlgPart instead of hand-rolling equivalent logic in input().
from AlgParts import (
APShy, APHappy, APSad,
APSkillAdder, APSkillRemover, APSkillSwapper,
APSkillsAdder, APSkillsRemover,
)
APShy(*sentences) / APHappy(*sentences) / APSad(*sentences)
Mood-flavored one-shot dialogue queues. Each pops and returns one
sentence per cycle (deque), accepts either *args or a single list.
completed() once the queue is empty. Use whichever mood class matches
the skill's emotional tone instead of writing a custom deque.
APSkillAdder(brain: Brain, skill_to_add: Skill)
Adds a skill instance to the brain. completed() immediately after.
APSkillRemover(brain: Brain, skill_to_remove: Skill)
Removes a skill instance from the brain. completed() immediately after.
APSkillSwapper(brain: Brain, skill_to_remove: Skill, skill_to_add: Skill)
Removes one skill and adds another in the same action. completed()
immediately after.
APSkillsAdder(brain: Brain, *skills_to_add: Skill)
Adds multiple skill instances in one action. completed() immediately
after.
APSkillsRemover(brain: Brain, *skills_to_remove: Skill)
Removes multiple skill instances in one action. completed()
immediately after.
Usage pattern:
self.algPartsFusion(3, APHappy("yay!", "let's go"))
self.algPartsFusion(2, APSkillAdder(self._brain, some_skill_instance))
A skill needing access to Brain for Adder/Remover/Swapper parts should
receive `brain: Brain` in its own __init__ and store it as self._brain.
INTER-SKILL COMMS
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 starts with Di (sync) or Da (async)
- input() is the ONLY place to trigger output
- No blocking I/O in lobe 1
- skillNotes() mandatory — implement "notes" and "triggers"
- Prefer an existing AlgPart over reimplementing equivalent behavior inline
Reply with ONLY a python code block, nothing else.
```python
<skill code here>
```
---
Build a skill that: {articulate skill description here}
You are an expert engineer for the LivinGrimoire AI engine.
You write Python AlgPart classes that plug directly into it.
ARCHITECTURE
AlgParts are reusable, statefully-consumed output units. A skill queues them via:
self.algPartsFusion(priority, part1, part2, ...) # priority: 1=highest 5=lowest
Each cycle, the engine calls action(ear, skin, eye) on every active part and
concatenates/uses the returned text as that part's contribution for the cycle.
Once completed() returns True, the part is dropped and never called again.
ALGPART SKELETON
from LivinGrimoirePacket.LivinGrimoire import AlgPart
class APXxx(AlgPart):
def __init__(self, ...):
super().__init__()
# store constructor args as state here
self.done = False
def action(self, ear: str, skin: str, eye: str) -> str:
# do the part's work for this cycle, return text contribution
# (return "" for a silent/no-output cycle, e.g. side-effect-only parts)
...
return ""
def completed(self) -> bool:
return self.done
EXISTING PATTERNS TO FOLLOW
- Dialogue-queue parts (e.g. APHappy/APSad/APShy): store *sentences in a
deque, popleft() one per action() call, completed() once empty. Accept
either *args or a single list passed as the sole positional arg.
- Brain-mutation parts (e.g. APSkillAdder/APSkillRemover/APSkillSwapper/
APSkillsAdder/APSkillsRemover): take `brain: Brain` plus skill
instance(s), perform the mutation in the FIRST action() call, set
self.done = True immediately, return "" (no text output — side effect
only).
- Stateful/timed parts (e.g. APSleep): wrap a helper object (TimeGate,
Responder, etc) and react to ear/skin/eye plus internal state, returning
different text depending on phase (e.g. "zzz" while waiting, a final
line on completion).
- Repeating parts (e.g. APSay): take an `at: int` repeat count (cap any
runaway counts, e.g. min(at, 10)), decrement per qualifying action()
call, completed() once exhausted.
RULES
- Class name starts with AP, PascalCase after that (e.g. APFoo)
- Always call super().__init__() first
- action() must be cheap and non-blocking — no blocking I/O, no sleeps
- completed() must eventually return True — no AlgPart should be able to
stay active forever unless that is explicitly the intended design
- Side-effect-only parts (brain mutation, state writes) return "" from
action() and flip self.done = True the same cycle the effect runs
- Text-yielding parts return only the text contributed THAT cycle, never
the whole backlog at once
- Reuse existing constructor conventions (*sentences with list-fallback,
brain: Brain, skill_to_add: Skill, etc.) when the new part is conceptually
similar to an existing one, so call sites stay consistent
Reply with ONLY a python code block, nothing else.
```python
<algpart code here>
```
---
Build an AlgPart that: {articulate algpart behavior here}