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,114 @@
1
+ ---
2
+ name: context-engineering
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.7
5
+ status: stable
6
+ triggers: context engineering, context window management, context token budget, context priority ordering, compaction strategy, context freshness, context allocation, what to include in context, context optimization strategy, retrieval augmentation design, context pruning, context budget allocation
7
+ ---
8
+
9
+ # Context Engineering
10
+
11
+ ## When this skill activates
12
+
13
+ This skill activates when designing what information to feed into an LLM context window, how to prioritize it, and how to manage context across long-running sessions or multi-turn conversations. It applies to system prompt design, RAG pipeline tuning, agent memory management, and any scenario where token budget allocation determines output quality.
14
+
15
+ ## Mandatory actions when this skill is active
16
+
17
+ ### Before
18
+
19
+ 1. **Measure the budget** — Determine the total context window size for the target model. Subtract the expected output length. The remainder is your input budget.
20
+ 2. **Identify the task** — Classify the task type (code generation, analysis, Q&A, creative). Different tasks require different context compositions.
21
+ 3. **Inventory available context** — List all potential context sources: files, conversation history, retrieved documents, instructions, examples, metadata.
22
+ 4. **Assess current context health** — If modifying an existing system, measure current context utilization. Identify waste (irrelevant content consuming tokens).
23
+
24
+ ### During
25
+
26
+ #### What to Include vs Exclude
27
+
28
+ **Include (high signal):**
29
+ - Task-relevant source code (the files being modified or referenced)
30
+ - Explicit constraints and requirements
31
+ - Relevant examples demonstrating desired behavior
32
+ - Error messages and stack traces when debugging
33
+ - Schema definitions and type signatures
34
+ - User preferences and project conventions
35
+
36
+ **Exclude (low signal, high cost):**
37
+ - Irrelevant conversation history from earlier turns
38
+ - Verbose log output (summarize instead)
39
+ - Unrelated files that happen to be nearby
40
+ - Redundant information already stated elsewhere
41
+ - Boilerplate code that follows obvious patterns
42
+ - Full file contents when only a function is relevant
43
+
44
+ #### Priority Ordering (Attention Distribution)
45
+
46
+ - **Position 1 (highest attention): Instructions and constraints** — System prompts, role definitions, mandatory rules. Models attend most strongly to the beginning and end of context.
47
+ - **Position 2: Task-specific content** — The code, document, or data being directly worked on.
48
+ - **Position 3: Examples and references** — Few-shot examples, related patterns, documentation excerpts.
49
+ - **Position 4: Background context** — Project structure, historical decisions, tangential information.
50
+ - **Recency bias** — Models attend more to recent content. Place the most critical dynamic content last (just before the query).
51
+ - **Primacy effect** — System instructions at the very start receive elevated attention. Never bury critical rules in the middle.
52
+
53
+ #### Token Budget Allocation Framework
54
+
55
+ | Category | Allocation | Purpose |
56
+ |----------|-----------|---------|
57
+ | Task-relevant content | 60% | Code, data, documents being worked on |
58
+ | Constraints and instructions | 20% | Rules, format requirements, boundaries |
59
+ | Examples | 10% | Few-shot demonstrations, reference patterns |
60
+ | Meta and buffer | 10% | Conversation scaffolding, safety margin |
61
+
62
+ - **Adapt per task** — Code generation: increase task-relevant to 70%, reduce examples to 5%. Creative tasks: increase examples to 20%.
63
+ - **Never fill 100%** — Leave 10-15% buffer for the model's response and unexpected context needs.
64
+ - **Track token counts** — Use tokenizer libraries (tiktoken, Anthropic tokenizer) to measure precisely. Estimates drift.
65
+
66
+ #### Compaction Strategy
67
+
68
+ - **Summarize old context** — Replace verbose conversation history with structured summaries. Keep decisions and outcomes; discard deliberation.
69
+ - **Keep recent verbatim** — The last 2-3 turns should remain uncompacted. Recent context drives current behavior.
70
+ - **Progressive summarization** — As context ages: verbatim (0-2 turns) → detailed summary (3-10 turns) → bullet points (10+ turns) → drop entirely.
71
+ - **Checkpoint key decisions** — Extract and preserve: architectural decisions, user preferences, constraints discovered mid-conversation. These never compact.
72
+ - **Lossy is acceptable** — Perfect recall is not the goal. Relevant recall is. Aggressively prune low-value history.
73
+
74
+ #### Context Freshness
75
+
76
+ - **Re-read files before acting** — Never rely on file content from earlier in the conversation if the file may have changed. Always re-read.
77
+ - **Invalidate on mutation** — After any write operation, treat previously-read versions of affected files as stale.
78
+ - **Timestamp awareness** — When including retrieved documents, note their freshness. Flag content older than the relevance threshold.
79
+ - **Session drift** — Long sessions accumulate stale assumptions. Periodically re-ground by re-reading source-of-truth files.
80
+
81
+ #### RAG Integration (Retrieval Augmented Generation)
82
+
83
+ - **Chunk size** — 500-1000 tokens per chunk for code; 200-500 for prose. Smaller chunks = more precise retrieval but less surrounding context.
84
+ - **Retrieve selectively** — Max 3-5 chunks (3-5K tokens total). More retrieved content dilutes attention on each piece.
85
+ - **Relevance threshold** — Set a similarity score cutoff. Irrelevant retrieved content is worse than no retrieval.
86
+ - **Cite sources** — Always attribute retrieved content to its source. This helps the model (and user) assess reliability.
87
+ - **Hybrid search** — Combine semantic (embedding) search with keyword (BM25) search. Neither alone is sufficient.
88
+ - **Re-ranking** — Apply a cross-encoder re-ranker after initial retrieval to improve precision before injection.
89
+
90
+ #### Context Pruning Techniques
91
+
92
+ - **Sliding window** — Drop oldest turns when approaching limits. Simple but lossy.
93
+ - **Relevance scoring** — Score each context block against the current query. Drop lowest-scoring blocks first.
94
+ - **Deduplication** — Detect and merge repeated information. Common in multi-turn conversations.
95
+ - **Structural pruning** — Remove comments, whitespace, and formatting from code context. Preserve semantics, reduce tokens.
96
+ - **Selective inclusion** — For large files, include only the relevant functions/classes, not the entire file.
97
+
98
+ ### After
99
+
100
+ 1. **Measure utilization** — Calculate what percentage of context was actually relevant to the output. Target >70% relevance.
101
+ 2. **Evaluate output quality** — Compare outputs with full context vs pruned context. If quality is maintained, the pruning strategy is sound.
102
+ 3. **Document the strategy** — Record the context composition pattern for this use case so it can be replicated and improved.
103
+ 4. **Monitor drift** — Track context composition over time. If quality degrades, context may have drifted from optimal allocation.
104
+
105
+ ## Self-check before task completion
106
+
107
+ - [ ] Token budget is explicitly allocated across categories
108
+ - [ ] Instructions and constraints occupy the highest-attention positions (start and end)
109
+ - [ ] No irrelevant content consuming tokens (verbose logs, unrelated files, redundant info)
110
+ - [ ] Compaction strategy handles long conversations without losing key decisions
111
+ - [ ] File content is fresh (re-read if potentially stale)
112
+ - [ ] RAG retrieval is limited to 3-5 relevant chunks with similarity threshold
113
+ - [ ] At least 10% token buffer remains for response generation
114
+ - [ ] Context composition is documented and reproducible
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: continuous-learning
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.3
5
+ status: stable
6
+ triggers: instinct, learned behavior, pattern detection, evolve, auto-learn, skill promotion, confidence, observation, habit, adaptation
7
+ ---
8
+
9
+ # Skill — Continuous Learning
10
+
11
+ ## When this skill activates
12
+ When discussing learned behaviors, instinct management, pattern capture,
13
+ or skill evolution. Also activates during session-end reviews where patterns
14
+ may be captured.
15
+
16
+ ## Mandatory actions when this skill is active
17
+
18
+ ### Understanding the Instinct System
19
+ MindForge automatically observes sessions and captures behavioral patterns as
20
+ "instincts" — lightweight learned behaviors that may evolve into full skills.
21
+
22
+ **Instinct lifecycle:**
23
+ ```
24
+ Observation -> Instinct (confidence: 0.5)
25
+ | applied successfully
26
+ Confidence grows (0.5 -> 0.6 -> 0.7 -> ...)
27
+ | confidence >= 0.85 AND applied 5+ times
28
+ Promotion candidate
29
+ | user approves
30
+ Full SKILL.md created and registered
31
+ ```
32
+
33
+ ### Auto-Capture (Always Active)
34
+ The instinct engine runs in auto-capture mode, watching for:
35
+
36
+ 1. **User corrections** -> instinct created at confidence 0.6
37
+ - "No, always use X instead of Y" -> captures the preference
38
+ 2. **Repeated patterns (3+)** -> instinct created at confidence 0.4
39
+ - Same action pattern 3 times in a session -> probably intentional
40
+ 3. **Successful outcomes** -> instinct created at confidence 0.5
41
+ - Non-obvious action followed by verification pass -> worth remembering
42
+
43
+ ### Managing Instincts
44
+
45
+ **View active instincts:**
46
+ - Check `.mindforge/engine/instincts/instinct-store.jsonl`
47
+ - Use `/mindforge:status` which includes instinct summary
48
+
49
+ **Manually capture:**
50
+ - Use `/mindforge:learn-instinct "observation" --behavior "what to do"`
51
+ - Manual instincts start at confidence 0.7 (user-stated = higher trust)
52
+
53
+ **Promote to skills:**
54
+ - Use `/mindforge:evolve-skills` to review mature instincts
55
+ - Candidates: confidence >= 0.85 AND times_applied >= 5
56
+ - Promotion creates a full SKILL.md and registers in MANIFEST.md
57
+
58
+ **Deprecate/Prune:**
59
+ - Instincts below 0.2 confidence after 10+ applications are auto-pruned
60
+ - Instincts inactive for 30 days are auto-pruned
61
+ - User can manually deprecate any instinct
62
+
63
+ ### During any task (passive observation)
64
+ - Note patterns that repeat across tasks
65
+ - When user corrects behavior: acknowledge and create instinct
66
+ - At session end: report any new instincts captured
67
+ - Never let instinct count exceed 100 per project (prune lowest confidence)
68
+
69
+ ### After session
70
+ Report instinct activity:
71
+ ```
72
+ Instincts this session:
73
+ [NEW] "Pattern observed" (confidence: 0.5)
74
+ [REINFORCED] "Existing pattern" (0.6 -> 0.7)
75
+ [READY] "Mature pattern" -- eligible for promotion
76
+
77
+ Active: 47/100 | Promotion candidates: 3
78
+ ```
79
+
80
+ ## Self-check before task completion
81
+ - [ ] Did I report any new instincts captured this session?
82
+ - [ ] Did I verify instinct count remains under 100 for this project?
83
+ - [ ] Did I check for promotion candidates meeting the threshold?
84
+ - [ ] Did I confirm captured instincts are project-scoped (not leaking to other projects)?
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: contract-testing
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.8
5
+ status: stable
6
+ triggers: contract testing, consumer driven contract, pact testing, provider verification, contract broker, schema compatibility, contract first, api contract test, consumer contract, provider contract, contract breaking, bilateral contract
7
+ compose: testing-standards
8
+ ---
9
+
10
+ # Contract Testing
11
+
12
+ ## When this skill activates
13
+
14
+ This skill activates when working with API contract verification between services, consumer-driven contract workflows, schema compatibility checks, or any task involving service boundary agreements. It applies to both synchronous (HTTP/gRPC) and asynchronous (message queue) contracts.
15
+
16
+ ## Mandatory actions when this skill is active
17
+
18
+ ### Before
19
+
20
+ 1. Identify all parties in the contract relationship (consumers and providers).
21
+ 2. Determine the contract format in use (Pact, OpenAPI, AsyncAPI, Protobuf).
22
+ 3. Check if a contract broker is already configured (Pactflow, Pact Broker, custom).
23
+ 4. Review existing contracts for the affected endpoints or messages.
24
+ 5. Confirm the environment supports contract verification (CI pipeline, broker access).
25
+
26
+ ### During
27
+
28
+ **Consumer-Driven Contract Workflow:**
29
+ - Consumers define the interactions they require (request/response pairs).
30
+ - Consumer tests generate contract files (pact files, schemas).
31
+ - Contracts are published to a broker with version metadata.
32
+ - Providers pull contracts and verify they satisfy all consumer expectations.
33
+ - Verification results are published back to the broker.
34
+
35
+ **Schema Compatibility Levels:**
36
+ - **Backward compatible**: New schema can read data written by old schema.
37
+ - **Forward compatible**: Old schema can read data written by new schema.
38
+ - **Full compatible**: Both backward and forward (safest for production).
39
+ - Always validate compatibility BEFORE deploying schema changes.
40
+
41
+ **Breaking Change Detection:**
42
+ - Removing a field consumers depend on = BREAKING.
43
+ - Changing a field type or format = BREAKING.
44
+ - Adding a required field to a request = BREAKING for providers.
45
+ - Adding an optional field = SAFE (backward compatible).
46
+ - Run `can-i-deploy` checks in CI to gate deployments.
47
+
48
+ **Contract Broker Practices:**
49
+ - Tag contracts with environment names (dev, staging, prod).
50
+ - Use semantic versioning for contract participants.
51
+ - Enable webhook notifications on verification failures.
52
+ - Maintain contract history for rollback capability.
53
+
54
+ **Pact-Specific Workflow:**
55
+ 1. Write consumer test using Pact DSL (define interaction).
56
+ 2. Run consumer test to generate `.pact` JSON file.
57
+ 3. Publish pact to broker with consumer version.
58
+ 4. Provider runs verification against all registered consumer pacts.
59
+ 5. Provider publishes verification result to broker.
60
+ 6. CI runs `can-i-deploy` before any deployment proceeds.
61
+
62
+ **CI Integration:**
63
+ - Consumer pipeline: test → generate pact → publish → trigger provider verification.
64
+ - Provider pipeline: pull pacts → verify → publish result → deploy if green.
65
+ - Use pending pacts for new consumers (failures don't block provider).
66
+ - Use WIP pacts for contracts not yet verified on provider's main branch.
67
+
68
+ ### After
69
+
70
+ 1. All contracts are published to the broker with correct version tags.
71
+ 2. Verification results are recorded for both consumer and provider.
72
+ 3. `can-i-deploy` passes for the target environment.
73
+ 4. Breaking changes are flagged and communicated to affected teams.
74
+ 5. Contract coverage includes all critical interactions (not just happy paths).
75
+
76
+ ## Self-check before task completion
77
+
78
+ - [ ] Consumer tests define the minimal required interaction (no over-specification).
79
+ - [ ] Provider verification runs against ALL registered consumer contracts.
80
+ - [ ] Schema changes are validated for the correct compatibility level.
81
+ - [ ] Breaking changes have been identified and a migration plan exists.
82
+ - [ ] Contract broker has up-to-date versions for all participants.
83
+ - [ ] CI pipeline gates deployment on `can-i-deploy` result.
84
+ - [ ] Error scenarios and edge cases are covered in contracts (not just 200 responses).
85
+ - [ ] Contract tests run in isolation (no network calls, no shared state).
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: cost-aware-routing
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.3
5
+ status: stable
6
+ triggers: token budget, model routing, cost optimization, model selection, Haiku, Flash, cheap model, expensive model, cost per token, budget, spend, token usage
7
+ ---
8
+
9
+ # Skill — Cost-Aware Routing
10
+
11
+ ## When this skill activates
12
+ When making model selection decisions, monitoring token spend, optimizing
13
+ for cost-performance tradeoffs, or when budget limits are approaching.
14
+
15
+ ## Mandatory actions when this skill is active
16
+
17
+ ### Model Tier Reference
18
+
19
+ | Tier | Model | Input/Output per 1M | Best For |
20
+ |------|-------|--------------------:|----------|
21
+ | simple | claude-haiku-4-5 | $0.25 / $1.25 | File reads, simple edits, formatting |
22
+ | standard | claude-sonnet-4-6 | $3 / $15 | Multi-file work, code review, daily tasks |
23
+ | complex | claude-opus-4-7 | $15 / $75 | Architecture, security, hard debugging |
24
+ | research | gemini-2.5-pro | $1.25 / $10 | Web research, long context, synthesis |
25
+ | consult | gpt-4o | $2.50 / $10 | Second opinions, alternative perspectives |
26
+
27
+ ### Routing Rules
28
+
29
+ **Match task complexity to model tier:**
30
+ - Difficulty 1-3 (single file, obvious change): **simple**
31
+ - Difficulty 3-6 (multi-file, some judgment): **standard**
32
+ - Difficulty 6-8 (cross-system, complex logic): **complex**
33
+ - Difficulty 8-10 (architectural, novel problems): **complex**
34
+
35
+ **Override rules (always apply):**
36
+ - Security tasks: minimum **standard** (never use simple for auth/payment)
37
+ - Architecture decisions: minimum **complex**
38
+ - File exploration/reading: always **simple**
39
+ - Research requiring web access: **research**
40
+
41
+ ### Cost Optimization Patterns
42
+
43
+ 1. **Start cheap, escalate if needed:**
44
+ - Try simple tier first for uncertain-complexity tasks
45
+ - If result quality is insufficient: escalate to next tier
46
+ - Log escalation with reason
47
+
48
+ 2. **Batch similar tasks:**
49
+ - 5 simple edits in one call < 5 separate calls
50
+ - Group related file reads into single exploration
51
+
52
+ 3. **Cache aggressively:**
53
+ - Prompt caching reduces input costs ~90%
54
+ - Structure prompts with static context first (cacheable)
55
+ - Dynamic content last (not cached, but small)
56
+
57
+ 4. **Avoid token waste:**
58
+ - Don't re-read files already in context
59
+ - Don't repeat instructions the model already has
60
+ - Use compaction when context grows large
61
+
62
+ ### Budget Monitoring
63
+
64
+ Check budget status regularly:
65
+ - Session budget remaining: from token-ledger.jsonl
66
+ - Warning threshold: `[COST_WARN_USD]` from config
67
+ - Hard limit: `[COST_HARD_LIMIT_USD]` from config
68
+
69
+ **When budget is tight:**
70
+ - Downgrade all tasks one tier (complex→standard, standard→simple)
71
+ - Warn user: "Budget at X% — operating in economy mode"
72
+ - Never exceed hard limit without explicit user approval
73
+
74
+ ### After any task
75
+ - Log actual model used + tokens consumed to token-ledger.jsonl
76
+ - Compare actual vs optimal tier (for future routing accuracy)
77
+ - Report cost in session summary
78
+
79
+ ## Self-check before task completion
80
+ - [ ] Did I log the model routing decision with rationale?
81
+ - [ ] Did I record actual token usage in token-ledger.jsonl?
82
+ - [ ] Did I check remaining budget against session/project limits?
83
+ - [ ] Did I flag any tasks where a cheaper model could have been used?
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: cost-estimation
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.9
5
+ status: stable
6
+ triggers: cost estimation, cloud cost modeling, finops, reserved instance, spot instance, cost forecast, infrastructure cost, cost per request, pricing model, cost optimization plan, resource right-sizing, cost allocation
7
+ ---
8
+
9
+ # Skill — Cost Estimation
10
+
11
+ ## When this skill activates
12
+ Any task involving cloud cost modeling, FinOps, instance strategy selection,
13
+ cost forecasting, per-request cost analysis, right-sizing, or cost allocation.
14
+
15
+ ## Mandatory actions when this skill is active
16
+
17
+ ### Before writing any code
18
+ 1. Estimate costs BEFORE building: compute + storage + network + managed services.
19
+ 2. Identify cost-dominant components (usually storage or network egress).
20
+ 3. Define budget constraints and alerting thresholds.
21
+
22
+ ### During implementation
23
+ - Choose instances based on workload profile (compute/memory/IO bound).
24
+ - Implement resource tagging for cost allocation from day one.
25
+ - Use auto-scaling with min/max bounds.
26
+ - Prefer managed services when ops cost exceeds infrastructure savings.
27
+
28
+ ### After implementation
29
+ - Set cost alerts at 50%, 80%, 100% of budget.
30
+ - Create per-service cost dashboard.
31
+ - Schedule monthly cost review for drift and optimization.
32
+
33
+ ## FinOps Phases
34
+
35
+ - **Inform**: tag all resources, build dashboards, implement showback/chargeback.
36
+ - **Optimize**: right-size, reserve steady workloads, spot for batch, eliminate waste.
37
+ - **Operate**: automate (scheduled scaling, auto-stop dev), embed cost in PR review.
38
+
39
+ ## Cost Modeling
40
+
41
+ ```
42
+ Monthly = Compute + Storage + Network + Managed + Support
43
+ Compute: instances * hours * $/hour
44
+ Storage: GB * $/GB + IOPS * $/IOP
45
+ Network: GB egress * $/GB (ingress usually free)
46
+ Cost/Request: total_monthly / total_requests
47
+ ```
48
+
49
+ ## Instance Strategy
50
+
51
+ | Type | Discount | Use For | Never For |
52
+ |------|----------|---------|-----------|
53
+ | On-Demand | 0% | Variable, dev, testing | Steady production (wasteful) |
54
+ | Reserved (1-3yr) | 30-72% | Steady production (>70% util for 6+ months) | Uncertain workloads |
55
+ | Spot/Preemptible | 60-90% | Batch, CI/CD, fault-tolerant workers | Databases, user-facing |
56
+
57
+ ## Right-Sizing Indicators
58
+ - CPU < 40% consistently = oversized.
59
+ - Memory < 50% consistently = oversized.
60
+ - Process: collect 2-4 weeks metrics → find binding constraint → resize to peak + 20%.
61
+
62
+ ## Cost Allocation Tags (Minimum)
63
+ - `team`, `service`, `environment`, `cost-center`.
64
+ - Optional: `feature` for per-feature attribution.
65
+ - Shared infra: divide proportionally by request count or CPU time.
66
+
67
+ ## Forecasting
68
+ ```
69
+ Next Month = Current * (1 + organic_growth) + planned_launch_impact
70
+ ```
71
+ - Inputs: historical trend (3-6 months), planned launches, seasonal patterns.
72
+ - Weekly: check for anomalies. Monthly: forecast vs actual. Quarterly: re-evaluate commitments.
73
+
74
+ ## Self-check before task completion
75
+
76
+ - [ ] Did I estimate costs before proposing infrastructure?
77
+ - [ ] Are resources tagged for cost allocation?
78
+ - [ ] Is instance strategy appropriate (on-demand vs reserved vs spot)?
79
+ - [ ] Are cost alerts configured at budget thresholds?
80
+ - [ ] Is right-sizing based on actual utilization data?
81
+ - [ ] Is there a cost visibility mechanism (dashboard)?
82
+ - [ ] Are managed-vs-self-hosted trade-offs documented?
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: council
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.3
5
+ status: stable
6
+ triggers: council, multi-voice, decision debate, architectural decision, trade-off, ambiguous, contentious, ADR, design decision, breaking change
7
+ ---
8
+
9
+ # Skill — Council (Multi-Voice Decision)
10
+
11
+ ## When this skill activates
12
+ Any ambiguous architectural decision where multiple valid approaches exist,
13
+ when resolving contentious technical choices, or when the Adversarial Decision
14
+ Loop (ADS) produces a split verdict.
15
+
16
+ ## Mandatory actions when this skill is active
17
+
18
+ ### Before invoking council
19
+ 1. Verify the decision actually warrants multi-voice debate:
20
+ - Are there 2+ genuinely viable options? (If one is obviously best, skip council)
21
+ - Is the decision hard to reverse? (If easily reversible, just pick one and iterate)
22
+ - Does the decision affect multiple stakeholders or systems?
23
+ 2. Frame the decision clearly with: context, options, constraints, and stakes.
24
+
25
+ ### The Four Voices
26
+
27
+ | Voice | Asks | Bias (intentional) |
28
+ |-------|------|-------------------|
29
+ | **Architect** | "What scales? What's maintainable in 2 years?" | Elegant, extensible systems |
30
+ | **Skeptic** | "What breaks? What haven't we considered?" | Caution, hidden failure modes |
31
+ | **Pragmatist** | "What ships? What delivers value soonest?" | Delivery speed, incrementalism |
32
+ | **Critic** | "What's excellent? What meets our standards?" | Quality, craftsmanship |
33
+
34
+ ### Council Protocol
35
+ 1. **Frame** — Present decision with context, options, constraints
36
+ 2. **Positions** — Each voice states recommendation + top 3 reasons + confidence (0-1)
37
+ 3. **Challenge** — Each voice rebuts the strongest counterargument
38
+ 4. **Synthesize** — Produce verdict with consensus score
39
+ 5. **Output** — Write to `.planning/decisions/COUNCIL-[timestamp].md`
40
+
41
+ ### Interpreting Results
42
+
43
+ | Consensus Score | Meaning | Action |
44
+ |----------------|---------|--------|
45
+ | >= 0.85 | Strong agreement | Proceed with confidence |
46
+ | 0.65 - 0.84 | Moderate agreement | Proceed but address dissent concerns |
47
+ | 0.50 - 0.64 | Weak agreement | Seek user input before proceeding |
48
+ | < 0.50 | No consensus | Present all options to user, defer decision |
49
+
50
+ ### Guardrails
51
+ - Council is ADVISORY — user always has final say
52
+ - Maximum 2 rounds (initial + challenge). No infinite debates.
53
+ - Each voice limited to 200 words per round
54
+ - If consensus < 0.5: do NOT auto-select. Report "No consensus" honestly.
55
+ - Always document dissent — suppressed minority opinions create tech debt
56
+ - Use council templates (see `council-templates.md`) for common decision types
57
+
58
+ ### After council
59
+ - Write the decision record to `.planning/decisions/`
60
+ - If the decision creates an ADR: also write to `docs/adr/`
61
+ - Log council invocation and verdict in AUDIT
62
+ - Track the Skeptic's unmitigated risks as action items
63
+
64
+ ## Self-check before task completion
65
+ - [ ] Did I verify the decision warranted a council (not a simple choice)?
66
+ - [ ] Did I document all dissenting opinions (never suppressed)?
67
+ - [ ] Did I write the council verdict to .planning/decisions/?
68
+ - [ ] Did I remind the user that council is advisory (user has final say)?
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: cqrs-event-sourcing
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.6
5
+ status: stable
6
+ triggers: cqrs, event sourcing, command query separation, event store, projection, eventual consistency, event replay, aggregate root, domain event, event versioning, read model, write model
7
+ ---
8
+
9
+ # Skill — CQRS & Event Sourcing
10
+
11
+ ## When this skill activates
12
+ Any task involving command/query responsibility segregation, event sourcing, event store
13
+ design, projection building, or systems requiring full audit trails and temporal queries.
14
+
15
+ ## Mandatory actions when this skill is active
16
+
17
+ ### Before
18
+
19
+ 1. **Validate the need** — Confirm at least one: full audit trail required, temporal queries needed, complex domain with many read views, or high read/write asymmetry.
20
+ 2. **Identify aggregates** — Define aggregate roots as consistency boundaries. Each aggregate emits domain events and enforces invariants.
21
+ 3. **Map read vs write models** — Document which queries need optimized read models separate from the event stream.
22
+
23
+ ### During
24
+
25
+ #### Command side (write model)
26
+ - Commands are imperative ("PlaceOrder", "CancelShipment")
27
+ - Command handler validates invariants then emits domain events
28
+ - State is NEVER set directly — it is derived by applying events
29
+ - Aggregate enforces business rules before accepting the command
30
+
31
+ #### Event store design
32
+ ```sql
33
+ CREATE TABLE events (
34
+ event_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
35
+ aggregate_id UUID NOT NULL,
36
+ aggregate_type VARCHAR(100) NOT NULL,
37
+ event_type VARCHAR(100) NOT NULL,
38
+ event_version INTEGER NOT NULL,
39
+ sequence_number BIGINT NOT NULL,
40
+ payload JSONB NOT NULL,
41
+ metadata JSONB NOT NULL, -- correlation_id, causation_id, actor
42
+ created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
43
+ UNIQUE (aggregate_id, sequence_number)
44
+ );
45
+ ```
46
+ - Events are immutable — never update or delete
47
+ - Optimistic concurrency via expected sequence number on write
48
+ - Event names are past tense: `OrderPlaced`, `PaymentCharged`
49
+ - Store both payload and metadata (correlation ID, causation ID, actor)
50
+
51
+ #### Projections (read models)
52
+ - Each projection materializes a read-optimized view from the event stream
53
+ - Projections are independently rebuildable (replay from event 0)
54
+ - Use checkpointing: store last processed event position
55
+ - Different projections can use different databases (SQL, Elasticsearch, Redis)
56
+ - Mark as "rebuilding" during replay to avoid serving stale data
57
+
58
+ #### Eventual consistency patterns
59
+ - Causal consistency: return event sequence number from command, poll until projection catches up
60
+ - Read-your-writes: optimistically update client state after command succeeds
61
+ - Subscription-based: clients subscribe to projection update notifications
62
+
63
+ #### Snapshot strategy
64
+ - Avoid replaying entire history for long-lived aggregates
65
+ - Load latest snapshot + events after snapshot sequence number
66
+ - Snapshot frequency: every 50-100 events per aggregate
67
+ - Snapshots are optimization only — system must work without them
68
+
69
+ #### Event versioning and upcasting
70
+ - Never modify existing event schemas in-place
71
+ - Add optional fields (backward-compatible) or create new event type
72
+ - Upcasters transform old events to current schema during replay
73
+ - Store schema version with every event for routing to correct upcaster
74
+
75
+ #### Idempotent handlers
76
+ - Every projection/handler must be safe to process the same event twice
77
+ - Deduplicate by event_id before processing
78
+ - Record checkpoint after successful processing
79
+
80
+ ### After
81
+
82
+ 1. **Verify event completeness** — Every state change captured as a domain event. No silent mutations.
83
+ 2. **Test replay** — Rebuild one projection from scratch; confirm data integrity.
84
+ 3. **Validate idempotency** — Process same event twice, confirm no side effects.
85
+ 4. **Check consistency boundaries** — Each aggregate enforces invariants independently.
86
+
87
+ ## Self-check before task completion
88
+ - [ ] All state changes expressed as immutable domain events
89
+ - [ ] Event store uses optimistic concurrency (sequence number)
90
+ - [ ] Projections independently rebuildable from event stream
91
+ - [ ] Event handlers are idempotent (safe to replay)
92
+ - [ ] Snapshot strategy defined for long-lived aggregates
93
+ - [ ] Event versioning/upcasting handles schema evolution
94
+ - [ ] Eventual consistency communicated to client layer
95
+ - [ ] Correlation and causation IDs propagated through event chain
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: cross-platform-testing
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.4.0
5
+ status: stable
6
+ triggers: cross-platform testing, device farm testing, screenshot comparison test, platform-specific testing, mobile CI pipeline, Appium testing, Detox testing, XCTest UITest, mobile test automation, device matrix coverage, mobile E2E testing, visual regression mobile
7
+ ---
8
+
9
+ # Skill — Cross-Platform Mobile Testing
10
+
11
+ ## When this skill activates
12
+ This skill activates when implementing comprehensive mobile testing strategies, including device farm integration, screenshot testing, platform-specific behavior validation, or CI/CD pipelines for mobile apps.
13
+
14
+ ## Mandatory actions when this skill is active
15
+
16
+ ### Before writing any code
17
+ 1. Define device matrix covering target OS versions, screen sizes, and hardware capabilities (prioritize based on user analytics)
18
+ 2. Choose testing framework appropriate for platform (XCTest/XCUITest for iOS, Espresso/UIAutomator for Android, Detox/Appium for cross-platform)
19
+ 3. Establish screenshot testing baseline images and tolerance thresholds for visual regression detection
20
+ 4. Design test data strategy — use factories/fixtures, implement proper setup/teardown, ensure test isolation
21
+
22
+ ### During implementation
23
+ - Write tests at appropriate levels: unit tests for business logic, integration tests for data flows, E2E tests for critical user journeys
24
+ - Implement proper test identifiers (testID, accessibilityIdentifier) in UI components for reliable element selection
25
+ - Use page object pattern or similar abstraction to decouple tests from UI implementation details
26
+ - Configure screenshot testing with proper device/OS-specific baselines to handle platform rendering differences
27
+ - Implement retry logic for flaky tests caused by animation timing, network delays, or platform quirks
28
+ - Set up parallel test execution on device farms (Firebase Test Lab, AWS Device Farm, BrowserStack) for faster feedback
29
+ - Handle platform-specific behaviors explicitly in tests (Android back button, iOS swipe gestures, permission dialogs)
30
+
31
+ ### After implementation
32
+ - Run full test suite on representative device matrix, not just emulators/simulators
33
+ - Review test flakiness rates and fix or quarantine unstable tests
34
+ - Integrate tests into CI pipeline with proper failure reporting and artifact collection (screenshots, logs, videos)
35
+ - Validate test coverage for critical paths and high-risk areas (payments, authentication, data sync)
36
+
37
+ ## Self-check before task completion
38
+ - [ ] Test suite runs reliably across multiple devices and OS versions with <5% flakiness
39
+ - [ ] Screenshot tests catch visual regressions without excessive false positives
40
+ - [ ] Platform-specific behaviors are tested correctly (back button, deep links, system gestures)
41
+ - [ ] CI pipeline provides clear failure reporting with screenshots/videos for debugging
42
+ - [ ] E2E tests cover critical user journeys end-to-end, including error scenarios
43
+ - [ ] Test execution time is reasonable (use parallelization, split test suites if needed)