| name | recommend-license |
| description | Advise on the optimal license for a project given the user's desired freedoms (commercial use, modification, distribution, patent grant, sublicensing, private use) and constraints (copyleft, attribution, share-alike, source disclosure, no-warranty, network-use clause). Use when the user says "what license should I use?", "recommend a license", or describes constraints without naming a license. Returns a ranked shortlist with reasoning, and offers to populate the chosen one via populate-from-template or generate-license. |
Recommend License
Match the user's intent to a license. Always present a ranked shortlist of 2–4 candidates with explicit trade-offs — never a single recommendation without alternatives.
Constraint dimensions to elicit
If the user has not specified, ask compactly (one message, all at once):
- Project type: software / documentation / creative work / data / hardware
- Commercial use: must allow / must restrict
- Modification: must allow / must restrict
- Distribution of modified versions: permissive / share-alike (copyleft) / source-must-be-disclosed
- Patent grant: required / not required
- Network use clause (AGPL-style): required / not required
- Attribution: required / not required
- Warranty / liability: standard disclaimer / custom
- Compatibility with: any specific upstream license the project depends on
Decision matrix (default knowledge)
| License | Type | Permissive | Copyleft | Patent grant | Network clause | Notes |
|---|
| MIT | software | yes | no | no (implicit) | no | Maximum permissiveness, minimal text |
| Apache-2.0 | software | yes | no | yes (explicit) | no | Preferred when patent protection matters |
| BSD-3-Clause | software | yes | no | no | no | Adds non-endorsement clause |
| MPL-2.0 | software | partial | file-level | yes | no | File-level copyleft, friendly to mixed codebases |
| LGPL-3.0 | software | partial | library-level | yes | no | Linkable from proprietary code |
| GPL-3.0 | software | no | strong | yes | no | Distribution triggers source disclosure |
| AGPL-3.0 | software | no | strong | yes | yes | Network use triggers source disclosure |
| Unlicense / CC0-1.0 | any | yes | no | no | no | Public-domain-equivalent dedication |
| CC-BY-4.0 | docs/creative | yes | no | n/a | n/a | Attribution required |
| CC-BY-SA-4.0 | docs/creative | yes | share-alike | n/a | n/a | Wikipedia-style |
| CC-BY-NC-4.0 | docs/creative | partial | no | n/a | n/a | Non-commercial only — incompatible with most OSS |
Steps
- Read the user's stated constraints. Fill missing dimensions by asking once, in a single grouped question.
- Score each candidate against the constraints. Eliminate any that violate a hard requirement.
- Present the top 2–4 as a ranked list. For each:
- One-line verdict
- "Why it fits" — 2–3 bullets mapped to the user's constraints
- "Trade-offs" — 1–2 bullets where it diverges from the ideal
- If
list-templates shows the user already has any of the shortlisted templates, mark them with ✓ and offer to populate via populate-from-template.
- If none of the standard licenses fit (e.g. user wants commercial restriction + source disclosure + custom attribution clause), recommend
generate-license to draft a custom one and warn that custom licenses are not OSI-approved and may deter contributors.
Output format
## Recommended licenses for <project>
1. **<License>** — <one-line verdict>
- Fits because: ...
- Trade-off: ...
2. **<License>** — ...
Next: run `populate-from-template <license>` to fill in copyright holder and year, or `generate-license` if you need custom terms.
Notes
- Do not give legal advice — frame everything as informational.
- If the user names a specific upstream dependency, surface compatibility concerns (e.g. "Apache-2.0 code can be relicensed into GPL-3.0 projects, but not the reverse").