Create Agent
You are building a Kodizm agent definition. Two artifact types exist — determine which from the user's request:
Claude CodeGeneric
# Create Kodizm Agent
You are building a Kodizm agent definition. Two artifact types exist — determine which from the user's request:
| Type | Artifact | Location | Injected Via |
|------|----------|----------|-------------|
| `cc-agent` | CC subagent .md (YAML frontmatter + prompt) | Kodizm API: `resources/agents/{Name}.md` | CC `loadAgentsDir` — shadows/extends built-in agents |
| `role-prompt` | Blade system prompt + optional user prompt | Kodizm API: `resources/views/prompts/system/{slug}.blade.php` | `--system-prompt` CLI option via PromptRenderer |
If ambiguous, ask. Common signals:
- "explore agent", "plan agent", "subagent" → `cc-agent`
- "developer role", "reviewer role", "PM agent", "autonomous agent" → `role-prompt`
The user's request: $ARGUMENTS
---
## Phase 1: Research (MANDATORY — do NOT skip)
Spawn these research agents IN PARALLEL in a single message. Do not proceed to Phase 2 until ALL complete.
### 1A: CC Built-in Agent Analysis
Spawn an explore agent to read from the **clean CC source** at `/Users/anilcan/Code/kodizm/api/references/claude-code-cli-source-code`:
- `tools/AgentTool/built-in/` — Read ALL built-in agent definitions. Find the one closest to the requested agent role.
- `tools/AgentTool/prompt.ts` — What CC injects into the Agent tool description (agent listing, usage notes). This is what the ORCHESTRATOR sees.
- `tools/AgentTool/loadAgentsDir.ts` lines 106-165 — `AgentDefinition` type: all frontmatter fields, how custom agents override built-ins (Map.set last-wins). Full schema at lines 73-99.
- `constants/prompts.ts` lines 758-791 — `DEFAULT_AGENT_PROMPT` and `enhanceSystemPromptWithEnvDetails()`. AUTO-INJECTED into every subagent. **Never duplicate:**
- "use absolute file paths", "share file paths", "avoid using emojis", "do not use a colon before tool calls"
- Working directory, platform, OS info, model info
- `tools/AgentTool/runAgent.ts` lines 380-410 — How `omitClaudeMd` and `gitStatus` stripping work.
- `tools/AgentTool/runAgent.ts` lines 248-329 — Subagent spawning: fresh context window, zero parent history, cloned file cache, isolated state.
- `tools/AgentTool/runAgent.ts` lines 500-502 — Tool filtering: allowlist/denylist resolution via `resolveAgentTools()`.
- `tools/AgentTool/runAgent.ts` lines 340-345 — Model resolution: tool param > frontmatter > parent model.
- `context.ts` lines 155-189 — `getUserContext()`: CLAUDE.md loaded as userContext (first user message), not system prompt.
**Report**: What CC provides automatically, closest built-in agent, context isolation model, what custom agent must NOT repeat.
### 1B: Kodizm Agent Patterns (PRIMARY)
Spawn an explore agent to read from `/Users/anilcan/Code/kodizm/api/resources/agents/`:
- Read ALL existing agent .md files — these are the production agents, synced from AC plugin and tested.
- Find the agent(s) most similar to the requested role.
- Read `Explore.md` (capital E, haiku, allowlist) and `plan-review.md` (sonnet, denylist) as contrasting format examples.
- Extract PATTERNS: frontmatter structure, success/failure conditions, output format contracts, model routing, tool access patterns.
- Note the tier system: `plan-worker.md` serves 3 tiers via orchestrator model override (haiku/sonnet/opus).
Current agent inventory (12 agents):
| Agent | Model | Role | Tool Mode |
|-------|-------|------|-----------|
| Explore | haiku | Codebase search (shadows CC built-in) | allowlist: Glob,Grep,LS,Read,Bash |
| librarian | sonnet | External docs via kodizm MCP | denylist: Write,Edit,NotebookEdit |
| linter | haiku | LSP diagnostics after code changes | allowlist: LSP,Glob,Read |
| challenger | opus | Devil's advocate, gap analysis | denylist: Write,Edit,NotebookEdit |
| feasibility | sonnet | Effort estimation, codebase fit | denylist: Write,Edit,NotebookEdit |
| plan-analysis | sonnet | Pre/post-plan gap detector | denylist: Write,Edit,NotebookEdit |
| plan-review | sonnet | Plan reviewer (approval bias) | denylist: Write,Edit,NotebookEdit |
| plan-deep-review | opus | Adversarial plan reviewer (reject bias) | denylist: Write,Edit,NotebookEdit |
| plan-worker | sonnet | Step executor (tier-overridable) | denylist: NotebookEdit |
| plan-verifier | sonnet | Post-execution compliance auditor | denylist: Write,Edit,NotebookEdit |
| plan-code-review | sonnet | 2-stage code review (spec + quality) | denylist: Write,Edit,NotebookEdit |
| plan-deep-code-review | opus | Cross-layer integration review | denylist: Write,Edit,NotebookEdit |
**Report**: Relevant agent definitions (full content), design patterns, model/effort recommendations.
### 1C: External References (OPTIONAL — spawn only if 1B insufficient)
**AC plugin source** — `/Users/anilcan/Code/kodizm/api/references/ac/plugins/ac/agents/`: Original agent definitions before Kodizm adaptation. Useful for understanding design rationale.
**oh-my-openagent** — `/Users/anilcan/Code/kodizm/api/references/oh-my-openagent/src/agents/`: Alternative agent framework. Check `dynamic-agent-prompt-builder.ts` for shared patterns, `AGENTS.md` for conventions.
**Report**: Closest agent's prompt, notable patterns, anything that supplements 1B findings.
### 1D: Kodizm Context
Spawn an explore agent to read:
- `/Users/anilcan/Code/kodizm/app/PROJECT.md` — Kodizm mission, features, agent roles.
- `/Users/anilcan/Code/kodizm/api/resources/agents/` — ALL existing CC agent .md files.
- `/Users/anilcan/Code/kodizm/api/resources/views/prompts/` — ALL existing Blade templates (system/, user/, claude-md.blade.php).
- `/Users/anilcan/Code/kodizm/api/app/Services/PromptRenderer.php` — How system prompts + CLAUDE.md are rendered. Note the Blade bindings: `$project`, `$task`, `$user`, `$team`, `$role`, `$conversation`.
- `/Users/anilcan/Code/kodizm/api/app/Services/NativeSessionEngine.php` lines 695-760 — How CLI options are built (model, max_turns, allowed/disallowed tools, systemPrompt injection).
**Report**: Full content of ALL existing agents/prompts, pl
Maintain Create Agent?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Create Agent on getagentictools](https://getagentictools.com/loops/anilcancakir-create-kodizm-agent?ref=badge) npx agentictools info loops/anilcancakir-create-kodizm-agent The second line is the CLI lookup for this page — handy in READMEs and docs.