Infer clauses from diagrams; export/import advice-shadow pairs