Orchestrates infrastructure cost estimation with tier-based or custom TPS sizing. Offers pre-configured tiers (Starter/Growth/Business/Enterprise) or custom TPS input. Skill discovers components, asks shared/dedicated for EACH, selects environment(s), reads actual Helm chart configs, then dispatches agent for accurate calculations.
┌─────────────────────────────────────────────────────────────┐
│ SKILL (Orchestrator) │
│ │
│ Step 1: Select Products │
│ - Access Manager: ALWAYS (shared platform) │
│ - Midaz Core: [YES / NO] │
│ - Reporter: [YES / NO] │
│ │
│ Step 2: Basic Info │
│ - Repo path, Total customers │
│ │
│ Step 2a: Infrastructure Sizing (NEW in v6.0) │
│ - Option 1: Tier (Starter/Growth/Business/Enterprise) │
│ - Option 2: Custom TPS (backwards compatible) │
│ │
│ Step 3: Select Environment(s) to Calculate │
│ - [x] Homolog (us-east-2, Single-AZ, 1 replica) │
│ - [x] Production (sa-east-1, Multi-AZ, 3 replicas) │
│ │
│ Step 4: Read Helm Charts (for selected products only) │
│ - ALWAYS: charts/plugin-access-manager/values.yaml │
│ - If Midaz: charts/midaz/values.yaml │
│ - If Reporter: charts/reporter/values.yaml │
│ │
│ Step 5: Ask PER COMPONENT: Shared or Dedicated? │
│ - VPC, EKS, PostgreSQL, Valkey, etc. │
│ │
│ Steps 6-7: Database Config + Billing Model │
│ │
│ ↓ All data collected (products + tier/TPS + Helm configs) │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ AGENT (Calculator) │
│ │
│ Receives: Products + Tier/TPS + Helm configs → Calculates: │
│ - Infrastructure costs PER ENVIRONMENT (Homolog + Prod) │
│ - EKS node sizing from tier config OR actual CPU/memory │
│ - Cost attribution (shared ÷ customers, dedicated = full) │
│ - Access Manager costs ALWAYS shared across ALL customers │
│ - Profitability analysis (using combined env costs) │
│ │
│ Returns: Side-by-side Homolog vs Production breakdown │
└─────────────────────────────────────────────────────────────┘
Ask which products the customer needs:
| Product | Selection | Sharing | Services |
|---|---|---|---|
| Access Manager | ALWAYS INCLUDED | ALWAYS SHARED | identity, auth |
| Midaz Core | Required | Customer choice | onboarding, transaction, ledger, crm |
| Reporter | Optional | Customer choice | manager, worker, frontend |
Use AskUserQuestion for product selection:
AskUserQuestion:
question: "Which products does this customer need? (Access Manager is always included)"
header: "Products"
multiSelect: true
options:
- label: "Midaz Core + Reporter (Recommended)"
description: "Full platform: ledger + regulatory reporting"
- label: "Midaz Core only"
description: "Base ledger platform without reporting"
Product → Helm Chart Mapping:
| Product | Helm Chart | Always Read |
|---|---|---|
| Access Manager | charts/plugin-access-manager/values.yaml | YES (always shared) |
| Midaz Core | charts/midaz/values.yaml | If selected |
| Reporter | charts/reporter/values.yaml | If selected |
| Input | Required | Question | Example |
|---|---|---|---|
| Repo Path | Yes | "What is the application repository path?" | /workspace/midaz |
| Helm Charts Repo | Optional | "Path to LerianStudio/helm repository?" | /workspace/helm |
| Total Customers | Yes | "How many customers share the platform?" | 5 |
Why Helm Charts Repo? LerianStudio/helm contains actual CPU/memory configurations per service. Without it, the agent uses Midaz default values.
Note: TPS/Tier selection moved to Step 2a below.
Choose between pre-configured tier or custom TPS:
AskUserQuestion:
question: "How would you like to size the infrastructure?"
header: "Sizing Method"
multiSelect: false
options:
- label: "Pre-configured Tier (Recommended)"
description: "Choose optimized tier by TPS range - faster, cost-optimized"
- label: "Custom TPS"
description: "Specify exact TPS for custom infrastructure sizing"
AskUserQuestion:
question: "Which infrastructure tier matches your expected traffic?"
header: "Tier"
multiSelect: false
options:
- label: "Starter (50-100 TPS) - ~R$ 11.7k/mo"
description: "Small deployments, POC, single tenant. 2× c6i.large nodes."
- label: "Growth (100-500 TPS) - ~R$ 19.3k/mo"
description: "Growing business, moderate traffic. 3× c6i.xlarge nodes."
- label: "Business (500-1,500 TPS) - ~R$ 27.5k/mo (Recommended)"
description: "Production app, full HA. 4× c6i.xlarge nodes, Multi-AZ."
- label: "Enterprise (1,500-5,000 TPS) - ~R$ 56.7k/mo"
description: "Mission critical, high performance. 8× c6i.2xlarge nodes."
Tier Reference: See infrastructure-tiers-by-tps.md for detailed tier specifications.
Tier Configurations (stored for agent dispatch):
| Tier | Target TPS | Max Capacity | Prod Nodes | Prod Replicas (auth) |
|---|---|---|---|---|
| Starter | 100 | 670 | 2× c6i.large | 1 |
| Growth | 500 | 1,340 | 3× c6i.xlarge | 2 |
| Business | 1,500 | 2,010 | 4× c6i.xlarge | 3 |
| Enterprise | 5,000 | 6,030 | 8× c6i.2xlarge | 9 |
AskUserQuestion:
question: "What is the expected TPS (transactions per second)?"
header: "TPS"
multiSelect: false
options:
- label: "50 TPS"
description: "Low traffic, testing"
- label: "150 TPS"
description: "Small to medium traffic"
- label: "500 TPS"
description: "Medium to high traffic"
- label: "Custom value"
description: "I'll specify exact TPS"
Custom TPS Calculation:
(TPS ÷ 670) × 1.25 for auth serviceAsk which environments need cost estimation:
| Environment | Region | Configuration | Use Case |
|---|---|---|---|
| Homolog | us-east-2 (Ohio) | Single-AZ, 1 replica, ~35% cheaper | Testing, staging |
| Production | sa-east-1 (São Paulo) | Multi-AZ, 3 replicas, full HA | Live traffic |
Use AskUserQuestion for environment selection:
AskUserQuestion:
question: "Which environments should be estimated?"
header: "Environments"
multiSelect: true
options:
- label: "Both (Recommended)"
description: "Calculate Homolog + Production costs for complete picture"
- label: "Production only"
description: "Calculate only production environment (São Paulo)"
- label: "Homolog only"
description: "Calculate only homolog/staging environment (Ohio)"
Environment Differences:
| Aspect | Homolog | Production |
|---|---|---|
| Region | us-east-2 (Ohio) | sa-east-1 (São Paulo) |
| Pricing | ~35% cheaper | Full price |
| Replicas | 1 per service | 3 per service (HA) |
| Database | Single-AZ | Multi-AZ + Read Replicas |
| NAT Gateways | 1 (single AZ) | 3 (one per AZ) |
Access Manager is platform-level infrastructure - ALWAYS included, ALWAYS shared across all customers.
ALWAYS READ: charts/plugin-access-manager/values.yaml
Services:
- identity (100m CPU, 128Mi memory)
- auth (500m CPU, 256Mi memory)
Infrastructure (shared):
- auth-database (PostgreSQL for Casdoor)
- valkey (session cache)
Cost Attribution: Access Manager costs are ALWAYS divided by total platform customers.
Read ONLY the Helm charts for products selected in Step 1:
| Product Selected | Helm Chart to Read | Services |
|---|---|---|
| Midaz Core (if selected) | charts/midaz/values.yaml | onboarding, transaction, ledger, crm |
| Reporter (if selected) | charts/reporter/values.yaml | manager, worker, frontend |
Example - Customer selected "Midaz Core + Reporter":
Read: charts/plugin-access-manager/values.yaml → ALWAYS (shared platform)
Read: charts/midaz/values.yaml → Selected
Read: charts/reporter/values.yaml → Selected
Example - Customer selected "Midaz Core only":
Read: charts/plugin-access-manager/values.yaml → ALWAYS (shared platform)
Read: charts/midaz/values.yaml → Selected
Skip: charts/reporter/values.yaml → Not selected
Source: [email protected]:LerianStudio/helm.git
For each service, extract: