LLibrePatch
AI coding workspace

License header edits

Keep the first line intact. LibrePatch is a Windows AI coding workspace for discussing license-header edits against your project files, with model suggestions and the resulting code available for review.

● ● ●LibrePatch●
A concrete starting point · License header edits ×
text = source.removeprefix("\ufeff")
head, separator, body = text.partition("\n")
if head.startswith("#!"):
    result = head + (separator or "\n") + update_spdx(body)
else:
    result = update_spdx(source)
✳Update a source file’s SPDX header while keeping its interpreter line in first position.
✓ ChangesReview before applying ↗
Illustrative workspace
01

Project

Check a byte-order mark, an existing license comment and a second run so the edit neither duplicates the header nor changes the body.

02

Review before applying

Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.

03

Connection

Base URL, credentials and a reachable server.

Workflows

License header edits

Workflows ↗
A concrete starting point
text = source.removeprefix("\ufeff")
head, separator, body = text.partition("\n")
if head.startswith("#!"):
    result = head + (separator or "\n") + update_spdx(body)
else:
    result = update_spdx(source)
AI coding workspace

Make a repository-wide edit safe to review in small pieces

LibrePatch provides a Windows AI coding workspace for maintenance that repeats across files but still needs careful boundaries. Start by describing which files belong in the change and which must be excluded. Ask the connected model to inspect representative examples before proposing a script or patch that touches a larger portion of the repository.

License-header maintenance illustrates the approach. An executable script may need its interpreter line preserved while an existing notice is updated. Bring the repository convention and sample files into the discussion; the model can help reason about a proposed implementation. LibrePatch does not supply legal advice or a built-in license migration system.

Review the edit on a small set containing ordinary files, already updated files and scripts with first-line requirements. Check that a second pass leaves the intended result stable, and inspect the diff for body changes. Run your project checks and relevant scripts before expanding the operation to the rest of the selected files.

For this work you may choose an uncensored AI model available through a supported OpenAI-compatible or Anthropic endpoint. Provide credentials when necessary and check its actual restrictions. The model and server set context and tool limits; choosing a model does not remove your responsibility to review a broad edit.

Scoping a repeated source edit

Who decides the notice that should be inserted?

Use the wording approved for your repository and provide it explicitly. The coding task is to implement that instruction without disturbing source behavior. Do not treat a generated notice or model explanation as a determination of licensing obligations.

How do I avoid adding the same header twice?

Ask for an explicit rule for recognizing an existing header, then review a second pass on the same fixtures. Compare the resulting files. A script that works once may still duplicate or progressively modify content when repeated.

Which files need separate examples before a bulk edit?

Include scripts with interpreter lines, files without a final newline and files already carrying the desired notice. Also name generated or vendor directories that should be excluded. These examples reveal assumptions hidden by testing only ordinary source files.

Does a local model make a repository scan entirely local?

No. The model server must run separately, and connected tools have their own destinations. Review how scans and commands execute, including any external services, before allowing sensitive source material into the maintenance conversation.

Get the Windows app ↗

LibrePatch · Updated 2026-10-25