diff --git a/AGENTS.md b/AGENTS.md index 1f1fc43..a4b211f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,6 +12,10 @@ A monorepo for a **Coding Agent** sample for Slack, built with Bolt for Python. Implementations share a structure and user experience, not code. Keep each one obvious on its own, written in its framework's idiom, rather than adding shared helpers. +## Slack plugin + +To install the Slack plugin for your coding agent, follow [Claude Code, Codex, Cursor, and Other Coding Agents](./README.md#claude-code-codex-cursor-and-other-coding-agents) in the README. + ## Commands Run these from inside an implementation directory, such as `openai-agents-sdk/`: @@ -29,6 +33,10 @@ ruff format --check . pytest ``` +## Code style + +No code comments. Make the code explain itself with clear names, tests, or types. Put the reason for a change in the PR description. + ## Repository structure ``` diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..43c994c --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md diff --git a/claude-agent-sdk/AGENTS.md b/claude-agent-sdk/AGENTS.md index e6ed59e..fcbb7ec 100644 --- a/claude-agent-sdk/AGENTS.md +++ b/claude-agent-sdk/AGENTS.md @@ -2,6 +2,10 @@ Guidance for coding agents working in this directory. Refer to the root `../AGENTS.md` for repository-wide structure and commands. +## Slack plugin + +To install the Slack plugin for your coding agent, follow [Claude Code, Codex, Cursor, and Other Coding Agents](./README.md#claude-code-codex-cursor-and-other-coding-agents) in the README. + ## Claude Agent SDK specifics **Agents (`agent/agent.py`)** are two sets of `ClaudeAgentOptions` with pinned models: a routing agent (`claude-haiku-4-5`) whose only tool is `create_code_channel`, and the coding agent (`claude-sonnet-5-5`) with every other tool. Tools are async `@tool` functions, one per file under `agent/tools/`, each with a JSON Schema for its arguments. They're served in-process by `create_sdk_mcp_server()`, so the model sees each as `mcp__coding-agent__`. Both agents set `tools=[]`, `setting_sources=[]`, and `strict_mcp_config=True`, so they get none of Claude Code's built-in tools and none of the settings, `CLAUDE.md` files, or MCP servers on the machine. `verbatim_prompts=True` keeps an `@path` in a Slack message from reading a local file. diff --git a/claude-agent-sdk/CLAUDE.md b/claude-agent-sdk/CLAUDE.md new file mode 100644 index 0000000..43c994c --- /dev/null +++ b/claude-agent-sdk/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md diff --git a/openai-agents-sdk/AGENTS.md b/openai-agents-sdk/AGENTS.md index 31fb346..806427a 100644 --- a/openai-agents-sdk/AGENTS.md +++ b/openai-agents-sdk/AGENTS.md @@ -2,6 +2,10 @@ Guidance for coding agents working in this directory. Refer to the root `../AGENTS.md` for repository-wide structure and commands. +## Slack plugin + +To install the Slack plugin for your coding agent, follow [Claude Code, Codex, Cursor, and Other Coding Agents](./README.md#claude-code-codex-cursor-and-other-coding-agents) in the README. + ## OpenAI Agents SDK specifics **Agents (`agent/agent.py`)** are two `Agent`s with pinned models: a routing `request_agent` (`gpt-6-luna`) whose only tool is `create_code_channel`, and the coding `agent` (`gpt-6.1-sol`) with every other tool. Tools are async `@function_tool` functions, one per file under `agent/tools/`, that read `RunContextWrapper[AgentDeps]` (or `RequestDeps`, both in `agent/sessions.py`) for the Slack client and session. Both agents set `ModelSettings(truncation="auto")`, so a long session drops its oldest conversation instead of outgrowing the context window. diff --git a/openai-agents-sdk/CLAUDE.md b/openai-agents-sdk/CLAUDE.md new file mode 100644 index 0000000..43c994c --- /dev/null +++ b/openai-agents-sdk/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md diff --git a/pydantic-ai/AGENTS.md b/pydantic-ai/AGENTS.md index b6460be..aae7061 100644 --- a/pydantic-ai/AGENTS.md +++ b/pydantic-ai/AGENTS.md @@ -2,6 +2,10 @@ Guidance for coding agents working in this directory. Refer to the root `../AGENTS.md` for repository-wide structure and commands. +## Slack plugin + +To install the Slack plugin for your coding agent, follow [Claude Code, Codex, Cursor, and Other Coding Agents](./README.md#claude-code-codex-cursor-and-other-coding-agents) in the README. + ## Pydantic AI specifics **Agents (`agent/agent.py`)** are two Pydantic AI `Agent`s: a routing `request_agent` whose only tool is `create_code_channel`, and the coding `agent` with every other tool. Neither sets a model. A `SelectModel` capability picks one when a run starts, by which API key is set: Anthropic (`claude-haiku-4-5` to route, `claude-sonnet-5-5` to code) when `ANTHROPIC_API_KEY` is set, else OpenAI (`gpt-6-luna` and `gpt-6.1-sol`). So no model client is created at import. Tools are async functions, one per file under `agent/tools/`, passed with `tools=[...]`. Each takes `RunContext[AgentDeps]` (or `RequestDeps`, both in `agent/sessions.py`) for the Slack client and session, and Pydantic AI reads its docstring for the description the model sees. The coding agent lists `AnthropicCompaction` and `OpenAICompaction`, so a long session compacts its oldest conversation instead of outgrowing the context window. Each only applies to its own provider's models. diff --git a/pydantic-ai/CLAUDE.md b/pydantic-ai/CLAUDE.md new file mode 100644 index 0000000..43c994c --- /dev/null +++ b/pydantic-ai/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md