v0.x-to-strict-contract-names

Rename internal-package contract.go elements to canonical Service, Deps, and New signatures.

4|1|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/reliant-labs/forge --skill v0-x-to-strict-contract-names
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: v0.x-to-strict-contract-names
Source: https://github.com/reliant-labs/forge/tree/main/internal/templates/project/skills/forge/migration/v0.x-to-strict-contract-names
Command: npx skills add https://github.com/reliant-labs/forge --skill v0-x-to-strict-contract-names

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Forge project generation or linting can fail when internal-package contract.go files use non-canonical names, causing silently broken bootstrap wiring that won’t compile.

Core Features & Use Cases

  • Renames contract.go to the strict canonical shape: ensures type Service interface, type Deps struct, and func New(Deps) Service exist with the required signatures.
  • Prevents bootstrap codegen mismatches: aligns the contract API with the bootstrap template that wires <pkg>.New(<pkg>.Deps{}) and expects Service and Deps exactly.
  • Targets the common failure mode: use when forge lint --conventions or forge generate reports forgeconv-internal-package-contract-names.

Quick Start

Run lint from the project root, identify every internal/email/…/contract.go reporting a naming violation, and rename the contract elements to exactly Service, Deps, and New(Deps) Service.

Frequently Asked Questions about v0.x-to-strict-contract-names

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does forge generate fail with bootstrap wiring errors in internal packages?

Forge generate fails because internal-package contract.go files use non-canonical names that break bootstrap wiring. Contracts must declare exactly `type Service interface`, `type Deps struct`, and `func New(Deps) Service` to compile successfully.

How do I fix the forgeconv-internal-package-contract-names lint error?

To fix the forgeconv-internal-package-contract-names error, rename the contract elements in your internal package contract.go files to exactly `Service`, `Deps`, and `New(Deps) Service` so they match the strict canonical shape.

What is the strict canonical contract shape required for Go code generation?

The strict canonical contract shape for Go code generation requires declaring `type Service interface`, `type Deps struct`, and `func New(Deps) Service` with a value parameter, ensuring bootstrap templates wire correctly.

Does the func New parameter in a Go contract need to be a pointer or a value?

The func New parameter in a Go contract must be a value parameter, not a pointer. Using `func New(Deps) Service` with a value parameter ensures codegen and compilation succeed under strict forge conventions.

How do I identify which contract.go files have naming violations during a Go refactor?

Run `forge lint --conventions` from the project root to identify every internal package contract.go file reporting a naming violation, then rename the elements to exactly `Service`, `Deps`, and `New(Deps) Service`.

When do I need to enforce strict contract names for bootstrap-managed internal packages?

You need to enforce strict contract names when upgrading or running forge generate or lint across versions that enforce strict contract conventions for bootstrap-managed internal packages to prevent codegen mismatches.