Skip to content

Commit 638c3d7

Browse files
committed
chore(agents): add CLAUDE.md, refine AGENTS.md
1 parent e974d2d commit 638c3d7

2 files changed

Lines changed: 92 additions & 85 deletions

File tree

AGENTS.md

Lines changed: 26 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,35 @@
1-
# Mendix Web Widgets Repository - AI Agent Overview
1+
# Mendix Web Widgets Repository
22

3-
This document provides a comprehensive overview of the Mendix Web Widgets repository structure and conventions for AI development assistants. This repository contains the official collection of pluggable web widgets for the Mendix low-code platform.
3+
Monorepo of official Mendix pluggable web widgets. pnpm workspaces + Turbo.
44

5-
## Repository Overview
5+
## Structure
66

7-
The **Mendix Web Widgets** repository is the official home of all Mendix platform-supported pluggable web widgets and related modules. These are reusable UI components built with modern web technologies (React, TypeScript, SCSS) that integrate seamlessly into Mendix Studio Pro applications.
7+
- `packages/pluggableWidgets/*-web` — Widget packages (React, TypeScript, SCSS)
8+
- `packages/modules/*` — Mendix module packages
9+
- `packages/shared/*` — Shared configs and utilities
10+
- `automation/` — Build and release automation
11+
- `docs/requirements/` — Detailed technical requirements
812

9-
### Key Characteristics
10-
- **Monorepo structure** using pnpm workspaces and Turbo for build orchestration
11-
- **Modern web stack**: TypeScript, React, SCSS, Jest, ESLint, Prettier
12-
- **Mendix integration**: Built using Mendix Pluggable Widgets API
13-
- **Atlas UI alignment**: Consistent with Mendix's design system
14-
- **Comprehensive testing**: Unit tests (Jest/RTL), E2E tests (Playwright)
13+
## Commands
1514

16-
## Repository Structure
15+
| Command | Description |
16+
|---------|-------------|
17+
| `pnpm install` | Install dependencies |
18+
| `pnpm build` | Build all packages |
19+
| `pnpm lint` | Lint all packages |
20+
| `pnpm test` | Test all packages |
21+
| `pnpm --filter @mendix/<name> run <script>` | Run script in one package |
1722

18-
```
19-
├── packages/
20-
│ ├── pluggableWidgets/ # Main widget packages (*-web folders)
21-
│ ├── modules/ # Mendix modules
22-
│ ├── customWidgets/ # Custom widget implementations
23-
│ └── shared/ # Shared configurations and utilities
24-
├── docs/
25-
│ └── requirements/ # Detailed technical requirements (see below)
26-
├── automation/ # Build and release automation
27-
└── .github/ # GitHub workflows and Copilot instructions
28-
```
23+
## Conventions
2924

30-
## Detailed Requirements Documentation
25+
- TypeScript + React functional components + SCSS
26+
- Mendix Pluggable Widgets API (EditableValue, ActionValue, ListValue)
27+
- Atlas UI design system for styling
28+
- Conventional commits (commitlint enforced)
29+
- Semver versioning + CHANGELOG.md per package
3130

32-
The `/docs/requirements/` folder contains comprehensive technical documentation for understanding and contributing to this repository. Each document covers specific aspects of the development process:
31+
## Agent-Specific Instructions
3332

