ring:applying-licenses
Applying or switching a repository's license (Apache 2.0, Elastic License v2, or Lerian Proprietary): rewrites the LICENSE file, updates Go/TS source headers, sets SPDX identifiers, and validates consistency after user confirmation. Use when asked to set, apply, or switch a license, or when scaffolding a service with no LICENSE. Skip when license, headers, and SPDX already match, or for non-code repos.
What this skill does
# License Management
## When to use
- User requests to set, apply, or switch a license on a repository
- Scaffolding a new service from the boilerplate
- Task mentions "license", "licensing", "license header", "Apache 2.0", "ELv2", "proprietary"
- Gate 0 of dev-cycle when no LICENSE file exists
## Skip when
- Repository already has requested license AND all headers match AND SPDX is correct (verified)
- Non-code repositories (documentation-only, design assets)
## Related
**Complementary:** ring:running-dev-cycle, ring:implementing-tasks
You orchestrate. Agents update source headers. NEVER apply a license without user confirmation.
## License Types
| License | SPDX | Use Case |
|---------|------|----------|
| Apache 2.0 | `Apache-2.0` | Open source (e.g., Midaz core) |
| Elastic License v2 | `Elastic-2.0` | Source-available Lerian products |
| Proprietary | `LicenseRef-Lerian-Proprietary` | Internal/closed repositories |
## Header Templates
### Apache 2.0 — Go
```go
// Copyright (c) {YEAR} {COPYRIGHT_HOLDER}
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```
### Elastic License v2 — Go
```go
// Copyright (c) {YEAR} {COPYRIGHT_HOLDER}
// Use of this source code is governed by the Elastic License 2.0
// that can be found in the LICENSE file.
```
### Proprietary — Go
```go
// Copyright (c) {YEAR} {COPYRIGHT_HOLDER}. All rights reserved.
// This source code is proprietary and confidential.
// Unauthorized copying of this file is strictly prohibited.
```
TypeScript: wrap the same text in `/** ... */`.
## Gate 0: Detection
Orchestrator runs directly:
```bash
# 1. Detect LICENSE file
ls LICENSE LICENSE.md LICENSE.txt 2>/dev/null
head -5 LICENSE 2>/dev/null
# 2. Identify type
grep -l "Apache License" LICENSE* 2>/dev/null → apache
grep -l "Elastic License" LICENSE* 2>/dev/null → elv2
grep -l "All rights reserved" LICENSE* 2>/dev/null → proprietary
# 3. Sample current source headers
head -5 $(find . -name "*.go" ! -path "*/vendor/*" ! -name "*.pb.go" | head -5)
head -5 $(find . -name "*.ts" ! -path "*/node_modules/*" | head -5)
# 4. Detect language
test -f go.mod && echo "Go project"
test -f package.json && echo "TypeScript project"
```
Determine:
- `current_license`: apache | elv2 | proprietary | none
- `language`: go | typescript | both
- `copyright_holder`: from existing headers or Lerian Studio default
- `year`: current year
## Gate 1: User Confirmation
Present summary and wait for explicit APPROVED:
```
Current license: {current_license}
Target license: {target_license}
Language: {language}
Copyright: {copyright_holder} ({year})
Changes:
- LICENSE file: CREATE/REPLACE with {target_license}
- Source headers: UPDATE {N} files
- README badge: UPDATE
Proceed? (APPROVED / CANCEL)
```
STOP if user does not confirm.
## Gate 2: Implementation
After confirmation:
**1. Replace LICENSE file** (orchestrator writes directly):
- Apache 2.0: fetch from https://www.apache.org/licenses/LICENSE-2.0.txt
- ELv2: write canonical ELv2 text
- Proprietary: write Lerian General License text
**2. Update source headers** (dispatch agent):
```yaml
Task:
subagent_type: "ring:backend-go" # use "ring:backend-ts" for TS/JS sources
description: "Update license headers to {target_license}"
prompt: |
Update all source file headers to {target_license} format.
Copyright: {copyright_holder}, {year}
Files to update:
- Go: find . -name "*.go" ! -path "*/vendor/*" ! -name "*.pb.go" ! -name "*/mocks/*"
- TS: find . -name "*.ts" -o -name "*.tsx" ! -path "*/node_modules/*"
Header template: {header_template}
For each file:
1. Remove existing copyright block (first comment block if it mentions Copyright)
2. Add new header at top of file
3. Preserve package declaration and imports
Output: list of files updated
```
## Gate 3: Validation
Orchestrator runs:
```bash
# All files should have consistent headers
grep -rL "Copyright (c)" $(find . -name "*.go" ! -path "*/vendor/*" ! -name "*.pb.go")
grep -rL "Copyright (c)" $(find . -name "*.ts" ! -path "*/node_modules/*")
# LICENSE file exists and has correct type
head -3 LICENSE | grep -i "{target_keyword}"
```
Report:
- Files missing headers: list
- LICENSE file status: PASS/FAIL
- Consistency: PASS/FAIL (if mismatches found, dispatch agent to fix)
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.