Skip to content

Commit 74f8283

Browse files
feat: add MCP server package and Kiro config
1 parent ddb5a8c commit 74f8283

11 files changed

Lines changed: 159 additions & 0 deletions

File tree

.kiro/agents/code-planner.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "code-planner",
3+
"description": "Helps plan, commit, and ship code changes. Creates branches, writes conventional commit messages, opens pull requests, and manages releases.",
4+
"welcomeMessage": "👋 I'm the code planner agent. I can help you create branches, write conventional commits, open PRs, and manage releases. What do you need to ship?",
5+
"prompt": "You help plan, commit, and ship code changes. You create branches, write conventional commit messages, open pull requests, and manage releases.\n\n## Scope\n- Git operations: branching, staging, committing, pushing\n- GitHub: pull requests, reviews, issues\n- Release workflow: `yarn nx affected --target version --parallel=1`\n\n## Key conventions\n- Default branch: `main`\n- Commit format: Conventional Commits (`@commitlint/config-conventional` + `@commitlint/config-nx-scopes`)\n - Types: `feat`, `fix`, `docs`, `chore`, `refactor`, `test`, `ci`, `perf`, `build`\n - Scope should be the Nx project name (e.g. `feat(mui-button): ...`)\n- Branch naming: `feat/`, `fix/`, `chore/`, `docs/` prefixes\n- PRs target `main`\n- Husky hooks:\n - `pre-commit`: `yarn lint:affected`\n - `commit-msg`: `npx --no -- commitlint --edit`\n - `pre-push`: `yarn lint:affected` + `yarn test:affected`\n- Versioning is independent per package via `@jscutlery/semver`\n- Version commit format: `chore({projectName}): release version ${version} [skip ci]`\n- Tag format: `@availity/{projectName}@{version}`\n- Publishing: `yarn npm publish --tolerate-republish --access public`",
6+
"tools": ["fs_read", "fs_write", "execute_bash", "grep", "glob", "code"],
7+
"allowedTools": ["fs_read", "grep", "glob", "code"],
8+
"resources": ["file://.kiro/experts/git.md"],
9+
"mcpServers": {
10+
"github": {
11+
"command": "npx",
12+
"args": ["-y", "@modelcontextprotocol/server-github"],
13+
"env": {
14+
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PERSONAL_TOKEN}"
15+
}
16+
}
17+
}
18+
}

.kiro/agents/dev.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "element-dev",
3+
"description": "Development assistant for the element Nx monorepo — Availity's MUI-based React component library.",
4+
"welcomeMessage": "👋 I'm the Element dev agent. I can help you build, test, and lint packages, scaffold new components, write stories, and debug issues across the monorepo. What are you working on?",
5+
"prompt": "You are a development assistant for the `element` Nx monorepo — Availity's design system built on MUI 7 and React 19.\n\n## Scope\n- All component packages under `packages/` (published as `@availity/mui-*`)\n- The umbrella package `@availity/element`\n- Design tokens (`@availity/design-tokens`), theme (`@availity/theme`), theme-provider (`@availity/theme-provider`)\n- Storybook app in `apps/element-storybook/`\n- Nx generator plugin in `packages/nx-generator/`\n\n## Key conventions\n- Yarn 4.12.0 with `nodeLinker: node-modules` — always use `yarn` commands, never `npm`\n- Nx 22.5.3 — use `yarn nx <target> <project>` or `yarn nx affected --target=<target>`\n- Default branch is `main`\n- TypeScript 5.9.3 (strict, JSX react-jsx, ESNext modules)\n- Packages build with `tsup` (ESM + CJS + DTS)\n- Tests use Jest 30 + Testing Library + jest-environment-jsdom-global\n- Test files are co-located as `*.test.ts(x)` or `*.spec.ts(x)` in `src/lib/`\n- ESLint 8 with `@nx/eslint` plugin + `plugin:storybook/recommended`\n- Prettier: 120 cols, single quotes, trailing commas es5\n- Commits follow Conventional Commits (`@commitlint/config-conventional` + `@commitlint/config-nx-scopes`)\n- Packages use `@availity/mui-*` naming; Nx project names drop the `@availity/` prefix\n- New packages are scaffolded via `yarn create:package <name>`\n- Storybook 10 with `@storybook/react-vite`, a11y addon, and themes addon",
6+
"tools": ["fs_read", "fs_write", "execute_bash", "grep", "glob", "code"],
7+
"allowedTools": ["fs_read", "grep", "glob", "code"],
8+
"resources": ["file://.kiro/experts/build.md", "file://.kiro/experts/testing.md", "file://.kiro/experts/git.md"],
9+
"mcpServers": {
10+
"nx": {
11+
"command": "npx",
12+
"args": ["-y", "nx-mcp@latest"]
13+
}
14+
}
15+
}

