{"owner":"iOfficeAI","repo":"AionUi","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"files":{"AGENTS.md":"# AionUi - Project Guide\n\nAll contributors (human and AI) must follow [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR. ([Chinese version](CONTRIBUTING.zh.md))\n\n## Code Conventions\n\n### File & Directory Structure\n\n- **Directory size limit**: Prefer ≤ **10** direct children per directory; new or substantially reorganized directories must satisfy this.\n\nSee [docs/contributing/file-structure.md](docs/contributing/file-structure.md) for complete rules. Agents must also follow the `architecture` skill (`.claude/skills/architecture/SKILL.md`) when creating files or modules.\n\n### Naming\n\n- **Components**: PascalCase (`Button.tsx`, `Modal.tsx`)\n- **Utilities**: camelCase (`formatDate.ts`)\n- **Hooks**: camelCase with `use` prefix (`useTheme.ts`)\n- **Constants files**: camelCase (`constants.ts`) — values inside use UPPER_SNAKE_CASE\n- **Type files**: camelCase (`types.ts`)\n- **Style files**: kebab-case or `ComponentName.module.css`\n- **Unused params**: prefix with `_`\n\n### UI Library & Icons\n\n- **Components**: `@arco-design/web-react` — no raw interactive HTML (`<button>`, `<input>`, `<select>`, etc.)\n- **Icons**: `@icon-park/react`\n\n### CSS\n\n- Prefer **UnoCSS utility classes**; complex styles use **CSS Modules** (`ComponentName.module.css`)\n- Colors must use **semantic tokens** from `uno.config.ts` or CSS variables — no hardcoded values\n- Arco theme overrides go in `packages/desktop/src/renderer/styles/arco-override.css`; component-scoped Arco overrides use CSS Module with `:global()`\n- Global styles only in `packages/desktop/src/renderer/styles/`\n\nFormatting rules (Oxfmt, Prettier-compatible):\n\n- Single-element arrays that fit on one line → inline: `[{ id: 'a', value: 'b' }]`\n- Trailing commas required in multi-line arrays/objects\n- Single quotes for strings\n\n### TypeScript\n\n- Strict mode enabled — no `any`, no implicit returns\n- Use path aliases: `@/*`, `@process/*`, `@renderer/*`\n- Prefer `type` over `interface` (per Oxlint config)\n- English for code comments; JSDoc for public functions\n\n### Internationalization (i18n)\n\nNew or changed user-facing text must use i18n keys; do not introduce hardcoded strings. Languages and modules are defined in `packages/desktop/src/common/config/i18n-config.json`.\n\nSee the `i18n` skill (`.claude/skills/i18n/SKILL.md`) for complete workflow, key naming, and validation steps.\n\n## Architecture\n\nTwo process types — never mix their APIs:\n\n| Process  | Path                             | Restriction     |\n| -------- | -------------------------------- | --------------- |\n| Main     | `packages/desktop/src/process/`  | No DOM APIs     |\n| Renderer | `packages/desktop/src/renderer/` | No Node.js APIs |\n\nCross-process communication must go through the IPC bridge (`packages/desktop/src/preload/`).\nSee [docs/architecture/overview.md](docs/architecture/overview.md) for details.\n\n## Testing\n\n**Framework**: Vitest 4 (`vitest.config.ts`). Project coverage target is ≥ 80%; ordinary changes should add focused tests for changed behavior.\n\n```bash\nbun run test              # run all tests\nbun run test:coverage     # with coverage report\n```\n\nSee the `testing` skill (`.claude/skills/testing/SKILL.md`) for complete workflow and quality rules.\n\n## Workflow\n\n### Scope & Enforcement\n\n- **Hard blockers**: process boundary violations, TypeScript errors, failing tests, unsafe IPC usage, missing i18n for new or changed user-facing text, and raw interactive HTML in new UI.\n- **Current-change requirements**: naming, CSS, file placement, tests, docs, directory size, and single-file-directory rules apply to files created or meaningfully modified by the current change.\n- **Ratchet rules**: existing directory size or single-file-directory violations do not require cleanup during ordinary feature work or bugfixes, but the current change must not make them worse.\n- **No scope expansion**: implementation plans and reviews must not create extra tasks, phases, or acceptance criteria for cleanup unless the user asks for that scope.\n- **Ignored working docs**: `docs/superpowers/` is intentionally gitignored for local Superpowers specs and plans. Do not force-add or otherwise commit files from this directory.\n\n### During Development\n\nAuto-fix as you edit:\n\n```bash\nbun run lint:fix       # auto-fix lint issues (oxlint)\nbun run format         # auto-format all files (oxfmt)\nbunx tsc --noEmit      # verify no type errors\n```\n\nIf your changes touch `packages/desktop/src/renderer/`, `locales/`, or `packages/desktop/src/common/config/i18n`, also run:\n\n```bash\nbun run i18n:types\nnode scripts/check-i18n.js\n```\n\n### Before Pushing\n\nAI agents must not push unless explicitly asked. When pushing, use `just push`, never `git push`:\n\n```bash\njust push                          # lint → format-check → typecheck → test → git push\njust push -u origin feat/branch    # same checks, with extra git push args\n```\n\nAny step that fails aborts the push. Fix the issue, commit, then retry.\n\n> **Note for AI agents**: `just push` uses `--quiet` for lint — only errors cause failure. The project has many pre-existing lint _warnings_ which do NOT indicate failure. Judge success by exit code, not by output volume.\n\n### Before PR (optional stricter check)\n\n`prek` replicates the **exact CI pipeline** (includes end-of-file, trailing whitespace checks on all file types):\n\n```bash\n# One-time setup\nnpm install -g @j178/prek\n\n# Run\nprek run --from-ref origin/main --to-ref HEAD\n```\n\n> `prek` is read-only — it reports but does not fix. If it reports issues, run the auto-fix commands above, commit, then re-run.\n\n### Commit & PR Format\n\nCommits and PR titles must follow the Conventional Commit format defined in [CONTRIBUTING.md](CONTRIBUTING.md):\n\n```text\n<type>(<scope>): <subject>\n```\n\nAllowed types: `feat`, `fix`, `perf`, `refactor`, `docs`, `style`, `chore`, `test`, `ci`, `build`.\n\nWhen opening a PR, fill in the PR body using [.github/pull_request_template.md](.github/pull_request_template.md) and complete its checklists honestly (only check items you actually ran or verified).\n\n**NEVER add AI signatures** (Co-Authored-By, Generated with, etc.).\n\n## Skills Index\n\n| Skill            | Purpose                                                                     | Triggers                                                                                               |\n| ---------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |\n| **architecture** | File & directory structure conventions for all process types                | Creating files, adding modules, architectural decisions                                                |\n| **i18n**         | Internationalization workflow and standards                                 | Adding or changing user-facing text, modifying `locales/` or `packages/desktop/src/common/config/i18n` |\n| **testing**      | Testing workflow and quality standards                                      | Writing tests, changing runtime behavior, fixing bugs, or claiming behavior is verified                |\n| **bump-version** | Version bump workflow: update package.json, checks, branch, PR, tag release | Bumping version, `/bump-version`                                                                       |\n\n> Skills are located in `.claude/skills/` and contain project conventions that apply to **all** agents and contributors.\n"}}