Xcode 3.1 Release was released on 10 Jul 2008 and requires macOS 10.5+.
It can be downloaded from https://download.developer.apple.com/Developer_Tools/xcode_3.1_developer_tools/xcode31_2199_developerdvd.dmg.
Release notes are located at https://download.developer.apple.com/Developer_Tools/xcode_3.1_developer_tools/about_xcode_tools_3.1.pdf.