SHUKUMEI

- define 'real'. -

[Shukumei_beta source] - wip/PoC : Sept 30, 2026

-use at your own risk-

[Shukumei] is a harness written for the [plan9] operating system. For quickest understanding - think sillytavern but running in acme.

Only supports llama.cpp without authentication (local running llama.cpp server on the same network with http api listening locally.)

This may change in the future. But for now local llama.cpp is fine for the use case we have, so we'd need compelled to care.

The api in the code is very close to OAI endpoints, but embedding is llama.cpp specific because the OAI endpoint sucks to parse and i didn't want to deal with it.

To install download source, modify shukumei.c to point to your llama.cpp ip. install [libhnsw]. `mk` and `mk install`

To run it, navigate to a "world" (example minimal world directory included) and run acme then run win then run START in win. (don't run START out of win, it needs the stdin from win's cmdline) alternatively run shukumei from inside the world directory. (redirect 2 to remove 'debug' clutter).

The START flow is the intended use method and it sets up 2 additional windows, one for output messages and one for debug messages.

the system prompts the user with >>>

end a prompt with `ctrl+c return` on a line by itself.

close the harness (saving data) with `ctrl+\`

close the harness (without saving) with `del`

head.id contains the id of the current "save" directory in Memories. (can be changed to point to specific memory instance, ie to branch memory state or go back)

Memories contains every save the system has seen. Sorting with `ls -lt` will tell you when they were modified.

note : you may think that this is wasteful. if you are not using a deduplicating FS (you probably are and don't need to worry) then store your world file on /tmp or something and clear out old ones. but i'm pretty sure cwfs, fossil/venti, hjfs, and gefs all do block deduplication so the save files won't be using nearly as much storage as you likely think.

in a Memory file the following [slov] files exist([optional]) - 役顔.slov [連中.slov] [命一.slov] [命三.slov] [残滓.slov] [欠片.slov] [ring.id]

Explaination of files :

- 役顔.slov - contains the definition of personas in the system. Minimally includes a distil persona ( 血 : -2 ) and another persona ( 血 : 0 or 1 )

血 values determine role/backend. 1 is human stdin. 0 is LLM call. these types both have HNSW memory storage attached. -1 is an LLM that does not have memory. (considered "adhoc" or "temporary"). -2 is a distil.

To disable a persona without deleting their memories set their value to 2<=value<=127. This will exclude them from the list of avalible personas, will not populate their graph, but importantly will not remove their memories from the database. a fully removed persona will have their memories removed from the next save.

名s is used for aliases for the persona. because summarization uses an LLM, this is to prevent problems where the summarizer sees a nickname and decides it's the "correct name" for the entry in it's output. It can also be used instead of the full name for commands that need a persona name (/enter name, /leave name, @name)

Each persona must have a Name.md in the root of the world directory. The name must match the name exactly (capitalization must match) and not one of the aliases.

Names and Aliases must be unique.

This is the only mandatory memory file and the only one a user is expected to edit.

- 連中.slov - contains the seen cohorts (lists of personas).

- 命一.slov - contains the raw interaction data.

- 命三.slov - contains nodes that link groups of interactions (3 interactions in a sequence) to the cohort involved and the summary objects.

- 残滓.slov - contains summary data linked to 命三 groups and specific 役顔 it belongs to contains vector embed arrays.

- 欠片.slov - contains fact data linked to the 残滓s. will be very large. contains vector embed arrays.

currently there are no commands supported. to change "present persona" list, save with [ctrl+\] modify the memory pointed to at head.id to change persona visibility (set 血 to 0 to include, and like 10 to exclude). is this annoying? yes. it will change. soon probably.

anyway... i think that about covers things? idk.

tags

clanker code plan9 red safe shukumei_loading technology

incoming references

HNSW INDEX