1. The mitzvah of tefillin is to write four portions, which are “Kadesh li kol bekhor” until “le-moadah mi-yamim yamimah” [Ex 13:1-10]; “Ve-hayah ki yeviakha” until “Ki beḥozek yad hotzianu haShem mi-Mitzrayim” [Ex 13:11-17]; the Shema up to “U-vish-arekha” [Deut 6:4-9]; and “Ve-haya im shamoa” to “al ha-aretz” [Deut 11:13-22]. We have already explained in chapter 9 that they must be written in sequence. Each portion for the shel rosh is written on a separate piece of klaf, and all four of those for the shel yad are written on one piece of klaf. It is still valid if he wrote them on four pieces, but the custom is to glue them together so that they make one piece. One must take care to use kosher glue.
2. The number of lines, according to tradition: in the shel yad, seven lines for each portion, and in the shel rosh, four lines per portion. If one did it differently, it is not invalid. One must take great care that the lines be equal, so that the lines are justified.
3. Painstaking scribes used to make three types of klaf: a thicker one for writing “Shema” since it is short, a slightly thinner one for writing “Ve-haya ki yeviakha” which is slightly longer, and “Kadesh” and “Ve-haya im shamoa,” which are long, are written on very thin klaf. This is so that each box will be filled equally, which is the nicest way of doing tefillin. Some scribes use strips of klaf which are all the same thickness and all the same size, but leave large margins at the end of the shorter portions (thus the Levush. But in our times this is not done either, and it is not a matter for particular concern).
4. One must leave a gap at the top as high as the roof of lamed, and below such that straight khaf or tzaddi would fit and still be surrounded by blank klaf. In the shel yad, where all four portions are written on one piece of klaf, one leaves a margin between each portion, the size of two tets, or peh and tet, in that hand (Barukh She-Amar). At the beginning and end one need only leave enough that the letters should be surrounded by blank klaf, but scribes generally leave a little more than this, as it is nicer. There is an opinion which says one should leave as much klaf at the beginning as would surround it when rolled, and there are those who say that if one has sufficient klaf, he should leave this much at the end also.
5. Ideally one writes with a slightly chunky script, and should not make even the thin lines overly thin; they should be thicker, so as to delay their wearing out. Similarly, it is good to make them handsome within, just as the Holy Temple was overlaid with gold within. According to the kabbalah [tradition, or mysticism?], one must make the dalet of “Eḥad” as large as four small dalets.
6. Their portions are petuḥa except the one which is written last in Torah, “ve-haya im shemoa.” which is setuma. It is the custom in some places to put “Kadesh li,” “Ve-haya ki,” and “Shema” at the beginnings of lines. At the end of “Kadesh li” and “Ve-haya ki” we leave a gap the size of nine letters, and we don’t leave a gap at all at the end of “Shema,” or if we do leave a gap, it is smaller than nine letters. “Ve-haya im” starts in the middle of the top line, and we leave nine letters’ worth of space before it. The three petuḥa portions are therefore petuḥa according to both Rambam and Rosh, and the last portion is setuma according to the Rambam. Some say they are valid if all the portions are made petuḥa, and accordingly it is the custom in some places to put “Ve-haya im” at the beginning of a line like the others.
7. There are those who write “Ve-haya im” setuma according to all opinions, thus: they leave a gap of fewer than nine letters (yuds) at the end of “Shema,” and another gap of fewer than nine letters (yuds) at the beginning of “Ve-haya im,” such that both gaps together are nine letters (yuds) long. This is setuma according to both the Rambam and the Rosh. This is our custom, and the great posekim ruled thus. In any case, if a place has an established custom to follow one or the other of these rishonic opinons, they shouldn’t change their custom, so as not to bring dishonour to them.
8. Some say that ideally one writes the shel yad before the shel rosh, because the Torah spoke of it first. And some say that ideally one writes the shel rosh before the shel yad, because it has greater sanctity than does the shel yad. The Arizal wrote in Sefer ha-Kavannot that he would write the shel rosh, and put it all together and paint it black, and only then write the shel yad. If possible, one should make sure to write all the portions, of shel rosh and shel yad, one after the other, without breaking between them for anything at all.