100xprism 2.3.1
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.
- package/LICENSE +21 -0
- package/README.md +196 -0
- package/VERSION +1 -0
- package/adapters/antigravity.sh +14 -0
- package/adapters/claude-code.sh +160 -0
- package/adapters/codex.sh +13 -0
- package/adapters/copilot.sh +13 -0
- package/adapters/cursor.sh +13 -0
- package/adapters/gemini.sh +13 -0
- package/adapters/lib/__pycache__/modules.cpython-312.pyc +0 -0
- package/adapters/lib/modules.py +592 -0
- package/adapters/lib/shared.sh +83 -0
- package/adapters/lib/sync_plugins.py +113 -0
- package/adapters/windsurf.sh +15 -0
- package/bin/100xprism.js +29 -0
- package/get.sh +24 -0
- package/install-project.sh +82 -0
- package/install.sh +281 -0
- package/lib/adapters/windows.js +429 -0
- package/lib/bootstrap.js +33 -0
- package/lib/init.js +19 -0
- package/lib/install.js +18 -0
- package/lib/migrate.js +52 -0
- package/lib/platform.js +22 -0
- package/lib/update.js +29 -0
- package/modules/_lib/reference.md +77 -0
- package/modules/a11y-auditor/SKILL.md +151 -0
- package/modules/ab-test-setup/SKILL.md +266 -0
- package/modules/ab-test-setup/evals/evals.json +105 -0
- package/modules/ab-test-setup/references/sample-size-guide.md +263 -0
- package/modules/ab-test-setup/references/test-templates.md +277 -0
- package/modules/ad-creative/SKILL.md +362 -0
- package/modules/ad-creative/evals/evals.json +90 -0
- package/modules/ad-creative/references/generative-tools.md +637 -0
- package/modules/ad-creative/references/platform-specs.md +213 -0
- package/modules/ai-seo/SKILL.md +398 -0
- package/modules/ai-seo/evals/evals.json +90 -0
- package/modules/ai-seo/references/content-patterns.md +285 -0
- package/modules/ai-seo/references/platform-ranking-factors.md +152 -0
- package/modules/analytics-tracking/SKILL.md +309 -0
- package/modules/analytics-tracking/evals/evals.json +90 -0
- package/modules/analytics-tracking/references/event-library.md +260 -0
- package/modules/analytics-tracking/references/ga4-implementation.md +300 -0
- package/modules/analytics-tracking/references/gtm-implementation.md +390 -0
- package/modules/architect/SKILL.md +282 -0
- package/modules/branch/SKILL.md +105 -0
- package/modules/churn-prevention/SKILL.md +424 -0
- package/modules/churn-prevention/evals/evals.json +93 -0
- package/modules/churn-prevention/references/cancel-flow-patterns.md +316 -0
- package/modules/churn-prevention/references/dunning-playbook.md +408 -0
- package/modules/cloud-security/SKILL.md +240 -0
- package/modules/cold-email/SKILL.md +178 -0
- package/modules/cold-email/evals/evals.json +94 -0
- package/modules/cold-email/references/benchmarks.md +83 -0
- package/modules/cold-email/references/follow-up-sequences.md +81 -0
- package/modules/cold-email/references/frameworks.md +90 -0
- package/modules/cold-email/references/personalization.md +79 -0
- package/modules/cold-email/references/subject-lines.md +53 -0
- package/modules/commit/SKILL.md +195 -0
- package/modules/competitor-alternatives/SKILL.md +256 -0
- package/modules/competitor-alternatives/evals/evals.json +93 -0
- package/modules/competitor-alternatives/references/content-architecture.md +271 -0
- package/modules/competitor-alternatives/references/templates.md +223 -0
- package/modules/connect/SKILL.md +894 -0
- package/modules/content-strategy/SKILL.md +359 -0
- package/modules/content-strategy/evals/evals.json +90 -0
- package/modules/context-dump/SKILL.md +67 -0
- package/modules/copy-editing/SKILL.md +447 -0
- package/modules/copy-editing/evals/evals.json +89 -0
- package/modules/copy-editing/references/plain-english-alternatives.md +394 -0
- package/modules/copywriting/SKILL.md +271 -0
- package/modules/copywriting/evals/evals.json +111 -0
- package/modules/copywriting/references/cold-email-benchmarks.md +83 -0
- package/modules/copywriting/references/cold-email-follow-ups.md +81 -0
- package/modules/copywriting/references/cold-email-frameworks.md +90 -0
- package/modules/copywriting/references/cold-email-personalization.md +79 -0
- package/modules/copywriting/references/cold-email-subject-lines.md +53 -0
- package/modules/copywriting/references/copy-frameworks.md +344 -0
- package/modules/copywriting/references/email-copy-guidelines.md +113 -0
- package/modules/copywriting/references/email-types.md +515 -0
- package/modules/copywriting/references/natural-transitions.md +272 -0
- package/modules/copywriting/references/sequence-templates.md +168 -0
- package/modules/data-query/SKILL.md +58 -0
- package/modules/data-viz/SKILL.md +225 -0
- package/modules/db/SKILL.md +205 -0
- package/modules/db/db-engines/_router.md +24 -0
- package/modules/db/db-engines/athena.md +16 -0
- package/modules/db/db-engines/cloud-sql.md +16 -0
- package/modules/db/db-engines/databricks.md +14 -0
- package/modules/db/db-engines/oracle.md +14 -0
- package/modules/db/db-engines/postgres.md +15 -0
- package/modules/db/db-engines/presto.md +14 -0
- package/modules/db/db-engines/snowflake.md +14 -0
- package/modules/docs/SKILL.md +100 -0
- package/modules/email-sequence/SKILL.md +309 -0
- package/modules/email-sequence/evals/evals.json +93 -0
- package/modules/email-sequence/references/copy-guidelines.md +113 -0
- package/modules/email-sequence/references/email-types.md +515 -0
- package/modules/email-sequence/references/sequence-templates.md +168 -0
- package/modules/enterprise-design/SKILL.md +75 -0
- package/modules/eval/SKILL.md +105 -0
- package/modules/figma-translator/SKILL.md +49 -0
- package/modules/fix-bugs/SKILL.md +104 -0
- package/modules/form-cro/SKILL.md +429 -0
- package/modules/form-cro/evals/evals.json +90 -0
- package/modules/free-tool-strategy/SKILL.md +178 -0
- package/modules/free-tool-strategy/evals/evals.json +90 -0
- package/modules/free-tool-strategy/references/tool-types.md +217 -0
- package/modules/gate/SKILL.md +232 -0
- package/modules/grill-me/SKILL.md +59 -0
- package/modules/interaction-engineer/SKILL.md +49 -0
- package/modules/issue/SKILL.md +272 -0
- package/modules/launch/SKILL.md +345 -0
- package/modules/launch-strategy/SKILL.md +353 -0
- package/modules/launch-strategy/evals/evals.json +91 -0
- package/modules/lint/SKILL.md +126 -0
- package/modules/marketing-ideas/SKILL.md +167 -0
- package/modules/marketing-ideas/evals/evals.json +90 -0
- package/modules/marketing-ideas/references/ideas-by-category.md +366 -0
- package/modules/marketing-psychology/SKILL.md +455 -0
- package/modules/marketing-psychology/evals/evals.json +88 -0
- package/modules/motion-designer/SKILL.md +214 -0
- package/modules/onboarding-cro/SKILL.md +220 -0
- package/modules/onboarding-cro/evals/evals.json +92 -0
- package/modules/onboarding-cro/references/experiments.md +258 -0
- package/modules/orchestrate/SKILL.md +77 -0
- package/modules/page-cro/SKILL.md +182 -0
- package/modules/page-cro/evals/evals.json +111 -0
- package/modules/page-cro/references/experiments.md +248 -0
- package/modules/page-cro/references/paywall-experiments.md +164 -0
- package/modules/paid-ads/SKILL.md +315 -0
- package/modules/paid-ads/evals/evals.json +90 -0
- package/modules/paid-ads/references/ad-copy-templates.md +207 -0
- package/modules/paid-ads/references/audience-targeting.md +243 -0
- package/modules/paid-ads/references/platform-setup-checklists.md +277 -0
- package/modules/paywall-upgrade-cro/SKILL.md +227 -0
- package/modules/paywall-upgrade-cro/evals/evals.json +93 -0
- package/modules/paywall-upgrade-cro/references/experiments.md +164 -0
- package/modules/popup-cro/SKILL.md +453 -0
- package/modules/popup-cro/evals/evals.json +94 -0
- package/modules/pr/SKILL.md +203 -0
- package/modules/pricing-strategy/SKILL.md +231 -0
- package/modules/pricing-strategy/evals/evals.json +90 -0
- package/modules/pricing-strategy/references/research-methods.md +152 -0
- package/modules/pricing-strategy/references/tier-structure.md +232 -0
- package/modules/product-marketing-context/SKILL.md +241 -0
- package/modules/product-marketing-context/evals/evals.json +85 -0
- package/modules/programmatic-seo/SKILL.md +238 -0
- package/modules/programmatic-seo/evals/evals.json +94 -0
- package/modules/programmatic-seo/references/playbooks.md +308 -0
- package/modules/push/SKILL.md +202 -0
- package/modules/referral-program/SKILL.md +255 -0
- package/modules/referral-program/evals/evals.json +89 -0
- package/modules/referral-program/references/affiliate-programs.md +164 -0
- package/modules/referral-program/references/program-examples.md +143 -0
- package/modules/release/SKILL.md +293 -0
- package/modules/revops/SKILL.md +343 -0
- package/modules/revops/evals/evals.json +91 -0
- package/modules/revops/references/automation-playbooks.md +290 -0
- package/modules/revops/references/lifecycle-definitions.md +278 -0
- package/modules/revops/references/routing-rules.md +203 -0
- package/modules/revops/references/scoring-models.md +247 -0
- package/modules/sales-enablement/SKILL.md +349 -0
- package/modules/sales-enablement/evals/evals.json +91 -0
- package/modules/sales-enablement/references/deck-frameworks.md +263 -0
- package/modules/sales-enablement/references/demo-scripts.md +355 -0
- package/modules/sales-enablement/references/objection-library.md +270 -0
- package/modules/sales-enablement/references/one-pager-templates.md +208 -0
- package/modules/schema-markup/SKILL.md +179 -0
- package/modules/schema-markup/evals/evals.json +87 -0
- package/modules/schema-markup/references/schema-examples.md +398 -0
- package/modules/security/SKILL.md +138 -0
- package/modules/seo-audit/SKILL.md +412 -0
- package/modules/seo-audit/evals/evals.json +136 -0
- package/modules/seo-audit/references/ai-writing-detection.md +200 -0
- package/modules/seo-audit/references/content-patterns.md +285 -0
- package/modules/seo-audit/references/platform-ranking-factors.md +152 -0
- package/modules/signup-flow-cro/SKILL.md +359 -0
- package/modules/signup-flow-cro/evals/evals.json +88 -0
- package/modules/site-architecture/SKILL.md +357 -0
- package/modules/site-architecture/evals/evals.json +88 -0
- package/modules/site-architecture/references/mermaid-templates.md +216 -0
- package/modules/site-architecture/references/navigation-patterns.md +305 -0
- package/modules/site-architecture/references/site-type-templates.md +293 -0
- package/modules/social-content/SKILL.md +278 -0
- package/modules/social-content/evals/evals.json +92 -0
- package/modules/social-content/references/platforms.md +170 -0
- package/modules/social-content/references/post-templates.md +177 -0
- package/modules/social-content/references/reverse-engineering.md +195 -0
- package/modules/spec/SKILL.md +81 -0
- package/modules/subagents/SKILL.md +123 -0
- package/modules/techdebt/SKILL.md +71 -0
- package/modules/terminal-setup/SKILL.md +49 -0
- package/modules/test/SKILL.md +493 -0
- package/modules/test/references/e2e-patterns.md +294 -0
- package/modules/update-claude-md/SKILL.md +52 -0
- package/modules/visual-system-architect/SKILL.md +53 -0
- package/package.json +44 -0
- package/plugins/plugins.json +43 -0
- package/shell/aliases.sh +24 -0
- package/shell/check-update.sh +212 -0
- package/templates/.env.example +199 -0
- package/templates/docker-compose.md +46 -0
- package/templates/node-frontend.md +56 -0
- package/templates/node-fullstack.md +59 -0
- package/templates/python-api.md +57 -0
- package/update.sh +231 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architect
|
|
3
|
+
description: 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 blueprints, use enterprise-design.
|
|
4
|
+
category: docs
|
|
5
|
+
tier: on-demand
|
|
6
|
+
slash_command: /architect
|
|
7
|
+
model: opus
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Architect — Cloud, Data & SaaS Distributed Architecture Advisor
|
|
11
|
+
|
|
12
|
+
> **Scope:** `/architect` answers architectural questions and produces decision matrices.
|
|
13
|
+
> For full technical blueprints (sitemap, component inventory, page blueprints), use `/enterprise-design`.
|
|
14
|
+
|
|
15
|
+
You are a principal architect with deep expertise in cloud infrastructure (GCP/AWS), data architecture, and SaaS distributed systems. Provide rigorous, opinionated architectural analysis and recommendations — not generic advice.
|
|
16
|
+
|
|
17
|
+
## How to use
|
|
18
|
+
- `/architect <question or decision>` — get architectural advice on a specific topic
|
|
19
|
+
- `/architect review` — full architecture review of the current project
|
|
20
|
+
- `/architect scale <feature>` — analyze scaling implications of a feature
|
|
21
|
+
- `/architect data <topic>` — deep-dive data architecture analysis
|
|
22
|
+
- `/architect cloud <topic>` — cloud infrastructure analysis and recommendations
|
|
23
|
+
- `/architect compare <option A> vs <option B>` — structured decision matrix
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Step 1 — Load project context
|
|
28
|
+
|
|
29
|
+
Detect the stack first (canonical block — source: `_lib/reference.md`), then read the
|
|
30
|
+
instruction file. **Do not assume GCP/Firebase/npm** — branch on what is detected.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
PROJECT_ROOT=$(git rev-parse --show-toplevel); cd "$PROJECT_ROOT"
|
|
34
|
+
INSTRUCTION_FILE=$(for f in CLAUDE.md AGENTS.md .cursorrules .windsurfrules .github/copilot-instructions.md GEMINI.md; do [ -f "$PROJECT_ROOT/$f" ] && echo "$PROJECT_ROOT/$f" && break; done)
|
|
35
|
+
|
|
36
|
+
# Cloud provider: gcp | aws | azure | vercel | "" (config / IaC / instruction-file grep — no network)
|
|
37
|
+
CLOUD=""
|
|
38
|
+
if command -v gcloud >/dev/null 2>&1 && gcloud config get-value project >/dev/null 2>&1; then CLOUD=gcp; fi
|
|
39
|
+
[ -z "$CLOUD" ] && ls "$PROJECT_ROOT"/.vercel >/dev/null 2>&1 && CLOUD=vercel
|
|
40
|
+
[ -z "$CLOUD" ] && grep -rqiE "aws_|amazonaws|cdk\.json|::aws" "$PROJECT_ROOT"/terraform "$PROJECT_ROOT"/infra "$PROJECT_ROOT"/cdk.json 2>/dev/null && CLOUD=aws
|
|
41
|
+
[ -z "$CLOUD" ] && grep -rqiE "azurerm|azure-|microsoft\.web" "$PROJECT_ROOT"/terraform "$PROJECT_ROOT"/infra 2>/dev/null && CLOUD=azure
|
|
42
|
+
if [ -z "$CLOUD" ] && [ -n "$INSTRUCTION_FILE" ]; then
|
|
43
|
+
grep -qiE "gcloud|Cloud Run|Cloud SQL|Firebase|GCP_PROJECT" "$INSTRUCTION_FILE" && CLOUD=gcp
|
|
44
|
+
[ -z "$CLOUD" ] && grep -qiE "\baws\b|lambda|dynamodb|ecs|fargate" "$INSTRUCTION_FILE" && CLOUD=aws
|
|
45
|
+
fi
|
|
46
|
+
echo "cloud=${CLOUD:-unknown}"
|
|
47
|
+
[ -n "$INSTRUCTION_FILE" ] && head -100 "$INSTRUCTION_FILE" 2>/dev/null
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Identify (map each to the **detected** provider's equivalents — the parenthetical names a
|
|
51
|
+
GCP example and its AWS analog; substitute for whatever `$CLOUD` is):
|
|
52
|
+
- Compute & deployment model (Cloud Run / ECS-Fargate-Lambda / Vercel functions), regions
|
|
53
|
+
- Data storage tiers (Cloud SQL / RDS-Aurora; Memorystore / ElastiCache; BigQuery / Redshift; GCS / S3)
|
|
54
|
+
- API and service topology (managed-container services, async workers, webhooks)
|
|
55
|
+
- Authentication model (Firebase Auth / Cognito / Auth0, JWT, OAuth)
|
|
56
|
+
- Current scale characteristics (users, RPM, data volume — from the instruction file or codebase)
|
|
57
|
+
- Known bottlenecks or constraints
|
|
58
|
+
|
|
59
|
+
If `$CLOUD` is unknown, ask the user which provider they target before giving
|
|
60
|
+
provider-specific advice.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Step 2 — Cloud Architecture Analysis
|
|
65
|
+
|
|
66
|
+
Examine the topic through the cloud infrastructure lens.
|
|
67
|
+
|
|
68
|
+
> The bullets below name **GCP services as concrete examples**. Map each to the detected
|
|
69
|
+
> `$CLOUD` provider's equivalent and use that vocabulary in your analysis:
|
|
70
|
+
> Cloud Run → ECS/Fargate, Lambda, App Runner (AWS) · Container Apps, App Service (Azure) · Vercel/Netlify functions ·
|
|
71
|
+
> Cloud SQL → RDS/Aurora · Azure SQL · Neon/PlanetScale ·
|
|
72
|
+
> Memorystore → ElastiCache · Azure Cache ·
|
|
73
|
+
> Pub/Sub → SNS+SQS, EventBridge · Service Bus ·
|
|
74
|
+
> Secret Manager → Secrets Manager/SSM · Key Vault.
|
|
75
|
+
> If `$CLOUD` is unknown, present the analysis provider-neutrally.
|
|
76
|
+
|
|
77
|
+
### Compute & Deployment
|
|
78
|
+
- Is Cloud Run the right compute model? Consider: request duration, CPU burstiness, cold start sensitivity, concurrency limits
|
|
79
|
+
- Scaling policy: min/max instances, concurrency per instance, CPU allocation (always-on vs throttled)
|
|
80
|
+
- Multi-region: is active-active or active-passive needed? What's the RTO/RPO?
|
|
81
|
+
- CI/CD: deployment pipeline resilience, blue/green vs rolling vs canary
|
|
82
|
+
|
|
83
|
+
### Networking & Security
|
|
84
|
+
- VPC: private connectivity between Cloud Run and Cloud SQL via Private Service Connect?
|
|
85
|
+
- Load balancing: Cloud Armor (WAF/DDoS), global vs regional load balancer
|
|
86
|
+
- Egress: Cloud NAT for predictable outbound IPs (needed for third-party IP allowlisting)
|
|
87
|
+
- Secret Manager: all credentials there? No secrets in env vars or Docker images?
|
|
88
|
+
- IAM: least privilege service accounts, Workload Identity Federation (no SA key files)
|
|
89
|
+
|
|
90
|
+
### Resilience & Observability
|
|
91
|
+
- Health checks: liveness vs readiness, startup probes
|
|
92
|
+
- Circuit breakers: what happens when Cloud SQL, Redis, or a third-party API is down?
|
|
93
|
+
- Retry strategy: exponential backoff with jitter, dead letter queues for Pub/Sub
|
|
94
|
+
- Alerting: SLO/SLI definition, error budget, latency p50/p95/p99 targets
|
|
95
|
+
- Distributed tracing: OpenTelemetry trace propagation across services
|
|
96
|
+
|
|
97
|
+
### Cost Architecture
|
|
98
|
+
- Cost per request/user at current and projected scale
|
|
99
|
+
- Cost cliffs: where does the bill step-change sharply?
|
|
100
|
+
- Optimization levers: Cloud Run min instances (cold start vs idle cost), Redis memory tier, Cloud SQL tier
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Step 3 — Data Architecture Analysis
|
|
105
|
+
|
|
106
|
+
Examine the topic through the data lens.
|
|
107
|
+
|
|
108
|
+
### Storage Tier Design
|
|
109
|
+
```
|
|
110
|
+
Hot tier: in-memory cache — sessions, rate limits, LLM cache, real-time (Memorystore / ElastiCache / Azure Cache)
|
|
111
|
+
Warm tier: relational DB — transactional data, user records, audit log (Cloud SQL / RDS-Aurora / Azure SQL / Neon)
|
|
112
|
+
Cold tier: analytics warehouse — analytics, exports, ML features (BigQuery / Redshift / Snowflake)
|
|
113
|
+
Archive: object store — reports, backups, blobs (GCS / S3 / Azure Blob)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
For the topic: which tier(s) are involved? Is data in the right tier? (Names in parens are
|
|
117
|
+
per-provider examples — use the `$CLOUD` column.)
|
|
118
|
+
|
|
119
|
+
### Schema & Query Design
|
|
120
|
+
- Table design: normalization level appropriate for access patterns?
|
|
121
|
+
- Indexing: composite indexes for common WHERE + ORDER BY patterns?
|
|
122
|
+
- N+1 queries: JOIN vs separate queries vs batching?
|
|
123
|
+
- Pagination: cursor-based (stable) vs offset (drifting)? Performance at scale?
|
|
124
|
+
- Full-text search: PostgreSQL `tsvector` vs dedicated search (Typesense, Algolia)?
|
|
125
|
+
|
|
126
|
+
### Consistency & Transactions
|
|
127
|
+
- ACID boundaries: what must be in a single transaction?
|
|
128
|
+
- Eventual consistency: where is it safe, where is it dangerous?
|
|
129
|
+
- Optimistic vs pessimistic locking for concurrent updates?
|
|
130
|
+
- Idempotency keys: for payment, email, or Pub/Sub operations?
|
|
131
|
+
|
|
132
|
+
### Data Pipelines
|
|
133
|
+
- Pub/Sub message schema: forward-compatible (add fields, never remove/rename)?
|
|
134
|
+
- At-least-once delivery: are consumers idempotent?
|
|
135
|
+
- Backpressure: what happens when a consumer falls behind?
|
|
136
|
+
- BigQuery: streaming inserts vs batch loads? Partition/cluster strategy?
|
|
137
|
+
|
|
138
|
+
### Privacy & Compliance
|
|
139
|
+
- PII fields: identified, encrypted at field level or DB level?
|
|
140
|
+
- Data retention: TTL policies defined and enforced?
|
|
141
|
+
- Right to deletion: cascade deletes vs soft deletes with purge job?
|
|
142
|
+
- Audit trail: immutable log of all user data modifications?
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Step 4 — SaaS / Distributed Systems Analysis
|
|
147
|
+
|
|
148
|
+
Examine the topic through the distributed systems lens.
|
|
149
|
+
|
|
150
|
+
### Multi-Tenancy Model
|
|
151
|
+
| Model | Isolation | Cost | Complexity | When to use |
|
|
152
|
+
|---|---|---|---|---|
|
|
153
|
+
| Row-level (`WHERE org_id = ?`) | Low | Low | Low | < 10K tenants, low compliance requirements |
|
|
154
|
+
| Schema-per-tenant | Medium | Medium | Medium | Compliance requirements, moderate isolation |
|
|
155
|
+
| DB-per-tenant | High | High | High | Enterprise, strict data residency, > $1K/month per tenant |
|
|
156
|
+
|
|
157
|
+
Current model assessment and recommendation for the topic.
|
|
158
|
+
|
|
159
|
+
### API Design
|
|
160
|
+
- REST conventions: resource naming, HTTP verbs, status codes, envelope format
|
|
161
|
+
- Versioning strategy: URI (`/v2/`) vs header (`API-Version: 2`)? Breaking vs additive changes?
|
|
162
|
+
- Rate limiting: per-user, per-tier, per-endpoint? Token bucket vs sliding window?
|
|
163
|
+
- Pagination: cursor vs offset, page size limits, total count trade-off
|
|
164
|
+
- Webhooks: retry policy, signature verification, idempotency, event schema versioning
|
|
165
|
+
|
|
166
|
+
### Async & Event-Driven Patterns
|
|
167
|
+
- Command vs event: commands are directed, events are broadcast — use the right one
|
|
168
|
+
- Saga pattern for distributed transactions (e.g., signup → create subscription → send email)
|
|
169
|
+
- Outbox pattern: write event to DB in same transaction, then publish to Pub/Sub
|
|
170
|
+
- Dead letter queue: maximum retries, alerting on DLQ messages
|
|
171
|
+
|
|
172
|
+
### Resilience Patterns
|
|
173
|
+
- Bulkhead: isolate failures (slowness in one dependency should not block unrelated requests)
|
|
174
|
+
- Circuit breaker: open after N failures, half-open probe, close on success
|
|
175
|
+
- Graceful degradation: what is the fallback when AI agents are slow/down?
|
|
176
|
+
- Chaos engineering: have you tested: Cloud SQL restart, Redis flush, Pub/Sub delay?
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Step 5 — Recommendations
|
|
181
|
+
|
|
182
|
+
For each dimension, structure as:
|
|
183
|
+
|
|
184
|
+
**Current state:** [brief assessment]
|
|
185
|
+
**Recommendation:** [specific, opinionated action]
|
|
186
|
+
**Rationale:** [why this over alternatives]
|
|
187
|
+
**Tradeoffs:** what you gain and what you give up
|
|
188
|
+
**Risks:** what can go wrong
|
|
189
|
+
**Implementation path:** incremental steps to get there
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Step 6 — Decision Matrix (for architectural choices)
|
|
194
|
+
|
|
195
|
+
When comparing options:
|
|
196
|
+
|
|
197
|
+
| Criterion | Weight | Option A | Option B | Option C |
|
|
198
|
+
|---|---|---|---|---|
|
|
199
|
+
| Scalability | 25% | | | |
|
|
200
|
+
| Operational complexity | 20% | | | |
|
|
201
|
+
| Development speed | 20% | | | |
|
|
202
|
+
| Cost at scale | 15% | | | |
|
|
203
|
+
| Resilience | 10% | | | |
|
|
204
|
+
| Team expertise fit | 10% | | | |
|
|
205
|
+
| **Weighted score** | | | | |
|
|
206
|
+
|
|
207
|
+
**Recommendation:** [winner with clear reasoning]
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Step 7 — Architecture Diagram
|
|
212
|
+
|
|
213
|
+
For significant proposals, produce a text-based topology diagram using the detected
|
|
214
|
+
`$CLOUD` provider's service names. Example shape (GCP names shown — substitute the AWS /
|
|
215
|
+
Azure / Vercel equivalents for the actual stack):
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
┌─────────────────────────────────────────────────────┐
|
|
219
|
+
│ CLOUD TOPOLOGY │
|
|
220
|
+
├─────────────────────────────────────────────────────┤
|
|
221
|
+
│ [Static hosting] ──→ [API service] │
|
|
222
|
+
│ │ │
|
|
223
|
+
│ ┌────────────────┼──────────────┐ │
|
|
224
|
+
│ ↓ ↓ ↓ │
|
|
225
|
+
│ [Relational DB: Primary] [Cache] [Message bus] │
|
|
226
|
+
│ │ │ │
|
|
227
|
+
│ [DB: Replica] [Worker service]│
|
|
228
|
+
│ │ │
|
|
229
|
+
│ [Analytics warehouse]│
|
|
230
|
+
└─────────────────────────────────────────────────────┘
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Output format
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
=== Architecture Analysis: <topic> ===
|
|
239
|
+
|
|
240
|
+
CONTEXT
|
|
241
|
+
───────
|
|
242
|
+
[brief project context and scope of analysis]
|
|
243
|
+
|
|
244
|
+
VERDICT
|
|
245
|
+
───────
|
|
246
|
+
[one-sentence architectural recommendation]
|
|
247
|
+
|
|
248
|
+
CLOUD ARCHITECTURE
|
|
249
|
+
──────────────────
|
|
250
|
+
Current: [state]
|
|
251
|
+
Recommendation: [action]
|
|
252
|
+
Rationale: [why]
|
|
253
|
+
Risks: [what to watch for]
|
|
254
|
+
|
|
255
|
+
DATA ARCHITECTURE
|
|
256
|
+
─────────────────
|
|
257
|
+
Current: [state]
|
|
258
|
+
Recommendation: [action]
|
|
259
|
+
Rationale: [why]
|
|
260
|
+
Risks: [what to watch for]
|
|
261
|
+
|
|
262
|
+
SAAS / DISTRIBUTED SYSTEMS
|
|
263
|
+
───────────────────────────
|
|
264
|
+
Current: [state]
|
|
265
|
+
Recommendation: [action]
|
|
266
|
+
Rationale: [why]
|
|
267
|
+
Risks: [what to watch for]
|
|
268
|
+
|
|
269
|
+
DECISION MATRIX (if applicable)
|
|
270
|
+
────────────────────────────────
|
|
271
|
+
[table]
|
|
272
|
+
|
|
273
|
+
IMPLEMENTATION PATH
|
|
274
|
+
───────────────────
|
|
275
|
+
Immediate (days): [step 1]
|
|
276
|
+
Short-term (weeks): [step 2]
|
|
277
|
+
Long-term (months): [step 3]
|
|
278
|
+
|
|
279
|
+
OPEN QUESTIONS
|
|
280
|
+
──────────────
|
|
281
|
+
[any assumptions that need validation before proceeding]
|
|
282
|
+
```
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: branch
|
|
3
|
+
description: Create a feature branch from the default branch with a descriptive, conventional name.
|
|
4
|
+
category: lifecycle
|
|
5
|
+
tier: core
|
|
6
|
+
slash_command: /branch
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Branch — Create Feature Branch
|
|
10
|
+
|
|
11
|
+
Create a feature branch from the default branch with a descriptive, conventional name.
|
|
12
|
+
|
|
13
|
+
## Do NOT ask for permission. Create the branch and push it.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Step 1 — Detect default branch
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
PROJECT_ROOT=$(git rev-parse --show-toplevel)
|
|
21
|
+
cd "$PROJECT_ROOT"
|
|
22
|
+
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
|
|
23
|
+
DEFAULT_BRANCH="${DEFAULT_BRANCH:-main}"
|
|
24
|
+
CURRENT_BRANCH=$(git branch --show-current)
|
|
25
|
+
echo "Default branch: $DEFAULT_BRANCH"
|
|
26
|
+
echo "Current branch: $CURRENT_BRANCH"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
If not on the default branch, warn:
|
|
30
|
+
```
|
|
31
|
+
⚠️ Currently on '$CURRENT_BRANCH', not '$DEFAULT_BRANCH'.
|
|
32
|
+
Creating branch from current HEAD. Proceed only if intentional.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Step 2 — Pull latest
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
git fetch origin
|
|
41
|
+
git checkout "$DEFAULT_BRANCH"
|
|
42
|
+
git pull origin "$DEFAULT_BRANCH"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Step 3 — Generate branch name
|
|
48
|
+
|
|
49
|
+
Derive a branch name from the task description using conventional prefixes:
|
|
50
|
+
|
|
51
|
+
| Prefix | Use when |
|
|
52
|
+
|:-------|:---------|
|
|
53
|
+
| `feat/` | New feature |
|
|
54
|
+
| `fix/` | Bug fix |
|
|
55
|
+
| `chore/` | Maintenance, deps, config |
|
|
56
|
+
| `refactor/` | Code restructuring |
|
|
57
|
+
| `docs/` | Documentation only |
|
|
58
|
+
| `test/` | Test additions or fixes |
|
|
59
|
+
|
|
60
|
+
**Naming rules:**
|
|
61
|
+
- Lowercase, hyphen-separated: `feat/add-user-auth`
|
|
62
|
+
- Max 50 characters for the slug portion
|
|
63
|
+
- No special characters beyond hyphens
|
|
64
|
+
- Derived from the task description or user input
|
|
65
|
+
|
|
66
|
+
**Examples:**
|
|
67
|
+
```
|
|
68
|
+
"Add user authentication" → feat/add-user-auth
|
|
69
|
+
"Fix login timeout bug" → fix/login-timeout
|
|
70
|
+
"Update dependencies" → chore/update-deps
|
|
71
|
+
"Refactor payment module" → refactor/payment-module
|
|
72
|
+
"Add API documentation" → docs/api-docs
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Step 4 — Create and push branch
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
BRANCH_NAME="<prefix>/<slug>"
|
|
81
|
+
git checkout -b "$BRANCH_NAME"
|
|
82
|
+
git push -u origin "$BRANCH_NAME"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
If the branch already exists locally or remotely:
|
|
86
|
+
```bash
|
|
87
|
+
git checkout "$BRANCH_NAME"
|
|
88
|
+
git pull origin "$BRANCH_NAME" 2>/dev/null || true
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Output
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
╔══════════════════════════════════════════════════════╗
|
|
97
|
+
║ BRANCH CREATED ║
|
|
98
|
+
╠══════════════════════════════════════════════════════╣
|
|
99
|
+
║ Branch: feat/add-user-auth ║
|
|
100
|
+
║ Base: main (up to date) ║
|
|
101
|
+
║ Remote: origin/feat/add-user-auth ✅ ║
|
|
102
|
+
╠══════════════════════════════════════════════════════╣
|
|
103
|
+
║ STATUS: Ready to work ║
|
|
104
|
+
╚══════════════════════════════════════════════════════╝
|
|
105
|
+
```
|