Skip to content

Commit c348d3f

Browse files
Auto-merge main into odh-release (resolved conflicts)
2 parents 810a268 + 406d9ca commit c348d3f

2,252 files changed

Lines changed: 177018 additions & 47561 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.

.claude/rules/architecture.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
description: ODH Dashboard monorepo architecture, package boundaries, and BFF structure
3+
globs: "packages/**,frontend/**,backend/**"
4+
alwaysApply: false
5+
---
6+
7+
# ODH Dashboard Architecture
8+
9+
## Monorepo Structure
10+
11+
ODH Dashboard is a monorepo managed with npm workspaces and Turbo. It provides the web UI for Red Hat OpenShift AI (RHOAI) and Open Data Hub (ODH).
12+
13+
### Main Applications
14+
15+
- `frontend/` — Main React 18 dashboard application (PatternFly v6, Webpack, Module Federation host)
16+
- `backend/` — Fastify server with Kubernetes client integration, proxying requests to OpenShift APIs
17+
18+
### Feature Plugin Packages (`packages/`)
19+
20+
Each feature package is a **Module Federation remote** that gets dynamically loaded into the main frontend:
21+
22+
- `gen-ai` — Gen AI / LLM features (has Go BFF)
23+
- `model-registry` — Model Registry UI (has Go BFF)
24+
- `model-serving` — Model Serving UI
25+
- `model-serving-backport` — Model serving backport compatibility
26+
- `model-training` — Model training UI
27+
- `maas` — Model-as-a-Service (has Go BFF)
28+
- `notebooks` — Notebooks management
29+
- `kserve` — KServe integration
30+
- `automl` — AutoML features (has Go BFF)
31+
- `autorag` — AutoRAG features (has Go BFF)
32+
- `eval-hub` — Evaluation Hub (has Go BFF)
33+
- `feature-store` — Feature Store
34+
- `llmd-serving` — LLM serving
35+
- `mlflow` — MLflow integration (has Go BFF)
36+
- `mlflow-embedded` — Embedded MLflow integration
37+
- `observability` — Observability features
38+
- `plugin-core` — Core plugin utilities shared across plugins
39+
- `plugin-template` — Scaffold for new plugins
40+
41+
### Infrastructure Packages
42+
43+
- `eslint-config` — Centralized ESLint configuration (base, typescript, react, node, markdown, yaml, prettier)
44+
- `eslint-plugin` — Custom ESLint rules for the project
45+
- `jest-config` — Shared Jest test configuration and custom matchers
46+
- `tsconfig` — Shared TypeScript configuration
47+
- `app-config` — Shared application configuration and utilities
48+
- `contract-tests` — Central contract testing framework for BFF validation
49+
50+
### Testing Package
51+
52+
- `cypress` — Shared Cypress E2E and mock test framework, page objects, and utilities
53+
54+
## Package Boundaries (Critical)
55+
56+
- Feature packages MUST NOT import directly from other feature packages' internal modules.
57+
- Feature packages MUST use exported APIs from `plugin-core` or `app-config` for shared functionality.
58+
- Changes to infrastructure packages (`eslint-config`, `jest-config`, `tsconfig`) affect ALL packages — review with extra care.
59+
60+
## BFF (Backend-for-Frontend) Architecture
61+
62+
Several packages have a Go-based BFF service: `automl`, `autorag`, `eval-hub`, `gen-ai`, `maas`, `mlflow`.
63+
- Located in `bff/` within the package
64+
- Check each package's `bff/go.mod` for its required Go toolchain version
65+
- Exposes REST APIs consumed by the package's frontend
66+
- Must expose a `/healthcheck` endpoint
67+
- Has its own OpenAPI specification in `api/` or `bff/openapi/`

0 commit comments

Comments
 (0)