Complete rewrite of engineer.ai