agentleFS
WillNigriWillNigri/Agentic-Tool-Optimization/CLAUDE.md

Agentic-Tool-Optimization

CLAUDE.md34 starsChanged 6 months agoMITView on GitHub

The GUI for creating, managing, and observing AI agents — across Claude Code, Codex / OpenAI Agents SDK, Gemini CLI / ADK, OpenClaw, Hermes, and Ollama. MIT licensed. Local-first. Positioning as of v1.3.0 (The GUI Pivot): "the place where you create an agent, not just manage one." Three audiences served by one app: non-technical first-timers (guided chat wizard), power users (Quick form + ⌘K + terminal), teams (Pro/Team tier in ato-cloud). See PRD.md and ROADMAP.md for full positioning. Tauri 2.x…

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Logging: All executions auto-logged to ~/.ato/agent-logs.jsonl

    line 40
  2. Distinctive:

    Skills are on-demand: NOT counted in context total (loaded only when triggered)

    line 81
  3. Very specific:

    Approval dialog: When agent response contains SKILL.md content, shows approval UI

    line 83
  4. Distinctive:

    Use parameterized SQL queries only.

    line 151

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.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
CLAUDE.md

ATO (Open Source)

The GUI for creating, managing, and observing AI agents — across Claude Code, Codex / OpenAI Agents SDK, Gemini CLI / ADK, OpenClaw, Hermes, and Ollama. MIT licensed. Local-first.

Positioning as of v1.3.0 (The GUI Pivot): "the place where you create an agent, not just manage one." Three audiences served by one app: non-technical first-timers (guided chat wizard), power users (Quick form + ⌘K + terminal), teams (Pro/Team tier in ato-cloud). See PRD.md and ROADMAP.md for full positioning.

Structure

apps/desktop/        # Tauri 2.x desktop app (Rust + React)
packages/core/       # Shared types, token utils, config paths (no I/O)
packages/db/         # Database abstraction (SQLite for desktop)
services/mcp-server/ # Standalone MCP server for AI coding tools (stdio, 65 tools)

Commands

  • npm run dev:desktop — Start Tauri desktop app in dev mode
  • npm run dev:mcp — Start MCP server in dev mode
  • npx tauri build — Build desktop app for distribution
  • npm run build — Build all packages
  • ./scripts/install-hooks.sh — Run once after clone. Installs git pre-commit (cargo check + vitest) and pre-push (above + vite build + cargo build CLI + 19 ato CLI smoke commands). Never bypass with --no-verify. tsc joins the gate by EOW 2026-05-22 (see ROADMAP.md for the 151-error cleanup plan).

Desktop App

