Skip to main content
ClaudeWave
Skill556 repo starsupdated 11d ago

enterprise

The enterprise Claude Code skill initializes and guides development of large-scale microservices systems using a Turborepo monorepo structure with Next.js, FastAPI, Kubernetes, and Terraform. Use this skill when setting up enterprise projects requiring microservices architecture, infrastructure-as-code templates, comprehensive documentation frameworks, and development pipelines with monitoring, error tracking, and self-healing capabilities.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/popup-studio-ai/bkit-claude-code /tmp/enterprise && cp -r /tmp/enterprise/skills/enterprise ~/.claude/skills/enterprise
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Advanced (Enterprise) Skill

## Actions

| Action | Description | Example |
|--------|-------------|---------|
| `init` | Project initialization (/init-enterprise feature) | `/enterprise init my-platform` |
| `guide` | Display development guide | `/enterprise guide` |
| `help` | MSA/Infrastructure help | `/enterprise help` |

### init (Project Initialization)
1. Create Turborepo monorepo structure
2. apps/, packages/, services/, infra/ folder structure
3. Create CLAUDE.md (Level: Enterprise specified)
4. docs/ 5-category structure
5. infra/terraform/, infra/k8s/ base templates
6. Initialize .bkit-memory.json

### guide (Development Guide)
- AI Native 10-Day development cycle
- Microservices architecture patterns
- Phase 1-9 full Pipeline (Enterprise version)

### help (Infrastructure Help)
- Kubernetes basic concepts
- Terraform IaC patterns
- AWS EKS, RDS configuration guide

## Target Audience

- Senior developers
- CTOs / Architects
- Large-scale system operators

## Tech Stack

```
Frontend:
- Next.js 14+ (Turborepo monorepo)
- TypeScript
- Tailwind CSS
- TanStack Query
- Zustand
- Sentry Browser SDK (@sentry/nextjs) — Error tracking + Session Replay

Backend:
- Python FastAPI (microservices) — default
- PostgreSQL (schema separation)
- Redis (cache, Pub/Sub)
- RabbitMQ / SQS (message queue)
- Sentry Server SDK (sentry-sdk[fastapi]) — Error tracking + APM

Infrastructure:
- AWS (EKS, RDS, S3, CloudFront)
- Kubernetes (Kustomize)
- Terraform (IaC)
- ArgoCD (GitOps)
- ALB + NGINX Ingress Controller (L7 load balancing)
  - CORS: Ingress annotation으로 처리
    nginx.ingress.kubernetes.io/enable-cors: "true"
  - NLB(L4)는 gRPC/WebSocket 전용 서비스에만 사용

CI/CD:
- GitHub Actions
- Docker
- Semgrep (SAST) + Trivy (Container Scan)

Monitoring & Error Tracking:
- Sentry — Error tracking, grouping, regression detection
- Prometheus + Grafana — Metrics & dashboards
- Loki + Promtail — Log aggregation
- Tempo + OpenTelemetry — Distributed tracing
- Alertmanager → PagerDuty (critical) / Slack (warning)

Self-Healing Pipeline:
- Sentry Webhook → Self-Healing Agent trigger
- 4-Layer Living Context (Scenarios, Invariants, Impact, Incidents)
- Auto-fix (max 5 iterations) → Auto PR → Canary Deploy
- Auto-Rollback on error rate spike
```

### Language Tier Guidance (v1.3.0)

> **Supported**: All Tiers
>
> Enterprise level handles complex requirements including legacy system integration.

| Tier | Usage | Guidance |
|------|-------|----------|
| Tier 1 | Primary services | New development, core features |
| Tier 2 | System/Cloud | Go (K8s), Rust (performance critical) |
| Tier 3 | Platform native | iOS (Swift), Android (Kotlin), legacy Java |
| Tier 4 | Legacy integration | Migration plan required |

**Migration Path**:
- PHP → TypeScript (Next.js API routes)
- Ruby → Python (FastAPI)
- Java → Kotlin or Go

## Project Structure

```
project/
├── apps/                        # Frontend apps (Turborepo)
│   ├── web/                    # Main web app
│   ├── admin/                  # Admin
│   └── docs/                   # Documentation site
│
├── packages/                    # Shared packages
│   ├── ui/                     # UI components
│   ├── api-client/             # API client
│   └── config/                 # Shared config
│
├── services/                    # Backend microservices
│   ├── auth/                   # Auth service
│   ├── user/                   # User service
│   ├── {domain}/               # Domain-specific services
│   └── shared/                 # Shared modules
│
├── infra/                       # Infrastructure code
│   ├── terraform/
│   │   ├── modules/            # Reusable modules
│   │   └── environments/       # Environment-specific config
│   └── k8s/
│       ├── base/               # Common manifests
│       └── overlays/           # Environment-specific patches
│
├── docs/                        # PDCA documents
│   ├── 00-requirement/
│   ├── 01-development/         # Design documents (multiple)
│   ├── 02-scenario/
│   ├── 03-refactoring/
│   └── 04-operation/
│
├── scripts/                     # Utility scripts
├── .github/workflows/           # CI/CD
├── docker-compose.yml
├── turbo.json
└── pnpm-workspace.yaml
```

## Clean Architecture (4-Layer)

```
┌─────────────────────────────────────────────────────────┐
│                    API Layer                             │
│  - FastAPI routers                                       │
│  - Request/Response DTOs                                 │
│  - Auth/authz middleware                                 │
├─────────────────────────────────────────────────────────┤
│                  Application Layer                       │
│  - Service classes                                       │
│  - Use Case implementation                               │
│  - Transaction management                                │
├─────────────────────────────────────────────────────────┤
│                    Domain Layer                          │
│  - Entity classes (pure Python)                          │
│  - Repository interfaces (ABC)                           │
│  - Business rules                                        │
├─────────────────────────────────────────────────────────┤
│                 Infrastructure Layer                     │
│  - Repository implementations (SQLAlchemy)               │
│  - External API clients                                  │
│  - Cache, messaging                                      │
│  - Sentry SDK integration (error capture)                │
└─────────────────────────────────────────────────────────┘

Dependency direction: Top → Bottom
Domain Layer depends on nothing
```

## Error Handling & Self-Healing Pipeline

```
Exception 발생 (Frontend/Backend)
  ↓
Sentry SDK 자동 캡처 (stack trace + breadcrumbs + user context)
  ↓
Sentry Alert Rule (new issue / regression / spike)
  ↓
Webhook → Self-Healing Agent trigger
  ↓
Living Context 4-Layer 로딩
  ├── Scenario Matrix: 테스트 시나리오
  ├── Invariants: 불변 조건 (critical = 수정 차단)