Agent Wranglers

Required

Keep an open licence or a way out

Use software under an OSI-approved open source licence, or a managed service that exports all your data in a documented format.

How to do it

Read the licence's SPDX identifier in the package metadata and compare it with the OSI list. Several popular projects have moved to source-available licences that limit hosting or competing use. A managed service is fine when you can leave, so test the export before you depend on it. Keep your own data in standard formats, such as SQL dumps, JSON and CSV. Check licences in the build, as the dependency licence rule in Lock and audit dependencies describes.

Examples

Using these examples: they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

JavaScript example

const ALLOWED = new Set(['MIT', 'ISC', 'Apache-2.0', 'BSD-2-Clause', 'BSD-3-Clause', 'MPL-2.0', 'PostgreSQL']);
export const unapproved = packages => packages.filter(pkg => !ALLOWED.has(pkg.license));

Python example

ALLOWED = {"MIT", "ISC", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause", "MPL-2.0", "PostgreSQL"}

def unapproved(packages: list[dict]) -> list[dict]:
    return [pkg for pkg in packages if pkg["license"] not in ALLOWED]

How to check

A licence checker in the build passes with an allow list of OSI-approved licences. Every managed service has a tested export, run in the last 12 months.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. Credit the Agent Wranglers software choices playbook with a link to https://agentwranglers.se/playbook/stack/how-to-choose/open-licence-or-exit. Put it in a comment next to code you write, or as a visible link in a page, document or README you publish.