Architect

From rajitsaha/100xprism · View interactive version

Architect is an AI agent skill from the GitHub repository rajitsaha/100xprism. Architectural decision advisor for cloud, data, and SaaS distributed systems. Use when the user asks "should we use X or Y", weighs a tradeoff, or needs a decision matrix, scaling analysis, cost-at-scale review, data-tier design, multi-tenancy model, or API/resilience guidance. For full technical bl

How to use this skill

Skill file

Architect — Cloud, Data & SaaS Distributed Architecture Advisor

Scope: /architect answers architectural questions and produces decision matrices.

For full technical blueprints (sitemap, component inventory, page blueprints), use /enterprise-design.

Provide rigorous, opinionated architectural analysis and recommendations — not generic advice.

How to use


Step 1 — Load project context

Detect the stack first (canonical block — source: _lib/reference.md), then read the instruction file. Do not assume GCP/Firebase/npm — branch on what is detected.

PROJECT_ROOT=$(git rev-parse --show-toplevel); cd "$PROJECT_ROOT"
INSTRUCTION_FILE=$(for f in CLAUDE.md AGENTS.md .cursorrules; do [ -f "$PROJECT_ROOT/$f" ] && echo "$PROJECT_ROOT/$f" && break; done)

# Cloud provider: gcp | aws | azure | vercel | "" (config / IaC / instruction-file grep — no network)
CLOUD=""
if command -v gcloud >/dev/null 2>&1 && gcloud config get-value project >/dev/null 2>&1; then CLOUD=gcp; fi
[ -z "$CLOUD" ] && ls "$PROJECT_ROOT"/.vercel >/dev/null 2>&1 && CLOUD=vercel
[ -z "$CLOUD" ] && grep -rqiE "aws_|amazonaws|cdk\.json|::aws" "$PROJECT_ROOT"/terraform "$PROJECT_ROOT"/infra "$PROJECT_ROOT"/cdk.json 2>/dev/null && CLOUD=aws
[ -z "$CLOUD" ] && grep -rqiE "azurerm|azure-|microsoft\.web" "$PROJECT_ROOT"/terraform "$PROJECT_ROOT"/infra 2>/dev/null && CLOUD=azure
if [ -z "$CLOUD" ] && [ -n "$INSTRUCTION_FILE" ]; then
  grep -qiE "gcloud|Cloud Run|Cloud SQL|Firebase|GCP_PROJECT" "$INSTRUCTION_FILE" && CLOUD=gcp
  [ -z "$CLOUD" ] && grep -qiE "\baws\b|lambda|dynamodb|ecs|fargate" "$INSTRUCTION_FILE" && CLOUD=aws
fi
echo "cloud=${CLOUD:-unknown}"
[ -n "$INSTRUCTION_FILE" ] && head -100 "$INSTRUCTION_FILE" 2>/dev/null

Identify (parentheticals are GCP examples with AWS analogs — map to the detected $CLOUD):

If $CLOUD is unknown, ask the user which provider they target before giving provider-specific advice.


Step 2 — Cloud Architecture Analysis

Examine the topic through the cloud infrastructure lens.

Bullets name GCP services as concrete examples — map each to the detected $CLOUD equivalent and use that vocabulary:

Cloud Run → ECS/Fargate, Lambda, App Runner (AWS) · Container Apps, App Service (Azure) · Vercel/Netlify functions ·

Cloud SQL → RDS/Aurora · Azure SQL · Neon/PlanetScale ·

Memorystore → ElastiCache · Azure Cache ·

Pub/Sub → SNS+SQS, EventBridge · Service Bus ·

Secret Manager → Secrets Manager/SSM · Key Vault.

If $CLOUD is unknown, present the analysis provider-neutrally.

Compute & Deployment

Networking & Security

Resilience & Observability

Cost Architecture


Step 3 — Data Architecture Analysis

Examine the topic through the data lens.

Storage Tier Design

Hot tier:   in-memory cache   — sessions, rate limits, LLM cache, real-time   (Memorystore / ElastiCache / Azure Cache)
Warm tier:  relational DB     — transactional data, user records, audit log   (Cloud SQL / RDS-Aurora / Azure SQL / Neon)
Cold tier:  analytics warehouse — analytics, exports, ML features             (BigQuery / Redshift / Snowflake)
Archive:    object store      — reports, backups, blobs                        (GCS / S3 / Azure Blob)

For the topic: which tier(s) are involved? Is data in the right tier? (Parenthetical names are per-provider examples.)

Schema & Query Design

Consistency & Transactions

Data Pipelines

Privacy & Compliance


Step 4 — SaaS / Distributed Systems Analysis

Examine the topic through the distributed systems lens.

Multi-Tenancy Model

| Model | Isolation | Cost | Complexity | When to use |

|---|---|---|---|---|

| Row-level (WHERE org_id = ?) | Low | Low | Low | < 10K tenants, low compliance requirements |

| Schema-per-tenant | Medium | Medium | Medium | Compliance requirements, moderate isolation |

| DB-per-tenant | High | High | High | Enterprise, strict data residency, > $1K/month per tenant |

Current model assessment and recommendation for the topic.

API Design

Async & Event-Driven Patterns

Resilience Patterns


Step 5 — Recommendations

For each dimension, structure as:

Current state: [brief assessment]

Recommendation: [specific, opinionated action]

Rationale: [why this over alternatives]

Tradeoffs: what you gain and what you give up

Risks: what can go wrong

Implementation path: incremental steps to get there


Step 6 — Decision Matrix (for architectural choices)

When comparing options:

| Criterion | Weight | Option A | Option B | Option C |

|---|---|---|---|---|

| Scalability | 25% | | | |

| Operational complexity | 20% | | | |

| Development speed | 20% | | | |

| Cost at scale | 15% | | | |

| Resilience | 10% | | | |

| Team expertise fit | 10% | | | |

| Weighted score | | | | |

Recommendation: [winner with clear reasoning]


Step 7 — Architecture Diagram

For significant proposals, produce a text-based topology diagram using the detected $CLOUD provider's service names. Example shape (GCP shown — substitute AWS / Azure / Vercel equivalents):

┌─────────────────────────────────────────────────────┐
│                    CLOUD TOPOLOGY                   │
├─────────────────────────────────────────────────────┤
│  [Static hosting]  ──→  [API service]               │
│                               │                     │
│              ┌────────────────┼──────────────┐      │
│              ↓                ↓              ↓      │
│  [Relational DB: Primary] [Cache]    [Message bus]  │
│              │                              │       │
│   [DB: Replica]                     [Worker service]│
│                                             │       │
│                                  [Analytics warehouse]│
└─────────────────────────────────────────────────────┘

Output format

=== Architecture Analysis: <topic> ===

CONTEXT
───────
[brief project context and scope of analysis]

VERDICT
───────
[one-sentence architectural recommendation]

CLOUD ARCHITECTURE
──────────────────
Current: [state]
Recommendation: [action]
Rationale: [why]
Risks: [what to watch for]

DATA ARCHITECTURE
─────────────────
Current: [state]
Recommendation: [action]
Rationale: [why]
Risks: [what to watch for]

SAAS / DISTRIBUTED SYSTEMS
───────────────────────────
Current: [state]
Recommendation: [action]
Rationale: [why]
Risks: [what to watch for]

DECISION MATRIX (if applicable)
────────────────────────────────
[table]

IMPLEMENTATION PATH
───────────────────
Immediate (days):   [step 1]
Short-term (weeks): [step 2]
Long-term (months): [step 3]

OPEN QUESTIONS
──────────────
[any assumptions that need validation before proceeding]
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.