Well in terms of sound, /i:/ and final /j/ are similar, according to the books (Erris Irish). the /j/ ends up like a short /i/, in spellings with final -idh, like céilidh/céilí, so that MAY be why -í was picked, as it approximates the original sound, although I have heard that pronouncing of /j/ at the end is an Ulster thing; definitly I have heard in 'madra rua', /
ru@j/ or /ɾuəj/.
in "Beatha Aodha Ruaidh: the life of Red Hugh O'Donnell", 'red' is indeed spelt an/the old way, so there is suggestion that -í is a newer orthogrpahic replacement for -igh and -idh. This is only my suspecion,so perhaps someone with knowledge of pre-Caighdeán spelling can add to that.
Well on Lars Braesicke's site, only in the German version, we see
http://www.braesicke.de/palat.htm "Die Endung -ach / -each mehrsilbiger Wörter wird durch Palatalisierung zu -aigh / -igh
z.B.: báisteach - báistigh, bacach - bacaigh
Bei einsilbigen Wörtern auf -ch bleibt indes -ch erhalten.
z.B.: déach - déich, moch - moiche"
In the english version, a number of masc 1st declension nouns have the ach/aigh oppostion into the gen and null pl(go to
http://nualeargais.ie/gnag/gram.htm and look up 'Nouns', there seems not be be a direct link)
an marcach m an mharcaigh na marcaigh na marcach rider(horseback)
an bacach m an bhacaigh na bacaigh na mbacach beggar
an taoiseach m an taoisigh na taoisigh na dtaoiseach chieftain, Prime Minister
but others:
an bealach m an bhealaigh na bealaí na mbealaí way
an t-éadach m an éadaigh na héadaí na n-éadaí clothing
and still others:
an samhradh m an tsamraidh na samhraí na samhraí Summer
an cogadh m an chogaidh na cogaí na gcogaí war
an deireadh m an deiridh na deirí na ndeirí end
so there is a little inconsistancy in how the spelling is achieved, I suppose due in part to the different histories of the endings.
For feminine nouns, it is -í as you said, with -igh in the dative singular
I wonder were older fem nouns spealt without -í too?