This was 8 months ago so the experimental code is not in the codebase anymore. I assume you are looking for some sort of a Nupic extension but I work on a separate HTM implementation with its own structural design embedded in a game engine so the implementation would not communicate well.
On the other hand, I remember my approach pretty well as it was pretty naive. Normally, a layer would call SP first and TM second in an ongoing loop. Whenever I wanted to feed predictive cells back to TM as activations, I would call a function named X instead of default SP function prior to TM.
On top of this, you have to make sure TM Phase 1 (bursting columns or activating neurons from predictive columns) is bypassed so that when you call TM, it does not try to activate cells from active columns as we already did this by activating predictive cells. Then you run the rest of TM algorithm as usual. I would imagine that the most recent Temporal Memory implementation in Nupic makes this harder to pull of as TM phases are kind of merged.
What you want if the layer has predictive neurons at this point:
-> TM(layer) excluding TM-Phase1
-> Reset all active cells and columns.
-> activeCells = predictiveCells
-> Reset all predictive and matching cells.
-> Reset all active and matching segments along with their activations caused by distal inputs (for the proceeding TM calculations)
Hope this is not too superficial.