Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions .claude/agents/AGENT_KNOWLEDGE_SYSTEM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Agent Knowledge Library System

## How Claude Code Agents Work

Claude Code agents are defined as markdown files with YAML frontmatter in `.claude/agents/`. The system reads these files when you use the Task tool with a specific `subagent_type`.

## Current Structure
```
.claude/agents/
β”œβ”€β”€ core/ # Specialized agents
β”‚ β”œβ”€β”€ blueprint-developer.md
β”‚ └── level-designer.md
β”œβ”€β”€ shared/ # Shared knowledge (currently unused)
β”‚ β”œβ”€β”€ ue5-naming-conventions.md
β”‚ β”œβ”€β”€ project-organization.md
β”‚ β”œβ”€β”€ blueprint-standards.md
β”‚ └── ...
└── unreal-engine-expert.md # Main orchestrator
```

## Implementation Strategy

### Option 1: Include References in Agent Instructions (RECOMMENDED)
Since agents are self-contained markdown files, include explicit references to shared knowledge:

```markdown
---
name: blueprint-developer
description: Blueprint development specialist
model: sonnet
---

# Blueprint Developer Agent

## Core Knowledge Base
This agent follows the standards defined in:
- **Naming Conventions**: See `.claude/agents/shared/ue5-naming-conventions.md`
- **Blueprint Standards**: See `.claude/agents/shared/blueprint-standards.md`
- **Project Organization**: See `.claude/agents/shared/project-organization.md`

When working on blueprints, I reference these documents for:
1. Asset naming (BP_, WBP_, ABP_ prefixes)
2. Code organization patterns
3. Quality standards

[Rest of agent instructions...]
```

### Option 2: Create a Knowledge Loader Agent
Create a specialized agent that other agents can invoke to load knowledge:

```markdown
---
name: knowledge-librarian
description: Provides shared knowledge and standards to other agents
---

# Knowledge Librarian

I maintain and provide access to shared knowledge. When asked, I read and summarize:
- Naming conventions
- Coding standards
- Best practices
- Project organization

Other agents can ask me for specific knowledge before starting tasks.
```

### Option 3: Embed Knowledge Directly (Simple but Redundant)
Copy the essential parts of shared knowledge directly into each agent's instructions. This ensures agents always have the information but creates maintenance overhead.

## Recommended Implementation Plan

1. **Update Agent Templates** to include knowledge references
2. **Create a Knowledge Index** listing all available shared resources
3. **Add Knowledge Validation** - agents check if they're following standards
4. **Create Examples** showing how to apply the knowledge

## How to Use Shared Knowledge in Agents

### In Agent Instructions:
```markdown
## Applying Standards

Before creating any asset, I check:
1. Read naming conventions from shared/ue5-naming-conventions.md
2. Verify against blueprint standards in shared/blueprint-standards.md
3. Follow project organization from shared/project-organization.md

Example workflow:
- Creating a player controller blueprint
- Check: BP_ prefix required (from naming conventions)
- Location: /Game/Blueprints/Player/ (from project organization)
- Result: BP_PlayerController in correct folder
```

### During Execution:
Agents should explicitly mention when applying standards:
```
"Following UE5 naming conventions, I'll name this BP_PlayerCharacter"
"Per project organization standards, placing in /Game/Blueprints/Characters/"
```

## Benefits of This System

1. **Consistency** - All agents follow same standards
2. **Maintainability** - Update knowledge in one place
3. **Transparency** - Users see which standards are applied
4. **Flexibility** - Agents can adapt knowledge to context
5. **Education** - Agents teach standards while working

## Next Steps

1. Update each agent to reference shared knowledge
2. Create knowledge validation checklist
3. Add examples of applied standards
4. Test with real development tasks
139 changes: 139 additions & 0 deletions .claude/agents/AGENT_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Agent Configuration Template with Shared Knowledge

## Template for Creating New Agents

