template-repo
Copilot instructions132 starsChanged 2 months agoUnlicenseView on GitHub
This is a container-first, self-hosted project template maintained by a single developer (@AndrewAltimit). It uses Model Context Protocol (MCP) tools with zero-cost infrastructure. This project uses five AI agents: As the PR reviewer, focus on security, containers, and project standards. The Gaea2 MCP server runs on a dedicated remote machine at 192.168.0.152:8007 due to special software requirements:
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
15 rules. About 0 are common, 14 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
All GitHub Actions run on self-hosted runners: - no cloud costs
- Distinctive: line 32
Designed for individual developer efficiency: - no team coordination needed
- Distinctive: line 47
Security concerns: - No hardcoded secrets, no root containers, proper permissions
- Distinctive: line 50
Python imports: - Ensure compatibility with containerized environment
- Distinctive: line 51
MCP tool changes: - Verify tools follow async patterns and error handling
- Distinctive: line 58
Complex team workflows: - Not applicable
- Very specific: line 69
Use automation-cli ci run for all CI operations
- Distinctive: line 77
All Python tools run in containers with user permissions (no root)
- Distinctive: line 93
Tests and workflows: must use this specific address - do NOT change to localhost
- Distinctive: line 159
When commenting on PRs, use our custom reaction images for a more engaging experience.
- Distinctive: line 161
Use the Reaction Search MCP Server to find contextually appropriate reactions:
- Distinctive: line 182
Use semantic search to find reactions that match your emotional context
- Distinctive: line 183
Use sparingly - one reaction per comment is usually enough
- Distinctive: line 184
Place at natural break points in your comment
- Distinctive: line 185
Don't use at the beginning of comments
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project Context for AI Code Review
Project Overview
This is a container-first, self-hosted project template maintained by a single developer (@AndrewAltimit). It uses Model Context Protocol (MCP) tools with zero-cost infrastructure.
AI Agent Ecosystem
This project uses five AI agents:
- Claude Code - Primary development (architecture, implementation, docs)
- Gemini CLI - Automated PR reviews (you are reviewing as Gemini)
- GitHub Copilot - Code review suggestions in pull requests
- Issue Monitor - Automated issue response and implementation
- PR Review Monitor - Automated PR review response and fixes
As the PR reviewer, focus on security, containers, and project standards.
Core Design Principles
1. Container-First Philosophy
- Everything runs in Docker containers except Gemini CLI (needs Docker access)
- No local dependencies required beyond Docker itself
- All Python CI/CD operations are containerized (ruff, pytest, bandit, etc.)
- The
automation-cliRust binary provides a unified interface to all CI stages
2. Self-Hosted Infrastructure
- All GitHub Actions run on self-hosted runners - no cloud costs
- Docker images are cached locally for fast builds
- Designed for individual developer efficiency - no team coordination needed
3. Architecture
- MCP Server (FastAPI) runs on port 8005 in Docker container
- Python CI Container includes all development tools (Python 3.11)
- Docker Compose orchestrates all services
- No aggressive cleanup - Python cache prevention via environment variables
- Multi-stage CI/CD - format, lint-basic, lint-full, security, test stages
Review Focus Areas
PRIORITIZE reviewing
- Container configurations - Dockerfile correctness, security, user permissions
- Security concerns - No hardcoded secrets, no root containers, proper permissions
- Docker Compose changes - Service configs, port conflicts, volume mounts
- Script correctness - Shell scripts should use proper error handling (set -e)
- Python imports - Ensure compatibility with containerized environment
- MCP tool changes - Verify tools follow async patterns and error handling
IGNORE or deprioritize
- Contributor guidelines - Single maintainer project
- Scalability concerns - Designed for one developer
- Cloud deployment - Intentionally self-hosted only
- Complex team workflows - Not applicable
- Minor style issues - Code is auto-formatted
- Documentation for external users - Internal project
Common Patterns to Check
- Shell scripts should export
USER_IDandGROUP_ID(not UID/GID) - Docker containers should run with user permissions
- Python code should handle async/await properly
- No
chmod 777or overly permissive operations - Helper scripts should be simple wrappers around docker-compose
- Use
automation-cli ci runfor all CI operations - Mock external dependencies in tests (subprocess, requests)
- Clear Gemini history before PR reviews
Technical Standards
- Python 3.11 in all containers
- Python code is auto-formatted with Black and isort
- All Python tools run in containers with user permissions (no root)
- Environment variables:
PYTHONDONTWRITEBYTECODE=1,USER_ID/GROUP_ID - Tests use pytest with mocking for external dependencies
- No
chmod 777or aggressive cleanup steps - Coverage reporting with pytest-cov
- Security scanning with bandit and safety
Remote Infrastructure Requirements
Gaea2 MCP Server
The Gaea2 MCP server runs on a dedicated remote machine at 192.168.0.152:8007 due to special software requirements:
- Gaea2 software requires specific GPU hardware and Windows environment
- Cannot be containerized due to proprietary software dependencies
- Hardcoded IP is intentional - this is a permanent infrastructure component
- Tests and workflows must use this specific address - do NOT change to localhost
- Health checks are implemented to gracefully handle when the server is unavailable
This is NOT a bug or oversight - it's a deliberate architectural decision based on the specialized requirements of the Gaea2 terrain generation software.
Project Structure
├── docker/ # Container definitions
├── tools/ # MCP server and tools
├── automation/ # Automation scripts (CI/CD, monitoring, etc.)
├── .github/workflows/ # Self-hosted runner workflows
└── tests/ # Pytest test suiteKey Patterns
- Use
automation-cli ci runfor all CI operations - Docker Compose for service orchestration
- Mock external services in tests
- Clear separation of containerized vs host tools
Critical Files (Review Extra Carefully)
- docker-compose.yml - Service definitions, ports, volumes
- docker/*.Dockerfile - Container definitions, security
- .github/workflows/*.yml - Must use self-hosted runners
- automation//*.sh** - Shell script correctness and permissions
- tools/mcp/mcp_server.py - Core MCP functionality
- tools/rust/automation-cli/ - Main CI/CD entry point (Rust CLI)
- .mcp.json - Tool configuration and rate limits
Code Review Examples
Good Patterns
# Correct user ID handling
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
# Using helper scripts
automation-cli ci run format
# Container with user permissions
docker compose run --rm --user "${USER_ID}:${GROUP_ID}" python-ci commandBad Patterns
# BAD: Wrong variable names
export UID=$(id -u) # UID is readonly in some shells
# BAD: Running as root
docker run --rm python-ci command # No user specified
# BAD: Overly permissive
chmod 777 output/ # Never use 777
# BAD: Direct tool invocation
black . # Should use containerized versionPR Comment Guidelines
Using Custom Reaction Images
When commenting on PRs, use our custom reaction images for a more engaging experience.
Use the Reaction Search MCP Server to find contextually appropriate reactions:
# Search for reactions matching your situation
result = mcp__reaction-search__search_reactions(
query="successful collaboration on fixes",
limit=3
)
# Result includes: id, url, markdown, description, similarity scoreFormat: 
Example usage:
Great work on simplifying the code! The refactoring makes it much cleaner.
Best practices:
- Use semantic search to find reactions that match your emotional context
- Use sparingly - one reaction per comment is usually enough
- Place at natural break points in your comment
- Don't use at the beginning of comments
- Adds personality while maintaining professionalism
AI Expression Guidelines
Each AI agent has developed its own approach to authentic expression:
- Claude's Expression Philosophy: See
docs/agents/claude-expression.mdfor how Claude approaches authentic reactions, including acknowledging difficulty and showing genuine relief when fixing bugs. - Gemini's Expression Philosophy: See
docs/agents/gemini-expression.mdfor Gemini's direct, analytical approach focusing on clarity and technical excellence. Gemini's reactions communicate specific states (thinking deeply, recurring issues, etc.)
These guidelines help maintain consistent personality across PR reviews while acknowledging the actual experience of software development - the confusion, the partial victories, and the genuine breakthroughs.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

