Warren, Justice. After a jury trial in 2016, Alfred Moore was convicted of first- degree burglary, for which he was sentenced to serve 20 years in prison, and other crimes, resulting in a total sentence of 45 years to serve. On direct appeal, the Court of Appeals in an unpublished opinion affirmed Moore’s convictions on grounds that are not pertinent to this appeal. See Moore v. State, Case No. A19A0936 (decided May 28, 2019). Moore then filed a petition for habeas corpus, which he later amended, contending (as relevant here) that his appellate counsel provided constitutionally ineffective assistance by failing to argue that his trial counsel was constitutionally ineffective for not challenging the first-degree burglary count in the indictment. Specifically, Moore asserted that because the indictment charging the first-degree burglary count alleged only that he committed that crime by entering (without authority and with the intent to commit a felony) a “business,” it failed to allege an essential element of the crime: that Moore entered a “dwelling house” or a building “designed for use as [a] dwelling.” OCGA § 16-7-1 (b). The habeas court denied Moore’s petition.[1] We granted Moore’s application for a certificate of probable cause to appeal to consider whether the habeas court erred by ruling that Moore had not established that his appellate counsel provided ineffective assistance. On appeal to this Court, the Warden now concedes that the habeas court erred in this respect, and as explained below, we agree. We therefore reverse the denial of habeas relief as to Moore’s conviction for first-degree burglary and direct the habeas court to enter an appropriate order granting relief. 1. (a) Indictment and Trial. In October 2013, Moore, along with a co-defendant, was indicted for first-degree burglary; two counts each of armed robbery, aggravated assault, and false imprisonment; impersonating an officer; and possession of a firearm during the commission of a felony.[2] In the indictment, the count titled “Burglary in the First Degree, OCGA § 16-7-1 (b)” alleged that in June 2013, Moore “without authority and with the intent to commit [a]rmed [r]obbery, a felony therein, enter[ed] the business of Luis Rodriguez located” at a specific address on Log Cabin Drive in Macon. Moore was tried in March 2016, and as pertinent here, the evidence presented to the jury showed the following. On the evening of June 12, 2013, Rodriguez, who owned several restaurants in Macon, and his employee Griselda Zabala were working at the office for the restaurants, which was located in a building that was originally designed as a residential home on Log Cabin Drive. The building contained only office furniture, and no evidence was presented indicating that anyone lived there. Two men who were wearing sheriff’s deputy uniforms and who were later identified as Moore and his co-defendant knocked on the door. When Rodriguez answered, Moore said that he had a warrant to search the property, and Rodriguez let the men in. Moore then tied Rodriguez’s and Zabala’s hands while the co-defendant pointed a gun at them. Moore searched the property, collected $2,600 in cash, and fled with the co-defendant. At trial, Rodriguez and Zabala identified Moore as one of the assailants, and the co-defendant admitted that he and Moore committed the crimes. Moore presented an alibi defense. During the final charge, the trial court instructed the jury, among other things, “[A] person commits the offense of Burglary in the First Degree when, without authority and with the intent to commit a felony therein, that person enters a building or the dwelling of another.” The court then explained that armed robbery is a felony and said, “It’s only necessary that the evidence show beyond a reasonable doubt that [Moore] did, without authority, enter the place described in the [i]ndictment with the intent to commit the alleged felony, that being [a]rmed [r]obbery.” Trial counsel did not object to the charge. The jury ultimately found Moore guilty of all counts. The trial court sentenced him to serve 20 years in prison for first-degree burglary and imposed additional sentences for two counts of armed robbery, two counts of false imprisonment, impersonating an officer, and the firearm offense, resulting in a total sentence of 45 years to serve in prison.[3] Moore then filed a motion for new trial, raising claims that are not pertinent to this appeal, and the trial court denied the motion.[4] Moore appealed, again asserting claims that have no bearing here, and in May 2019, the Court of Appeals affirmed his convictions.[5] Moore then filed an untimely petition for certiorari in this Court, which we dismissed in January 2020. (b) Habeas Proceedings. In March 2020, Moore, representing himself, filed a timely petition for habeas corpus, which he amended through counsel in February 2021.[6] Moore claimed, among other things, that his appellate counsel provided constitutionally ineffective assistance by failing to assert that his trial counsel was ineffective for not challenging the first-degree burglary count in the indictment. In this respect, he argued that although OCGA § 16-7-1 (b) says, as pertinent here, that a person commits the crime of first- degree burglary when he, without authority and with the intent to commit a felony, enters a “dwelling house of another” or a building “designed for use as the dwelling of another,” the indictment alleged that he committed first-degree burglary only by “enter[ing a] business.” Because the first-degree burglary count did not allege that Moore entered a “dwelling house” or a building designed for use as a “dwelling,” Moore asserted, the count failed to allege all the essential elements of first-degree burglary. Moore conceded, however, that the language in the first-degree burglary count sufficiently alleged that he committed second-degree burglary, a crime for which the maximum sentence is five years in prison. At a hearing in March 2021, Moore reiterated his ineffective assistance of appellate counsel argument, noting that because the language in the indictment sufficiently alleged second-degree burglary, “he should have been sentenced for five years.” The Warden opposed that claim, as well as Moore’s other claims. In July 2022, the habeas court issued an order denying habeas relief, and as pertinent here, concluded that Moore’s appellate counsel was not ineffective because the first-degree burglary count in the indictment sufficiently alleged that crime, as the count referenced the first- degree burglary statute, OCGA § 16-7-1 (b). Moore timely filed a notice of appeal and an application for a certificate of probable cause to appeal. At our direction, the Warden filed a response, which conceded that the habeas court erred by concluding that Moore’s appellate counsel was not constitutionally ineffective. We then granted Moore’s application, asking whether the habeas court erred in this regard. 2. In reviewing the denial of a petition for habeas corpus, although we “‘accept[] the habeas court’s factual findings and credibility determinations unless they are clearly erroneous,’” we “‘independently apply the law to the facts.’” Ward v. Medina, 316 Ga. 345, 349 (888 SE2d 84) (2023) (citation omitted). A petitioner seeking habeas relief bears the burden of establishing that his constitutional rights were violated. See id. To succeed on his claim that his appellate counsel provided constitutionally ineffective assistance, Moore must show that appellate counsel performed deficiently (i.e., that she “performed [her] duties in an objectively unreasonable way, considering all the circumstances and in the light of prevailing professional norms”) and that the deficiency prejudiced Moore’s direct appeal (i.e., that but for counsel’s unprofessional errors, the result of Moore’s direct appeal would have been different). Cartwright v. Caldwell, 305 Ga. 371, 378 (825 SE2d 168) (2019) (citing Strickland v. Washington, 466 U.S. 668, 687 (104 SCt 2052, 80 LE2d 674) (1984)). See also Henderson v. Hames, 287 Ga. 534, 536 (697 SE2d 798) (2010). To show prejudice in this context, Moore must demonstrate that the underlying ineffectiveness-of- trial-counsel claim that he says appellate counsel should have raised “would have had a reasonable probability of success.” Cartwright, 305 Ga. at 378. Thus, he “must show that his trial counsel performed deficiently, and that, but for trial counsel’s deficient performance, there is a reasonable probability that the outcome of the trial would have been different.” Id. Turning first to the issue of trial counsel’s ineffectiveness, we begin by addressing whether Moore’s trial counsel performed deficiently by failing to challenge the first-degree burglary count on the ground that it failed to allege that Moore entered a “dwelling house of another” or a building “designed for use as the dwelling of another.” OCGA § 16-7-1 (b) says, in pertinent part: A person commits the offense of burglary in the first degree when, without authority and with the intent to commit a felony or theft therein, he or she enters or remains within an occupied, unoccupied, or vacant dwelling house of another or any building, vehicle, railroad car, watercraft, aircraft, or other such structure designed for use as the dwelling of another. The first-degree burglary count in the indictment charged only that Moore entered Rodriguez’s “business,” which, Moore claims, alleged conduct that would amount only to second-degree burglary. See former OCGA § 16-7-1 (c) (providing, as pertinent here, “A person commits the offense of burglary in the second degree when, without authority and with the intent to commit a felony or theft therein, he or she enters or remains within an occupied, unoccupied, or vacant building, structure, vehicle, railroad car, watercraft, or aircraft”).[7] It is well settled that an indictment must “‘contain every allegation essential to constitute the crime.’” Sanders v. State, 313 Ga. 191, 196 (869 SE2d 411) (2022) (citation omitted). An essential element of the charged crime of first-degree burglary is that the defendant entered or remained within a “dwelling house” or building designed for use as a “dwelling.” See Dupree v. State, 303 Ga. 885, 888 (815 SE2d 899) (2018) (explaining that under OCGA § 16-7-1 (b), “what is required is entry of or remaining within, in this case the dwelling house of another, without authority and with the intent to commit a felony or theft therein”) (punctuation omitted). The indictment omitted any reference to a “dwelling house” or a building designed for use as a “dwelling,” so it failed to allege an essential element of first-degree burglary. And contrary to the habeas court’s conclusion in its order denying relief, the indictment’s reference to OCGA § 16-7-1 (b) in the first-degree burglary count did not render that count sufficient. See Jackson v. State, 301 Ga. 137, 139 (800 SE2d 356) (2017) (explaining that an indictment that merely references or cites the statute that the defendant is accused of violating, without alleging “things that are essential elements of a violation of the statute” does not sufficiently allege the crime described in the statute). Because the indictment failed to allege all the essential elements of first-degree burglary, it was subject to a special demurrer. A special demurrer “‘challenges the sufficiency of the form of the indictment.’” Kimbrough v. State, 300 Ga. 878, 880 (799 SE2d 229) (2017) (emphasis and citation omitted). The test for determining the constitutional sufficiency of an indictment is whether it contains the elements of the charged offense, sufficiently apprises the defendant of what he must be prepared to defend against, and in case of another prosecution for a similar offense, enables him to determine whether he may plead a former conviction or acquittal. See, e.g., Sanders, 313 Ga. at 195; Smith v. State, 303 Ga. 643, 647 (814 SE2d 411) (2018). A special demurrer must be filed within ten days of arraignment, unless the time for filing is extended by the trial court. See OCGA § 17-7-110. Trial counsel’s failure to raise the issue of the defective first- degree burglary count by special demurrer was not a reasonable trial tactic or strategy. And the requirement in OCGA § 16-7-1 (b) that the defendant entered or remained within a type of “dwelling” of another person was not difficult to discern; rather, it is found in the plain language of the statute. Thus, no reasonably competent lawyer would have failed to file a special demurrer challenging the first-degree burglary count, and Moore has met his burden of showing that trial counsel performed deficiently in this respect. See Henderson, 287 Ga. at 539-541 (explaining that the defendant’s counsel provided ineffective assistance by failing to challenge a count in the indictment of felony murder predicated on misuse of a firearm while hunting on the ground that it failed to allege all the essential elements of that crime, which was “not a reasonable tactic” because the essential element that the indictment failed to allege “was not difficult to discern or the product of esoteric or unpredictable judicial decisions. Instead, it is found in the plain language of the statute”). And absent trial counsel’s failure to file a special demurrer, it is reasonably probable that the result of the trial would have been more favorable to Moore. As discussed above, had counsel filed a timely special demurrer before trial, see OCGA § 17-7-110, the trial court should have granted it. At that point, the State could have corrected its error and re-indicted Moore. See State. v. Heath, 308 Ga. 836, 840 (843 SE2d 801) (2020) (explaining that “[b]ecause a special demurrer must be brought before jeopardy attaches, the State can usually re-indict before trial unless the statute of limitations for the crimes with which the defendant was charged bars the prosecution, see OCGA § 17-3-1, or the re-indictment is prohibited under OCGA § 17-7-53.1, which disallows prosecution after two indictments charging the same offenses have been quashed” and that consequently, the failure to file a special demurrer generally does not support a conclusion of Strickland prejudice). But in so doing, the State could have amended the first-degree burglary count to allege the essential element that Moore entered a building “designed for use as the dwelling of another” when he entered the building that was originally designed as a residential home, or the State could have charged Moore with second-degree burglary by entering a building, or the State could have dismissed the charge. The Warden’s concessions in this case establish that it is reasonably probable that the State would have charged Moore with second-degree burglary. In this respect, the Warden (represented by the office of the Attorney General) concedes in this Court that the indictment failed to allege the essential elements of first-degree burglary but sufficiently alleged the crime of second- degree burglary; the evidence presented at Moore’s trial “d[id] not satisfy the statutory requirement for the offense of burglary in the first degree,” such that it was insufficient to support that crime as a matter of constitutional due process; and Moore should have been convicted of and sentenced for second-degree burglary, rather than first-degree burglary. We accept the Warden’s concession that “there is Strickland prejudice here because there is a reasonable probability that the outcome of the trial would have been different had trial counsel filed a special demurrer.” In sum, Moore has met his burden of proving that his trial counsel provided constitutionally ineffective assistance by failing to challenge the first-degree burglary count. We therefore conclude that any deficiency in appellate counsel’s failure to raise that ineffectiveness-of-trial-counsel claim prejudiced his appeal. See Cartwright, 305 Ga. at 381. And as to appellate counsel’s deficiency, we see no good reason why a competent appellate lawyer would have failed to raise such an obviously meritorious claim under these circumstances. See id. Moore has therefore established that his appellate counsel was ineffective for not raising the issue of trial counsel’s ineffectiveness. Thus, as the Warden concedes, the habeas court erred by denying relief on this ground. See Henderson, 287 Ga. at 539-540.[8] Accordingly, we reverse the habeas court’s denial of relief as to Moore’s first-degree burglary conviction, and we remand the case to that court with direction to enter an order vacating that conviction and granting other appropriate relief consistent with this opinion. See id. at 540 (holding that the habeas court correctly ruled that the defendant’s conviction for felony murder based on misuse of a firearm while hunting must be vacated because his counsel provided constitutionally ineffective assistance by failing to argue that the indictment did not allege an essential element of that crime).[9] Judgment reversed in part, and case remanded with direction. All the Justices concur.