AGENTS.md
src/AGENTS.mdAGENTS.md
Quality
77/100
Scores the file, not the repository.Length
695 words
18 headings · 4 code blocksRepository
38k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1<!-- Parent: ../AGENTS.md -->2<!-- Generated: 2026-01-28 | Updated: 2026-03-02 -->34# src56TypeScript source code for oh-my-claudecode - the core library that powers multi-agent orchestration.78## Purpose910This directory contains all TypeScript source code organized into modules:1112- **agents/** - 32 specialized AI agent definitions with tiered variants13- **tools/** - 15 LSP/AST/REPL tools for IDE-like capabilities14- **hooks/** - 31 event-driven behaviors for execution modes15- **features/** - Core features (model routing, state management, verification)16- **config/** - Configuration loading and validation17- **commands/** - Command expansion utilities18- **mcp/** - MCP server integration1920## Key Files2122| File | Description |23|------|-------------|24| `index.ts` | Main entry point - exports `createOmcSession()` |25| `shared/types.ts` | Shared TypeScript types used across modules |2627## Subdirectories2829| Directory | Purpose |30|-----------|---------|31| `agents/` | 32 agent definitions with prompts and tools (see `agents/AGENTS.md`) |32| `tools/` | 15 LSP, AST, and Python REPL tools (see `tools/AGENTS.md`) |33| `hooks/` | 31 hooks for execution modes (see `hooks/AGENTS.md`) |34| `features/` | Core features like model routing, state (see `features/AGENTS.md`) |35| `config/` | Configuration loading (`loader.ts`) |36| `commands/` | Command expansion utilities |37| `mcp/` | MCP server configuration and team runtime convergence helpers |38| `cli/` | CLI entry points and command surfaces |39| `hud/` | Heads-up display components |40| `installer/` | Installation system |41| `__tests__/` | Test files |4243## For AI Agents4445### Working In This Directory46471. **Module Organization**: Each major feature has its own directory with:48 - `index.ts` - Main exports49 - `types.ts` - TypeScript interfaces50 - Supporting files as needed51522. **Entry Point Pattern**:53```typescript54 // Main export in index.ts55 export { createOmcSession } from './session';56 export { lspTools, astTools, allCustomTools } from './tools';57 export { getAgentDefinitions, omcSystemPrompt } from './agents/definitions';58```59603. **Tool Registration**: Custom tools are registered in `tools/index.ts`:6162```typescript63 export const allCustomTools = [64 ...lspTools, // 12 LSP tools65 ...astTools, // 2 AST tools66 pythonReplTool // 1 REPL tool (15 total)67 ];68```69704. **Agent Registration**: Agents defined in `agents/definitions.ts`:71```typescript72 export function getAgentDefinitions(): Record<string, AgentConfig> {73 return {74 architect: architectAgent,75 executor: executorAgent,76 // ... all 32 agents77 };78 }79```8081### Testing Requirements8283- Test files are in `__tests__/` with pattern `*.test.ts`84- Run `npm test -- --grep "module-name"` for specific modules85- Verify type safety with `npm run build` after changes86- Use `lsp_diagnostics_directory` tool for project-wide type checking8788### Common Patterns8990#### Creating a New Agent91921. Add agent file in `agents/` (e.g., `new-agent.ts`)932. Export from `agents/index.ts`943. Add to `getAgentDefinitions()` in `agents/definitions.ts`954. Create prompt template in `/agents/new-agent.md`965. Update `docs/REFERENCE.md` (Agents section) with new agent9798#### Adding a New Hook991001. Create directory in `hooks/` (e.g., `new-hook/`)1012. Add `index.ts`, `types.ts`, `constants.ts`1023. Export from `hooks/index.ts`1034. Update `docs/REFERENCE.md` (Hooks System section) with new hook104105#### Adding a New Tool1061071. Create tool definition with Zod schema1082. Add to appropriate tools file (`lsp-tools.ts`, `ast-tools.ts`)1093. Export from `tools/index.ts`1104. Update `docs/REFERENCE.md` if user-facing tool111112#### Adding a New Feature1131141. Create feature directory in `features/`1152. Export from `features/index.ts`1163. Update `docs/FEATURES.md` with API documentation117118#### TypeScript Conventions119120- Use strict mode (`noImplicitAny`, `strictNullChecks`)121- Prefer interfaces over type aliases for public APIs122- Use barrel exports (`index.ts`) for each module123- File size: 200-400 lines typical, 800 max124- Use Zod for runtime input validation (see `templates/rules/coding-style.md`)125126## Dependencies127128### Internal129- Uses types from `shared/types.ts`130- Imports agent prompts from `/agents/*.md`131- Loads skills from `/skills/*.md`132133### External134135Key packages by module: `zod` (tools, features), `@ast-grep/napi` (tools/ast), `vscode-languageserver-protocol` (tools/lsp), `better-sqlite3` (hooks/swarm), `chalk` (cli, hud). See root AGENTS.md for full dependency list.136137### MCP Runtime Notes138139- Team MCP runtime status/wait behavior is implemented in `mcp/team-server.ts`.140- Shared team-job convergence helpers (artifact-first status convergence, scoped team-state cleanup) live in `mcp/team-job-convergence.ts`.141142## Module Dependency Graph143144```145index.ts146├── agents/definitions.ts → agents/*.ts → /agents/*.md (prompts)147├── tools/index.ts148│ ├── lsp-tools.ts → lsp/*.ts149│ ├── ast-tools.ts150│ └── python-repl/151├── hooks/index.ts → hooks/*/*.ts152├── features/index.ts153│ ├── model-routing/154│ ├── boulder-state/155│ ├── verification/156│ └── ...157├── config/loader.ts158└── mcp/servers.ts159```160161<!-- MANUAL: -->162
Also in Yeachan-Heo/oh-my-claudecode
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| Yeachan-Heo/oh-my-claudecode.github/CLAUDE.md · 38k | CLAUDE.md | setupbuildstylegit+2 | 79/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodeAGENTS.md · 38k | AGENTS.md | setuplint-formatstyletypes+4 | 45/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodeskills/AGENTS.md · 38k | AGENTS.md | teststylearchdependencies+1 | 66/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodesrc/agents/AGENTS.md · 38k | AGENTS.md | teststylearchdependencies+1 | 66/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodesrc/features/AGENTS.md · 38k | AGENTS.md | teststylearchdependencies | 74/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodesrc/hooks/AGENTS.md · 38k | AGENTS.md | setupteststylearch+2 | 74/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodesrc/tools/AGENTS.md · 38k | AGENTS.md | setupteststylearch+1 | 86/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodesrc/tools/diagnostics/AGENTS.md · 38k | AGENTS.md | teststylearchtypes+2 | 77/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodesrc/tools/lsp/AGENTS.md · 38k | AGENTS.md | setupteststylearch+2 | 74/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodeCLAUDE.md · 38k | CLAUDE.md | setupbuildstylegit+1 | 65/100 | 3 days ago |
Diff against .github/CLAUDE.md Diff against AGENTS.md Diff against skills/AGENTS.md Diff against src/agents/AGENTS.md Diff against src/features/AGENTS.md Diff against src/hooks/AGENTS.md Diff against src/tools/AGENTS.md Diff against src/tools/diagnostics/AGENTS.md Diff against src/tools/lsp/AGENTS.md Diff against CLAUDE.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 3 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 2 days ago |
