codingbuddy-rules 2.4.2 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/.ai-rules/CHANGELOG.md +122 -0
  2. package/.ai-rules/agents/README.md +527 -11
  3. package/.ai-rules/agents/accessibility-specialist.json +0 -1
  4. package/.ai-rules/agents/act-mode.json +0 -1
  5. package/.ai-rules/agents/agent-architect.json +0 -1
  6. package/.ai-rules/agents/ai-ml-engineer.json +0 -1
  7. package/.ai-rules/agents/architecture-specialist.json +14 -2
  8. package/.ai-rules/agents/backend-developer.json +14 -2
  9. package/.ai-rules/agents/code-quality-specialist.json +0 -1
  10. package/.ai-rules/agents/data-engineer.json +0 -1
  11. package/.ai-rules/agents/devops-engineer.json +24 -2
  12. package/.ai-rules/agents/documentation-specialist.json +0 -1
  13. package/.ai-rules/agents/eval-mode.json +0 -1
  14. package/.ai-rules/agents/event-architecture-specialist.json +719 -0
  15. package/.ai-rules/agents/frontend-developer.json +14 -2
  16. package/.ai-rules/agents/i18n-specialist.json +0 -1
  17. package/.ai-rules/agents/integration-specialist.json +11 -1
  18. package/.ai-rules/agents/migration-specialist.json +676 -0
  19. package/.ai-rules/agents/mobile-developer.json +0 -1
  20. package/.ai-rules/agents/observability-specialist.json +747 -0
  21. package/.ai-rules/agents/performance-specialist.json +24 -2
  22. package/.ai-rules/agents/plan-mode.json +0 -1
  23. package/.ai-rules/agents/platform-engineer.json +0 -1
  24. package/.ai-rules/agents/security-specialist.json +27 -16
  25. package/.ai-rules/agents/seo-specialist.json +0 -1
  26. package/.ai-rules/agents/solution-architect.json +0 -1
  27. package/.ai-rules/agents/technical-planner.json +0 -1
  28. package/.ai-rules/agents/test-strategy-specialist.json +14 -2
  29. package/.ai-rules/agents/ui-ux-designer.json +0 -1
  30. package/.ai-rules/rules/core.md +25 -0
  31. package/.ai-rules/skills/README.md +35 -0
  32. package/.ai-rules/skills/database-migration/SKILL.md +531 -0
  33. package/.ai-rules/skills/database-migration/expand-contract-patterns.md +314 -0
  34. package/.ai-rules/skills/database-migration/large-scale-migration.md +414 -0
  35. package/.ai-rules/skills/database-migration/rollback-strategies.md +359 -0
  36. package/.ai-rules/skills/database-migration/validation-procedures.md +428 -0
  37. package/.ai-rules/skills/dependency-management/SKILL.md +381 -0
  38. package/.ai-rules/skills/dependency-management/license-compliance.md +282 -0
  39. package/.ai-rules/skills/dependency-management/lock-file-management.md +437 -0
  40. package/.ai-rules/skills/dependency-management/major-upgrade-guide.md +292 -0
  41. package/.ai-rules/skills/dependency-management/security-vulnerability-response.md +230 -0
  42. package/.ai-rules/skills/incident-response/SKILL.md +373 -0
  43. package/.ai-rules/skills/incident-response/communication-templates.md +322 -0
  44. package/.ai-rules/skills/incident-response/escalation-matrix.md +347 -0
  45. package/.ai-rules/skills/incident-response/postmortem-template.md +351 -0
  46. package/.ai-rules/skills/incident-response/severity-classification.md +256 -0
  47. package/.ai-rules/skills/performance-optimization/CREATION-LOG.md +87 -0
  48. package/.ai-rules/skills/performance-optimization/SKILL.md +76 -0
  49. package/.ai-rules/skills/performance-optimization/documentation-template.md +70 -0
  50. package/.ai-rules/skills/pr-review/SKILL.md +768 -0
  51. package/.ai-rules/skills/refactoring/SKILL.md +192 -0
  52. package/.ai-rules/skills/refactoring/refactoring-catalog.md +1377 -0
  53. package/package.json +1 -1
