An overview of the Aṣṭādhyāyī
The shape of the text
Adult learners of the Aṣṭādhyāyī often think that the text's rules have an unusual or unintuitve ordering. Why do the rules of the Aṣṭādhyāyī have the ordering that they do? There are two basic factors that are responsible.
The first factor is that the Aṣṭādhyāyī is part of a long oral tradition. This fact has several important implications:
In traditional Sanskrit education, students chant and memorize several works by rote. Many students don't even understand what they're chanting! So there is less reason to make the rules follow an intuitive order.
Older students begin to study and unlock the contents of what they have memorized with the help of a skilled teacher. At every point in the education process, the student can rely on an expert who has memorized and understood the entire text.
A memorized rule can be recalled at a moment's notice regardless of where it is in the text, so there is less pressure to rearrange rules into a specific order.
Oral compositions tend to be more fluid than written compositions: they borrow heavily from past works, and they generally change over the generations.
The second factor is that the Aṣṭādhyāyī aims for overall concision (lāghava) in its total length. Again, this fact has several important implications:
Two rules that share a similar context might be grouped together even if the operations they describe are conceptually different.
Two rules that are conceptually quite similar might be split apart if their contexts are different enough.
Some interpretations of the text would make a rule purposeless (vyartha), which contradicts the general spirit of lāghava. On this basis, an interpretation of the system is invalid if it makes a rule purposeless.
Likewise, rules are usually stated the way they are for a specific reason. Often, that reason is an indicator (jñāpaka) of a critical principle of interpretation.
To some extent, these factors are in tension. The Aṣṭādhyāyī's origin in an oral tradition means that a particular rule's ordering is relatively less important. But the Aṣṭādhyāyī's emphasis on overall concision means that a rule's ordering can be vitally important.
Sections of rules
In practice, the result is that the Aṣṭādhyāyī is a set of sections, where the specific ordering of sections is not very important but the ordering of rules within a section is highly important.
Likewise, the eight chapters of the Aṣṭādhyāyī generally follow a logical flow:
Definitions and rules of interpretation.
The compound system.
Root suffixes: verb endings, derived roots (sanādi), suffixes that make nominal bases (kṛt), and auxiliary suffixes (vikaraṇa) inserted between the root and the verb suffix.
Nominal suffixes (part 1).
Nominal suffixes (part 2).
Duplication (dvitva), vowel sandhi, and accent.
Various suffix substitutions, as well as sound changes caused by suffixes.
Various sandhi rules.
So although there are some exceptions, the derivation of a specific word usually flows smoothly from book 1 to book 8.
More specifically, the derivation often follows this basic structure:
Add and define the base of the derivation. For verbs, this is a verb root. For nominals, this is a nominal stem. (Chapters 1 and 2)
Add any suffixes needed in the derivation. (Chapters 3, 4, and 5)
Apply sound changes caused by the specific suffixes. (Chapters 6 and 7)
Apply sandhi changes to merge all terms together into a single expression. (Chapter 8)