mindforge-cc 10.0.2 → 10.7.0
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/.mindforge/config.json +73 -2
- package/.mindforge/engine/autonomous/cross-iteration-bridge.md +96 -0
- package/.mindforge/engine/cost-tracking/budget-enforcer.md +68 -0
- package/.mindforge/engine/cost-tracking/router.md +58 -0
- package/.mindforge/engine/cost-tracking/token-ledger.md +77 -0
- package/.mindforge/engine/council/council-protocol.md +96 -0
- package/.mindforge/engine/council/council-templates.md +85 -0
- package/.mindforge/engine/council/synthesis-engine.md +71 -0
- package/.mindforge/engine/cross-model-eval.md +74 -0
- package/.mindforge/engine/instincts/capture-engine.md +63 -0
- package/.mindforge/engine/instincts/instinct-schema.md +76 -0
- package/.mindforge/engine/instincts/promotion-engine.md +77 -0
- package/.mindforge/engine/proactive/signal-detector.md +60 -0
- package/.mindforge/engine/proactive/suggestion-engine.md +100 -0
- package/.mindforge/engine/skills/composition.md +83 -0
- package/.mindforge/engine/skills/loader.md +16 -0
- package/.mindforge/personas/agent-architect.md +57 -0
- package/.mindforge/personas/agent-evaluator.md +162 -0
- package/.mindforge/personas/agent-memory-designer.md +157 -0
- package/.mindforge/personas/agent-ops-engineer.md +120 -0
- package/.mindforge/personas/agent-orchestrator.md +112 -0
- package/.mindforge/personas/ai-economist.md +57 -0
- package/.mindforge/personas/ai-safety-engineer.md +57 -0
- package/.mindforge/personas/analytics-engineer.md +57 -0
- package/.mindforge/personas/anti-pattern-hunter.md +61 -0
- package/.mindforge/personas/api-gateway-designer.md +132 -0
- package/.mindforge/personas/auth-engineer.md +112 -0
- package/.mindforge/personas/build-engineer.md +57 -0
- package/.mindforge/personas/business-analyst.md +56 -0
- package/.mindforge/personas/cache-architect.md +100 -0
- package/.mindforge/personas/causal-scientist.md +57 -0
- package/.mindforge/personas/cdn-architect.md +118 -0
- package/.mindforge/personas/change-agent.md +104 -0
- package/.mindforge/personas/code-narrator.md +52 -0
- package/.mindforge/personas/codegen-specialist.md +68 -0
- package/.mindforge/personas/communication-architect.md +102 -0
- package/.mindforge/personas/compliance-engineer.md +96 -0
- package/.mindforge/personas/consensus-engineer.md +116 -0
- package/.mindforge/personas/contract-tester.md +60 -192
- package/.mindforge/personas/cost-optimizer.md +71 -0
- package/.mindforge/personas/council-architect.md +66 -0
- package/.mindforge/personas/council-critic.md +67 -0
- package/.mindforge/personas/council-pragmatist.md +71 -0
- package/.mindforge/personas/council-skeptic.md +73 -0
- package/.mindforge/personas/data-architect.md +108 -0
- package/.mindforge/personas/data-mesh-architect.md +57 -0
- package/.mindforge/personas/data-pipeline-architect.md +120 -0
- package/.mindforge/personas/de-sloppifier.md +60 -0
- package/.mindforge/personas/debt-manager.md +66 -0
- package/.mindforge/personas/decision-architect.md +82 -51
- package/.mindforge/personas/deployment-captain.md +74 -0
- package/.mindforge/personas/design-system-lead.md +112 -0
- package/.mindforge/personas/dmux-orchestrator.md +75 -0
- package/.mindforge/personas/doc-auditor.md +84 -0
- package/.mindforge/personas/dx-engineer.md +96 -0
- package/.mindforge/personas/ecommerce-engineer.md +57 -0
- package/.mindforge/personas/edge-engineer.md +94 -0
- package/.mindforge/personas/edtech-architect.md +106 -0
- package/.mindforge/personas/embedding-architect.md +57 -0
- package/.mindforge/personas/environment-engineer.md +57 -0
- package/.mindforge/personas/eval-judge.md +55 -0
- package/.mindforge/personas/event-architect.md +102 -0
- package/.mindforge/personas/experiment-designer.md +138 -0
- package/.mindforge/personas/feature-store-engineer.md +57 -0
- package/.mindforge/personas/finops-analyst.md +66 -0
- package/.mindforge/personas/fintech-architect.md +57 -0
- package/.mindforge/personas/flutter-engineer.md +104 -0
- package/.mindforge/personas/gaming-engineer.md +57 -0
- package/.mindforge/personas/graphql-designer.md +73 -0
- package/.mindforge/personas/healthcare-engineer.md +57 -0
- package/.mindforge/personas/hiring-strategist.md +105 -0
- package/.mindforge/personas/hitl-architect.md +165 -0
- package/.mindforge/personas/i18n-architect.md +69 -0
- package/.mindforge/personas/instinct-curator.md +83 -0
- package/.mindforge/personas/iot-architect.md +105 -0
- package/.mindforge/personas/knowledge-curator.md +139 -0
- package/.mindforge/personas/knowledge-engineer.md +57 -0
- package/.mindforge/personas/lakehouse-architect.md +57 -0
- package/.mindforge/personas/llm-orchestrator.md +57 -0
- package/.mindforge/personas/logistics-architect.md +106 -0
- package/.mindforge/personas/market-analyst.md +53 -0
- package/.mindforge/personas/marketplace-engineer.md +105 -0
- package/.mindforge/personas/mcp-designer.md +54 -0
- package/.mindforge/personas/meeting-designer.md +104 -0
- package/.mindforge/personas/mentorship-lead.md +106 -0
- package/.mindforge/personas/migration-architect.md +57 -0
- package/.mindforge/personas/ml-ops-engineer.md +101 -0
- package/.mindforge/personas/mobile-architect.md +105 -0
- package/.mindforge/personas/mobile-security-engineer.md +106 -0
- package/.mindforge/personas/multi-model-bridge.md +86 -0
- package/.mindforge/personas/multi-tenancy-architect.md +71 -0
- package/.mindforge/personas/multimodal-engineer.md +57 -0
- package/.mindforge/personas/offline-specialist.md +105 -0
- package/.mindforge/personas/onboarding-navigator.md +63 -0
- package/.mindforge/personas/payments-engineer.md +135 -0
- package/.mindforge/personas/pipeline-engineer.md +115 -0
- package/.mindforge/personas/platform-engineer.md +97 -0
- package/.mindforge/personas/platform-lead.md +57 -0
- package/.mindforge/personas/privacy-engineer.md +57 -0
- package/.mindforge/personas/product-owner.md +56 -0
- package/.mindforge/personas/productivity-analyst.md +57 -0
- package/.mindforge/personas/prompt-architect.md +101 -0
- package/.mindforge/personas/proofreader.md +53 -0
- package/.mindforge/personas/pwa-architect.md +105 -0
- package/.mindforge/personas/quality-scorer.md +63 -0
- package/.mindforge/personas/react-native-engineer.md +106 -0
- package/.mindforge/personas/resilience-engineer.md +69 -0
- package/.mindforge/personas/rfc-architect.md +64 -0
- package/.mindforge/personas/saga-orchestrator.md +80 -0
- package/.mindforge/personas/secrets-engineer.md +57 -0
- package/.mindforge/personas/skill-smith.md +79 -0
- package/.mindforge/personas/sre-lead.md +107 -0
- package/.mindforge/personas/stream-engineer.md +57 -0
- package/.mindforge/personas/streaming-engineer.md +64 -0
- package/.mindforge/personas/swarm-templates.json +695 -38
- package/.mindforge/personas/system-designer.md +57 -0
- package/.mindforge/personas/team-coach.md +120 -0
- package/.mindforge/personas/tech-lead-coach.md +103 -0
- package/.mindforge/personas/technical-writer-lead.md +111 -0
- package/.mindforge/personas/threat-modeler.md +82 -0
- package/.mindforge/personas/vibe-checker.md +75 -0
- package/.mindforge/personas/worktree-manager.md +56 -0
- package/.mindforge/personas/zero-trust-engineer.md +113 -0
- package/.mindforge/skills/a11y-testing/SKILL.md +143 -0
- package/.mindforge/skills/agent-evaluation-framework/SKILL.md +227 -0
- package/.mindforge/skills/agent-introspection-debugging/SKILL.md +88 -0
- package/.mindforge/skills/agent-loops/SKILL.md +84 -0
- package/.mindforge/skills/agent-memory-design/SKILL.md +199 -0
- package/.mindforge/skills/agent-orchestration-patterns/SKILL.md +129 -0
- package/.mindforge/skills/agent-tool-selection/SKILL.md +204 -0
- package/.mindforge/skills/ai-agent-deployment/SKILL.md +176 -0
- package/.mindforge/skills/ai-cost-management/SKILL.md +57 -0
- package/.mindforge/skills/ai-safety-alignment/SKILL.md +53 -0
- package/.mindforge/skills/analytics-instrumentation/SKILL.md +172 -0
- package/.mindforge/skills/api-gateway-patterns/SKILL.md +177 -0
- package/.mindforge/skills/api-marketplace/SKILL.md +56 -0
- package/.mindforge/skills/api-versioning/SKILL.md +100 -0
- package/.mindforge/skills/app-store-deployment/SKILL.md +44 -0
- package/.mindforge/skills/architecture-tradeoff-analysis/SKILL.md +97 -0
- package/.mindforge/skills/audit-logging/SKILL.md +140 -0
- package/.mindforge/skills/auth-patterns/SKILL.md +148 -0
- package/.mindforge/skills/autonomous-agent-harness/SKILL.md +218 -0
- package/.mindforge/skills/autonomous-agents/SKILL.md +59 -0
- package/.mindforge/skills/autonomous-loops/SKILL.md +105 -0
- package/.mindforge/skills/build-system-optimization/SKILL.md +54 -0
- package/.mindforge/skills/build-vs-buy/SKILL.md +80 -0
- package/.mindforge/skills/bundle-optimization/SKILL.md +174 -0
- package/.mindforge/skills/business-analyst/SKILL.md +82 -0
- package/.mindforge/skills/caching-strategies/SKILL.md +132 -0
- package/.mindforge/skills/capacity-planning/SKILL.md +96 -0
- package/.mindforge/skills/causal-inference/SKILL.md +42 -0
- package/.mindforge/skills/cdn-optimization/SKILL.md +212 -0
- package/.mindforge/skills/change-management/SKILL.md +106 -0
- package/.mindforge/skills/chaos-engineering/SKILL.md +99 -0
- package/.mindforge/skills/ci-cd-pipeline/SKILL.md +118 -0
- package/.mindforge/skills/cli-design/SKILL.md +118 -0
- package/.mindforge/skills/code-generation-patterns/SKILL.md +92 -0
- package/.mindforge/skills/code-review-methodology/SKILL.md +180 -0
- package/.mindforge/skills/code-tour/SKILL.md +145 -0
- package/.mindforge/skills/codebase-onboarding/SKILL.md +95 -0
- package/.mindforge/skills/compliance-as-code/SKILL.md +195 -0
- package/.mindforge/skills/conflict-resolution/SKILL.md +87 -0
- package/.mindforge/skills/connection-pooling/SKILL.md +151 -0
- package/.mindforge/skills/container-security/SKILL.md +151 -0
- package/.mindforge/skills/context-engineering/SKILL.md +114 -0
- package/.mindforge/skills/continuous-learning/SKILL.md +84 -0
- package/.mindforge/skills/contract-testing/SKILL.md +85 -0
- package/.mindforge/skills/cost-aware-routing/SKILL.md +83 -0
- package/.mindforge/skills/cost-estimation/SKILL.md +82 -0
- package/.mindforge/skills/council/SKILL.md +68 -0
- package/.mindforge/skills/cqrs-event-sourcing/SKILL.md +95 -0
- package/.mindforge/skills/cross-platform-testing/SKILL.md +43 -0
- package/.mindforge/skills/data-governance/SKILL.md +42 -0
- package/.mindforge/skills/data-lakehouse/SKILL.md +42 -0
- package/.mindforge/skills/data-mesh/SKILL.md +42 -0
- package/.mindforge/skills/data-modeling/SKILL.md +107 -0
- package/.mindforge/skills/data-pipeline-design/SKILL.md +171 -0
- package/.mindforge/skills/data-privacy-engineering/SKILL.md +42 -0
- package/.mindforge/skills/database-performance/SKILL.md +174 -0
- package/.mindforge/skills/database-sharding-advanced/SKILL.md +206 -0
- package/.mindforge/skills/de-sloppify/SKILL.md +120 -0
- package/.mindforge/skills/defense-in-depth/SKILL.md +84 -0
- package/.mindforge/skills/delegation-patterns/SKILL.md +123 -0
- package/.mindforge/skills/dependency-management/SKILL.md +94 -0
- package/.mindforge/skills/deployment-workflow/SKILL.md +135 -0
- package/.mindforge/skills/design-system/SKILL.md +113 -0
- package/.mindforge/skills/developer-onboarding/SKILL.md +99 -0
- package/.mindforge/skills/developer-productivity-metrics/SKILL.md +59 -0
- package/.mindforge/skills/distributed-consensus/SKILL.md +141 -0
- package/.mindforge/skills/dmux-workflows/SKILL.md +141 -0
- package/.mindforge/skills/dns-architecture/SKILL.md +167 -0
- package/.mindforge/skills/doc-health-audit/SKILL.md +102 -0
- package/.mindforge/skills/ecommerce-architecture/SKILL.md +41 -0
- package/.mindforge/skills/edge-computing/SKILL.md +91 -0
- package/.mindforge/skills/edtech-platform/SKILL.md +41 -0
- package/.mindforge/skills/email-deliverability/SKILL.md +177 -0
- package/.mindforge/skills/embedding-systems/SKILL.md +55 -0
- package/.mindforge/skills/environment-management/SKILL.md +54 -0
- package/.mindforge/skills/error-handling-architecture/SKILL.md +118 -0
- package/.mindforge/skills/estimation-techniques/SKILL.md +113 -0
- package/.mindforge/skills/eval-harness/SKILL.md +180 -0
- package/.mindforge/skills/event-driven-architecture/SKILL.md +162 -0
- package/.mindforge/skills/experiment-design/SKILL.md +139 -0
- package/.mindforge/skills/experiment-platform/SKILL.md +43 -0
- package/.mindforge/skills/feature-engineering/SKILL.md +42 -0
- package/.mindforge/skills/feature-flag-management/SKILL.md +183 -0
- package/.mindforge/skills/fine-tuning-workflow/SKILL.md +189 -0
- package/.mindforge/skills/fintech-patterns/SKILL.md +41 -0
- package/.mindforge/skills/flutter-architecture/SKILL.md +42 -0
- package/.mindforge/skills/gaming-backend/SKILL.md +41 -0
- package/.mindforge/skills/git-workflow-design/SKILL.md +129 -0
- package/.mindforge/skills/graceful-degradation/SKILL.md +95 -0
- package/.mindforge/skills/graphql-patterns/SKILL.md +243 -0
- package/.mindforge/skills/guardrails-and-safety/SKILL.md +137 -0
- package/.mindforge/skills/healthcare-systems/SKILL.md +40 -0
- package/.mindforge/skills/hiring-engineering/SKILL.md +119 -0
- package/.mindforge/skills/human-in-the-loop-design/SKILL.md +234 -0
- package/.mindforge/skills/i18n-architecture/SKILL.md +147 -0
- package/.mindforge/skills/idempotency-patterns/SKILL.md +84 -0
- package/.mindforge/skills/incident-communication/SKILL.md +96 -0
- package/.mindforge/skills/incident-management/SKILL.md +97 -0
- package/.mindforge/skills/infrastructure-as-code/SKILL.md +98 -0
- package/.mindforge/skills/instinct-clustering/SKILL.md +190 -0
- package/.mindforge/skills/internal-developer-platform/SKILL.md +51 -0
- package/.mindforge/skills/iot-platform/SKILL.md +41 -0
- package/.mindforge/skills/k8s-deployment/SKILL.md +358 -0
- package/.mindforge/skills/knowledge-graphs/SKILL.md +56 -0
- package/.mindforge/skills/knowledge-sharing-systems/SKILL.md +112 -0
- package/.mindforge/skills/llm-cost-optimization/SKILL.md +198 -0
- package/.mindforge/skills/llm-orchestration/SKILL.md +56 -0
- package/.mindforge/skills/load-testing/SKILL.md +84 -0
- package/.mindforge/skills/logistics-optimization/SKILL.md +40 -0
- package/.mindforge/skills/market-researcher/SKILL.md +99 -0
- package/.mindforge/skills/marketplace-trust/SKILL.md +40 -0
- package/.mindforge/skills/mcp-server-patterns/SKILL.md +264 -0
- package/.mindforge/skills/media-streaming/SKILL.md +41 -0
- package/.mindforge/skills/meeting-architecture/SKILL.md +146 -0
- package/.mindforge/skills/mentoring-patterns/SKILL.md +77 -0
- package/.mindforge/skills/microservices-patterns/SKILL.md +83 -0
- package/.mindforge/skills/migration-platform/SKILL.md +61 -0
- package/.mindforge/skills/migration-strategies/SKILL.md +129 -0
- package/.mindforge/skills/ml-feature-store/SKILL.md +56 -0
- package/.mindforge/skills/ml-monitoring/SKILL.md +42 -0
- package/.mindforge/skills/mobile-performance/SKILL.md +44 -0
- package/.mindforge/skills/mobile-security/SKILL.md +45 -0
- package/.mindforge/skills/model-evaluation/SKILL.md +53 -0
- package/.mindforge/skills/monorepo-management/SKILL.md +100 -0
- package/.mindforge/skills/multi-llm-consult/SKILL.md +75 -0
- package/.mindforge/skills/multi-tenancy-patterns/SKILL.md +145 -0
- package/.mindforge/skills/multi-turn-conversation-design/SKILL.md +206 -0
- package/.mindforge/skills/multimodal-ai/SKILL.md +51 -0
- package/.mindforge/skills/mutation-testing/SKILL.md +97 -0
- package/.mindforge/skills/notification-system-design/SKILL.md +168 -0
- package/.mindforge/skills/observability-stack/SKILL.md +136 -0
- package/.mindforge/skills/offline-first-design/SKILL.md +43 -0
- package/.mindforge/skills/on-call-design/SKILL.md +111 -0
- package/.mindforge/skills/pagination-patterns/SKILL.md +230 -0
- package/.mindforge/skills/payment-integration/SKILL.md +176 -0
- package/.mindforge/skills/performance-reviews/SKILL.md +140 -0
- package/.mindforge/skills/platform-observability/SKILL.md +58 -0
- package/.mindforge/skills/platform-reliability/SKILL.md +52 -0
- package/.mindforge/skills/post-incident-learning/SKILL.md +96 -0
- package/.mindforge/skills/product-manager/SKILL.md +104 -0
- package/.mindforge/skills/progressive-web-app/SKILL.md +44 -0
- package/.mindforge/skills/prompt-engineering/SKILL.md +94 -0
- package/.mindforge/skills/proofreader/SKILL.md +158 -0
- package/.mindforge/skills/push-notification-architecture/SKILL.md +45 -0
- package/.mindforge/skills/python-performance/SKILL.md +183 -0
- package/.mindforge/skills/quality-audit/SKILL.md +171 -0
- package/.mindforge/skills/queue-design/SKILL.md +85 -0
- package/.mindforge/skills/rag-architecture/SKILL.md +176 -0
- package/.mindforge/skills/rate-limiting-design/SKILL.md +94 -0
- package/.mindforge/skills/react-native-patterns/SKILL.md +42 -0
- package/.mindforge/skills/react-performance/SKILL.md +229 -0
- package/.mindforge/skills/real-time-analytics/SKILL.md +42 -0
- package/.mindforge/skills/real-time-sync/SKILL.md +83 -0
- package/.mindforge/skills/responsive-native/SKILL.md +44 -0
- package/.mindforge/skills/responsive-patterns/SKILL.md +141 -0
- package/.mindforge/skills/rfc-pipeline/SKILL.md +114 -0
- package/.mindforge/skills/saas-multi-tenant/SKILL.md +41 -0
- package/.mindforge/skills/santa-method/SKILL.md +134 -0
- package/.mindforge/skills/search-implementation/SKILL.md +98 -0
- package/.mindforge/skills/secrets-platform/SKILL.md +56 -0
- package/.mindforge/skills/secrets-rotation/SKILL.md +173 -0
- package/.mindforge/skills/self-serve-infrastructure/SKILL.md +51 -0
- package/.mindforge/skills/serverless-patterns/SKILL.md +119 -0
- package/.mindforge/skills/skill-creator-meta/SKILL.md +146 -0
- package/.mindforge/skills/sprint-retrospective-facilitation/SKILL.md +112 -0
- package/.mindforge/skills/stakeholder-communication/SKILL.md +85 -0
- package/.mindforge/skills/state-management/SKILL.md +104 -0
- package/.mindforge/skills/stream-processing/SKILL.md +43 -0
- package/.mindforge/skills/streaming-architecture/SKILL.md +81 -0
- package/.mindforge/skills/supply-chain-security/SKILL.md +145 -0
- package/.mindforge/skills/synthetic-data-generation/SKILL.md +52 -0
- package/.mindforge/skills/system-design/SKILL.md +88 -0
- package/.mindforge/skills/team-topology-design/SKILL.md +107 -0
- package/.mindforge/skills/technical-debt-management/SKILL.md +86 -0
- package/.mindforge/skills/technical-interview-design/SKILL.md +98 -0
- package/.mindforge/skills/technical-leadership/SKILL.md +75 -0
- package/.mindforge/skills/technical-writing/SKILL.md +237 -0
- package/.mindforge/skills/technology-radar/SKILL.md +88 -0
- package/.mindforge/skills/testing-anti-patterns/SKILL.md +288 -0
- package/.mindforge/skills/threat-modeling/SKILL.md +109 -0
- package/.mindforge/skills/tool-design/SKILL.md +138 -0
- package/.mindforge/skills/typescript-advanced/SKILL.md +198 -0
- package/.mindforge/skills/using-git-worktrees/SKILL.md +139 -0
- package/.mindforge/skills/verification-loop/SKILL.md +97 -0
- package/.mindforge/skills/vibe-security/SKILL.md +165 -0
- package/.mindforge/skills/visual-regression-testing/SKILL.md +97 -0
- package/.mindforge/skills/websocket-patterns/SKILL.md +203 -0
- package/.mindforge/skills/writing-plans/SKILL.md +170 -0
- package/.mindforge/skills/writing-skills/SKILL.md +216 -0
- package/.mindforge/skills/zero-trust-architecture/SKILL.md +166 -0
- package/CHANGELOG.md +195 -0
- package/MINDFORGE.md +4 -4
- package/README.md +2 -2
- package/RELEASENOTES.md +66 -0
- package/bin/installer-core.js +1 -1
- package/bin/wizard/theme.js +2 -2
- package/docs/commands-reference.md +18 -1
- package/package.json +2 -2
- package/.mindforge/personas/data-privacy-engineer.md +0 -187
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cdn-optimization
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.1.1
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: cdn optimization, cache hierarchy, cache purge strategy, edge-side includes, origin shielding, cache key design, cdn invalidation, cdn prewarming, stale-while-revalidate cdn, cdn hit ratio, cdn failover, multi-cdn strategy
|
|
7
|
+
compose: caching-strategies
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill — CDN Optimization
|
|
11
|
+
|
|
12
|
+
## When this skill activates
|
|
13
|
+
Any task involving CDN configuration, cache strategy design, cache invalidation,
|
|
14
|
+
origin shielding, cache key optimization, or multi-CDN architecture
|
|
15
|
+
for high-traffic web applications.
|
|
16
|
+
|
|
17
|
+
## Mandatory actions when this skill is active
|
|
18
|
+
|
|
19
|
+
### Before writing any code
|
|
20
|
+
1. Identify content types and their cacheability (static, dynamic, personalized).
|
|
21
|
+
2. Define cache hierarchy (Edge POP → Regional Shield → Origin).
|
|
22
|
+
3. Design cache keys (URL + Vary headers — don't over-key).
|
|
23
|
+
4. Plan purge/invalidation strategy before enabling caching.
|
|
24
|
+
|
|
25
|
+
### During implementation
|
|
26
|
+
- Set explicit Cache-Control headers on every response.
|
|
27
|
+
- Enable origin shielding to collapse edge requests.
|
|
28
|
+
- Use stale-while-revalidate for graceful cache refresh.
|
|
29
|
+
- Design cache keys to maximize hit ratio without serving wrong content.
|
|
30
|
+
- Implement tag-based purge for granular invalidation.
|
|
31
|
+
- Never cache responses with `Set-Cookie` headers.
|
|
32
|
+
|
|
33
|
+
### After implementation
|
|
34
|
+
- Measure cache hit ratio (target: >95% static, >80% dynamic).
|
|
35
|
+
- Verify purge propagates within acceptable time.
|
|
36
|
+
- Test cache behavior with different user contexts (logged in vs anonymous).
|
|
37
|
+
- Monitor origin load (should decrease significantly with CDN).
|
|
38
|
+
- Confirm no stale content is served after deploys.
|
|
39
|
+
|
|
40
|
+
## Cache Hierarchy
|
|
41
|
+
|
|
42
|
+
### Three-Tier Architecture
|
|
43
|
+
```
|
|
44
|
+
User → Edge POP (closest) → Regional Shield → Origin Server
|
|
45
|
+
↓ cache hit? ↓ cache hit? ↓ always fresh
|
|
46
|
+
serve immediately serve to edge generate response
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Benefits
|
|
50
|
+
- **Edge POP**: Sub-10ms latency for cached content.
|
|
51
|
+
- **Regional Shield**: Collapses many edge misses into single origin request.
|
|
52
|
+
- **Origin**: Only handles truly unique/expired requests.
|
|
53
|
+
|
|
54
|
+
### Origin Shielding (Critical)
|
|
55
|
+
Without shielding: 100 edge POPs × cache miss = 100 origin requests.
|
|
56
|
+
With shielding: 100 edge POPs → 1 shield request → 1 origin request.
|
|
57
|
+
|
|
58
|
+
## Cache Key Design
|
|
59
|
+
|
|
60
|
+
### Principles
|
|
61
|
+
- Cache key = what makes a response unique.
|
|
62
|
+
- Over-keying (too many variants) = low hit ratio.
|
|
63
|
+
- Under-keying (too few variants) = serving wrong content.
|
|
64
|
+
|
|
65
|
+
### Common Cache Key Components
|
|
66
|
+
```
|
|
67
|
+
Default: scheme + host + path + query string
|
|
68
|
+
Add when needed: Accept-Encoding, Accept-Language, device type
|
|
69
|
+
NEVER include: session cookies, random headers, full cookie jar
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Examples
|
|
73
|
+
| Content Type | Cache Key | Vary Header |
|
|
74
|
+
|-------------|-----------|-------------|
|
|
75
|
+
| Static assets | URL (path + hash) | None |
|
|
76
|
+
| API (public) | URL + query params | Accept-Encoding |
|
|
77
|
+
| Localized page | URL + language | Accept-Language |
|
|
78
|
+
| Responsive image | URL + device class | (custom header) |
|
|
79
|
+
|
|
80
|
+
### Anti-Patterns
|
|
81
|
+
- Including session cookie in cache key (unique per user = 0% hit ratio).
|
|
82
|
+
- Including `Authorization` header for public content.
|
|
83
|
+
- Using full `User-Agent` as variant (thousands of variants).
|
|
84
|
+
|
|
85
|
+
## Cache-Control Headers
|
|
86
|
+
|
|
87
|
+
### Static Assets (Hashed Filenames)
|
|
88
|
+
```
|
|
89
|
+
Cache-Control: public, max-age=31536000, immutable
|
|
90
|
+
```
|
|
91
|
+
- One year cache, never revalidate.
|
|
92
|
+
- Safe because filename changes on content change.
|
|
93
|
+
|
|
94
|
+
### Dynamic Content (Cacheable)
|
|
95
|
+
```
|
|
96
|
+
Cache-Control: public, max-age=60, stale-while-revalidate=300
|
|
97
|
+
```
|
|
98
|
+
- Fresh for 60s, serve stale for 300s while fetching fresh in background.
|
|
99
|
+
- User always gets fast response, content refreshes async.
|
|
100
|
+
|
|
101
|
+
### Personalized/Private
|
|
102
|
+
```
|
|
103
|
+
Cache-Control: private, no-store
|
|
104
|
+
```
|
|
105
|
+
- Never cache in shared caches (CDN).
|
|
106
|
+
- Only browser can cache.
|
|
107
|
+
|
|
108
|
+
### API Responses
|
|
109
|
+
```
|
|
110
|
+
Cache-Control: public, max-age=10, stale-while-revalidate=60, stale-if-error=300
|
|
111
|
+
```
|
|
112
|
+
- Short freshness, graceful degradation on origin failure.
|
|
113
|
+
|
|
114
|
+
## Purge Strategy
|
|
115
|
+
|
|
116
|
+
### Methods (Ranked by Preference)
|
|
117
|
+
1. **Tag-based purge**: Assign cache tags, purge by tag. Most granular.
|
|
118
|
+
2. **URL-based purge**: Purge specific URL. Precise but doesn't scale to many URLs.
|
|
119
|
+
3. **Prefix purge**: Purge all URLs matching path prefix. Broad but useful for deploys.
|
|
120
|
+
4. **Full purge**: Nuclear option. Purge everything. Avoid in production.
|
|
121
|
+
|
|
122
|
+
### Purge Triggers
|
|
123
|
+
- Deploy: purge changed assets (tag-based or prefix).
|
|
124
|
+
- Content update: purge specific URLs or tags.
|
|
125
|
+
- Emergency: full purge if stale content is harmful.
|
|
126
|
+
|
|
127
|
+
### Propagation Time
|
|
128
|
+
- Instant purge at edge: <1 second (Fastly, Cloudflare).
|
|
129
|
+
- Some CDNs: 5-15 minutes propagation.
|
|
130
|
+
- Always verify purge completed before relying on fresh content.
|
|
131
|
+
|
|
132
|
+
## Stale-While-Revalidate
|
|
133
|
+
|
|
134
|
+
### How It Works
|
|
135
|
+
1. Request arrives for expired content.
|
|
136
|
+
2. CDN serves stale response immediately (fast!).
|
|
137
|
+
3. CDN fetches fresh content from origin in background.
|
|
138
|
+
4. Next request gets fresh content.
|
|
139
|
+
|
|
140
|
+
### Benefits
|
|
141
|
+
- User never waits for origin response.
|
|
142
|
+
- Origin gets time to respond without blocking users.
|
|
143
|
+
- Graceful handling of origin slowness or errors.
|
|
144
|
+
|
|
145
|
+
### Configuration
|
|
146
|
+
```
|
|
147
|
+
Cache-Control: public, max-age=60, stale-while-revalidate=600, stale-if-error=86400
|
|
148
|
+
```
|
|
149
|
+
- Fresh for 60s.
|
|
150
|
+
- Serve stale for up to 600s while revalidating.
|
|
151
|
+
- Serve stale for up to 24h if origin is erroring.
|
|
152
|
+
|
|
153
|
+
## Hit Ratio Targets
|
|
154
|
+
|
|
155
|
+
| Content Type | Target Hit Ratio | If Below |
|
|
156
|
+
|-------------|-----------------|----------|
|
|
157
|
+
| Static assets (JS/CSS/images) | >99% | Check cache key, immutable headers |
|
|
158
|
+
| HTML pages (anonymous) | >95% | Check Vary headers, cookie leakage |
|
|
159
|
+
| API responses (public) | >80% | Check TTL, query param diversity |
|
|
160
|
+
| Personalized content | N/A | Should not be cached at CDN |
|
|
161
|
+
|
|
162
|
+
### Diagnosing Low Hit Ratio
|
|
163
|
+
1. Check `Vary` header — is it over-specifying?
|
|
164
|
+
2. Check cache key — are cookies leaking in?
|
|
165
|
+
3. Check TTL — is content expiring too quickly?
|
|
166
|
+
4. Check query parameters — are tracking params included?
|
|
167
|
+
5. Check purge frequency — are you purging too often?
|
|
168
|
+
|
|
169
|
+
## Multi-CDN Strategy
|
|
170
|
+
|
|
171
|
+
### Use Cases
|
|
172
|
+
- Failover (CDN A down → traffic to CDN B).
|
|
173
|
+
- Cost arbitrage (cheaper CDN for bulk, premium for critical).
|
|
174
|
+
- Geographic optimization (CDN A better in region X, CDN B in region Y).
|
|
175
|
+
- Vendor independence (avoid lock-in).
|
|
176
|
+
|
|
177
|
+
### Implementation
|
|
178
|
+
- DNS-based switching (GeoDNS or failover).
|
|
179
|
+
- Unified purge API across CDN providers.
|
|
180
|
+
- Normalized configuration (cache rules consistent across providers).
|
|
181
|
+
- Monitoring per-CDN performance independently.
|
|
182
|
+
|
|
183
|
+
## Edge-Side Includes (ESI)
|
|
184
|
+
|
|
185
|
+
### Pattern
|
|
186
|
+
Compose pages from independently cached fragments:
|
|
187
|
+
```html
|
|
188
|
+
<esi:include src="/header" />
|
|
189
|
+
<main>Page-specific content</main>
|
|
190
|
+
<esi:include src="/footer" />
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Benefits
|
|
194
|
+
- Header/footer cached separately (long TTL).
|
|
195
|
+
- Page content has its own TTL.
|
|
196
|
+
- Reduces full-page cache misses.
|
|
197
|
+
|
|
198
|
+
### When to Use
|
|
199
|
+
- Pages share common components (header, nav, footer).
|
|
200
|
+
- Components have different cache lifetimes.
|
|
201
|
+
- Personalization is limited to specific fragments.
|
|
202
|
+
|
|
203
|
+
## Self-check
|
|
204
|
+
- [ ] Cache-Control headers set on every response type.
|
|
205
|
+
- [ ] Origin shielding enabled.
|
|
206
|
+
- [ ] Cache keys designed (not over-keyed or under-keyed).
|
|
207
|
+
- [ ] Purge strategy implemented and tested.
|
|
208
|
+
- [ ] Stale-while-revalidate configured for dynamic content.
|
|
209
|
+
- [ ] Hit ratio >95% for static, >80% for dynamic.
|
|
210
|
+
- [ ] No `Set-Cookie` responses being cached.
|
|
211
|
+
- [ ] Deploy purge automated in CI/CD pipeline.
|
|
212
|
+
- [ ] Origin load reduced significantly vs direct traffic.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: change-management
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.3.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: change management engineering, migration buy-in, deprecation communication, process adoption, resistance handling, technology transition, platform migration communication, developer adoption, breaking change rollout, sunsetting communication, organizational change, migration strategy communication
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Change Management
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
This skill activates when managing technology migrations, communicating deprecations, driving process adoption, handling resistance to change, or rolling out breaking changes. It applies to tech leads, engineering managers, platform engineers, and staff engineers responsible for organizational or technical transitions.
|
|
14
|
+
|
|
15
|
+
## Mandatory actions when this skill is active
|
|
16
|
+
|
|
17
|
+
### Before initiating change
|
|
18
|
+
|
|
19
|
+
1. **Quantify the cost of status quo** — Why is change necessary? What's the cost of not changing? (Technical debt, security risk, developer productivity, scalability ceiling.) Make the pain explicit.
|
|
20
|
+
2. **Identify stakeholders and their incentives** — Who is impacted? What do they care about? Engineers care about productivity. Product cares about velocity. Execs care about risk and cost. Tailor the message to each audience.
|
|
21
|
+
3. **Assess change complexity and risk** — Low-risk, low-effort changes (linter config update) can be rolled out quickly. High-risk, high-effort changes (database migration, language change) require extensive planning and staged rollout.
|
|
22
|
+
4. **Build a coalition of early adopters** — Don't force change top-down. Recruit influential engineers who see the value. Their endorsement accelerates adoption faster than mandates.
|
|
23
|
+
|
|
24
|
+
### During change rollout
|
|
25
|
+
|
|
26
|
+
#### Migration Buy-In Strategies
|
|
27
|
+
|
|
28
|
+
- **Start with the "why," not the "what"** — Don't lead with "We're migrating to Kubernetes." Lead with "Our current deployment process takes 45 minutes and fails 20% of the time. Kubernetes will reduce deploy time to 5 minutes and improve reliability."
|
|
29
|
+
- **Demonstrate quick wins** — Run a pilot project. Show tangible benefits (faster builds, fewer bugs, easier onboarding). Success stories are more persuasive than Powerpoints.
|
|
30
|
+
- **Address objections directly** — Don't dismiss concerns. If someone says "This will slow us down," acknowledge it: "Yes, there's a ramp-up cost. Here's how we're mitigating it with training and pairing."
|
|
31
|
+
- **Make the default path the new path** — Update templates, documentation, and scaffolding tools to reflect the new approach. The path of least resistance should be the desired behavior.
|
|
32
|
+
|
|
33
|
+
#### Deprecation Communication
|
|
34
|
+
|
|
35
|
+
- **Announce early and often** — Deprecations should have a 6-12 month runway (depending on impact). Announce in: all-hands, team Slack channels, email, documentation, and in-app warnings (if applicable).
|
|
36
|
+
- **Provide a clear migration path** — Don't just say "Service X is deprecated." Provide a step-by-step guide: (1) Assess usage, (2) Replace with Service Y, (3) Test, (4) Deploy, (5) Remove old code.
|
|
37
|
+
- **Offer migration support** — Host office hours, create migration runbooks, assign a DRI (Directly Responsible Individual) to help teams migrate. Abandoned teams will resist.
|
|
38
|
+
- **Set and enforce deadlines** — Soft deadline (recommended), hard deadline (automatic cutover or feature removal). No deadline = no urgency = no adoption.
|
|
39
|
+
- **Track migration progress** — Publish a dashboard showing which teams have migrated. Social proof accelerates laggards.
|
|
40
|
+
|
|
41
|
+
#### Process Adoption (e.g., New Code Review Standards, CI/CD Changes)
|
|
42
|
+
|
|
43
|
+
- **Involve engineers in design** — Don't impose processes unilaterally. If engineers co-design the process, they'll co-own it. Run RFCs, gather feedback, iterate.
|
|
44
|
+
- **Start with opt-in, then default, then mandatory** — Phase 1: Teams can try it. Phase 2: New projects default to it. Phase 3: All projects must use it. Gives people time to adapt.
|
|
45
|
+
- **Automate enforcement where possible** — If you want engineers to write tests, make CI fail without tests. If you want design reviews, make PRs require approval before merge. Manual enforcement is inconsistent.
|
|
46
|
+
- **Measure adoption and impact** — Track: % of teams using the new process, time savings, quality improvements. Share metrics publicly to reinforce value.
|
|
47
|
+
|
|
48
|
+
#### Resistance Handling
|
|
49
|
+
|
|
50
|
+
**Common Resistance Patterns and Responses:**
|
|
51
|
+
|
|
52
|
+
| Resistance | Underlying Concern | How to Address |
|
|
53
|
+
|------------|-------------------|----------------|
|
|
54
|
+
| "We don't have time for this" | Fear of slowing down feature velocity | Show time savings after ramp-up. Provide dedicated migration time in sprint planning. |
|
|
55
|
+
| "The old way works fine" | Comfort with status quo, skepticism of new approach | Quantify pain of old way (incidents, time spent, bugs). Show pilot results. |
|
|
56
|
+
| "This is too complicated" | Lack of understanding or training | Provide training, documentation, pairing sessions. Simplify the onboarding path. |
|
|
57
|
+
| "No one asked us" | Feeling excluded from decision | Involve them in refinement. Acknowledge feedback. Adjust the plan if valid concerns. |
|
|
58
|
+
| "I don't see the value" | Misalignment on priorities | Connect the change to their goals. If they care about velocity, show how this accelerates it. |
|
|
59
|
+
| "We tried this before and it failed" | Historical baggage | Acknowledge past failure. Explain what's different this time. Show evidence of changed conditions. |
|
|
60
|
+
|
|
61
|
+
**Escalation Path:**
|
|
62
|
+
1. **Listen first** — Understand the root concern. Don't dismiss or argue.
|
|
63
|
+
2. **Address with data** — Use pilot results, benchmarks, or case studies to counter objections.
|
|
64
|
+
3. **Compromise where reasonable** — If they have a valid concern, adjust the plan. Flexibility builds trust.
|
|
65
|
+
4. **Escalate if necessary** — If a team refuses to adopt a mandatory change, escalate to their manager or exec sponsor. But exhaust persuasion first.
|
|
66
|
+
|
|
67
|
+
#### Technology Transition (e.g., New Language, Framework, Platform)
|
|
68
|
+
|
|
69
|
+
- **Create a transition plan** — Phases: (1) Pilot project, (2) Documentation and training, (3) New projects use new tech, (4) Migrate existing projects, (5) Deprecate old tech.
|
|
70
|
+
- **Set migration milestones** — Don't mandate "migrate everything by Q4." Break it into incremental milestones: "Migrate 3 services by Q1, 10 by Q2, all by Q3."
|
|
71
|
+
- **Provide dual support during transition** — Support both old and new tech for a grace period (6-12 months). Prevents forcing teams into incomplete migrations.
|
|
72
|
+
- **Document everything** — Migration guides, troubleshooting FAQs, architecture decision records. The more self-service resources, the faster adoption.
|
|
73
|
+
|
|
74
|
+
#### Breaking Change Rollout
|
|
75
|
+
|
|
76
|
+
- **Minimize breaking changes** — Can you make it backward-compatible? Use feature flags, versioned APIs, or parallel systems to avoid forcing immediate adoption.
|
|
77
|
+
- **If unavoidable, batch breaking changes** — Don't introduce breaking changes every sprint. Batch them into quarterly releases. Gives teams time to adapt.
|
|
78
|
+
- **Communicate impact explicitly** — Which services/teams are affected? What do they need to do? By when? Who can help? Make it actionable.
|
|
79
|
+
- **Provide tooling for migration** — Codemods, automated refactoring scripts, linters that catch breaking changes. Reduce manual toil.
|
|
80
|
+
- **Test extensively before rollout** — Run the breaking change in staging or canary environments. Catch issues before they hit production.
|
|
81
|
+
|
|
82
|
+
#### Organizational Change (e.g., New Processes, Roles, Team Structure)
|
|
83
|
+
|
|
84
|
+
- **Communicate the rationale** — Why is this change happening? What problem does it solve? Connect to business or engineering goals.
|
|
85
|
+
- **Address uncertainty** — Organizational change creates anxiety. Be transparent about what's changing, what's staying the same, and what's still TBD.
|
|
86
|
+
- **Give people time to adapt** — Major changes (team restructuring, new roles) need 30-60 days for people to adjust. Don't rush.
|
|
87
|
+
- **Create feedback loops** — After 30 days, survey the team: "How's the new structure working? What's better? What's worse?" Adjust based on feedback.
|
|
88
|
+
|
|
89
|
+
### After change rollout
|
|
90
|
+
|
|
91
|
+
- **Measure success** — Did the change achieve the intended outcome? (Faster deploys, fewer bugs, higher developer satisfaction.) If not, course-correct or roll back.
|
|
92
|
+
- **Celebrate adoption milestones** — When 50% of teams have migrated, announce it publicly. Recognize early adopters. Momentum builds motivation.
|
|
93
|
+
- **Sunset the old system** — Once migration is complete, fully deprecate the old system. Don't maintain dual systems indefinitely. It's expensive and confusing.
|
|
94
|
+
- **Conduct a retrospective** — What went well? What didn't? What would we do differently next time? Document lessons learned for the next change initiative.
|
|
95
|
+
- **Update documentation** — Remove references to the old system. Ensure onboarding docs, runbooks, and templates reflect the new standard.
|
|
96
|
+
|
|
97
|
+
## Self-check before task completion
|
|
98
|
+
|
|
99
|
+
- [ ] Cost of status quo is quantified with specific pain points (technical debt, security, productivity)
|
|
100
|
+
- [ ] Stakeholders are identified with tailored messaging (engineers, product, execs)
|
|
101
|
+
- [ ] Migration buy-in strategy starts with "why" and demonstrates quick wins via pilot
|
|
102
|
+
- [ ] Deprecation communication includes early announcement, clear migration path, and deadlines
|
|
103
|
+
- [ ] Process adoption follows opt-in → default → mandatory phasing
|
|
104
|
+
- [ ] Resistance is addressed by listening, providing data, and compromising where reasonable
|
|
105
|
+
- [ ] Breaking changes are batched, communicated with impact analysis, and include migration tooling
|
|
106
|
+
- [ ] Success metrics are defined and measured post-rollout (time savings, quality, adoption rate)
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: chaos-engineering
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.0.7
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: chaos engineering, controlled failure injection, steady state hypothesis, blast radius containment, game day exercise, resilience verification, circuit breaker testing, chaos monkey experiment, fault tolerance validation, disaster recovery drill, failure mode analysis, controlled outage design
|
|
7
|
+
compose:
|
|
8
|
+
- observability-stack
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Chaos Engineering
|
|
12
|
+
|
|
13
|
+
## When this skill activates
|
|
14
|
+
|
|
15
|
+
This skill activates when the user is designing, implementing, or conducting chaos
|
|
16
|
+
engineering experiments. This includes defining steady-state hypotheses, designing
|
|
17
|
+
controlled failure injection experiments, containing blast radius, planning game day
|
|
18
|
+
exercises, verifying resilience patterns (circuit breakers, retries, bulkheads),
|
|
19
|
+
conducting disaster recovery drills, and analyzing failure modes in distributed systems.
|
|
20
|
+
|
|
21
|
+
## Mandatory actions
|
|
22
|
+
|
|
23
|
+
### Before
|
|
24
|
+
|
|
25
|
+
1. Confirm observability is in place — you cannot measure what you cannot see.
|
|
26
|
+
2. Define the steady-state hypothesis: what does "normal" look like in metrics?
|
|
27
|
+
3. Identify the blast radius boundary for the planned experiment.
|
|
28
|
+
4. Verify a rollback mechanism exists BEFORE injecting any failure.
|
|
29
|
+
5. Ensure stakeholder awareness (announce game days; never surprise production teams).
|
|
30
|
+
6. Check that the system under test has basic resilience patterns (retries, timeouts, circuit breakers).
|
|
31
|
+
|
|
32
|
+
### During
|
|
33
|
+
|
|
34
|
+
**Steady-State Hypothesis:**
|
|
35
|
+
- Define "normal" quantitatively before breaking things (p99 latency < 200ms, error rate < 0.1%, throughput > 1000 rps).
|
|
36
|
+
- The experiment succeeds if steady-state is maintained despite failure injection.
|
|
37
|
+
- The experiment reveals a weakness if steady-state degrades beyond acceptable thresholds.
|
|
38
|
+
- Always compare against the baseline, not against zero errors.
|
|
39
|
+
|
|
40
|
+
**Experiment Design:**
|
|
41
|
+
- Follow the scientific method: hypothesis, inject failure, observe, verify or refute.
|
|
42
|
+
- Document the expected outcome before running the experiment.
|
|
43
|
+
- Define success criteria AND abort criteria before starting.
|
|
44
|
+
- Time-box experiments (auto-revert after N minutes if not manually stopped).
|
|
45
|
+
- Run in progressively broader scope: staging first, then production with minimal blast radius.
|
|
46
|
+
|
|
47
|
+
**Blast Radius Containment:**
|
|
48
|
+
- Start small: 1 pod, then 1 node, then 1 availability zone. Never start with full chaos.
|
|
49
|
+
- Use feature flags or traffic percentages to limit affected users.
|
|
50
|
+
- Have circuit breakers around the experiment itself (meta-resilience).
|
|
51
|
+
- Production experiments target a single failure mode at a time.
|
|
52
|
+
- Never combine multiple failure injections in the first run.
|
|
53
|
+
|
|
54
|
+
**Failure Types:**
|
|
55
|
+
- **Network:** Latency injection (add 500ms), packet loss (5-20%), network partition (isolate a service), DNS failure.
|
|
56
|
+
- **Resource:** CPU exhaustion (stress-ng), memory pressure (fill to 90%), disk full, file descriptor exhaustion.
|
|
57
|
+
- **Dependency:** Kill downstream service, return errors from dependency, slow dependency (timeout scenarios).
|
|
58
|
+
- **State:** Corrupt cache entries, stale data injection, clock skew, split-brain simulation.
|
|
59
|
+
- **Infrastructure:** Node termination, AZ failure simulation, control plane unavailability.
|
|
60
|
+
|
|
61
|
+
**Game Days:**
|
|
62
|
+
- Scheduled, announced, and measured events.
|
|
63
|
+
- Assign roles: experiment lead, observer, incident commander (if things go wrong).
|
|
64
|
+
- Set clear start/end times and communication channels.
|
|
65
|
+
- Capture learnings in a structured report after each game day.
|
|
66
|
+
- Progressively increase difficulty across game days.
|
|
67
|
+
|
|
68
|
+
**Tooling:**
|
|
69
|
+
- Chaos Monkey / Simian Army (random instance termination).
|
|
70
|
+
- Litmus Chaos / Chaos Mesh (Kubernetes-native experiments).
|
|
71
|
+
- Gremlin (managed chaos platform).
|
|
72
|
+
- Toxiproxy / tc (network fault injection).
|
|
73
|
+
- Custom scripts with automatic rollback timers.
|
|
74
|
+
|
|
75
|
+
**Rollback:**
|
|
76
|
+
- ALWAYS have a rollback plan documented and tested before injection.
|
|
77
|
+
- Automated rollback on abort criteria breach (metric threshold exceeded).
|
|
78
|
+
- Manual kill switch accessible to experiment lead.
|
|
79
|
+
- Post-rollback verification: confirm steady-state returns to normal.
|
|
80
|
+
|
|
81
|
+
### After
|
|
82
|
+
|
|
83
|
+
1. Compare observed metrics against steady-state hypothesis.
|
|
84
|
+
2. Document findings: hypothesis confirmed or refuted, with evidence.
|
|
85
|
+
3. If weakness found: create an action item to improve resilience.
|
|
86
|
+
4. Share results broadly — chaos experiments are learning opportunities.
|
|
87
|
+
5. Update runbooks based on observed failure behavior.
|
|
88
|
+
6. Plan the next experiment (broader scope or different failure mode).
|
|
89
|
+
|
|
90
|
+
## Self-check before task completion
|
|
91
|
+
|
|
92
|
+
- [ ] Steady-state hypothesis is defined with quantitative metrics.
|
|
93
|
+
- [ ] Blast radius is contained and progressively expanded.
|
|
94
|
+
- [ ] Rollback mechanism is in place and tested before injection.
|
|
95
|
+
- [ ] Observability confirms the ability to detect impact.
|
|
96
|
+
- [ ] Experiment follows the scientific method (hypothesis, injection, observation, conclusion).
|
|
97
|
+
- [ ] Stakeholders are informed (no surprise chaos in production).
|
|
98
|
+
- [ ] Findings are documented with actionable improvements.
|
|
99
|
+
- [ ] Game day schedule includes progressive difficulty increases.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ci-cd-pipeline
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.0.7
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: ci cd pipeline, pipeline architecture, build stage design, deployment gate, artifact management, environment promotion, parallel jobs optimization, ci caching strategy, secrets in ci, ci rollback automation, github actions pipeline, pipeline stage design
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# CI/CD Pipeline
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
This skill activates when designing, implementing, or optimizing continuous integration and continuous deployment pipelines. It covers pipeline architecture, stage design, quality gates, artifact management, caching, parallelism, secrets handling, environment promotion, and rollback strategies. Use this skill whenever build/test/deploy automation is being created or modified.
|
|
14
|
+
|
|
15
|
+
## Mandatory actions when this skill is active
|
|
16
|
+
|
|
17
|
+
### Before
|
|
18
|
+
|
|
19
|
+
1. **Map the current workflow** — Document the existing build, test, and deploy steps (even if manual). Understand what exists before automating.
|
|
20
|
+
2. **Identify bottlenecks** — Measure current CI duration. Identify the slowest stages. Optimization targets the bottleneck, not random stages.
|
|
21
|
+
3. **Define deployment targets** — List all environments (dev, staging, production) and their promotion requirements.
|
|
22
|
+
4. **Assess risk tolerance** — How much downtime is acceptable? Zero-downtime deployments require different strategies than maintenance-window deployments.
|
|
23
|
+
|
|
24
|
+
### During
|
|
25
|
+
|
|
26
|
+
#### Pipeline Stages (Lint → Build → Unit Test → Integration Test → Security Scan → Package → Deploy)
|
|
27
|
+
|
|
28
|
+
**Stage 1: Lint** — Linters + type-check first (<60s). Fail fast on errors.
|
|
29
|
+
**Stage 2: Build** — Compile, bundle. Environment-agnostic artifact. Target <3min with cache.
|
|
30
|
+
**Stage 3: Unit Tests** — Coverage reporting. Fail below 80% threshold. Target <5min.
|
|
31
|
+
**Stage 4: Integration Tests** — Real dependencies (testcontainers). Target <10min.
|
|
32
|
+
**Stage 5: Security Scan** — Dependency audit (Snyk/Trivy) + SAST + secret detection. Fail on critical/high.
|
|
33
|
+
**Stage 6: Package** — Create artifact (Docker image/binary). Tag with SHA + semver. Sign and push to registry.
|
|
34
|
+
**Stage 7: Deploy** — Dev → staging → production. Approval gate required for production.
|
|
35
|
+
|
|
36
|
+
#### Quality Gates (Between Stages)
|
|
37
|
+
|
|
38
|
+
- **Gate definition** — A gate is a pass/fail checkpoint that blocks pipeline progression.
|
|
39
|
+
- **Automated gates** — Test coverage threshold, zero critical vulnerabilities, all tests passing, build succeeds.
|
|
40
|
+
- **Manual gates** — Production approval, security review sign-off, change management ticket.
|
|
41
|
+
- **Gate principle** — Every gate must have a clear owner and clear criteria. Ambiguous gates become rubber stamps.
|
|
42
|
+
- **Implementation** — Use CI environment protection rules (GitHub Actions `environment` key with required reviewers).
|
|
43
|
+
|
|
44
|
+
#### Artifact Management
|
|
45
|
+
|
|
46
|
+
- **Immutability** — Once built, an artifact never changes. The same artifact deployed to staging is promoted to production. Never rebuild for production.
|
|
47
|
+
- **Versioning** — Tag every artifact with: git commit SHA (exact), semantic version (human-readable), build timestamp.
|
|
48
|
+
- **Retention** — Keep the last N production artifacts (minimum 5) for rollback. Auto-expire older artifacts.
|
|
49
|
+
- **Signing** — Sign artifacts with a known key. Verify signatures before deployment. Prevents tampered artifacts from reaching production.
|
|
50
|
+
- **Registry hygiene** — Clean untagged/unused images regularly. Container registries grow unbounded without garbage collection.
|
|
51
|
+
|
|
52
|
+
#### Caching Strategy
|
|
53
|
+
|
|
54
|
+
**Dependency cache:**
|
|
55
|
+
- Cache dependencies keyed on lockfile hash. Invalidate only when dependencies change.
|
|
56
|
+
- Use fallback keys for partial cache hits (restore previous deps, update delta only).
|
|
57
|
+
|
|
58
|
+
**Build cache:**
|
|
59
|
+
- Cache compilation outputs (TypeScript tsbuildinfo, Go build cache, Docker layer cache).
|
|
60
|
+
- For Docker: order Dockerfile instructions from least-changing (base image) to most-changing (source code).
|
|
61
|
+
- Cache test results for unchanged code paths (only re-run tests for changed files in PR pipelines).
|
|
62
|
+
|
|
63
|
+
**Cache invalidation:**
|
|
64
|
+
- Key on content hashes, not timestamps. Content-addressed caching prevents stale cache bugs.
|
|
65
|
+
- Set TTL: dependency caches (7 days), build caches (1 day), test caches (1 day).
|
|
66
|
+
- Monitor cache hit rates. Below 60% means the cache key strategy needs adjustment.
|
|
67
|
+
|
|
68
|
+
#### Parallelism and Optimization
|
|
69
|
+
|
|
70
|
+
- **Independent jobs run simultaneously** — Lint, unit tests, and security scan can all run in parallel if they don't depend on each other.
|
|
71
|
+
- **Matrix builds** — Test across multiple versions/platforms simultaneously (node 18/20/22, ubuntu/macos).
|
|
72
|
+
- **Test splitting** — Distribute test files across N parallel runners based on historical timing data.
|
|
73
|
+
- **Fail-fast** — Cancel remaining matrix jobs when one fails (unless full compatibility reporting needed).
|
|
74
|
+
- **Resource optimization** — Smaller runners for lint/test, larger for build/package.
|
|
75
|
+
|
|
76
|
+
#### Secrets Management in CI
|
|
77
|
+
|
|
78
|
+
- **Never in code** — Secrets never appear in source code, Dockerfiles, or CI configuration files.
|
|
79
|
+
- **CI secret stores** — Use platform-native secret management (GitHub Secrets, GitLab CI Variables, AWS Secrets Manager).
|
|
80
|
+
- **Least privilege** — Each job gets only the secrets it needs. Never share production secrets with lint.
|
|
81
|
+
- **Rotation and audit** — Rotate quarterly minimum. Log all secret access. Verify masking in logs (`***`).
|
|
82
|
+
|
|
83
|
+
#### Environment Promotion (Dev → Staging → Production)
|
|
84
|
+
|
|
85
|
+
- **Same artifact** — The exact same build artifact moves through environments. Only configuration (env vars, feature flags) changes.
|
|
86
|
+
- **Progressive rollout** — Production deploys should use: canary (1% traffic) → partial (10%) → full (100%).
|
|
87
|
+
- **Smoke tests** — After each deployment, run a minimal health check. Automatic rollback if smoke tests fail.
|
|
88
|
+
- **Feature flags** — Decouple deployment from release. Deploy code to production with flags off. Enable gradually.
|
|
89
|
+
- **Environment parity** — Staging must mirror production as closely as possible: same infrastructure, same data shape (anonymized), same configuration.
|
|
90
|
+
|
|
91
|
+
#### Rollback Strategy
|
|
92
|
+
|
|
93
|
+
- **Keep N previous artifacts** — Retain last 5 production artifacts for instant rollback.
|
|
94
|
+
- **One-click revert** — Single action (button/CLI), not a multi-step process.
|
|
95
|
+
- **Rollback testing** — Test quarterly. Untested rollbacks fail when needed most.
|
|
96
|
+
- **Database compatibility** — Expand/contract pattern: (1) add new column, (2) deploy new code, (3) remove old column after rollback window.
|
|
97
|
+
- **Auto-rollback triggers** — Error rate >5%, latency p99 >2x baseline, or 3 consecutive health check failures.
|
|
98
|
+
|
|
99
|
+
### After
|
|
100
|
+
|
|
101
|
+
1. **Measure pipeline duration** — Track total time from commit to production. Target: <15 minutes for simple services, <30 minutes for complex ones.
|
|
102
|
+
2. **Monitor reliability** — Track pipeline success rate. Target: >95%. Flaky pipelines erode developer trust.
|
|
103
|
+
3. **Review cost** — Audit CI compute costs monthly. Identify waste: unnecessary matrix builds, oversized runners, uncached builds.
|
|
104
|
+
4. **Test the rollback** — Perform a planned rollback quarterly to verify the procedure works.
|
|
105
|
+
|
|
106
|
+
## Self-check before task completion
|
|
107
|
+
|
|
108
|
+
- [ ] Pipeline stages follow the standard flow: Lint → Build → Test → Scan → Package → Deploy
|
|
109
|
+
- [ ] Quality gates exist between stages with clear pass/fail criteria
|
|
110
|
+
- [ ] Artifacts are immutable, versioned (commit SHA + semver), and signed
|
|
111
|
+
- [ ] Caching is configured for dependencies, builds, and Docker layers with content-based keys
|
|
112
|
+
- [ ] Independent jobs run in parallel (lint, unit tests, security scan)
|
|
113
|
+
- [ ] Secrets are stored in CI secret store with least-privilege access per job
|
|
114
|
+
- [ ] Same artifact promotes through environments (never rebuild for production)
|
|
115
|
+
- [ ] Rollback procedure is documented, automated, and tested
|
|
116
|
+
- [ ] Database migrations are backward-compatible (expand/contract pattern)
|
|
117
|
+
- [ ] Pipeline duration is measured and within acceptable bounds
|
|
118
|
+
- [ ] Pipeline success rate is tracked (target >95%)
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cli-design
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.0.8
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: cli design, command structure, flag design, positional argument, help text design, interactive prompt, exit code, cli ux, subcommand, cli argument parsing, cli error message, terminal output
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# CLI Design
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
This skill activates when designing command-line interfaces, implementing argument parsing, writing help text, handling terminal output formatting, or improving CLI user experience. It applies to new CLI tools, adding commands to existing CLIs, and refactoring CLI ergonomics.
|
|
14
|
+
|
|
15
|
+
## Mandatory actions when this skill is active
|
|
16
|
+
|
|
17
|
+
### Before
|
|
18
|
+
|
|
19
|
+
1. Define the primary audience (developers, ops engineers, end users, CI systems).
|
|
20
|
+
2. Identify the core verbs/actions the CLI must support.
|
|
21
|
+
3. Survey existing CLIs in the same domain for convention alignment (users have muscle memory).
|
|
22
|
+
4. Determine if the CLI will be used interactively (TTY), in scripts (pipes), or both.
|
|
23
|
+
5. Choose the argument parsing library (Commander/yargs for Node, Click/Typer for Python, Cobra for Go, clap for Rust).
|
|
24
|
+
|
|
25
|
+
### During
|
|
26
|
+
|
|
27
|
+
**Command Structure:**
|
|
28
|
+
- Use verb-noun pattern: `app deploy staging`, `app config set key=value`.
|
|
29
|
+
- Group related actions under subcommands: `app auth login`, `app auth logout`.
|
|
30
|
+
- Keep top-level commands to 5-8 maximum. Use subcommands for depth.
|
|
31
|
+
- Command names: lowercase, no hyphens in primary commands (use hyphens in flags only).
|
|
32
|
+
- Avoid ambiguity: `app delete project` not `app rm proj` (clarity over brevity for destructive ops).
|
|
33
|
+
|
|
34
|
+
**Flags and Options:**
|
|
35
|
+
- Boolean flags: `--verbose`, `--force`, `--dry-run` (no value needed).
|
|
36
|
+
- Value flags: `--output json`, `--timeout 30s`, `--config ./my-config.yaml`.
|
|
37
|
+
- Short aliases for common flags: `-v` (verbose), `-f` (force), `-o` (output), `-q` (quiet).
|
|
38
|
+
- Required options should be positional arguments, not flags (reduce typing for common case).
|
|
39
|
+
- Provide sensible defaults: `--timeout 30s` rather than requiring explicit timeout every time.
|
|
40
|
+
|
|
41
|
+
**Positional Arguments:**
|
|
42
|
+
- Required arguments come first, optional arguments last.
|
|
43
|
+
- Maximum 2-3 positional arguments (beyond that, use flags for clarity).
|
|
44
|
+
- Name them descriptively in help text: `app deploy <environment> [version]`.
|
|
45
|
+
- Support reading from stdin when positional is missing: `echo "data" | app process`.
|
|
46
|
+
|
|
47
|
+
**Help Text Design:**
|
|
48
|
+
```
|
|
49
|
+
Usage: app <command> [options]
|
|
50
|
+
|
|
51
|
+
Commands:
|
|
52
|
+
deploy Deploy application to target environment
|
|
53
|
+
config Manage configuration settings
|
|
54
|
+
status Show current deployment status
|
|
55
|
+
|
|
56
|
+
Options:
|
|
57
|
+
-v, --verbose Show detailed output
|
|
58
|
+
-q, --quiet Suppress non-error output
|
|
59
|
+
-h, --help Show this help message
|
|
60
|
+
--version Show version number
|
|
61
|
+
|
|
62
|
+
Examples:
|
|
63
|
+
app deploy staging Deploy to staging
|
|
64
|
+
app deploy prod --dry-run Preview production deployment
|
|
65
|
+
app config set region=us-east Set region config
|
|
66
|
+
```
|
|
67
|
+
- One-line description per command (max 60 chars).
|
|
68
|
+
- Always include 2-3 examples showing real usage.
|
|
69
|
+
- Group options logically (common first, advanced last).
|
|
70
|
+
- `--help` must work on every subcommand.
|
|
71
|
+
|
|
72
|
+
**Interactive Prompts:**
|
|
73
|
+
- Only prompt when stdin is a TTY (check `process.stdin.isTTY` or equivalent).
|
|
74
|
+
- In CI/pipe mode: fail with clear error if required input is missing.
|
|
75
|
+
- Use confirmation prompts for destructive actions: "Delete 47 files? [y/N]".
|
|
76
|
+
- Default to the safe option (N for destructive, Y for read-only).
|
|
77
|
+
- Support `--yes` / `--no-input` flag to skip all prompts (for automation).
|
|
78
|
+
|
|
79
|
+
**Exit Codes:**
|
|
80
|
+
- `0` — Success. Command completed as expected.
|
|
81
|
+
- `1` — General error. Something went wrong during execution.
|
|
82
|
+
- `2` — Misuse. Invalid arguments, unknown flags, missing required input.
|
|
83
|
+
- `130` — Interrupted (Ctrl+C / SIGINT).
|
|
84
|
+
- Document non-standard exit codes if used (e.g., `3` = partial success).
|
|
85
|
+
- Always exit with non-zero on failure (scripts depend on this).
|
|
86
|
+
|
|
87
|
+
**Output Design:**
|
|
88
|
+
- **Human mode** (TTY): Colors, progress bars, tables, spinners.
|
|
89
|
+
- **Machine mode** (pipe/CI): Plain text or structured (JSON/CSV), no ANSI codes.
|
|
90
|
+
- Auto-detect: `if (stdout.isTTY) { prettyOutput() } else { jsonOutput() }`.
|
|
91
|
+
- Support `--output json` flag to force structured output regardless of TTY.
|
|
92
|
+
- Errors go to stderr, data goes to stdout (enables `app list | grep "prod"`).
|
|
93
|
+
|
|
94
|
+
**Error Messages:**
|
|
95
|
+
- **What went wrong**: "Failed to connect to database at localhost:5432."
|
|
96
|
+
- **Why it failed**: "Connection refused — is the database server running?"
|
|
97
|
+
- **What to do**: "Run `docker compose up db` to start the database."
|
|
98
|
+
- Never show raw stack traces to users (log them with `--verbose`).
|
|
99
|
+
- Include error codes for searchability: `[ERR_DB_CONNECT] Failed to connect...`.
|
|
100
|
+
|
|
101
|
+
### After
|
|
102
|
+
|
|
103
|
+
1. Every command has `--help` with description, usage pattern, and examples.
|
|
104
|
+
2. Exit codes are consistent and documented.
|
|
105
|
+
3. Output works correctly in both TTY and pipe modes.
|
|
106
|
+
4. Destructive commands require confirmation (skippable with `--yes`).
|
|
107
|
+
5. Error messages are actionable (user knows what to do next).
|
|
108
|
+
|
|
109
|
+
## Self-check before task completion
|
|
110
|
+
|
|
111
|
+
- [ ] Command structure follows verb-noun convention consistently.
|
|
112
|
+
- [ ] All flags have both long form (`--verbose`) and short form (`-v`) for common options.
|
|
113
|
+
- [ ] Help text includes real-world examples (not just abstract usage patterns).
|
|
114
|
+
- [ ] Interactive prompts are suppressed in non-TTY environments.
|
|
115
|
+
- [ ] Exit codes distinguish success (0), general error (1), and misuse (2).
|
|
116
|
+
- [ ] Output format adapts to context (pretty for humans, structured for scripts).
|
|
117
|
+
- [ ] Error messages include what failed, why, and what to do next.
|
|
118
|
+
- [ ] Destructive operations require explicit confirmation or `--force` flag.
|