Skip to content

Commit 57da5f9

Browse files
authored
Merge pull request #8 from durandom/chore/ci-and-readme-updates
ci: add GitHub Actions CI and update README
2 parents 16eb41f + d48a2f5 commit 57da5f9

7 files changed

Lines changed: 159 additions & 29 deletions

File tree

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: astral-sh/setup-uv@v4
19+
with:
20+
enable-cache: true
21+
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.11"
25+
26+
- run: uv sync --frozen --extra dev
27+
28+
- run: uv run ruff check .
29+
30+
- run: uv run ruff format --check .
31+
32+
test:
33+
needs: lint
34+
runs-on: ubuntu-latest
35+
strategy:
36+
matrix:
37+
python-version: ["3.9", "3.11"]
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- uses: astral-sh/setup-uv@v4
42+
with:
43+
enable-cache: true
44+
45+
- uses: actions/setup-python@v5
46+
with:
47+
python-version: ${{ matrix.python-version }}
48+
49+
- run: uv sync --frozen --extra dev
50+
51+
- run: uv run pytest -v
File renamed without changes.

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
# Python linting and formatting
33
- repo: https://github.com/astral-sh/ruff-pre-commit
4-
rev: v0.11.12
4+
rev: v0.15.10
55
hooks:
66
- id: ruff
77
args: [--fix]

CLAUDE.md

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,71 @@
1010

1111
```
1212
rhdh-skill/
13+
├── commands/ # Slash commands for Claude Code
1314
├── skills/
14-
│ ├── rhdh/ # Orchestrator skill (Python CLI + routing)
15-
│ │ ├── rhdh/ # Python CLI package (stdlib only)
16-
│ │ ├── scripts/ # Entry point (./scripts/rhdh)
17-
│ │ ├── references/ # General tool references (GitHub, JIRA)
18-
│ │ └── SKILL.md # Routes to overlay skill
19-
│ └── overlay/ # Overlay skill (markdown only)
20-
│ ├── workflows/ # Plugin workflows (onboard, update, fix)
21-
│ ├── references/ # Overlay-specific references
22-
│ └── SKILL.md # Overlay workflow routing
23-
├── tests/ # pytest test suite (dev only)
24-
└── pyproject.toml # Dev dependencies (pytest)
15+
│ ├── rhdh/ # Orchestrator skill (Python CLI + routing)
16+
│ │ ├── rhdh/ # Python CLI package (stdlib only)
17+
│ │ ├── scripts/ # Entry point (./scripts/rhdh)
18+
│ │ ├── references/ # Tool refs (GitHub, JIRA, repos, versions)
19+
│ │ └── SKILL.md # Main intake + routing to sub-skills
20+
│ ├── overlay/ # Overlay skill (markdown only)
21+
│ │ ├── workflows/ # Plugin workflows (onboard, update, fix, triage)
22+
│ │ ├── references/ # Overlay-specific refs (CI, labels, metadata)
23+
│ │ ├── templates/ # Workspace file templates
24+
│ │ └── SKILL.md # Overlay workflow routing
25+
│ ├── rhdh-local/ # Local testing skill (Python CLI + workflows)
26+
│ │ ├── rhdh_local/ # Python CLI package (compose, health, sync)
27+
│ │ ├── scripts/ # Entry point (./scripts/rhdh-local)
28+
│ │ ├── workflows/ # Local workflows (enable, disable, test, switch)
29+
│ │ ├── references/ # Customization, env, troubleshooting refs
30+
│ │ └── SKILL.md # Local testing intake
31+
│ ├── create-backend-plugin/ # Bootstrap backend dynamic plugins
32+
│ ├── create-frontend-plugin/ # Bootstrap frontend dynamic plugins
33+
│ ├── export-and-package/ # Export & package as OCI/tgz/npm
34+
│ └── generate-frontend-wiring/ # Configure mount points, routes, tabs
35+
├── .claude-plugin/ # Plugin manifest + marketplace listing
36+
├── .planning/ # Planning docs for future features
37+
├── tests/ # pytest test suite (dev only)
38+
└── pyproject.toml # Dev dependencies (pytest, ruff)
2539
```
2640

