
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
In the Cartesian coordinate system, given the rays $OA$: $\sqrt{3}x-y=0$ and $OB$: $\sqrt{3}x+3y=0$ ($x\geqslant 0$). A line passing through point $P(1,0)$ intersects rays $OA$ and $OB$ at points $A$ and $B$, respectively.  
$(1)$ When the midpoint of $AB$ is $P$, find the equation of line $AB$.  
$(2)$ When the midpoint of line segment $AB$ lies on the line $y=\frac{\sqrt{3}}{3}x$, find the equation of line $AB$.

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