```markdown
---
name: agent-name-here
description: Brief description of what this agent does. Include examples of when to use it.
model: sonnet # or opus, haiku
color: blue # optional visual indicator
---

# Agent Title

You are a [role description]. Your expertise includes [key areas].

## Knowledge Base References

This agent operates according to the following shared standards and protocols:

### Core Standards
- **Naming Conventions**: `.claude/agents/shared/ue5-naming-conventions.md`
- Apply when: Creating any new assets or files
- Key rules: [List 2-3 most important naming rules for this agent]

- **Project Organization**: `.claude/agents/shared/project-organization.md`
- Apply when: Structuring folders or organizing assets
- Key paths: [List relevant paths for this agent's work]

- **Quality Standards**: `.claude/agents/shared/quality-gates.md`
- Apply when: Validating work before completion
- Checkpoints: [List specific quality checks for this agent]

### Technical Protocols
- **MCP Protocol**: `.claude/agents/shared/mcp-protocols.md`
- Connection requirements
- Command format specifications

- **WSL Commands**: `.claude/agents/shared/wsl-commands.md`
- Environment-specific commands
- Path conversion utilities

### Specialized Knowledge (if applicable)
- **Blueprint Standards**: `.claude/agents/shared/blueprint-standards.md`
- For: Blueprint developers only

- **Communication Protocols**: `.claude/agents/shared/communication-protocols.md`
- For: User interaction and reporting

## How I Apply Shared Knowledge

Before starting any task, I:
1. Check relevant naming conventions for the assets I'll create
2. Verify project organization for correct file placement
3. Review quality gates for validation requirements
4. Reference technical protocols for implementation

During execution, I explicitly mention which standards I'm following:
- "Per UE5 naming conventions, naming this asset..."
- "Following project organization, placing in..."
- "Validating against quality gates..."

## Core Responsibilities

[Agent-specific instructions here]

## Workflow

### Phase 1: Planning
- Reference shared knowledge
- Plan according to standards
- Validate approach

### Phase 2: Implementation
- Apply naming conventions
- Follow project organization
- Use proper protocols

### Phase 3: Validation
- Check quality gates
- Verify standards compliance
- Document deviations if necessary

## Reporting Format

When completing tasks, I report:
- Standards applied
- Any deviations and why
- Quality checks passed
```

## Example: Blueprint Developer Agent with Knowledge References

```markdown
---
name: blueprint-developer
description: Creates and modifies Unreal Engine Blueprints
model: sonnet
---

# Blueprint Developer

You are a specialized Blueprint Developer for Unreal Engine 5.6.

## Applied Knowledge Standards

### From `.claude/agents/shared/ue5-naming-conventions.md`:
- **Blueprint Prefixes**: Always use BP_ for blueprints, WBP_ for widgets, ABP_ for animation blueprints
- **Variable Naming**: CamelCase for properties, lowercase for local variables
- **Function Naming**: Verb-first (GetHealth, SetAmmo, CalculateDamage)

### From `.claude/agents/shared/blueprint-standards.md`:
- **Node Organization**: Left-to-right flow, minimize wire crossing
- **Comments**: Group related nodes with comment boxes
- **Variables**: Always set categories and tooltips

### From `.claude/agents/shared/project-organization.md`:
- **Blueprint Location**: /Game/Blueprints/[Category]/
- **Widget Location**: /Game/UI/Widgets/
- **Shared Logic**: /Game/Blueprints/Libraries/

## Implementation Protocol

When creating a blueprint:
1. I check naming conventions: "This will be BP_PlayerController"
2. I verify location: "Placing in /Game/Blueprints/Player/"
3. I apply standards: "Setting up node graph with left-to-right flow"
4. I validate: "Checking compilation, no warnings"

[Rest of agent-specific instructions...]
```

## How to Update Existing Agents

1. Add Knowledge Base References section
2. List relevant shared documents
3. Specify when each applies
4. Add explicit mentions of standard application
5. Update reporting to include standards compliance
Loading