By

Legal issues in vibe-coded apps: have AI review them with the Korean law API (법제처 API) at the PRD stage

When you vibe-code an app, the features run within a day, but AI does not ask first about legal conditions such as separate consent for health data, guardian consent for children under 14, overseas transfer when data goes to a foreign AI API, resident registration numbers, app permissions, records that must be kept after account deletion, and refunds for digital goods. This post lists seven issues that came up repeatedly across 16 PRDs written with meta-plan, with what the current Korean statutes require, and proposes a workflow in which AI reads the original statutes through the Korean Ministry of Government Legislation Open API while writing the PRD, concludes each issue as allowed, conditionally allowed or prohibited, and reflects it in the design. Automated review is not legal advice, so low-confidence issues are left as questions to take to a lawyer.

Continues frommeta-plan: What I Learned Building a Claude Code Plugin That Rewrites a PRD Until Several AIs Agree
법률 쟁점은 PRD 단계에서 법제처 API 조문 원문으로 검토. legal-review.md 가상 예제: L-01 가족 복약 기록 앱이 복용 기록을 서버에 저장해도 되나 — 결론 조건부 허용(가입 동의와 분리한 민감정보 별도 동의가 있을 때만 저장), 근거 개인정보 보호법 제23조 제1항 제1호, 확신도 높음.
legal-review.md 부분은 공개 설명용 가상 예제입니다.

AI builds the feature you asked for; it does not ask first about the law attached to it

Vibe coding means describing what you want in plain words and letting AI write the code. Ask for 'a family medication log app' and within a day you get a working app with sign-up, photo upload of pill bags, dose reminders and a delete-account button. The trouble comes next. Dosing records are health information, a parent uploads a child's records, and photo reading is sent to an overseas AI service. Each of these has its own consent method and notice that the law requires, and AI does not ask about them first, because nobody told it to.

If you find out after launch, the fix is expensive. Splitting the consent screen means reconciling the consent records of people who already signed up, and changing what is deleted or kept on account deletion means changing the data structure. Caught at the planning-document stage, it is a matter of editing a few sentences. So I put a legal review into the stage where the PRD is written. A PRD is a product requirements document that states what to build and which conditions it must meet.

This review runs inside meta-plan, a private Claude Code plugin. A plugin is an extension that bundles frequently used procedures and tools and attaches them to the AI. The overall structure was covered in an earlier post; this one covers what the legal review actually found and how to use the same approach without the plugin.

Seven issues that came up repeatedly across 16 PRDs

Of the PRDs I wrote with meta-plan in October and November, 16 have legal review conclusions filled in. They are different products, such as a medication log app, an app for insurance planners, a developer portal that sells prepaid credits and a work-log tool, yet the same issues kept coming back. The table below groups them by feature and records what the current statutes require as of November 18, 2026. Read it not as a verdict on whether your app is allowed, but as a list of questions to ask about your app. These are Korean laws; the same kinds of questions apply elsewhere under different statutes.

A few terms first. Sensitive information is data such as health, beliefs or sex life whose leak would seriously harm privacy, and the law treats it more strictly. A legal guardian acts legally on behalf of a minor, usually a parent. A privacy policy is the document that discloses what personal data a service handles, why, and for how long; entrusted processing means handing part of your service's data processing to another company. App permissions let an app use the phone's camera, photos or contacts, and the right of withdrawal lets a consumer cancel a purchase within a set period.

In vibe coding, the third and sixth items leak most often. AI writes the few lines that send photo reading or summarization to an overseas AI service, and nothing in that code shows that personal data has just left the country. A delete-account button tends to end at 'remove it from the database', but the statutes require deleting without delay while keeping, separately, records another law requires you to retain. Deleting everything is wrong, and so is keeping everything.

One more. The guardian provision applies only to children under 14. A feature that lets someone upload an adult family member's medication records is not solved by it; how to get that adult's own consent becomes a separate issue. A feature requested in one word, 'family', mixes different legal conditions.

FeatureProvisionWhat the provision requires
Storing health, medication or treatment recordsPersonal Information Protection Act Art. 23Sensitive data may not be processed in principle. Requires consent separate from other consents, or a statutory basis
Child accounts, registering a child's recordsPersonal Information Protection Act Art. 22-2For children under 14, obtain a legal guardian's consent and verify that it was given
Sending personal data to overseas AI APIs or cloudsPersonal Information Protection Act Art. 28-8Overseas transfer is prohibited in principle. Get separate consent, or, for entrustment or storage needed to perform a contract, disclose the items, country, recipient and more in the privacy policy
A resident registration number fieldPersonal Information Protection Act Art. 24-2May not be processed unless, for example, a law specifically requires or permits it. Even then, store it encrypted
Camera, photo and contacts permissionsInformation and Communications Network Act Art. 22-2Separate required from optional, state the items and reasons, and get consent. Do not refuse service because an optional permission was declined
Account deletionPersonal Information Protection Act Art. 21; E-Commerce Act Enforcement Decree Art. 6Destroy without delay, but keep separately what other laws require. Online sales records: contracts and payments 5 years, complaints and disputes 3 years, advertising 6 months
Selling credits, subscriptions or digital goodsE-Commerce Act Art. 17Withdrawal can be limited once digital content delivery starts, except for the unstarted part of divisible goods. Requires notice that withdrawal is impossible and a trial version, among others

