The Capability Boundaries and Open-Source Value of LLMs Generating Frontend Projects from Requirement Documents

    Large language models can now turn a product requirement document into a runnable frontend project, but "generating a page" and "correctly implementing requirements" are not the same thing. This article breaks requirement restoration into three difficulty levels—page skeleton, interaction and state, and business rules—proposes a reproducible evaluation method with verifiable acceptance items and checklists, examines the practical value of open-source models, and outlines how AI-driven development reshapes requirement engineering, testing, and team roles. It also provides concrete engineering steps and code review checkpoints for teams adopting this workflow.

    Why Model Requirement Understanding Matters

    Over the past couple of years, large language models have moved from conversational tools into the software development workflow. A common use case: a developer provides a product requirement document, and the model outputs a runnable frontend project. Many teams see this as an efficiency gain, but “generating a page” and “correctly implementing the requirements” are two different things. The former asks whether an interface appears; the latter asks whether every business rule is actually implemented.

    A common pitfall in evaluation is judging only by the first screen. A polished, well-structured page does not mean filtering conditions, field dependencies, and validation rules were correctly understood. In one public demonstration, a domestic large model performed well on a login page but clearly missed filtering features on a list page and field validation on a form page. Such observations are single-run, small-sample subjective conclusions—not general performance benchmarks—but they point to a question worth systematic study: at which layer does the model start losing requirement information?

    Three Levels of Difficulty in Requirement Restoration

    Requirement restoration can be split into three levels, each with different difficulty.

    1. Page skeleton: layout, routing, and component structure. This level is usually reliable, since these patterns are extremely common in public code—models have seen plenty of boilerplate.

    2. Interaction and state: loading states, empty states, error messages, and button disable conditions. This level requires translating text descriptions into state changes and easily misses edge cases—for example, whether a button becomes clickable again after a failed request.

    3. Business rules: how filter conditions combine, dependencies between fields, and the order of pre-submit validation. This level depends most on precise document understanding and is where “the page was built, but the rules were missed” most often occurs.

    Missing skeleton-level elements are usually visible at a glance from a screenshot. Missing business rules typically only surface through actual interaction. Evaluation must therefore check each item individually, not rely on screenshots.

    Designing a Reproducible Evaluation Method

    1. Write Requirements as Verifiable Acceptance Items

    Every requirement should answer “what counts as passing.” For example:

    • The list page provides “Status” and “Created At” filters; selecting them refreshes the list within a single request.
    • The “Discount Rate” field appears only when “Promotion Type” is “Full Reduction”; its value must be an integer from 0 to 100.
    • On submission failure, user-entered content is preserved and error messages are shown below the corresponding fields.

    The more specific the acceptance items, the more credible the evaluation results.

    2. Record Results with a Checklist

    Map each acceptance item to a check function that outputs pass or fail, making multi-round comparisons easy. The following is a structural sketch; actual check logic must be implemented for your pages and test environment:

    1. checklist = [
    2. {"id": "LIST-01", "rule": "Status and Created At filters exist", "passed": False},
    3. {"id": "FORM-02", "rule": "Discount Rate appears only for Full Reduction type", "passed": False},
    4. {"id": "FORM-03", "rule": "Submitted content preserved on failure", "passed": True},
    5. ]
    6. def pass_rate(items):
    7. total = len(items)
    8. if total == 0:
    9. return 0.0
    10. passed = sum(1 for item in items if item["passed"])
    11. return passed / total
    12. print("Pass rate:", pass_rate(checklist))

    This structure lets you compute pass rates separately for the business-rules layer, so skeleton-level high scores don’t mask deeper problems.

    3. Control Variables and Repeat Tests

    Generate the same requirements multiple times and record the distribution of success rates, not just the single best result. External factors such as queue times, free-tier limits, and per-run latency should be logged separately, so they aren’t misattributed to differences in model capability.

    • Completion rate: proportion of acceptance items passed out of the total.
    • Understanding accuracy: pass rate for rule-type items, computed separately.
    • Maintainability: whether the directory structure and component decomposition are sensible, and whether future modification costs are manageable.
    • Time and cost: time from submitting requirements to obtaining a runnable project, plus cost per call.

    The Practical Value of Open Source

    Open-source models offer value in four main ways.

    First, auditability. Teams can inspect model weights, inference code, and license terms to verify compliance with internal policies.

    Second, private deployment. Requirement documents and source code often contain sensitive information; local deployment reduces leakage risk.

    Third, fine-tuning. Enterprises can adapt models to their domain using their own requirement documents and code, improving performance on the business-rules layer.

    Fourth, lower experimentation costs. Small teams can validate new ideas without paying high API fees.

    But open source does not mean equal capability. Key questions include: the origin and licensing of training data, whether the license permits commercial use, whether the community maintains the model actively, and whether the model remains stable with long contexts and multiple constraints. The real value of open source is that outsiders can verify claims—and verification itself depends on public, reproducible evaluation.

    Impact on the AI Development Workflow

    1. Requirement Documents Become Core Assets

    Models are highly sensitive to document quality. Clear, verifiable requirements noticeably improve generation quality. Product managers and developers need to describe requirements more systematically, and requirement engineering becomes more important.

    2. Human-Machine Division of Labor Redrawn

    Models are well suited to skeleton building, repetitive pages, and boilerplate code. Humans should focus on reviewing business rules, edge conditions, and security-related logic.

    3. Testing Moves Earlier

    Acceptance items can be converted directly into automated test cases. The earlier tests are defined, the easier generated code is to verify.

    4. Team Skill Structures Shift

    The share of junior, repetitive coding work will decline, while demand for code review, architectural judgment, and requirement decomposition will rise.

    Practical Steps for Engineering Adoption

    1. Choose a real but small-scope page as a pilot.
    2. Write numbered acceptance items, grouped into skeleton, interaction, and rule categories.
    3. Run multiple generation rounds for the same requirements, recording check results for each round.
    4. Perform root-cause analysis on failed items: is the problem in the requirement description or in model understanding?
    5. If it’s a description problem, revise the document and retest; if it’s an understanding problem, evaluate whether to add examples or split the task.
    6. All generated code must pass code review, security scanning, and manual acceptance before entering the release process.

    When reviewing generated code, focus on the following:

    • Business rules correspond to the document item by item—not merely resembling it on the surface.
    • Form validation exists on both the frontend and the server side. Frontend validation cannot replace server-side validation.
    • User input is escaped before display and storage to prevent cross-site scripting and similar risks.
    • Dependencies come from trusted sources with pinned versions.
    • Error handling and loading states are complete, and the UI can recover from network failures.

    Knowing the Boundaries

    The quality of model-generated code depends on requirement quality, context length, and how tasks are split. A single trial cannot represent stable performance; multi-round evaluation and real business acceptance are the reliable yardsticks. Before introducing models into their workflow, teams should first establish a reproducible evaluation process, then decide which stages to use models in—and who is accountable for the results.