Watch the Chord Substitution: 5 online guitar lesson by TrueFire from Jazz Guitar Greatest Hits Vol. 2
Lesson Source: Fareed Haque's Bebop Improv Survival Guide
Principle 5: Mix n Match em all!
This is where the fun, confusion and beauty all begin!
You can mix for example the tri tone subs principle 4 with ii-V principle 3; dm7-G7-Cmaj7 could become D7-G7-C7 and then become D7-Ab7-G7-Db7-C7 and then become D7 to Ebm7-Ab7 to Dm7-G7 to Db7 tp Cmaj7....and many many more.
And all of this can become cool melodies just as it becomes cool chords.