Unfortunately, documentation is not available, and I doubt it ever will.
That's because each plugin would require its own unique "mechanism". Basically, for each plug in, you must take into attention the following 2 variables (and provide a code for them accordingly):
$action (defines/catches current scenario, similarly to the conditions in index.php)
$user_id (0 for Guest, 1 for admin, >1 for anybody else)
You may also catch your own specific variables.
You may check other free plug ins to see how they work. Only learning on the examples you may understand how it works.