An integrated approach to rule refinement for instructable knowledge-based agents