How Kiro operates The Trinity Beast Infrastructure — pre-built API routines, deployment automation, and session-persistent context.
The Kiro Command Center (KCC) is a set of pre-built operational routines that Kiro uses to manage The Trinity Beast Infrastructure (TBI). It consists of a bash script (scripts/kcc.sh) with 13 commands, a steering file (.kiro/steering/kiro-command-center.md) that loads automatically at the start of every session, and a live web dashboard at cpmp-site.org/docs/dashboard.html.
Instead of building curl commands from scratch for every health check, deployment, or verification, Kiro calls the KCC script. This eliminates repetitive command construction, ensures consistency, and reduces the chance of errors during operations.
In short: The TBCC is Cory's Command Center (browser-based, WebSocket relay to Neo). The KCC is Kiro's Command Center (script-based, direct API calls from the development environment). Both operate the same infrastructure through the same API endpoints with the same admin key.
During a typical session, Kiro performs dozens of operations against The TBI — health checks after deployments, endpoint verification after code changes, cluster stats during monitoring, payment link status checks, and feed status reviews. Each of these requires:
https://api.cpmp-site.org for LPO, https://lrs.cpmp-site.org for LRS)X-Admin-Key headerWithout the KCC, every operation is a hand-built curl command. With the KCC, it's a single call:
# Without KCC (manual)
curl -s -H "X-Admin-Key: tbmc-admin-..." https://api.cpmp-site.org/admin/cluster-stats | python3 -m json.tool
# With KCC (one command)
bash scripts/kcc.sh cluster-stats
The steering file ensures Kiro always has the admin key, resource names, and operational procedures loaded in context — even after a session restart or context compaction.
Located at .kiro/steering/kiro-command-center.md with inclusion: auto. This means it is loaded into Kiro's context at the start of every session — no manual activation required. It contains:
Located at scripts/kcc.sh. A standalone bash script that encapsulates all operational API calls. Each command:
resp.data)All commands are invoked as bash scripts/kcc.sh <command>.
Checks all services — LPO health, LRS health, and cluster stats (3/3 nodes reporting). This is the first command run after every ECS deployment.
bash scripts/kcc.sh health
# Output:
# LPO: ✅ [LPO] [us-east-2] [BeastMirror] [/health] [200]
# LRS: ✅ [LRS] [us-east-2] [BeastLRS] [/health] [200]
# Cluster: Nodes: 3/3
# BeastMain: published 2026-04-26T19:04:29Z
# BeastMirror: published 2026-04-26T19:04:29Z
# BeastLRS: published 2026-04-26T19:04:28Z
Verifies the last nightly sync job ran successfully. Pulls the most recent log stream from CloudWatch (/aws/ecs/trinity-beast-sync) and displays run time (EST), completion status, duration, cache totals, and per-category sync counts (price logs, usage logs, API keys, app params, cleanup). Run this every morning right after health.
bash scripts/kcc.sh sync-check
# Output:
# Run Time: April 28, 2026 at 01:00 AM EST
#
# Status: ✅ Sync complete
# Duration: 186.909018ms
# Cache: 3285260 logs in Cache
#
# Sync Results:
# Price logs: 72 new logs loaded
# Usage logs: 19 entries written to Cache
# API keys: 2 keys written to Cache
# App params: 60 params written to Cache
# Cleanup: 🟢 Pruned 0 old logs (>93 days)
Hits 16 key endpoints (6 public + 10 admin) and reports the HTTP status code for each. Used after major changes to confirm nothing is broken.
bash scripts/kcc.sh verify
# Output:
# Public Endpoints:
# ✅ GET /health (LPO) — 200
# ✅ GET /health (LRS) — 200
# ✅ GET /exchanges — 200
# ✅ GET /asset-categories — 200
# ...
# Admin Endpoints:
# ✅ GET /admin/config — 200
# ✅ GET /admin/cluster-stats — 200
# ...
Returns the full cluster-wide metrics snapshot — all 24 counters aggregated across all 3 containers via ElastiCache pipeline read.
bash scripts/kcc.sh cluster-stats
Shows all 16 payment links with their enabled status, click counts, and Stripe URLs. Used to verify link configuration before and after Stripe setup.
bash scripts/kcc.sh payment-links
# Output:
# Total: 16 links
# Type Tier Enabled Clicks URL
# subscription pro ✅ 42 https://buy.stripe.com/xxx...
Shows the connection status of all 6 exchange WebSocket feeds with subscription counts and stale asset counts.
bash scripts/kcc.sh feed-status
# Output:
# coinbase_ws ✅ Connected Subs: 12 Stale: 0
# gemini_ws ✅ Connected Subs: 12 Stale: 0
# kraken_ws ✅ Connected Subs: 12 Stale: 0
# gateio_ws ✅ Connected Subs: 12 Stale: 0
# bybit_ws ✅ Connected Subs: 12 Stale: 0
# okx_ws ✅ Connected Subs: 12 Stale: 0
Full ECS deployment pipeline — Docker build (no-cache), ECR tag, ECR push, force deploy all 3 services. The most common deployment command.
bash scripts/kcc.sh deploy-ecs
# Builds → Tags → Pushes → Force deploys main, mirror, LRS
# Then: bash scripts/kcc.sh health (after ~40s)
Uploads HTML files to S3 and invalidates CloudFront. Automatically strips the cpmp-redesign/ prefix to determine the S3 path.
bash scripts/kcc.sh deploy-site cpmp-redesign/docs/Trinity-Beast-API-Reference.html
bash scripts/kcc.sh deploy-site cpmp-redesign/subscribe-listener.html cpmp-redesign/docs/index.html
Lists all 16 system profiles with their key parameters (QPS, burst, TTL, DB pool size).
bash scripts/kcc.sh profiles
Shows the current application parameters — cache TTL, prewarm intervals, pool sizes, demo key, etc.
bash scripts/kcc.sh config
Collects all infrastructure metrics (endpoints, feeds, cluster, Valkey, Lambda, sync, SQS queue, website analytics) and stores them as a single JSON blob in Valkey (kcc:daily key, 24h TTL). This is the data source for both the CLI daily command and the KCC Live Dashboard.
bash scripts/kcc.sh daily-collect
Renders the compact daily status dashboard from the Valkey cache. If no cached data exists, it auto-runs daily-collect first. Shows services, ECS nodes, Valkey health, Lambda, nightly sync, SQS queue depth, and 7-day website analytics.
bash scripts/kcc.sh daily
# Output:
# ════════════════════
# KCC — May 02 02:11PM EDT
# ════════════════════
# ─── Services ───
# ✅ LPO ✅ LRS ✅ Web
# Cluster: 3/3
# ─── SQS Usage Queue ───
# ✅ Pending: 0 In-flight: 0
# ─── Website (7d) ───
# Total 14,250 2.2GB Avg 2,035/day
Security dashboard — CloudFront WAF (24h blocks), API WAF (per-rule breakdown), GuardDuty threat detection, CloudWatch security alarms, and application rate limiting stats.
bash scripts/kcc.sh security
The steering file at .kiro/steering/kiro-command-center.md is marked with inclusion: auto, which means it is loaded into Kiro's context automatically at the start of every session. This ensures Kiro always has access to:
| Information | Purpose |
|---|---|
| Admin API Key | Authenticate against all admin endpoints without asking |
| LPO / LRS Base URLs | Construct API calls without looking up DNS |
| S3 Bucket Name | Deploy website files to the correct bucket |
| CloudFront Distribution ID | Invalidate the CDN cache after deployments |
| ECR Repository | Push Docker images to the correct registry |
| ECS Cluster + Service Names | Force deploy the correct services |
| Operational Rules | Always health check after deploy, always verify after changes |
Context Persistence: Even if the conversation is compacted due to context window limits, the steering file is reloaded automatically. This means Kiro never loses access to the operational essentials — the admin key, resource names, and procedures survive context compaction.
A typical day starts with a morning check, then moves into the code change → deploy → verify cycle:
bash scripts/kcc.sh daily-collect then bash scripts/kcc.sh daily (full infrastructure snapshot — services, ECS, Valkey, Lambda, sync, SQS queue, analytics)bash scripts/kcc.sh health (confirm 3/3 nodes, per-container status, LPO + LRS connectivity)go build ./cmd/server/bash scripts/kcc.sh deploy-ecsbash scripts/kcc.sh health (confirm 3/3 nodes)bash scripts/kcc.sh verify (confirm all 200s)bash scripts/kcc.sh deploy-site cpmp-redesign/docs/...This entire cycle takes about 3 minutes of active work plus ~40 seconds of waiting for ECS. Without the KCC, each step would require constructing individual commands with the correct URLs, headers, and parameters.
The KCC Live Dashboard is a browser-based visual interface at cpmp-site.org/docs/dashboard.html that renders the same data collected by daily-collect. It provides:
The dashboard is also linked from the TBCC CloudWatch Monitoring widget for quick access during operations.
The Trinity Beast Infrastructure has two command centers, each designed for a different operator:
| Aspect | TBCC (Cory's) | KCC (Kiro's) |
|---|---|---|
| Operator | Cory Dean Kalani | Kiro (AI Development Environment) |
| Interface | Browser-based dashboard | Bash script + steering file + Live Dashboard |
| Access Method | WebSocket relay to Neo MacBook | Direct API calls from dev environment |
| Terminal | Built-in browser terminal | IDE terminal (Kiro's tool execution) |
| Widgets | Newsletter, Support, Email, CloudWatch, Stripe, Testing, AWS Ops, Partners, Exchange Manager, Cluster Health | 10 bash commands covering health, sync, verify, deploy, stats |
| Authentication | Admin key stored in localStorage | Admin key in steering file (auto-loaded) |
| Deployment | Copy commands → paste in local terminal | Direct execution via deploy-ecs and deploy-site |
| Persistence | Browser session | Steering file survives context compaction |
| URL | cpmp-site.org/admin/trinity-beast-command-center.html | scripts/kcc.sh |
Same API, different interfaces. Both command centers call the same endpoints with the same admin key. The TBCC is optimized for visual monitoring and manual operations. The KCC is optimized for automated, repeatable operations during development sessions.
The KCC calls these endpoints through the unified messaging envelope. All admin endpoints require the X-Admin-Key header.
| Command | Endpoints Called | Auth |
|---|---|---|
health | GET /health (LPO + LRS), GET /admin/cluster-stats | None + Admin |
sync-check | CloudWatch Logs: describe-log-streams, get-log-events on /aws/ecs/trinity-beast-sync | AWS credentials |
verify | 16 endpoints (6 public + 10 admin) | Mixed |
cluster-stats | GET /admin/cluster-stats | Admin |
payment-links | GET /admin/payment-links | Admin |
feed-status | GET /admin/feed-status | Admin |
deploy-ecs | Docker + ECR + ECS (AWS CLI, not HTTP) | AWS credentials |
deploy-site | S3 + CloudFront (AWS CLI, not HTTP) | AWS credentials |
profiles | GET /admin/profiles | Admin |
config | GET /admin/config | Admin |