Write a generator manifest

When to use this guide

Write a YAML or JSON manifest to define one coherent set of user-facing Go operations. The manifest controls the generated SDK surface, optional CLI, configuration, documentation, and supporting files. Domain-specific operation logic is implemented afterwards in Go.

Start from the contract

Use generator/schema/schema.yml for the complete field definitions, or print the schema as JSON with go-sdk-generator schema. The repository's generate.yml shows a real input. The key sections under specification are:

Field Purpose
package_name, main_module, name, description Project and SDK identity.
repository_url, public Repository location and whether the project is public; used across generated project metadata and hosting integrations.
interface Public Go operations and their arguments and results.
global_configuration Values shared across the SDK and CLI.
command_line_commands Optional binary and commands exposing those operations.
additional_types Optional domain types used by the contract.
tag_latest, update_copyright_headers Optional release tagging and copyright-header maintenance settings.

When operations accept functional options, use specification.options; see configure functional options for option wrappers, value_field and CLI bindings.

A minimal starting shape is:

specification:
  package_name: example-tool
  main_module: example
  name: Example
  description: Verify an example project.
  licence: Apache-2.0
  interface:
    notCloseable: true
    namespace: github.com/example/
    methods:
      - name: Verify
        description: Verify an example project.
        returns:
          - name: err
            lang_type: error
            description: Verification failure, if any.
  global_configuration: []

This describes a library surface. Add command_line_commands if users also need a CLI; see the repository manifest for commands, flags, and shared configuration. Adapt the namespace, name, operation, and licence to your project. What the generator produces explains the resulting project structure.

Repository-level automation can also be controlled from the top level of specification:

Model values deliberately

The manifest-authoring skill contains a detailed checklist for agents and maintainers.