meta-plan splits each issue into one sentence and reads the original text first

Screen reproducing, in terminal form, the actual output of law.py searching the Personal Information Protection Act and showing the original text of Article 23 (restriction on processing sensitive information): law ID 283839, effective 2026-09-11, with the separate-consent clause in paragraph 1 item 1.
Actual output that meta-plan's law lookup tool (law.py) received from the Ministry of Government Legislation Open API. Queried 2026-11-18.
The four steps of meta-plan's legal review: split issues, find statute text, reach a conclusion, reflect it in the PRD with a confidence level.

meta-plan's legal review has four steps. First it picks the fields the topic touches (personal data, medical and pharmacy, e-commerce, location data, disability access, copyright and so on) and splits issues into one sentence each: 'May this feature do X?'. Next, for each issue it finds the original text of statutes, decrees and notices, legal interpretations and court rulings, using the Open API of the National Law Information Center run by the Ministry of Government Legislation. An API is a window through which one program requests data from another service in a fixed format, and this one returns the original text and effective dates of laws, rulings and interpretations.

Third, it concludes each issue as allowed, conditionally allowed (with the condition stated) or prohibited. Last, it records which requirement, screen text or consent step in the PRD that conclusion becomes, and adds a confidence level (high, medium, low). Conclusions go into a single file, legal-review.md, and the PRD body keeps only the conclusion and the issue number. Reading the original text overlaps with the research phase, so the overall planning time does not grow much.

The screen above is the actual output of the lookup tool meta-plan uses, searching for the Personal Information Protection Act and opening Article 23. The law ID, effective date and article text come back as is. Below is a fictional example for public explanation showing what one conclusion looks like.

Shape of one legal-review.md entry (fictional example for explanation)
## L-01 May a family medication log app store dosing records on its server?
- Conclusion: Conditionally allowed — store only with separate consent for sensitive data, distinct from sign-up consent
- Basis: Personal Information Protection Act Article 23(1)1 (effective 2026-09-11), original text
- Design: a health-data consent step separate from sign-up; stop server sync when consent is withdrawn
- Confidence: high

The places where automated review goes wrong are blocked by rules

AI reading statutes does not guarantee a correct conclusion, so the places where it tends to go wrong are blocked by rules. If a search returns 0 results, that does not mean 'no rule exists'; it changes the search terms and tries again. Statutes often only match under their official name, and rulings under words from their body. It does not conclude from a list of search results; it opens and reads the original text of any article it relies on. It checks effective dates too, because some articles are promulgated but not yet in force.

Some material cannot be read through the API. When the original of a government agency's criteria or an annex to a notice cannot be obtained, it lowers the confidence of that conclusion by one level and says so. That happened when reviewing whether a dose reminder feature falls under medical device regulation. The original criteria of the Ministry of Food and Drug Safety could not be obtained, so confidence was lowered and the app was designed conservatively so that it never calculates or recommends doses.

When interpretations differ or there is no precedent, it designs on the side of compliance and adds 'counsel recommended'. What goes to a person is only a decision that trades legal risk against a business goal, such as 'a conservative design makes the feature's goal impossible'. And this is automated review, not legal advice. Before launch, the final call, especially on low-confidence or prohibited issues, should be confirmed by a lawyer. The AI review's job ends at organizing the questions to take to that lawyer, with article numbers attached.

One thing to try today: add five lines of legal review to your PRD request

Three things to do today: get the OC key, attach the five-line legal review request, and check the evidence field of the result first.

You can use the same approach without meta-plan. First, apply for Open API use on the national law information sharing site (open.law.go.kr) and receive a credential called OC. Apply for court rulings and legal interpretations as well as statutes, or those types cannot be queried. The detailed steps are in the 'how to get an OC' section of the earlier meta-plan post. Do not paste the OC value into the request; keep it in an environment variable, a setting outside the code that a program reads when it runs.

Then, when you ask AI for a planning document or an app, attach the five lines below. An AI that can run commands, such as Claude Code, calls the API directly. With a chat AI that cannot use the API, you can copy the relevant articles from the National Law Information Center (law.go.kr) and include them. The point is to make AI speak about the law after reading the original text, not from memory.

When the result comes back, look at the basis column before the conclusion. Check that article numbers and effective dates are written, and which issues are marked 'needs lawyer review'. That list is the question sheet to take to an expert before launch.

Legal review request to paste into a planning or build request
List the legal issues in this plan, one sentence each, in the form 'May this feature do X?'.
For each issue, use the Korea Ministry of Government Legislation Open API (National Law Information Center; credential in the LAW_API_OC environment variable) to find and read the original text of statutes, enforcement decrees, legal interpretations and court rulings, and record the article number and effective date.
If a search returns 0 results, do not treat it as 'no rule exists'; change the search terms and try again.
Conclude each issue as allowed / conditionally allowed (with the condition) / prohibited, and state which screen text, consent step or data handling it becomes.
If you could not read the original text or interpretations differ, lower the confidence, design on the side of compliance, and mark it 'needs lawyer review'.