The National Building Code (NBC) -not the electrical code- requires that smoke alarm be permanently connected to a lighting circuit, or one that supplies both lighting and receptacles.
So if you have a junction box feeding a smoke detector, you can feed an outlet from there too. You will have to add a lighting circuit to it.
AFCI/GFCI circuits are permitted, and the alarm must have a battery backup.
Should you not have a GFCI/AFCI circuit, and should you require or want one, you could always use a GFCI/AFCI receptacle as your first outlet.
You can Leave the smoke alarm and the new lighting wired to the line side of the GFI outlet (e.g. branched off in a junction box leading to the outlet) and feed other receptacles from the protected side. Thus if you have a ground fault, you trip the outlets, but not the lighting and not the alarm.
It's wise to use lighting that will be used a lot, for instance main lighting for the new space. Often the master bedroom or kitchen is used (the choice depending on where you spend most of your leisure time). Don't use an obscure lighting spot, e.g. in a closet or a far corner, just to meet code.