Well, first of all it was an indispensable precondition that the frameworks (SWF and PrimeFaces) don't get patched.
Everything is a framework extension.
Perhaps you can glimpse the implementation strategy if I show you the basics of the SWF extension configuration:
<webflow:listener ref="ajaxFlowExecutionListener" />
<webflow:flow-builder-services id="primefacesFlowBuilderServices" view-factory-creator="viewFactoryCreator"
<bean id="viewFactoryCreator" class="xxxxxx.portal.resources.spring.webflow.extension.PortletViewFactoryCreator"/>
<bean id="ajaxFlowExecutionListener" class="xxxxxx.portal.resources.spring.webflow.extension.AjaxFlowExecutionListener"/>
and the main entry point: The FlowHandlerAdapter extension
<bean id="handlerAdapter" class="xxxxxx.portal.resources.spring.webflow.extension.AjaxPortletFlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor"/>
All that enables SWF to handle Portlet ResourceRequests in such a way that they get propagated down into a derivation of the PrimeFacesPhaseListener.
It must be guaranteed that the latter gets switched off in favour of its derivation which is able to handle ResourceResponses in contrast to its parent. Here comes into play the beauty of PrimeFaces' Ajax implementation which on the serverside is solely handled by this class.
All that was developed under PrimeFaces 1.1 and SWF 2.1.0 but definitely works well under SWF 2.2.1/2.3.0.