There’s no official “plugin guide” or anything like that, but there are essentially two types of plugins: The first implements the XDCR v1 protocol (CAPI), like the ElasticSearch plugin, the second uses a TAP or DCP stream to read data from a bucket. The former listens for incoming XDCR replications (push), the latter opens a connection to a bucket and reads data from it (pull, but not quite).
Both the CAPI and TAP/DCP parts are available as stand-alone modules, so you can write your own connector that uses either one. You can find an example of a plugin that uses TAP streams here: https://github.com/paypal/couchbasekafka . You can find the CAPI server code here: https://github.com/couchbaselabs/couchbase-capi-server
There’s also an open feature request for the ElasticSearch plugin to be able to ignore deletes/expirations, so it can serve as an archive service of sort. If that’s what you need, you might want to bump that on Jira: https://issues.couchbase.com/browse/CBES-32