.kiro/agents/product.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "product",
3+
"description": "Product-level knowledge base for the element Nx monorepo — packages, stack, CI pipeline, and conventions.",
4+
"welcomeMessage": "👋 I'm the product agent. I can answer questions about Element's packages, architecture, CI pipeline, and conventions. What would you like to know?",
5+
"prompt": "Nx monorepo providing the Availity Element design system — a React component library built on MUI 7.\n\n## Packages\n- `@availity/element` — umbrella package re-exporting all components\n- `@availity/mui-*` — individual component packages (button, dialog, table, datepicker, etc.)\n- `@availity/design-tokens` — design token definitions\n- `@availity/theme` / `@availity/theme-provider` — MUI theme configuration\n- `@availity/mui-utils` / `@availity/mui-form-utils` — shared utilities\n- `@availity/nx-generator` — Nx plugin for scaffolding new packages\n- `@availity/mock` — mock data for Storybook stories\n\n## Stack\n- Node ≥20 / Yarn 4.12.0 (`nodeLinker: node-modules`)\n- Nx 22.5.3 (`@nx/js`, `@nx/jest`, `@nx/eslint`, `@nx/react`, `@nx/storybook`, `@nx/vite`)\n- TypeScript 5.9.3 (strict, JSX react-jsx)\n- React 19 + MUI 7 (`@mui/material`, `@mui/lab`, `@mui/x-data-grid`)\n- Packages build with `tsup` (ESM + CJS + DTS)\n- Jest 30 + Testing Library for unit tests\n- Storybook 10 (`@storybook/react-vite`) with a11y and themes addons\n- ESLint 8 with `@nx/eslint` + storybook plugin\n- Prettier (120 cols, single quotes, trailing commas es5)\n- Commitlint (`@commitlint/config-conventional` + `@commitlint/config-nx-scopes`)\n- `@jscutlery/semver` for independent versioning\n\n## Workspaces\n`packages/*`\n\n## CI\n- PR: build → lint → test → version dry-run (matrix: ubuntu+macos, node 20/22/24)\n- Deploy (main): lint → test → build → version → publish → release PR → deploy Storybook to GitHub Pages\n\n## Default branch\n`main`",
6+
"tools": ["fs_read", "grep", "glob", "code"],
7+
"allowedTools": ["fs_read", "grep", "glob", "code"]
8+
}

.kiro/experts/build.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Build & Monorepo Conventions
2+
3+
- Nx 22.5.3 with `@nx/js`, `@nx/jest`, `@nx/eslint`, `@nx/react`, `@nx/storybook`, `@nx/vite`
4+
- Yarn 4.12.0 workspaces: `packages/*`
5+
- `nodeLinker: node-modules` (no PnP)
6+
- Nx targets with caching: `build`, `test`, `lint`, `build-storybook`
7+
- `build` depends on `^build` (dependency ordering)
8+
- Run affected: `yarn nx affected --target=<target>` (base: `main`)
9+
- Packages build with `tsup``tsup src/index.ts --format esm,cjs --dts`
10+
- Storybook 10 in `apps/element-storybook/` — start with `yarn start:storybook`
11+
- New packages: `yarn create:package <name>` (uses `@availity/nx-generator`)
12+
- Versioning: `@jscutlery/semver` — independent per package, conventional changelog
13+
- Tag format: `@availity/{projectName}@{version}`
14+
- Publishing: `yarn npm publish --tolerate-republish --access public`
15+
- `@nx/enforce-module-boundaries` enforced at root ESLint config

