Incentive Compatibility Construction Rule Suppose we are interested in constructing an incentive compatibility constraint for an agent to announce his state truthfully.

Consider a simple case of the state space being $S=\{H,L\}$ and his payoffs to be $\pi_L,\pi_H$. 

For the player to announce the state and payoff truthfully, is it correct to set the IC as:

$$\pi_H\leq\pi_L.$$

If it is correct, why is it so, and if it isn't, what is the correct way of setting up the IC and why? Is there a general rule of thumb in constructing an IC? Any reference would be also helpful.
As @brunosalcedo suggests in the comment, the agent's payoff, $\pi(a,s)$, should depend on i) the realized state $s$ and ii) the announced state $a$. Note that the announcement $a$ should in general be a function of the realized state $s$, i.e. $a:S\to S$. Incentive compatibility should thus be 
\begin{equation}
\pi(s,s)\ge \pi(a',s),\quad\forall a'\ne s. 
\end{equation}
In words, incentive compatibility requires that the agent's payoff when his announcement agrees with the state (i.e. the state is $s$ and his announcement is also $s$) be no lower than his payoff when his announcement disagrees with the state (i.e. the state is $s$ but his announcement is $a'\ne s$). 

Check out the following book chapters for more detail: 


Mas-Colell, Whinston, and Green (1995) (aka MWG) chapter 14.C discusses IC in the context of moral hazard 
MWG chapter 23.B introduces IC for truthful implementation 
Krishna (2010) chapter 5 is similar to the previous MWG chapter, but draws out more implications of IC.