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,206 @@
1
+ ---
2
+ name: database-sharding-advanced
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.1.1
5
+ status: stable
6
+ triggers: database sharding advanced, resharding without downtime, cross-shard query, shard key selection, hotspot mitigation, shard rebalancing, consistent hashing shard, virtual shard, shard routing, shard-nothing architecture, geographic sharding, shard split
7
+ compose: database-patterns
8
+ ---
9
+
10
+ # Skill — Database Sharding (Advanced)
11
+
12
+ ## When this skill activates
13
+ Any task involving horizontal database partitioning across multiple nodes,
14
+ shard key selection, hotspot mitigation, resharding without downtime,
15
+ cross-shard query strategies, or geographic data distribution.
16
+
17
+ ## Mandatory actions when this skill is active
18
+
19
+ ### Before writing any code
20
+ 1. Confirm sharding is necessary (vertical scaling exhausted? read replicas insufficient?).
21
+ 2. Select shard key using the three criteria: high cardinality + even distribution + query alignment.
22
+ 3. Plan cross-shard query strategy for necessary joins/aggregations.
23
+ 4. Design resharding approach (will need it eventually — plan now).
24
+
25
+ ### During implementation
26
+ - Implement shard routing layer (application-level or proxy).
27
+ - Use consistent hashing with virtual nodes for even distribution.
28
+ - Denormalize data that would require frequent cross-shard joins.
29
+ - Pre-compute aggregations that span shards.
30
+ - Handle shard-local sequences (no global auto-increment).
31
+ - Implement request routing that is transparent to application code.
32
+
33
+ ### After implementation
34
+ - Verify even distribution across shards (no hotspots).
35
+ - Test cross-shard queries perform within acceptable latency.
36
+ - Validate resharding procedure in staging (dual-write → migrate → verify → cut).
37
+ - Monitor per-shard metrics (query latency, storage, connections).
38
+ - Load test at 2x expected traffic to validate shard capacity.
39
+
40
+ ## Shard Key Selection
41
+
42
+ ### Three Criteria (All Must Be Met)
43
+ 1. **High cardinality**: Many distinct values (user_id: good, country: bad).
44
+ 2. **Even distribution**: Values spread evenly across shards (random UUID: good, sequential ID: bad for hash).
45
+ 3. **Query alignment**: Most queries include the shard key (tenant_id if multi-tenant).
46
+
47
+ ### Common Shard Keys
48
+ | Application Type | Good Shard Key | Why |
49
+ |-----------------|---------------|-----|
50
+ | Multi-tenant SaaS | tenant_id | All tenant data co-located |
51
+ | Social media | user_id | Profile + posts together |
52
+ | E-commerce | customer_id | Orders, cart, history together |
53
+ | IoT | device_id | Time-series per device |
54
+ | Gaming | player_id | Player state co-located |
55
+
56
+ ### Anti-Pattern Shard Keys
57
+ - **Timestamp**: Creates hot shard (all writes to "current" shard).
58
+ - **Sequential ID**: Skews to latest shard.
59
+ - **Country/region**: Uneven (US shard overloaded, small countries under-utilized).
60
+ - **Status field**: Low cardinality, uneven distribution.
61
+
62
+ ## Hotspot Mitigation
63
+
64
+ ### Techniques
65
+ 1. **Hash distribution**: Hash shard key before routing (spreads sequential keys).
66
+ 2. **Virtual shards**: Map to many virtual shards, assign groups to physical nodes.
67
+ 3. **Composite keys**: Combine shard key with secondary attribute (user_id + date_bucket).
68
+ 4. **Time-based rotation**: For time-series, rotate shard assignment periodically.
69
+ 5. **Write-behind aggregation**: Buffer hot-key writes, flush periodically.
70
+
71
+ ### Detecting Hotspots
72
+ - Monitor per-shard write rate (>2x average = hotspot).
73
+ - Monitor per-shard storage growth (uneven = distribution problem).
74
+ - Monitor per-shard query latency (one slow = overloaded).
75
+
76
+ ## Resharding Without Downtime
77
+
78
+ ### The Double-Write Pattern
79
+ ```
80
+ Phase 1: Dual-Write
81
+ - Write to both old shard AND new shard.
82
+ - Read from old shard.
83
+
84
+ Phase 2: Backfill
85
+ - Copy historical data from old shard to new shard.
86
+ - Continue dual-writing.
87
+
88
+ Phase 3: Verify
89
+ - Compare old and new shard data (row counts, checksums).
90
+ - Fix any discrepancies.
91
+
92
+ Phase 4: Cutover
93
+ - Switch reads to new shard.
94
+ - Continue dual-writing briefly (safety net).
95
+
96
+ Phase 5: Cleanup
97
+ - Stop writing to old shard.
98
+ - Archive/delete old shard data.
99
+ ```
100
+
101
+ ### Online Schema Change Tools
102
+ - **gh-ost** (GitHub): Trigger-free, replication-based.
103
+ - **pt-online-schema-change** (Percona): Trigger-based.
104
+ - **Spirit**: For MySQL resharding specifically.
105
+
106
+ ### Rules
107
+ - Never do big-bang migration (all-at-once = risky).
108
+ - Always have rollback plan at every phase.
109
+ - Verify data integrity between phases (checksums).
110
+ - Run in staging first with production-like data volume.
111
+
112
+ ## Cross-Shard Queries
113
+
114
+ ### The Problem
115
+ Once data is sharded, joins across shards are expensive (scatter-gather).
116
+
117
+ ### Strategies
118
+ | Strategy | When to Use | Trade-off |
119
+ |----------|-------------|-----------|
120
+ | Denormalization | Frequent joins | Storage cost, write complexity |
121
+ | Pre-computed aggregations | Analytics, dashboards | Staleness, compute cost |
122
+ | Scatter-gather | Rare queries | Latency, complexity |
123
+ | Global tables (replicated) | Small reference data | Replication lag |
124
+ | Application-level joins | Low-volume cross-shard | Code complexity |
125
+
126
+ ### Denormalization Patterns
127
+ - Store user name alongside every order (avoid cross-shard user lookup).
128
+ - Embed category info in product documents.
129
+ - Maintain per-shard aggregation counters (updated async).
130
+
131
+ ### When Scatter-Gather Is Acceptable
132
+ - Admin queries (not user-facing, latency tolerant).
133
+ - Batch jobs (run off-peak).
134
+ - Infrequent search queries (use dedicated search index instead).
135
+
136
+ ## Consistent Hashing
137
+
138
+ ### How It Works
139
+ 1. Hash ring with positions 0 to 2^32.
140
+ 2. Each physical node gets multiple virtual nodes (tokens) on the ring.
141
+ 3. Data routes to first node clockwise from its hash position.
142
+ 4. Adding/removing node only affects adjacent range.
143
+
144
+ ### Virtual Nodes
145
+ - Each physical node owns 100-256 virtual nodes.
146
+ - More virtual nodes = more even distribution.
147
+ - Adding a physical node: assign new virtual nodes, migrate only affected ranges.
148
+ - Removing: redistribute its virtual nodes' ranges to neighbors.
149
+
150
+ ### Benefits Over Simple Modulo
151
+ | Aspect | Modulo (hash % N) | Consistent Hashing |
152
+ |--------|-------------------|-------------------|
153
+ | Add node | ~100% data moves | ~1/N data moves |
154
+ | Remove node | ~100% data moves | ~1/N data moves |
155
+ | Distribution | Depends on hash | Even with virtual nodes |
156
+ | Complexity | Simple | Moderate |
157
+
158
+ ## Geographic Sharding
159
+
160
+ ### Use Cases
161
+ - Data sovereignty (EU data stays in EU).
162
+ - Latency optimization (users read from nearest region).
163
+ - Regulatory compliance (GDPR, data residency laws).
164
+
165
+ ### Patterns
166
+ | Pattern | Reads | Writes | Consistency |
167
+ |---------|-------|--------|-------------|
168
+ | Write-local, read-local | Fast | Fast | Eventual (per-region) |
169
+ | Write-primary, read-any | Fast | Slower (cross-region) | Strong for writes |
170
+ | Multi-writer | Fast | Fast | Conflict resolution needed |
171
+
172
+ ### Conflict Resolution (Multi-Writer)
173
+ - Last-write-wins (simple, data loss possible).
174
+ - CRDTs (conflict-free, limited data types).
175
+ - Application-level merge (complex, most flexible).
176
+ - Operational transforms (collaborative editing).
177
+
178
+ ## Shard Routing
179
+
180
+ ### Routing Approaches
181
+ 1. **Application-level**: App knows shard map, routes directly.
182
+ 2. **Proxy layer**: Middleware (Vitess, ProxySQL) routes transparently.
183
+ 3. **Client library**: SDK handles routing, app unaware.
184
+
185
+ ### Shard Map
186
+ ```json
187
+ {
188
+ "shards": [
189
+ {"id": 0, "range": "0000-3FFF", "host": "db-shard-0.internal"},
190
+ {"id": 1, "range": "4000-7FFF", "host": "db-shard-1.internal"},
191
+ {"id": 2, "range": "8000-BFFF", "host": "db-shard-2.internal"},
192
+ {"id": 3, "range": "C000-FFFF", "host": "db-shard-3.internal"}
193
+ ]
194
+ }
195
+ ```
196
+
197
+ ## Self-check
198
+ - [ ] Shard key meets all three criteria (cardinality, distribution, query alignment).
199
+ - [ ] No hotspots detected (per-shard metrics balanced).
200
+ - [ ] Cross-shard query strategy defined (denormalize, pre-compute, or scatter-gather).
201
+ - [ ] Resharding procedure documented and tested in staging.
202
+ - [ ] Consistent hashing with virtual nodes for even distribution.
203
+ - [ ] Application transparent to sharding (routing layer handles it).
204
+ - [ ] Per-shard monitoring (latency, storage, connections).
205
+ - [ ] Rollback plan exists at every migration phase.
206
+ - [ ] Geographic compliance verified if required.
@@ -0,0 +1,120 @@
1
+ ---
2
+ name: de-sloppify
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.4
5
+ status: stable
6
+ triggers: de-slop, cleanup pass, remove debug code, remove test slop, commented code, inconsistent naming, TODO hack, post-implementation cleanup, code hygiene, slop removal, dead code removal, polish pass
7
+ ---
8
+
9
+ # Skill — De-Sloppify
10
+
11
+ ## When this skill activates
12
+
13
+ After implementation is complete and working. This skill runs as a dedicated
14
+ cleanup pass, separate from the implementation phase. Never during initial
15
+ development — the implementer's job is to BUILD. De-sloppify runs AFTER to
16
+ clean up the inevitable residue of rapid development.
17
+
18
+ **Core principle**: No negative instructions to the implementer. Do not tell
19
+ them "don't leave console.logs" or "don't forget to clean up." Let them build
20
+ freely. This skill handles the cleanup as a distinct, focused phase.
21
+
22
+ ## Mandatory actions when this skill is active
23
+
24
+ ### Scan for all 5 slop categories
25
+
26
+ #### Category 1 — Debug Code
27
+
28
+ Detect and remove:
29
+
30
+ - `console.log`, `console.debug`, `console.warn` (unless behind a debug flag)
31
+ - `debugger` statements
32
+ - `print()` statements not wrapped in a logging framework
33
+ - `dump()`, `dd()`, `var_dump()` calls
34
+ - Temporary `alert()` calls
35
+
36
+ **Exception**: Logging that uses a structured logger (winston, pino, logging module)
37
+ with appropriate log levels is NOT slop.
38
+
39
+ #### Category 2 — Test Slop
40
+
41
+ Detect and fix:
42
+
43
+ - Skipped tests (`it.skip`, `xit`, `@pytest.mark.skip` without documented reason)
44
+ - Commented-out test cases
45
+ - Test-only backdoors in production code (e.g., `if (process.env.TEST) skip_auth()`)
46
+ - Hardcoded test data left in source files (not in fixtures/factories)
47
+ - `fit`, `fdescribe` (focused tests that exclude other tests)
48
+
49
+ #### Category 3 — Commented Code Blocks
50
+
51
+ Detect and remove:
52
+
53
+ - Any block of 3+ consecutive commented lines that contain valid code
54
+ - "Just in case" commented alternatives
55
+ - Commented-out function bodies or class methods
56
+ - Old implementations left as "reference"
57
+
58
+ **Exception**: Comments that explain WHY (not what) are not slop, even if long.
59
+ License headers are not slop.
60
+
61
+ #### Category 4 — Inconsistent Naming
62
+
63
+ Detect and fix:
64
+
65
+ - camelCase/snake_case mixing within the same file
66
+ - Inconsistent abbreviations (e.g., `btn` in one place, `button` in another)
67
+ - Single-letter variables outside of tight loops or lambdas
68
+ - Hungarian notation mixed with modern naming in the same module
69
+
70
+ **Rule**: Match the dominant convention of the file. If the file is 80% camelCase,
71
+ convert the remaining 20%.
72
+
73
+ #### Category 5 — TODO Hacks
74
+
75
+ Detect and evaluate:
76
+
77
+ - TODOs that are actually shipped workarounds (not future work)
78
+ - `// HACK:` comments with no linked ticket
79
+ - `// FIXME:` that has been present for > 30 days (check git blame)
80
+ - Temporary code with no expiration or tracking
81
+
82
+ **Action**: Either fix the hack, or convert to a tracked issue with a link.
83
+ Untracked TODOs in shipped code are technical debt that compounds silently.
84
+
85
+ ### Commit discipline
86
+
87
+ - Each category fix is a SEPARATE atomic commit
88
+ - Commit message format: `chore(cleanup): remove [category] slop from [scope]`
89
+ - Never combine cleanup across categories in a single commit
90
+ - This enables easy revert if any cleanup accidentally changes behavior
91
+
92
+ ### Verification
93
+
94
+ After ALL cleanup is complete:
95
+
96
+ - Run the full test suite
97
+ - Verify no behavior change (tests pass identically)
98
+ - If any test fails after cleanup, the cleanup introduced a regression — revert that commit
99
+ - Compare test output before/after: same pass count, same coverage
100
+
101
+ ### Output
102
+
103
+ Write `CLEANUP-REPORT.md` to `.planning/` containing:
104
+
105
+ - Summary: total issues found and fixed per category
106
+ - Before/after counts for each category
107
+ - Files touched per category
108
+ - Any items intentionally left (with justification)
109
+ - Test results: pass/fail count before and after cleanup
110
+
111
+ ## Self-check before task completion
112
+
113
+ Before marking a task done when this skill was active:
114
+
115
+ - [ ] Did I scan for ALL 5 categories (debug, test slop, commented code, naming, TODOs)?
116
+ - [ ] Did I commit each category fix as a separate atomic commit?
117
+ - [ ] Did I verify tests still pass after every cleanup commit?
118
+ - [ ] Did I confirm no behavior change was introduced?
119
+ - [ ] Did I write CLEANUP-REPORT.md with before/after counts?
120
+ - [ ] Did I leave justified exceptions documented (not silently skipped)?
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: defense-in-depth
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.4
5
+ status: stable
6
+ triggers: defense in depth, layered validation, entry point guard, business logic guard, environment guard, debug instrumentation, validation layer, multi-layer security, input boundary, trust boundary guard, defensive coding, guard clause pattern
7
+ compose:
8
+ - security-review
9
+ ---
10
+
11
+ # Skill — Defense in Depth
12
+
13
+ ## When this skill activates
14
+
15
+ Any task that introduces or modifies code handling external input, enforcing
16
+ business rules, managing environment-specific behavior, or adding observability.
17
+ Activate whenever you are building anything that crosses a trust boundary or
18
+ touches validation logic at any layer of the stack.
19
+
20
+ ## Mandatory actions when this skill is active
21
+
22
+ Four independent validation layers must be applied. Each layer is autonomous:
23
+ failure or absence in one layer does NOT exempt the others.
24
+
25
+ ### Layer 1 — Entry Point Validation
26
+
27
+ Apply at the API boundary (route handler, CLI argument parser, event handler):
28
+
29
+ - Schema validation using a strict schema library (Zod, Joi, Pydantic, etc.)
30
+ - Type coercion with explicit rules (string-to-number only where defined)
31
+ - Reject invalid input immediately with a 400-level response
32
+ - Never pass unvalidated input deeper into the system
33
+ - Strip unknown fields; never allow arbitrary pass-through
34
+
35
+ ### Layer 2 — Business Logic Guards
36
+
37
+ Apply inside domain/service layer functions:
38
+
39
+ - Assert domain invariants (e.g., balance >= 0, state transitions are valid)
40
+ - State machine guards: verify current state allows the requested transition
41
+ - Authorization assertions: re-check permissions at the service boundary
42
+ - Fail loudly with descriptive errors when invariants are violated
43
+ - Never rely solely on entry point validation; business logic must self-protect
44
+
45
+ ### Layer 3 — Environment Guards
46
+
47
+ Apply environment-specific behavior through configuration, not conditionals:
48
+
49
+ - **Production**: strict mode, no debug endpoints exposed, minimal error detail
50
+ in responses, all logging structured and shipped to aggregator
51
+ - **Staging**: production-like but with extended logging and feature flags
52
+ - **Test**: relaxed logging, verbose error output, mock services allowed
53
+ - Guard debug endpoints behind environment checks (never reachable in prod)
54
+ - Validate required environment variables at startup; crash early if missing
55
+
56
+ ### Layer 4 — Debug Instrumentation
57
+
58
+ Apply observability that aids debugging without compromising security:
59
+
60
+ - Structured logging with consistent fields (timestamp, traceId, userId, action)
61
+ - Trace IDs propagated through all layers (generate at entry point, pass down)
62
+ - Development assertions (enabled in test/dev, compiled out or disabled in prod)
63
+ - Never log secrets, tokens, passwords, or full request bodies in production
64
+ - Include enough context to reproduce issues from logs alone
65
+
66
+ ## Independence principle
67
+
68
+ Each layer must function correctly even if the others are absent. This means:
69
+
70
+ - Business logic must not assume entry point already validated
71
+ - Environment guards must not assume instrumentation is active
72
+ - Instrumentation must not assume any specific validation has occurred
73
+ - Entry point validation must not assume business logic will catch overflows
74
+
75
+ ## Self-check before task completion
76
+
77
+ Before marking a task done when this skill was active:
78
+
79
+ - [ ] Did I validate at the entry point (schema, types, rejection of invalid)?
80
+ - [ ] Did I add business logic guards (invariants, state checks, auth assertions)?
81
+ - [ ] Did I implement environment guards (prod strict, test relaxed, no debug in prod)?
82
+ - [ ] Did I include debug instrumentation (structured logs, trace IDs, assertions)?
83
+ - [ ] Are all four layers independent (no layer relies on another for correctness)?
84
+ - [ ] Did I verify that secrets are never exposed in any logging layer?
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: delegation-patterns
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.3.0
5
+ status: stable
6
+ triggers: delegation engineering, task decomposition team, ownership assignment, accountability framework, work distribution, delegation decision matrix, scope assignment, technical project delegation, parallel workstream assignment, responsibility matrix, RACI technical, decision authority
7
+ ---
8
+
9
+ # Delegation Patterns
10
+
11
+ ## When this skill activates
12
+
13
+ This skill activates when decomposing tasks for teams, assigning ownership, distributing work across engineers, defining accountability frameworks, or delegating technical projects. It applies to tech leads, engineering managers, and senior engineers responsible for coordinating team execution.
14
+
15
+ ## Mandatory actions when this skill is active
16
+
17
+ ### Before delegating
18
+
19
+ 1. **Assess task complexity and risk** — Low-complexity, low-risk tasks can be delegated broadly. High-complexity or high-risk tasks require senior engineers or your direct involvement.
20
+ 2. **Match task to skill level** — Don't assign senior-level architectural work to juniors. Don't assign junior-level bug fixes to staff engineers (unless it's urgent). Mismatched delegation wastes talent and causes frustration.
21
+ 3. **Verify availability and capacity** — Don't assume engineers have bandwidth. Check current workload, upcoming PTO, and competing priorities before assigning work.
22
+ 4. **Define success criteria explicitly** — What does "done" look like? Ambiguous success criteria lead to misalignment. Be specific: "Tests pass, code reviewed, deployed to staging."
23
+
24
+ ### During delegation
25
+
26
+ #### Task Decomposition for Teams
27
+
28
+ - **Break large projects into independent workstreams** — Identify natural boundaries (frontend vs backend, service A vs service B, feature 1 vs feature 2). Minimize dependencies between workstreams to enable parallel execution.
29
+ - **Size tasks to 1-3 day chunks** — Tasks larger than 3 days are hard to estimate and easy to get stuck on. Smaller tasks improve velocity and visibility.
30
+ - **Create a dependency graph** — Visualize which tasks block others. Critical path tasks need the strongest engineers. Non-blocking tasks can be assigned to juniors or done in parallel.
31
+ - **Avoid over-fragmentation** — Breaking a 2-week project into 50 tiny tasks creates coordination overhead. Find the balance: small enough to track, large enough to be meaningful.
32
+
33
+ #### Ownership Assignment
34
+
35
+ - **Use the DRI (Directly Responsible Individual) model** — Every task has exactly one owner. Shared ownership is no ownership. If two people are responsible, neither is.
36
+ - **Clarify ownership boundaries** — DRI owns the outcome, not just the execution. They are accountable for delivery, quality, and communication. Support them, but don't take the ownership back.
37
+ - **Match ownership to growth goals** — If an engineer wants to grow into system design, give them a project that requires design work. Delegation is a growth lever.
38
+ - **Avoid always delegating to the same high performers** — Spreading work across the team builds depth and prevents burnout. High performers need growth opportunities, not just more work.
39
+
40
+ #### Delegation Decision Matrix
41
+
42
+ Use this framework to decide who gets what:
43
+
44
+ | Task Type | Delegate To | Reasoning |
45
+ |-----------|-------------|-----------|
46
+ | Low complexity, low risk | Junior engineer | Growth opportunity, low downside |
47
+ | High complexity, low risk | Mid-level engineer | Stretch assignment, safe to experiment |
48
+ | Low complexity, high risk | Senior engineer | Minimize risk, fast execution |
49
+ | High complexity, high risk | Staff/Principal or yourself | Critical tasks need top talent |
50
+ | Repetitive toil | Automate or rotate | Don't delegate to the same person forever |
51
+ | Cross-team coordination | Tech lead or manager | Requires influence and context |
52
+
53
+ #### Accountability Framework
54
+
55
+ - **Define RACI roles explicitly** — For every project or decision:
56
+ - **Responsible**: Who does the work?
57
+ - **Accountable**: Who owns the outcome? (Only one person)
58
+ - **Consulted**: Who provides input?
59
+ - **Informed**: Who needs to know?
60
+ - **Document RACI in project kickoffs** — Put it in the project doc, share it with the team. Ambiguous accountability causes dropped work and finger-pointing.
61
+ - **Check-ins, not micromanagement** — Set a cadence (daily standup, weekly sync) but trust the DRI to execute. If you're in the weeds every day, you didn't delegate properly.
62
+
63
+ #### Work Distribution Strategies
64
+
65
+ **1. Balanced Distribution (Default)**
66
+ - **Goal**: Spread work evenly across the team.
67
+ - **When to use**: Routine feature work, stable team, predictable roadmap.
68
+ - **Pitfall**: Can over-distribute and prevent deep focus. Balance with ownership zones (next pattern).
69
+
70
+ **2. Ownership Zones (Area-Based)**
71
+ - **Goal**: Each engineer owns 1-2 services or features end-to-end.
72
+ - **When to use**: Mature team, well-defined boundaries, need for deep expertise.
73
+ - **Benefit**: Engineers become experts in their zone, reducing ramp-up time and increasing autonomy.
74
+ - **Pitfall**: Creates silos. Mitigate with code reviews across zones and occasional rotation.
75
+
76
+ **3. Swarming (All-Hands-On-Deck)**
77
+ - **Goal**: Entire team focuses on one critical project.
78
+ - **When to use**: High-priority launch, critical bug, tight deadline.
79
+ - **Benefit**: Fast execution, high alignment.
80
+ - **Pitfall**: Interrupts other work. Use sparingly.
81
+
82
+ **4. Rotation (Shared Responsibility)**
83
+ - **Goal**: Engineers rotate through on-call, support, or maintenance tasks.
84
+ - **When to use**: Prevent burnout, build shared context, avoid "that one person" syndrome.
85
+ - **Benefit**: Spreads toil evenly, prevents knowledge silos.
86
+ - **Pitfall**: Context switching overhead. Set rotation cadence (weekly, bi-weekly) to minimize thrash.
87
+
88
+ #### Delegation Communication
89
+
90
+ - **Use structured task handoffs** — When delegating, provide:
91
+ - **Context**: Why are we doing this? What's the business value?
92
+ - **Scope**: What's in scope, what's out of scope?
93
+ - **Success criteria**: How will we know it's done?
94
+ - **Resources**: Who can help? What docs are relevant?
95
+ - **Deadline**: When is it due?
96
+ - **Check-in cadence**: How often should we sync?
97
+ - **Empower, don't prescribe** — Tell them what to achieve, not how to do it. Let them figure out the approach (unless they ask for guidance).
98
+ - **Clarify decision authority** — Can they decide on implementation details? Do they need approval for architectural choices? Make it explicit.
99
+
100
+ #### Monitoring Delegation Effectiveness
101
+
102
+ - **Track task completion rate** — If tasks are frequently late or incomplete, you're either over-delegating, under-resourcing, or assigning to the wrong people.
103
+ - **Measure rework rate** — If delegated work requires significant rework, either the success criteria were unclear or the engineer wasn't ready for the task.
104
+ - **Check engineer satisfaction** — Periodically ask: "Do you feel over/under-utilized? Are you getting enough growth opportunities?" Course-correct before burnout or attrition.
105
+
106
+ ### After delegating
107
+
108
+ - **Verify understanding** — After assigning work, ask the engineer to summarize: "What's the goal? What's the first step?" Misalignment is common. Catch it early.
109
+ - **Set check-in cadence** — For junior engineers: daily check-ins. For mid-level: every 2-3 days. For senior: weekly or as-needed. Adjust based on risk and autonomy.
110
+ - **Unblock actively** — If the engineer is stuck, intervene. Don't wait for them to ask. Watch for signs: long periods of silence, lack of progress updates, frustrated messages.
111
+ - **Give credit publicly** — When the work is done, recognize the engineer publicly (in team meetings, Slack, all-hands). Delegation without recognition demoralizes.
112
+ - **Conduct retrospectives** — After major projects, ask: "What went well? What would we do differently next time?" Improve your delegation process over time.
113
+
114
+ ## Self-check before task completion
115
+
116
+ - [ ] Task complexity and risk are assessed before assigning
117
+ - [ ] Task is matched to engineer's skill level and growth goals
118
+ - [ ] Success criteria are explicit and documented
119
+ - [ ] Ownership is assigned to exactly one DRI (Directly Responsible Individual)
120
+ - [ ] RACI roles are defined (Responsible, Accountable, Consulted, Informed)
121
+ - [ ] Task decomposition creates independent workstreams to enable parallel execution
122
+ - [ ] Delegation handoff includes context, scope, success criteria, resources, and deadline
123
+ - [ ] Check-in cadence is set and followed (daily for juniors, weekly for seniors)
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: dependency-management
3
+ version: 1.0.0
4
+ min_mindforge_version: 0.3.0
5
+ status: stable
6
+ triggers: dependency management, version resolution, lockfile strategy, dep hoisting, peer dependency, transitive audit, dependency graph, version conflict, dependency update, semver resolution, dependency pruning, phantom dependency
7
+ compose: supply-chain-security
8
+ ---
9
+
10
+ # Skill — Dependency Management
11
+
12
+ ## When this skill activates
13
+ Any task involving package management, version conflicts, lockfile strategies,
14
+ dependency auditing, update workflows, or supply chain concerns.
15
+
16
+ ## Mandatory actions when this skill is active
17
+
18
+ ### Before modifying dependencies
19
+ 1. Understand the current dependency graph and any existing conflicts.
20
+ 2. Check if the new dependency is actively maintained (last commit, open issues).
21
+ 3. Verify license compatibility with the project.
22
+
23
+ ### Lockfiles
24
+
25
+ - **Always commit lockfiles** (package-lock.json, yarn.lock, pnpm-lock.yaml).
26
+ - **CI must use --frozen-lockfile** (or equivalent) to prevent drift.
27
+ - **Review lockfile changes in PRs** — unexpected transitive additions are a signal.
28
+ - Never manually edit lockfiles — use the package manager to resolve.
29
+ - If lockfile conflicts in merge: delete lockfile, reinstall, commit fresh.
30
+
31
+ ### Version resolution by package manager
32
+
33
+ **npm (nearest-wins, hoisted):**
34
+ - Hoists shared deps to root node_modules.
35
+ - Different versions of same package can coexist in nested node_modules.
36
+ - Potential for phantom dependencies (using undeclared deps that happen to be hoisted).
37
+
38
+ **pnpm (strict, isolated):**
39
+ - Symlink-based, no hoisting by default.
40
+ - Catches phantom dependencies immediately.
41
+ - Content-addressable store saves disk space.
42
+ - Recommended for monorepos and strict environments.
43
+
44
+ **yarn (hoisted, PnP optional):**
45
+ - Classic: hoisted like npm.
46
+ - PnP (Plug'n'Play): no node_modules, direct resolution via .pnp.cjs.
47
+ - PnP is strict but has ecosystem compatibility challenges.
48
+
49
+ ### Peer dependencies
50
+
51
+ - **Declare compatibility range** in your library's peerDependencies.
52
+ - **Do not install** peer deps in the library — the consuming application does.
53
+ - Use `peerDependenciesMeta` to mark optional peers.
54
+ - Test against the minimum AND maximum of your declared peer range.
55
+
56
+ ### Phantom dependencies
57
+
58
+ - Dependencies you use in code but did not explicitly declare in package.json.
59
+ - They work by accident (hoisted from a transitive dep).
60
+ - **Detection:** use pnpm (strict mode) or run `depcheck`.
61
+ - **Fix:** add to dependencies explicitly or remove the usage.
62
+
63
+ ### Update strategy
64
+
65
+ **Automated (Dependabot/Renovate):**
66
+ - Configure for weekly minor/patch updates.
67
+ - Group related deps (e.g., all @testing-library/* together).
68
+ - Auto-merge if CI passes for patch updates.
69
+ - Require manual review for major bumps.
70
+
71
+ **Manual quarterly major bumps:**
72
+ - Schedule quarterly "dependency day" for major version upgrades.
73
+ - Read changelogs and migration guides before upgrading.
74
+ - Upgrade one major dep at a time, verify tests pass.
75
+
76
+ ### Pruning
77
+
78
+ - **Find unused deps:** run `depcheck` or `knip` regularly.
79
+ - **Remove aggressively** — fewer deps = smaller attack surface + faster installs.
80
+ - Check for lighter alternatives (e.g., date-fns instead of moment).
81
+ - Evaluate if a dep is worth it: if you only use one function, inline it.
82
+
83
+ ### Monorepo-specific
84
+
85
+ - Use workspace protocols (workspace:*) for internal packages.
86
+ - Hoist shared devDependencies to root.
87
+ - Keep runtime deps in each package's own package.json.
88
+ - Use changesets or lerna for coordinated versioning.
89
+
90
+ ## Self-check before task completion
91
+ - [ ] Did I follow the mandatory actions for this skill?
92
+ - [ ] Did I apply the patterns appropriate to the context?
93
+ - [ ] Did I verify the implementation meets the criteria above?
94
+ - [ ] Did I document decisions and trade-offs made?