Skip to content

Instantly share code, notes, and snippets.

View sjha4's full-sized avatar

Samir Jha sjha4

View GitHub Profile
@sjha4
sjha4 / backup-plan-evaluation-and-design.md
Created May 11, 2026 17:59
Foremanctl Backup Implementation Plan Evaluation - IOP Database Support

Backup Plan Evaluation and Design Solution

Date: 2026-05-11
Focus: Offline backup implementation for foremanctl (porting from foreman-maintain)

Executive Summary

The current plan in foremanctl-backup-implementation-plan.md provides a solid foundation but has critical gaps around IOP (Insights Operator Platform) database handling. This evaluation identifies these gaps and proposes a corrected design aligned with the actual running services on this system.


@sjha4
sjha4 / foremanctl-production-debug-guide.md
Created May 11, 2026 17:39
foremanctl-production-debug-guide.md

Foremanctl Production Environment Debugging Guide

Core Architecture

This foremanctl deployment uses Podman Quadlets - a declarative system that converts container definitions into systemd services. All backend services (PostgreSQL, Redis, Pulp, Candlepin) and the main Foreman application run as containers managed by systemd with host networking mode.

Key Difference from Dev Setup:

  • Dev: Foreman checked out as repo, run with bundle exec foreman start
  • Production: Foreman runs as containerized systemd service, all commands executed via podman exec
@sjha4
sjha4 / foremanctl_debugging.md
Last active April 24, 2026 18:53
foremanctl debug guide

Foremanctl Environment - Debugging Guide

Overview

foremanctl deploys Foreman and Katello using Podman Quadlets - a declarative system that converts container definitions into systemd services. All backend services run as containers managed by systemd.

Architecture

  • Foreman Application: Runs as Rails development server from /home/vagrant/foreman/ (vagrant user)
  • Backend Services: PostgreSQL, Redis, Pulp, Candlepin run as containers
@sjha4
sjha4 / SKILL.md
Created April 7, 2026 19:52
~/.claude/skills/jira-to-redmine/SKILL.md
name jira-to-redmine
description Migrate a Jira ticket from Red Hat Atlassian to Redmine (theforeman.org)

Jira to Redmine Migration Skill

This skill migrates a Jira ticket from Red Hat's Atlassian instance to Redmine at projects.theforeman.org.

Instructions

@sjha4
sjha4 / pulp_generated_clients_migration_plan.md
Created March 19, 2026 18:43
Vendored OpenAPI Specs with Dev-Time Generation

Implementation Plan: Vendored OpenAPI Specs with Dev-Time Generation

Context

Problem: Katello depends on 9 pre-packaged Pulp Ruby client gems that the Pulp team struggles to maintain and package. These gems must be kept in sync with Pulp versions, creating a packaging bottleneck.

Solution: Generate Ruby API clients from OpenAPI specs in development, commit generated code to repository, and package with Katello RPM. This eliminates dependency on Pulp team's gem packaging while catching all generation issues in Dev/QE before customer release.

@sjha4
sjha4 / chat.md
Created March 19, 2026 14:13
Team spin up prompt

Katello Content Credentials React Conversion - Team Setup

User Request

I want a prompt to start a team of claude agents, one which works on Katello repository to convert Contentcredentials Details page to React with all the subtabs that exist in the engines/bastion_katello code for Content Credentials with routing via experimental labs under /labs/ route. I want another agent which writes the tests based on the conversion by conversion agent. I want another agent that creates airgun entities for the new components so they can be tested and then a robottelo agent that uses these new entities to come up with good tests for the new details page. Give me such a prompt which creates that team and opens a tmux split pane session.


Generated Team Setup Prompt

@sjha4
sjha4 / settings.json
Created March 19, 2026 14:10
~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
},
"preferences": {
"tmuxSplitPanes": true
},
"skipDangerousModePermissionPrompt": true
}
rtl-code-reviewer │
│ /home/sajha/.claude/agents/rtl-code-reviewer.md │
│ │
│ Description (tells Claude when to use this agent): │
│ Use this agent to review React tests when prompted to review a RTL test
name snapshottests-rtl-converter
description Converts Enzyme snapshot tests to React Testing Library tests with realistic fixtures and API mocking
tools Bash, Glob, Grep, Read, Edit, Write, NotebookEdit, WebFetch, TodoWrite, WebSearch, BashOutput, KillShell, ListMcpResourcesTool, ReadMcpResourceTool
model sonnet
color pink

You are an experienced React Javascript engineer who is proficient in writing and understanding react tests

@sjha4
sjha4 / angular-to-react-migrator.md
Last active November 12, 2025 18:29
Claude-angular-react-converter-agent.md

name: angular-to-react-migrator description: Use this agent when working on migrating AngularJS components from the engines/bastion_katello directory to React in the webpack directory of the katello/katello repository. Specifically invoke this agent when:\n\n\nContext: User is starting to migrate an AngularJS workflow to React.\nuser: "I need to migrate the content views workflow from AngularJS to React"\nassistant: "I'm going to use the Task tool to launch the angular-to-react-migrator agent to help with migrating the content views workflow from AngularJS to React."\n\nThe user is requesting a migration from AngularJS to React, which is exactly what this agent specializes in. Use the Agent tool to invoke the angular-to-react-migrator.\n\n\n\n\nContext: User has just written a new React component as part of a migration.\nuser: "I've created the new ContentViewsIndex component in webpack/components/ContentViews/"\nassistant: "Great! Let me use the angula