A Layered Architecture for Developing and Enhancing Capabilities in Large Language Model-based Software Systems