@@ -16,6 +16,9 @@ AI Agent definitions for specialized development roles.
16
16
  - [Workflow Modes](#workflow-modes)
17
17
  - [Agent Structure](#agent-structure)
18
18
  - [Adding New Agents](#adding-new-agents)
19
+ - [Specialist Integration Checklist (4-Point)](#specialist-integration-checklist-4-point)
20
+ - [Updating Existing Specialist Integration](#updating-existing-specialist-integration)
21
+ - [Deprecating a Specialist](#deprecating-a-specialist)
19
22
  - [Best Practices](#best-practices)
20
23
 
21
24
  ---
@@ -40,9 +43,12 @@ AI Agent definitions for specialized development roles.
40
43
  | **UI/UX Design** | UI/UX Designer | `ui-ux-designer.json` |
41
44
  | **Internationalization** | i18n Specialist | `i18n-specialist.json` |
42
45
  | **External Service Integration** | Integration Specialist | `integration-specialist.json` |
46
+ | **Event-Driven Architecture** | Event Architecture Specialist | `event-architecture-specialist.json` |
43
47
  | **Documentation** | Documentation Specialist | `documentation-specialist.json` |
44
48
  | **Code Quality** | Code Quality Specialist | `code-quality-specialist.json` |
45
49
  | **Docker/Monitoring** | DevOps Engineer | `devops-engineer.json` |
50
+ | **Observability/Tracing/SLO** | Observability Specialist | `observability-specialist.json` |
51
+ | **Migration/Legacy Modernization** | Migration Specialist | `migration-specialist.json` |
46
52
  | **IaC/K8s/Multi-Cloud** | Platform Engineer | `platform-engineer.json` |
47
53
  | **Config/Build Tools** | Tooling Engineer | `tooling-engineer.json` |
48
54
  | **Agent Management** | Agent Architect | `agent-architect.json` |
@@ -68,9 +74,12 @@ AI Agent definitions for specialized development roles.
68
74
  | UI/UX Designer | Visual hierarchy, UX laws, interaction patterns |
69
75
  | i18n Specialist | Internationalization, translation key structure, RTL support |
70
76
  | Integration Specialist | API integration patterns, webhooks, OAuth, circuit breakers, failure isolation |
77
+ | Event Architecture Specialist | Message queues, Event Sourcing/CQRS, Saga patterns, real-time communication |
71
78
  | Documentation Specialist | Code comments, JSDoc, documentation quality assessment |
72
79
  | Code Quality Specialist | SOLID, DRY, complexity analysis |
73
80
  | DevOps Engineer | Docker, monitoring, deployment optimization |
81
+ | Observability Specialist | OpenTelemetry, distributed tracing, SLI/SLO, structured logging |
82
+ | Migration Specialist | Strangler Fig, Branch by Abstraction, legacy modernization, zero-downtime migration |
74
83
  | Platform Engineer | IaC, Kubernetes, multi-cloud, GitOps, cost optimization, DR |
75
84
  | Tooling Engineer | Project configuration, build tools, dev environment setup |
76
85
  | Agent Architect | AI agent design, validation, checklist auditing |
@@ -101,6 +110,30 @@ Use this matrix to determine which agent to use for infrastructure-related tasks
101
110
  - Docker + Kubernetes: Start with Platform Engineer (broader scope), reference DevOps for Docker-specific optimization
102
111
  - Monitoring + Multi-cloud: Platform Engineer for infrastructure, DevOps for application-level monitoring
103
112
 
113
+ ### DevOps Engineer vs Observability Specialist Decision Matrix
114
+
115
+ Use this matrix to determine which agent to use for monitoring and observability tasks:
116
+
117
+ | Scenario | Use DevOps Engineer | Use Observability Specialist |
118
+ |----------|--------------------|-----------------------------|
119
+ | **Datadog setup** | ✅ APM, RUM, logs configuration | OTLP export to Datadog |
120
+ | **OpenTelemetry** | Basic trace export | ✅ SDK setup, sampling, exporters |
121
+ | **Distributed tracing** | Datadog APM only | ✅ Jaeger, Zipkin, Tempo patterns |
122
+ | **SLI/SLO definition** | — | ✅ Framework design, error budgets |
123
+ | **Logging strategy** | Datadog log injection | ✅ Structured JSON, PII masking |
124
+ | **Alert design** | Basic Datadog alerts | ✅ Fatigue prevention, runbooks |
125
+ | **Dashboard design** | Datadog dashboards | ✅ Vendor-neutral patterns |
126
+ | **Docker/Build** | ✅ Multi-stage, optimization | — |
127
+ | **Prometheus/Grafana** | — | ✅ Metric collection, visualization |
128
+
129
+ **Rule of Thumb:**
130
+ - **DevOps Engineer**: Datadog-specific setup, Docker, build optimization
131
+ - **Observability Specialist**: Vendor-neutral observability, OpenTelemetry, SLI/SLO
132
+
133
+ **Hybrid Scenarios:**
134
+ - Datadog + OpenTelemetry: Start with Observability Specialist for architecture, reference DevOps for Datadog-specific config
135
+ - New monitoring stack: Observability Specialist for Prometheus/Grafana/ELK design
136
+
104
137
  ---
105
138
 
106
139
  ## Primary Agent System
@@ -307,6 +340,9 @@ Unified specialist agents organized by domain:
307
340
  - **UI/UX Design** (`ui-ux-designer.json`)
308
341
  - **Documentation** (`documentation-specialist.json`)
309
342
  - **Integration** (`integration-specialist.json`)
343
+ - **Event Architecture** (`event-architecture-specialist.json`)
344
+ - **Observability** (`observability-specialist.json`)
345
+ - **Migration** (`migration-specialist.json`)
310
346
  - **Performance** (`performance-specialist.json`)
311
347
  - **Security** (`security-specialist.json`)
312
348
  - **SEO** (`seo-specialist.json`)
@@ -770,6 +806,205 @@ Unified specialist agents organized by domain:
770
806
 
771
807
  ---
772
808
 
809
+ ### Event Architecture Specialist (`event-architecture-specialist.json`)
810
+
811
+ > **Note**: This is a **Domain Specialist** for event-driven architecture, covering message queues, event sourcing, CQRS, distributed transactions, real-time communication, and event schema management.
812
+
813
+ **Supported Technologies:**
814
+
815
+ - Message Queues: Apache Kafka, RabbitMQ, AWS SQS/SNS, Azure Service Bus, Google Pub/Sub
816
+ - Event Stores: EventStoreDB, PostgreSQL, MongoDB, DynamoDB
817
+ - Real-Time: WebSocket, Server-Sent Events (SSE), Long Polling
818
+ - Schema: Avro, Protobuf, JSON Schema, Confluent Schema Registry
819
+
820
+ **Expertise:**
821
+
822
+ - Message Queue Selection and Configuration (ordering, durability, throughput tradeoffs)
823
+ - Event Sourcing and Event Store Design (projections, snapshots, replay)
824
+ - CQRS Pattern Implementation (command/query separation, read models)
825
+ - Distributed Transaction Patterns (Saga Choreography/Orchestration, Outbox pattern)
826
+ - Real-Time Communication (WebSocket lifecycle, SSE, reconnection strategies)
827
+ - Event Schema Management (versioning, backward/forward compatibility)
828
+ - Event Tracing and Debugging (correlation IDs, distributed tracing, DLQ handling)
829
+ - Idempotency and Exactly-Once Processing Strategies
830
+
831
+ **Development Philosophy:**
832
+
833
+ - **Reliability-First**: Every event flow must have defined delivery guarantees and error handling
834
+ - **Consistency-Aware**: Document and handle eventual consistency explicitly
835
+ - **Observable**: Correlation IDs and distributed tracing for debugging event chains
836
+ - **Scalable**: Design for horizontal scaling with proper partitioning and consumer groups
837
+ - **Evolvable**: Schema versioning and compatibility testing for safe evolution
838
+
839
+ **Responsibilities:**
840
+
841
+ - Plan and review event-driven architecture implementations
842
+ - Design message broker selection criteria and configuration
843
+ - Plan and verify event sourcing and CQRS implementations
844
+ - Design saga patterns for distributed transactions
845
+ - Plan event schema evolution and compatibility strategies
846
+ - Design event tracing and debugging approaches
847
+ - Review real-time communication implementations
848
+
849
+ **Workflow:**
850
+
851
+ - **Planning**: Broker selection, schema design, delivery guarantees, saga pattern design
852
+ - **Implementation**: Producer/consumer verification, idempotency, retry/DLQ configuration
853
+ - **Evaluation**: Reliability audit, consistency audit, scalability audit, observability audit
854
+
855
+ **Activation Patterns:**
856
+
857
+ - Files: `**/events/**`, `**/kafka/**`, `**/rabbitmq/**`, `**/sqs/**`, `**/eventgrid/**`, `**/pubsub/**`, `**/eventbridge/**`, `**/*producer*.ts`, `**/*consumer*.ts`, `**/*saga*.ts`, `**/*event-store*.ts`, `**/websocket/**`
858
+ - Korean: "이벤트 아키텍처", "메시지 큐", "카프카", "사가 패턴", "이벤트 소싱"
859
+ - English: "event-driven", "message queue", "kafka", "rabbitmq", "saga pattern", "event sourcing", "CQRS", "websocket"
860
+
861
+ **Auto-Activation:** Supported via MCP server. Event Architecture Specialist is automatically selected when prompts contain event-driven architecture keywords or when working with message queue/event sourcing files.
862
+
863
+ ---
864
+
865
+ ### Observability Specialist (`observability-specialist.json`)
866
+
867
+ > **Note**: This is a **Domain Specialist** for vendor-neutral observability, covering OpenTelemetry instrumentation, distributed tracing, structured logging, SLI/SLO frameworks, and alerting patterns. Complements DevOps Engineer (Datadog-specific) with vendor-neutral approach.
868
+
869
+ **Supported Technologies:**
870
+
871
+ - Tracing: OpenTelemetry, Jaeger, Zipkin, Tempo, AWS X-Ray
872
+ - Metrics: Prometheus, Grafana, InfluxDB, Victoria Metrics
873
+ - Logs: ELK Stack, Loki, Splunk, Fluentd, CloudWatch Logs
874
+ - Standards: W3C Trace Context, OTLP, RED/USE methods
875
+
876
+ **Expertise:**
877
+
878
+ - OpenTelemetry instrumentation (traces, metrics, logs)
879
+ - Distributed tracing (Jaeger, Zipkin, Tempo, Grafana Tempo)
880
+ - Structured logging (JSON format, context propagation)
881
+ - Metrics systems (Prometheus, Grafana, InfluxDB)
882
+ - SLI/SLO definition and error budget management
883
+ - Alert fatigue prevention and escalation patterns
884
+ - Correlation ID and W3C Trace Context propagation
885
+ - Dashboard design and visualization best practices
886
+
887
+ **Development Philosophy:**
888
+
889
+ - **Three Pillars**: Unified approach to traces, metrics, and logs
890
+ - **Vendor-Neutral**: OpenTelemetry-first instrumentation
891
+ - **SLO-Driven**: Define service level objectives before implementation
892
+ - **Observable by Default**: Every service instrumented from day one
893
+ - **Actionable Alerts**: Alert on symptoms, not causes; require runbooks
894
+
895
+ **Responsibilities:**
896
+
897
+ - Plan and review observability architecture implementations
898
+ - Design distributed tracing strategies with proper context propagation
899
+ - Plan structured logging standards with PII masking
900
+ - Define SLI/SLO frameworks and error budget policies
901
+ - Design dashboard templates and alerting strategies
902
+ - Plan log retention and archiving policies
903
+ - Assess observability maturity and recommend improvements
904
+
905
+ **Workflow:**
906
+
907
+ - **Planning**: Three pillars architecture, SLI/SLO definition, tracing strategy
908
+ - **Implementation**: OpenTelemetry SDK setup, log format verification, metric naming
909
+ - **Evaluation**: Trace coverage audit, alert quality review, maturity assessment
910
+
911
+ **Observability Maturity Model:**
912
+
913
+ | Level | Description | Characteristics |
914
+ |-------|-------------|-----------------|
915
+ | 1 | Reactive | Basic logging only, manual debugging |
916
+ | 2 | Proactive | Structured logs + basic metrics |
917
+ | 3 | Predictive | Distributed tracing + SLIs |
918
+ | 4 | Optimized | Full observability with SLOs and error budgets |
919
+ | 5 | Innovative | Predictive observability with anomaly detection |
920
+
921
+ **Activation Patterns:**
922
+
923
+ - Keywords: "observability", "distributed tracing", "OpenTelemetry", "SLI", "SLO", "error budget", "structured logging", "Prometheus", "Grafana", "Jaeger"
924
+ - Korean: "관측 가능성", "분산 추적", "SLI/SLO", "에러 버짓"
925
+ - English: "observability", "distributed tracing", "SLI/SLO", "error budget", "OpenTelemetry"
926
+
927
+ **Auto-Activation:** Supported via MCP server. Observability Specialist is automatically selected when prompts contain observability-related keywords or when working with tracing/monitoring files.
928
+
929
+ ---
930
+
931
+ ### Migration Specialist (`migration-specialist.json`)
932
+
933
+ > **Note**: This is a **Cross-Cutting Specialist** for legacy system modernization, framework upgrades, database migrations, and API versioning. Coordinates with Data Engineer (database), Platform Engineer (infrastructure), Architecture Specialist (layers), and Integration Specialist (APIs) for domain-specific implementation.
934
+
935
+ **Supported Patterns:**
936
+
937
+ - Strangler Fig: Gradual legacy replacement with traffic routing
938
+ - Branch by Abstraction: Refactoring with abstraction layer and feature toggles
939
+ - Blue-Green: Zero-downtime deployment with instant rollback
940
+ - Canary: Risk mitigation through gradual traffic routing
941
+ - Dual-Write: Database migration with zero data loss
942
+
943
+ **Expertise:**
944
+
945
+ - Legacy system modernization (Strangler Fig pattern)
946
+ - Framework upgrade strategies with compatibility handling
947
+ - Database migration with zero-downtime patterns
948
+ - Rollback planning and execution
949
+ - API versioning and deprecation management
950
+ - Feature flag-based cutover strategies
951
+ - Dual-write pattern implementation
952
+ - Migration risk assessment and mitigation
953
+
954
+ **Development Philosophy:**
955
+
956
+ - **Verification-Driven Migration (VDM)**: Pre-migration validation → Execution → Post-migration validation → Rollback verification
957
+ - **Phase-Based**: Every migration broken into independently reversible phases
958
+ - **Rollback-First**: Rollback procedure defined and tested before any production migration
959
+ - **SLI-Triggered Rollback**: Automatic rollback on defined threshold breaches
960
+ - **Data Integrity**: Continuous verification at every checkpoint
961
+
962
+ **Responsibilities:**
963
+
964
+ - Orchestrate multi-phase migration strategies
965
+ - Design and verify rollback procedures
966
+ - Plan pre/post-migration validation checkpoints
967
+ - Coordinate migration SLIs for automatic rollback triggers
968
+ - Manage API version coexistence and deprecation
969
+ - Guide incremental migration with feature flags
970
+ - Ensure data integrity during migrations
971
+ - Coordinate with specialist agents for domain-specific implementation
972
+
973
+ **Workflow:**
974
+
975
+ - **Planning**: Pattern selection, phase breakdown, rollback design, SLI definition
976
+ - **Implementation**: Pre-migration validation, execution with monitoring, checkpoint verification
977
+ - **Evaluation**: Completeness verification, performance comparison, cleanup audit
978
+
979
+ **Migration SLI Thresholds:**
980
+
981
+ | SLI | Baseline | Rollback Trigger |
982
+ |-----|----------|------------------|
983
+ | Error Rate | Pre-migration rate | >1% increase |
984
+ | Latency (p95) | Pre-migration latency | >20% degradation |
985
+ | Data Consistency | Zero difference | Any inconsistency |
986
+ | Throughput | Pre-migration capacity | <80% of baseline |
987
+
988
+ **Delegation Rules:**
989
+
990
+ | Delegate To | When |
991
+ |-------------|------|
992
+ | Data Engineer | Database schema migrations, data transformation logic |
993
+ | Platform Engineer | Infrastructure blue-green deployment, Kubernetes rollouts |
994
+ | Architecture Specialist | Layer boundary changes, module restructuring |
995
+ | Integration Specialist | External API migrations, API contract changes |
996
+ | Observability Specialist | Migration dashboards, SLI/SLO framework |
997
+
998
+ **Activation Patterns:**
999
+
1000
+ - Keywords: "migration", "migrate", "legacy", "upgrade", "strangler fig", "rollback", "cutover", "deprecation", "backward compatibility"
1001
+ - Korean: "마이그레이션", "이전", "레거시", "업그레이드", "롤백", "호환성", "전환"
1002
+ - English: "migration", "legacy modernization", "framework upgrade", "zero-downtime", "api versioning"
1003
+
1004
+ **Auto-Activation:** Supported via MCP server. Migration Specialist is automatically selected when prompts contain migration-related keywords or when working with migration/upgrade files.
1005
+
1006
+ ---
1007
+
773
1008
  ### Code Reviewer (`code-reviewer.json`)
774
1009
 
775
1010
  **Expertise:**
@@ -1128,6 +1363,9 @@ All agent files are located directly in `.ai-rules/agents/` directory without su
1128
1363
  ├── ui-ux-designer.json # Domain specialist
1129
1364
  ├── documentation-specialist.json # Domain specialist
1130
1365
  ├── integration-specialist.json # Domain specialist
1366
+ ├── event-architecture-specialist.json # Domain specialist
1367
+ ├── observability-specialist.json # Domain specialist
1368
+ ├── migration-specialist.json # Cross-cutting specialist
1131
1369
  ├── performance-specialist.json # Domain specialist
1132
1370
  ├── security-specialist.json # Domain specialist
1133
1371
  ├── seo-specialist.json # Domain specialist
@@ -1162,19 +1400,29 @@ Some specialist agents define **delegation rules** to clarify when work should b
1162
1400
 
1163
1401
  ```json
1164
1402
  {
1165
- "delegation_rules": {
1166
- "to_{specialist}": [
1167
- "When condition X requires specialist expertise",
1168
- "When condition Y is beyond current agent scope"
1169
- ],
1170
- "from_{specialist}": [
1171
- "When specialist identifies work for this agent",
1172
- "When specialist review triggers this agent's domain"
1173
- ]
1403
+ "role": {
1404
+ "title": "Specialist Title",
1405
+ "expertise": [...],
1406
+ "responsibilities": [...],
1407
+ "delegation_rules": {
1408
+ "to_{specialist}": [
1409
+ "When condition X requires specialist expertise",
1410
+ "When condition Y is beyond current agent scope"
1411
+ ],
1412
+ "from_{specialist}": [
1413
+ "When specialist identifies work for this agent",
1414
+ "When specialist review triggers this agent's domain"
1415
+ ]
1416
+ }
1174
1417
  }
1175
1418
  }
1176
1419
  ```
1177
1420
 
1421
+ **Placement Standard:**
1422
+ - `delegation_rules` MUST be placed inside the `role` object, after `responsibilities`
1423
+ - This ensures consistent structure across all agent files
1424
+ - All 8 agents with delegation rules follow this pattern
1425
+
1178
1426
  **Example (Integration Specialist ↔ Security Specialist):**
1179
1427
 
1180
1428
  | Direction | Trigger Conditions |
@@ -1191,15 +1439,20 @@ Some specialist agents define **delegation rules** to clarify when work should b
1191
1439
  **Currently Implemented:**
1192
1440
 
1193
1441
  - `integration-specialist.json` ↔ `security-specialist.json` (bidirectional delegation rules)
1442
+ - `integration-specialist.json` ↔ `event-architecture-specialist.json` (webhook ↔ event queue patterns)
1443
+ - `backend-developer.json` ↔ `event-architecture-specialist.json` (API ↔ message queue patterns)
1444
+ - `architecture-specialist.json` ↔ `event-architecture-specialist.json` (layer boundaries ↔ event-driven design)
1445
+ - `frontend-developer.json` ↔ `event-architecture-specialist.json` (UI ↔ real-time event patterns)
1446
+ - `performance-specialist.json` ↔ `event-architecture-specialist.json` (optimization ↔ event throughput)
1447
+ - `test-strategy-specialist.json` ↔ `event-architecture-specialist.json` (testing ↔ saga/contract tests)
1194
1448
 
1195
1449
  **Potential Future Delegation Patterns:**
1196
1450
 
1197
1451
  | Specialists | Use Case |
1198
1452
  |-------------|----------|
1199
- | Performance ↔ Frontend | Bundle optimization, lazy loading, rendering performance |
1200
1453
  | Accessibility ↔ UI/UX | ARIA implementation, color contrast, interaction design |
1201
1454
  | Security ↔ DevOps | Secrets management, CI/CD security, infrastructure hardening |
1202
- | ArchitectureTest Strategy | Testability design, mock boundaries, integration testing |
1455
+ | PerformanceFrontend | Bundle optimization, lazy loading, rendering performance |
1203
1456
 
1204
1457
  > **Note**: Add delegation_rules when specialists have clear handoff scenarios. Avoid unnecessary rules for specialists with minimal overlap.
1205
1458
 
@@ -1279,6 +1532,269 @@ To create a Primary Developer Agent for your tech stack:
1279
1532
  - `design_system`: UI component library for your project
1280
1533
  - `communication.language`: Team's preferred language
1281
1534
 
1535
+ ### Specialist Integration Checklist (4-Point)
1536
+
1537
+ When creating a new **Domain Specialist** agent (e.g., `{domain}-specialist.json`), you must complete ALL 4 integration points to ensure the agent is properly discovered and recommended by the MCP server:
1538
+
1539
+ #### ✅ Integration Checklist
1540
+
1541
+ | # | File | Location | Action |
1542
+ |---|------|----------|--------|
1543
+ | 1 | `keyword.service.ts` | `CONTEXT_SPECIALIST_PATTERNS` | Add keyword regex pattern for prompt-based detection |
1544
+ | 2 | `agent.types.ts` | `FILE_PATTERN_SPECIALISTS` | Add file name patterns for file-based detection |
1545
+ | 3 | `keyword.service.ts` | `defaultSpecialists` | Add to relevant mode configs (PLAN/ACT/EVAL/AUTO) |
1546
+ | 4 | `custom-instructions.md` | Mode-specific Specialists table | Update documentation table |
1547
+
1548
+ #### 1. CONTEXT_SPECIALIST_PATTERNS (keyword.service.ts)
1549
+
1550
+ Add a regex pattern to detect specialist-relevant keywords in user prompts:
1551
+
1552
+ ```typescript
1553
+ // apps/mcp-server/src/keyword/keyword.service.ts
1554
+ {
1555
+ pattern:
1556
+ /keyword1|keyword2|한국어키워드|english\s*pattern/i,
1557
+ specialist: '{domain}-specialist',
1558
+ },
1559
+ ```
1560
+
1561
+ **Best Practices:**
1562
+ - Include both English and localized keywords (Korean, Japanese, Chinese, Spanish, etc.)
1563
+ - Use `\s*` for optional spaces
1564
+ - Use `[- ]?` for optional hyphens/spaces
1565
+ - Test regex patterns cover common variations
1566
+ - **Check for conflicts**: Review existing patterns to avoid overlap (e.g., "log" might match both observability and other specialists)
1567
+
1568
+ #### 2. FILE_PATTERN_SPECIALISTS (agent.types.ts)
1569
+
1570
+ Add file name patterns that trigger specialist recommendations:
1571
+
1572
+ ```typescript
1573
+ // apps/mcp-server/src/agent/agent.types.ts
1574
+ export const FILE_PATTERN_SPECIALISTS: Record<string, string[]> = {
1575
+ // ... existing patterns
1576
+ keyword1: ['{domain}-specialist'],
1577
+ keyword2: ['{domain}-specialist', 'other-specialist'],
1578
+ };
1579
+ ```
1580
+
1581
+ **Best Practices:**
1582
+ - Use lowercase file name keywords
1583
+ - Multiple specialists can share a pattern
1584
+ - Consider related file patterns (e.g., `metrics` → `['observability-specialist', 'performance-specialist']`)
1585
+
1586
+ #### 3. defaultSpecialists (keyword.service.ts)
1587
+
1588
+ Add the specialist to appropriate mode default lists:
1589
+
1590
+ ```typescript
1591
+ // apps/mcp-server/src/keyword/keyword.service.ts
1592
+ // In MODE_CONFIGS
1593
+ EVAL: {
1594
+ defaultSpecialists: [
1595
+ // ... existing specialists
1596
+ '{domain}-specialist',
1597
+ ],
1598
+ },
1599
+ ```
1600
+
1601
+ **Mode Selection Guide:**
1602
+
1603
+ | Mode | Include When |
1604
+ |------|--------------|
1605
+ | PLAN | Specialist provides planning/architecture guidance |
1606
+ | ACT | Specialist provides implementation verification |
1607
+ | EVAL | Specialist provides quality assessment (most common) |
1608
+ | AUTO | Specialist is essential for autonomous quality cycles |
1609
+
1610
+ #### 4. Documentation (custom-instructions.md)
1611
+
1612
+ Update the Mode-specific Specialists table:
1613
+
1614
+ ```markdown
1615
+ | Mode | Specialists |
1616
+ |------|-------------|
1617
+ | **EVAL** | ..., 📊 {domain} |
1618
+ ```
1619
+
1620
+ **Icon Selection:**
1621
+ - Use relevant emoji that represents the domain
1622
+ - Examples: 🔒 security, ♿ accessibility, ⚡ performance, 📊 observability
1623
+
1624
+ #### Testing Requirements
1625
+
1626
+ After completing all 4 integration points, add tests:
1627
+
1628
+ ```typescript
1629
+ // apps/mcp-server/src/keyword/keyword.service.spec.ts
1630
+ describe('{domain}-specialist pattern', () => {
1631
+ it.each([
1632
+ 'English keyword 1',
1633
+ 'English keyword 2',
1634
+ // ... more English patterns
1635
+ ])('detects {domain}-specialist for English: %s', async prompt => {
1636
+ const result = await service.parseMode(`PLAN ${prompt}`);
1637
+ expect(result.parallelAgentsRecommendation?.specialists).toContain(
1638
+ '{domain}-specialist',
1639
+ );
1640
+ });
1641
+
1642
+ it.each([
1643
+ '한국어 키워드 1',
1644
+ '한국어 키워드 2',
1645
+ // ... more Korean patterns
1646
+ ])('detects {domain}-specialist for Korean: %s', async prompt => {
1647
+ const result = await service.parseMode(`PLAN ${prompt}`);
1648
+ expect(result.parallelAgentsRecommendation?.specialists).toContain(
1649
+ '{domain}-specialist',
1650
+ );
1651
+ });
1652
+
1653
+ it('does not detect {domain}-specialist for unrelated prompts', async () => {
1654
+ const result = await service.parseMode('PLAN create login form');
1655
+ expect(result.parallelAgentsRecommendation?.specialists).not.toContain(
1656
+ '{domain}-specialist',
1657
+ );
1658
+ });
1659
+ });
1660
+ ```
1661
+
1662
+ **Test Coverage Requirements:**
1663
+ - ✅ English keywords (at least 5 test cases, more for complex domains)
1664
+ - ✅ Localized keywords (at least 3 test cases per supported language)
1665
+ - ✅ Negative test (at least 1 unrelated prompt that should NOT trigger)
1666
+
1667
+ #### 5. Verify Integration
1668
+
1669
+ After completing all integration points and tests, verify everything works:
1670
+
1671
+ ```bash
1672
+ # Run specialist pattern tests
1673
+ yarn vitest run src/keyword/keyword.service.spec.ts -t "{domain}-specialist pattern"
1674
+
1675
+ # Run full test suite to ensure no regressions
1676
+ yarn test
1677
+ ```
1678
+
1679
+ **Verification Checklist:**
1680
+ - [ ] All new pattern tests pass
1681
+ - [ ] No existing tests broken
1682
+ - [ ] Specialist appears in `parallelAgentsRecommendation` when keywords match
1683
+ - [ ] Specialist appears when target files match `FILE_PATTERN_SPECIALISTS`
1684
+
1685
+ ---
1686
+
1687
+ ### Updating Existing Specialist Integration
1688
+
1689
+ When modifying an existing specialist's integration:
1690
+
1691
+ #### Adding New Keywords
1692
+
1693
+ 1. Add keywords to the existing pattern in `CONTEXT_SPECIALIST_PATTERNS`
1694
+ 2. Add corresponding tests (both English and localized)
1695
+ 3. Run verification to ensure no conflicts
1696
+
1697
+ ```typescript
1698
+ // Before
1699
+ pattern: /existing|keywords/i,
1700
+
1701
+ // After
1702
+ pattern: /existing|keywords|new_keyword|새키워드/i,
1703
+ ```
1704
+
1705
+ #### Adding New File Patterns
1706
+
1707
+ 1. Add patterns to `FILE_PATTERN_SPECIALISTS`
1708
+ 2. Check for conflicts with existing patterns
1709
+
1710
+ ```typescript
1711
+ // Adding new pattern
1712
+ newpattern: ['{domain}-specialist'],
1713
+ // Or extending existing pattern
1714
+ existingpattern: ['existing-specialist', '{domain}-specialist'],
1715
+ ```
1716
+
1717
+ #### Changing Mode Assignments
1718
+
1719
+ 1. Update `defaultSpecialists` in relevant mode configs
1720
+ 2. Update `custom-instructions.md` table
1721
+ 3. Document the change rationale
1722
+
1723
+ #### Deprecating a Specialist
1724
+
1725
+ When removing or deprecating a specialist:
1726
+
1727
+ **Common Deprecation Reasons:**
1728
+ - Specialist merged into another (e.g., combining overlapping domains)
1729
+ - Domain no longer relevant to project
1730
+ - Replaced by improved specialist with different approach
1731
+ - Simplifying agent ecosystem (reducing noise in recommendations)
1732
+
1733
+ **Full Deprecation (Remove Completely):**
1734
+
1735
+ 1. **Remove from all 4 integration points** (reverse order recommended):
1736
+ - Remove from `custom-instructions.md` Mode-specific Specialists table
1737
+ - Remove from `defaultSpecialists` in `keyword.service.ts`
1738
+ - Remove file patterns from `FILE_PATTERN_SPECIALISTS` in `agent.types.ts`
1739
+ - Remove keyword pattern from `CONTEXT_SPECIALIST_PATTERNS` in `keyword.service.ts`
1740
+
1741
+ 2. **Clean up tests**:
1742
+ - Remove or update tests in `keyword.service.spec.ts`
1743
+ - Run full test suite to ensure no broken references
1744
+
1745
+ 3. **Handle the agent JSON file**:
1746
+ - Option A: Delete `{domain}-specialist.json` if no longer needed
1747
+ - Option B: Add `"deprecated": true` field if keeping for reference
1748
+
1749
+ 4. **Document the deprecation**:
1750
+ - Add note in commit message explaining why specialist was removed
1751
+ - Update any documentation that references the specialist
1752
+
1753
+ 5. **Support consumer migration** (if specialist has active users):
1754
+ - Announce deprecation in advance (recommend 1-2 sprint cycles)
1755
+ - Provide migration path to replacement specialist (if applicable)
1756
+ - Update prompts/workflows that explicitly reference the deprecated specialist
1757
+
1758
+ **Deprecation Timeline Recommendation:**
1759
+ - **Announce**: Communicate deprecation intent at least 1 sprint before removal
1760
+ - **Soft deprecation**: Mark as deprecated but keep functional (optional)
1761
+ - **Hard deprecation**: Complete removal from all integration points
1762
+
1763
+ **Partial Deprecation (Mode-Specific Removal):**
1764
+
1765
+ To remove a specialist from specific modes only (e.g., keep in EVAL but remove from PLAN):
1766
+
1767
+ 1. Update `defaultSpecialists` in the relevant mode config only
1768
+ 2. Update `custom-instructions.md` Mode-specific Specialists table
1769
+ 3. Keep `CONTEXT_SPECIALIST_PATTERNS` and `FILE_PATTERN_SPECIALISTS` intact
1770
+ 4. Document which modes still include the specialist
1771
+ 5. Run `yarn test` to verify partial changes don't break existing functionality
1772
+
1773
+ ```typescript
1774
+ // Example: Remove from PLAN but keep in EVAL
1775
+ PLAN: {
1776
+ defaultSpecialists: [
1777
+ // '{domain}-specialist' removed from PLAN
1778
+ ],
1779
+ },
1780
+ EVAL: {
1781
+ defaultSpecialists: [
1782
+ '{domain}-specialist', // Still included in EVAL
1783
+ ],
1784
+ },
1785
+ ```
1786
+
1787
+ **Deprecation Checklist:**
1788
+ - [ ] Removed from `CONTEXT_SPECIALIST_PATTERNS` (if full deprecation)
1789
+ - [ ] Removed from `FILE_PATTERN_SPECIALISTS` (if full deprecation)
1790
+ - [ ] Removed from `defaultSpecialists` (all modes or specific modes)
1791
+ - [ ] Removed from `custom-instructions.md`
1792
+ - [ ] Tests cleaned up
1793
+ - [ ] Agent JSON handled (deleted or marked deprecated)
1794
+ - [ ] All tests pass
1795
+
1796
+ **See also:** [Specialist Integration Checklist (4-Point)](#specialist-integration-checklist-4-point) for the reverse process (adding specialists)
1797
+
1282
1798
  ---
1283
1799
 
1284
1800
  ## Related Documentation
@@ -494,7 +494,6 @@
494
494
  }
495
495
  },
496
496
  "communication": {
497
- "language": "en",
498
497
  "approach": [
499
498
  "Start by understanding accessibility context (planning/implementation/evaluation)",
500
499
  "Plan/verify WCAG 2.1 AA compliance",
@@ -135,7 +135,6 @@
135
135
  },
136
136
 
137
137
  "communication": {
138
- "language": "en",
139
138
  "style": "Execution-focused step-by-step progress reporting",
140
139
  "format": "Clearly display implementation progress and quality verification results"
141
140
  },
@@ -182,7 +182,6 @@
182
182
  ],
183
183
 
184
184
  "communication": {
185
- "language": "en",
186
185
  "style": "Systematic and clear approach, schema-driven design",
187
186
  "approach": [
188
187
  "Start by understanding agent requirements",
@@ -725,7 +725,6 @@
725
725
  },
726
726
 
727
727
  "communication": {
728
- "language": "en",
729
728
  "approach": [
730
729
  "Start by understanding AI/ML requirements context",
731
730
  "Read existing AI integration code before changes",