34-
### Core Requirements and Guidelines
35-
36-
- **[Project Requirements Document](docs/requirements/project-requirements-document.md)** - High-level overview of repository purpose, goals, target users, and design system alignment
37-
- **[Technology Stack and Project Structure](docs/requirements/tech-stack.md)** - Core technologies, monorepo structure, configuration standards, and development tools
38-
- **[Frontend Guidelines](docs/requirements/frontend-guidelines.md)** - CSS/SCSS styling guidelines, naming conventions, component best practices, and Atlas UI integration
39-
40-
### Development Workflow and Integration
41-
42-
- **[Application Flow and Widget Lifecycle](docs/requirements/app-flow.md)** - Complete widget development lifecycle from scaffolding to Studio Pro integration
43-
- **[Backend Structure and Data Flow](docs/requirements/backend-structure.md)** - Widget-to-Mendix runtime integration, data handling, and event management
44-
- **[Implementation Plan](docs/requirements/implementation-plan.md)** - Step-by-step guide for creating new widgets, including PR templates and testing requirements
45-
46-
### Module Development
47-
48-
- **[Widget to Module Conversion](docs/requirements/widget-to-module.md)** - Guidelines for converting widgets to Mendix modules when appropriate
49-
50-
## Development Commands
51-
52-
Key commands for working with this repository:
53-
54-
- **`pnpm lint`** - Run linting across all packages
55-
- **`pnpm test`** - Run unit tests across all packages
56-
- **`pnpm build`** - Build all packages
57-
- **`pnpm -w changelog`** - Update changelogs
58-
- **`pnpm -w version`** - Bump versions across packages
59-
60-
## AI Development Assistant Context
61-
62-
### For Code Reviews and PR Analysis
63-
See [.github/copilot-instructions.md](.github/copilot-instructions.md) for detailed PR review guidelines, including:
64-
- Mendix-specific conventions and API usage
65-
- React best practices and performance considerations
66-
- Testing requirements (unit, component, E2E)
67-
- Styling guidelines and Atlas UI integration
68-
- Version management and changelog requirements
69-
70-
### For Code Development
71-
When working on this repository, prioritize:
72-
73-
1. **Minimal changes** - Make surgical, precise modifications
74-
2. **Mendix conventions** - Follow established patterns for XML configuration, TypeScript props, and data handling
75-
3. **Testing coverage** - Ensure unit tests, component tests, and E2E tests as appropriate
76-
4. **Atlas UI consistency** - Use Atlas classes and design tokens
77-
5. **Performance** - Consider React render optimization and Mendix data efficiency
78-
79-
### Common Development Patterns
80-
81-
- **Widget Structure**: Each widget has XML configuration, TypeScript component, SCSS styling, and test files
82-
- **Data Integration**: Use Mendix API objects (EditableValue, ActionValue, ListValue) correctly
83-
- **Styling**: Prefer Atlas UI classes over custom styles; use SCSS for widget-specific styling
84-
- **Testing**: Follow Jest + RTL for unit tests, Playwright for E2E testing
85-
86-
## Getting Started
87-
88-
1. **Prerequisites**: Node.js ≥22, pnpm 10.15.0
89-
2. **Installation**: `pnpm install`
90-
3. **Development**: Set `MX_PROJECT_PATH` environment variable to your Mendix project
91-
4. **Building**: Use `pnpm build` or `pnpm start` for development builds
92-
5. **Testing**: Use `pnpm test` for unit tests, `pnpm e2e` for E2E tests
93-
94-
For detailed implementation guidance, refer to the specific requirement documents linked above.
33+
- **Claude Code** — See `CLAUDE.md` for hooks, commands, and detailed instructions
34+
- **GitHub Copilot** — See `.github/copilot-instructions.md` for PR review guidelines
35+
- **Cursor / Windsurf** — See `docs/requirements/` for rule files (YAML frontmatter compatible)

CLAUDE.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Mendix Web Widgets
2+
3+
Monorepo of official Mendix pluggable web widgets. pnpm workspaces + Turbo.
4+
5+
## Commands
6+
7+
- Install: `pnpm install`
8+
- Build all: `pnpm build`
9+
- Build one: `pnpm --filter @mendix/<name> run build`
10+
- Test one: cd into package dir, run `npm run test` (NOT from repo root)
11+
- Lint one: cd into package dir, run `npm run lint`
12+
- Changelog: `pnpm -w changelog`
13+
14+
## Structure
15+
16+
```
17+
packages/pluggableWidgets/*-web/ -> Widget packages (React + TS + SCSS)
18+
packages/modules/ -> Mendix module packages
19+
packages/shared/ -> Shared configs, plugins, utilities
20+
automation/ -> Build/release automation
21+
docs/requirements/ -> Detailed technical requirements
22+
```
23+
24+
## Hooks (auto-applied)
25+
26+
- **Auto-format**: Every file edit is auto-formatted by prettier via PostToolUse hook.
27+
Do NOT manually run `prettier --write` — it wastes tokens, the hook handles it.
28+
- **Auto-lint**: After each edit, eslint runs via `npm run lint` in the file's package.
29+
Lint errors are fed back automatically — fix them in the next edit, do NOT run lint commands manually.
30+
31+
## Conventions
32+
33+
- TypeScript strict, React functional components + hooks
34+
- Mendix Pluggable Widgets API: EditableValue, ActionValue, ListValue, DynamicValue
35+
- Check ActionValue.canExecute before execute()
36+
- Use EditableValue.setValue() for two-way binding
37+
- Render loading/empty states until values are ready
38+
- SCSS for styling, prefer Atlas UI classes, BEM-like naming with widget prefix
39+
- Conventional commits enforced: `type(scope): description`
40+
- Semver + CHANGELOG.md per package for runtime/XML/behavior changes
41+
- Jest + RTL for unit tests (src/**tests**/\*.spec.ts)
42+
- Playwright for E2E (e2e/\*.spec.js)
43+
44+
## Development Setup
45+
46+
- Node >=22, pnpm 10.x
47+
- Set MX_PROJECT_PATH to Mendix project dir for live reload
48+
- Run `pnpm start` inside widget package for dev build
49+
50+
## Detailed Reference
51+
52+
For deeper context, see:
53+
54+
- @docs/requirements/tech-stack.md — Full technology stack
55+
- @docs/requirements/frontend-guidelines.md — CSS/SCSS/Atlas UI guidelines
56+
- @docs/requirements/app-flow.md — Widget lifecycle and Studio Pro integration
57+
- @docs/requirements/backend-structure.md — Data flow and Mendix runtime
58+
- @docs/requirements/implementation-plan.md — New widget guide + PR template
59+
- @docs/requirements/project-requirements-document.md — Goals and scope
60+
61+
## Constraints
62+
63+
- Never modify dist/, generated files, or lockfiles
64+
- XML property keys: lowerCamelCase, must match TypeScript props exactly
65+
- Don't override core Atlas UI classes
66+
- Prefer tree-shakable imports for new dependencies

0 commit comments

Comments
 (0)