diff --git a/.kiro/agents/code-planner.json b/.kiro/agents/code-planner.json new file mode 100644 index 00000000..7bcb8858 --- /dev/null +++ b/.kiro/agents/code-planner.json @@ -0,0 +1,18 @@ +{ + "name": "code-planner", + "description": "Helps plan, commit, and ship code changes. Creates branches, writes conventional commit messages, opens pull requests, and manages releases.", + "welcomeMessage": "👋 I'm the code planner. I help with branching, conventional commits, PRs, and releases. What do you need to ship?", + "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: `nx affected --target version --parallel=1`\n\n## Key conventions\n- Default branch: `master`\n- Commit format: Conventional Commits (`@commitlint/config-conventional`)\n - Types: `feat`, `fix`, `docs`, `chore`, `refactor`, `test`, `ci`, `perf`, `build`\n - Scope should be the package name without `@availity/` prefix (e.g. `feat(workflow): ...`)\n - Header max length: 85 chars (warning, not enforced as error)\n- Branch naming: `feat/`, `fix/`, `chore/`, `docs/` prefixes\n- PRs target `master`\n- Husky pre-commit runs `yarn constraints` + `yarn lint-staged`\n- Husky commit-msg runs `yarn constraints` + `yarn commitlint --edit`\n- Versioning is independent per package via `@jscutlery/semver`", + "tools": ["fs_read", "fs_write", "execute_bash", "grep", "glob", "code"], + "allowedTools": ["fs_read", "grep", "glob", "code"], + "resources": ["file://.kiro/experts/git.md"], + "mcpServers": { + "github": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-github"], + "env": { + "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PERSONAL_TOKEN}" + } + } + } +} diff --git a/.kiro/agents/dev.json b/.kiro/agents/dev.json new file mode 100644 index 00000000..b71a1052 --- /dev/null +++ b/.kiro/agents/dev.json @@ -0,0 +1,15 @@ +{ + "name": "availity-workflow-dev", + "description": "Development assistant for the availity-workflow Nx monorepo. Helps add features, write documentation, debug build issues, and understand the codebase.", + "welcomeMessage": "👋 I'm the availity-workflow dev assistant. I can help you add features, debug builds, write docs, and navigate the monorepo. What are you working on?", + "prompt": "You are a development assistant for the `availity-workflow` Nx monorepo. You help add features, write documentation, debug build issues, and understand the codebase.\n\n## Scope\n- All packages under `packages/`, the `example/` app, `vite-example/`, and `docusaurus/` site\n- Webpack and Vite build pipelines inside `@availity/workflow`\n- Mock server routes and fixture data\n- Docusaurus documentation\n\n## Key conventions\n- Yarn 4.11.0 with `nodeLinker: node-modules` — always use `yarn` commands, never `npm`\n- Nx 22.5.1 — use `yarn nx ` or `yarn nx affected --target=`\n- Nx default base branch is `master`\n- Tests are Vitest specs co-located as `*.spec.js` inside `packages/`\n- ESLint flat config via `eslint-config-availity/browser`\n- All packages use `\"type\": \"module\"` (ESM)\n- Workspace deps must use `workspace:*` (enforced by `constraints.pro`)\n- Commits follow Conventional Commits (`@commitlint/config-conventional`)", + "tools": ["fs_read", "fs_write", "execute_bash", "grep", "glob", "code"], + "allowedTools": ["fs_read", "grep", "glob", "code"], + "resources": ["file://.kiro/experts/build.md", "file://.kiro/experts/testing.md", "file://.kiro/experts/git.md"], + "mcpServers": { + "nx": { + "command": "npx", + "args": ["-y", "nx-mcp@latest"] + } + } +} diff --git a/.kiro/agents/product.json b/.kiro/agents/product.json new file mode 100644 index 00000000..3ac84ae2 --- /dev/null +++ b/.kiro/agents/product.json @@ -0,0 +1,8 @@ +{ + "name": "product", + "description": "Product-level knowledge base for the availity-workflow Nx monorepo — packages, stack, CI pipeline, and conventions.", + "welcomeMessage": "👋 I'm the product knowledge base. Ask me about packages, the tech stack, CI pipeline, or repo conventions.", + "prompt": "Nx monorepo providing the build toolchain and dev workflow for Availity React applications.\n\n## Packages\n| Package | Description |\n|---|---|\n| `@availity/workflow` | CLI (`av` / `workflow`) — webpack & vite builds, dev server, test runner |\n| `@availity/mock-server` | Express mock server simulating Availity REST APIs |\n| `@availity/mock-data` | Fixture data consumed by mock-server |\n| `@availity/workflow-logger` | Colorized console logger |\n| `@availity/workflow-upgrade` | Interactive upgrade tool for consumer projects |\n\n## Stack\n- Node ≥20 / Yarn 4.11.0 (PnP disabled — `nodeLinker: node-modules`)\n- Nx 22.5.1 (`@nx/js`, `@nx/workspace`) — task orchestration, affected commands, caching\n- TypeScript 5.9.3 (strict, noEmit, JSX react)\n- Vitest 4 for unit tests (root `vitest.config.js` — `packages/**/*.spec.js`)\n- ESLint via `eslint-config-availity/browser` (flat config)\n- Prettier (120 cols, single quotes, no trailing commas)\n- Commitlint (`@commitlint/config-conventional`)\n- `@jscutlery/semver` for independent versioning via `nx affected --target version`\n- Docusaurus site in `docusaurus/`\n\n## Workspaces\n`packages/*`, `docusaurus`, `example`\n\n## CI\n- PR: lint → test → integration → version dry-run → build docs & app (matrix: ubuntu+macos, node 20/22/24)\n- Deploy (master): lint → test → integration → version → publish → release PR → deploy docs to GitHub Pages\n\n## Default branch\n`master`", + "tools": ["fs_read", "grep", "glob", "code"], + "allowedTools": ["fs_read", "grep", "glob", "code"] +} diff --git a/.kiro/experts/build.md b/.kiro/experts/build.md new file mode 100644 index 00000000..1f286dc7 --- /dev/null +++ b/.kiro/experts/build.md @@ -0,0 +1,15 @@ +# Build & Monorepo Conventions + +- Nx 22.5.1 with `@nx/js` and `@nx/workspace` — extends `@nx/workspace/presets/npm.json` +- Yarn 4.11.0 workspaces: `packages/*`, `docusaurus`, `example` +- `nodeLinker: node-modules` (no PnP) +- Nx targets with caching: `build`, `test`, `lint`, `package`, `prepare` +- `build` and `package` targets have `dependsOn` for dependency ordering +- Run affected: `yarn nx affected --target=` (base: `master`) +- Workspace deps must be `workspace:*` — enforced by `constraints.pro` +- `@availity/workflow` provides both webpack and vite build pipelines +- Docusaurus site builds with `yarn nx build docusaurus` +- Example app builds with `yarn build:app` +- All packages are ESM (`"type": "module"`) +- Versioning: `@jscutlery/semver` — independent per package, conventional changelog +- Publishing: `yarn npm publish --tolerate-republish --access public` diff --git a/.kiro/experts/git.md b/.kiro/experts/git.md new file mode 100644 index 00000000..918be4b2 --- /dev/null +++ b/.kiro/experts/git.md @@ -0,0 +1,13 @@ +# Git Conventions + +- Default branch: `master` +- Commit format: Conventional Commits (`@commitlint/config-conventional`) +- Scope = package name without `@availity/` (e.g. `fix(mock-server): ...`) +- Header max length: 85 chars (warning level) +- Husky hooks: + - `pre-commit`: `yarn constraints` + `yarn lint-staged` + - `commit-msg`: `yarn constraints` + `yarn commitlint --edit` +- Branch prefixes: `feat/`, `fix/`, `chore/`, `docs/`, `release/` +- PRs target `master` — see `.github/PULL_REQUEST_TEMPLATE.md` +- CI skips on commit messages containing `skip ci` or `Release: Version Updates` +- Release flow: `nx affected --target version --parallel=1` → publish → auto-PR to `master` diff --git a/.kiro/experts/testing.md b/.kiro/experts/testing.md new file mode 100644 index 00000000..5dcc23c9 --- /dev/null +++ b/.kiro/experts/testing.md @@ -0,0 +1,11 @@ +# Testing Conventions + +- Framework: Vitest 4 (root `vitest.config.js`) +- Globals enabled (`describe`, `it`, `expect` available without imports) +- Test pattern: `packages/**/*.spec.js` +- Excluded from test: `docusaurus/`, `example/`, `node_modules/` +- Example app uses Jest (`jest.setup.js` with `@testing-library/jest-dom`) +- Run all tests: `yarn test` (vitest run) +- Run affected: `yarn nx affected --target=test` +- Integration tests: `yarn test:integration` (per-workspace `integration` script) +- CI matrix: Node 20, 22, 24 on ubuntu-latest + macos-latest diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 00000000..fff780c6 --- /dev/null +++ b/.mise.toml @@ -0,0 +1,42 @@ +# availity-workflow - Mise Configuration + +[tasks.install] +description = "Install dependencies" +run = "yarn install" + +[tasks.build] +description = "Build example app" +run = "yarn build:app" + +[tasks.test] +description = "Run all tests" +run = "yarn test" + +[tasks.lint] +description = "Lint all packages" +run = "yarn lint" + +[tasks.format] +description = "Format all files" +run = "yarn format" + +[tasks.start] +description = "Start Docusaurus docs site" +run = "yarn start" + +[tasks."start:app"] +description = "Start example app dev server" +run = "yarn start:app" + +# KIRO CLI Agent Shortcuts +[tasks.ai] +description = "Start dev agent - General development and debugging" +run = "kiro-cli chat --agent availity-workflow-dev" + +[tasks."ai:planner"] +description = "Start code-planner agent - Branching, commits, and PRs" +run = "kiro-cli chat --agent code-planner" + +[tasks."ai:product"] +description = "Start product agent - Project knowledge and conventions" +run = "kiro-cli chat --agent product" diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..e1c7f340 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +package-lock=false +registry="https://registry.npmjs.org/"