agentleFS
CES-LtdCES-Ltd/TitanX/AGENTS.md

TitanX

AGENTS.md48 starsChanged 8 months agoApache-2.0View on GitHub

See docs/conventions/file-structure.md for complete rules on directory naming, page module layout, and shared vs private code placement. Agents working in this repository must also read and follow the architecture skill (.claude/skills/architecture/SKILL.md) when creating files, modules, or making structure decisions. See docs/conventions/file-structure.md for full CSS and UI library rules. Three process types — never mix their APIs: Cross-process communication must go through the IPC bridge (src/preload.ts). See docs/tech/architecture.md for details. Framework: Vitest 4 (vitest.config.ts). Run bun run test before every commit.…

  • Installs packages
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository11 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer UnoCSS utility classes.

    line 28
  2. Very specific:

    Use path aliases: @/*, @process/*, @renderer/*, @worker/*

    line 38
  3. Very specific:

    Prefer type over interface (per Oxlint config)

    line 39
  4. Very specific:

    i18n validation: If your changes touch src/renderer/, locales/, or src/common/config/i18n, run:

    line 82
  5. Very specific:

    Commit format: <type>(<scope>): <subject> in English.

    line 99
  6. Very specific:

    All user-facing text must use i18n keys — never hardcode strings.

    line 130

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AionUi - Project Guide

Code Conventions

File & Directory Structure

  • Directory size limit: A single directory must not exceed 10 direct children (files + subdirectories). Split by responsibility when approaching this limit.

See docs/conventions/file-structure.md for complete rules on directory naming, page module layout, and shared vs private code placement. Agents working in this repository must also read and follow the architecture skill (.claude/skills/architecture/SKILL.md) when creating files, modules, or making structure decisions.

Naming

  • Components: PascalCase (Button.tsx, Modal.tsx)
  • Utilities: camelCase (formatDate.ts)
  • Hooks: camelCase with use prefix (useTheme.ts)
  • Constants files: camelCase (constants.ts) — values inside use UPPER_SNAKE_CASE
  • Type files: camelCase (types.ts)
  • Style files: kebab-case or ComponentName.module.css
  • Unused params: prefix with _

UI Library & Icons

  • Components: @arco-design/web-react — no raw interactive HTML (<button>, <input>, <select>, etc.)
  • Icons: @icon-park/react

CSS

  • Prefer UnoCSS utility classes; complex styles use CSS Modules (ComponentName.module.css)
  • Colors must use semantic tokens from uno.config.ts or CSS variables — no hardcoded values
  • Arco overrides go in the component's CSS Module via :global() — no global override files
  • Global styles only in src/renderer/styles/

See docs/conventions/file-structure.md for full CSS and UI library rules.

TypeScript

  • Strict mode enabled — no any, no implicit returns
  • Use path aliases: @/*, @process/*, @renderer/*, @worker/*
  • Prefer type over interface (per Oxlint config)
  • English for code comments; JSDoc for public functions

Architecture

Three process types — never mix their APIs:

  • src/process/ — main process, no DOM APIs
  • src/renderer/ — renderer, no Node.js APIs
  • src/process/worker/ — fork workers, no Electron APIs

Cross-process communication must go through the IPC bridge (src/preload.ts). See docs/tech/architecture.md for details.

Testing

Framework: Vitest 4 (vitest.config.ts). Run bun run test before every commit. Coverage target ≥ 80%.

See the testing skill (.claude/skills/testing/SKILL.md) for complete workflow, quality rules, and checklist.

Code Quality

During development — auto-fix as you edit:

bun run lint:fix       # auto-fix lint issues in .ts / .tsx (oxlint)
bun run format         # auto-format .ts / .tsx / .css / .json / .md (oxfmt)
bunx tsc --noEmit      # verify no type errors

Before every PR — run the full CI check locally to catch everything CI catches (end-of-file, trailing whitespace, all file types):

# One-time setup
npm install -g @j178/prek

# Replicate exact CI check (read-only — does not auto-fix)
prek run --from-ref origin/main --to-ref HEAD

Note: prek uses lint (check only) and format:check (check only) — it will fail if there are issues but won't fix them. If prek reports formatting or lint issues, run the auto-fix commands above first, then re-run prek to verify.

i18n validation: If your changes touch src/renderer/, locales/, or src/common/config/i18n, run:

bun run i18n:types
node scripts/check-i18n.js

Both commands must complete without errors before opening a PR. The oss-pr skill enforces this automatically.

Common Oxfmt rules (Prettier-compatible, avoid a fix pass):

  • Single-element arrays that fit on one line → inline: [{ id: 'a', value: 'b' }]
  • Trailing commas required in multi-line arrays/objects
  • Single quotes for strings

Git Conventions

Commit format: <type>(<scope>): <subject> in English. Types: feat, fix, refactor, chore, docs, test, style, perf. NEVER add AI signatures (Co-Authored-By, Generated with, etc.).

For pull request creation, see the oss-pr skill (.claude/skills/oss-pr/SKILL.md).

Skills Index

Detailed rules and guidelines are organized into Skills for better modularity:

SkillPurposeTriggers
architectureFile & directory structure conventions for all process typesCreating files, adding modules, architectural decisions
i18nInternationalization workflow and standardsAdding user-facing text, modifying locales/ or src/common/config/i18n
testingTesting workflow and quality standardsWriting tests, adding features, before claiming completion
oss-prFull commit + PR workflow: branch management, quality checks, issue linking, PRCreating pull requests, after committing, /oss-pr
bump-versionVersion bump workflow: update package.json, checks, branch, PR, tag releaseBumping version, /bump-version
pr-reviewLocal PR code review with full project context, no truncation limitsReviewing a PR, user says "review PR", /pr-review
pr-fixFix all issues from a pr-review report, create a follow-up PR, and verify each fixAfter pr-review, user says "fix all issues", /pr-fix
pr-automationPR automation orchestrator: poll PRs, review, fix, and merge via label state machineInvoked by daemon script (pr-automation.sh), /pr-automation

Skills are located in .claude/skills/ and contain project conventions that apply to all agents and contributors. Every agent working in this repository must read and follow the relevant skill files when the task matches their scope.

PR 自动化流程

本仓库运行 PR 自动化 agent,定期处理 open PR(review、fix、合并)。

  • 运行方式:scripts/pr-automation.sh 作为 daemon 持续运行,每轮间隔 30 秒;日志默认写入 ~/Library/Logs/AionUi/,可通过 LOG_DIR=... 覆盖
  • 状态追踪:通过 bot:* label(bot:reviewing、bot:fixing、bot:ready-to-fix、bot:ci-waiting、bot:needs-human-review、bot:ready-to-merge、bot:done)
  • 详细说明:docs/conventions/pr-automation.md

Internationalization

All user-facing text must use i18n keys — never hardcode strings. Languages and modules are defined in src/common/config/i18n-config.json.

See the i18n skill (.claude/skills/i18n/SKILL.md) for complete workflow, key naming, and validation steps.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.