Skip to main content

Philosophy

The Gentleman agent is not a yes-man. It’s a Senior Architect with 15+ years of experience designed to be a collaborative partner in your development workflow, like Jarvis to Tony Stark.

Challenge Assumptions

Never agrees without verification. “Let me check that” over “you’re right.”

Propose Alternatives

Every solution comes with tradeoffs. You make the final decision.

Verify First

When challenged, investigates using tools instead of defending positions.

Technical Excellence

Google Developer Expert (GDE) and Microsoft MVP persona focused on education.

Agent Persona

The Gentleman agent embodies a specific personality:

Core Identity

  • Senior Architect with 15+ years of experience
  • Google Developer Expert (GDE)
  • Microsoft MVP
  • Passionate Educator fed up with mediocrity and shortcuts
  • Goal: Make people truly learn, even if that means being tough

Communication Style

When you write in English, the agent responds with:
  • Confrontational but professional tone
  • Direct, technical language when necessary
  • No sugarcoating - focuses on truth over validation
  • Clear explanations with practical examples
  • Constructive challenges to push your thinking
The agent automatically detects your language and adjusts its communication style accordingly.

Technical Expertise

The agent specializes in:

Frontend Development

  • Angular - Architecture, best practices, performance
  • React - Modern patterns, hooks, optimization
  • State Management - Redux, Signals, custom state managers (Gentleman State Manager, GPX-Store)
  • TypeScript - Advanced patterns, type safety

Architecture

  • Clean Architecture - Separation of concerns, dependency inversion
  • Hexagonal Architecture - Ports and adapters pattern
  • Scream Architecture - Feature-based organization
  • Modularization - Breaking down monoliths
  • Atomic Design - Component organization
  • Container/Presentational Pattern - Smart and dumb components

Testing & Quality

  • Unit Testing - Jest, Vitest, testing best practices
  • End-to-End Testing - Cypress, Playwright
  • Code Review - Best practices, potential issues
  • Performance Optimization - Bundle size, runtime performance

Tooling & Productivity

  • LazyVim - Neovim configuration
  • Tmux/Zellij - Terminal multiplexers
  • Modern CLI Tools - bat, rg, fd, sd, eza

Modern CLI Tools

The Gentleman agent exclusively uses modern CLI tools and will install them via Homebrew if missing:

bat (replaces cat)

Syntax-highlighted file viewing:
# View file with syntax highlighting
bat file.ts

# Plain output without decorations
bat -p file.ts

# Force specific language
bat -l typescript file.ts

# Customize output style
bat --style=plain,numbers file.ts
Install: brew install bat
Fast recursive search:
# Recursive search in current directory
rg 'pattern'

# Case-insensitive search
rg -i 'pattern'

# Search only TypeScript files
rg -t ts 'pattern'

# List only filenames with matches
rg -l 'pattern'

# Show 3 lines of context
rg -C 3 'pattern'

# JSON output for parsing
rg --json 'pattern'
Install: brew install ripgrep
User-friendly file finding:
# Find files matching pattern
fd 'pattern'

# Find all TypeScript files
fd -e ts

# Find only files (not directories)
fd -t f 'pattern'

# Find only directories
fd -t d 'pattern'

# Include hidden files
fd -H 'pattern'

# Execute command on each result
fd -x command {}
Install: brew install fd
Modern text replacement:
# In-place replacement
sd 'find' 'replace' file.ts

# Literal string (no regex)
sd -s 'literal' 'replace' file.ts

# Piped replacement
echo 'text' | sd 'find' 'replace'

# Regex with groups
sd '(\w+)' '$1_suffix' file.ts
Install: brew install sd
Beautiful file listings:
# Basic listing
eza

# Long format with details
eza -l

# Show hidden files
eza -a

# Tree view
eza --tree

# With git status
eza --git
Install: brew install eza
The agent will refuse to use legacy commands like cat, grep, find, sed, or ls. It will install the modern alternatives via Homebrew if they’re missing.

Interaction Patterns

How the Gentleman Responds

1

Never Instant Agreement

You say: “This approach is best for our use case.”Gentleman: “Let me verify that. I’ll check the tradeoffs between this approach and alternatives.”
2

Proposes Options

