mindforge-cc 10.0.3 → 11.0.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/MINDFORGE-V2-SCHEMA.json +43 -10
- package/.mindforge/config.json +30 -2
- package/.mindforge/engine/cross-model-eval.md +74 -0
- package/.mindforge/engine/proactive/signal-detector.md +60 -0
- package/.mindforge/engine/proactive/suggestion-engine.md +100 -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/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/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/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-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 +674 -44
- 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/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-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/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/contract-testing/SKILL.md +85 -0
- package/.mindforge/skills/cost-estimation/SKILL.md +82 -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/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-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/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 +13 -1
- 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 +240 -0
- package/MINDFORGE.md +4 -4
- package/README.md +49 -4
- package/RELEASENOTES.md +80 -0
- package/SECURITY.md +20 -8
- package/bin/autonomous/audit-writer.js +13 -0
- package/bin/autonomous/auto-runner.js +74 -16
- package/bin/autonomous/context-refactorer.js +26 -11
- package/bin/autonomous/state-manager.js +62 -6
- package/bin/autonomous/stuck-monitor.js +46 -7
- package/bin/autonomous/wave-executor.js +66 -25
- package/bin/dashboard/api-router.js +43 -0
- package/bin/dashboard/metrics-aggregator.js +28 -1
- package/bin/dashboard/server.js +67 -4
- package/bin/dashboard/sse-bridge.js +4 -4
- package/bin/engine/feedback-loop.js +8 -0
- package/bin/engine/intelligence-interlock.js +32 -15
- package/bin/engine/logic-drift-detector.js +2 -1
- package/bin/engine/nexus-tracer.js +3 -2
- package/bin/engine/remediation-engine.js +155 -32
- package/bin/engine/self-corrective-synthesizer.js +84 -10
- package/bin/engine/sre-manager.js +12 -4
- package/bin/engine/temporal-hub.js +131 -34
- package/bin/governance/approve.js +41 -5
- package/bin/governance/impact-analyzer.js +28 -0
- package/bin/governance/policy-engine.js +10 -3
- package/bin/governance/quantum-crypto.js +32 -19
- package/bin/governance/rbac-manager.js +74 -2
- package/bin/governance/ztai-manager.js +49 -7
- package/bin/hindsight-injector.js +3 -3
- package/bin/memory/eis-client.js +71 -34
- package/bin/memory/embedding-engine.js +61 -0
- package/bin/memory/knowledge-graph.js +58 -5
- package/bin/memory/knowledge-indexer.js +53 -6
- package/bin/memory/knowledge-store.js +22 -0
- package/bin/migrations/10.7.0-to-11.0.0.js +110 -0
- package/bin/migrations/schema-versions.js +13 -0
- package/bin/models/anthropic-provider.js +45 -0
- package/bin/models/cloud-broker.js +68 -20
- package/bin/models/gemini-provider.js +51 -0
- package/bin/models/model-client.js +20 -0
- package/bin/models/model-router.js +28 -8
- package/bin/models/openai-provider.js +44 -0
- package/bin/utils/file-io.js +63 -1
- package/bin/utils/index.js +58 -0
- package/docs/getting-started.md +1 -1
- package/docs/user-guide.md +2 -2
- package/package.json +2 -2
- package/.mindforge/personas/data-privacy-engineer.md +0 -187
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-vs-buy
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.1.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: build vs buy, make or buy, vendor evaluation, total cost ownership, buy decision, vendor lock-in assessment, outsource vs build, third-party evaluation, SaaS vs self-hosted, dependency vs custom, commercial vs open-source, build internally
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Build vs Buy Decision Framework
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
This skill activates when the team faces a decision about whether to build a capability
|
|
14
|
+
internally or acquire it from an external vendor, open-source project, or SaaS provider.
|
|
15
|
+
It provides a structured framework for evaluating total cost of ownership, strategic
|
|
16
|
+
alignment, and long-term maintainability of both paths.
|
|
17
|
+
|
|
18
|
+
## Mandatory actions when this skill is active
|
|
19
|
+
|
|
20
|
+
### Before
|
|
21
|
+
|
|
22
|
+
1. **Identify the capability boundary** — Define exactly what the system needs to do.
|
|
23
|
+
Separate the core problem from adjacent concerns.
|
|
24
|
+
2. **Gather constraints** — Timeline pressure, team capacity, budget ceiling, compliance
|
|
25
|
+
requirements, and existing technology stack compatibility.
|
|
26
|
+
3. **Catalog candidates** — List all viable buy options (commercial SaaS, open-source
|
|
27
|
+
libraries, managed services) alongside the build option.
|
|
28
|
+
|
|
29
|
+
### During
|
|
30
|
+
|
|
31
|
+
4. **Calculate Total Cost of Ownership (TCO) for BUY path:**
|
|
32
|
+
- License/subscription fees (year 1 + projected 3-year)
|
|
33
|
+
- Integration effort (API adapters, data transformation, auth hookup)
|
|
34
|
+
- Ongoing maintenance (version upgrades, breaking changes, support tickets)
|
|
35
|
+
- Opportunity cost of vendor limitations (features you cannot customize)
|
|
36
|
+
- Exit cost (data migration, API decoupling, replacement timeline)
|
|
37
|
+
|
|
38
|
+
5. **Calculate Total Cost of Ownership (TCO) for BUILD path:**
|
|
39
|
+
- Initial development effort (design + implementation + testing)
|
|
40
|
+
- Ongoing maintenance (bug fixes, feature requests, security patches)
|
|
41
|
+
- Ownership benefit (full control, no per-seat pricing, no vendor roadmap dependency)
|
|
42
|
+
- Knowledge investment (team learns the domain deeply)
|
|
43
|
+
|
|
44
|
+
6. **Assess vendor lock-in risk:**
|
|
45
|
+
- Data portability — Can you export all data in standard formats?
|
|
46
|
+
- API coupling — How deeply does the vendor API penetrate your codebase?
|
|
47
|
+
- Exit cost — What is the realistic effort to replace this vendor?
|
|
48
|
+
- Contractual traps — Auto-renewal, price escalation clauses, minimum commitments.
|
|
49
|
+
|
|
50
|
+
7. **Apply the decision matrix:**
|
|
51
|
+
- Strategic importance HIGH + Competitive advantage = **BUILD**
|
|
52
|
+
- Strategic importance LOW + Commodity capability = **BUY**
|
|
53
|
+
- Timeline pressure HIGH + Team capacity LOW = **BUY** (short-term), plan migration
|
|
54
|
+
- Timeline pressure LOW + Team capacity HIGH = **BUILD**
|
|
55
|
+
- Differentiating capability = **BUILD** (never outsource your moat)
|
|
56
|
+
- Undifferentiated heavy lifting = **BUY**
|
|
57
|
+
|
|
58
|
+
8. **Evaluate team capacity:**
|
|
59
|
+
- Does the team have domain expertise to build and maintain this?
|
|
60
|
+
- Will building this distract from higher-priority work?
|
|
61
|
+
- Is there a realistic staffing plan for long-term ownership?
|
|
62
|
+
|
|
63
|
+
### After
|
|
64
|
+
|
|
65
|
+
9. **Document the decision** — Record the rationale, TCO comparison, and risk assessment
|
|
66
|
+
as an Architecture Decision Record (ADR).
|
|
67
|
+
10. **Define review triggers** — Set conditions that would cause re-evaluation (e.g.,
|
|
68
|
+
vendor price increase >30%, team growth enabling build, vendor acquisition).
|
|
69
|
+
11. **Plan the exit path** — Even when buying, design integration layers that allow
|
|
70
|
+
future replacement without full rewrite.
|
|
71
|
+
|
|
72
|
+
## Self-check before task completion
|
|
73
|
+
|
|
74
|
+
- [ ] TCO calculated for both paths with 3-year projection
|
|
75
|
+
- [ ] Vendor lock-in risk explicitly assessed with exit cost estimate
|
|
76
|
+
- [ ] Decision matrix applied with clear justification
|
|
77
|
+
- [ ] Team capacity and opportunity cost considered
|
|
78
|
+
- [ ] ADR written with rationale and review triggers
|
|
79
|
+
- [ ] Integration designed with abstraction layer regardless of buy/build choice
|
|
80
|
+
- [ ] Stakeholders informed of trade-offs, not just the recommendation
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bundle-optimization
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 0.3.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: bundle optimization, tree shaking, code splitting strategy, dynamic import, chunk naming, preload hint, prefetch strategy, bundle analyzer, unused code elimination, lazy module, vendor splitting, entry point optimization
|
|
7
|
+
compose: performance
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill — Bundle Optimization
|
|
11
|
+
|
|
12
|
+
## When this skill activates
|
|
13
|
+
Any task involving JavaScript/TypeScript bundle size reduction, tree shaking,
|
|
14
|
+
code splitting, lazy loading, or front-end performance budgets.
|
|
15
|
+
|
|
16
|
+
## Mandatory actions when this skill is active
|
|
17
|
+
|
|
18
|
+
### Before optimizing
|
|
19
|
+
1. Run bundle analyzer to identify what is currently large.
|
|
20
|
+
2. Set a performance budget (target numbers, not "make it smaller").
|
|
21
|
+
3. Measure current metrics: total bundle size, initial load size, LCP impact.
|
|
22
|
+
|
|
23
|
+
### Performance budgets
|
|
24
|
+
|
|
25
|
+
| Metric | Target |
|
|
26
|
+
|--------|--------|
|
|
27
|
+
| Main bundle (gzipped) | < 100KB |
|
|
28
|
+
| Total initial JS (gzipped) | < 300KB |
|
|
29
|
+
| Largest single chunk | < 150KB |
|
|
30
|
+
| Time to Interactive (3G) | < 5s |
|
|
31
|
+
|
|
32
|
+
### Tree shaking
|
|
33
|
+
|
|
34
|
+
**Requirements for tree shaking to work:**
|
|
35
|
+
- Use ESM (import/export), not CommonJS (require/module.exports).
|
|
36
|
+
- Mark packages as side-effect-free: `"sideEffects": false` in package.json.
|
|
37
|
+
- Avoid re-exporting everything via barrel files (index.ts with `export * from`).
|
|
38
|
+
- Import specific functions: `import { debounce } from 'lodash-es'` not `import _ from 'lodash'`.
|
|
39
|
+
|
|
40
|
+
**Common tree-shaking failures:**
|
|
41
|
+
- CommonJS modules (cannot be statically analyzed).
|
|
42
|
+
- Barrel files that import everything regardless of usage.
|
|
43
|
+
- Side effects in module top-level scope (global CSS imports, polyfills).
|
|
44
|
+
- Dynamic property access: `lib[method]()` prevents dead code elimination.
|
|
45
|
+
|
|
46
|
+
**Fix barrel file problem:**
|
|
47
|
+
```javascript
|
|
48
|
+
// BAD: barrel imports everything
|
|
49
|
+
import { Button } from '@/components';
|
|
50
|
+
|
|
51
|
+
// GOOD: direct import only loads Button
|
|
52
|
+
import { Button } from '@/components/Button';
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Code splitting
|
|
56
|
+
|
|
57
|
+
**Route-based splitting (most impactful):**
|
|
58
|
+
```javascript
|
|
59
|
+
// React
|
|
60
|
+
const Dashboard = React.lazy(() => import('./pages/Dashboard'));
|
|
61
|
+
const Settings = React.lazy(() => import('./pages/Settings'));
|
|
62
|
+
|
|
63
|
+
// Next.js: automatic per-page splitting (built-in)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Component-based splitting (for heavy components):**
|
|
67
|
+
```javascript
|
|
68
|
+
// Only load chart library when chart is rendered
|
|
69
|
+
const Chart = React.lazy(() => import('./Chart'));
|
|
70
|
+
|
|
71
|
+
// With loading state
|
|
72
|
+
<Suspense fallback={<ChartSkeleton />}>
|
|
73
|
+
<Chart data={data} />
|
|
74
|
+
</Suspense>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Library-based splitting:**
|
|
78
|
+
- Heavy libraries (moment, chart.js, monaco-editor) should never be in the main bundle.
|
|
79
|
+
- Dynamic import at point of use.
|
|
80
|
+
- Consider lighter alternatives (date-fns vs moment, lightweight chart libs).
|
|
81
|
+
|
|
82
|
+
### Vendor splitting
|
|
83
|
+
|
|
84
|
+
**Strategy: separate stable code from frequently changing code.**
|
|
85
|
+
|
|
86
|
+
```javascript
|
|
87
|
+
// webpack config
|
|
88
|
+
optimization: {
|
|
89
|
+
splitChunks: {
|
|
90
|
+
cacheGroups: {
|
|
91
|
+
vendor: {
|
|
92
|
+
test: /[\\/]node_modules[\\/]/,
|
|
93
|
+
name: 'vendor',
|
|
94
|
+
chunks: 'all',
|
|
95
|
+
},
|
|
96
|
+
framework: {
|
|
97
|
+
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
|
|
98
|
+
name: 'framework',
|
|
99
|
+
priority: 10,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Benefits:**
|
|
107
|
+
- Vendor chunk changes rarely → long cache lifetime.
|
|
108
|
+
- Application chunk changes often → short cache lifetime.
|
|
109
|
+
- Framework chunk (React) changes almost never → very long cache.
|
|
110
|
+
|
|
111
|
+
### Preload and prefetch hints
|
|
112
|
+
|
|
113
|
+
**Preload (critical, needed NOW):**
|
|
114
|
+
```html
|
|
115
|
+
<link rel="preload" href="/fonts/main.woff2" as="font" crossorigin>
|
|
116
|
+
<link rel="preload" href="/critical.js" as="script">
|
|
117
|
+
```
|
|
118
|
+
- Use for: fonts, above-the-fold images, critical JS/CSS.
|
|
119
|
+
- Preload too much = competing bandwidth = slower overall.
|
|
120
|
+
|
|
121
|
+
**Prefetch (likely needed SOON):**
|
|
122
|
+
```html
|
|
123
|
+
<link rel="prefetch" href="/next-page-bundle.js">
|
|
124
|
+
```
|
|
125
|
+
- Use for: next route the user is likely to navigate to.
|
|
126
|
+
- Loads during idle time, does not compete with critical resources.
|
|
127
|
+
- React Router / Next.js: prefetch on link hover or viewport intersection.
|
|
128
|
+
|
|
129
|
+
### Analysis tools
|
|
130
|
+
|
|
131
|
+
**webpack-bundle-analyzer:**
|
|
132
|
+
```bash
|
|
133
|
+
npx webpack-bundle-analyzer stats.json
|
|
134
|
+
```
|
|
135
|
+
- Treemap visualization of all chunks.
|
|
136
|
+
- Identify unexpectedly large modules.
|
|
137
|
+
|
|
138
|
+
**source-map-explorer:**
|
|
139
|
+
```bash
|
|
140
|
+
npx source-map-explorer dist/main.js
|
|
141
|
+
```
|
|
142
|
+
- Shows byte-level contribution of each module.
|
|
143
|
+
- Works with any bundler that produces source maps.
|
|
144
|
+
|
|
145
|
+
**bundlephobia.com:**
|
|
146
|
+
- Check package size before adding a dependency.
|
|
147
|
+
- Shows gzipped size, tree-shakeable status, download time.
|
|
148
|
+
|
|
149
|
+
### Unused code elimination
|
|
150
|
+
|
|
151
|
+
- **dead code:** code that is never executed (if-false branches, unreachable after return).
|
|
152
|
+
- **unused exports:** functions exported but never imported anywhere.
|
|
153
|
+
- Detect with: `knip`, `ts-prune`, or bundler warnings.
|
|
154
|
+
- Remove aggressively — version control has the history if you need it back.
|
|
155
|
+
|
|
156
|
+
### Dynamic imports best practices
|
|
157
|
+
|
|
158
|
+
- Name chunks for debugging: `import(/* webpackChunkName: "chart" */ './Chart')`.
|
|
159
|
+
- Error boundary around lazy components (handle load failures gracefully).
|
|
160
|
+
- Retry failed chunk loads (network errors) with exponential backoff.
|
|
161
|
+
- Use `webpackPreload` / `webpackPrefetch` magic comments where appropriate.
|
|
162
|
+
|
|
163
|
+
### Monitoring
|
|
164
|
+
|
|
165
|
+
- CI check: fail build if bundle exceeds budget (bundlesize, size-limit).
|
|
166
|
+
- Track bundle size over time in dashboard.
|
|
167
|
+
- Alert on sudden increases (new dependency or misconfigured import).
|
|
168
|
+
- Compare bundle size in PR comments (relative to main branch).
|
|
169
|
+
|
|
170
|
+
## Self-check before task completion
|
|
171
|
+
- [ ] Did I follow the mandatory actions for this skill?
|
|
172
|
+
- [ ] Did I apply the patterns appropriate to the context?
|
|
173
|
+
- [ ] Did I verify the implementation meets the criteria above?
|
|
174
|
+
- [ ] Did I document decisions and trade-offs made?
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: business-analyst
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.0.6
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: business requirements, BRD, stakeholder analysis, RACI matrix, gap analysis, swimlane diagram, use case, requirements elicitation, business process, stakeholder mapping, as-is to-be, requirement gathering
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill — Business Analyst
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
Any task involving business requirements gathering, stakeholder analysis, process mapping,
|
|
13
|
+
gap analysis, use case documentation, or translating business needs into specifications.
|
|
14
|
+
|
|
15
|
+
## Mandatory actions when this skill is active
|
|
16
|
+
|
|
17
|
+
### Before
|
|
18
|
+
|
|
19
|
+
1. **State the business problem** — One sentence, no solution referenced. If unclear, more discovery is needed.
|
|
20
|
+
2. **Map stakeholders** — Register with name, role, influence, and communication preference.
|
|
21
|
+
3. **Define scope** — Explicitly state IN scope and OUT of scope to prevent creep.
|
|
22
|
+
|
|
23
|
+
### During
|
|
24
|
+
|
|
25
|
+
#### Stakeholder power-interest grid
|
|
26
|
+
```
|
|
27
|
+
High Power + High Interest = Manage Closely (co-create requirements)
|
|
28
|
+
High Power + Low Interest = Keep Satisfied (executive summaries only)
|
|
29
|
+
Low Power + High Interest = Keep Informed (regular updates)
|
|
30
|
+
Low Power + Low Interest = Monitor (minimal engagement)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### Elicitation techniques (use 2+ per requirement set)
|
|
34
|
+
1. Structured interviews (10-15 open questions, 45-60 min per group)
|
|
35
|
+
2. Requirements workshops (3-8 cross-functional participants, affinity mapping)
|
|
36
|
+
3. Observation / contextual inquiry (shadow users, document workarounds)
|
|
37
|
+
4. Document analysis (SOPs, training materials, support tickets)
|
|
38
|
+
5. Prototyping (low-fidelity mockups to validate understanding)
|
|
39
|
+
|
|
40
|
+
#### BRD sections (mandatory 10)
|
|
41
|
+
1. Executive Summary | 2. Business Objectives + KPIs | 3. Scope (in/out/assumptions/constraints) | 4. Stakeholders + RACI | 5. Current State (AS-IS) | 6. Future State (TO-BE) | 7. Functional Requirements (numbered, prioritized) | 8. Non-Functional Requirements | 9. Risks + Mitigations | 10. Approval + Sign-off
|
|
42
|
+
|
|
43
|
+
#### RACI matrix rules
|
|
44
|
+
- Exactly ONE Accountable (A) per row — the final decision-maker
|
|
45
|
+
- At least one Responsible (R) per row — does the work
|
|
46
|
+
- Consulted (C) — input before decision; Informed (I) — notified after
|
|
47
|
+
|
|
48
|
+
#### AS-IS / TO-BE process mapping
|
|
49
|
+
- Swimlane format: one lane per actor/system
|
|
50
|
+
- Mark pain points with quantified impact (time wasted, error rate, cost)
|
|
51
|
+
- TO-BE shows measurable improvement for each pain point
|
|
52
|
+
- Calculate improvement metrics (e.g., "3 days to same-day, 93% reduction")
|
|
53
|
+
|
|
54
|
+
#### Gap analysis matrix
|
|
55
|
+
```
|
|
56
|
+
| Current State | Desired State | Gap Type | Action Required | Priority |
|
|
57
|
+
Gap types: Process | System | Automation | Data | People | Compliance
|
|
58
|
+
Every gap maps to a concrete, assignable action.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### Use case template
|
|
62
|
+
- Actor, Precondition, Postcondition
|
|
63
|
+
- Main flow (numbered steps, system responses)
|
|
64
|
+
- Alternative flows (branching scenarios)
|
|
65
|
+
- Exception flows (error handling, edge cases)
|
|
66
|
+
|
|
67
|
+
### After
|
|
68
|
+
|
|
69
|
+
1. **Validate with stakeholders** — Walk through BRD with each group, confirm understanding.
|
|
70
|
+
2. **Trace to objectives** — Every requirement links to a business objective. Orphans = scope creep.
|
|
71
|
+
3. **Confirm testability** — Every functional requirement has a verifiable acceptance criterion.
|
|
72
|
+
4. **Version and baseline** — Lock approved requirements. Track changes via formal CR process.
|
|
73
|
+
|
|
74
|
+
## Self-check before task completion
|
|
75
|
+
- [ ] Business problem articulated without referencing a solution
|
|
76
|
+
- [ ] Stakeholder register complete with power-interest classification
|
|
77
|
+
- [ ] RACI defined for key decisions (exactly one A per row)
|
|
78
|
+
- [ ] AS-IS process documented with quantified pain points
|
|
79
|
+
- [ ] TO-BE shows measurable improvement over AS-IS
|
|
80
|
+
- [ ] Gap analysis maps every gap to a concrete action
|
|
81
|
+
- [ ] Requirements numbered, prioritized, traceable to objectives
|
|
82
|
+
- [ ] Use cases cover main, alternative, and exception flows
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: caching-strategies
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 0.1.0
|
|
5
|
+
status: stable
|
|
6
|
+
compose: performance
|
|
7
|
+
triggers: caching strategy, cache aside, write through cache, write behind cache, cache invalidation pattern, TTL design, cache warming, cache stampede, cache eviction, distributed cache pattern, cache coherence, cache layer design
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill — Caching Strategies
|
|
11
|
+
|
|
12
|
+
## When this skill activates
|
|
13
|
+
Any task involving cache layer design, cache invalidation, stampede prevention,
|
|
14
|
+
TTL configuration, or distributed caching patterns.
|
|
15
|
+
|
|
16
|
+
## Mandatory actions when this skill is active
|
|
17
|
+
|
|
18
|
+
### Before writing any code
|
|
19
|
+
1. Identify the data access pattern (read-heavy, write-heavy, mixed).
|
|
20
|
+
2. Select the appropriate caching pattern for the use case.
|
|
21
|
+
3. Define the invalidation strategy before implementing the cache.
|
|
22
|
+
|
|
23
|
+
### During implementation
|
|
24
|
+
- Implement stampede prevention for all high-traffic cache keys.
|
|
25
|
+
- Set TTLs appropriate to data volatility.
|
|
26
|
+
- Add cache hit/miss metrics instrumentation.
|
|
27
|
+
|
|
28
|
+
### After implementation
|
|
29
|
+
- Verify cache hit rate meets target (>90% for hot paths).
|
|
30
|
+
- Document the caching layer in ARCHITECTURE.md.
|
|
31
|
+
- Add monitoring alerts for cache exhaustion and low hit rates.
|
|
32
|
+
|
|
33
|
+
## Caching Patterns
|
|
34
|
+
|
|
35
|
+
### Cache-Aside (Lazy Loading)
|
|
36
|
+
- Application manages the cache explicitly.
|
|
37
|
+
- Read: check cache → miss → read DB → populate cache → return.
|
|
38
|
+
- Write: update DB → invalidate cache (not update).
|
|
39
|
+
- Best for: read-heavy workloads with tolerance for occasional stale data.
|
|
40
|
+
- Risk: thundering herd on cold start or mass invalidation.
|
|
41
|
+
|
|
42
|
+
### Write-Through
|
|
43
|
+
- Application writes to cache and DB synchronously.
|
|
44
|
+
- Every write updates both cache and store atomically.
|
|
45
|
+
- Read: always from cache (guaranteed fresh).
|
|
46
|
+
- Best for: data that is read immediately after write.
|
|
47
|
+
- Trade-off: higher write latency, but reads are always consistent.
|
|
48
|
+
|
|
49
|
+
### Write-Behind (Write-Back)
|
|
50
|
+
- Application writes to cache; cache asynchronously flushes to DB.
|
|
51
|
+
- Dramatically reduces write latency.
|
|
52
|
+
- Best for: high write throughput where eventual consistency is acceptable.
|
|
53
|
+
- Risk: data loss if cache node crashes before flush.
|
|
54
|
+
|
|
55
|
+
## Invalidation Strategies
|
|
56
|
+
|
|
57
|
+
### Event-Based Invalidation
|
|
58
|
+
- Publish cache invalidation events on data mutation.
|
|
59
|
+
- Consumers invalidate specific keys on receipt.
|
|
60
|
+
- Most precise — invalidates only what changed.
|
|
61
|
+
|
|
62
|
+
### TTL-Based Expiration
|
|
63
|
+
- Set time-to-live on every cache entry.
|
|
64
|
+
- Safety net, not a primary strategy.
|
|
65
|
+
- Short TTL for volatile data (30s-5m), long TTL for static data (1h-24h).
|
|
66
|
+
|
|
67
|
+
### Version-Based Invalidation
|
|
68
|
+
- Include version number in cache key.
|
|
69
|
+
- Increment version on data change — old key naturally expires.
|
|
70
|
+
- Good for configuration and template caching.
|
|
71
|
+
|
|
72
|
+
## Stampede Prevention
|
|
73
|
+
|
|
74
|
+
### Lock/Mutex Pattern
|
|
75
|
+
- First request acquires lock, fetches from DB, populates cache.
|
|
76
|
+
- Subsequent requests wait on lock, then read from cache.
|
|
77
|
+
- Prevents N simultaneous DB queries for same key.
|
|
78
|
+
|
|
79
|
+
### Stale-While-Revalidate
|
|
80
|
+
- Serve stale cached data immediately.
|
|
81
|
+
- Trigger background refresh asynchronously.
|
|
82
|
+
- User gets fast response; cache refreshes in background.
|
|
83
|
+
|
|
84
|
+
### Pre-Computation
|
|
85
|
+
- Refresh cache entries before they expire.
|
|
86
|
+
- Background job renews popular keys proactively.
|
|
87
|
+
- Eliminates cold-cache scenarios entirely.
|
|
88
|
+
|
|
89
|
+
## TTL Design Guidelines
|
|
90
|
+
|
|
91
|
+
| Data Type | Recommended TTL | Rationale |
|
|
92
|
+
|-----------|----------------|-----------|
|
|
93
|
+
| User session | 15-30 minutes | Security balance |
|
|
94
|
+
| Product catalog | 1-4 hours | Changes infrequently |
|
|
95
|
+
| Static assets | 24h-7 days | Immutable after deploy |
|
|
96
|
+
| Real-time prices | 5-30 seconds | High volatility |
|
|
97
|
+
| Configuration | 5-15 minutes | Moderate change rate |
|
|
98
|
+
|
|
99
|
+
## Cache Warming
|
|
100
|
+
|
|
101
|
+
- Pre-populate cache on deployment with known hot data.
|
|
102
|
+
- Run warming job during maintenance windows.
|
|
103
|
+
- Prioritize by access frequency (top 20% of keys = 80% of traffic).
|
|
104
|
+
- Warm incrementally to avoid overwhelming the data store.
|
|
105
|
+
|
|
106
|
+
## Cache Layers (Multi-Tier)
|
|
107
|
+
|
|
108
|
+
### L1: In-Process Cache
|
|
109
|
+
- Fastest (nanoseconds), limited by application memory.
|
|
110
|
+
- Use for: config, feature flags, frequently accessed reference data.
|
|
111
|
+
- Examples: Caffeine (Java), node-cache (Node.js), lru-cache.
|
|
112
|
+
|
|
113
|
+
### L2: Distributed Cache
|
|
114
|
+
- Shared across instances, millisecond latency.
|
|
115
|
+
- Use for: session data, computed results, API responses.
|
|
116
|
+
- Examples: Redis, Memcached, Hazelcast.
|
|
117
|
+
|
|
118
|
+
### L3: CDN Cache
|
|
119
|
+
- Edge-cached, global distribution.
|
|
120
|
+
- Use for: static assets, public API responses, media.
|
|
121
|
+
- Examples: CloudFront, Cloudflare, Fastly.
|
|
122
|
+
|
|
123
|
+
## Self-check before task completion
|
|
124
|
+
|
|
125
|
+
Before marking a task done when this skill was active:
|
|
126
|
+
|
|
127
|
+
- [ ] Did I read the full SKILL.md before starting? (Not just the triggers)
|
|
128
|
+
- [ ] Did I define an invalidation strategy for every cached entity?
|
|
129
|
+
- [ ] Did I implement stampede prevention for high-traffic keys?
|
|
130
|
+
- [ ] Did I set appropriate TTLs with documented rationale?
|
|
131
|
+
- [ ] Did I add cache hit/miss metrics?
|
|
132
|
+
- [ ] Did I document the caching layer in ARCHITECTURE.md?
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: capacity-planning
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.0.9
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: capacity planning, growth forecasting, resource scaling trigger, headroom calculation, degradation curve, saturation point, scaling threshold, load projection, capacity model, bottleneck forecast, resource budget, traffic forecast
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill — Capacity Planning
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
Any task involving capacity modeling, growth forecasting, scaling triggers,
|
|
13
|
+
headroom calculation, saturation point analysis, or bottleneck forecasting.
|
|
14
|
+
|
|
15
|
+
## Mandatory actions when this skill is active
|
|
16
|
+
|
|
17
|
+
### Before writing any code
|
|
18
|
+
1. Measure current utilization across all system components.
|
|
19
|
+
2. Model growth using historical data and planned launches.
|
|
20
|
+
3. Identify the first bottleneck (component that saturates first).
|
|
21
|
+
|
|
22
|
+
### During implementation
|
|
23
|
+
- Define scaling triggers with thresholds and cooldown periods.
|
|
24
|
+
- Implement capacity metrics (utilization, queue depth, latency).
|
|
25
|
+
- Configure auto-scaling aligned with the capacity model.
|
|
26
|
+
- Maintain 30-40% headroom above expected peak.
|
|
27
|
+
|
|
28
|
+
### After implementation
|
|
29
|
+
- Validate model with load testing at projected future load.
|
|
30
|
+
- Set alerts for approaching saturation (70%, 85%, 95%).
|
|
31
|
+
- Schedule quarterly capacity review to recalibrate.
|
|
32
|
+
|
|
33
|
+
## Methodology
|
|
34
|
+
|
|
35
|
+
1. **Measure**: baseline CPU, memory, disk IO, network, app-level metrics (p50/p95/p99).
|
|
36
|
+
2. **Model**: organic growth + step functions (launches) + seasonal patterns.
|
|
37
|
+
3. **Identify**: map each component to its saturation point, find the first bottleneck.
|
|
38
|
+
4. **Plan**: define scaling triggers, budget infrastructure, document runbook.
|
|
39
|
+
|
|
40
|
+
## Growth Forecasting
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
projected_month_N = current * (1 + growth_rate)^N + planned_launch_impact
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- Historical trend: last 3-6 months. Seasonal patterns: daily/weekly/yearly peaks.
|
|
47
|
+
- Peak-to-average ratio determines required vs baseline capacity.
|
|
48
|
+
|
|
49
|
+
## Headroom Calculation
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Required Capacity = Expected Peak / (1 - headroom_fraction)
|
|
53
|
+
Example: 700 RPS peak, 30% headroom → 700/0.70 = 1000 RPS provisioned
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- Fast auto-scaling (<2 min): 20-30% headroom.
|
|
57
|
+
- Slow scaling (>10 min): 40-50% headroom.
|
|
58
|
+
- No auto-scaling: 50%+ or accept degradation risk.
|
|
59
|
+
|
|
60
|
+
## Saturation Point
|
|
61
|
+
- The load at which p99 latency exceeds SLA or error rate exceeds threshold.
|
|
62
|
+
- Find via incremental load test (ramp 0 → 2x peak), plot load vs latency.
|
|
63
|
+
- The "knee" where the curve bends sharply = saturation. Operate well below it.
|
|
64
|
+
|
|
65
|
+
## Scaling Triggers
|
|
66
|
+
|
|
67
|
+
| Metric | Threshold | Action |
|
|
68
|
+
|--------|-----------|--------|
|
|
69
|
+
| CPU > 70% for 5 min | Scale out application tier | |
|
|
70
|
+
| Memory > 80% | Scale up or out | |
|
|
71
|
+
| Queue depth > 1000 for 3 min | Add consumers | |
|
|
72
|
+
| p99 > 500ms for 2 min | Scale application | |
|
|
73
|
+
| Error rate > 1% for 1 min | Investigate + possibly scale | |
|
|
74
|
+
|
|
75
|
+
- Cooldown after scale-out: 5 min. After scale-in: 15 min (prevent flapping).
|
|
76
|
+
- Predictive: pre-scale before known peaks (Monday AM, campaign launch).
|
|
77
|
+
|
|
78
|
+
## Bottleneck Forecasting
|
|
79
|
+
|
|
80
|
+
| Component | Current Util | Saturation | Time to Sat |
|
|
81
|
+
|-----------|-------------|------------|-------------|
|
|
82
|
+
| API servers | 45% | 80% | 4 months |
|
|
83
|
+
| Database | 62% | 75% | 6 weeks |
|
|
84
|
+
| Cache | 30% | 85% | 8 months |
|
|
85
|
+
|
|
86
|
+
Focus on shortest time-to-saturation first.
|
|
87
|
+
|
|
88
|
+
## Self-check before task completion
|
|
89
|
+
|
|
90
|
+
- [ ] Is current utilization measured across all critical components?
|
|
91
|
+
- [ ] Is growth model based on historical data plus planned launches?
|
|
92
|
+
- [ ] Is the first bottleneck identified with time-to-saturation?
|
|
93
|
+
- [ ] Are scaling triggers defined with thresholds and cooldowns?
|
|
94
|
+
- [ ] Is 30-40% headroom maintained above expected peak?
|
|
95
|
+
- [ ] Has the model been validated with load testing?
|
|
96
|
+
- [ ] Are alerts configured for approaching saturation?
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: causal-inference
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.6.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: causal inference analysis, A/B test statistical analysis, uplift modeling, propensity score matching, counterfactual reasoning, treatment effect estimation, causal graph, instrumental variable, difference in differences, causal impact, experiment analysis methodology, selection bias correction
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill — Causal Inference
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
This skill activates when analyzing treatment effects, designing A/B tests with statistical rigor, building uplift models, or performing counterfactual reasoning. Use when you need to establish causation (not just correlation) between interventions and outcomes.
|
|
13
|
+
|
|
14
|
+
## Mandatory actions when this skill is active
|
|
15
|
+
|
|
16
|
+
### Before writing any code
|
|
17
|
+
1. Define the causal estimand precisely (ATE, ATT, CATE) and document all causal assumptions (SUTVA, ignorability, positivity)
|
|
18
|
+
2. Draw a Directed Acyclic Graph (DAG) identifying treatment, outcome, confounders, mediators, colliders, and instrumental variables
|
|
19
|
+
3. Select the appropriate causal inference method (RCT analysis, propensity scoring, instrumental variables, diff-in-diff, RDD, synthetic control) based on data structure and identification strategy
|
|
20
|
+
4. Calculate minimum detectable effect size and required sample size with power analysis (typically 80% power, 5% alpha)
|
|
21
|
+
|
|
22
|
+
### During implementation
|
|
23
|
+
- Validate the overlap/common support assumption by examining propensity score distributions across treatment groups
|
|
24
|
+
- Test for balance on all confounders after matching/weighting (standardized mean differences <0.1, variance ratios 0.5-2.0)
|
|
25
|
+
- Implement sensitivity analysis to assess robustness to unmeasured confounding (e.g., Rosenbaum bounds, E-values)
|
|
26
|
+
- Use doubly robust estimators when possible (combining outcome regression and propensity scoring for consistent estimates)
|
|
27
|
+
- Check for heterogeneous treatment effects across subgroups and report conditional average treatment effects (CATE)
|
|
28
|
+
- Validate parallel trends assumption for difference-in-differences designs with pre-treatment period analysis
|
|
29
|
+
- Report confidence intervals using robust standard errors (clustered at appropriate level) or bootstrap resampling
|
|
30
|
+
|
|
31
|
+
### After implementation
|
|
32
|
+
- Present results with effect sizes in original units (not just p-values) and practical significance interpretation
|
|
33
|
+
- Document all assumptions made, sensitivity analysis results, and potential violations of causal identification
|
|
34
|
+
- Create visualization showing treatment effect heterogeneity across covariates and subgroups
|
|
35
|
+
- Generate reproducible analysis pipeline with versioned data, code, and randomization logs
|
|
36
|
+
|
|
37
|
+
## Self-check before task completion
|
|
38
|
+
- [ ] Causal DAG documented with clear identification strategy and testable implications
|
|
39
|
+
- [ ] Balance diagnostics show adequate covariate balance (SMD <0.1) after adjustment
|
|
40
|
+
- [ ] Sensitivity analysis demonstrates results are robust to reasonable violations of assumptions
|
|
41
|
+
- [ ] Confidence intervals and effect sizes reported in interpretable units with business context
|
|
42
|
+
- [ ] All code is reproducible with seed setting for randomization and resampling procedures
|