Is my accuser the person who petitioned the county to investigate a code violation?
It depends on whether you were cited for the violation and the nature of the violation.
Contrary to the other answers here, building-code violations in Maryland can, in fact, be criminal offenses, civil offenses, or both. See, e.g., Baltimore Building Code § 35-2-304(b):
(1) A person may not erect, construct, repair, alter, remodel, remove, or demolish a building or structure or part of a building or structure in the county without obtaining a permit.
(2) A person who violates this section is guilty of a misdemeanor.
(3) A person who violates this section is also subject to a civil penalty of $1,000.
If you received a criminal citation, the Sixth Amendment right to confront your accuser would likely still not help. It sounds like a neighbor's complaint triggered an investigation by a county employee, who then cited you for a violation. The investigator would therefore be your accuser, not the caller.
However, the Sixth Amendment also includes the right to "compulsory process," which would probably allow you to access records showing who the caller was. Your state's rules of criminal procedure would probably also allow you to obtain this information through Rule 16 discovery.
If the complaint was only civil, or if you were only issued a warning, you may have access the caller's identity through the Maryland Public Information Act. Generally speaking, it entitles a citizen of the state to inspect any documents made or received by the government.
In the only case I know of dealing with phone records, the courts allowed the Washington Post to access phone records from the governor. While the Court restricted access to records of personal phone calls made by the governor's family at the executive residence, it generally allowed access to records that would allow the newspaper to see who had called and been called by various other officials. Office of Governor v. Washington Post Co., 360 Md. 520 (2000).
Applying that logic to your situation, I'd expect that records of who called the building department about a code violation would be available to you. In principle, you'd likely just need to fill out a form to request those records. In Baltimore County, that form is available here.
The Sixth Amendment states that "In all criminal prosecutions, the accused shall enjoy... the right to be confronted with the witnesses against him". You are not being criminally prosecuted, so the Sixth Amendment simply does not apply.
Is my accuser the person who petitioned the county to investigate a code violation?
No. The Sixth Amendment provides the right to know the name of anyone who is asserting to have personal knowledge of your alleged offense, if the government relies on that assertion in evaluating your guilt. If the government independently verifies the facts involved, and does not rely on the original assertion, the Sixth Amendment doesn't apply to the original complaintant. If they are relying on one or more factual assertions in the petition, that's a different matter.
For instance, if there's a ordinance prohibiting fences more than six feet high, and someone files a complaint saying that your fence is seven feet high, and the county sends a county employee out to measure your fence, and the employee finds that the fence is seven feet high, and the county relies on that determination to charge you with an offense, then that county employee is your accuser, not the person who filed the complaint.
The Sixth Amendment does not help you, but your state's Public Records law might. This is the law for Washington state. Under that state law, government records are public, with certain exceptions. So the first question is whether there is a government record of the alleged code violation. An actual letter (as opposed to an anonymous phone call) would be a disclosable record, unless there is an exemption. One exception is the "invasion of privacy" exemption, in case disclosure would be highly offensive to a reasonable person, and not of legitimate concern to the public. Knowing that Smith filed a complain is not offensive, and knowing that Smith has a habit of filing complaints could easily be the topic of a news investigation. Records that would violate "vital governmental interests" can also be withheld, but secrecy of the name of a complainer is not such an interest. RCW 42.56.230 covers certain kinds of "personal information", primarily school / FERPA-related and health / HIPAA-related information. Also excluded are certain kinds of taxpayer assessment information that could put the subject at a competitive business disadvantage; financial records (e.g. credit card numbers), proof of identify such as birth certificate, SS number, information volunteered in making a 911 call. There are also exceptions in RCW 42.56.240 for information provided to law enforcement if nondisclosure is essential to effective law enforcement or protection of a witness, certain records about sex offenses, GPS data on a law enforcement officer (etc...) – none of which covers "person who files a complaint against a person for code violations", and all are about criminal law enforcement as opposed to code infractions. There are very many enumerated exceptions, and none of them can, from what I can determine, shield a person who files a complaint from having their name revealed, if they identified themselves. Of course, there are 50 states, so your state may be different.
The 14th Amendment is what you are looking for, not the 6th. A code violation is not a crime. The 6th amendment is specific to criminal cases. A test to determine if 6th amendment rights are thought to apply, would be if an attorney provided to represent a person if they couldn't afford one themselves.
"In all criminal prosecutions, the accused shall enjoy the right to a speedy and public trial....and to have the assistance of counsel for his defense."
The 5th Amendment and the 14th amendment mention due process and the 14th amendment the 14th amendment section 1 reads:
"All persons born or naturalized in the United States, and subject to the jurisdiction thereof, are citizens of the United States and of the state wherein they reside. No state shall make or enforce any law which shall abridge the privileges or immunities of citizens of the United States; nor shall any state deprive any person of life, liberty, or property, without due process of law; nor deny to any person within its jurisdiction the equal protection of the laws."
However, being issued a notice of a code violation isn't covered in the constitution like criminal proceedings are so its unclear what process is due and courts have struggled with these questions and answers are typically related to due process of law, as in the judicial system.
Code violations are not civil or criminal matters, they are administrative in nature and issued by entities like a building department or planning department. Fines, liens, and other tools that could be used to prevent non-compliance wouldn't be subject to the review of a real court with a real judge unless you challenge the decisions made by the applicable entity. And review of a typical code violation is not the same thing as the far less common situation where a basic code violation turns into something of a civil or criminal nature.
An actual notice of a code violation in the City of Baltimore states that a code violation is an administrative remedy unless and until the person cited fails to comply with the orders contained in the notice:
"Failure to correct each violation in the time and manner prescribed is a criminal misdemeanor subject to a fine of up to $500 per day. A violation may also be enforced by Court Order and civil penalty. In addition to initiating prosecution or other legal enforcement proceedings the Commissioner or an authorized representative of the Commissioner is authorized to complete all required work without further notice. The expense of the work will be both a personal debt and a lien against the property."
It further notes on the same notice document that the process to challenge an alleged violation is through administrative review of the violation and cites the City of Baltimore Building, Fire, and Related Codes.
BFRCRC section 128 "Administrative and Judicial Review" reads:
"If any person is aggrieved by any notice, order, permit, penalty assessment, or other act of the Building Official, the person may apply in writing to the Building Official for a review."
It calls this an "administrative" process [BFRCRC 188.8.131.52]:
"A decision issued under this § 128 is a final administrative decision."
Section 128.6 "Judicial review" requires the administrative hearing process be had prior to any legal right to judicial review.
Section 128.6 Judicial review reads:
"A party aggrieved by the decision may seek judicial review of that decision by petition to the Circuit Court for Baltimore City in accordance with the Maryland Rules of Procedure. A party to the judicial review may appeal the court’s final judgment to the Court of Special Appeals in accordance with the Maryland Rules of Procedure."
And even though there are laws enabling building departments to issue citations and fines, these types of actions are still right below any sort of judicial involvement. However, the next step is almost always into court as civil courts are the official review process for administrative decisions of all kinds like those of building authorities, licensing boards, boards of directors, the DMV, or other entities that have the power to make important decisions like revoking a doctor's medical license. This is why a county courthouse is called a "superior" court even though decisions in superior courts are subordinate to those of state appeals courts, state supreme courts, and all federal courts.
Your right to know who reported you isn't really related to any of those and whoever has that information is unlikely to turn it over to you if they haven't already. Even if you filed a lawsuit related to this, the judge still would be unlikely to order that information be made known if the defendant doesn't hand it over willingly during informal discovery.
Oddly, one is not always guaranteed due process, and in many circumstances a lack of process is said not to prejudice a party enough to qualify them for relief. Appeals courts often will conclude that a person's due process rights weren't violated because due process is supposedly only required at a final hearing and not before. For example, in a case for replevin/claim and delivery, a judge can order the sheriff to go and take a defendant's personal property if another person claims it to be their own prior to the defendant being allowed to be heard in the case, submit any opposition, or even having knowledge that a case has been filed and that the title to the items is being disputed. Of course, this is prior to a final hearing to decide title to the property.