Article 3, section 3, clause 1 of the U.S. Constitution specifies that the giving of aid and comfort to the enemy is an element in the crime of Treason. Aid and comfort may consist of substantial assistance or the mere attempt to provide some support; actual help or the success of the enterprise is not relevant.
There is also the Patriot Act. It provides the agencies with latitude to conduct investigations when there is enough information to engage that suspicion without destroying civil rights of Americans. Regardless of a renegade Supreme Court, civil rights is important to the USA Consitution. Voting is one of the CIVIL RIGHTS in the Constitution. The criminal procedures in the USA Constitution elevates every citizen to the reason they are arrested and tried. Those are huge civil rights. It is important all the civil rights in the USA Consititution are enforced while writing domestic terrorism laws.
I think the US Judicial Committees in Congress should ask the agencies to submit what a domestic terrorism law would look like, but, that has to be tempered by a citizen consulting group as the bill is being written.
It is the agencies that will enforce these domestic terrorism laws. It has to work for them. They wouldn't want laws that overreach. They are citizens, too.
Former FBI Director Robert Mueller was able to carry out investigation and arrests under the Patriot Act.