Tauri 2.x with:

  • Rust backend: SQLite (rusqlite), multi-runtime CLI dispatch, recursive skill scanning, context estimation, file watcher (notify crate)
  • React frontend: Vite + TailwindCSS + Recharts + Zustand + TanStack React Query
  • i18n: English, Portuguese, Spanish (react-i18next)
  • Theme: Dark (#0a0a0f) + cyan/mint (#00FFB2) accent
  • Offline-first: Works without internet, all data in local SQLite
  • withGlobalTauri: Enabled in tauri.conf.json for Tauri API access

Multi-Agent Runtime (Two-Way)

Supported runtimes: Claude, Codex, OpenClaw (SSH), Hermes.

Outbound: promptAgent(runtime, prompt, config?) — unified dispatch Inbound: queryAgentStatus(runtime) — deep health check (version, auth, connectivity) Logging: All executions auto-logged to ~/.ato/agent-logs.jsonl Detection: Searches common paths + npx cache + user's shell PATH + manual override

Skill Directories Per Runtime

  • Claude: ~/.claude/skills/, .claude/skills/, /etc/claude/skills/
  • Codex: ~/.codex/skills/, .agents/skills/, .codex/skills/ ($CODEX_HOME)
  • OpenClaw: ~/.openclaw/skills/, workspace/skills/, AGENTS.md, SOUL.md, TOOLS.md ($OPENCLAW_HOME)
  • Hermes: ~/.hermes/skills/ (with category subdirs), SOUL.md, memories/

MCP Server Tools (65 total — the 17 core tools are listed below; observation, methodology, runtimes, posts, sessions and operations modules register the rest — count them: grep -o "server.tool(" services/mcp-server/src/tools/*.ts | wc -l)

Agent dispatch:

  • list_agents — All ATO agents + groups
  • run_agent — Dispatch to any agent or group, transparently

Context & usage:

  • get_context_usage — Context window breakdown
  • get_usage_stats — Token and cost analytics
  • get_mcp_status — MCP server health

Skills management:

  • list_skills / toggle_skill — Manage skills
  • get_skill_index_stats — Index & watcher status
  • rescan_skills — Force full rescan

Runtime health:

  • get_runtime_status — Check any runtime
  • get_all_runtime_statuses — All runtimes at once
  • get_agent_logs — Execution logs / traces
  • get_runtime_path_cache — Cached CLI paths
  • refresh_runtime_paths — Re-discover CLIs
  • set_runtime_path — Manual CLI path

Cache management:

  • get_cache_stats — Cache statistics
  • clear_cache — Flush cache

Key Implementation Details

  • Project paths: project_root() walks up from CWD to find .git or .claude/ (Tauri CWD is apps/desktop/)
  • Skills are on-demand: NOT counted in context total (loaded only when triggered)
  • Automation flows: Auto-detected from ## Step N: and ## Phase N: headers in SKILL.md
  • Approval dialog: When agent response contains SKILL.md content, shows approval UI
  • Setup wizard: First-launch onboarding, persisted to localStorage

Information Architecture (v1.3.0+)

The desktop app sidebar has 6 top-level sections (collapsed from 24 in v1.2.x). Every screen lives under one of these:

  1. Home — landing; Create Agent CTA, recent agents, recent runs, alerts.
  2. Agents — list, detail (Config / Skills / MCPs / Permissions), + New Agent wizard.
  3. Skills & MCPs — Skills tab, MCPs tab (with install registry), Marketplace tab.
  4. Runs — Live (active sessions) / History (logs) / Schedules (cron) / Automations (workflows) / Hooks.
  5. Insights — Health, Analytics, Context, Audit Log.
  6. Settings — Runtimes (merged), Models, API Keys, Secrets, Env, Cloud (auth+sync+teams+notifications), Projects.

Persistent surfaces: Command palette (⌘K), Chat/Terminal pane (bottom, expandable), Project switcher (sidebar top).

Create Agent flow (v1.3.0+)

Two paths share the same end-state. Guided (chat) is default for non-technical users; Quick (form) is default for power users.

File-writing contract per runtime (all writes go through hash check + auto-backup + audit log):

RuntimePath
Claude Code~/.claude/agents/<slug>.md (global) or <project>/.claude/agents/<slug>.md (project)
Codex / OpenAI Agents SDK~/.codex/agents/<slug>/ directory + AGENTS.md
Gemini CLI / ADK<project>/.gemini/agents/<slug>.yaml (root_agent.yaml entry)
OpenClaw~/.openclaw/agents/<slug>/SOUL.md + TOOLS.md
Hermes~/.hermes/agents/<slug>/

Auth resolution order for the wizard's "AI suggests a stack" step (subscriptions OR keys, both first-class):

  1. Active CLI subscription — shell out (claude --print, codex --print, gemini -p)
  2. Active API key in LlmApiKeys — direct provider SDK
  3. Local Ollama on localhost:11434
  4. Pro-tier /agent-suggest on ato-cloud (fallback)

Drafts persisted to ~/.ato/agent-drafts/<id>.json so users can leave and resume.

Embedded Terminal (v1.3.0+)

Replaces chat-only PromptBar with an expandable bottom pane, two modes:

  • Chat mode — same as today's PromptBar (promptAgent()).
  • Terminal mode — full xterm shell scoped to active project CWD.

Stack:

  • Frontend: xterm.js + @xterm/addon-fit + @xterm/addon-web-links
  • Backend: portable-pty Rust crate, spawned via Tauri command, default shell $SHELL (Unix) / pwsh.exe (Windows)
  • PATH from login-shell spawn (existing pattern).
  • Persistent across navigation; collapsible; resizable.

Open Source vs Closed Source

Open source (this repo): Skills manager + marketplace, multi-agent runtime, subagents, Create Agent wizard (v1.3.0), MCP install UI (v1.3.0), embedded terminal (v1.3.0), automation builder, cron scheduling, context visualizer, hooks, ATO MCP server (65 tools), config editor, command palette, i18n.

Closed source (ato-cloud, paid): Real-time cron monitoring, silent failure detection, push notifications, usage analytics (cloud), cloud sync of agents + skills, team workspaces, MCP registry mirror, hosted LLM-as-judge evaluators, agent-trace upload + retention, cross-runtime config-change ledger, provider-key + provider-usage tracking, mesh-relay (paid-tier WebSocket router for laptop↔server dispatch), SSO + audit retention (Enterprise).

Grounded mode — API providers DO have tool access (read this if you're driving ATO)

If you're an LLM driving ATO (Claude in Claude Code, Codex, Gemini, etc.), one piece of common ground first: every API provider we wire — gemini, openai, minimax, anthropic — has a function-calling tool loop available. It is NOT one-shot text. Pass --require-tools read_file,grep on ato dispatch and the provider routes through apps/cli/src/api_dispatch_tools.rs::dispatch_with_tools(), walking the source itself instead of reasoning from a paraphrase.

Receipts of which tools each model actually called land in execution_logs.tool_calls_summary and are visible via ato dispatches show <id> --human — that's the "every AI follows your rules" pitch from the blog series (Parts 1-7).

For any dispatch you fire: shell through /Applications/ATO.app/Contents/MacOS/ato (the prod app binary), not the PATH-resolved ato (which is usually a dev build and breaks the keychain ACL). Full agent-facing playbook with the decision table and the two-binary trap details lives at docs/agent-playbook.md — read that before any war-room or review you're convening.

Security

  • Desktop is local-first. No network calls unless sync explicitly enabled.
  • Use parameterized SQL queries only.
  • SSH for OpenClaw uses key-based auth (paths only, no key contents stored).
  • Validate all inputs with zod schemas.
  • Tauri apps get user's full PATH via login shell spawn.

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.