Although many of the pieces of the Ansible Core Engine are plugins that can be swapped out via playbook directives or configuration, there are still pieces of the Engine that are not modular. The documents here give insight into how those pieces work together.
See also
Learn about the Python API for task execution
Learn about developing plugins
The development mailing list
#ansible-devel IRC chat channel