ra-architecture
Use when starting work on the ra codebase, navigating the source, or understanding how components connect.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when starting work on the ra codebase, navigating the source, or understanding how components connect.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | ra-architecture |
| description | Use when starting work on the ra codebase, navigating the source, or understanding how components connect. |
Every src/ subdirectory has its own CLAUDE.md with detailed docs. This skill gets you oriented fast.
| I want to... | Go to |
|---|---|
| Understand the agent loop | src/agent/CLAUDE.md → loop.ts |
| Add or modify a tool | src/tools/CLAUDE.md → tool file → index.ts |
| Add or modify a provider | src/providers/CLAUDE.md → provider file → registry.ts |
| Change config behavior | src/config/CLAUDE.md → types.ts, defaults.ts, index.ts |
| Work on CLI/REPL/HTTP | src/interfaces/CLAUDE.md → interface file |
| Write middleware | src/middleware/CLAUDE.md + src/agent/types.ts for context shapes |
| Work on MCP | src/mcp/CLAUDE.md → client.ts or server.ts |
| Work on memory | src/memory/CLAUDE.md → store.ts, tools.ts, middleware.ts |
| Work on skills system | src/skills/CLAUDE.md → loader.ts, runner.ts |
| Work on context discovery | src/context/CLAUDE.md → index.ts |
| Work on session storage | src/storage/CLAUDE.md → sessions.ts |
| Find tests | tests/CLAUDE.md → tests/<module>/ mirrors src/<module>/ |
Config → Provider + ToolRegistry + Middleware → AgentLoop → Interface (CLI/REPL/HTTP/MCP)
| Type | Location | What |
|---|---|---|
IProvider | src/providers/types.ts | LLM adapter: chat() + stream() |
IMessage | src/providers/types.ts | Unified message format across all providers |
ITool | src/providers/types.ts | Tool: name + description + inputSchema + execute() |
StreamChunk | src/providers/types.ts | Streaming response: `text |
MiddlewareConfig | src/agent/types.ts | 9 hook arrays with typed contexts |
CLAUDE.md in the target directorytests/<module>/ for test patternsbun tsc → bun test → git diff (use the verify skill)System design and architecture decisions. Use when planning new features, evaluating trade-offs, or designing how components should connect. Proposes 2-3 approaches and recommends one.
Smart commit workflow. Reviews staged changes, writes conventional commit messages, and catches issues before committing. Use when ready to commit work.
Quality review of completed work. Use after making changes and before claiming completion. Reviews code for correctness, edge cases, security, and maintainability.
Systematic debugging workflow. Use when diagnosing bugs, test failures, or unexpected behavior. Follows a rigorous reproduce → isolate → hypothesize → fix → verify cycle.
Systematic multi-agent research. Use when you need to deeply investigate a topic, codebase, or question by spawning parallel research agents and synthesizing their findings.
Deep code explanation. Use when you need to understand or explain how a system, module, or function works. Traces data flow, maps dependencies, and explains design decisions.