mindforge-cc 10.0.2 → 10.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/.mindforge/config.json +73 -2
  2. package/.mindforge/engine/autonomous/cross-iteration-bridge.md +96 -0
  3. package/.mindforge/engine/cost-tracking/budget-enforcer.md +68 -0
  4. package/.mindforge/engine/cost-tracking/router.md +58 -0
  5. package/.mindforge/engine/cost-tracking/token-ledger.md +77 -0
  6. package/.mindforge/engine/council/council-protocol.md +96 -0
  7. package/.mindforge/engine/council/council-templates.md +85 -0
  8. package/.mindforge/engine/council/synthesis-engine.md +71 -0
  9. package/.mindforge/engine/cross-model-eval.md +74 -0
  10. package/.mindforge/engine/instincts/capture-engine.md +63 -0
  11. package/.mindforge/engine/instincts/instinct-schema.md +76 -0
  12. package/.mindforge/engine/instincts/promotion-engine.md +77 -0
  13. package/.mindforge/engine/proactive/signal-detector.md +60 -0
  14. package/.mindforge/engine/proactive/suggestion-engine.md +100 -0
  15. package/.mindforge/engine/skills/composition.md +83 -0
  16. package/.mindforge/engine/skills/loader.md +16 -0
  17. package/.mindforge/personas/agent-architect.md +57 -0
  18. package/.mindforge/personas/agent-evaluator.md +162 -0
  19. package/.mindforge/personas/agent-memory-designer.md +157 -0
  20. package/.mindforge/personas/agent-ops-engineer.md +120 -0
  21. package/.mindforge/personas/agent-orchestrator.md +112 -0
  22. package/.mindforge/personas/ai-economist.md +57 -0
  23. package/.mindforge/personas/ai-safety-engineer.md +57 -0
  24. package/.mindforge/personas/analytics-engineer.md +57 -0
  25. package/.mindforge/personas/anti-pattern-hunter.md +61 -0
  26. package/.mindforge/personas/api-gateway-designer.md +132 -0
  27. package/.mindforge/personas/auth-engineer.md +112 -0
  28. package/.mindforge/personas/build-engineer.md +57 -0
  29. package/.mindforge/personas/business-analyst.md +56 -0
  30. package/.mindforge/personas/cache-architect.md +100 -0
  31. package/.mindforge/personas/causal-scientist.md +57 -0
  32. package/.mindforge/personas/cdn-architect.md +118 -0
  33. package/.mindforge/personas/change-agent.md +104 -0
  34. package/.mindforge/personas/code-narrator.md +52 -0
  35. package/.mindforge/personas/codegen-specialist.md +68 -0
  36. package/.mindforge/personas/communication-architect.md +102 -0
  37. package/.mindforge/personas/compliance-engineer.md +96 -0
  38. package/.mindforge/personas/consensus-engineer.md +116 -0
  39. package/.mindforge/personas/contract-tester.md +60 -192
  40. package/.mindforge/personas/cost-optimizer.md +71 -0
  41. package/.mindforge/personas/council-architect.md +66 -0
  42. package/.mindforge/personas/council-critic.md +67 -0
  43. package/.mindforge/personas/council-pragmatist.md +71 -0
  44. package/.mindforge/personas/council-skeptic.md +73 -0
  45. package/.mindforge/personas/data-architect.md +108 -0
  46. package/.mindforge/personas/data-mesh-architect.md +57 -0
  47. package/.mindforge/personas/data-pipeline-architect.md +120 -0
  48. package/.mindforge/personas/de-sloppifier.md +60 -0
  49. package/.mindforge/personas/debt-manager.md +66 -0
  50. package/.mindforge/personas/decision-architect.md +82 -51
  51. package/.mindforge/personas/deployment-captain.md +74 -0
  52. package/.mindforge/personas/design-system-lead.md +112 -0
  53. package/.mindforge/personas/dmux-orchestrator.md +75 -0
  54. package/.mindforge/personas/doc-auditor.md +84 -0
  55. package/.mindforge/personas/dx-engineer.md +96 -0
  56. package/.mindforge/personas/ecommerce-engineer.md +57 -0
  57. package/.mindforge/personas/edge-engineer.md +94 -0
  58. package/.mindforge/personas/edtech-architect.md +106 -0
  59. package/.mindforge/personas/embedding-architect.md +57 -0
  60. package/.mindforge/personas/environment-engineer.md +57 -0
  61. package/.mindforge/personas/eval-judge.md +55 -0
  62. package/.mindforge/personas/event-architect.md +102 -0
  63. package/.mindforge/personas/experiment-designer.md +138 -0
  64. package/.mindforge/personas/feature-store-engineer.md +57 -0
  65. package/.mindforge/personas/finops-analyst.md +66 -0
  66. package/.mindforge/personas/fintech-architect.md +57 -0
  67. package/.mindforge/personas/flutter-engineer.md +104 -0
  68. package/.mindforge/personas/gaming-engineer.md +57 -0
  69. package/.mindforge/personas/graphql-designer.md +73 -0
  70. package/.mindforge/personas/healthcare-engineer.md +57 -0
  71. package/.mindforge/personas/hiring-strategist.md +105 -0
  72. package/.mindforge/personas/hitl-architect.md +165 -0
  73. package/.mindforge/personas/i18n-architect.md +69 -0
  74. package/.mindforge/personas/instinct-curator.md +83 -0
  75. package/.mindforge/personas/iot-architect.md +105 -0
  76. package/.mindforge/personas/knowledge-curator.md +139 -0
  77. package/.mindforge/personas/knowledge-engineer.md +57 -0
  78. package/.mindforge/personas/lakehouse-architect.md +57 -0
  79. package/.mindforge/personas/llm-orchestrator.md +57 -0
  80. package/.mindforge/personas/logistics-architect.md +106 -0
  81. package/.mindforge/personas/market-analyst.md +53 -0
  82. package/.mindforge/personas/marketplace-engineer.md +105 -0
  83. package/.mindforge/personas/mcp-designer.md +54 -0
  84. package/.mindforge/personas/meeting-designer.md +104 -0
  85. package/.mindforge/personas/mentorship-lead.md +106 -0
  86. package/.mindforge/personas/migration-architect.md +57 -0
  87. package/.mindforge/personas/ml-ops-engineer.md +101 -0
  88. package/.mindforge/personas/mobile-architect.md +105 -0
  89. package/.mindforge/personas/mobile-security-engineer.md +106 -0
  90. package/.mindforge/personas/multi-model-bridge.md +86 -0
  91. package/.mindforge/personas/multi-tenancy-architect.md +71 -0
  92. package/.mindforge/personas/multimodal-engineer.md +57 -0
  93. package/.mindforge/personas/offline-specialist.md +105 -0
  94. package/.mindforge/personas/onboarding-navigator.md +63 -0
  95. package/.mindforge/personas/payments-engineer.md +135 -0
  96. package/.mindforge/personas/pipeline-engineer.md +115 -0
  97. package/.mindforge/personas/platform-engineer.md +97 -0
  98. package/.mindforge/personas/platform-lead.md +57 -0
  99. package/.mindforge/personas/privacy-engineer.md +57 -0
  100. package/.mindforge/personas/product-owner.md +56 -0
  101. package/.mindforge/personas/productivity-analyst.md +57 -0
  102. package/.mindforge/personas/prompt-architect.md +101 -0
  103. package/.mindforge/personas/proofreader.md +53 -0
  104. package/.mindforge/personas/pwa-architect.md +105 -0
  105. package/.mindforge/personas/quality-scorer.md +63 -0
  106. package/.mindforge/personas/react-native-engineer.md +106 -0
  107. package/.mindforge/personas/resilience-engineer.md +69 -0
  108. package/.mindforge/personas/rfc-architect.md +64 -0
  109. package/.mindforge/personas/saga-orchestrator.md +80 -0
  110. package/.mindforge/personas/secrets-engineer.md +57 -0
  111. package/.mindforge/personas/skill-smith.md +79 -0
  112. package/.mindforge/personas/sre-lead.md +107 -0
  113. package/.mindforge/personas/stream-engineer.md +57 -0
  114. package/.mindforge/personas/streaming-engineer.md +64 -0
  115. package/.mindforge/personas/swarm-templates.json +695 -38
  116. package/.mindforge/personas/system-designer.md +57 -0
  117. package/.mindforge/personas/team-coach.md +120 -0
  118. package/.mindforge/personas/tech-lead-coach.md +103 -0
  119. package/.mindforge/personas/technical-writer-lead.md +111 -0
  120. package/.mindforge/personas/threat-modeler.md +82 -0
  121. package/.mindforge/personas/vibe-checker.md +75 -0
  122. package/.mindforge/personas/worktree-manager.md +56 -0
  123. package/.mindforge/personas/zero-trust-engineer.md +113 -0
  124. package/.mindforge/skills/a11y-testing/SKILL.md +143 -0
  125. package/.mindforge/skills/agent-evaluation-framework/SKILL.md +227 -0
  126. package/.mindforge/skills/agent-introspection-debugging/SKILL.md +88 -0
  127. package/.mindforge/skills/agent-loops/SKILL.md +84 -0
  128. package/.mindforge/skills/agent-memory-design/SKILL.md +199 -0
  129. package/.mindforge/skills/agent-orchestration-patterns/SKILL.md +129 -0
  130. package/.mindforge/skills/agent-tool-selection/SKILL.md +204 -0
  131. package/.mindforge/skills/ai-agent-deployment/SKILL.md +176 -0
  132. package/.mindforge/skills/ai-cost-management/SKILL.md +57 -0
  133. package/.mindforge/skills/ai-safety-alignment/SKILL.md +53 -0
  134. package/.mindforge/skills/analytics-instrumentation/SKILL.md +172 -0
  135. package/.mindforge/skills/api-gateway-patterns/SKILL.md +177 -0
  136. package/.mindforge/skills/api-marketplace/SKILL.md +56 -0
  137. package/.mindforge/skills/api-versioning/SKILL.md +100 -0
  138. package/.mindforge/skills/app-store-deployment/SKILL.md +44 -0
  139. package/.mindforge/skills/architecture-tradeoff-analysis/SKILL.md +97 -0
  140. package/.mindforge/skills/audit-logging/SKILL.md +140 -0
  141. package/.mindforge/skills/auth-patterns/SKILL.md +148 -0
  142. package/.mindforge/skills/autonomous-agent-harness/SKILL.md +218 -0
  143. package/.mindforge/skills/autonomous-agents/SKILL.md +59 -0
  144. package/.mindforge/skills/autonomous-loops/SKILL.md +105 -0
  145. package/.mindforge/skills/build-system-optimization/SKILL.md +54 -0
  146. package/.mindforge/skills/build-vs-buy/SKILL.md +80 -0
  147. package/.mindforge/skills/bundle-optimization/SKILL.md +174 -0
  148. package/.mindforge/skills/business-analyst/SKILL.md +82 -0
  149. package/.mindforge/skills/caching-strategies/SKILL.md +132 -0
  150. package/.mindforge/skills/capacity-planning/SKILL.md +96 -0
  151. package/.mindforge/skills/causal-inference/SKILL.md +42 -0
  152. package/.mindforge/skills/cdn-optimization/SKILL.md +212 -0
  153. package/.mindforge/skills/change-management/SKILL.md +106 -0
  154. package/.mindforge/skills/chaos-engineering/SKILL.md +99 -0
  155. package/.mindforge/skills/ci-cd-pipeline/SKILL.md +118 -0
  156. package/.mindforge/skills/cli-design/SKILL.md +118 -0
  157. package/.mindforge/skills/code-generation-patterns/SKILL.md +92 -0
  158. package/.mindforge/skills/code-review-methodology/SKILL.md +180 -0
  159. package/.mindforge/skills/code-tour/SKILL.md +145 -0
  160. package/.mindforge/skills/codebase-onboarding/SKILL.md +95 -0
  161. package/.mindforge/skills/compliance-as-code/SKILL.md +195 -0
  162. package/.mindforge/skills/conflict-resolution/SKILL.md +87 -0
  163. package/.mindforge/skills/connection-pooling/SKILL.md +151 -0
  164. package/.mindforge/skills/container-security/SKILL.md +151 -0
  165. package/.mindforge/skills/context-engineering/SKILL.md +114 -0
  166. package/.mindforge/skills/continuous-learning/SKILL.md +84 -0
  167. package/.mindforge/skills/contract-testing/SKILL.md +85 -0
  168. package/.mindforge/skills/cost-aware-routing/SKILL.md +83 -0
  169. package/.mindforge/skills/cost-estimation/SKILL.md +82 -0
  170. package/.mindforge/skills/council/SKILL.md +68 -0
  171. package/.mindforge/skills/cqrs-event-sourcing/SKILL.md +95 -0
  172. package/.mindforge/skills/cross-platform-testing/SKILL.md +43 -0
  173. package/.mindforge/skills/data-governance/SKILL.md +42 -0
  174. package/.mindforge/skills/data-lakehouse/SKILL.md +42 -0
  175. package/.mindforge/skills/data-mesh/SKILL.md +42 -0
  176. package/.mindforge/skills/data-modeling/SKILL.md +107 -0
  177. package/.mindforge/skills/data-pipeline-design/SKILL.md +171 -0
  178. package/.mindforge/skills/data-privacy-engineering/SKILL.md +42 -0
  179. package/.mindforge/skills/database-performance/SKILL.md +174 -0
  180. package/.mindforge/skills/database-sharding-advanced/SKILL.md +206 -0
  181. package/.mindforge/skills/de-sloppify/SKILL.md +120 -0
  182. package/.mindforge/skills/defense-in-depth/SKILL.md +84 -0
  183. package/.mindforge/skills/delegation-patterns/SKILL.md +123 -0
  184. package/.mindforge/skills/dependency-management/SKILL.md +94 -0
  185. package/.mindforge/skills/deployment-workflow/SKILL.md +135 -0
  186. package/.mindforge/skills/design-system/SKILL.md +113 -0
  187. package/.mindforge/skills/developer-onboarding/SKILL.md +99 -0
  188. package/.mindforge/skills/developer-productivity-metrics/SKILL.md +59 -0
  189. package/.mindforge/skills/distributed-consensus/SKILL.md +141 -0
  190. package/.mindforge/skills/dmux-workflows/SKILL.md +141 -0
  191. package/.mindforge/skills/dns-architecture/SKILL.md +167 -0
  192. package/.mindforge/skills/doc-health-audit/SKILL.md +102 -0
  193. package/.mindforge/skills/ecommerce-architecture/SKILL.md +41 -0
  194. package/.mindforge/skills/edge-computing/SKILL.md +91 -0
  195. package/.mindforge/skills/edtech-platform/SKILL.md +41 -0
  196. package/.mindforge/skills/email-deliverability/SKILL.md +177 -0
  197. package/.mindforge/skills/embedding-systems/SKILL.md +55 -0
  198. package/.mindforge/skills/environment-management/SKILL.md +54 -0
  199. package/.mindforge/skills/error-handling-architecture/SKILL.md +118 -0
  200. package/.mindforge/skills/estimation-techniques/SKILL.md +113 -0
  201. package/.mindforge/skills/eval-harness/SKILL.md +180 -0
  202. package/.mindforge/skills/event-driven-architecture/SKILL.md +162 -0
  203. package/.mindforge/skills/experiment-design/SKILL.md +139 -0
  204. package/.mindforge/skills/experiment-platform/SKILL.md +43 -0
  205. package/.mindforge/skills/feature-engineering/SKILL.md +42 -0
  206. package/.mindforge/skills/feature-flag-management/SKILL.md +183 -0
  207. package/.mindforge/skills/fine-tuning-workflow/SKILL.md +189 -0
  208. package/.mindforge/skills/fintech-patterns/SKILL.md +41 -0
  209. package/.mindforge/skills/flutter-architecture/SKILL.md +42 -0
  210. package/.mindforge/skills/gaming-backend/SKILL.md +41 -0
  211. package/.mindforge/skills/git-workflow-design/SKILL.md +129 -0
  212. package/.mindforge/skills/graceful-degradation/SKILL.md +95 -0
  213. package/.mindforge/skills/graphql-patterns/SKILL.md +243 -0
  214. package/.mindforge/skills/guardrails-and-safety/SKILL.md +137 -0
  215. package/.mindforge/skills/healthcare-systems/SKILL.md +40 -0
  216. package/.mindforge/skills/hiring-engineering/SKILL.md +119 -0
  217. package/.mindforge/skills/human-in-the-loop-design/SKILL.md +234 -0
  218. package/.mindforge/skills/i18n-architecture/SKILL.md +147 -0
  219. package/.mindforge/skills/idempotency-patterns/SKILL.md +84 -0
  220. package/.mindforge/skills/incident-communication/SKILL.md +96 -0
  221. package/.mindforge/skills/incident-management/SKILL.md +97 -0
  222. package/.mindforge/skills/infrastructure-as-code/SKILL.md +98 -0
  223. package/.mindforge/skills/instinct-clustering/SKILL.md +190 -0
  224. package/.mindforge/skills/internal-developer-platform/SKILL.md +51 -0
  225. package/.mindforge/skills/iot-platform/SKILL.md +41 -0
  226. package/.mindforge/skills/k8s-deployment/SKILL.md +358 -0
  227. package/.mindforge/skills/knowledge-graphs/SKILL.md +56 -0
  228. package/.mindforge/skills/knowledge-sharing-systems/SKILL.md +112 -0
  229. package/.mindforge/skills/llm-cost-optimization/SKILL.md +198 -0
  230. package/.mindforge/skills/llm-orchestration/SKILL.md +56 -0
  231. package/.mindforge/skills/load-testing/SKILL.md +84 -0
  232. package/.mindforge/skills/logistics-optimization/SKILL.md +40 -0
  233. package/.mindforge/skills/market-researcher/SKILL.md +99 -0
  234. package/.mindforge/skills/marketplace-trust/SKILL.md +40 -0
  235. package/.mindforge/skills/mcp-server-patterns/SKILL.md +264 -0
  236. package/.mindforge/skills/media-streaming/SKILL.md +41 -0
  237. package/.mindforge/skills/meeting-architecture/SKILL.md +146 -0
  238. package/.mindforge/skills/mentoring-patterns/SKILL.md +77 -0
  239. package/.mindforge/skills/microservices-patterns/SKILL.md +83 -0
  240. package/.mindforge/skills/migration-platform/SKILL.md +61 -0
  241. package/.mindforge/skills/migration-strategies/SKILL.md +129 -0
  242. package/.mindforge/skills/ml-feature-store/SKILL.md +56 -0
  243. package/.mindforge/skills/ml-monitoring/SKILL.md +42 -0
  244. package/.mindforge/skills/mobile-performance/SKILL.md +44 -0
  245. package/.mindforge/skills/mobile-security/SKILL.md +45 -0
  246. package/.mindforge/skills/model-evaluation/SKILL.md +53 -0
  247. package/.mindforge/skills/monorepo-management/SKILL.md +100 -0
  248. package/.mindforge/skills/multi-llm-consult/SKILL.md +75 -0
  249. package/.mindforge/skills/multi-tenancy-patterns/SKILL.md +145 -0
  250. package/.mindforge/skills/multi-turn-conversation-design/SKILL.md +206 -0
  251. package/.mindforge/skills/multimodal-ai/SKILL.md +51 -0
  252. package/.mindforge/skills/mutation-testing/SKILL.md +97 -0
  253. package/.mindforge/skills/notification-system-design/SKILL.md +168 -0
  254. package/.mindforge/skills/observability-stack/SKILL.md +136 -0
  255. package/.mindforge/skills/offline-first-design/SKILL.md +43 -0
  256. package/.mindforge/skills/on-call-design/SKILL.md +111 -0
  257. package/.mindforge/skills/pagination-patterns/SKILL.md +230 -0
  258. package/.mindforge/skills/payment-integration/SKILL.md +176 -0
  259. package/.mindforge/skills/performance-reviews/SKILL.md +140 -0
  260. package/.mindforge/skills/platform-observability/SKILL.md +58 -0
  261. package/.mindforge/skills/platform-reliability/SKILL.md +52 -0
  262. package/.mindforge/skills/post-incident-learning/SKILL.md +96 -0
  263. package/.mindforge/skills/product-manager/SKILL.md +104 -0
  264. package/.mindforge/skills/progressive-web-app/SKILL.md +44 -0
  265. package/.mindforge/skills/prompt-engineering/SKILL.md +94 -0
  266. package/.mindforge/skills/proofreader/SKILL.md +158 -0
  267. package/.mindforge/skills/push-notification-architecture/SKILL.md +45 -0
  268. package/.mindforge/skills/python-performance/SKILL.md +183 -0
  269. package/.mindforge/skills/quality-audit/SKILL.md +171 -0
  270. package/.mindforge/skills/queue-design/SKILL.md +85 -0
  271. package/.mindforge/skills/rag-architecture/SKILL.md +176 -0
  272. package/.mindforge/skills/rate-limiting-design/SKILL.md +94 -0
  273. package/.mindforge/skills/react-native-patterns/SKILL.md +42 -0
  274. package/.mindforge/skills/react-performance/SKILL.md +229 -0
  275. package/.mindforge/skills/real-time-analytics/SKILL.md +42 -0
  276. package/.mindforge/skills/real-time-sync/SKILL.md +83 -0
  277. package/.mindforge/skills/responsive-native/SKILL.md +44 -0
  278. package/.mindforge/skills/responsive-patterns/SKILL.md +141 -0
  279. package/.mindforge/skills/rfc-pipeline/SKILL.md +114 -0
  280. package/.mindforge/skills/saas-multi-tenant/SKILL.md +41 -0
  281. package/.mindforge/skills/santa-method/SKILL.md +134 -0
  282. package/.mindforge/skills/search-implementation/SKILL.md +98 -0
  283. package/.mindforge/skills/secrets-platform/SKILL.md +56 -0
  284. package/.mindforge/skills/secrets-rotation/SKILL.md +173 -0
  285. package/.mindforge/skills/self-serve-infrastructure/SKILL.md +51 -0
  286. package/.mindforge/skills/serverless-patterns/SKILL.md +119 -0
  287. package/.mindforge/skills/skill-creator-meta/SKILL.md +146 -0
  288. package/.mindforge/skills/sprint-retrospective-facilitation/SKILL.md +112 -0
  289. package/.mindforge/skills/stakeholder-communication/SKILL.md +85 -0
  290. package/.mindforge/skills/state-management/SKILL.md +104 -0
  291. package/.mindforge/skills/stream-processing/SKILL.md +43 -0
  292. package/.mindforge/skills/streaming-architecture/SKILL.md +81 -0
  293. package/.mindforge/skills/supply-chain-security/SKILL.md +145 -0
  294. package/.mindforge/skills/synthetic-data-generation/SKILL.md +52 -0
  295. package/.mindforge/skills/system-design/SKILL.md +88 -0
  296. package/.mindforge/skills/team-topology-design/SKILL.md +107 -0
  297. package/.mindforge/skills/technical-debt-management/SKILL.md +86 -0
  298. package/.mindforge/skills/technical-interview-design/SKILL.md +98 -0
  299. package/.mindforge/skills/technical-leadership/SKILL.md +75 -0
  300. package/.mindforge/skills/technical-writing/SKILL.md +237 -0
  301. package/.mindforge/skills/technology-radar/SKILL.md +88 -0
  302. package/.mindforge/skills/testing-anti-patterns/SKILL.md +288 -0
  303. package/.mindforge/skills/threat-modeling/SKILL.md +109 -0
  304. package/.mindforge/skills/tool-design/SKILL.md +138 -0
  305. package/.mindforge/skills/typescript-advanced/SKILL.md +198 -0
  306. package/.mindforge/skills/using-git-worktrees/SKILL.md +139 -0
  307. package/.mindforge/skills/verification-loop/SKILL.md +97 -0
  308. package/.mindforge/skills/vibe-security/SKILL.md +165 -0
  309. package/.mindforge/skills/visual-regression-testing/SKILL.md +97 -0
  310. package/.mindforge/skills/websocket-patterns/SKILL.md +203 -0
  311. package/.mindforge/skills/writing-plans/SKILL.md +170 -0
  312. package/.mindforge/skills/writing-skills/SKILL.md +216 -0
  313. package/.mindforge/skills/zero-trust-architecture/SKILL.md +166 -0
  314. package/CHANGELOG.md +195 -0
  315. package/MINDFORGE.md +4 -4
  316. package/README.md +2 -2
  317. package/RELEASENOTES.md +66 -0
  318. package/bin/installer-core.js +1 -1
  319. package/bin/wizard/theme.js +2 -2
  320. package/docs/commands-reference.md +18 -1
  321. package/package.json +2 -2
  322. package/.mindforge/personas/data-privacy-engineer.md +0 -187
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: serverless-patterns
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.1.1
5
+ status: stable
6
+ triggers: serverless pattern, cold start mitigation, function composition, event trigger lambda, stateless function, serverless state management, lambda architecture, function timeout, serverless cost model, ephemeral compute, serverless scaling, function orchestration
7
+ compose: cost-estimation
8
+ ---
9
+
10
+ # Skill — Serverless Patterns
11
+
12
+ ## When this skill activates
13
+ Any task involving serverless function design, cold start optimization,
14
+ function composition, event-driven architectures using FaaS platforms,
15
+ or cost modeling for serverless workloads.
16
+
17
+ ## Mandatory actions when this skill is active
18
+
19
+ ### Before writing any code
20
+ 1. Identify the trigger type (HTTP, queue, schedule, storage event, stream).
21
+ 2. Determine state requirements and where state will live (DynamoDB, Redis, S3).
22
+ 3. Estimate invocation volume and duration for cost projection.
23
+ 4. Decide composition pattern (Step Functions vs choreography vs direct invoke).
24
+
25
+ ### During implementation
26
+ - Keep functions focused (single responsibility).
27
+ - Externalize all state (no reliance on local filesystem or memory between invocations).
28
+ - Implement idempotency keys for retry-safe operations.
29
+ - Set appropriate timeout values (not max — just enough + buffer).
30
+ - Use structured logging with correlation IDs for distributed tracing.
31
+ - Checkpoint long-running work before timeout boundary.
32
+
33
+ ### After implementation
34
+ - Verify cold start latency meets SLA requirements.
35
+ - Confirm cost model aligns with budget (invocations × duration × memory).
36
+ - Test retry and failure scenarios end-to-end.
37
+ - Monitor concurrency limits and throttling metrics.
38
+
39
+ ## Cold Start Mitigation
40
+
41
+ ### Techniques
42
+ 1. **Provisioned concurrency** — Pre-warm N instances (cost trade-off).
43
+ 2. **Bundle optimization** — Smaller deployment = faster init.
44
+ 3. **Avoid VPC** — VPC attachment adds 5-10s cold start (only if DB needed).
45
+ 4. **Lazy initialization** — Defer heavy setup until first request needs it.
46
+ 5. **Connection pooling** — Use RDS Proxy or connection pool service.
47
+ 6. **Language choice** — Go/Rust cold start < Python < Java/Node.
48
+
49
+ ### When cold start matters
50
+ - Synchronous user-facing APIs (matters a lot).
51
+ - Async queue processors (usually doesn't matter).
52
+ - Scheduled jobs (doesn't matter at all).
53
+
54
+ ## Composition Patterns
55
+
56
+ ### Step Functions (Orchestration)
57
+ - Central coordinator manages workflow state.
58
+ - Built-in retry, catch, timeout per step.
59
+ - Visual debugging of execution history.
60
+ - Best for: complex workflows, human approval steps, long-running processes.
61
+
62
+ ### Choreography (Event-Driven)
63
+ - Each function emits events, others react.
64
+ - No single point of failure.
65
+ - Harder to debug end-to-end.
66
+ - Best for: loosely coupled, independent scaling per step.
67
+
68
+ ### Fan-Out / Fan-In
69
+ - Dispatch N parallel tasks → aggregate results.
70
+ - Use SQS/SNS for fan-out, DynamoDB for aggregation.
71
+ - Handle partial failures gracefully.
72
+
73
+ ## State Management
74
+
75
+ | State Type | Solution | Use When |
76
+ |-----------|----------|----------|
77
+ | Session state | DynamoDB / Redis | Auth tokens, cart |
78
+ | Workflow state | Step Functions | Multi-step processes |
79
+ | Cache | ElastiCache / DAX | Repeated reads |
80
+ | File state | S3 | Large objects |
81
+ | Event state | Event carried | Pass between functions |
82
+
83
+ ## Cost Model
84
+
85
+ ```
86
+ Monthly cost = (invocations × $0.20/1M) + (GB-seconds × $0.0000166667)
87
+ ```
88
+
89
+ ### Cost comparison triggers
90
+ - If >1M invocations/hour sustained → consider containers.
91
+ - If function runs >15min → containers or batch.
92
+ - If always-on with predictable load → containers cheaper.
93
+ - If spiky/unpredictable → serverless wins on cost.
94
+
95
+ ## Trigger Patterns
96
+
97
+ | Trigger | Pattern | Key Concern |
98
+ |---------|---------|-------------|
99
+ | HTTP (API Gateway) | Request/response | Cold start latency |
100
+ | SQS | Queue consumer | Batch size, visibility timeout |
101
+ | Schedule (cron) | Periodic job | Idempotency on overlap |
102
+ | S3 event | File processor | Duplicate events possible |
103
+ | DynamoDB stream | Change capture | Ordering guarantees |
104
+ | Kinesis | Stream processor | Shard iterator, checkpointing |
105
+
106
+ ## Timeout Strategy
107
+ - Set timeout = expected p99 duration + 20% buffer.
108
+ - Checkpoint work before 80% of timeout.
109
+ - Implement dead-letter queues for timed-out invocations.
110
+ - Never set timeout to maximum "just in case."
111
+
112
+ ## Self-check
113
+ - [ ] Function is idempotent (safe to retry).
114
+ - [ ] State externalized (no local filesystem reliance).
115
+ - [ ] Timeout set appropriately (not max).
116
+ - [ ] Cold start measured and within SLA.
117
+ - [ ] Cost model validated against expected traffic.
118
+ - [ ] Dead-letter queue configured for failures.
119
+ - [ ] Correlation IDs propagated for tracing.
@@ -0,0 +1,146 @@
1
+ ---
2
+ name: skill-creator-meta
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.5
5
+ status: stable
6
+ triggers: create skill, skill creator, author skill, build skill, new skill, skill development, skill writing, skill testing, skill eval, meta-skill, skill optimization, skill iteration
7
+ compose: eval-harness
8
+ ---
9
+
10
+ # Skill — Skill Creator Meta (Iterative Skill Authoring & Optimization)
11
+
12
+ ## When this skill activates
13
+
14
+ When creating, authoring, testing, or optimizing MindForge skills. This is the
15
+ meta-skill that governs the lifecycle of all other skills — from initial interview
16
+ through eval-driven iteration to final registration. Use whenever a new skill needs
17
+ to be created, an existing skill needs optimization, or skill quality needs
18
+ systematic validation.
19
+
20
+ Core principle: **Eval-driven iteration** — skills are not "done" until they
21
+ demonstrably outperform the no-skill baseline on realistic test cases.
22
+
23
+ ## Mandatory actions when this skill is active
24
+
25
+ ### Before skill creation begins
26
+
27
+ 1. **Interview for specification:**
28
+ - What does this skill do? (one-sentence purpose)
29
+ - When should it trigger? (specific user intents, not vague categories)
30
+ - What is the output format? (file, inline response, structured data)
31
+ - What edge cases exist? (partial matches, ambiguous triggers, conflicting skills)
32
+ - What dependencies does it have? (other skills via compose, external tools, MCP servers)
33
+
34
+ 2. **Validate against existing skills:**
35
+ - Check MANIFEST.md for trigger overlap (jaccard > 0.3 = conflict)
36
+ - Verify the skill covers a genuinely distinct capability
37
+ - If overlap exists: either extend existing skill or document why separation is needed
38
+
39
+ 3. **Define the skill schema constraints:**
40
+ - SKILL.md must be under 500 lines (enforced)
41
+ - YAML frontmatter must include: name, version, min_mindforge_version, status, triggers
42
+ - Optional: compose (list of skill dependencies activated alongside)
43
+ - Body must include: "When this skill activates", "Mandatory actions when this skill is active" (Before/During/After), "Self-check before task completion"
44
+
45
+ ### During skill creation
46
+
47
+ **Phase 1 — Draft:**
48
+ - Write the SKILL.md following the schema exactly
49
+ - Triggers should be 8-15 phrases covering natural language variations
50
+ - Body should be action-oriented (imperative verbs, numbered steps)
51
+ - Include concrete examples where behavior might be ambiguous
52
+
53
+ **Phase 2 — Create test cases:**
54
+ ```
55
+ .mindforge/evals/[skill-name]/
56
+ ├── test-cases.json # 2-3 realistic prompts complex enough to trigger loading
57
+ ├── assertions.json # objectively verifiable success criteria
58
+ └── benchmark.json # aggregated results across iterations
59
+ ```
60
+
61
+ Test case structure:
62
+ ```json
63
+ {
64
+ "test_cases": [
65
+ {
66
+ "id": "tc-001",
67
+ "prompt": "realistic user prompt that should trigger this skill",
68
+ "context": "any relevant project state",
69
+ "expected_behaviors": ["specific", "verifiable", "outcomes"],
70
+ "should_trigger": true
71
+ }
72
+ ]
73
+ }
74
+ ```
75
+
76
+ **Phase 3 — Parallel evaluation:**
77
+ - Run each test case WITH the skill loaded (experimental condition)
78
+ - Run each test case WITHOUT the skill loaded (baseline condition)
79
+ - Compare outputs on defined assertions
80
+ - Skill must demonstrably improve output quality over baseline
81
+
82
+ **Phase 4 — Trigger optimization:**
83
+ - Generate 20 trigger evaluation queries:
84
+ - 10 that SHOULD trigger the skill (true positives)
85
+ - 10 that should NOT trigger (true negatives — related but distinct intents)
86
+ - Test trigger matching accuracy
87
+ - Iterate on name/description/triggers up to 5 times until precision > 90%
88
+
89
+ **Phase 5 — User review:**
90
+ - Present: skill draft, test case outputs, benchmark scores, trigger accuracy
91
+ - Collect feedback on: missing behaviors, unnecessary behaviors, trigger gaps
92
+ - Document feedback for improvement phase
93
+
94
+ **Phase 6 — Improvement:**
95
+ - Generalize from specific feedback to patterns
96
+ - Bundle repeated helper logic into `scripts/` directory within skill folder
97
+ - Rewrite sections that received negative feedback
98
+ - Ensure changes don't regress previously-passing test cases
99
+
100
+ **Phase 7 — Final iteration:**
101
+ - Rerun all test cases against improved skill
102
+ - Compare to previous iteration (must not regress)
103
+ - If regression: investigate, fix, rerun
104
+
105
+ ### After skill creation
106
+
107
+ 1. **Register in MANIFEST.md:**
108
+ - Add entry with name, version, triggers, status
109
+ - Verify no trigger conflicts with existing entries
110
+
111
+ 2. **Verify file structure:**
112
+ ```
113
+ .mindforge/skills/[skill-name]/
114
+ ├── SKILL.md # the skill definition (required)
115
+ ├── scripts/ # helper scripts if needed (optional)
116
+ └── README.md # usage examples (optional)
117
+ ```
118
+
119
+ 3. **Store eval artifacts:**
120
+ ```
121
+ .mindforge/evals/[skill-name]/
122
+ ├── test-cases.json
123
+ ├── assertions.json
124
+ ├── benchmark.json
125
+ └── iterations/ # historical results per iteration
126
+ ```
127
+
128
+ 4. **Final quality gate:**
129
+ - Skill passes all test cases
130
+ - Trigger precision > 90% on 20-query eval set
131
+ - Skill outperforms baseline on all assertions
132
+ - No trigger conflicts in MANIFEST.md
133
+ - Under 500 lines
134
+
135
+ ## Self-check before task completion
136
+
137
+ Before marking a skill creation task done:
138
+
139
+ - [ ] Did I interview for edge cases and dependencies?
140
+ - [ ] Did I create eval test cases (2-3 realistic prompts)?
141
+ - [ ] Did I run parallel comparison (with-skill vs baseline)?
142
+ - [ ] Did I optimize triggers with 20 evaluation queries (10 should, 10 should-not)?
143
+ - [ ] Did I iterate based on user feedback?
144
+ - [ ] Did I verify no trigger conflicts in MANIFEST.md?
145
+ - [ ] Is the skill under 500 lines?
146
+ - [ ] Does the final iteration outperform all previous iterations?
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: sprint-retrospective-facilitation
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.1.0
5
+ status: stable
6
+ triggers: sprint retrospective, retro facilitation, retrospective format, four Ls retrospective, sailboat retrospective, timeline retrospective, retro action item, team health signal, retro pattern detection, improvement tracking, retro activity, facilitation technique
7
+ ---
8
+
9
+ # Sprint Retrospective Facilitation
10
+
11
+ ## When this skill activates
12
+
13
+ This skill activates when planning, facilitating, or improving sprint retrospectives.
14
+ It provides multiple retrospective formats, facilitation techniques for psychological
15
+ safety, action item design principles, and pattern detection across retros to drive
16
+ continuous team improvement.
17
+
18
+ ## Mandatory actions when this skill is active
19
+
20
+ ### Before
21
+
22
+ 1. **Select format based on team state** — Rotate formats to prevent staleness. Choose
23
+ based on what the team needs right now (celebration, problem-solving, future-focus).
24
+ 2. **Prepare the space** — Set up the board/template, send pre-retro prompts if using
25
+ async input, confirm time-box with team.
26
+ 3. **Review previous retro actions** — Check completion status of last retro's action
27
+ items. This is the first agenda item every time.
28
+
29
+ ### During
30
+
31
+ 4. **Retrospective formats (rotate these):**
32
+
33
+ - **4Ls (Liked / Learned / Lacked / Longed-for):**
34
+ Balanced format covering positives and gaps. Good default.
35
+ Liked = what went well; Learned = new insights; Lacked = what was missing;
36
+ Longed-for = wishes for the future.
37
+
38
+ - **Sailboat:**
39
+ Visual metaphor. Wind = forces helping us; Anchor = forces slowing us;
40
+ Rocks = risks ahead; Island = our goal/destination.
41
+ Good for teams needing to name risks they have been avoiding.
42
+
43
+ - **Timeline:**
44
+ Map sprint events chronologically, then discuss emotions/energy at each point.
45
+ Good for sprints with many events or high drama.
46
+ Reveals patterns in when energy drops or rises.
47
+
48
+ - **Start / Stop / Continue:**
49
+ Simple and direct. Start = new practices to try; Stop = practices hurting us;
50
+ Continue = practices working well. Good for action-oriented teams.
51
+
52
+ - **Mad / Sad / Glad:**
53
+ Emotion-focused. Good for teams that need to process feelings before solutions.
54
+ Validates that emotions are legitimate data.
55
+
56
+ 5. **Facilitation principles:**
57
+ - **Psychological safety first** — Explicitly state: "This is a blame-free zone.
58
+ We are examining the system, not judging individuals."
59
+ - **Equal voice** — Use silent writing before discussion. Prevents loud voices from
60
+ dominating. Everyone contributes before anyone speaks.
61
+ - **Time-box per section** — Strict timekeeping. Brainstorm (10 min), group/vote
62
+ (5 min), discuss top items (25 min), actions (10 min).
63
+ - **Dot-voting** — Each person gets 3 votes. Discuss only the top-voted items.
64
+ This prevents discussing everything superficially.
65
+ - **Facilitator does not contribute** — The facilitator manages process, not content.
66
+ If the facilitator has opinions, they participate as a team member and delegate
67
+ facilitation.
68
+
69
+ 6. **Action item design (SMART):**
70
+ - **Specific** — "Add integration test for payment flow" not "improve testing"
71
+ - **Measurable** — Clear definition of done
72
+ - **Assigned** — One owner (not "the team")
73
+ - **Realistic** — Achievable within next sprint
74
+ - **Time-boxed** — Due date before next retro
75
+ - Maximum 3 action items per retro (more = none get done)
76
+
77
+ 7. **Pattern detection across retros:**
78
+ - Track themes that recur across multiple retros.
79
+ - If the same issue appears 3+ times, it is systemic — escalate to leadership or
80
+ dedicate a sprint to fixing it.
81
+ - Maintain a "retro theme tracker" showing issue frequency over time.
82
+ - Celebrate patterns that disappear (proof that retros drive improvement).
83
+
84
+ 8. **Team health signals to monitor:**
85
+ - Participation level (are people engaged or checked out?)
86
+ - Action item completion rate (are retros driving change?)
87
+ - Theme recurrence (are the same problems persisting?)
88
+ - Energy/morale trend (is the team trajectory improving?)
89
+ - Psychological safety indicators (are people raising hard topics?)
90
+
91
+ ### After
92
+
93
+ 9. **Publish retro summary** — Share action items and key themes with the team within
94
+ 24 hours. Keep it brief.
95
+ 10. **Track action items** — Add to sprint backlog or team board. Review completion at
96
+ next retro opening.
97
+ 11. **Rotate facilitator** — Different person each sprint builds shared ownership of
98
+ team improvement.
99
+ 12. **Evolve the process** — If retros feel stale, try a new format. If attendance
100
+ drops, investigate why. The retro itself should improve over time.
101
+
102
+ ## Self-check before task completion
103
+
104
+ - [ ] Previous retro action items reviewed for completion status
105
+ - [ ] Format selected intentionally (not just defaulting to the same one)
106
+ - [ ] Psychological safety explicitly established at the start
107
+ - [ ] Equal voice mechanisms used (silent writing, voting)
108
+ - [ ] Discussion time-boxed with strict facilitation
109
+ - [ ] Maximum 3 SMART action items generated
110
+ - [ ] Each action item has a single owner and due date
111
+ - [ ] Recurring themes identified and tracked
112
+ - [ ] Summary published within 24 hours
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: stakeholder-communication
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.3.0
5
+ status: stable
6
+ triggers: stakeholder communication, technical translation, non-technical explanation, executive reporting technical, risk communication, engineering status update, technical storytelling, cross-functional communication, engineering metrics reporting, progress communication, technical presentation, stakeholder alignment
7
+ ---
8
+
9
+ # Stakeholder Communication
10
+
11
+ ## When this skill activates
12
+
13
+ This skill activates when translating technical concepts for non-technical audiences, writing executive status reports, communicating risks and tradeoffs, presenting technical work to cross-functional teams, or aligning stakeholders on technical decisions. It applies to engineers, tech leads, and engineering managers who interface with product, design, executives, or customers.
14
+
15
+ ## Mandatory actions when this skill is active
16
+
17
+ ### Before communicating with stakeholders
18
+
19
+ 1. **Identify the audience** — Executives care about business impact, timelines, and risks. Product managers care about feature tradeoffs and user impact. Designers care about constraints and implementation feasibility. Tailor the message to the audience.
20
+ 2. **Define the communication goal** — Are you informing (status update), persuading (proposal approval), or aligning (shared understanding)? Different goals require different structures.
21
+ 3. **Anticipate questions** — What will stakeholders ask? Prepare answers for: "How long will this take?", "What happens if we skip this?", "What's the risk?", "Can we do X instead?"
22
+ 4. **Remove jargon** — Read your draft out loud. If you use terms like "idempotency," "eventual consistency," or "distributed lock," either define them or use simpler language. Jargon creates confusion, not credibility.
23
+
24
+ ### During stakeholder interactions
25
+
26
+ #### Technical Translation Principles
27
+
28
+ - **Start with outcomes, not implementation** — Don't say "We're migrating from REST to GraphQL." Say "Users will get faster page loads because we'll fetch only the data they need, not the entire object."
29
+ - **Use analogies for complex concepts** — Distributed systems are like postal mail (messages can arrive out of order). Caching is like a notepad (faster but can be outdated). Load balancing is like grocery store checkout lanes (distributes work evenly).
30
+ - **Quantify whenever possible** — "This will improve performance" is vague. "This will reduce page load from 3 seconds to 1 second for 80% of users" is concrete.
31
+ - **Avoid binary thinking** — Technical decisions rarely have a single "right" answer. Frame as tradeoffs: "Option A is faster but harder to maintain. Option B is slower but more reliable."
32
+
33
+ #### Executive Reporting
34
+
35
+ - **Use BLUF (Bottom Line Up Front)** — Lead with the conclusion: "Migration is on track for Q3 launch" or "We discovered a critical security issue that delays launch by 2 weeks." Executives don't have time for preamble.
36
+ - **Structure as Situation-Complication-Resolution** — Situation: what's the context? Complication: what's the problem or opportunity? Resolution: what are we doing about it?
37
+ - **Report in threes** — Three key accomplishments, three blockers, three upcoming milestones. Human brains chunk information in threes. More than that, and retention drops.
38
+ - **Surface risks early** — Executives hate surprises. If there's a 30% chance of delay, say so now. Don't wait until it's a certainty.
39
+ - **Show trend lines, not snapshots** — Don't just report current status. Show momentum: "Test coverage increased from 60% to 75% over the past month."
40
+
41
+ #### Risk Communication
42
+
43
+ - **Use likelihood + impact matrix** — Classify risks as High/Medium/Low likelihood and High/Medium/Low impact. High-likelihood + High-impact risks need mitigation plans immediately.
44
+ - **Describe risks in business terms** — "The database could fail" is technical. "If the database fails, users can't place orders, costing $X/hour in lost revenue" is business risk.
45
+ - **Always pair risks with mitigations** — Don't just say "We might miss the deadline." Say "We might miss the deadline. To mitigate, we're cutting feature X and adding 2 engineers to the critical path."
46
+ - **Avoid crying wolf** — Reserve "critical" for genuine emergencies. If every risk is critical, stakeholders tune out.
47
+
48
+ #### Cross-Functional Alignment
49
+
50
+ - **Run decision-making meetings, not information dumps** — Send status updates via email or Slack. Use synchronous meetings only for decisions that require discussion and alignment.
51
+ - **Document decisions in real-time** — Designate a note-taker. Write down: decision made, who owns it, by when, and any open questions. Share notes immediately after the meeting.
52
+ - **Use the RACI model** — For every decision or project, clarify: Responsible (who does the work), Accountable (who owns the outcome), Consulted (who gives input), Informed (who needs to know). Ambiguity causes dropped work and conflict.
53
+ - **Create shared mental models** — Draw diagrams during discussions. Visuals align faster than words. Use whiteboards, Miro, or Excalidraw.
54
+
55
+ #### Progress Communication
56
+
57
+ - **Set expectations early** — At project kickoff, define what "done" looks like, milestones, and communication cadence. Prevents misalignment later.
58
+ - **Use percent-complete cautiously** — Software projects are non-linear. "80% complete" often means "50% of the hardest work remains." Instead, report: completed milestones, in-progress work, and blockers.
59
+ - **Celebrate milestones publicly** — When you ship a feature, complete a migration, or hit a quality goal, share it with the team and stakeholders. Momentum builds morale.
60
+ - **Adjust timelines transparently** — If the deadline slips, explain why, by how much, and what's being done to prevent further slips. Hiding delays destroys trust.
61
+
62
+ #### Technical Presentations
63
+
64
+ - **Start with the "so what"** — First slide: what is this, why does it matter, what should the audience do with this information. Hook attention immediately.
65
+ - **One idea per slide** — Dense slides are unreadable. One chart, one diagram, or one key point per slide. Use speaker notes for details.
66
+ - **Demo, don't describe** — If possible, show the thing working. Live demos (with a backup video) are 10x more compelling than screenshots.
67
+ - **End with a call to action** — What do you want stakeholders to do? Approve the proposal? Provide feedback? Assign resources? Make the ask explicit.
68
+
69
+ ### After stakeholder communication
70
+
71
+ - **Verify understanding** — After a presentation or status update, ask: "What questions do you have?" or "Does this make sense?" Silence doesn't mean alignment; it often means confusion.
72
+ - **Summarize in writing** — Follow up with a concise summary: key decisions, action items, owners, and deadlines. Spoken agreements fade; written agreements persist.
73
+ - **Track communication effectiveness** — If stakeholders repeatedly ask the same questions, your communication isn't landing. Adjust format, frequency, or content.
74
+ - **Collect feedback** — Periodically ask stakeholders: "Are my status updates helpful? Too detailed? Not detailed enough?" Course-correct before dissatisfaction builds.
75
+
76
+ ## Self-check before task completion
77
+
78
+ - [ ] Message is tailored to the specific audience (execs, product, design, customers)
79
+ - [ ] Communication goal is clear (inform, persuade, or align)
80
+ - [ ] Jargon is removed or defined; analogies are used for complex concepts
81
+ - [ ] Outcomes and business impact are emphasized over implementation details
82
+ - [ ] Risks are quantified with likelihood + impact and paired with mitigations
83
+ - [ ] Executive reports use BLUF (Bottom Line Up Front) and report in threes
84
+ - [ ] Decisions are documented with RACI (Responsible, Accountable, Consulted, Informed)
85
+ - [ ] Written follow-up summarizes key decisions, action items, and deadlines
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: state-management
3
+ version: 1.0.0
4
+ min_mindforge_version: 0.1.0
5
+ status: stable
6
+ triggers: state management architecture, server state pattern, client state design, zustand store, tanstack query pattern, url state management, form state handling, optimistic update pattern, cache invalidation strategy, state machine design, global state pattern, state synchronization
7
+ ---
8
+
9
+ # Skill — State Management
10
+
11
+ ## When this skill activates
12
+ Any task involving state architecture decisions, choosing between state libraries,
13
+ implementing caching strategies, designing optimistic updates, or modeling complex
14
+ UI state flows.
15
+
16
+ ## Mandatory actions when this skill is active
17
+
18
+ ### Before writing any code
19
+ 1. Categorize the state: Is it server state, client state, URL state, or form state?
20
+ 2. Select the appropriate tool for the category (see below).
21
+ 3. Map data flow direction and identify single sources of truth.
22
+
23
+ ### During implementation
24
+ - Server state (TanStack Query): define query keys, stale times, cache invalidation triggers, and prefetch points.
25
+ - Client state (Zustand): keep stores small and focused, use selectors for render optimization.
26
+ - URL state: encode shareable state in search params, decode with validation.
27
+ - Form state (react-hook-form): define schema validation (Zod), handle submission lifecycle, surface errors.
28
+ - Optimistic updates: update UI immediately, queue mutation, rollback on error with user feedback.
29
+
30
+ ### After implementation
31
+ - Verify no prop drilling exists where a store or query would be cleaner.
32
+ - Confirm cache invalidation triggers fire correctly on mutations.
33
+ - Test offline/error scenarios for optimistic updates.
34
+
35
+ ## State categories and tools
36
+
37
+ ### Server State — TanStack Query
38
+ - **Fetch**: `useQuery` with structured query keys (`['todos', { filter }]`).
39
+ - **Cache**: configure `staleTime` and `gcTime` per query type.
40
+ - **Invalidate**: `queryClient.invalidateQueries` on related mutations.
41
+ - **Prefetch**: `queryClient.prefetchQuery` on hover/route transition.
42
+
43
+ ### Client State — Zustand
44
+ - Simple global store with typed slices.
45
+ - Use selectors (`useStore(state => state.count)`) to prevent unnecessary re-renders.
46
+ - Persist to localStorage only when explicitly needed.
47
+ - Avoid putting server-fetched data in Zustand — that belongs in TanStack Query.
48
+
49
+ ### URL State
50
+ - Search params as state source for filters, pagination, sort.
51
+ - Makes state shareable via URL (copy-paste, bookmarks).
52
+ - Parse and validate on read (never trust raw URL input).
53
+
54
+ ### Form State — react-hook-form
55
+ - Schema validation with Zod (`zodResolver`).
56
+ - Handle submission states: idle, submitting, success, error.
57
+ - Surface field-level errors immediately, form-level errors on submit.
58
+ - Reset form state on successful submission.
59
+
60
+ ## Patterns
61
+
62
+ ### Optimistic Updates
63
+ ```typescript
64
+ // 1. Snapshot previous state
65
+ const previous = queryClient.getQueryData(['todos']);
66
+ // 2. Optimistically update
67
+ queryClient.setQueryData(['todos'], (old) => [...old, newTodo]);
68
+ // 3. Mutate server
69
+ try { await api.createTodo(newTodo); }
70
+ catch {
71
+ // 4. Rollback on error
72
+ queryClient.setQueryData(['todos'], previous);
73
+ toast.error('Failed to create todo');
74
+ }
75
+ ```
76
+
77
+ ### Cache Invalidation Strategies
78
+ - **Stale-while-revalidate**: serve cached, refetch in background.
79
+ - **Time-based**: `staleTime: 5 * 60 * 1000` for slowly changing data.
80
+ - **Event-based**: invalidate on mutation success, WebSocket message, or focus.
81
+
82
+ ### State Machines (XState)
83
+ Use for complex flows with defined states and transitions:
84
+ - Auth flow (idle → authenticating → authenticated → error).
85
+ - Multi-step forms (step1 → step2 → review → submitted).
86
+ - Define guards for conditional transitions.
87
+
88
+ ## Anti-patterns to avoid
89
+ - Prop drilling through 4+ component levels (use context or store).
90
+ - Putting server state in global store (use TanStack Query).
91
+ - Global store for state that only one component uses (use local state).
92
+ - Over-memoization (`useMemo`/`useCallback` without measured need).
93
+ - Derived state stored separately (compute it, don't sync it).
94
+
95
+ ## Self-check before task completion
96
+
97
+ Before marking a task done when this skill was active:
98
+
99
+ - [ ] Did I categorize all state correctly (server/client/URL/form)?
100
+ - [ ] Did I select the right tool for each category?
101
+ - [ ] Are optimistic updates properly handling rollback on error?
102
+ - [ ] Is cache invalidation tested for mutation scenarios?
103
+ - [ ] No prop drilling through more than 2-3 levels?
104
+ - [ ] No server state duplicated in client stores?
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: stream-processing
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.6.0
5
+ status: stable
6
+ triggers: stream processing architecture, event streaming pattern, windowing strategy stream, exactly-once stream processing, stream state management, Kafka streaming, Flink processing, stream join pattern, late event handling, stream aggregation, watermark strategy, event time processing
7
+ compose: streaming-architecture
8
+ ---
9
+
10
+ # Skill — Stream Processing
11
+
12
+ ## When this skill activates
13
+ This skill activates when designing real-time data pipelines, implementing event streaming architectures, or building low-latency aggregation systems. Use when data must be processed continuously as it arrives rather than in batch intervals.
14
+
15
+ ## Mandatory actions when this skill is active
16
+
17
+ ### Before writing any code
18
+ 1. Define processing semantics requirements: at-most-once (fast, lossy), at-least-once (duplicates possible), exactly-once (consistency critical)
19
+ 2. Select windowing strategy based on use case: tumbling (fixed non-overlapping), sliding (overlapping intervals), session (activity-based gaps)
20
+ 3. Design watermark strategy for handling late events: fixed delay, percentile-based, or custom heuristic with acceptable lateness window
21
+ 4. Establish state management approach: in-memory (fast but limited), RocksDB (scalable), remote store (shared state) with checkpointing frequency
22
+
23
+ ### During implementation
24
+ - Implement event time processing using timestamps from event payload rather than processing time to handle out-of-order events correctly
25
+ - Configure watermarks with balance between latency and completeness: too aggressive drops late events, too conservative increases latency
26
+ - Design stateful operations with appropriate state backend and checkpointing: every 5-60 seconds based on throughput and failure recovery requirements
27
+ - Build stream joins with care for state size: time-bounded joins, interval joins, or temporal table joins to prevent unbounded state growth
28
+ - Implement exactly-once semantics using transactional producers, idempotent consumers, and two-phase commit when required
29
+ - Handle late events with configurable strategy: drop and log, emit to side output, update previous window results with allowed lateness
30
+ - Design backpressure handling: flow control to slow down producers, buffer sizing, and scaling policies for consumer parallelism
31
+
32
+ ### After implementation
33
+ - Monitor stream processing lag metrics: consumer group lag, watermark delay, late events dropped, and checkpoint duration
34
+ - Build observability dashboards: throughput (events/sec), latency percentiles (p50/p95/p99), error rates, and state size growth
35
+ - Create alerting on critical conditions: lag exceeding SLA, checkpoint failures, repeated consumer rebalancing, state size approaching limits
36
+ - Document failure recovery procedures: checkpoint restoration, consumer group reset, and data replay strategies
37
+
38
+ ## Self-check before task completion
39
+ - [ ] Processing semantics (at-least-once or exactly-once) verified with end-to-end tests including failure injection
40
+ - [ ] Watermark strategy handles late events appropriately with acceptable data loss or latency trade-off documented
41
+ - [ ] State management configured with checkpointing and tested with recovery from checkpoint after failure
42
+ - [ ] Stream joins bounded in time with monitoring for state size growth and cleanup of expired state
43
+ - [ ] Backpressure scenarios tested with producer slowdown and consumer scaling validated under load