
254 P.3d 1073 (2011)
Loren J. LARSON, Jr., Appellant,
v.
STATE of Alaska, Appellee.
No. S-13917.
Supreme Court of Alaska.
June 10, 2011.
*1074 Loren J. Larson, Jr., pro se, Seward, Appellant.
John W. Erickson, Jr., Assistant Attorney General, Anchorage, and John J. Burns, Attorney General, Juneau, for Appellee.
*1075 Before: CARPENETI, Chief Justice, FABE, WINFREE, CHRISTEN, and STOWERS, Justices.

OPINION
WINFREE, Justice.

I. INTRODUCTION
Loren J. Larson, Jr. filed suit against the State of Alaska, alleging that the Alaska Court of Appeals violated its "duties to establish rules of law and declare what legal rights a citizen has" when it issued a decision affirming the dismissal of his petition for post-conviction relief from an earlier conviction for two murders and one burglary. The superior court ruled that Larson's suit was barred by both judicial immunity and res judicata. Larson appeals, but because the superior court did not err we affirm its decision.

II. FACTS AND PROCEEDINGS

A. Facts
A jury convicted Larson on two first-degree murder counts and one first-degree burglary count arising out of events occurring in 1996.[1] He was sentenced to two consecutive 99-year terms for the murder counts and a 10-year concurrent term for the burglary count.[2] In 2000 the court of appeals affirmed Larson's conviction.[3]
About a year later Larson filed an application for post-conviction relief, relying on affidavits from jurors and alternate jurors alleging juror misconduct prior to and during deliberations in his trial.[4] The superior court rejected the juror affidavits under Alaska Evidence Rule 606(b)[5] and dismissed his petition.[6] Larson appealed, arguing in relevant part that Evidence Rule 606(b) prohibits using juror affidavits to attack a verdict only when those affidavits describe misconduct occurring during but not before the jury's formal deliberations.[7] The court of appeals rejected Larson's interpretation of the evidence rule, holding "the admissibility of juror affidavits under Rule 606(b) turns on the type of impropriety they describe, not the timing of that impropriety."[8] But in addressing Larson's argument the court parenthetically noted:
Because Larson relies in part on the affidavits of two alternate jurors, one additional question is potentially raised by Larson's case: whether Evidence Rule 606(b) applies to evidence offered by alternate jurors as well as evidence offered by the jurors who ultimately decide the case. Both Larson and the State assume that Rule 606(b) applies to alternate jurors, and our limited research on this issue supports the parties' position. See State v. Reiner, 89 Ohio St.3d 342, 731 N.E.2d 662, 670-73 (2000). We therefore assume, for purposes of this case, that Evidence Rule *1076 606(b) governs testimony or affidavits supplied by alternate jurors.[[9]]
Because Larson's juror affidavits described matters "that `inhere' in the jury's decision-making process" and did not fall under Rule 606(b)'s express exceptions for "extraneous prejudicial information" or "outside influence," the court of appeals held Rule 606(b) precluded Larson from offering the affidavits to support his juror misconduct allegations; it therefore affirmed the superior court's dismissal of Larson's application for post-conviction relief.[10]
Larson filed a petition for hearing, asking us to review whether Rule 606(b) precluded admission of juror evidence showing misconduct that occurred prior to the jury's deliberations. Larson did not expressly ask us to review the court of appeals's treatment of Rule 606(b)'s application to alternate jurors. We denied Larson's petition for hearing.

B. Proceedings
In January 2010 Larson filed a pro se civil complaint, naming "the Appellate Court for the State of Alaska" as the defendant. Larson alleged the court of appeals had violated its "duties to establish rules of law and declare what legal rights a citizen has according to that rule." Larson identified the source of the court's duties as the preamble to the Alaska Code of Judicial Conduct. He asked the superior court to undertake declaratory judgment proceedings to determine whether Evidence Rule 606(b) applies to alternate juror testimony and affidavits.
In lieu of answering Larson's complaint the State filed an Alaska Civil Rule 12(b)(6) motion to dismiss for failure to state a claim for relief, asserting that (1) "the Court of Appeals is protected from suit for its judicial acts by judicial immunity"; (2) the Alaska Code of Judicial Conduct does not provide a legal basis for civil liability; and (3) Larson was asking for an advisory opinion. Larson responded that he had a constitutional right to have the court interpret the law and declare his rights and moved to amend his complaint under Rule 15 to clarify that the sources of the duties alleged in his complaint were constitutional.[11] The State did not take a position on Larson's motion to amend, arguing that the amended complaint "suffer[ed] from the same fatal defects as his initial complaint" with respect to absolute judicial immunity and required dismissal.
The superior court granted the State's motion to dismiss without mentioning Larson's motion to amend his complaint. The court explained that: (1) to the extent Larson asserted a claim against the State based on the conduct of judges, it was barred by judicial immunity; and (2) to the extent Larson asked the superior court to rule on Evidence Rule 606(b), it was barred by res judicata.
Larson appeals the superior court's dismissal of his complaint. Because Larson had the right to amend his complaint as a matter of course[12] and Larson's constitutional arguments were raised in his opposition to the motion to dismiss, we treat the superior court's dismissal order as directed at the amended complaint and will review the dismissal order accordingly.

