agentleFS
AkaraChenAkaraChen/aghub/AGENTS.md

aghub

AGENTS.md271 starsChanged 3 months agoMITView on GitHub

Project: aghub — AI coding agent configuration management tool\ Stack: Rust workspace + Tauri v2 desktop + React/TypeScript\ Package Manager: cargo (Rust), bun (desktop frontend) aghub manages AGENTS.md, MCP configs, and skills for 25+ AI assistants through a unified CLI (aghub-cli) and desktop app. Stateless design—reads actual config files, tracks capability sources, enforces explicit opt-in for changes. Must touch ALL of these:

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No hand-wired adapters — behavior driven by descriptor function pointers

    line 63
  2. Distinctive:

    NEVER use spaces for Rust indentation (hard_tabs enforced)

    line 95
  3. Distinctive:

    NEVER exceed 80 character line width

    line 96
  4. Distinctive:

    NEVER ignore clippy warnings (CI/build treats as errors)

    line 97
  5. Distinctive:

    Must touch ALL of these:

    line 101

≈ “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

aghub KNOWLEDGE BASE

Project: aghub — AI coding agent configuration management tool
Stack: Rust workspace + Tauri v2 desktop + React/TypeScript
Package Manager: cargo (Rust), bun (desktop frontend)

OVERVIEW

aghub manages AGENTS.md, MCP configs, and skills for 25+ AI assistants through a unified CLI (aghub-cli) and desktop app. Stateless design—reads actual config files, tracks capability sources, enforces explicit opt-in for changes.

STRUCTURE

.
├── crates/
│   ├── agents/       # Agent descriptors, models, formats (24 agents)
│   ├── core/         # Orchestration: adapter dispatch, manager, registry, transfer
│   ├── cli/          # CLI binary: aghub-cli
│   ├── api/          # REST API: Rocket HTTP server
│   ├── skill/        # Skill packaging: .skill/.zip format + lock files
│   ├── skills-sh/    # skills.sh registry HTTP client
│   ├── git/          # Git clone with credential injection
│   └── desktop/      # Tauri v2 + React 19 + HeroUI v3
├── .agents/skills/   # Local skill definitions
├── justfile          # Build commands
└── AGENTS.md         # This file

WHERE TO LOOK

TaskLocationNotes
Add agent supportcrates/agents/src/agents/Create <name>.rs descriptor
Agent models/typescrates/agents/src/models.rsAgentConfig, AgentType
Agent registrycrates/core/src/registry/mod.rsALL_AGENTS array
Config managementcrates/core/src/manager/mod.rsConfigManager struct
Adapter traitcrates/core/src/adapters/mod.rsAgentAdapter trait
Batch install/copycrates/core/src/transfer.rsOperationBatchResult
CLI commandscrates/cli/src/commands/Clap-based subcommands
API routescrates/api/src/routes/Rocket route handlers
Desktop UIcrates/desktop/src/React + HeroUI v3

CONVENTIONS

Rust

  • Indentation: Hard tabs (width 4) — NOT spaces
  • Line width: 80 characters max
  • Formatter: rustfmt for Rust, prettier for JS/TS (via just fmt)
  • Linter: cargo clippy -- -D warnings (warnings = errors)

TypeScript/Frontend

  • Package manager: bun (never npm/yarn/pnpm)
  • Framework: React 19 + HeroUI v3
  • CSS: Tailwind CSS v4
  • Config: Strict TypeScript (strict: true)

Code Organization

  • One agent = one file in crates/agents/src/agents/<name>.rs
  • Each agent descriptor defines: config paths, file format, capabilities
  • No hand-wired adapters — behavior driven by descriptor function pointers

COMMANDS

# Build & Development
just build              # Release build
just dev                # Debug build
just start -- --help    # Run CLI with args

# Testing
just test               # All workspace tests
just integration-test   # Core integration tests only
just test-with-validation  # Requires claude/opencode CLIs

# Code Quality
just fmt                # Format with rustfmt (Rust) and prettier (JS/TS)
just lint               # Clippy (denies warnings)

# Desktop App
cd crates/desktop && bun run dev      # Vite dev
cd crates/desktop && bun run start    # Tauri dev
just desktop                           # Convenience alias

# Install
just install            # Copy aghub-cli to ~/.cargo/bin

ANTI-PATTERNS

Code Quality

  • NEVER use spaces for Rust indentation (hard_tabs enforced)
  • NEVER exceed 80 character line width
  • NEVER ignore clippy warnings (CI/build treats as errors)

Adding/Removing Agents

Must touch ALL of these:

  1. crates/agents/src/agents/<name>.rs — create/delete descriptor constant
  2. crates/agents/src/agents/mod.rs — add/remove pub mod
  3. crates/agents/src/agents/factory.rs — add/remove dispatch arm
  4. crates/agents/src/models.rs — add/remove enum variant + ALL array + as_str() + from_str()
  5. crates/core/src/registry/mod.rs — add/remove from ALL_AGENTS

Agent-Specific Gotchas

  • Claude: Skills discovered from ~/.claude/skills/ — NOT stored in JSON
  • OpenCode: Native mcp object key (not mcp_servers array); SSE/StreamableHttp unified as remote
  • Codex/Mistral: TOML config format (not JSON)
  • Copilot: Shares ~/.claude/skills/ path with Claude

NOTES

  • Registry fallback: Returns Claude's descriptor if agent ID not found
  • .git alone is NOT sufficient for project root — needs agent marker (.claude/, .opencode/, etc.)
  • skills-lock.json tracks skill dependencies with content hashes
  • Desktop HeroUI docs: Search ./.heroui-docs/react/ before implementing UI
  • .impeccable.md — project code style guide (read before writing Rust)
  • cliff.toml — changelog generation config (git-cliff, used in release workflow)</content>

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.