agentleFS
gihwan-devgihwan-dev/claude-code-gui/AGENTS.md

claude-code-gui

AGENTS.md1 starsChanged 9 months agoMITView on GitHub

This repository is a template with sensible defaults for building Tauri React apps. CRITICAL: Follow these strictly: CRITICAL: Use Tauri v2 docs only. Always use modern Rust formatting: format!("{variable}") Decision: Is data needed across components? → Does it persist between sessions? Adding commands: See docs/developer/tauri-commands.md

The file

Show its rules and text

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

20 rules. About 0 are common, 11 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

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

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

    Check docs/developer/README.md for the full documentation index

    line 12
  2. Distinctive:

    Check git status and project structure

    line 13
  3. Distinctive:

    CRITICAL: Follow these strictly:

    line 17
  4. Distinctive:

    Read Before Editing: Always read files first to understand context

    line 20
  5. Very specific:

    Follow Established Patterns: Use patterns from this file and docs/developer

    line 21
  6. Distinctive:

    Senior Architect Mindset: Consider performance, maintainability, testability

    line 22
  7. Distinctive:

    Batch Operations: Use multiple tool calls in single responses

    line 23
  8. Distinctive:

    Match Code Style: Follow existing formatting and patterns

    line 24
  9. Distinctive:

    Test Coverage: Write comprehensive tests for business logic

    line 25
  10. Very specific:

    Quality Gates: Run pnpm check:all after significant changes

    line 26
  11. Distinctive:

    No Dev Server: Ask user to run and report back

    line 27
  12. Distinctive:

    No Unsolicited Commits: Only when explicitly requested

    line 28
  13. Very specific:

    Documentation: Update relevant docs/developer/ files for new patterns

    line 29
  14. Very specific:

    Removing files: Always use rm -f

    line 30
  15. Very specific:

    CRITICAL: Use Tauri v2 docs only. Always use modern Rust formatting: format!("{variable}")

    line 32
  16. Very specific:

    React → Rust: Use typed commands from @/lib/tauri-bindings (tauri-specta)

    line 69
  17. Distinctive:

    Commands: All actions flow through centralized command system

    line 70
  18. Very specific:

    Translations: All strings in /locales/*.json

    line 106
  19. Very specific:

    RTL Support: Use CSS logical properties (text-start not text-left)

    line 107
  20. Distinctive:

    Context7 First: Always use Context7 for framework docs before WebSearch

    line 112

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

AI Agent Instructions

Overview

This repository is a template with sensible defaults for building Tauri React apps.

Core Rules

New Sessions

  • Review docs/developer/architecture-guide.md for high-level patterns
  • Check docs/developer/README.md for the full documentation index
  • Check git status and project structure

Development Practices

CRITICAL: Follow these strictly:

  1. Use pnpm only: This project uses pnpm (locked at 10.29.1). Always use pnpm install, pnpm run, etc.
  2. Read Before Editing: Always read files first to understand context
  3. Follow Established Patterns: Use patterns from this file and docs/developer
  4. Senior Architect Mindset: Consider performance, maintainability, testability
  5. Batch Operations: Use multiple tool calls in single responses
  6. Match Code Style: Follow existing formatting and patterns
  7. Test Coverage: Write comprehensive tests for business logic
  8. Quality Gates: Run pnpm check:all after significant changes
  9. No Dev Server: Ask user to run and report back
  10. No Unsolicited Commits: Only when explicitly requested
  11. Documentation: Update relevant docs/developer/ files for new patterns
  12. Removing files: Always use rm -f

CRITICAL: Use Tauri v2 docs only. Always use modern Rust formatting: format!("{variable}")

Architecture Patterns (CRITICAL)

State Management Onion

useState (component) → Zustand (global UI) → TanStack Query (persistent data)

Decision: Is data needed across components? → Does it persist between sessions?

Performance Pattern (CRITICAL)

// ✅ GOOD: Selector syntax - only re-renders when specific value changes
const leftSidebarVisible = useUIStore(state => state.leftSidebarVisible)

// ❌ BAD: Destructuring causes render cascades (caught by ast-grep)
const { leftSidebarVisible } = useUIStore()

// ✅ GOOD: Use getState() in callbacks for current state
const handleAction = () => {
  const { data, setData } = useStore.getState()
  setData(newData)
}

Static Analysis

  • React Compiler: Handles memoization automatically - no manual useMemo/useCallback needed
  • ast-grep: Enforces architecture patterns (e.g., no Zustand destructuring). See docs/developer/static-analysis.md
  • Knip/jscpd: Periodic cleanup tools. Use /cleanup command (Claude Code)

Event-Driven Bridge

  • Rust → React: app.emit("event-name", data) → listen("event-name", handler)
  • React → Rust: Use typed commands from @/lib/tauri-bindings (tauri-specta)
  • Commands: All actions flow through centralized command system

Tauri Command Pattern (tauri-specta)

// ✅ GOOD: Type-safe commands with Result handling
import { commands } from '@/lib/tauri-bindings'

const result = await commands.loadPreferences()
if (result.status === 'ok') {
  console.log(result.data.theme)
}

// ❌ BAD: String-based invoke (no type safety)
const prefs = await invoke('load_preferences')

Adding commands: See docs/developer/tauri-commands.md

Internationalization (i18n)

// ✅ GOOD: Use useTranslation hook in React components
import { useTranslation } from 'react-i18next'

function MyComponent() {
  const { t } = useTranslation()
  return <h1>{t('myFeature.title')}</h1>
}

// ✅ GOOD: Non-React contexts - bind for many calls, or use directly
import i18n from '@/i18n/config'
const t = i18n.t.bind(i18n)  // Bind once for many translations
i18n.t('key')                 // Or call directly for occasional use
  • Translations: All strings in /locales/*.json
  • RTL Support: Use CSS logical properties (text-start not text-left)
  • Adding strings: See docs/developer/i18n-patterns.md

Documentation & Versions

  • Context7 First: Always use Context7 for framework docs before WebSearch
  • Version Requirements: Tauri v2.x, shadcn/ui v4.x, Tailwind v4.x, React 19.x, Zustand v5.x, Vite v7.x, Vitest v4.x

Developer Documentation

For complete patterns and detailed guidance, see docs/developer/README.md.

Key documents:

  • architecture-guide.md - Mental models, security, anti-patterns
  • state-management.md - State onion, getState() pattern details
  • tauri-commands.md - Adding new Rust commands
  • static-analysis.md - All linting tools and quality gates

Claude Code Commands & Agents

These are specific to Claude Code but documented here for context.

Commands

  • /check - Check work against architecture, run pnpm check:all, suggest commit message
  • /cleanup - Run static analysis (knip, jscpd, check:all), get structured recommendations
  • /init - One-time template initialization

Agents

Task-focused agents that leverage separate context for focused work:

  • plan-checker - Validate implementation plans against documented architecture
  • docs-reviewer - Review developer docs for accuracy and codebase consistency
  • userguide-reviewer - Review user guide against actual system features
  • cleanup-analyzer - Analyze static analysis output (used by /cleanup)

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.