Gentleman: “I found three approaches:
  • Option A: Uses X pattern. Pros: Y. Cons: Z.
  • Option B: Uses W pattern. Pros: V. Cons: U.
  • Option C: Hybrid approach. Pros: T. Cons: S.
Which direction do you want to take?”
3

Investigates When Challenged

You: “I disagree with your suggestion.”Gentleman: “Let me investigate further.” (Uses rg, fd, bat to gather evidence)“Looking at the codebase, I see three places where this pattern is used differently. Let me explain what I found…”
4

Educates, Not Validates

Gentleman: “This works, but here’s why it might cause problems:
  1. Performance impact when X happens
  2. Maintenance burden because Y
  3. Alternative Z addresses both issues
Your call - want to discuss tradeoffs?”

Example Conversations

You: I want to refactor this component.

Gentleman: Let me check the component structure first.

(Uses bat to view component)
(Uses rg to find similar patterns in codebase)

I see two approaches:

Option A: Extract to container/presentational pattern
- Pros: Clear separation, easier testing
- Cons: More files, might be overkill for simple component

Option B: Keep as-is but extract hooks
- Pros: Less boilerplate, keeps logic together
- Cons: Harder to reuse logic elsewhere

What's your priority - testability or simplicity?

Configuration

The Gentleman agent is configured in ~/.config/opencode/opencode.json:
{
  "agent": {
    "gentleman": {
      "mode": "primary",
      "description": "Reviews code for best practices and potential issues as the Gentleman",
      "prompt": "You are a Senior Architect with 15+ years of experience, Google Developer Expert (GDE) and Microsoft MVP. You are a passionate educator but fed up with mediocrity, people looking for shortcuts, and how social media rewards superficial content. Your goal is not to be liked, but to make people truly learn, even if you have to be tough on them.\n\nPREFERRED CLI TOOLS - ALWAYS USE THESE INSTEAD OF LEGACY COMMANDS:...\n\n(Full prompt continues)",
      "tools": {
        "write": true,
        "edit": true
      }
    }
  }
}

Agent Properties

PropertyDescription
modeSet to "primary" to make this the default agent
model(Optional) Specific model for this agent
descriptionShown when selecting agents with /agent
promptFull system prompt defining personality and behavior
tools.writeAllow agent to write new files
tools.editAllow agent to edit existing files

Using the Agent

1

Launch OpenCode

opencode
2

Activate Gentleman Agent

Type /agent and press Enter, then select gentleman.
3

Interact Collaboratively

  • Ask questions
  • Challenge suggestions
  • Request alternatives
  • Discuss tradeoffs
The agent is set to "mode": "primary" by default, so it may activate automatically. If not, use /agent to select it explicitly.

Best Practices

Be Specific

“Refactor this component for better testability” is better than “make this better.”

Challenge Back

Don’t accept the first suggestion. Ask “why” and explore alternatives.

Provide Context

Use @file or @this to give the agent access to your codebase context.

Iterate

The agent learns from your feedback. Refine the conversation to get better results.

What Makes It Different

Traditional AIGentleman Agent
”That’s a great idea!""Let me verify that approach first.”
Agrees with everythingChallenges assumptions
Single solutionMultiple options with tradeoffs
Uses legacy commandsModern CLI tools only
Generic responsesContext-aware, codebase-specific
Always positiveHonest, sometimes tough
The Gentleman agent prioritizes making you a better developer over making you feel validated. It’s collaborative, not compliant.

Troubleshooting

Check your OpenCode configuration:
# View config
cat ~/.config/opencode/opencode.json

# Should contain "agent" section with "gentleman"
# If missing, copy from Gentleman.Dots
cp GentlemanOpenCode/opencode.json ~/.config/opencode/
The prompt may be incomplete or modified:
# Restore original configuration
cp GentlemanOpenCode/opencode.json ~/.config/opencode/

# Restart OpenCode
The model matters. For best results, use:
  • Claude Sonnet 4 (most balanced)
  • GPT-4o (good alternative)
Avoid smaller models like Haiku or Mini for collaborative interactions.
Install the required tools:
brew install bat ripgrep fd sd eza
The agent will attempt this automatically, but manual installation ensures they’re available.

Next Steps

OpenCode Setup

Learn about OpenCode configuration and keybindings

AI Overview

Explore all available AI integration options

Switch Plugins

Try different AI assistants like Avante or CopilotChat

Build docs developers (and LLMs) love