III. STANDARD OF REVIEW
"We review de novo an order dismissing a complaint on the basis of Civil Rule 12(b)(6) for failure to state a claim upon which relief can be granted."[13] "When reviewing an order on a motion to dismiss, we deem all facts in the complaint to be true and provable."[14] "We will affirm a superior *1077 court's grant of a motion to dismiss only if it appears beyond doubt that the plaintiff can prove no set of facts that would entitle [the plaintiff] to relief."[15]

IV. DISCUSSION
We affirm the superior court's dismissal of Larson's amended complaint for failure to state a claim for relief for the following reasons.

A. Judicial Immunity
To the extent Larson seeks relief against the court of appeals, the doctrine of absolute judicial immunity applies: "Judicial immunity protects judges from liability for their judicial acts, and hence a judge will only be liable if the judge's actions were not `judicial' or were outside of the judge's subject matter jurisdiction."[16] "Only judicial actions taken in the clear absence of all jurisdiction will deprive a judge of absolute immunity."[17] "An absolute immunity defeats a suit at the outset so long as the official's actions were within the scope of the immunity."[18]
Larson nonetheless asserts the superior court erred by determining the court of appeals acted within its judicial capacity in deciding his post-conviction-relief appeal, arguing that the court of appeals failed to perform its constitutional duty to interpret Evidence Rule 606(b). The act at issue is the court of appeal's assumption "that Evidence Rule 606(b) governs testimony or affidavits supplied by alternate jurors" because both Larson and the State made such an assumption and "limited research" supported the parties' position.[19] We conclude this act was judicial in nature because it was a substantive decision regarding how to treat evidence when the court made its legal determinations and it was "properly within the scope and ... a routine exercise of [the court's] jurisdiction and authority."[20] Accordingly the superior court correctly applied the doctrine of absolute judicial immunity as a ground to dismiss Larson's suit.

B. Res Judicata
To the extent Larson seeks a binding judicial determination against the State as an indirect attack on his original conviction or a denial of his subsequent post-conviction-relief petition, without regard to specific relief against the court of appeals, the doctrine of res judicata applies. "A prior judgment extinguishes all claims including `rights of the plaintiff to remedies against the defendant with respect to all or any part of the transaction ... out of which the action arose.'"[21] "[R]es judicata precludes relitigation by the same parties, not only of claims raised in the first proceeding, but also those relevant claims that could have been raised."[22] Res judicata bars a subsequent action when there is "(1) a final judgment on the merits, (2) from a court of competent jurisdiction, (3) in a dispute between the same parties (or their privies) about the same cause of action."[23]
*1078 First, the earlier proceeding resulted in a final judgment on the merits, which held that Larson's juror affidavits were not admissible under Evidence Rule 606(b) to show juror misconduct in order to attack the jury's verdict.[24] Larson's Rule 606(b) claim in his declaratory judgment action arose out of the same transaction as his original claimalleged juror misconductand he needed to raise it in the earlier proceeding.[25] Second, the superior court had jurisdiction to rule on Larson's original post-conviction-relief application and the court of appeals had jurisdiction to rule on the appeal.[26] Third, Larson's claims for post-conviction relief and declaratory relief involve the same parties: Larson is the plaintiff and the State is the defendant.[27] Accordingly the superior court correctly applied the doctrine of res judicata as a ground to dismiss Larson's suit.

C. Lack Of Ripeness
Finally, Larson asks whether Evidence Rule 606(b) applies to alternate juror affidavits. To the extent Larson seeks a determination for use in some future unspecified action in which res judicata might not apply, his action is dismissable for lack of an actual dispute between the parties. Notwithstanding our general leniency toward the ripeness threshold for maintaining an action,[28] Larson seeks declaratory judgment without an active controversy to place it in context. Courts do not lightly issue advisory opinions;[29] this further supports the superior court's dismissal of Larson's amended complaint.

V. CONCLUSION
We AFFIRM the superior court's dismissal of Larson's amended complaint for failure to state a claim for relief.
NOTES
[1]  Larson v. State (Larson I), Mem. Op. & J. Nos. A-7032, A-4171, 2000 WL 19199, at *1 (Alaska App. Jan. 12, 2000).
[2]  Id. at *2.
[3]  Id. at *1.
[4]  Larson v. State (Larson II), 79 P.3d 650, 652 (Alaska App.2003). Larson argued that a number of jurors violated jury instructions by: (1) forming and announcing opinions about his guilt before the case was submitted to the jury; (2) discussing the merits of the case before it was submitted to the jury; and (3) relying on personal knowledge, rather than trial evidence, regarding how loud a .22 caliber rifle shot would be. Id. Larson also asserted that some jurors "improperly declared or apparently agreed" that (1) his decision not to testify indicated his guilt and (2) his wife's absence from the courtroom indicated she believed he was guilty. Id.
[5]  Evidence Rule 606(b) provides, in relevant part:

