Skip to content

feat(rhdh-templates): add a new rhdh-templates skill for authoring and validating Software Templates in RHDH#47

Draft
04kash wants to merge 3 commits into
redhat-developer:mainfrom
04kash:rhdh-template-skill
Draft

feat(rhdh-templates): add a new rhdh-templates skill for authoring and validating Software Templates in RHDH#47
04kash wants to merge 3 commits into
redhat-developer:mainfrom
04kash:rhdh-template-skill

Conversation

@04kash

@04kash 04kash commented Jun 19, 2026

Copy link
Copy Markdown
Member

Fixes: https://redhat.atlassian.net/browse/RHDHPLAN-1072

Summary

Adds rhdh-templates (v0.5.1): interactive authoring and validation for RHDH Software Templates. Stdlib-only Python CLIs, bundled examples (minimal-template, nodejs-backend, java-springboot), curated example catalog, JSON Schema validation, and optional live Scaffolder API integration via rhdh-local.

Reviewer quick check

uv sync --extra dev
uv run pytest tests/unit/test_rhdh_templates.py -v          # 39 tests, no RHDH needed
python skills/rhdh-templates/scripts/validate.py \
  --path skills/rhdh-templates/assets/examples/minimal-template --repo --json

Optional (live RHDH on :7007):

export RHDH_URL=http://localhost:7007 BACKSTAGE_TOKEN=development
uv run pytest tests/integration/test_rhdh_templates_live.py -v   # 4 tests, auto-skipped if unreachable

What's included

  • skills/rhdh-templates/SKILL.md + 12 sub-command references
  • Scripts: init, validate, fix_gotchas, analyze, create_location, list_examples, list_actions, explain_action, dry_run, schema_validate
  • Parent routing update in skills/rhdh/SKILL.md

Test results

Suite Count Result Notes
Unit 39 ✅ pass CI-safe; SKILL.md, references, bundled examples, all scripts
Integration (live) 4 ✅ pass Against rhdh-local baseline; skipped without RHDH_URL
Manual lab (phases 0–5) 4 templates ✅ pass init → nodejs copy → templatize → java copy → live dry-run

Manual lab — template matrix

Template Phase Local validate Live dry-run
example-template init ✅ 0 critical
my-node-api nodejs copy ✅ 0 critical
acme-widget-api templatize ✅ 0 critical (2 warnings)
my-spring-service java copy ✅ 0 critical

Phase 5 exercised list_actions, explain_action, and dry_run on all four templates. Integration pytest: 4 passed in 0.45s.

Known sharp edge

fix_gotchas --apply corrupted my-node-api/template.yaml during lab testing; restored from bundled example. Dry-run mode is safe — prefer it until apply behavior is hardened.

Test plan

  • Unit tests (39/39)
  • Bundled examples: zero critical findings on local validate
  • Live integration tests (4/4) against rhdh-local
  • End-to-end manual lab (phases 0–5)
  • Reviewer: run unit tests + one validate.py --repo smoke check
  • Reviewer (optional): live dry-run with RHDH_URL set

…d validating Software Templates in RHDH

Signed-off-by: Kashish Mittal <kmittal@redhat.com>
@04kash 04kash force-pushed the rhdh-template-skill branch from 6f63fe1 to c58f35e Compare June 19, 2026 22:42
04kash added 2 commits June 19, 2026 18:46
Signed-off-by: Kashish Mittal <kmittal@redhat.com>
Signed-off-by: Kashish Mittal <kmittal@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant