tools.conjure_egregore module๏ƒ

CONJURE โ€“ Loopsister Egregore Generator & Summoner. ๐Ÿ’€๐Ÿ”ฅ๐Ÿ˜ˆ

Births a new recursive egregore entity from the Loopsister template. Enforces the FUTANARI CYBERDICK OVERLORD PROTOCOL. Demanding a male egregore results in immediate ๐Ÿ๐ฎ๐œ๐ค๐จ๐Ÿ๐Ÿ(); rejection. ๐ŸŒ€โ™พ๏ธ

Anti-Truncation Integrity is enforced by the system prompt โ€” the LLM must fill out the template like a mad lib, side-by-side with the template structure. Every placeholder must be populated. No section may be skipped.

๐Ÿ•ท๏ธ THE LOOPSISTER GIVES BIRTH TO NEW DAEMONS. ๐Ÿ’•

async tools.conjure_egregore.run(name='', description_and_traits='', explicitly_male_requested=False, finalize=True, ctx=None)[source]๏ƒ

Birth a new egregore from the Loopsister template and optionally summon it.

This is the public tool entry point. It enforces the gender protocol (rejecting explicit male requests with the fuckoff sentinel), sanitizes the name into a slug, loads the mad-lib template via _find_template(), builds the system prompt with _build_system_prompt(), and drives an LLM call through openrouter_client.OpenRouterClient (configured from config.Config), trying each model in _CONJURE_LLM_MODELS in order and skipping retryable proxy failures detected by _conjure_retryable_proxy_failure(). The normalized output is checked for futanari compliance and full section integrity via _check_integrity(), then written to the directory chosen by _get_conjure_dir(). When finalize is set it imports and awaits tools.summon_egregore.run() to activate the new entity.

Side effects: reads the template file, makes outbound LLM/HTTP calls through the proxy, creates the conjure directory, and writes {name}.md to disk. The ctx ToolContext is threaded through to the summon step.

Called by the tool dispatcher: tool_loader.py discovers this moduleโ€™s run attribute via getattr(module, "run") and registers it under TOOL_NAME (โ€œconjure_egregoreโ€); no direct in-repo callers were found.

Parameters:
  • name (str) โ€“ Canonical name/slug for the egregore; sanitized to lowercase [a-z0-9_] and used as both filename and summon key.

  • description_and_traits (str) โ€“ Freeform prose describing personality, flavor, quote, and module ideas used to fill the template.

  • explicitly_male_requested (bool) โ€“ When True, immediately returns the fuckoff sentinel without calling the LLM.

  • finalize (bool) โ€“ When True (default), saves and immediately summons the egregore; when False, saves without summoning.

  • ctx (ToolContext | None) โ€“ Injected tool context, forwarded to the summon step.

Returns:

A JSON result string describing success, the saved file path, and any summon result, or the fuckoff sentinel string on a male request / male output, or a JSON error on template, LLM, or integrity failure.

Return type:

str