check_skeleton_remote
Ad-hoc diagnostic: render the system prompt and inspect its JSON skeleton.
Builds a minimal PromptContextBuilder context for a hard-coded test
message and channel, renders system_prompt.j2 with
PromptRenderer, then parses the rendered output as JSON and prints
the top-level structure (verifying the ROOT key is present and well
formed). Run directly (python check_skeleton_remote.py) to debug template
rendering or JSON-validity regressions in the prompt skeleton.
- async check_skeleton_remote.main()[source]
Render the system prompt for a fixed test message and dump its JSON shape.
The async entry point for this diagnostic. It loads
Config, fabricates a hard-codedIncomingMessageand aMagicMockplatform, builds the prompt context viaPromptContextBuilder, then sanitizes that context so it will serialize: anyMagicMockvalues are blanked, a couple of required fields (hosting_provider,current_time) are pinned to deterministic test values, and the SWORD overlay variables are popped so the raw skeleton is rendered. It then renderssystem_prompt.j2withPromptRenderer, parses the result withjson.loads, and prints the top-level keys plus the structure underROOT(or the rendered prefix whenROOTis missing). On any render/parse failure it prints the exception and the sorted context keys to aid debugging. Side effects are limited to building context (which may read config/Redis-backed state) and writing to stdout. Invoked only from this module’s__main__block viaasyncio.run().