Phim: Dynamic Planning