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-templatesskill and set up a template repository. - You have a local copy of the source codebase to convert.
Procedure
- 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.
- 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.
-
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. -
Confirm that the skill generates
template.yamlwith your parameters and a typicalfetch:template,publish, andcatalog:registerstep sequence. -
Ask your agent to register the template by generating or updating the root
location.yaml.
Results
- The
templates/<name>/directory hastemplate.yamland askeleton/directory, and the rootlocation.yamlregisters the template. - Skeleton files reference
${{ values.* }}, not${{ parameters.* }}. - Local validation reports zero critical findings. See Validate a software template locally.