mindforge-cc 10.0.3 → 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 +25 -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 +176 -0
- package/MINDFORGE.md +4 -4
- package/package.json +2 -2
- package/.mindforge/personas/data-privacy-engineer.md +0 -187
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: migration-platform
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.7.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: migration platform design, schema migration orchestration, data migration tooling, zero-downtime migration automation, migration validation, migration rollback platform, database migration service, migration state machine, migration dry-run, migration scheduling, migration dependency graph, migration progress tracking
|
|
7
|
+
compose: migration-strategies
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill — Migration Platform
|
|
11
|
+
|
|
12
|
+
## When this skill activates
|
|
13
|
+
|
|
14
|
+
This skill activates when the user is designing or implementing a migration platform. This includes schema migration orchestration, data migration tooling, zero-downtime migration automation, migration validation, rollback capabilities, database migration services, migration state machines, dry-run testing, migration scheduling, dependency graph management, and progress tracking.
|
|
15
|
+
|
|
16
|
+
## Mandatory actions when this skill is active
|
|
17
|
+
|
|
18
|
+
### Before writing any code
|
|
19
|
+
|
|
20
|
+
1. Inventory all systems requiring migration: databases, APIs, services, data pipelines, infrastructure. Quantify: data volume, traffic volume, number of tables/services.
|
|
21
|
+
2. Define migration success criteria: zero downtime, data consistency, performance impact under 10%, rollback time under 5 minutes.
|
|
22
|
+
3. Identify dependencies: which services depend on the system being migrated. Build dependency graph to determine migration order.
|
|
23
|
+
4. Assess risk: classify migrations by risk (low, medium, high, critical). High-risk migrations require dry-run, shadow traffic, and manual approval gates.
|
|
24
|
+
5. Establish rollback strategy: forward-compatible schema changes, dual-write period, automated rollback triggers (error rate > 5%).
|
|
25
|
+
|
|
26
|
+
### During implementation
|
|
27
|
+
|
|
28
|
+
- **Migration State Machine:** Define states: pending → dry-run → scheduled → in-progress → validating → completed / failed / rolled-back. Track state per migration in database. Expose state via API and dashboard.
|
|
29
|
+
- **Schema Migration Orchestration:** Use tools like Liquibase, Flyway, or Alembic. Migrations should be: idempotent, forward-compatible, backward-compatible during rollout. Apply migrations in stages: additive changes → data migration → breaking changes.
|
|
30
|
+
- **Zero-Downtime Patterns:**
|
|
31
|
+
- **Expand-Contract:** Add new column/table (expand), dual-write to old and new (transition), switch reads to new (cutover), remove old (contract).
|
|
32
|
+
- **Blue-Green:** Deploy new version alongside old, switch traffic atomically, keep old version for quick rollback.
|
|
33
|
+
- **Shadow Traffic:** Mirror production traffic to new system, compare results, cutover when validation passes.
|
|
34
|
+
- **Data Migration Tooling:** Build ETL pipelines for bulk data migration. Include: checkpointing (resume from failure), batching (avoid overwhelming target), validation (row counts, checksums), rate limiting (avoid impacting production). Migrations should be resumable and idempotent.
|
|
35
|
+
- **Migration Validation:** Automated validation checks: data integrity (row counts, checksums), functional correctness (run test suite against new system), performance (latency, throughput within 10% of baseline). Fail migration if any check fails.
|
|
36
|
+
- **Migration Rollback:** Automate rollback when error rate exceeds threshold (5% or 1% for critical systems). Rollback should: revert traffic to old system, preserve data written during migration (dual-write), alert on-call team. Rollback time target: under 5 minutes.
|
|
37
|
+
- **Dry-Run Testing:** Run migrations in staging environment first. Use production-like data volume and traffic patterns. Validate performance, correctness, and rollback. Dry-run should be mandatory for high-risk migrations.
|
|
38
|
+
- **Migration Scheduling:** Schedule migrations during low-traffic windows. Provide manual approval gates for critical migrations. Include: notification to stakeholders, runbook link, on-call team assignment.
|
|
39
|
+
- **Dependency Graph Management:** Build migration dependency graph (service A depends on service B). Enforce migration order: migrate dependencies first, then dependents. Detect circular dependencies and fail early.
|
|
40
|
+
- **Progress Tracking:** Real-time dashboard showing: migration state, percentage complete, error rate, performance metrics, estimated time remaining. Include logs and alerts for anomalies.
|
|
41
|
+
|
|
42
|
+
### After implementation
|
|
43
|
+
|
|
44
|
+
- Verify migration state machine tracks all migrations with state transitions logged.
|
|
45
|
+
- Confirm schema migrations are idempotent, forward-compatible, and backward-compatible during rollout.
|
|
46
|
+
- Validate zero-downtime patterns (expand-contract, blue-green, shadow traffic) are implemented.
|
|
47
|
+
- Ensure data migration tooling includes checkpointing, batching, validation, and rate limiting.
|
|
48
|
+
- Check that migration rollback is automated with under 5-minute rollback time.
|
|
49
|
+
|
|
50
|
+
## Self-check before task completion
|
|
51
|
+
|
|
52
|
+
- [ ] Migration state machine tracks pending, in-progress, completed, failed, rolled-back states.
|
|
53
|
+
- [ ] Schema migrations are idempotent, forward-compatible, and backward-compatible.
|
|
54
|
+
- [ ] Zero-downtime patterns (expand-contract, blue-green, shadow traffic) are implemented.
|
|
55
|
+
- [ ] Data migration tooling is resumable, idempotent, and includes validation.
|
|
56
|
+
- [ ] Migration validation checks data integrity, functional correctness, and performance.
|
|
57
|
+
- [ ] Migration rollback is automated and completes in under 5 minutes.
|
|
58
|
+
- [ ] Dry-run testing is mandatory for high-risk migrations in production-like staging.
|
|
59
|
+
- [ ] Migration scheduling supports manual approval gates and stakeholder notifications.
|
|
60
|
+
- [ ] Dependency graph enforces migration order and detects circular dependencies.
|
|
61
|
+
- [ ] Progress tracking dashboard shows real-time state, percentage complete, and error rate.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: migration-strategies
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 0.1.0
|
|
5
|
+
status: stable
|
|
6
|
+
compose: database-patterns
|
|
7
|
+
triggers: zero downtime migration, expand contract migration, shadow table, backfill pattern, feature flag migration, online schema change, blue green migration, migration rollback, data migration, schema migration pattern, migration verification, dual write
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill — Migration Strategies
|
|
11
|
+
|
|
12
|
+
## When this skill activates
|
|
13
|
+
Any task involving database schema migrations, data migrations, zero-downtime
|
|
14
|
+
deployments requiring data changes, or expand-contract patterns.
|
|
15
|
+
|
|
16
|
+
## Mandatory actions when this skill is active
|
|
17
|
+
|
|
18
|
+
### Before writing any code
|
|
19
|
+
1. Assess the migration risk (table size, lock duration, rollback complexity).
|
|
20
|
+
2. Choose the migration pattern appropriate to the risk level.
|
|
21
|
+
3. Design the rollback path before implementing the forward migration.
|
|
22
|
+
|
|
23
|
+
### During implementation
|
|
24
|
+
- Ensure backward compatibility at every intermediate step.
|
|
25
|
+
- Implement batched processing with rate limiting for data backfills.
|
|
26
|
+
- Add verification queries to confirm migration correctness.
|
|
27
|
+
|
|
28
|
+
### After implementation
|
|
29
|
+
- Run verification (row counts, checksums, sample validation).
|
|
30
|
+
- Confirm rollback path works in staging.
|
|
31
|
+
- Document the migration in the changelog with rollback instructions.
|
|
32
|
+
|
|
33
|
+
## Expand-Contract Pattern
|
|
34
|
+
|
|
35
|
+
The safest approach for schema changes in production:
|
|
36
|
+
|
|
37
|
+
### Phase 1: Expand
|
|
38
|
+
- Add new column/table (nullable or with default).
|
|
39
|
+
- Deploy code that writes to BOTH old and new locations.
|
|
40
|
+
- No reads from new location yet.
|
|
41
|
+
|
|
42
|
+
### Phase 2: Migrate
|
|
43
|
+
- Backfill existing data from old location to new.
|
|
44
|
+
- Batched, rate-limited, resumable, idempotent.
|
|
45
|
+
- Verify all data migrated correctly.
|
|
46
|
+
|
|
47
|
+
### Phase 3: Switch Reads
|
|
48
|
+
- Deploy code that reads from new location.
|
|
49
|
+
- Old location still being written (safety net).
|
|
50
|
+
- Monitor for correctness issues.
|
|
51
|
+
|
|
52
|
+
### Phase 4: Contract
|
|
53
|
+
- Remove writes to old location.
|
|
54
|
+
- Drop old column/table after grace period.
|
|
55
|
+
- Final verification and cleanup.
|
|
56
|
+
|
|
57
|
+
## Shadow Tables
|
|
58
|
+
|
|
59
|
+
- Create new table with desired schema.
|
|
60
|
+
- Dual-write: every mutation hits both old and new table.
|
|
61
|
+
- Compare outputs periodically to verify consistency.
|
|
62
|
+
- Switch reads to new table when confidence is high.
|
|
63
|
+
- Drop old table after grace period.
|
|
64
|
+
|
|
65
|
+
## Zero-Downtime Online Schema Changes
|
|
66
|
+
|
|
67
|
+
For large tables where ALTER TABLE would lock:
|
|
68
|
+
|
|
69
|
+
### Tools
|
|
70
|
+
- **pt-online-schema-change** (Percona): creates shadow table, syncs via triggers.
|
|
71
|
+
- **gh-ost** (GitHub): triggerless, uses binary log replication.
|
|
72
|
+
- **pg_repack** (PostgreSQL): repacks tables without locks.
|
|
73
|
+
|
|
74
|
+
### Principles
|
|
75
|
+
- Never run ALTER on tables > 1M rows in production without online tools.
|
|
76
|
+
- Test migration duration in staging with production-sized data.
|
|
77
|
+
- Schedule during low-traffic windows even with online tools.
|
|
78
|
+
- Monitor replication lag during migration.
|
|
79
|
+
|
|
80
|
+
## Backfill Patterns
|
|
81
|
+
|
|
82
|
+
### Batched Processing
|
|
83
|
+
```
|
|
84
|
+
loop:
|
|
85
|
+
SELECT batch WHERE not_migrated LIMIT 1000
|
|
86
|
+
UPDATE batch SET new_column = transform(old_column)
|
|
87
|
+
SLEEP(rate_limit_interval)
|
|
88
|
+
IF no_more_rows: BREAK
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Requirements
|
|
92
|
+
- **Resumable**: track progress (last processed ID), restart from checkpoint.
|
|
93
|
+
- **Idempotent**: running twice produces same result (use upserts).
|
|
94
|
+
- **Rate-limited**: don't overwhelm the database (pause between batches).
|
|
95
|
+
- **Observable**: log progress, ETA, error counts.
|
|
96
|
+
|
|
97
|
+
## Migration Verification
|
|
98
|
+
|
|
99
|
+
### Row Count Comparison
|
|
100
|
+
- Count rows in source and target (should match for 1:1 migrations).
|
|
101
|
+
- Account for in-flight writes during comparison.
|
|
102
|
+
|
|
103
|
+
### Checksum Validation
|
|
104
|
+
- Hash critical columns in both source and target.
|
|
105
|
+
- Compare checksums batch by batch.
|
|
106
|
+
|
|
107
|
+
### Sample Validation
|
|
108
|
+
- Randomly sample N rows from source.
|
|
109
|
+
- Verify each exists in target with correct values.
|
|
110
|
+
- Catch edge cases that aggregate checks miss.
|
|
111
|
+
|
|
112
|
+
## Rollback Strategy
|
|
113
|
+
|
|
114
|
+
- Every migration must have a documented rollback path.
|
|
115
|
+
- Intermediate states must be backward-compatible (old code can still run).
|
|
116
|
+
- Keep old columns/tables for a grace period (minimum 7 days in production).
|
|
117
|
+
- Test rollback in staging before executing forward migration in production.
|
|
118
|
+
- Feature flags to switch between old and new code paths instantly.
|
|
119
|
+
|
|
120
|
+
## Self-check before task completion
|
|
121
|
+
|
|
122
|
+
Before marking a task done when this skill was active:
|
|
123
|
+
|
|
124
|
+
- [ ] Did I read the full SKILL.md before starting? (Not just the triggers)
|
|
125
|
+
- [ ] Is the migration zero-downtime (no table locks on large tables)?
|
|
126
|
+
- [ ] Is there a documented rollback path?
|
|
127
|
+
- [ ] Are backfills batched, resumable, and idempotent?
|
|
128
|
+
- [ ] Did I verify with row counts, checksums, or sample validation?
|
|
129
|
+
- [ ] Is every intermediate state backward-compatible?
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ml-feature-store
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.5.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: ML feature store, feature engineering pipeline, feature serving architecture, offline online feature store, feature reuse pattern, feature registry, feature computation, point-in-time feature, feature freshness, feature monitoring, feature discovery, feature lineage tracking
|
|
7
|
+
compose:
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# ML Feature Store Architecture
|
|
11
|
+
|
|
12
|
+
## When this skill activates
|
|
13
|
+
|
|
14
|
+
This skill activates when designing feature stores, implementing feature engineering pipelines, serving features for real-time inference, or managing feature versioning and lineage. It applies to ML systems where features must be computed consistently across training (offline) and inference (online) to avoid training-serving skew.
|
|
15
|
+
|
|
16
|
+
## Mandatory actions when this skill is active
|
|
17
|
+
|
|
18
|
+
### Before writing any code
|
|
19
|
+
|
|
20
|
+
1. **Define feature taxonomy** — Categorize features by computation type: static (user demographics, product attributes), slowly-changing (credit score, updated monthly), fast-changing (session activity, updated per event), and on-demand (real-time aggregations computed at query time). Different types require different storage and serving strategies.
|
|
21
|
+
2. **Design offline/online split** — Offline store (data warehouse, S3/GCS, Parquet files) for batch training. Online store (Redis, DynamoDB, Cassandra) for low-latency serving (<10ms). Define synchronization strategy: batch precompute and copy, streaming updates, or hybrid (precompute slow features, compute fast features on-demand).
|
|
22
|
+
3. **Establish point-in-time correctness** — Features for training must reflect the state of the world at the time the label was created. Implement temporal joins: match feature values to label timestamps within a tolerance window (e.g., use features from up to 1 hour before the event). Incorrect temporal joins cause label leakage and inflated training accuracy.
|
|
23
|
+
4. **Plan for feature versioning** — Features evolve (new aggregations, bug fixes, redefinitions). Version features with semantic versioning (user_clicks_v1, user_clicks_v2). Models must specify which feature versions they depend on. Changing feature definitions without versioning breaks deployed models.
|
|
24
|
+
|
|
25
|
+
### During implementation
|
|
26
|
+
|
|
27
|
+
- **Implement feature registry** — Centralized catalog of all features: name, description, data type, computation logic, dependencies, owner, and version. Registry enables feature discovery (find existing features before building new ones) and governance (track who uses which features). Use tools like Feast, Tecton, or build custom with a metadata database.
|
|
28
|
+
- **Build batch feature computation pipelines** — Compute features on historical data using batch processing (Spark, Dask, BigQuery). Optimize for cost: materialize expensive aggregations (rolling windows, joins) rather than recomputing on every training run. Schedule pipelines with orchestrators (Airflow, Prefect, Dagster).
|
|
29
|
+
- **Implement streaming feature updates** — For fast-changing features (session activity, real-time aggregations), use stream processing (Kafka + Flink, Kinesis, Spark Streaming). Update online store as events arrive. Validate that streaming logic matches batch logic (same SQL query should produce same results on batch and streaming data).
|
|
30
|
+
- **Design feature serving API** — Provide low-latency API to fetch features by entity key (user_id, product_id). Batch fetch for efficiency (fetch 100 user features in one call, not 100 individual calls). Return features in consistent schema (names, data types) to avoid model breakage.
|
|
31
|
+
- **Handle missing features gracefully** — Features may be missing (new user without history, sensor failure, data pipeline delay). Define default values (zero, mean, median, or a special sentinel value). Document defaults explicitly. Train models with synthetic missing data to ensure robustness.
|
|
32
|
+
- **Track feature lineage** — Record dependencies: which raw data sources produce which features, which features are used by which models. Lineage enables impact analysis: if a data source changes, which models are affected? Use metadata graphs or lineage tools (DataHub, Marquez).
|
|
33
|
+
|
|
34
|
+
### After implementation
|
|
35
|
+
|
|
36
|
+
- **Validate training-serving consistency** — Compute features offline (for training) and online (for serving) on the same input data. Compare outputs. Divergence >1% indicates a bug in feature logic. Common causes: timezone mismatches, different null handling, floating-point precision differences.
|
|
37
|
+
- **Measure feature freshness** — Track lag between event time and feature availability. For streaming features, target <1 minute lag. For batch features, document update frequency (hourly, daily). Stale features degrade model accuracy in production.
|
|
38
|
+
- **Benchmark serving latency** — Measure p50, p95, p99 latency for feature retrieval under realistic load. Target: p95 <10ms for online serving. If higher, optimize online store (better indexes, caching, denormalization) or reduce feature count.
|
|
39
|
+
- **Monitor feature drift** — Track feature distributions over time. If distributions shift significantly (mean, variance, or cardinality changes), model accuracy may degrade. Set up alerts for distribution drift (Kolmogorov-Smirnov test, Population Stability Index).
|
|
40
|
+
|
|
41
|
+
## Self-check before task completion
|
|
42
|
+
|
|
43
|
+
- [ ] Feature taxonomy categorizes features by computation type (static, slowly-changing, fast-changing, on-demand)
|
|
44
|
+
- [ ] Offline/online storage split is designed with synchronization strategy documented
|
|
45
|
+
- [ ] Point-in-time correctness is implemented with temporal joins (tolerance window defined)
|
|
46
|
+
- [ ] Feature versioning uses semantic versioning and models declare feature version dependencies
|
|
47
|
+
- [ ] Feature registry catalogs all features with name, description, data type, logic, dependencies, owner, version
|
|
48
|
+
- [ ] Batch feature pipelines materialize expensive aggregations and are scheduled with orchestrators
|
|
49
|
+
- [ ] Streaming feature updates match batch logic (validated with same SQL queries on batch and streaming data)
|
|
50
|
+
- [ ] Feature serving API supports batch fetch and returns consistent schema
|
|
51
|
+
- [ ] Missing features are handled with explicit defaults documented per feature
|
|
52
|
+
- [ ] Feature lineage tracks raw data sources → features → models for impact analysis
|
|
53
|
+
- [ ] Training-serving consistency is validated (offline and online feature outputs differ by <1%)
|
|
54
|
+
- [ ] Feature freshness is measured and documented (lag <1 minute for streaming, update frequency for batch)
|
|
55
|
+
- [ ] Serving latency p95 is <10ms under realistic load
|
|
56
|
+
- [ ] Feature drift monitoring is implemented with distribution tracking and alerts
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ml-monitoring
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.6.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: ML model monitoring, model drift detection, data quality monitoring, performance degradation alert, retraining trigger, model decay detection, prediction monitoring, feature drift, concept drift detection, model health dashboard, ML observability, model performance SLA
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill — ML Monitoring
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
This skill activates when implementing production ML observability, drift detection systems, or automated retraining pipelines. Use when models are deployed and require continuous performance tracking and health monitoring.
|
|
13
|
+
|
|
14
|
+
## Mandatory actions when this skill is active
|
|
15
|
+
|
|
16
|
+
### Before writing any code
|
|
17
|
+
1. Define model performance SLAs with business stakeholders: accuracy thresholds, latency requirements, prediction volume expectations, and acceptable degradation rates
|
|
18
|
+
2. Establish baseline distributions for all features, predictions, and evaluation metrics from training data and initial production period
|
|
19
|
+
3. Select drift detection methods appropriate to data types: KS test for continuous, chi-square for categorical, PSI for binned distributions
|
|
20
|
+
4. Design alerting strategy with severity levels: critical (immediate intervention), warning (investigate within 24h), informational (track trend)
|
|
21
|
+
|
|
22
|
+
### During implementation
|
|
23
|
+
- Log 100% of predictions with model version, feature values, timestamp, and prediction context for forensic analysis
|
|
24
|
+
- Implement statistical drift detection on feature distributions comparing rolling windows to baseline (typically 7d vs 30d trailing)
|
|
25
|
+
- Track concept drift by monitoring model performance metrics on recent predictions with ground truth labels when available
|
|
26
|
+
- Calculate prediction drift metrics: distribution shifts, confidence score changes, class imbalance variations over time
|
|
27
|
+
- Monitor data quality indicators: missing value rates, out-of-range values, schema violations, duplicate records, freshness delays
|
|
28
|
+
- Implement shadow scoring for challenger models to compare performance against production champion model continuously
|
|
29
|
+
- Create automated retraining triggers based on drift thresholds, performance degradation, or calendar schedule with approval gates
|
|
30
|
+
|
|
31
|
+
### After implementation
|
|
32
|
+
- Build real-time dashboards showing model health: prediction volume, latency p95/p99, error rates, drift scores, and performance metrics
|
|
33
|
+
- Set up alerting channels integrated with on-call rotation: PagerDuty, Slack, email with runbook links for common issues
|
|
34
|
+
- Generate weekly model health reports with drift analysis, performance trends, data quality issues, and recommended actions
|
|
35
|
+
- Document incident response procedures: model rollback process, emergency retraining workflow, and escalation paths
|
|
36
|
+
|
|
37
|
+
## Self-check before task completion
|
|
38
|
+
- [ ] All predictions logged with sufficient context for debugging and audit requirements
|
|
39
|
+
- [ ] Drift detection implemented for top 10 most important features with statistical significance testing
|
|
40
|
+
- [ ] Performance monitoring tracks all business-critical metrics with automated alerting on degradation
|
|
41
|
+
- [ ] Retraining pipeline tested end-to-end with rollback capability and A/B testing framework
|
|
42
|
+
- [ ] Dashboard provides visibility into model health for both technical teams and business stakeholders
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mobile-performance
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.4.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: mobile app performance, app startup optimization, mobile memory management, battery usage optimization, frame rate optimization, mobile rendering performance, mobile network optimization, app size reduction, mobile profiling, jank reduction, mobile CPU optimization, smooth scrolling mobile
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill — Mobile Performance Optimization
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
This skill activates when optimizing mobile app performance, including startup time, memory usage, battery consumption, frame rate, network efficiency, or app size reduction.
|
|
13
|
+
|
|
14
|
+
## Mandatory actions when this skill is active
|
|
15
|
+
|
|
16
|
+
### Before writing any code
|
|
17
|
+
1. Establish performance baselines using profiling tools (Xcode Instruments, Android Studio Profiler, React DevTools)
|
|
18
|
+
2. Identify performance targets: startup time (<2s to interactive), frame rate (60fps), memory budget, battery impact
|
|
19
|
+
3. Profile existing app to find bottlenecks — CPU hotspots, memory leaks, excessive network calls, unnecessary renders
|
|
20
|
+
4. Determine which optimizations provide highest impact for lowest effort (focus on hot paths first)
|
|
21
|
+
|
|
22
|
+
### During implementation
|
|
23
|
+
- Defer non-critical initialization to after app becomes interactive (lazy loading, background threads)
|
|
24
|
+
- Implement virtualized lists for large datasets (RecyclerView, UICollectionView, FlatList with proper optimization props)
|
|
25
|
+
- Optimize images: compress, use appropriate formats (WebP, HEIF), implement progressive loading and caching
|
|
26
|
+
- Minimize JavaScript bridge traffic in hybrid apps — batch calls, use native implementations for performance-critical code
|
|
27
|
+
- Implement proper pagination and infinite scroll to avoid loading excessive data
|
|
28
|
+
- Use release builds for performance testing — debug builds have significant overhead
|
|
29
|
+
- Profile memory allocations, fix retain cycles, implement proper cleanup in component unmount/dispose
|
|
30
|
+
|
|
31
|
+
### After implementation
|
|
32
|
+
- Measure startup time from app launch to first interactive frame using platform tools
|
|
33
|
+
- Profile with production-like data volume and network conditions (throttle to 3G/4G)
|
|
34
|
+
- Test on low-end devices (not just flagship phones) to catch performance issues
|
|
35
|
+
- Monitor frame rate during animations, scrolling, and transitions using on-device FPS counters
|
|
36
|
+
- Use battery profiling tools to identify energy-intensive operations (location, background processing, wake locks)
|
|
37
|
+
|
|
38
|
+
## Self-check before task completion
|
|
39
|
+
- [ ] App startup time meets target (<2s to interactive on mid-range device)
|
|
40
|
+
- [ ] Frame rate stays at 60fps during scrolling and animations (no jank or dropped frames)
|
|
41
|
+
- [ ] Memory usage is stable with no leaks (test with extended usage, multiple navigation cycles)
|
|
42
|
+
- [ ] App size is minimized (proper ProGuard/R8, asset optimization, code splitting)
|
|
43
|
+
- [ ] Battery impact is acceptable (no excessive background processing, location polling, or wake locks)
|
|
44
|
+
- [ ] Network usage is optimized (request batching, proper caching, compression, avoid polling)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mobile-security
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.4.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: mobile security architecture, certificate pinning, secure storage mobile, biometric authentication, root detection, jailbreak detection, mobile encryption, mobile API security, keychain keystore, mobile OWASP, secure communication mobile, mobile token storage
|
|
7
|
+
compose: auth-patterns
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill — Mobile Security Architecture
|
|
11
|
+
|
|
12
|
+
## When this skill activates
|
|
13
|
+
This skill activates when implementing security-sensitive mobile features, including certificate pinning, secure storage, biometric authentication, root/jailbreak detection, or protecting against mobile-specific attack vectors.
|
|
14
|
+
|
|
15
|
+
## Mandatory actions when this skill is active
|
|
16
|
+
|
|
17
|
+
### Before writing any code
|
|
18
|
+
1. Review OWASP Mobile Top 10 and identify applicable threats to the application
|
|
19
|
+
2. Determine data classification and storage requirements (keychain/keystore for sensitive data, never UserDefaults/SharedPreferences)
|
|
20
|
+
3. Establish certificate pinning strategy (pin leaf certificate, intermediate, or public key hash)
|
|
21
|
+
4. Plan authentication flow with biometric fallback, token refresh, and secure token storage
|
|
22
|
+
|
|
23
|
+
### During implementation
|
|
24
|
+
- Store sensitive data in platform secure storage (iOS Keychain with proper accessibility attributes, Android Keystore)
|
|
25
|
+
- Implement certificate pinning for API communications to prevent man-in-the-middle attacks
|
|
26
|
+
- Use biometric authentication (Face ID, Touch ID, Biometric Prompt) with proper fallback to passcode
|
|
27
|
+
- Implement root/jailbreak detection (check for common indicators, but never rely solely on client-side checks)
|
|
28
|
+
- Encrypt local databases and sensitive files using platform encryption APIs (SQLCipher, native encryption)
|
|
29
|
+
- Obfuscate code (ProGuard/R8 for Android, native code for critical logic) to deter reverse engineering
|
|
30
|
+
- Implement proper session management with token expiration, refresh tokens, and secure logout
|
|
31
|
+
|
|
32
|
+
### After implementation
|
|
33
|
+
- Test security implementation with security scanning tools (MobSF, QARK, or commercial tools)
|
|
34
|
+
- Verify certificate pinning works correctly and fails on MITM attempts
|
|
35
|
+
- Test biometric authentication edge cases: disabled biometrics, changed biometrics, hardware unavailability
|
|
36
|
+
- Validate secure storage: data persists securely across app restarts, inaccessible without authentication
|
|
37
|
+
- Test root/jailbreak detection on compromised devices, verify graceful degradation or blocking
|
|
38
|
+
|
|
39
|
+
## Self-check before task completion
|
|
40
|
+
- [ ] Sensitive data is never stored in plaintext (logs, UserDefaults, SharedPreferences, temp files)
|
|
41
|
+
- [ ] Certificate pinning is implemented for all API endpoints with sensitive data
|
|
42
|
+
- [ ] Biometric authentication follows platform best practices (keychain/keystore-backed, proper error handling)
|
|
43
|
+
- [ ] Root/jailbreak detection is implemented with appropriate response (warn, degrade functionality, or block)
|
|
44
|
+
- [ ] API tokens are stored securely (keychain/keystore) and transmitted securely (HTTPS only, proper headers)
|
|
45
|
+
- [ ] App handles security failures gracefully (logout on tampering detection, clear sensitive data on uninstall)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: model-evaluation
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.5.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: model evaluation framework, AI benchmark design, model A/B testing, quality metrics AI, model regression detection, evaluation dataset curation, model comparison methodology, LLM evaluation, model performance tracking, model evaluation harness, model scoring rubric, automated model eval
|
|
7
|
+
compose:
|
|
8
|
+
- agent-evaluation-framework
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Model Evaluation & Benchmarking
|
|
12
|
+
|
|
13
|
+
## When this skill activates
|
|
14
|
+
|
|
15
|
+
This skill activates when designing evaluation frameworks for AI models, comparing multiple models, detecting performance regressions, or building automated evaluation pipelines. It applies to any system where model quality must be measured, tracked, or validated before deployment.
|
|
16
|
+
|
|
17
|
+
## Mandatory actions when this skill is active
|
|
18
|
+
|
|
19
|
+
### Before writing any code
|
|
20
|
+
|
|
21
|
+
1. **Define evaluation objectives** — Identify what you're measuring: task accuracy (classification, generation quality), robustness (adversarial examples, distribution shift), efficiency (latency, throughput, cost), or fairness (demographic parity, equalized odds). Different objectives require different metrics.
|
|
22
|
+
2. **Curate evaluation datasets** — Build a held-out test set that is representative (covers real-world distribution), diverse (includes edge cases and rare categories), and adversarial (contains challenging examples designed to expose weaknesses). Evaluation sets must never overlap with training data.
|
|
23
|
+
3. **Select appropriate metrics** — Choose metrics aligned with business goals: accuracy/F1 for classification, BLEU/ROUGE for text generation, perplexity for language models, user preference for subjective tasks. Avoid vanity metrics (high accuracy on unrealistic data). Document why each metric matters.
|
|
24
|
+
4. **Establish baseline performance** — Measure current production model or a simple heuristic baseline (random, majority class, rule-based). New models must beat the baseline by a meaningful margin (≥5% relative improvement) to justify deployment.
|
|
25
|
+
|
|
26
|
+
### During implementation
|
|
27
|
+
|
|
28
|
+
- **Implement metric computation pipelines** — Automate metric calculation with error handling: handle missing predictions, malformed outputs, and edge cases (division by zero, empty strings). Metrics should never crash on bad inputs.
|
|
29
|
+
- **Design multi-dimensional scorecards** — Track multiple metrics simultaneously: accuracy, latency, cost, fairness. Optimize for trade-offs, not single metrics. A model with 99% accuracy but 10x latency may not be viable.
|
|
30
|
+
- **Build pairwise comparison systems** — For subjective tasks (text quality, summarization), implement head-to-head comparisons: show two model outputs, ask humans which is better. Measure win rate and statistical significance (use bootstrap confidence intervals).
|
|
31
|
+
- **Implement regression detection** — Run evaluation on every model checkpoint and compare to previous best. If any metric drops by >X% (threshold depends on metric), flag as regression and block deployment. Track metrics over time with time-series plots.
|
|
32
|
+
- **Create stratified evaluations** — Break down performance by subgroups: per-category accuracy, per-demographic fairness, per-difficulty-level performance. Aggregate metrics hide disparities. A model may perform well overall but fail catastrophically on minority subgroups.
|
|
33
|
+
- **Version evaluation datasets** — Evaluation sets evolve as model capabilities improve. Version datasets with semantic versioning (v1.0, v1.1) and track which model versions were evaluated on which dataset versions. Results are only comparable within the same dataset version.
|
|
34
|
+
|
|
35
|
+
### After implementation
|
|
36
|
+
|
|
37
|
+
- **Validate metric reliability** — Compute confidence intervals and statistical significance for all metrics. Use bootstrap resampling (1000+ iterations) to estimate variance. Report metrics as mean ± 95% CI, not point estimates.
|
|
38
|
+
- **Test for overfitting to eval set** — If developers repeatedly tune models on the eval set, the eval set becomes a second training set. Periodically refresh eval sets with new examples. Monitor if performance on new eval sets drops significantly compared to old eval sets.
|
|
39
|
+
- **Document evaluation methodology** — Write a technical report: dataset description, metric definitions, baseline performance, statistical tests used. Evaluation is only reproducible if methodology is explicit. Include code, dataset URLs, and random seeds.
|
|
40
|
+
- **Publish results in standardized format** — Use community-standard formats: JSONL with task, model, dataset, metric, score, confidence_interval. Enable comparison across models and teams without manual data wrangling.
|
|
41
|
+
|
|
42
|
+
## Self-check before task completion
|
|
43
|
+
|
|
44
|
+
- [ ] Evaluation objectives (accuracy/robustness/efficiency/fairness) are explicitly defined
|
|
45
|
+
- [ ] Evaluation dataset is held-out, representative, diverse, and versioned
|
|
46
|
+
- [ ] Metrics are aligned with business goals and documented with justification
|
|
47
|
+
- [ ] Baseline performance is established and new models beat baseline by ≥5% relative improvement
|
|
48
|
+
- [ ] Multi-dimensional scorecards track accuracy, latency, cost, and fairness simultaneously
|
|
49
|
+
- [ ] Regression detection flags performance drops >X% and blocks deployment
|
|
50
|
+
- [ ] Performance is stratified by subgroups (categories, demographics, difficulty levels)
|
|
51
|
+
- [ ] Confidence intervals are computed via bootstrap (1000+ iterations) and reported with all metrics
|
|
52
|
+
- [ ] Evaluation methodology is documented with dataset, metrics, baselines, and statistical tests
|
|
53
|
+
- [ ] Results are published in standardized format (JSONL) for cross-model comparison
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: monorepo-management
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.0.8
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: monorepo, nx workspace, turborepo, task pipeline, affected analysis, workspace dependency, publish strategy, monorepo structure, package boundary, workspace protocol, change detection, monorepo tooling
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Monorepo Management
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
This skill activates when setting up, restructuring, or optimizing a monorepo workspace. It applies to task orchestration, dependency management between packages, affected analysis for CI, publishing strategies, and enforcing package boundaries.
|
|
14
|
+
|
|
15
|
+
## Mandatory actions when this skill is active
|
|
16
|
+
|
|
17
|
+
### Before
|
|
18
|
+
|
|
19
|
+
1. Identify the monorepo tool in use or to be adopted (Nx, Turborepo, Lerna, pnpm workspaces, Bazel).
|
|
20
|
+
2. Map the dependency graph between packages (which packages depend on which).
|
|
21
|
+
3. Determine the publishing model (unified versioning vs independent versioning).
|
|
22
|
+
4. Assess current CI times and identify optimization opportunities.
|
|
23
|
+
5. Review existing package boundaries (are internals leaking between packages?).
|
|
24
|
+
|
|
25
|
+
### During
|
|
26
|
+
|
|
27
|
+
**Tool Selection:**
|
|
28
|
+
- **Nx**: Full-featured. Generators, dependency graph visualization, distributed task execution, plugins for frameworks. Best for large teams with complex dependency graphs.
|
|
29
|
+
- **Turborepo**: Lightweight. Fast caching, simple pipeline config, minimal setup. Best for smaller monorepos or teams that want minimal tooling overhead.
|
|
30
|
+
- **pnpm workspaces**: Package manager-level workspace support. Good foundation, pair with Turbo or Nx for task orchestration.
|
|
31
|
+
- **Bazel**: Hermetic builds, language-agnostic, extreme scale. Steep learning curve. Best for very large codebases (1000+ packages).
|
|
32
|
+
|
|
33
|
+
**Workspace Structure:**
|
|
34
|
+
```
|
|
35
|
+
/apps — Deployable applications (web-app, api-server, mobile)
|
|
36
|
+
/packages — Shared libraries (ui-components, utils, types, config)
|
|
37
|
+
/tools — Build tools, scripts, generators, codemods
|
|
38
|
+
/docs — Documentation site (if applicable)
|
|
39
|
+
```
|
|
40
|
+
- Each package has its own `package.json`, `tsconfig.json`, and test config.
|
|
41
|
+
- Shared config lives in root (ESLint, Prettier, TypeScript base config).
|
|
42
|
+
- Apps import packages; packages never import apps.
|
|
43
|
+
|
|
44
|
+
**Task Pipelines:**
|
|
45
|
+
- Define build order from the dependency graph (if B depends on A, build A first).
|
|
46
|
+
- Run independent tasks in parallel (lint all packages simultaneously).
|
|
47
|
+
- Cache task outputs by input fingerprint (source files + deps + config).
|
|
48
|
+
- Pipeline config example: `build` depends on `^build` (build deps first).
|
|
49
|
+
|
|
50
|
+
**Affected Analysis:**
|
|
51
|
+
- On PR: determine which packages changed (git diff against base branch).
|
|
52
|
+
- Include transitive dependents (if `utils` changed, rebuild everything that imports `utils`).
|
|
53
|
+
- Run only affected tests/builds/lints in CI to save time.
|
|
54
|
+
- Full suite runs on merge to main (catch transitive issues).
|
|
55
|
+
|
|
56
|
+
**Package Boundaries (Critical):**
|
|
57
|
+
- Each package exports explicitly via `index.ts` or `exports` field in `package.json`.
|
|
58
|
+
- NEVER import from internal paths (`@myorg/ui/src/internal/Button`). Only use public API.
|
|
59
|
+
- Enforce with ESLint rules (`@nx/enforce-module-boundaries` or custom no-restricted-imports).
|
|
60
|
+
- Circular dependencies between packages are FORBIDDEN. Detect with `madge` or Nx graph.
|
|
61
|
+
- If two packages need each other, extract shared logic into a third package.
|
|
62
|
+
|
|
63
|
+
**Caching Strategy:**
|
|
64
|
+
- **Local cache**: Default. Store task outputs on developer machine (~/.turbo or .nx/cache).
|
|
65
|
+
- **Remote cache**: Share cache across CI and team (Nx Cloud, Turborepo Remote Cache, custom S3).
|
|
66
|
+
- **Fingerprint inputs**: source files, dependency versions, env vars, tool versions.
|
|
67
|
+
- Cache hit = skip task entirely (return cached output in milliseconds).
|
|
68
|
+
- Invalidate cache when: source changes, deps update, config changes, tool version bumps.
|
|
69
|
+
|
|
70
|
+
**Publishing Strategy:**
|
|
71
|
+
- **Changesets** (recommended): Developers declare changes in PRs, automated versioning on merge.
|
|
72
|
+
- **Independent versioning**: Each package has its own semver. Publish only changed packages.
|
|
73
|
+
- **Unified versioning**: All packages share one version number. Simpler but more publishes.
|
|
74
|
+
- **Canary releases**: Publish from PR branches for pre-merge testing (`0.0.0-canary.abc123`).
|
|
75
|
+
- Always publish from CI (never from local machines).
|
|
76
|
+
|
|
77
|
+
**Dependency Management:**
|
|
78
|
+
- Pin shared dependencies to same version across workspace (avoid version drift).
|
|
79
|
+
- Use `pnpm` or `yarn` dedupe to eliminate duplicate installations.
|
|
80
|
+
- Internal packages use `workspace:*` protocol (resolved at install, not publish).
|
|
81
|
+
- External dependency updates: use Renovate/Dependabot with grouped PRs per scope.
|
|
82
|
+
|
|
83
|
+
### After
|
|
84
|
+
|
|
85
|
+
1. Dependency graph is acyclic and visualizable.
|
|
86
|
+
2. Package boundaries are enforced (lint rule prevents deep imports).
|
|
87
|
+
3. CI only runs affected tasks (measured improvement in pipeline time).
|
|
88
|
+
4. Caching is configured and verified (cache hit rate > 70% on typical PRs).
|
|
89
|
+
5. Publishing pipeline is automated and tested.
|
|
90
|
+
|
|
91
|
+
## Self-check before task completion
|
|
92
|
+
|
|
93
|
+
- [ ] Dependency graph has zero circular dependencies.
|
|
94
|
+
- [ ] Package boundaries enforced via tooling (not just convention).
|
|
95
|
+
- [ ] Task pipeline correctly orders builds based on dependency graph.
|
|
96
|
+
- [ ] Affected analysis is configured for CI (not running everything on every PR).
|
|
97
|
+
- [ ] Local and remote caching is operational with verified cache hits.
|
|
98
|
+
- [ ] Publishing strategy is documented and automated.
|
|
99
|
+
- [ ] New packages have a clear owner and explicit public API surface.
|
|
100
|
+
- [ ] Workspace structure follows the apps/packages/tools convention.
|