This is certainly a viable alternative to requiring a project-specific environment variable. The downside is it can only succeed if $PWD is within the local git repo.
If this is the preferred approach, however, an alternative zsh definition for devhome could be:
devhome () {
cd $(git rev-parse --show-toplevel) && cd ./${~1}(/)
}