[PR #122] [MERGED] feat: Ralph hats CLI with topology visualization and AI-powered diagrams #148

Closed
opened 2026-02-27 10:22:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mikeyobrien/ralph-orchestrator/pull/122
Author: @mikeyobrien
Created: 1/27/2026
Status: Merged
Merged: 1/27/2026
Merged by: @mikeyobrien

Base: mainHead: ralph-orchestrator-hats-cli


📝 Commits (2)

  • e91eebb feat: Add ralph hats command for topology visualization and validation
  • 235e75a fix: update hats command to use ConfigSource slice

📊 Changes

6 files changed (+1402 additions, -0 deletions)

View changed files

📝 Cargo.lock (+21 -0)
📝 Cargo.toml (+3 -0)
📝 crates/ralph-cli/Cargo.toml (+3 -0)
crates/ralph-cli/src/hats.rs (+1088 -0)
📝 crates/ralph-cli/src/main.rs (+7 -0)
tasks/ralph-hats-command.code-task.md (+280 -0)

📄 Description

Summary

  • Adds ralph hats command namespace for inspecting hat configurations
  • Implements ralph hats graph with AI-generated ASCII topology diagrams
  • Adds ralph hats list, ralph hats show, and ralph hats validate subcommands

Features

Hats CLI Commands

  • ralph hats - List all configured hats in a table
  • ralph hats list --format json - List hats in JSON format
  • ralph hats show <name> - Show detailed configuration for a specific hat
  • ralph hats validate - Validate hat topology and report issues
  • ralph hats graph - Display hat topology as a directed acyclic graph

Graph Formats

  • --format unicode - Unicode box-drawing characters (┌─┐│└┘▶) - default
  • --format ascii - Pure ASCII for maximum compatibility
  • --format compact - Minimal output with single-glyph nodes
  • --format mermaid - Raw Mermaid syntax for external rendering

AI-Powered Diagrams

  • --backend <name> - Specify AI backend (claude, kiro, gemini, codex, amp)
  • Auto-detects backend if not specified
  • Shows progress spinner during diagram generation
  • Cleans AI responses (removes markdown fences, intros)

Test plan

  • Unit tests for hats commands (list, show, validate)
  • Unit tests for graph rendering (Mermaid format)
  • Unit tests for backend resolution and validation
  • Pre-commit hooks pass (cargo fmt, cargo clippy)
  • Manual testing with real hat configurations

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mikeyobrien/ralph-orchestrator/pull/122 **Author:** [@mikeyobrien](https://github.com/mikeyobrien) **Created:** 1/27/2026 **Status:** ✅ Merged **Merged:** 1/27/2026 **Merged by:** [@mikeyobrien](https://github.com/mikeyobrien) **Base:** `main` ← **Head:** `ralph-orchestrator-hats-cli` --- ### 📝 Commits (2) - [`e91eebb`](https://github.com/mikeyobrien/ralph-orchestrator/commit/e91eebb5c293a939c95dad636d76f8d79379d7f2) feat: Add ralph hats command for topology visualization and validation - [`235e75a`](https://github.com/mikeyobrien/ralph-orchestrator/commit/235e75ae4d3b4599e4c7d0daa40d9a6764d50fc7) fix: update hats command to use ConfigSource slice ### 📊 Changes **6 files changed** (+1402 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+21 -0) 📝 `Cargo.toml` (+3 -0) 📝 `crates/ralph-cli/Cargo.toml` (+3 -0) ➕ `crates/ralph-cli/src/hats.rs` (+1088 -0) 📝 `crates/ralph-cli/src/main.rs` (+7 -0) ➕ `tasks/ralph-hats-command.code-task.md` (+280 -0) </details> ### 📄 Description ## Summary - Adds `ralph hats` command namespace for inspecting hat configurations - Implements `ralph hats graph` with AI-generated ASCII topology diagrams - Adds `ralph hats list`, `ralph hats show`, and `ralph hats validate` subcommands ## Features ### Hats CLI Commands - `ralph hats` - List all configured hats in a table - `ralph hats list --format json` - List hats in JSON format - `ralph hats show <name>` - Show detailed configuration for a specific hat - `ralph hats validate` - Validate hat topology and report issues - `ralph hats graph` - Display hat topology as a directed acyclic graph ### Graph Formats - `--format unicode` - Unicode box-drawing characters (┌─┐│└┘▶) - default - `--format ascii` - Pure ASCII for maximum compatibility - `--format compact` - Minimal output with single-glyph nodes - `--format mermaid` - Raw Mermaid syntax for external rendering ### AI-Powered Diagrams - `--backend <name>` - Specify AI backend (claude, kiro, gemini, codex, amp) - Auto-detects backend if not specified - Shows progress spinner during diagram generation - Cleans AI responses (removes markdown fences, intros) ## Test plan - [x] Unit tests for hats commands (list, show, validate) - [x] Unit tests for graph rendering (Mermaid format) - [x] Unit tests for backend resolution and validation - [x] Pre-commit hooks pass (cargo fmt, cargo clippy) - [x] Manual testing with real hat configurations --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 10:22:25 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ralph-orchestrator#148
No description provided.