- Add DISCOVERY_LOG_LEVEL=debug - Add DISCOVERY_SHOW_PROGRESS=true - Temporary changes for debugging InitializerProcessor fixes on production
262 lines
8.5 KiB
JSON
262 lines
8.5 KiB
JSON
{
|
|
"project": {
|
|
"name": "Custom PHP Framework",
|
|
"description": "A modern PHP framework with readonly classes, composition patterns, and MCP integration",
|
|
"type": "php-framework",
|
|
"version": "1.0.0"
|
|
},
|
|
|
|
"agents": {
|
|
"auto_activation": true,
|
|
"priority_threshold": "medium",
|
|
"safety_mode": "interactive",
|
|
"require_confirmation": {
|
|
"file_changes": true,
|
|
"deployments": true,
|
|
"database_operations": true,
|
|
"system_commands": true,
|
|
"external_api_calls": false,
|
|
"read_operations": false
|
|
},
|
|
"protection_levels": {
|
|
"production_files": "strict",
|
|
"configuration_files": "strict",
|
|
"source_code": "moderate",
|
|
"documentation": "permissive",
|
|
"temporary_files": "permissive"
|
|
},
|
|
"available_agents": [
|
|
{
|
|
"name": "framework-architecture-expert",
|
|
"auto_trigger": true,
|
|
"keywords": ["readonly", "final", "composition", "inheritance", "value object"],
|
|
"priority": "high",
|
|
"description": "Framework-specific architecture patterns and principles"
|
|
},
|
|
{
|
|
"name": "mcp-integration-specialist",
|
|
"auto_trigger": true,
|
|
"keywords": ["MCP", "Model Context Protocol", "AI integration", "mcp:server"],
|
|
"priority": "high",
|
|
"description": "MCP server integration and framework AI capabilities"
|
|
},
|
|
{
|
|
"name": "php-code-reviewer",
|
|
"auto_trigger": true,
|
|
"keywords": ["review", "code quality", "PSR-12", "SOLID", "extends", "inheritance"],
|
|
"priority": "high",
|
|
"description": "PHP code review with framework pattern compliance"
|
|
},
|
|
{
|
|
"name": "php-performance-optimizer",
|
|
"auto_trigger": true,
|
|
"keywords": ["performance", "optimization", "cache", "N+1", "EntityManager"],
|
|
"priority": "high",
|
|
"description": "Performance optimization for framework components"
|
|
},
|
|
{
|
|
"name": "pest-test-generator",
|
|
"auto_trigger": true,
|
|
"keywords": ["test", "Pest", "coverage", "testing", "TDD"],
|
|
"priority": "high",
|
|
"description": "Comprehensive Pest test generation"
|
|
},
|
|
{
|
|
"name": "error-diagnostics-expert",
|
|
"auto_trigger": true,
|
|
"keywords": ["error", "exception", "debug", "FrameworkException"],
|
|
"priority": "high",
|
|
"description": "Framework-aware error analysis and debugging"
|
|
},
|
|
{
|
|
"name": "template-engine-specialist",
|
|
"auto_trigger": true,
|
|
"keywords": ["template", "HTML", "ViewResult", "{{", "}}"],
|
|
"priority": "medium",
|
|
"description": "HTML template system with curly brace placeholders"
|
|
},
|
|
{
|
|
"name": "css-architecture-specialist",
|
|
"auto_trigger": true,
|
|
"keywords": ["CSS", "ITCSS", "BEM", "OKLCH", "styling"],
|
|
"priority": "medium",
|
|
"description": "CSS architecture with ITCSS and OKLCH colors"
|
|
},
|
|
{
|
|
"name": "js-framework-specialist",
|
|
"auto_trigger": true,
|
|
"keywords": ["JavaScript", "module", "data-module", "Core/Module"],
|
|
"priority": "medium",
|
|
"description": "Framework JavaScript module system"
|
|
},
|
|
{
|
|
"name": "php-documentation-generator",
|
|
"auto_trigger": true,
|
|
"keywords": ["documentation", "PHPDoc", "README", "@param"],
|
|
"priority": "medium",
|
|
"description": "PHP documentation with framework awareness"
|
|
},
|
|
{
|
|
"name": "codebase-explorer",
|
|
"auto_trigger": true,
|
|
"keywords": ["architecture", "structure", "dependencies", "explore"],
|
|
"priority": "medium",
|
|
"description": "Framework architecture analysis and exploration"
|
|
},
|
|
{
|
|
"name": "devops-deployment-specialist",
|
|
"auto_trigger": true,
|
|
"keywords": ["deployment", "deploy", "production", "docker", "SSL", "nginx"],
|
|
"priority": "high",
|
|
"description": "Production deployment and infrastructure management"
|
|
},
|
|
{
|
|
"name": "git-workflow-specialist",
|
|
"auto_trigger": true,
|
|
"keywords": ["git", "commit", "branch", "merge", "pull request", "release"],
|
|
"priority": "high",
|
|
"description": "Git version control and release management"
|
|
}
|
|
]
|
|
},
|
|
|
|
"framework": {
|
|
"type": "custom-php-framework",
|
|
"principles": [
|
|
"no-inheritance",
|
|
"composition-over-inheritance",
|
|
"readonly-by-default",
|
|
"final-by-default",
|
|
"value-objects-over-primitives",
|
|
"attribute-driven-configuration",
|
|
"explicit-dependency-injection"
|
|
],
|
|
|
|
"architecture": {
|
|
"directories": {
|
|
"src/Application": "Application controllers and request handlers",
|
|
"src/Domain": "Domain models, value objects, and business logic",
|
|
"src/Framework": "Framework core components and systems",
|
|
"src/Infrastructure": "External service integrations",
|
|
"resources/views": "HTML template components",
|
|
"resources/css": "ITCSS-structured CSS with OKLCH colors",
|
|
"resources/js": "Core/Module JavaScript system",
|
|
"tests": "Pest tests mirroring src structure"
|
|
},
|
|
|
|
"patterns": {
|
|
"readonly_classes": "Immutable objects with readonly properties",
|
|
"value_objects": "Domain concepts as typed objects instead of primitives",
|
|
"composition": "Favor composition over class inheritance",
|
|
"attributes": "Convention over configuration with #[Route], #[Auth], #[McpTool]",
|
|
"entity_manager": "UnitOfWork pattern for database operations",
|
|
"event_system": "Event-driven architecture with domain events"
|
|
}
|
|
},
|
|
|
|
"mcp_integration": {
|
|
"enabled": true,
|
|
"server_command": "docker exec -i php php console.php mcp:server",
|
|
"tools": [
|
|
"analyze_routes",
|
|
"analyze_container_bindings",
|
|
"discover_attributes",
|
|
"framework_health_check",
|
|
"list_framework_modules"
|
|
]
|
|
}
|
|
},
|
|
|
|
"development": {
|
|
"docker": {
|
|
"enabled": true,
|
|
"commands": {
|
|
"up": "make up",
|
|
"down": "make down",
|
|
"console": "make console",
|
|
"logs": "make logs"
|
|
}
|
|
},
|
|
|
|
"testing": {
|
|
"framework": "pest",
|
|
"command": "./vendor/bin/pest",
|
|
"directory": "tests/",
|
|
"coverage_target": 80
|
|
},
|
|
|
|
"code_quality": {
|
|
"psr12": true,
|
|
"style_check": "composer cs",
|
|
"style_fix": "composer cs-fix",
|
|
"static_analysis": "make phpstan"
|
|
},
|
|
|
|
"local_server": {
|
|
"url": "https://localhost",
|
|
"https_required": true,
|
|
"user_agent_required": true
|
|
}
|
|
},
|
|
|
|
"patterns": {
|
|
"avoid": [
|
|
"extends keyword (use composition)",
|
|
"primitive obsession (use Value Objects)",
|
|
"global state and service locators",
|
|
"mutable classes (prefer readonly)"
|
|
],
|
|
|
|
"prefer": [
|
|
"readonly final classes",
|
|
"Value Objects for domain concepts",
|
|
"Constructor dependency injection",
|
|
"Attribute-based configuration",
|
|
"FrameworkException hierarchy",
|
|
"OKLCH color space in CSS"
|
|
]
|
|
},
|
|
|
|
"agent_safety": {
|
|
"confirmation_prompts": {
|
|
"before_file_edit": "🔒 CONFIRMATION REQUIRED: Agent will modify {file_path}. Do you want to proceed?",
|
|
"before_deployment": "🚨 DEPLOYMENT CONFIRMATION: Agent will deploy to production. This is irreversible. Confirm?",
|
|
"before_database_change": "💾 DATABASE CHANGE: Agent will modify database schema/data. Confirm?",
|
|
"before_system_command": "⚡ SYSTEM COMMAND: Agent will execute: {command}. Confirm?"
|
|
},
|
|
|
|
"restricted_operations": [
|
|
"delete production files",
|
|
"modify .env files without explicit permission",
|
|
"execute rm -rf commands",
|
|
"modify docker-compose.yml in production",
|
|
"change database connection strings",
|
|
"modify SSL certificates"
|
|
],
|
|
|
|
"auto_approved_operations": [
|
|
"read any file",
|
|
"analyze code structure",
|
|
"generate documentation",
|
|
"create test files",
|
|
"suggest improvements (without implementing)"
|
|
]
|
|
},
|
|
|
|
"workflows": {
|
|
"new_feature": [
|
|
"Create Value Objects for domain concepts",
|
|
"Implement readonly service classes with composition",
|
|
"Add attribute-based routing/configuration",
|
|
"Write Pest tests with high coverage",
|
|
"Review with php-code-reviewer agent"
|
|
],
|
|
|
|
"performance_optimization": [
|
|
"Profile with php-performance-optimizer agent",
|
|
"Optimize EntityManager bulk operations",
|
|
"Implement framework caching patterns",
|
|
"Validate improvements with benchmarks"
|
|
]
|
|
}
|
|
} |