27-
## CLI
41+
## CLIs
2842

29-
The CLI is stdlib-only and runs with any Python 3.9+:
43+
Two stdlib-only Python CLIs (Python 3.9+), auto-detecting output format (**TTY** → human-readable, **Piped** → JSON):
44+
45+
### `rhdh` — Orchestrator CLI
46+
47+
```bash
48+
./skills/rhdh/scripts/rhdh # Status (orientation)
49+
./skills/rhdh/scripts/rhdh doctor # Full environment check
50+
./skills/rhdh/scripts/rhdh config init # Create config with auto-detection
51+
./skills/rhdh/scripts/rhdh config show # Show resolved paths
52+
./skills/rhdh/scripts/rhdh config set <k> <v> # Set config value
53+
./skills/rhdh/scripts/rhdh setup submodule list # List available repos
54+
./skills/rhdh/scripts/rhdh setup submodule add --all # Add all required repos
55+
./skills/rhdh/scripts/rhdh workspace list # List plugin workspaces
56+
./skills/rhdh/scripts/rhdh workspace status <name>
57+
./skills/rhdh/scripts/rhdh log add "msg" --tag x # Activity worklog
58+
./skills/rhdh/scripts/rhdh log show / search
59+
./skills/rhdh/scripts/rhdh todo add / list / done / note / show
60+
./skills/rhdh/scripts/rhdh local up / down / status / apply / health # Delegates to rhdh-local
61+
```
62+
63+
### `rhdh-local` — Local Testing CLI
3064

3165
```bash
32-
./skills/rhdh/scripts/rhdh # Status check
33-
./skills/rhdh/scripts/rhdh doctor # Full environment check
34-
./skills/rhdh/scripts/rhdh --json # Force JSON output
66+
./skills/rhdh-local/scripts/rhdh-local # Standalone local testing CLI
3567
```
3668

