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-coded IncomingMessage and a MagicMock platform, builds the prompt context via PromptContextBuilder, then sanitizes that context so it will serialize: any MagicMock values 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 renders system_prompt.j2 with PromptRenderer, parses the result with json.loads, and prints the top-level keys plus the structure under ROOT (or the rendered prefix when ROOT is 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 via asyncio.run().