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,41 @@
1
+ ---
2
+ name: saas-multi-tenant
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.2.0
5
+ status: stable
6
+ triggers: saas architecture, tenant management, saas billing integration, feature gating saas, white-label platform, saas onboarding, subscription management saas, saas platform design, saas tenant provisioning, usage-based billing, saas data isolation, self-serve saas
7
+ compose: multi-tenancy-patterns
8
+ ---
9
+
10
+ # Skill — SaaS Multi-Tenant
11
+
12
+ ## When this skill activates
13
+ This skill activates when building multi-tenant SaaS platforms with tenant isolation, subscription billing, feature gating, white-labeling, self-serve onboarding, usage-based pricing, tenant provisioning, or plan management systems.
14
+
15
+ ## Mandatory actions when this skill is active
16
+
17
+ ### Before writing any code
18
+ 1. Design tenant isolation strategy: shared database with tenant_id column (row-level security), schema-per-tenant (PostgreSQL schemas), or database-per-tenant (highest isolation, highest cost), with cross-tenant query prevention (middleware validation, prepared statement parameterization)
19
+ 2. Model subscription lifecycle: trial start (14 days) → active paid (credit card charged) → past_due (payment failed, retry 3 times) → canceled (end of billing period) → deleted (30 days after cancel), with state machine transitions and webhook events for each stage
20
+ 3. Map feature entitlements by plan: free tier (5 users, 100 MB storage, core features), starter ($29/mo, 25 users, 10 GB, email support), professional ($99/mo, unlimited users, 100 GB, priority support, advanced analytics), enterprise (custom pricing, SSO, SLA, dedicated support)
21
+
22
+ ### During implementation
23
+ - Implement tenant context middleware: extract tenant_id from subdomain (acme.platform.com) or custom domain (app.acme.com with CNAME validation), JWT claims, or API key, inject into request context, validate tenant active (not suspended/deleted), apply row-level security filter (tenant_id = :current_tenant)
24
+ - Build feature gating system: define feature flags per plan (analytics_enabled, sso_enabled, api_access_enabled), check entitlements at runtime (before rendering UI, before API execution), return 402 Payment Required for gated features, track usage for upsell prompts
25
+ - Design usage-based billing: meter events (API calls, emails sent, storage used), aggregate per billing period, calculate overage charges (tiered pricing: $0.10/GB for 0-100GB, $0.05/GB for 100GB+), generate invoices (line items with metered usage), integrate with Stripe Billing or Chargebee
26
+ - Implement white-labeling: support custom domains (validate CNAME ownership via DNS TXT record), customizable branding (logo, colors, fonts stored per tenant), email templates (replace platform name with tenant name), remove "Powered by" footer on enterprise plans
27
+ - Build self-serve onboarding: signup flow (email verification, password strength requirements), organization creation (unique subdomain validation), plan selection (trial vs paid), payment method capture (tokenized card via Stripe Elements), provision tenant resources (create schema/database, seed default data)
28
+
29
+ ### After implementation
30
+ - Validate tenant isolation: attempt cross-tenant data access (user from tenant A trying to access tenant B data via direct ID manipulation), verify middleware rejects requests, check database queries include tenant_id filter, audit all raw SQL for missing tenant scoping
31
+ - Test billing accuracy: simulate monthly billing cycle, verify usage metering (events counted correctly), overage calculation (tiered pricing applied), invoice generation (correct line items, tax applied), payment processing (Stripe webhook handled), and dunning (retry failed payments, send reminders)
32
+ - Execute load testing with tenant skew: simulate 100 tenants with 90% traffic on top 10 tenants (power law distribution), measure query performance (ensure indexes on tenant_id), identify noisy neighbor issues (one tenant's load impacting others), validate rate limiting per tenant
33
+
34
+ ## Self-check before task completion
35
+ - [ ] Tenant isolation enforced: middleware extracts and validates tenant context, all queries scoped to tenant_id, cross-tenant access prevented
36
+ - [ ] Subscription lifecycle managed: trial → active → past_due → canceled states with webhook events, dunning for failed payments
37
+ - [ ] Feature gating functional: entitlements defined per plan, runtime checks before UI/API, 402 response for gated features, upsell prompts
38
+ - [ ] Usage-based billing: metered events tracked, aggregated per billing period, overage charges calculated (tiered pricing), invoices generated
39
+ - [ ] White-labeling supported: custom domains (CNAME validation), branding per tenant (logo, colors), email templates (tenant-specific)
40
+ - [ ] Self-serve onboarding: signup flow, plan selection, payment capture (tokenized), tenant provisioning (schema/database creation)
41
+ - [ ] Rate limiting per tenant: prevent noisy neighbors, ensure fair resource allocation, alert when tenant exceeds plan limits
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: santa-method
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.4
5
+ status: stable
6
+ triggers: santa, multi-angle verification, independent review, convergence, AND gate, double-check, dual review, parallel verification, cross-verification, rubric scoring, multi-reviewer, batch sampling
7
+ compose:
8
+ - verification-loop
9
+ ---
10
+
11
+ # Skill — Santa Method (Multi-Angle Independent Verification)
12
+
13
+ ## When this skill activates
14
+ After any significant implementation, before shipping, or whenever author-bias
15
+ is suspected. Use when a single reviewer perspective is insufficient to guarantee
16
+ correctness — the Santa Method ensures two independent reviewers reach the same
17
+ conclusion without cross-contamination.
18
+
19
+ Named after the "making a list, checking it twice" principle: one pass is never enough
20
+ for high-stakes outputs.
21
+
22
+ ## Mandatory actions when this skill is active
23
+
24
+ ### Before review begins
25
+
26
+ 1. **Identify the artifact under review** — code diff, architecture doc, API design, or generated output.
27
+ 2. **Define the review rubric** — establish 3-7 criteria with clear pass/fail definitions before spawning reviewers.
28
+ 3. **Prepare sanitized context packets** — each reviewer gets ONLY:
29
+ - The artifact itself
30
+ - The acceptance criteria / rubric
31
+ - Relevant domain context (docs, types, schemas)
32
+ - NO access to the other reviewer's notes, findings, or verdict
33
+ 4. **Select reviewer perspectives** — choose complementary angles:
34
+ - Reviewer A: Correctness & Logic (does it do what it claims?)
35
+ - Reviewer B: Robustness & Edge Cases (what breaks it?)
36
+ - Alternative pairs: Security/Functionality, UX/Architecture, Performance/Maintainability
37
+
38
+ ### During review (parallel execution)
39
+
40
+ **Context Isolation Protocol:**
41
+ - Reviewer A and Reviewer B operate in separate reasoning contexts
42
+ - Neither reviewer sees the other's output until both have submitted
43
+ - If using sub-agents: spawn as independent tasks with no shared state
44
+ - If single-agent: complete Reviewer A's full assessment, seal it, then begin Reviewer B fresh
45
+
46
+ **Each reviewer MUST produce structured JSON output:**
47
+ ```json
48
+ {
49
+ "reviewer": "A",
50
+ "perspective": "Correctness & Logic",
51
+ "verdict": "PASS" | "FAIL" | "CONDITIONAL",
52
+ "confidence": 0.0-1.0,
53
+ "findings": [
54
+ {
55
+ "criterion": "string",
56
+ "score": 1-5,
57
+ "evidence": "specific line/section reference",
58
+ "severity": "critical" | "major" | "minor" | "info"
59
+ }
60
+ ],
61
+ "blocking_issues": [],
62
+ "summary": "one-paragraph assessment"
63
+ }
64
+ ```
65
+
66
+ **AND Gate Logic (non-negotiable):**
67
+ - PASS requires: Reviewer A = PASS **AND** Reviewer B = PASS
68
+ - If EITHER reviewer returns FAIL → overall verdict is FAIL
69
+ - If EITHER reviewer returns CONDITIONAL → enter convergence loop
70
+ - This is an AND gate, never an OR gate — both must independently agree
71
+
72
+ **Batch Sampling (for large outputs):**
73
+ - If the artifact exceeds 500 lines or 20 logical units:
74
+ - Sample 10-15% of units for full santa review (random + targeted selection)
75
+ - Targeted selection: always include security-sensitive, complex, and high-change-rate sections
76
+ - If sampled sections fail: expand review to 30% or full artifact
77
+ - Document which sections were sampled and which were skipped
78
+
79
+ ### After review (convergence and resolution)
80
+
81
+ **If both reviewers PASS:**
82
+ - Record combined verdict as PASS
83
+ - Merge findings into unified report
84
+ - Log to `.mindforge/reviews/santa-[timestamp].json`
85
+
86
+ **If disagreement (convergence loop):**
87
+ 1. Identify the specific criteria where reviewers diverge
88
+ 2. Narrow scope to ONLY the disputed items
89
+ 3. Re-evaluate disputed items with additional context (both reviewers now see each other's evidence for disputed items ONLY)
90
+ 4. Round 2 verdict: apply AND gate again
91
+ 5. If still disagreeing after Round 2: escalate to human decision with both perspectives presented
92
+ 6. Maximum 2 convergence rounds — never infinite loops
93
+
94
+ **Convergence rules:**
95
+ - Round 1: Independent review (no cross-contamination)
96
+ - Round 2: Targeted re-review of disputed items only (both see each other's evidence)
97
+ - Round 3: NEVER — escalate to human if Round 2 fails
98
+ - Each round narrows scope (never broadens)
99
+
100
+ ### Output format
101
+
102
+ Final santa review report:
103
+ ```json
104
+ {
105
+ "method": "santa-method",
106
+ "artifact": "description of what was reviewed",
107
+ "timestamp": "ISO-8601",
108
+ "reviewer_a": { /* full reviewer output */ },
109
+ "reviewer_b": { /* full reviewer output */ },
110
+ "and_gate_result": "PASS" | "FAIL" | "ESCALATED",
111
+ "convergence_rounds": 0-2,
112
+ "disputed_items": [],
113
+ "final_verdict": "PASS" | "FAIL" | "ESCALATED",
114
+ "batch_sampling": {
115
+ "total_units": 0,
116
+ "sampled_units": 0,
117
+ "sampling_percentage": 0.0,
118
+ "sampling_strategy": "random+targeted"
119
+ }
120
+ }
121
+ ```
122
+
123
+ ## Self-check before task completion
124
+
125
+ Before marking a task done when this skill was active:
126
+
127
+ - [ ] Did both reviewers have fully isolated context? (No cross-contamination)
128
+ - [ ] Did I apply the AND gate strictly? (Both must PASS, not just one)
129
+ - [ ] Were reviewer perspectives complementary, not redundant?
130
+ - [ ] Was convergence attempted on disagreement (max 2 rounds)?
131
+ - [ ] For large artifacts, was batch sampling applied (10-15%)?
132
+ - [ ] Was the rubric defined BEFORE review began?
133
+ - [ ] Is the final verdict supported by evidence from both reviewers?
134
+ - [ ] Was the review output stored in structured JSON format?
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: search-implementation
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.7
5
+ status: stable
6
+ triggers: search implementation, full text search design, vector search architecture, hybrid search fusion, ranking algorithm design, BM25 tuning, semantic search pipeline, faceted search design, autocomplete implementation, inverted index design, search relevance tuning, search engine architecture
7
+ ---
8
+
9
+ # Search Implementation
10
+
11
+ ## When this skill activates
12
+
13
+ This skill activates when the user is designing, implementing, or optimizing search
14
+ functionality. This includes full-text search with inverted indexes, vector/semantic
15
+ search with embeddings, hybrid search fusion (combining BM25 + vector), ranking
16
+ algorithm design, faceted search, autocomplete/typeahead implementation, relevance
17
+ tuning, and search infrastructure architecture decisions.
18
+
19
+ ## Mandatory actions
20
+
21
+ ### Before
22
+
23
+ 1. Identify the search use case (product catalog, document search, knowledge base, logs, code search).
24
+ 2. Determine data volume and growth rate (affects index strategy and infrastructure).
25
+ 3. Assess query patterns (keyword, natural language, filtered, faceted, autocomplete).
26
+ 4. Identify relevance requirements (precision vs recall trade-off for the use case).
27
+ 5. Review existing data pipeline and determine indexing latency tolerance (real-time vs batch).
28
+
29
+ ### During
30
+
31
+ **Full-Text Search (Lexical):**
32
+ - **Inverted Index:** Maps terms to document lists with positions. Foundation of all text search.
33
+ - **BM25 Scoring:** Ranks by term frequency (TF), inverse document frequency (IDF), and document length normalization. The standard baseline for lexical relevance.
34
+ - **Analysis Pipeline:** Tokenization → lowercasing → stemming/lemmatization → stopword removal. Customize per language.
35
+ - **Field Boosting:** Weight title matches higher than body matches (title^3, body^1).
36
+ - **Phrase Matching:** Preserve term proximity for multi-word queries.
37
+ - Use Elasticsearch, OpenSearch, Solr, or PostgreSQL full-text for lexical search.
38
+
39
+ **Vector Search (Semantic):**
40
+ - **Embedding:** Convert queries and documents into dense vectors (768-1536 dimensions). Use sentence-transformers, OpenAI embeddings, or Cohere embed.
41
+ - **Similarity:** Cosine similarity or dot product between query vector and document vectors.
42
+ - **ANN Indexes:** Approximate Nearest Neighbor for sub-linear search. HNSW (best recall/speed trade-off), IVF (better for very large datasets), ScaNN.
43
+ - **Chunking:** Split long documents into passages (256-512 tokens) before embedding. Overlap chunks by 10-20%.
44
+ - Use Qdrant, Pinecone, Weaviate, pgvector, or Elasticsearch kNN for vector search.
45
+
46
+ **Hybrid Search (Fusion):**
47
+ - **Reciprocal Rank Fusion (RRF):** Merge BM25 and vector result lists. Score = sum(1 / (k + rank)) across both lists. k=60 is a common default.
48
+ - **Linear Combination:** Normalize scores from each system and combine with weights (alpha * BM25 + (1-alpha) * vector). Tune alpha per use case.
49
+ - Hybrid outperforms either alone for most use cases (lexical catches exact matches, semantic catches intent).
50
+ - Run both searches in parallel, fuse results, then apply final re-ranking.
51
+
52
+ **Faceted Search:**
53
+ - Pre-compute aggregations per field (category, price range, brand, rating).
54
+ - Return facet counts alongside search results for filter UI.
55
+ - Apply filters BEFORE computing facets (post-filter facets confuse users).
56
+ - Use bucket aggregations (terms, range, date histogram) in search engines.
57
+ - Optimize with doc_values for facetable fields.
58
+
59
+ **Autocomplete:**
60
+ - **Prefix matching:** Trie data structure or edge n-gram tokenizer (index "search" as "s", "se", "sea", "sear", "searc", "search").
61
+ - **Popularity weighting:** Boost suggestions by query frequency or click-through rate.
62
+ - **Fuzzy matching:** Tolerate typos with edit distance (Levenshtein distance <= 2).
63
+ - **Contextual suggestions:** Use recent user behavior to personalize completions.
64
+ - Target response time: < 100ms for autocomplete (users expect instant feedback).
65
+
66
+ **Relevance Tuning:**
67
+ - **Field boosting:** Prioritize title > tags > body matches.
68
+ - **Recency decay:** Score newer documents higher (exponential decay function).
69
+ - **Popularity signals:** Boost by click-through rate, view count, or purchase frequency.
70
+ - **User behavior:** Learn from clicks (Learning to Rank — LTR models).
71
+ - **A/B testing:** Measure relevance changes with online metrics (click-through, session success).
72
+ - Use NDCG (Normalized Discounted Cumulative Gain) as the offline relevance metric.
73
+
74
+ **Architecture:**
75
+ - Separate search index from primary database (search is a read-optimized view).
76
+ - Async indexing pipeline: primary DB → change stream/CDC → transform → index.
77
+ - Index latency SLA: define acceptable delay (real-time: <1s, near-real-time: <30s, batch: hours).
78
+ - Replicate search indexes for availability and read throughput.
79
+ - Monitor index lag, query latency (p50, p95, p99), and zero-result rate.
80
+
81
+ ### After
82
+
83
+ 1. Verify search returns relevant results for representative queries (spot-check top 10).
84
+ 2. Confirm indexing pipeline is running and latency is within SLA.
85
+ 3. Validate autocomplete responds within 100ms target.
86
+ 4. Check facet counts are accurate and filters work correctly.
87
+ 5. Measure zero-result rate and establish baseline relevance metrics (NDCG).
88
+
89
+ ## Self-check before task completion
90
+
91
+ - [ ] Search type is appropriate for the use case (lexical, vector, hybrid).
92
+ - [ ] Inverted index analysis pipeline is configured for the content language.
93
+ - [ ] Vector embeddings use an appropriate model and chunk size.
94
+ - [ ] Hybrid fusion strategy (RRF or linear combination) is implemented if both systems are used.
95
+ - [ ] Autocomplete targets < 100ms latency with typo tolerance.
96
+ - [ ] Relevance tuning includes field boosting and recency/popularity signals.
97
+ - [ ] Search index is separate from primary DB with async indexing pipeline.
98
+ - [ ] Monitoring covers query latency, index lag, and zero-result rate.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: secrets-platform
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.7.0
5
+ status: stable
6
+ triggers: secrets management platform, secret rotation automation, secret access auditing, secret sprawl prevention, vault architecture, secrets lifecycle, dynamic secret generation, secret injection pattern, secrets governance, secret scanning platform, certificate management, secrets policy enforcement
7
+ compose: secrets-rotation
8
+ ---
9
+
10
+ # Skill — Secrets Platform
11
+
12
+ ## When this skill activates
13
+
14
+ This skill activates when the user is designing or implementing a centralized secrets management platform. This includes secret rotation automation, access auditing, secret sprawl prevention, Vault architecture, secrets lifecycle management, dynamic secret generation, secret injection patterns, secrets governance, secret scanning, certificate management, and secrets policy enforcement.
15
+
16
+ ## Mandatory actions when this skill is active
17
+
18
+ ### Before writing any code
19
+
20
+ 1. Audit current secret storage locations: code repos, config files, environment variables, CI/CD systems, container images, config management tools. Quantify secret sprawl.
21
+ 2. Identify secret types: API keys, database credentials, TLS certificates, OAuth tokens, encryption keys, SSH keys. Each type has different rotation requirements.
22
+ 3. Define secret access policies: which teams/services can access which secrets. Use principle of least privilege (default deny, explicit allow).
23
+ 4. Establish secret rotation requirements: compliance mandates (PCI DSS, SOC 2), blast radius reduction, credential age limits.
24
+ 5. Assess current secret rotation toil: how many hours per month spent manually rotating secrets.
25
+
26
+ ### During implementation
27
+
28
+ - **Centralized Secret Store:** Use HashiCorp Vault, AWS Secrets Manager, or GCP Secret Manager. Never store secrets in code, config files, or environment variables. Secrets should be encrypted at rest and in transit.
29
+ - **Secret Rotation Automation:** Automate rotation for database credentials, API keys, and TLS certificates. High-sensitivity secrets (production database) rotate every 30 days. Low-sensitivity (dev sandbox API keys) rotate every 90 days. Rotation should be zero-downtime (dual-write during rotation window).
30
+ - **Dynamic Secret Generation:** For databases, generate short-lived credentials on-demand (Vault database secrets engine). Credentials should expire after 1-8 hours. Reduces blast radius if credentials leak.
31
+ - **Secret Injection Patterns:** Inject secrets at runtime, not build time. Use init containers (Kubernetes), sidecar containers (Vault Agent), or secret CSI drivers. Secrets should never be in container images.
32
+ - **Access Auditing:** Log every secret access (who, what, when, from where). Audit logs must be immutable and retained for 1+ year. Alert on unusual access patterns (access from new IP, high-frequency access, access to secrets outside normal scope).
33
+ - **Secret Sprawl Prevention:** Use secret scanning in CI/CD (Trufflehog, GitGuardian, GitHub Secret Scanning). Block commits containing secrets. Scan existing repos and remediate found secrets (rotate + remove from history).
34
+ - **Certificate Management:** Automate TLS certificate issuance (Let's Encrypt, cert-manager) and renewal (30 days before expiry). Track certificate expiration dates and alert 60 days before expiry.
35
+ - **Secrets Policy Enforcement:** Use policy-as-code (OPA, Vault policies) to enforce: maximum credential age, minimum rotation frequency, required encryption strength, allowed access patterns. Policies should fail-closed (deny by default).
36
+ - **Emergency Access (Break-Glass):** Provide mechanism for emergency access to secrets when automation fails. Requires: approval workflow, audit trail, automatic expiration (4-8 hours), post-incident review.
37
+
38
+ ### After implementation
39
+
40
+ - Verify all production secrets are migrated to centralized secret store (zero secrets in code/config).
41
+ - Confirm secret rotation is automated and zero-downtime for critical credentials.
42
+ - Validate secret injection happens at runtime with no secrets in container images.
43
+ - Ensure access auditing logs every secret access with retention of 1+ year.
44
+ - Check that secret scanning blocks commits containing secrets in CI/CD.
45
+
46
+ ## Self-check before task completion
47
+
48
+ - [ ] All production secrets are stored in centralized secret store (Vault, Secrets Manager).
49
+ - [ ] Secret rotation is automated for credentials and certificates with zero-downtime.
50
+ - [ ] Dynamic secrets are used for databases with 1-8 hour expiration.
51
+ - [ ] Secret injection happens at runtime via init containers, sidecars, or CSI drivers.
52
+ - [ ] Access auditing logs every secret access with immutable logs retained for 1+ year.
53
+ - [ ] Secret scanning is enabled in CI/CD and blocks commits containing secrets.
54
+ - [ ] Certificate management automates issuance and renewal with alerts 60 days before expiry.
55
+ - [ ] Secrets policy enforcement uses policy-as-code and fails closed (deny by default).
56
+ - [ ] Emergency access (break-glass) requires approval, audit trail, and auto-expiration.
@@ -0,0 +1,173 @@
1
+ ---
2
+ name: secrets-rotation
3
+ version: 1.0.0
4
+ min_mindforge_version: 0.1.0
5
+ status: stable
6
+ compose: security-review
7
+ triggers: secrets rotation, automated rotation, zero downtime rollover, vault pattern, ephemeral credentials, lease management, key rotation, credential lifecycle, rotation schedule, secret versioning, rotation verification, dual key period
8
+ ---
9
+
10
+ # Skill — Secrets Rotation
11
+
12
+ ## When this skill activates
13
+ Any task involving secrets rotation implementation, credential lifecycle
14
+ management, zero-downtime key rollover, or Vault/secrets manager configuration.
15
+
16
+ ## Mandatory actions when this skill is active
17
+
18
+ ### Before writing any code
19
+ 1. Inventory all secrets that need rotation (API keys, DB creds, tokens).
20
+ 2. Define the rotation schedule based on secret sensitivity.
21
+ 3. Design the dual-key period for zero-downtime rollover.
22
+
23
+ ### During implementation
24
+ - Implement dual-key period (new key active, old key valid during grace period).
25
+ - Ensure applications read "current" version pointer, not hardcoded versions.
26
+ - Add rotation verification (test new cred works, verify old cred rejected after grace).
27
+
28
+ ### After implementation
29
+ - Set up automated rotation on schedule.
30
+ - Add alerts for rotation failures.
31
+ - Document rotation procedures in ARCHITECTURE.md (for manual emergency rotation).
32
+
33
+ ## Dual-Key Period (Zero-Downtime Rollover)
34
+
35
+ ### Pattern
36
+ ```
37
+ Time 0: key_v1 = active, key_v2 = not yet created
38
+ Time 1: key_v2 = created, key_v1 = still active (grace period starts)
39
+ Time 2: key_v2 = active (apps switch), key_v1 = still valid (grace)
40
+ Time 3: key_v1 = revoked (grace period ends)
41
+ ```
42
+
43
+ ### Why Dual-Key
44
+ - Applications may cache the old key.
45
+ - Distributed systems need time to propagate the new key.
46
+ - Rolling deployments mean some instances have new key, some have old.
47
+ - Grace period ensures no request fails during transition.
48
+
49
+ ### Grace Period Duration
50
+ | Secret Type | Grace Period | Rationale |
51
+ |------------|-------------|-----------|
52
+ | API keys (external) | 24 hours | Client applications need time to update |
53
+ | Database credentials | 1 hour | Internal, fast propagation |
54
+ | JWT signing keys | 2x token lifetime | Existing tokens must remain valid |
55
+ | TLS certificates | 24 hours | DNS/CDN propagation time |
56
+
57
+ ## Automated Rotation
58
+
59
+ ### HashiCorp Vault Dynamic Secrets
60
+ - Vault generates credentials on demand.
61
+ - Credentials have TTL (lease), auto-expire.
62
+ - No manual rotation needed — secrets are ephemeral.
63
+ - Revocation: revoke lease, credential immediately invalid.
64
+
65
+ ### AWS Secrets Manager Rotation
66
+ - Lambda function triggered on rotation schedule.
67
+ - Creates new credential, tests it, updates "current" pointer.
68
+ - Previous version remains valid during staging period.
69
+ - Automatic rollback if new credential fails validation.
70
+
71
+ ### Custom Rotation Script Pattern
72
+ ```
73
+ 1. Generate new credential
74
+ 2. Store as "pending" version
75
+ 3. Test "pending" credential works (connect, query, etc.)
76
+ 4. Promote "pending" to "current"
77
+ 5. Demote old "current" to "previous" (grace period)
78
+ 6. After grace period: delete "previous"
79
+ 7. Alert on any failure at any step
80
+ ```
81
+
82
+ ## Zero-Downtime Application Pattern
83
+
84
+ ### Application Reads "Current" Pointer
85
+ ```
86
+ Application → Secrets Manager → "current" version → actual credential
87
+ ```
88
+
89
+ - Application never stores credential — fetches on each use (with cache TTL).
90
+ - On rotation: "current" pointer updated atomically.
91
+ - Application's next fetch gets new credential automatically.
92
+ - Cache TTL should be shorter than grace period.
93
+
94
+ ### Connection Pool Refresh
95
+ - After rotation: drain old connections, create new with new credential.
96
+ - Graceful: new connections use new cred, old connections finish naturally.
97
+ - Timeout: force-close old connections after grace period.
98
+
99
+ ## Ephemeral Credentials
100
+
101
+ ### Concept
102
+ - Short-lived credentials that auto-expire (minutes to hours).
103
+ - No rotation needed — credential dies before it could be compromised.
104
+ - Vault dynamic secrets, AWS STS temporary credentials, K8s service account tokens.
105
+
106
+ ### When to Use Ephemeral
107
+ - Service-to-service communication.
108
+ - CI/CD pipeline credentials.
109
+ - Developer access to production systems.
110
+ - Any scenario where rotation overhead is high.
111
+
112
+ ### When NOT to Use Ephemeral
113
+ - External integrations that can't handle credential refresh.
114
+ - Embedded devices with limited connectivity.
115
+ - Systems where credential fetch latency is unacceptable.
116
+
117
+ ## Rotation Schedule
118
+
119
+ | Secret Type | Rotation Frequency | Rationale |
120
+ |------------|-------------------|-----------|
121
+ | Database passwords | 90 days | Balance security vs operational risk |
122
+ | API keys (internal) | 30 days | Higher rotation, lower blast radius |
123
+ | API keys (external) | 90-180 days | Coordination with partners needed |
124
+ | JWT signing keys | 90 days | Must outlive longest token lifetime |
125
+ | TLS certificates | 60 days (Let's Encrypt auto) | Short-lived, automated |
126
+ | Encryption keys | 365 days | Key material rarely exposed |
127
+ | Compromised secrets | IMMEDIATELY | Zero tolerance for known compromise |
128
+
129
+ ## Rotation Verification
130
+
131
+ ### Post-Rotation Checks
132
+ 1. **New credential works**: attempt connection/API call with new credential.
133
+ 2. **Old credential rejected** (after grace): verify old credential fails.
134
+ 3. **Application health**: check error rates didn't spike during rotation.
135
+ 4. **Audit log**: verify rotation event logged with timestamp and actor.
136
+
137
+ ### Failure Handling
138
+ - If new credential fails validation: abort, keep old credential, alert.
139
+ - If application errors spike after rotation: rollback (reactivate old credential).
140
+ - Never delete old credential until verified that new credential works everywhere.
141
+
142
+ ## Secret Versioning
143
+
144
+ ### Version Metadata
145
+ ```json
146
+ {
147
+ "secret_id": "db-prod-password",
148
+ "version": 7,
149
+ "created_at": "2024-01-15T10:30:00Z",
150
+ "expires_at": "2024-04-15T10:30:00Z",
151
+ "status": "current",
152
+ "rotated_by": "automated-rotation-lambda",
153
+ "previous_version": 6
154
+ }
155
+ ```
156
+
157
+ ### Version States
158
+ - **pending**: newly created, being validated.
159
+ - **current**: active version, used by applications.
160
+ - **previous**: grace period, still valid but deprecated.
161
+ - **revoked**: expired/rotated out, no longer valid.
162
+
163
+ ## Self-check before task completion
164
+
165
+ Before marking a task done when this skill was active:
166
+
167
+ - [ ] Did I read the full SKILL.md before starting? (Not just the triggers)
168
+ - [ ] Is dual-key period implemented (no downtime during rotation)?
169
+ - [ ] Does the application read "current" pointer (not hardcoded version)?
170
+ - [ ] Is rotation verification implemented (new works, old eventually rejected)?
171
+ - [ ] Is automated rotation on schedule (not manual)?
172
+ - [ ] Are alerts configured for rotation failures?
173
+ - [ ] Is emergency manual rotation procedure documented?
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: self-serve-infrastructure
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.7.0
5
+ status: stable
6
+ triggers: self-serve infrastructure, infrastructure abstraction layer, team resource provisioning, resource quota management, infrastructure guardrail, infrastructure self-service, cloud account vending, environment provisioning, developer infrastructure, resource request automation, infrastructure API, sandbox environment
7
+ ---
8
+
9
+ # Skill — Self-Serve Infrastructure
10
+
11
+ ## When this skill activates
12
+
13
+ This skill activates when the user is designing or implementing self-service infrastructure capabilities. This includes building infrastructure abstraction layers, enabling team resource provisioning, managing resource quotas, implementing infrastructure guardrails, cloud account vending, environment provisioning, and infrastructure APIs that allow developers to request and manage infrastructure without manual approval workflows.
14
+
15
+ ## Mandatory actions when this skill is active
16
+
17
+ ### Before writing any code
18
+
19
+ 1. Audit current infrastructure request workflows: identify bottlenecks, approval layers, and average time from request to provisioned resource.
20
+ 2. Define resource taxonomy (compute, storage, database, network, secrets) and ownership model (team-owned, platform-managed, shared).
21
+ 3. Establish cost budgets and quota policies per team and environment type (production vs non-production).
22
+ 4. Identify compliance requirements that must be enforced via policy-as-code (data residency, encryption, network isolation).
23
+ 5. Map out the guardrails that prevent misconfiguration while still enabling developer autonomy.
24
+
25
+ ### During implementation
26
+
27
+ - **Infrastructure Abstraction Layer:** Hide cloud provider primitives behind domain-specific abstractions (e.g., "web service", "background worker", "database" instead of EC2/RDS/ECS). Abstractions should map to 80% of use cases; provide escape hatches for the 20%.
28
+ - **Account Vending:** Automate AWS/GCP/Azure account creation with pre-configured networking, security groups, IAM roles, and cost monitoring. Vending should complete in under 10 minutes and include automatic tagging for cost attribution.
29
+ - **Resource Quotas:** Enforce per-team quotas on compute, storage, and API calls. Quotas should be soft limits with alerts (80% threshold) and hard limits that block provisioning. Include self-service quota increase requests with auto-approval for small increases (20%).
30
+ - **Guardrails (Policy-as-Code):** Use OPA, Sentinel, or Cloud Custodian to enforce rules: no public S3 buckets, require encryption, require tagging, enforce naming conventions, block expensive instance types in non-prod. Guardrails should fail-fast at provisioning time, not after resources are created.
31
+ - **Environment Provisioning:** Enable one-click environment creation (dev, staging, prod, per-developer sandbox). Environments should be ephemeral for non-prod, with automatic cleanup after N days of inactivity. Include cost estimates before provisioning.
32
+ - **Infrastructure API:** Expose infrastructure capabilities via REST or GraphQL API. Each endpoint should return a tracking ID for async provisioning, with status polling or webhooks. Include rate limiting and audit logging.
33
+ - **Sandbox Safety:** Sandboxes should auto-delete after 7 days, have cost caps ($50-$200/month), and include network isolation from production. Developers should receive cost alerts at 50%, 80%, 100% of quota.
34
+
35
+ ### After implementation
36
+
37
+ - Verify infrastructure provisioning time is reduced by at least 80% (from days to minutes).
38
+ - Confirm guardrails prevent at least 90% of misconfiguration issues that previously required manual remediation.
39
+ - Validate resource quotas are enforced and quota breach attempts are logged and alerted.
40
+ - Ensure environment provisioning includes cost estimates and auto-cleanup for ephemeral environments.
41
+ - Check that infrastructure API requests include tracking IDs and status endpoints for async operations.
42
+
43
+ ## Self-check before task completion
44
+
45
+ - [ ] Infrastructure abstraction layer covers 80% of use cases with escape hatches for the rest.
46
+ - [ ] Account vending completes in under 10 minutes with pre-configured security and networking.
47
+ - [ ] Resource quotas are enforced with soft limits (alerts at 80%) and hard limits (block at 100%).
48
+ - [ ] Guardrails use policy-as-code and fail at provisioning time, not post-creation.
49
+ - [ ] Environment provisioning includes cost estimates and automatic cleanup policies.
50
+ - [ ] Infrastructure API has async tracking, status polling, rate limiting, and audit logs.
51
+ - [ ] Sandbox environments have cost caps, auto-deletion, and network isolation from production.