37-
Auto-detects output format: **TTY** → human-readable, **Piped** → JSON.
69+
Both CLIs follow [agentic CLI design patterns](https://github.com/durandom/dotfiles/blob/main/skills/recipes/references/agentic-cli.md) (`/recipes agentic-cli`).
3870

3971
## Key Patterns
4072

4173
- `OutputFormatter` handles JSON/human rendering — commands build data dicts
42-
- Workflows live in `skills/overlay/workflows/` — doctor points agents there for setup
74+
- Workflows live in `skills/overlay/workflows/` and `skills/rhdh-local/workflows/`
4375
- Config discovery: env vars → project config → user config → auto-detection
76+
- `commands/` dir provides slash commands that Claude Code auto-discovers
77+
- `rhdh` CLI delegates `local` subcommands to `rhdh_local.cli` module
4478

4579
## Versioning
4680

README.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ claude plugin install --scope project rhdh
1414
### From Published Plugin
1515

1616
```bash
17-
claude plugin marketplace add durandom/rhdh-skill
17+
claude plugin marketplace add redhat-developer/rhdh-skill
1818
claude plugin install --scope project rhdh
1919
```
2020

@@ -32,14 +32,19 @@ If `needs_setup: true`, follow the setup instructions to configure required repo
3232

3333
## Architecture
3434

35-
The skill is split into two focused components:
35+
The plugin consists of an orchestrator skill that routes to specialized workflow skills:
3636

3737
| Skill | Purpose | Contents |
3838
|-------|---------|----------|
3939
| `rhdh` | Orchestrator | Python CLI + routing logic |
40-
| `overlay` | Workflows | Markdown-only workflow definitions |
40+
| `overlay` | Overlay workflows | Onboard, update, fix, triage plugins |
41+
| `create-backend-plugin` | Backend plugins | Bootstrap new backend dynamic plugins |
42+
| `create-frontend-plugin` | Frontend plugins | Bootstrap new frontend dynamic plugins |
43+
| `export-and-package` | Packaging | Export plugins as OCI/tgz/npm |
44+
| `generate-frontend-wiring` | Frontend wiring | Mount points, routes, entity tabs |
45+
| `rhdh-local` | Local testing | Enable/disable/test plugins locally |
4146

42-
This separation allows the orchestrator to be portable (stdlib-only Python) while keeping workflow documentation easy to maintain.
47+
The orchestrator is portable (stdlib-only Python) while workflow skills are markdown-only for easy maintenance.
4348

4449
## The RHDH CLI
4550

@@ -78,7 +83,9 @@ This redirects `worklog.jsonl` and `TODO.md` to the specified directory.
7883
./skills/rhdh/scripts/rhdh # Status / orientation
7984
./skills/rhdh/scripts/rhdh doctor # Full environment check
8085
./skills/rhdh/scripts/rhdh config init # Create config with auto-detection
86+
./skills/rhdh/scripts/rhdh setup # Environment setup commands
8187
./skills/rhdh/scripts/rhdh workspace list # List plugin workspaces
88+
./skills/rhdh/scripts/rhdh local # Local RHDH customization operations
8289

8390
# Activity tracking
8491
./skills/rhdh/scripts/rhdh log add "Started onboard" --tag onboard
@@ -89,27 +96,37 @@ This redirects `worklog.jsonl` and `TODO.md` to the specified directory.
8996

9097
| Command | Description |
9198
|---------|-------------|
92-
| `/rhdh` | Show status and route to appropriate workflow |
99+
| `/rhdh` | Show status and route to appropriate workflow (skill) |
93100
| `/onboard-plugin` | Add a new plugin to Extensions Catalog |
94101
| `/update-plugin` | Bump plugin to newer upstream version |
95102
| `/fix-plugin-build` | Debug CI/publish failures |
103+
| `/plugin-status` | Check plugin health and compatibility status |
96104
| `/triage-overlay-prs` | Prioritize open PRs (Core Team) |
97105
| `/analyze-overlay-pr` | Analyze specific PR (Core Team) |
106+
| `/session-log` | Document session accomplishments to logs |
98107

99108
## Project Structure
100109

101110
```
102111
rhdh-skill/
112+
├── .claude-plugin/ # Plugin manifest + marketplace listing
113+
├── commands/ # Slash command definitions
103114
├── skills/
104115
│ ├── rhdh/ # Orchestrator skill
105116
│ │ ├── rhdh/ # Python CLI package (stdlib only)
106117
│ │ ├── scripts/rhdh # Entry point
107-
│ │ ├── references/ # GitHub, JIRA tool guides
118+
│ │ ├── references/ # GitHub, JIRA, version refs
108119
│ │ └── SKILL.md # Routing logic
109-
│ └── overlay/ # Workflow skill (markdown only)
110-
│ ├── workflows/ # onboard, update, fix, triage
111-
│ ├── references/ # Overlay-specific docs
112-
│ └── SKILL.md # Workflow definitions
120+
│ ├── overlay/ # Overlay workflow skill
121+
│ │ ├── workflows/ # onboard, update, fix, triage
122+
│ │ ├── templates/ # Workspace file templates
123+
│ │ ├── references/ # Overlay-specific docs
124+
│ │ └── SKILL.md # Workflow definitions
125+
│ ├── create-backend-plugin/
126+
│ ├── create-frontend-plugin/
127+
│ ├── export-and-package/
128+
│ ├── generate-frontend-wiring/
129+
│ └── rhdh-local/ # Local RHDH testing
113130
├── tests/ # pytest test suite
114131
└── pyproject.toml # Dev dependencies
115132
```

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ include = ["rhdh*"]
1616
dev = [
1717
"pytest>=7.0",
1818
"pyyaml>=6.0", # Only for SKILL.md structure tests
19+
"ruff>=0.4.0",
1920
]
2021

2122
[project.scripts]

uv.lock

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)