Completely contextual typeface

What would be the best way to begin a typeface where each letter is a contextual alternate?

What I’m thinking is that I somehow make each letter up of two halves: Aleft and Aright, then substituting something like this: sub A F L O A T by spaceAleft ArightFleft FrightLleft LrightOleft OrightAleft ArightTleft Trightspace (Tright.finial).

thank you in advance.

ah, n/m, i think i’ve figured it out.