Xcode 3.1.2 Release was released on 23 Nov 2008 and requires macOS 10.5+.
It can be downloaded from https://download.developer.apple.com/Developer_Tools/xcode_3.1.2_developer_tools/xcode312_2621_developerdvd.dmg.
Release notes are located at https://download.developer.apple.com/Developer_Tools/xcode_3.1.2_developer_tools/about_xcode_tools_3.1.2.pdf.