AI-Generated Code: Copyright Compliance and Engineering Governance Practices

    This article explains why AI coding tools can now produce runnable prototypes in hours, and why that speed turns copyright risk from isolated disputes into batch takedowns. It breaks down how structural fingerprints trigger mass complaints, which actions are safe versus infringing, and how platform-level system prompts are shifting compliance to generation time. It then lays out a practical governance pipeline covering input sourcing, prompt boundaries, merge-time compliance gates, and evidence chains, plus notes on supply chain and compute cost control.

    1. Why “a playable build in a few hours” became possible

    Fully reverse engineering a mature title used to require engineers to switch constantly between disassemblers, debuggers, and dynamic instrumentation tools, backed by static data flow analysis to reconstruct key structures. That cycle was typically measured in quarters. Large language models have split the chain into parallel, iterable subtasks: control flow recovery, data structure inference, asset format parsing, behavior rule reconstruction, and rewriting the rendering and input layers. Each subtask can be fed to a model separately, producing compilable draft code that a person or an automated script then verifies and patches.

    The direct consequence is that “runnable” arrives far earlier. Where an interactive prototype was once unavailable in the early phase of a project, a version that boots and responds to input can now appear within hours. The problem is that runnable does not mean publishable. The gap sits in ownership of rights and the evidence chain, which is exactly where things fail most easily today.

    2. How risk gets discovered at scale: from isolated disputes to batch complaints

    Recent disputes show clear scale characteristics: complaints covering browser-based versions erupted within a narrow time window, multiple titles were listed at once, and a substantial share of the original projects contained no AI-generated component at all, making them collateral victims. Engineering teams should treat this structural pattern as a warning.

    The mechanism breaks into three layers. The first is fingerprint matching. When a model leans heavily on a single input, the output retains identifiable structural fingerprints: near-identical constant tables, similar class and function naming, isomorphic state machine branches, byte-for-byte identical asset headers. For anyone running site-wide content comparison, these are natural handles. The second is association expansion. Distribution channels, repository URLs, author accounts, and dependency fingerprints are often linked to one another, so one hit spreads along the relationship graph to multiple projects from the same source, producing collateral takedowns. The third is the absence of self-evidence. A genuinely original project that enters a complaint process has a far higher appeal cost than prevention cost if it cannot produce evolution history, asset licenses, timestamps, and build records.

    The conclusion is clear: do not assume “nobody is checking” or that renaming makes you safe. Renaming, reskinning, and reordering code provide almost no protection against structural comparison.

    3. Technical boundaries: what is safe and what is off-limits

    Sorting common requests by risk tier gives teams an actionable standard for judgment.

    Request Typical action Risk level
    Compatibility reimplementation Implement an equivalent mechanism from scratch, referencing public documentation and protocol specifications Relatively manageable, provided the process is documentable
    Genre-level imitation Build a work of the “same genre” only, without reproducing a specific title’s levels or characters Requires strictly defined creative boundaries
    Interaction layer cloning Copying game feel, numeric curves, UI layout, and information hierarchy Medium-high, easily touches expressive elements
    Rewrite after binary decompilation Transcribing disassembly output directly into source code High, usually constitutes copying
    Asset extraction and reuse Taking another party’s art, audio, or level data directly Very high, infringement is near-certain

    A practical test: if the reason a piece of code or an asset exists must depend on “this is how it is in the original work,” it is not original expression. Conversely, content with an independent design rationale (performance considerations, platform adaptation, testability design) has a basis for an originality claim.

    4. Platform-side governance: system-level prompts becoming default constraints

    Model providers have begun pushing compliance requirements down into the system layer of coding assistants. One publicly discussed example: a hidden system prompt named tengu_heron_brook was found in the binary of a new version of a coding assistant, and users cannot disable it. Its core content is three points: making original games is allowed, making a game of a given genre is allowed, and making a game based on the user’s own designs and assets is allowed. It also explicitly prohibits reproducing one specific existing work, even under a new name or with a claim of originality. Subsequently, technical staff from that provider confirmed in a public channel that constraint language had been added to the new version’s prompt to prevent wholesale copying of another party’s work, and stated that infringing intellectual property through their service violates the usage policy.

    This has three practical implications for engineering teams. First, compliance constraints have moved forward from post-hoc review to the moment of generation; the model avoids frame-by-frame reproduction during output, so prompt design must work with that rather than against it. Second, a model-side refusal is not a liability shield; once code is written to disk and published, legal responsibility remains with the publisher. Third, since the constraint cannot be turned off, teams should treat it as a stable premise and add a process step where humans cover the judgments the model does not make.

    5. An actionable engineering approach: writing compliance into the pipeline

    Compliance cannot rest on verbal agreements. It must become executable, traceable, and auditable engineering actions.

    5.1 Input-side governance

    Register assets and reference sources, recording the license type for each item (own work, open source license, commercial license) along with an evidence link. Bring external assets into a unified repository, and prohibit importing art, audio, fonts, and level data directly from unknown sources. Place disassembly output, packet capture results, and third-party source snippets in mandatory quarantine directories that do not enter the main branch by default.

    5.2 Generation-side constraints

    State boundaries explicitly in prompts, separating “same genre” from “same work,” and prohibit asking the model to reproduce levels, characters, or frames one by one. A reusable prompt fragment:

    1. Goal: implement a prototype of a [genre] game, for example rhythm / tower defense / roguelike.
    2. Constraints:
    3. 1. Reference only publicly documented genre mechanics and design patterns;
    4. 2. Do not copy any specific work's level layouts, character designs, dialogue, numeric tables, or art assets;
    5. 3. Use placeholder images and placeholder audio for all assets, and mark them as pending replacement in the README;
    6. 4. Output must include a design note explaining why each module is designed the way it is.

    5.3 Output-side verification

    Run structural fingerprint comparison on generated results, focusing on suspicious signals: unusually complete numeric constant tables, file headers matching public assets, and rare names repeated across multiple files. Express the rules as pipeline stages where any single hit blocks the merge:

    1. # Example: pre-merge compliance gate
    2. stages:
    3. - license_scan: # dependency and asset license scanning
    4. - origin_check: # source and authorship declaration check for new files
    5. - fingerprint_scan: # structural fingerprint and asset header comparison
    6. - provenance_gate: # commit signature and build artifact traceability check
    7. policy:
    8. block_on: [license_conflict, fingerprint_hit, missing_provenance]
    9. require_human_review: true

    5.4 Evidence chain and record keeping

    Retain a signature, build artifacts, and the dependency lock file for every commit, and archive generated output together with the prompts used. Keep review records for important design decisions to build evidence of “independent creation.” This work costs almost nothing day to day, and its value is extremely high once a dispute arises.

    Against batch complaints, defensive strength comes mainly from three kinds of material: evolution history (early drafts, iteration records, timestamps), independent sourcing (asset license documents, open source dependency lists), and reproducible builds (lock files, build scripts, artifact hashes). Three conventions are worth fixing at the repository level: commit messages should state intent rather than only describe changes; every new file must carry a source declaration; binary assets must pass through the asset register before entering the repository.

    Teams should also develop a “minimum publishable set” mindset. Large amounts of references and drafts can be kept during development, but the branch published externally should contain only reviewed material. Reference directories, packet capture data, and disassembly output must never enter the release artifact.

    7. Knock-on effects on supply chain and cost

    Infrastructure cost also belongs in the picture. When a team runs many agents in parallel to build prototypes and repeatedly rebuilds projects and dependencies, immediate memory and compute consumption rises sharply, cache reuse rates drop, and marginal cost is amplified significantly. A common practice is to centrally manage layered caches for build artifacts, dependency packages, and images, separate stateless builds from stateful caches, land incremental results of frequently compiled targets in a shared cache layer, and cap agent concurrency with budget alerts.

    If a team relies mainly on external compute, keeping the architecture “portable” is advisable: connect storage, caching, messaging, and task scheduling through abstractions over generic capabilities, avoiding tight coupling to a single provider, so switching is fast when cost or compliance policies change. Baidu AI Cloud offers generic cloud capabilities such as object storage, container platforms, and logging with monitoring and alerting that can carry this chain, with unified resource pools and quota management to control cost fluctuation, though specific specifications and pricing should still follow the official documentation.

    8. Conclusion and action checklist

    Large language models have pushed the cost of reverse engineering and reimplementation to a historic low, and turned copyright risk from an occasional individual case into a batch event. What teams need is not evasion techniques but an executable governance mechanism. The checklist to follow directly:

    1. Use the risk tier table to align the team’s judgment standard, defining what is allowed, what needs review, and what is prohibited;
    2. Build an asset register and source log with zero tolerance for unauthorized assets;
    3. Set boundaries in both prompts and code review, so model-side constraints and human review complement each other;
    4. Enforce a merge gate that makes license scanning, source verification, and fingerprint comparison hard blocks;
    5. Fix the evidence chain so that “independent creation” can be proven;
    6. Bring compute and caching into cost governance, and keep the architecture portable across platforms.

    The efficiency gain is irreversible, but compliance capability is the prerequisite for sustaining it. Moving boundaries forward into the design phase and accumulating evidence in daily process is how teams get both speed and security through the next capability jump.