Skip to content

Latest commit

 

History

History
67 lines (46 loc) · 3.96 KB

AGENTS.md

File metadata and controls

67 lines (46 loc) · 3.96 KB

AGENTS.md - AI Coding Assistant Guide

This file provides guidance for AI coding assistants (Claude, Copilot, Cursor, etc.) when working with this repository.

Project Overview

OpenUI5 is an enterprise-grade JavaScript UI framework implementing SAP Fiori design. It is a monorepo containing ~30 library packages under src/, each following the src/{library}/src/{namespace}/ structure for sources and src/{library}/test/{namespace}/qunit/ for tests.

Requirements: Node.js ^20.17.0 || >=22.9.0, npm >=8

Running Tests

  • Single QUnit module: use the /run-test <module> skill. Do NOT use karma for individual modules.
  • Visual/screenshot tests: use the /run-visual-tests <lib> <SpecName> skill.

Linting

After editing sources, run npm run lint (ESLint over src/, cached). This is also the repo's npm test script. For LESS/theme changes, run npm run lint:styles. The linter enforces a "no LESS features" policy — LESS variables, mixins, guards, and color manipulation functions are flagged (at warning severity) as part of the migration to CSS custom properties. CSS-compatible nesting with & is allowed. Theme parameters (@sapUi*) are allowlisted in phase 1. See docs/stylelint.md for the full rule reference, the phased rollout plan, and per-library opt-in instructions for the Maven stylelintnode.build profile. Selector-complexity advice is disabled by default; use npm run lint:styles:complexity only for local refactoring checks.

Starting the Testsuite Server

Run npm start to serve the testsuite locally, useful for reproducing behavior in a browser.

Determining the @since Tag for New API

When adding new properties, aggregations, associations, methods, or API, read the version field from the root package.json (e.g. "1.148.0-SNAPSHOT") and use the version without the -SNAPSHOT suffix as the @since tag (e.g. @since 1.148).

Commit Message Format

See commit message guidelines.

Code Review (Gerrit)

This repository uses Gerrit for code review, not GitHub pull requests. Key rules for agents:

  • Do NOT push directly to master or any release branch.
  • Every commit must include a Change-Id: trailer in the commit message. Gerrit uses this to track changes across amended pushes. The Git hook at .git/hooks/commit-msg generates it automatically — do not skip hooks.
  • Push changes for review with: git push origin HEAD:refs/for/master
  • Do not force-push or rewrite commits that are already under review without explicit user instruction.

Metadata-Driven Controls (MDC)

When working on the sap.ui.mdc library (Metadata-Driven Controls), read src/sap.ui.mdc/AGENTS.md first. It covers the delegate pattern, PropertyInfo, personalization, and where MDC code belongs. Skip it for all other libraries.

Key References

Start here (read these first when working on code changes):

Additional references: