This is good advice but it's not specific enough. What does "keep your code separate from CKAN" mean? Give examples, such as do not import `ckan.model` or `ckan.logic` (or any ckan module or package?) directly, instead use the plugins toolkit.

Also it feels a bit odd hanging here on its own. Maybe we could have an "Extension Writing Best Practices" (or something) section, where we give a list of this and other guidelines for writing extensions (eg. using `get_action()`, that it's okay to add tables to the model but not to add columns to core tables or to have foreign keys to core tables, etc.)

I think there may be some guidelines for writing extensions already on the CKAN Code Architecture page? If so, move them here.