tools.feature_atlas.export_sarah_demo module
Step 8: Generate the Sarah demo report.
Queries the atlas graph for all features, top risks, top synergies, and concrete examples, then composes a polished markdown report designed to be copy-pasted into a Discord message or shown on screen.
Can optionally use Gemini Flash to generate a narrative summary.
- Usage:
python -m tools.feature_atlas.export_sarah_demo
# fire skull heart – THE BODY SPEAKS TO SARAH
- async tools.feature_atlas.export_sarah_demo.generate_demo_report(graph)[source]
Compose the full Sarah demo report from the atlas graph as markdown.
Builds the polished, copy-paste-ready report that showcases the Feature Interaction Atlas. It issues a sequence of read-only Cypher queries through
_query_safe()against the FalkorDB atlas graph to gather node and edge counts, the full feature table with confidence badges, the top ten highest-risk and highest-synergy interactions, a few concrete examples with source-file references and recommended tests, an aggregated list of top recommended tests, and a trailing reference block of the Cypher queries used. The assembled sections are joined into one markdown document. The only side effects are the read-only queries against FalkorDB; this function does not write to disk or mutate the graph.Invoked by
async_main()in this module and also imported bytools.feature_atlas.query_atlas.async_main(), which reuses it to render the same report from the query CLI; no other internal callers were found.
- async tools.feature_atlas.export_sarah_demo.async_main()[source]
Generate the Sarah demo report and write it to the outputs directory.
The async driver for step 8 of the atlas pipeline. It opens the FalkorDB atlas connection via
tools.feature_atlas.atlas_connection.get_atlas_graph(), builds the markdown report withgenerate_demo_report(), writes it tooutputs/sarah_demo.md, closes the underlying Redis client, and then prints both a short completion banner (output path, size, elapsed time) and the full report to stdout. Side effects span the read-only FalkorDB queries made during report generation and the filesystem write of the report file.Invoked by
main()in this module’s__main__guard and imported asasync_mainbytools.feature_atlas.run_atlas.step_export_demo()(theexport-demostep of the atlas runner); no other internal callers were found.- Return type:
- Returns:
None.
- tools.feature_atlas.export_sarah_demo.main()[source]
Synchronous entry point for the Sarah demo report step.
Configures root logging at WARNING level (to keep the printed report clean) and drives the async flow by calling
asyncio.run(async_main()), which queries the FalkorDB atlas graph, writesoutputs/sarah_demo.md, and prints the report. All FalkorDB and filesystem side effects happen transitively insideasync_main(); this wrapper only sets up logging and starts the event loop.Invoked from the module’s
if __name__ == "__main__"guard viapython -m tools.feature_atlas.export_sarah_demo; no other internal callers were found.- Return type:
- Returns:
None.