  We propose a systematic theoretical framework for the topological amplitudes
of the heavy meson decays and their $SU(N)$ decomposition. In the framework,
the topological amplitudes are expressed in invariant tensors and classified
into tree- and penguin-operator-induced diagrams according to which four-quark
operators, tree or penguin, being inserted into their effective weak vertexes.
By decomposing the four-quark operators into irreducible representations of
$SU(N)$ group, one can derive the $SU(N)$ irreducible amplitudes from the
tensor form of the topology. Taking the $D\to PP$ decay ($P$ denoting a
pseudoscalar meson) with $SU(3)_F$ symmetry as an example, we show our
framework in detail. The fact that some topologies are not independent in the
$SU(3)_F$ limit is explained by group theory. It is found that there are only
nine independent topologies in all tree- and penguin-operator-induced diagrams
contributing to the $D\to PP$ decays in the Standard Model. If a large
quark-loop diagram is assumed, the large $\Delta A_{CP}$ and the very different
$D^0\to K^+K^-$ and $D^0\to \pi^+\pi^-$ branching fractions can be explained
with a normal $U$-spin breaking. Moreover, our framework provides a simple and
systematic way to analyze the $SU(N)$ breaking effects. As examples, the linear
$SU(3)_F$ breaking and the high order $U$-spin breaking in charm decays are
re-investigated in our framework, which are consistent with literature. We
propose the concepts of splitting and degeneracy of topologies, and use them to
describe the charm-less bottom decay. We find $SU(3)_F$ analysis for the
charm-less $B$ decays is different from the $D$ decays because the charm-quark
loop is beyond the $SU(3)$ symmetry and should be investigated in the symmetry
breaking chain of $SU(4)\to SU(3)$.
