Homebuilder City Ventures wants to do something no other developer has done: Build market-rate housing as part of a public housing project in San Francisco.

City Ventures is close to finalizing a deal to build up to 80 for-sale townhomes on a steep hillside in the Bayview. The land that is part of the 22-acre Hunters View housing project.

The deal would be the first market-rate component of HOPE SF, a city-run program that aims to transform public housing into more dense, mixed-income communities.…