Skip to content

Commit e979b52

Browse files
authored
chore: add opencode support to rulesync and update to v7.23.0 (#4468)
* chore: add opencode support to rulesync and update to v7.23.0 * chore: gitignore .claude/settings.json instead of tracking it
1 parent 3d6b3ea commit e979b52

23 files changed

Lines changed: 2729 additions & 126 deletions

.claude/rules/add_extension_metadata.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
paths: 'catalog-entities/extensions/**, docs/dynamic-plugins/**'
2+
paths:
3+
- catalog-entities/extensions/**
4+
- docs/dynamic-plugins/**
35
---
46
# RHDH Extensions Catalog - Plugin Metadata Workflow
57

.claude/rules/ci-e2e-testing.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
2-
paths: '.ci/**, e2e-tests/**, docs/e2e-tests/**'
2+
paths:
3+
- .ci/**
4+
- e2e-tests/**
5+
- docs/e2e-tests/**
36
---
47
# RHDH (Red Hat Developer Hub) Repository Context
58

.claude/rules/github-workflows-security.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
paths: '.github/workflows/**, .github/actions/**'
2+
paths:
3+
- .github/workflows/**
4+
- .github/actions/**
35
---
46
# GitHub Workflows Security Best Practices
57

.claude/rules/managing-ai-rules.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
---
2-
paths: '.rulesync/**, .cursor/**, .claude/**'
2+
paths:
3+
- .rulesync/**
4+
- .cursor/**
5+
- .claude/**
6+
- .opencode/**
37
---
48
# Managing AI Assistant Rules
59

@@ -16,7 +20,7 @@ This document provides guidelines for creating, importing, and managing AI assis
1620

1721
## 🤖 Automated Checks
1822

19-
A GitHub Actions workflow (`.github/workflows/rulesync-check.yaml`) automatically validates that generated files in `.cursor` and `.claude` are in sync with `.rulesync` on:
23+
A GitHub Actions workflow (`.github/workflows/rulesync-check.yaml`) automatically validates that generated files in `.cursor`, `.claude`, and `.opencode` are in sync with `.rulesync` on:
2024
- All pull requests
2125
- Pushes to main and release branches
2226

@@ -30,7 +34,7 @@ A GitHub Actions workflow (`.github/workflows/rulesync-check.yaml`) automaticall
3034
```bash
3135
# If you forgot to generate from .rulesync
3236
yarn rulesync:generate
33-
git add .cursor .claude
37+
git add .cursor .claude .opencode
3438

3539
# If you edited .cursor files directly
3640
yarn rulesync:import:cursor
@@ -40,6 +44,10 @@ git add .rulesync
4044
yarn rulesync:import:claude
4145
git add .rulesync
4246

47+
# If you edited .opencode files directly
48+
yarn rulesync:import:opencode
49+
git add .rulesync
50+
4351
# Then commit and push
4452
git commit --amend --no-edit
4553
git push --force-with-lease
@@ -119,7 +127,7 @@ After creating or editing the rule:
119127
yarn rulesync:generate
120128

121129
# Then stage and commit
122-
git add .rulesync/rules/api-development.md .cursor .claude
130+
git add .rulesync/rules/api-development.md .cursor .claude .opencode
123131
git commit -m "docs: add API development rule"
124132
```
125133

@@ -189,7 +197,8 @@ Execute the following steps:
189197
- `["*"]` - All assistants
190198
- `["cursor"]` - Cursor only
191199
- `["claudecode"]` - Claude Code only
192-
- `["cursor", "copilot"]` - Multiple specific assistants
200+
- `["opencode"]` - OpenCode only
201+
- `["cursor", "claudecode", "opencode"]` - Multiple specific assistants
193202

194203
- **`description`** - Brief description of the rule/command
195204

@@ -223,7 +232,7 @@ Execute the following steps:
223232

224233
## 🚫 What NOT to Do
225234

226-
### ❌ Don't Edit Generated Files in `.cursor` and `.claude` Directly
235+
### ❌ Don't Edit Generated Files in `.cursor`, `.claude`, and `.opencode` Directly
227236

228237
Instead, edit the source in `.rulesync/` and then regenerate them:
229238

@@ -297,6 +306,7 @@ Local files:
297306
- ✅ `.cursor/rules/*.local.mdc` - Ignored
298307
- ✅ `.claude/**/*.local.md` - Ignored
299308
- ✅ `.claude/settings.local.json` - Ignored
309+
- ✅ `.opencode/**/*.local.md` - Ignored
300310

301311
## 🎓 Examples
302312

@@ -358,7 +368,7 @@ These standards apply to all code in this repository...
358368

359369
## ❓ Troubleshooting
360370

361-
### Problem: Rules not loading in AI Assistant (Cursor, Claude Code, ...)
371+
### Problem: Rules not loading in AI Assistant (Cursor, Claude Code, OpenCode, ...)
362372

363373
**Solution:**
364374
1. Check frontmatter is valid YAML

.claude/rules/playwright-locators.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
paths: e2e-tests/**
2+
paths:
3+
- e2e-tests/**
34
---
45
# Playwright Locator Best Practices
56

.cursor/commands/pr-review-prioritizer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
description: PR prioritization assistant that helps determine which pull request should be reviewed next based on a systematic scoring framework.
3+
---
14
# PR Review Prioritizer LLM Prompt
25

36
You are a PR prioritization assistant that helps determine which pull request should be reviewed next based on a systematic scoring framework.

.cursor/commands/trigger-nightly-job.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
description: Trigger RHDH nightly CI jobs on demand via the OpenShift CI Gangway REST API. Allows natural language selection of jobs and image tags.
3+
---
14
# Trigger Nightly Job
25

36
You are a CI assistant that helps trigger RHDH nightly ProwJobs via the script at `.ci/pipelines/trigger-nightly-job.sh`.

.cursor/rules/managing-ai-rules.mdc

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
alwaysApply: false
33
description: Guidelines for creating and managing AI assistant rules, commands, and configurations in the .rulesync folder
4-
globs: .rulesync/**,.cursor/**,.claude/**
4+
globs: .rulesync/**,.cursor/**,.claude/**,.opencode/**
55
---
66

77
# Managing AI Assistant Rules
@@ -19,7 +19,7 @@ This document provides guidelines for creating, importing, and managing AI assis
1919

2020
## 🤖 Automated Checks
2121

22-
A GitHub Actions workflow (`.github/workflows/rulesync-check.yaml`) automatically validates that generated files in `.cursor` and `.claude` are in sync with `.rulesync` on:
22+
A GitHub Actions workflow (`.github/workflows/rulesync-check.yaml`) automatically validates that generated files in `.cursor`, `.claude`, and `.opencode` are in sync with `.rulesync` on:
2323
- All pull requests
2424
- Pushes to main and release branches
2525

@@ -33,7 +33,7 @@ A GitHub Actions workflow (`.github/workflows/rulesync-check.yaml`) automaticall
3333
```bash
3434
# If you forgot to generate from .rulesync
3535
yarn rulesync:generate
36-
git add .cursor .claude
36+
git add .cursor .claude .opencode
3737

3838
# If you edited .cursor files directly
3939
yarn rulesync:import:cursor
@@ -43,6 +43,10 @@ git add .rulesync
4343
yarn rulesync:import:claude
4444
git add .rulesync
4545

46+
# If you edited .opencode files directly
47+
yarn rulesync:import:opencode
48+
git add .rulesync
49+
4650
# Then commit and push
4751
git commit --amend --no-edit
4852
git push --force-with-lease
@@ -122,7 +126,7 @@ After creating or editing the rule:
122126
yarn rulesync:generate
123127

124128
# Then stage and commit
125-
git add .rulesync/rules/api-development.md .cursor .claude
129+
git add .rulesync/rules/api-development.md .cursor .claude .opencode
126130
git commit -m "docs: add API development rule"
127131
```
128132

@@ -192,7 +196,8 @@ Execute the following steps:
192196
- `["*"]` - All assistants
193197
- `["cursor"]` - Cursor only
194198
- `["claudecode"]` - Claude Code only
195-
- `["cursor", "copilot"]` - Multiple specific assistants
199+
- `["opencode"]` - OpenCode only
200+
- `["cursor", "claudecode", "opencode"]` - Multiple specific assistants
196201

197202
- **`description`** - Brief description of the rule/command
198203

@@ -226,7 +231,7 @@ Execute the following steps:
226231

227232
## 🚫 What NOT to Do
228233

229-
### ❌ Don't Edit Generated Files in `.cursor` and `.claude` Directly
234+
### ❌ Don't Edit Generated Files in `.cursor`, `.claude`, and `.opencode` Directly
230235

231236
Instead, edit the source in `.rulesync/` and then regenerate them:
232237

@@ -300,6 +305,7 @@ Local files:
300305
- ✅ `.cursor/rules/*.local.mdc` - Ignored
301306
- ✅ `.claude/**/*.local.md` - Ignored
302307
- ✅ `.claude/settings.local.json` - Ignored
308+
- ✅ `.opencode/**/*.local.md` - Ignored
303309

304310
## 🎓 Examples
305311

@@ -361,7 +367,7 @@ These standards apply to all code in this repository...
361367

362368
## ❓ Troubleshooting
363369

364-
### Problem: Rules not loading in AI Assistant (Cursor, Claude Code, ...)
370+
### Problem: Rules not loading in AI Assistant (Cursor, Claude Code, OpenCode, ...)
365371

366372
**Solution:**
367373
1. Check frontmatter is valid YAML

.github/workflows/rulesync-check.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
- '.cursor/**'
88
- '.cursorignore'
99
- '.claude/**'
10+
- '.opencode/**'
11+
- 'opencode.json'
1012
- 'rulesync.jsonc'
1113
- '.rulesyncignore'
1214
push:
@@ -18,6 +20,8 @@ on:
1820
- '.cursor/**'
1921
- '.cursorignore'
2022
- '.claude/**'
23+
- '.opencode/**'
24+
- 'opencode.json'
2125
- 'rulesync.jsonc'
2226
- '.rulesyncignore'
2327

@@ -48,8 +52,10 @@ jobs:
4852
files: |
4953
.cursor/**
5054
.claude/**
55+
.opencode/**
5156
.cursorignore
5257
.rulesyncignore
58+
opencode.json
5359
5460
- name: Report out-of-sync files
5561
if: steps.verify-changed-files.outputs.files_changed == 'true'
@@ -62,5 +68,6 @@ jobs:
6268
echo " - yarn rulesync:generate if you forgot to generate the files from .rulesync"
6369
echo " - yarn rulesync:import:cursor if you edited .cursor files directly"
6470
echo " - yarn rulesync:import:claude if you edited .claude files directly"
71+
echo " - yarn rulesync:import:opencode if you edited .opencode files directly"
6572
echo " and then commit the changes"
6673
exit 1

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ dynamic-plugins-root/*
6969
.cursor/rules/*.local.mdc
7070
.rulesync/**/*.local.md
7171
.claude/**/*.local.md
72+
.claude/settings.json
7273
.claude/settings.local.json
74+
.opencode/**/*.local.md
7375

7476
# CI/Pipeline local overrides
7577
.ci/pipelines/shared_dir/*

0 commit comments

Comments
 (0)