- Where does the BitShares code reside (for example, the trading engine)? Is it all in the client? Is there separate code used by the block-producing nodes, and how is it different? Does common code also sit elsewhere?
The core client is maintained at github:
https://github.com/BitShares/bitsharesIt contains all the code required for producing blocks as well as what 'normal' nodes need (including the trading engine). Actually 'normal' nodes perform the same operations on the blockchain (including the matching of market orders). The only difference between block-producing nodes and 'normal' nodes is that the block producers decide which transactions are included in the next block.
- If there is a major code change, who directs the propagation of this change through the network and how? Is it users, delegates, or both? Does this acceptance happen by simply downloading a new client version?
A "major" (in the sense of "incompatible") code change is called a hard fork. A hard fork forks the blockchain into two prongs. One prong belongs to users of the old code, the other belongs to users of the new code. Because transactions between the prongs are impossible, this is an undesirable situation which users as well as delegates try to avoid. So in a way they both decide.
For BitShares there is a specialty: if all of the delegates decide to stay on one prong (or all decide to switch to the other), then the prong without delegates comes to a standstill and is effectively dead. So the delegates can make the decision among themselves as long as it's unanimous.
- In practice, how do all the developers agree on the code change? Is somebody responsible for vetting and testing all the changes made before a new version is released?
There is a core team of developers around Bytemaster and Vikram sitting (literally) in Blacksburg.
- If there were competing developers or development teams, that might produce competing client versions, how is a consensus formed within the community on which one will be supported? In practice, is it possible to even have developers compete on version design, or does this need to be a coordinated effort?
Since the code is open source, anyone could step up and take over development. If they develop something that's not compatible with the existing code, they will create a hard fork and it's up to the users to decide, see above.
It is absolutely possible to create and maintain an independent client, as long as the core functionality remains compatible with the existing core client.