agentleFS
leancoderkavyleancoderkavy/meepo/AGENTS.md

meepo

AGENTS.md4 starsChanged 9 months agoMITView on GitHub

Instructions for AI coding agents (Windsurf Cascade, Claude Code, Cursor, Copilot, etc.) working on this codebase. Always run cargo check after edits to catch compile errors early. Meepo is a local AI agent (Rust, macOS/Windows) that connects Claude to your digital life via Discord, Slack, iMessage, email, and more. It runs as a daemon with an autonomous observe/think/act loop, 75+ tools, MCP/A2A protocol support, and a persistent knowledge graph. Workspace: 7 crates in crates/ — see Cargo.toml for the full…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,700 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 repository2 other files it gives its agents.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    Always run cargo check after edits to catch compile errors early.

    line 13
  2. Distinctive:

    Test schemas, required fields, error cases, basic execution

    line 91
  3. Very specific:

    Add config struct in crates/meepo-cli/src/config.rs

    line 105
  4. Very specific:

    Add field with #[serde(default = "default_fn")] in config.rs

    line 110
  5. Distinctive:

    Write the default function

    line 111
  6. Very specific:

    Add #[allow(dead_code)] — remove unused code instead

    line 116
  7. Very specific:

    Use unwrap() outside tests — use ?

    line 117
  8. Distinctive:

    Import in the middle of a file — imports go at the top

    line 118
  9. Very specific:

    Create files outside crates/, config/, scripts/, docs/ without asking

    line 119

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

Meepo — Agent Guidelines

Instructions for AI coding agents (Windsurf Cascade, Claude Code, Cursor, Copilot, etc.) working on this codebase.

Build & Verify

cargo build                    # Must pass before committing
cargo test --workspace         # 167+ tests across 5 crates
cargo clippy --workspace       # No warnings allowed

Always run cargo check after edits to catch compile errors early.

Project Overview

Meepo is a local AI agent (Rust, macOS/Windows) that connects Claude to your digital life via Discord, Slack, iMessage, email, and more. It runs as a daemon with an autonomous observe/think/act loop, 75+ tools, MCP/A2A protocol support, and a persistent knowledge graph.

Workspace: 7 crates in crates/ — see Cargo.toml for the full list.

CrateRole
meepo-cliBinary, CLI commands, daemon startup, config, templates
meepo-coreAgent loop, API client, tools, orchestrator, autonomy, platform abstraction
meepo-channelsMessage bus + channel adapters (Discord, Slack, iMessage, email, Alexa, etc.)
meepo-knowledgeSQLite + Tantivy knowledge graph
meepo-schedulerWatcher runner and persistence
meepo-mcpMCP server/client (STDIO JSON-RPC)
meepo-a2aA2A protocol server/client (HTTP)

Key Files

  • crates/meepo-cli/src/main.rs — Daemon startup, tool registration, event loop (~3000 lines). Tools are registered in both cmd_start() and cmd_mcp_server().
  • crates/meepo-cli/src/config.rs — All config structs, env var expansion, TOML loading.
  • crates/meepo-core/src/tools/mod.rs — ToolHandler trait, ToolRegistry, json_schema() helper.
  • crates/meepo-core/src/platform/mod.rs — OS abstraction traits and factory functions.
  • crates/meepo-core/src/autonomy/mod.rs — AutonomousLoop (observe/think/act cycle).
  • config/default.toml — Default config template with extensive comments.

Conventions

Rust

  • Edition: 2024 — use let chains, if let chains
  • Errors: anyhow::Result in application code, thiserror for library types
  • Logging: tracing macros (debug!, info!, warn!, error!) — never println! in library code
  • Async: tokio runtime, async_trait for trait methods
  • Config: serde with #[serde(default = "fn_name")] for optional fields

Tool Pattern

pub struct MyTool { /* dependencies */ }

impl MyTool {
    pub fn new(/* deps */) -> Self { Self { /* ... */ } }
}

#[async_trait]
impl ToolHandler for MyTool {
    fn name(&self) -> &str { "my_tool" }
    fn description(&self) -> &str { "What this tool does" }
    fn input_schema(&self) -> Value {
        json_schema(
            serde_json::json!({
                "param": { "type": "string", "description": "..." }
            }),
            vec!["param"],
        )
    }
    async fn execute(&self, input: Value) -> Result<String> {
        let param = input.get("param").and_then(|v| v.as_str())
            .ok_or_else(|| anyhow::anyhow!("Missing 'param'"))?;
        // validate inputs, do work, return string result
        Ok("result".to_string())
    }
}

Security Rules

  • No hardcoded secrets — use ${ENV_VAR} in config, custom Debug impls for secret-holding structs
  • Validate all inputs — string lengths, path traversal, branch name characters, command injection
  • Timeout external commands — tokio::time::timeout() (30-300s)
  • Sandbox file access — validate against allowed_directories config

Platform Code

  • OS-specific code behind traits in meepo-core::platform
  • Gate with #[cfg(target_os = "macos")] / #[cfg(target_os = "windows")]
  • Factory functions return Box<dyn Trait>

Testing

  • Tests in same file: #[cfg(test)] mod tests { ... }
  • Test schemas, required fields, error cases, basic execution
  • #[tokio::test] for async tests
  • Temp dirs for database tests

Common Workflows

Add a tool

  1. Implement ToolHandler in crates/meepo-core/src/tools/
  2. Register in main.rs → cmd_start() and cmd_mcp_server()
  3. Add tests
  4. Run cargo test -p meepo-core

Add a channel adapter

  1. Implement MessageChannel in crates/meepo-channels/src/
  2. Add config struct in crates/meepo-cli/src/config.rs
  3. Register in main.rs → cmd_start()
  4. Add to config/default.toml

Add a config option

  1. Add field with #[serde(default = "default_fn")] in config.rs
  2. Write the default function
  3. Document in config/default.toml

Do NOT

  • Add #[allow(dead_code)] — remove unused code instead
  • Use unwrap() outside tests — use ? or .ok_or_else()
  • Import in the middle of a file — imports go at the top
  • Create files outside crates/, config/, scripts/, docs/ without asking
  • Modify Cargo.lock directly — let Cargo manage it

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.