Upon an inquiry into the validity of a verdict..., a juror may not be questioned as to any matter or statement occurring during the course of the jury's deliberations ..., except that a juror may testify on the question whether extraneous prejudicial information was improperly brought to the jury's attention or whether any outside influence was improperly brought to bear upon any juror. Nor may a juror's affidavit or evidence of any statement by the juror concerning a matter about which the juror would be precluded from testifying be received for these purposes.
[6]  Larson II, 79 P.3d at 652.
[7]  Id.
[8]  Id. at 653 (emphasis in original).
[9]  Id. at 655.
[10]  Id. at 653-60.
[11]  Larson added allegations that the court of appeals violated article IV of the Alaska Constitution, which established the state judiciary, and article III of the U.S. Constitution, which established the federal judiciary. He abandoned his allegation that the court of appeals violated the preamble to the Alaska Code of Judicial Conduct.
[12]  Alaska R. Civ. P. 15(a) (allowing one pleading amendment as matter of course before service of responsive pleading).
[13]  Pepper v. Routh Crabtree, APC, 219 P.3d 1017, 1020 (Alaska 2009) (citing Vanek v. State, Bd. of Fisheries, 193 P.3d 283, 286 (Alaska 2008)).
[14]  Id. (citing Vanek, 193 P.3d at 286).
[15]  Id. (citing Valdez Fisheries Dev. Ass'n v. Alyeska Pipeline Serv. Co., 45 P.3d 657, 664 (Alaska 2002)).
[16]  Weber v. State, 166 P.3d 899, 902-03 (Alaska 2007) (citing DeNardo v. Michalski, 811 P.2d 315 (Alaska 1991)).
[17]  Christoffersen v. State, Court Custody Investigator's Office, 242 P.3d 1032, 1035 (Alaska 2010) (quoting Trapp v. State, 53 P.3d 1128, 1129 (Alaska 2002)).
[18]  Greywolf v. Carroll, 151 P.3d 1234, 1247 n. 54 (Alaska 2007) (quoting Imbler v. Pachtman, 424 U.S. 409, 419 n. 13, 96 S.Ct. 984, 47 L.Ed.2d 128 (1976)).
[19]  Larson II, 79 P.3d at 655.
[20]  See Weber, 166 P.3d at 903. The court of appeals had jurisdiction over Larson's appeal under AS 22.07.020(a)(2), which grants the court of appeals appellate jurisdiction in superior court post-conviction-relief actions.
[21]  Id. at 902 (quoting Nelson v. Jones, 787 P.2d 1031, 1033-34 (Alaska 1990)).
[22]  DeNardo v. State, 740 P.2d 453, 456 (Alaska 1987) (citing Calhoun v. Greening, 636 P.2d 69, 72 (Alaska 1981)).
[23]  Angleton v. Cox, 238 P.3d 610, 614 (Alaska 2010) (citing Smith v. C.S.K. Auto, Inc., 132 P.3d 818, 820 (Alaska 2006)).
[24]  Larson II, 79 P.3d at 653.
[25]  See Weber, 166 P.3d at 902.
[26]  AS 22.10.020(a) (superior court jurisdiction); AS 22.07.020(a)(2) (court of appeals jurisdiction).
[27]  See Alaska Wildlife Alliance v. State, 74 P.3d 201, 208 (Alaska 2003) ("Res judicata is not defeated by substituting one state entity for another when the claim is based on the same conduct, and when the same defense of non-justiciability applies regardless of which specific state entity is named as a defendant."); see also Mathis v. Laird, 457 F.2d 926, 927 (5th Cir.1972) (holding res judicata barred former soldier's suit against Secretary of Defense because prior suit named United States as defendant); Tabman v. U.S. Dep't of Justice, 722 F.Supp.2d 113, 116 & n. 2 (D.D.C.2010) (holding Federal Bureau of Investigation and Department of Justice were same party or in privity for claim preclusion purposes and noting claim would also be barred if plaintiff named United States as defendant).
[28]  See State v. ACLU of Alaska, 204 P.3d 364, 368-69 (Alaska 2009) ("[W]hile Alaska's standing rules are liberal this court should not issue advisory opinions or resolve abstract questions of law." (quoting Bowers Office Prods., Inc. v. Univ. of Alaska, 755 P.2d 1095, 1097-98 (Alaska 1988))).
[29]  Id.
