Skip to content

Commit dc41a22

Browse files
author
Daniel Duong
committed
Merge branch 'main' of https://github.com/opendatahub-io/odh-dashboard into feat/autorag-create
2 parents 026773d + 76af2d1 commit dc41a22

369 files changed

Lines changed: 26605 additions & 4087 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agentready-config.yaml

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
# AgentReady Configuration for ODH Dashboard
2+
# This file configures how AgentReady assesses the ODH Dashboard monorepo
3+
4+
# Repository metadata
5+
repository:
6+
type: monorepo
7+
package_manager: npm
8+
workspace_pattern: "packages/*"
9+
10+
# Source code locations (monorepo uses workspace-based structure)
11+
structure:
12+
source_directories:
13+
- "frontend/src"
14+
- "backend/src"
15+
- "packages/*/src"
16+
- "packages/*/frontend/src"
17+
- "packages/*/bff/src"
18+
19+
test_directories:
20+
- "frontend/__tests__"
21+
- "frontend/src/__tests__"
22+
- "backend/__tests__"
23+
- "backend/src/__tests__"
24+
- "packages/*/__tests__"
25+
- "packages/*/src/__tests__"
26+
- "packages/cypress"
27+
- "packages/contract-tests"
28+
29+
documentation_directories:
30+
- "docs"
31+
- "packages/*/docs"
32+
33+
# TypeScript configuration (uses project references pattern)
34+
typescript:
35+
# Root tsconfig.json uses project references
36+
# Actual strict mode is in workspace-level configs
37+
config_locations:
38+
- "tsconfig.json"
39+
- "frontend/tsconfig.json"
40+
- "backend/tsconfig.json"
41+
- "packages/*/tsconfig.json"
42+
43+
# Shared config package
44+
shared_config: "packages/tsconfig"
45+
46+
# Check strict mode in workspace configs, not root
47+
strict_mode_location: "workspace"
48+
49+
# Pre-commit hooks configuration
50+
hooks:
51+
# This repository uses Husky for hooks
52+
framework: "husky"
53+
locations:
54+
- ".husky/pre-commit"
55+
56+
# lint-staged configuration in package.json
57+
lint_staged: true
58+
59+
# Testing configuration
60+
testing:
61+
frameworks:
62+
- name: "jest"
63+
config: "packages/jest-config"
64+
coverage: true
65+
- name: "cypress"
66+
config: "packages/cypress"
67+
types: ["e2e", "component"]
68+
69+
coverage_locations:
70+
- "jest-coverage/"
71+
- "packages/*/coverage/"
72+
73+
# Build configuration
74+
build:
75+
tool: "turbo"
76+
config: "turbo.jsonc"
77+
78+
# One command setup/build
79+
setup_command: "npm install"
80+
build_command: "npm run build"
81+
test_command: "npm run test"
82+
83+
# Linting configuration
84+
linting:
85+
tools:
86+
- name: "eslint"
87+
config: ".eslintrc.js"
88+
shared_config: "packages/eslint-config"
89+
- name: "prettier"
90+
config: ".prettierrc"
91+
92+
# Lint runs on pre-commit via lint-staged
93+
pre_commit: true
94+
95+
# Module Federation specific
96+
module_federation:
97+
enabled: true
98+
host: "frontend"
99+
remotes:
100+
- "packages/gen-ai"
101+
- "packages/model-registry"
102+
- "packages/model-serving"
103+
# ... other federated packages
104+
105+
# Remote configuration in package.json "module-federation" field
106+
config_location: "package.json"
107+
108+
# Documentation assessment
109+
documentation:
110+
primary_docs:
111+
- "AGENTS.md" # AI agent guidance (10% weight)
112+
- "BOOKMARKS.md" # Quick reference
113+
- "README.md" # Project overview
114+
- "CONTRIBUTING.md" # Contribution guide
115+
116+
agent_specific:
117+
- "AGENTS.md"
118+
- "docs/agent-rules/*.md"
119+
- "packages/*/AGENTS.md"
120+
121+
technical_docs:
122+
- "docs/architecture.md"
123+
- "docs/module-federation.md"
124+
- "docs/testing.md"
125+
- "docs/best-practices.md"
126+
127+
# Exclusions from analysis
128+
exclude:
129+
# Build outputs
130+
- "dist/"
131+
- "build/"
132+
- "out/"
133+
- "public/"
134+
- "public-cypress/"
135+
136+
# Dependencies
137+
- "node_modules/"
138+
- "vendor/"
139+
140+
# Generated files
141+
- "*.js.map"
142+
- "*.css.map"
143+
- "@mf-types/"
144+
145+
# Test artifacts
146+
- "jest-coverage/"
147+
- "cypress/videos/"
148+
- "cypress/screenshots/"
149+
- ".nyc_output/"
150+
- "contract-test-results/"
151+
152+
# Caches
153+
- ".cache/"
154+
- ".turbo/"
155+
- ".agentready/"
156+
157+
# Temporary
158+
- "tmp/"
159+
- "logs/"
160+
161+
# Custom assessment rules for monorepo
162+
custom_rules:
163+
# Standard layout: Check for workspace-based src/tests, not root
164+
standard_layout:
165+
check_workspaces: true
166+
require_root_src: false
167+
168+
# Type annotations: Follow project references
169+
type_annotations:
170+
follow_references: true
171+
check_workspace_configs: true
172+
173+
# One-command setup: npm install handles all workspaces
174+
one_command_setup:
175+
command: "npm install"
176+
recognizes_workspaces: true
177+
178+
# Scoring weights (if customizable)
179+
weights:
180+
documentation: 0.15 # High weight on good docs
181+
testing: 0.15 # High weight on comprehensive tests
182+
code_quality: 0.10
183+
structure: 0.10
184+
185+
# Integration
186+
integrations:
187+
github_actions: true
188+
badge: true
189+
190+
# Reporting
191+
reporting:
192+
formats:
193+
- "json"
194+
- "markdown"
195+
- "html"
196+
197+
output_directory: ".agentready"
198+
199+
# Include package-level scores
200+
per_package_scores: true
201+
202+
---
203+
204+
# Notes for AgentReady Assessment Tool:
205+
206+
# This is an npm workspaces monorepo with ~25 packages. Key patterns:
207+
208+
# 1. Source Code Organization:
209+
# - NOT at root /src or /tests
210+
# - Distributed across workspaces: frontend/src/, backend/src/, packages/*/src/
211+
212+
# 2. TypeScript Configuration:
213+
# - Root tsconfig.json has "references" array (TypeScript project references)
214+
# - Strict mode configured in workspace-level configs
215+
# - Shared config in packages/tsconfig
216+
217+
# 3. Pre-commit Hooks:
218+
# - Uses Husky (.husky/pre-commit), not .pre-commit-config.yaml
219+
# - lint-staged configured in root package.json
220+
221+
# 4. One-Command Setup:
222+
# - `npm install` handles all workspace dependencies
223+
# - No separate setup script needed (npm workspaces feature)
224+
225+
# 5. Testing:
226+
# - Jest for unit tests (shared config in packages/jest-config)
227+
# - Cypress for E2E and component tests (packages/cypress)
228+
# - Tests co-located with source in __tests__ directories
229+
230+
# 6. Build Orchestration:
231+
# - Turbo manages builds across workspaces
232+
# - Single `npm run build` builds all packages in dependency order
233+
234+
# These patterns are STANDARD for modern monorepos but may appear as false
235+
# negatives if assessment tool expects traditional single-package structure.
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
name: model-registry-sync-status
3+
description: Check whether odh-dashboard's copy of the model-registry upstream (kubeflow/model-registry) is up to date, and show any unsynced commits.
4+
---
5+
6+
# Model Registry Sync Status
7+
8+
Check whether `odh-dashboard`'s copy of the upstream `kubeflow/model-registry` UI code is up to date.
9+
10+
## Workflow
11+
12+
### Step 0: Check local main branch status
13+
14+
Before checking upstream, verify that the local `main` branch is up to date with `opendatahub-io/odh-dashboard` main. The canonical remote for this repo is `upstream` (not `origin`, which is the user's fork):
15+
16+
```bash
17+
git fetch upstream main
18+
```
19+
20+
Compare the local `main` ref with `upstream/main`:
21+
22+
```bash
23+
git rev-parse main
24+
git rev-parse upstream/main
25+
```
26+
27+
If they differ, count how many commits the local branch is behind:
28+
29+
```bash
30+
git rev-list --count main..upstream/main
31+
```
32+
33+
Include this status in the report output (Step 5). If the local branch is behind, warn the user and suggest running `git pull upstream main` before proceeding with a sync.
34+
35+
### Step 1: Read subtree config from GitHub
36+
37+
Fetch `packages/model-registry/package.json` from the `main` branch of `opendatahub-io/odh-dashboard` on GitHub:
38+
39+
```bash
40+
gh api "repos/opendatahub-io/odh-dashboard/contents/packages/model-registry/package.json?ref=main" --jq '.content' | base64 -d
41+
```
42+
43+
Extract the `subtree` object from the JSON. It contains:
44+
- `repo` — the upstream GitHub repo URL (e.g. `https://github.com/kubeflow/model-registry.git`)
45+
- `branch` — the upstream branch to track (e.g. `main`)
46+
- `src` — the subdirectory in the upstream repo (e.g. `clients/ui`)
47+
- `commit` — the SHA of the last synced upstream commit
48+
49+
Parse the GitHub owner/repo from the `repo` URL (strip `https://github.com/` prefix and `.git` suffix).
50+
51+
### Step 2: Get commits since last sync from GitHub API
52+
53+
Use `gh api` to compare the synced commit against the upstream branch:
54+
55+
```bash
56+
gh api "repos/<owner>/<repo>/compare/<commit>...<branch>" --jq '[.commits[].sha]'
57+
```
58+
59+
### Step 3: Filter to commits touching the subtree src directory
60+
61+
For each commit SHA returned, check whether it touches files under the `src` path (e.g. `clients/ui`):
62+
63+
```bash
64+
gh api "repos/<owner>/<repo>/commits/<sha>" --jq '[.files[].filename]'
65+
```
66+
67+
Keep only commits where at least one file starts with the `src` prefix.
68+
69+
### Step 4: Get PR details for each relevant commit
70+
71+
Extract the PR number from each commit message (look for `(#XXXX)` pattern). For each PR number, fetch details:
72+
73+
```bash
74+
gh api "repos/<owner>/<repo>/pulls/<pr_number>" --jq '{author: .user.login, merged_at: .merged_at}'
75+
```
76+
77+
### Step 5: Output the report
78+
79+
Output a report with a title and a summary table.
80+
81+
**If there are no unsynced commits:**
82+
83+
```
84+
## Model Registry Sync Status
85+
86+
odh-dashboard's copy of the model-registry upstream is up to date at commit `<short-sha>`.
87+
```
88+
89+
**If there are unsynced commits:**
90+
91+
```
92+
## Model Registry Sync Status
93+
94+
odh-dashboard's copy of the model-registry upstream is not up to date. There are **N commits** on `<owner>/<repo>` `<branch>` (since synced commit `<short-sha>`) that touch `<src>`:
95+
96+
| Commit | PR | Author | Merged | Description |
97+
|--------|----|--------|--------|-------------|
98+
| `<short-sha>` | [#XXXX](https://github.com/<owner>/<repo>/pull/XXXX) | author | YYYY-MM-DD | commit message without PR ref |
99+
...
100+
```
101+
102+
- The Commit column shows the first 11 characters of the SHA.
103+
- The PR column is a markdown link to the pull request on GitHub.
104+
- The Author column is the GitHub username of the PR author.
105+
- The Merged column is the merge date (YYYY-MM-DD).
106+
- The Description column is the first line of the commit message with the trailing `(#XXXX)` removed.
107+
108+
**Local branch status (always shown after the upstream report):**
109+
110+
If local `main` matches `upstream/main`:
111+
```
112+
Local `main` is up to date with `upstream/main` (`opendatahub-io/odh-dashboard`).
113+
```
114+
115+
If local `main` is behind:
116+
```
117+
**Warning:** Local `main` is **N commits behind** `upstream/main` (`opendatahub-io/odh-dashboard`). Run `git pull upstream main` to update before syncing.
118+
```
119+
120+
### Step 6: Offer to sync
121+
122+
If there are unsynced commits, ask the user if they would like to run `/model-registry-upstream-sync` to sync the changes. If the local `main` branch is also behind `upstream/main`, remind the user that a `git pull upstream main` will be needed first (the sync skill handles this automatically).

0 commit comments

Comments
 (0)