Convert a codebase into a software template

To reuse a working project as a golden path, convert it into a parameterized software template instead of writing one from scratch. The templatize workflow analyzes your code, proposes the values to parameterize, and builds the template only after you confirm the mapping.

Before you begin

  • You have installed the rhdh-templates skill and set up a template repository.
  • You have a local copy of the source codebase to convert.

Procedure

  1. Ask your agent to templatize the codebase, specifying the source path. The skill runs a deterministic analyzer to detect the project type and candidate literals.
  2. Review the candidate table that the skill presents. For each value, choose to parameterize it, keep it literal, or skip it. Parameterize identity values such as component name and owner; keep framework defaults literal.
  3. Confirm the parameter mapping. Only after your confirmation does the skill create the skeleton/ directory, copy your source files, and replace confirmed values with ${{ values.<param> }} placeholders.
  4. Confirm that the skill generates template.yaml with your parameters and a typical fetch:template, publish, and catalog:register step sequence.
  5. Ask your agent to register the template by generating or updating the root location.yaml.

Results

  1. The templates/<name>/ directory has template.yaml and a skeleton/ directory, and the root location.yaml registers the template.
  2. Skeleton files reference ${{ values.* }}, not ${{ parameters.* }}.
  3. Local validation reports zero critical findings. See Validate a software template locally.

What to do next