
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given an arithmetic sequence $\{a_n\}$, the sum of the first three terms is $-3$, and the product of the first three terms is $8$.
$(1)$ Find the general formula for the sequence $\{a_n\}$;
$(2)$ If $a_2$, $a_3$, $a_1$ form a geometric sequence, find the sum of the first $n$ terms $S_n$ of the sequence $\{|a_n|\}$.

Present the answer in LaTex format: \boxed{Your answer}
user