Clean the clams. First, check for any cracked or already open shells. Give their shells a light tap. If any cockles stay open after you tap them, discard them.
Put the cockles in a large colander and rinse them thoroughly under cold running water. Give them a quick shake to help release any loose sand. If you have a bristly brush, you can use it to gently scrub the clam shells
Fill a large bowl with cold water and add 3 tbsp of salt. Add the cockles, cover with a dishcloth and place them in a dimly lit corner. Let them soak for 20 to 30 minutes. As they sit, they will naturally expel sand and grit.
If the water looked very cloudy, repeat the soak once more.
After soaking, lift the cockles out of the water with your hands or a slotted spoon to avoid dumping the sand that settles at the bottom back over the cockles.
Give them one last quick rinse under cold water and drain well.
Cook the clams. Add the olive oil to a deep 11-inch skillet. Over medium-high heat, heat the olive oil.
Add the garlic, chili flakes, and salt. Cook, stirring until golden brown, about 3 minutes.
Add white wine and let it cook for 2 minutes to let the alcohol smell burn off.
Next, add the clams and cover with a fitted lid. Let them cook for 5 to 8 minutes or until all the clams have opened. Remove the clams from the pan and set aside. I like to pull the clams out as they open, so they don't overcook.
To the same pan, add the butter, lemon juice, and 3½ cups of water. Raise the heat and bring to a low boil.
Cook the pasta. Add the fregola to the pan. Cook the fregola until al dente, about 8 to 10 minutes. Stir occasionally to make sure the pasta doesn't stick.
While the pasta cooks, remove ¾ of the clams from their shells and set aside.
Once the pasta is cooked and has absorbed most of the water, turn off the heat and stir vigorously with a wooden spoon.
Turn off the heat, add the parsley, chives, and shelled clams, and toss once more. Top with remaining shelled clams, and serve immediately.