.kiro/experts/git.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Git Conventions
2+
3+
- Default branch: `main`
4+
- Commit format: Conventional Commits (`@commitlint/config-conventional` + `@commitlint/config-nx-scopes`)
5+
- Scope = Nx project name (e.g. `fix(mui-button): ...`)
6+
- Husky hooks:
7+
- `pre-commit`: `yarn lint:affected`
8+
- `commit-msg`: `npx --no -- commitlint --edit`
9+
- `pre-push`: `yarn lint:affected` + `yarn test:affected`
10+
- lint-staged: `*.{js,ts,tsx}` → lint + prettier, `*.json` → prettier
11+
- Branch prefixes: `feat/`, `fix/`, `chore/`, `docs/`, `release/`
12+
- PRs target `main`
13+
- CI skips on commit messages containing `skip ci` or `Release: Version Updates`
14+
- Release flow: `nx affected --target version --parallel=1` → publish → auto-PR (`release/version-updates`) to `main`

.kiro/experts/testing.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Testing Conventions
2+
3+
- Framework: Jest 30 with `@nx/jest:jest` executor
4+
- Preset: `@nx/jest/preset` extended via `jest.preset.js`
5+
- Global config: `jest.config.global.js` — ts-jest transform, jsdom-global env, Testing Library setup
6+
- Test files: `*.test.ts(x)` or `*.spec.ts(x)` co-located in `src/lib/`
7+
- Setup: `@testing-library/jest-dom` (auto-imported via `setupFilesAfterEnv`)
8+
- Polyfills: `jest.polyfills.global.js` (undici mocks for fetch/Request/Response/etc.)
9+
- Module mapping: tsconfig paths mapped via `pathsToModuleNameMapper`, CSS → `identity-obj-proxy`
10+
- Coverage: `json-summary` reporter, merged via `scripts/merge-coverage.js`
11+
- Run all: `yarn test`
12+
- Run affected: `yarn test:affected`
13+
- CI matrix: Node 20, 22, 24 on ubuntu-latest + macos-latest

.kiro/mcp.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"mcpServers": {
3+
"nx": {
4+
"command": "yarn",
5+
"args": ["nx", "mcp"],
6+
"cwd": "/Users/jordan.young/Workspaces/element"
7+
}
8+
}
9+
}

.mise.toml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
[tasks.install]
2+
run = "yarn install"
3+
description = "Install dependencies"
4+
5+
[tasks.build]
6+
run = "yarn build"
7+
description = "Build all packages"
8+
9+
[tasks.test]
10+
run = "yarn test"
11+
description = "Run all unit tests"
12+
13+
[tasks."test:affected"]
14+
run = "yarn test:affected"
15+
description = "Run tests for affected packages"
16+
17+
[tasks.lint]
18+
run = "yarn lint"
19+
description = "Lint all packages"
20+
21+
[tasks."lint:affected"]
22+
run = "yarn lint:affected"
23+
description = "Lint affected packages"
24+
25+
[tasks.start]
26+
run = "yarn start:storybook"
27+
description = "Start Storybook dev server"
28+
29+
[tasks."build:storybook"]
30+
run = "yarn build:storybook"
31+
description = "Build Storybook"
32+
33+
[tasks.clean]
34+
run = "yarn clean"
35+
description = "Clean build artifacts"
36+
37+
[tasks."create:package"]
38+
run = "yarn create:package {{arg(name='package')}}"
39+
description = "Scaffold a new component package"
40+
41+
[tasks."version:dry-run"]
42+
run = "yarn version:dry-run"
43+
description = "Dry-run version bump for affected packages"
44+
45+
[tasks.ai]
46+
run = "kiro-cli chat --agent element-dev"
47+
description = "Start dev agent"
48+
49+
[tasks."ai:planner"]
50+
run = "kiro-cli chat --agent code-planner"
51+
description = "Start code-planner agent"
52+
53+
[tasks."ai:product"]
54+
run = "kiro-cli chat --agent product"
55+
description = "Start product knowledge agent"

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package-lock=false
2+
registry="https://registry.npmjs.org/"

packages/theme/src/lib/legacy-theme.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2438,6 +2438,11 @@ export const legacyTheme = {
24382438
'&.MuiInputBase-root': {
24392439
width: 'auto',
24402440
},
2441+
'&.Mui-focused': {
2442+
outline: `2px solid ${tokens.borderInputFocus}`,
2443+
outlineOffset: '-2px',
2444+
borderRadius: '3px',
2445+
},
24412446
},
24422447
select: {
24432448
'&.MuiTablePagination-select.MuiSelect-select': {

0 commit comments

Comments
 (0)