-
Notifications
You must be signed in to change notification settings - Fork 19
feat(dev-team): add licensing skill and command #329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| --- | ||
| name: ring:dev-license | ||
| description: Apply or switch the license for the current repository | ||
| argument-hint: "[apache|elv2|proprietary] [options]" | ||
| --- | ||
|
|
||
| Apply or switch the license for the current repository. | ||
|
|
||
| ## Usage | ||
|
|
||
| ``` | ||
| /ring:dev-license [license-type] [options] | ||
| ``` | ||
|
|
||
| ## Arguments | ||
|
|
||
| | Argument | Required | Description | | ||
| |----------|----------|-------------| | ||
| | `license-type` | No* | One of: `apache`, `elv2`, `proprietary` | | ||
|
|
||
| *If omitted, the skill will detect the current license and ask which to apply. | ||
|
|
||
| ## Options | ||
|
|
||
| | Option | Description | Example | | ||
| |--------|-------------|---------| | ||
| | `--dry-run` | Show what would change without modifying files | `--dry-run` | | ||
| | `--year YEAR` | Override copyright year (default: current year) | `--year 2025` | | ||
| | `--holder NAME` | Override copyright holder (default: Lerian Studio Ltd.) | `--holder "Lerian Studio Ltd."` | | ||
|
|
||
| ## License Types | ||
|
|
||
| | Type | Full Name | SPDX | Use Case | | ||
| |------|-----------|------|----------| | ||
| | `apache` | Apache License 2.0 | `Apache-2.0` | Open source (e.g., Midaz core) | | ||
| | `elv2` | Elastic License v2 | `Elastic-2.0` | Source-available Lerian products | | ||
| | `proprietary` | Lerian Studio General License | `LicenseRef-Lerian-Proprietary` | Internal/closed repos | | ||
|
|
||
| ## Examples | ||
|
|
||
| ```bash | ||
| # Apply Apache 2.0 license | ||
| /ring:dev-license apache | ||
|
|
||
| # Switch to ELv2 | ||
| /ring:dev-license elv2 | ||
|
|
||
| # Apply proprietary license with specific year | ||
| /ring:dev-license proprietary --year 2024 | ||
|
|
||
| # Check what would change without modifying | ||
| /ring:dev-license apache --dry-run | ||
|
|
||
| # Detect current license (interactive) | ||
| /ring:dev-license | ||
| ``` | ||
|
|
||
| ## What It Does | ||
|
|
||
| 1. **Detects** current license (LICENSE file, source headers, SPDX identifiers) | ||
| 2. **Confirms** change with user (if switching from an existing license) | ||
| 3. **Writes** the LICENSE file with the full license text | ||
| 4. **Updates** all source file headers (.go, .ts, .js) to match | ||
| 5. **Updates** SPDX identifiers in go.mod/package.json (if present) | ||
| 6. **Updates** README.md license badge/section (if present) | ||
| 7. **Validates** all files have consistent headers | ||
|
|
||
| ## Related Commands | ||
|
|
||
| | Command | Description | | ||
| |---------|-------------| | ||
| | `/ring:dev-cycle` | Development cycle (includes license check at Gate 0) | | ||
| | `/ring:dev-refactor` | Codebase analysis (may detect license inconsistencies) | | ||
|
|
||
| --- | ||
|
|
||
| ## MANDATORY: Load Full Skill | ||
|
|
||
| **This command MUST load the skill for complete workflow execution.** | ||
|
|
||
| ``` | ||
| Use Skill tool: ring:dev-licensing | ||
| ``` | ||
|
|
||
| The skill contains the complete 4-gate workflow with: | ||
| - License detection and identification | ||
| - User confirmation gate | ||
| - Agent dispatch for header updates | ||
| - Validation with consistency checks | ||
| - Anti-rationalization tables | ||
| - Pressure resistance scenarios | ||
|
|
||
| ## Execution Context | ||
|
|
||
| Pass the following context to the skill: | ||
|
|
||
| | Parameter | Value | | ||
| |-----------|-------| | ||
| | `license_type` | First argument: `apache`, `elv2`, or `proprietary` (if provided) | | ||
| | `dry_run` | `true` if `--dry-run` flag present | | ||
| | `copyright_year` | Value of `--year` option (default: current year) | | ||
| | `copyright_holder` | Value of `--holder` option (default: `Lerian Studio Ltd.`) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.