How close can planets form to one another? With the NASA announcement today regarding the discovery of a system containing seven earth-sized planets (3 within the habitable zone), I wondered about the seemingly crowded conditions.  What principles guide the formation of planets and the distances between them?  Are there laws governing this that are well established?  How close have we observed two planets form?
If you're thinking about how close planets can be, you should probably consider each planet's Hill sphere, the region in which it can retain satellites. Fang &amp; Margot (2013) did an analysis of Kepler data and found that planets had mean values of $\Delta = 21.7$, where $\Delta$ is a parameter given for two adjacent planets by
$$\Delta=\frac{a_2-a_1}{R_{H1,2}}$$
where the $a$s are the semi-major axes and $R_{H1,2}$ is the mutual Hill radius.

One system the authors consider is Kepler-11, which has 6 planets, all with semi-major axes $\leq0.466\text{ AU}$ and with only one semi-major axis greater than $0.25\text{ AU}$. The smallest $\Delta$ there is approximately $5.7$, although all the other $\Delta$s are quite small. Kepler-36, with only two planets, still has a $\Delta$ of $4.7$.

According to the Nature paper about TRAPPIST-1, all seven planets have semi-major axes within $\sim0.063\text{ AU}$. They have mean $\Delta$s of $10.5\pm1.9$ - not much different from the Kepler-11 planets, because they have smaller Hill spheres. They may be closer together, but they can be much closer together without having stability problems. Additionally, they are in a "near-resonant" configuration.

How close planets can be depends strongly on their masses, then, which in turn determines their mutual Hill radii, which determines stability.



All that said, the authors believe that the TRAPPIST-1 planets may have migrated in from further out, thus entering the resonances. Without more information, we can't know whether this is the case, but if so, it is not, then, an example of planets forming close to each other.