mindforge-cc 10.0.3 → 11.0.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 (333) hide show
  1. package/.mindforge/MINDFORGE-V2-SCHEMA.json +43 -10
  2. package/.mindforge/config.json +30 -2
  3. package/.mindforge/engine/cross-model-eval.md +74 -0
  4. package/.mindforge/engine/proactive/signal-detector.md +60 -0
  5. package/.mindforge/engine/proactive/suggestion-engine.md +100 -0
  6. package/.mindforge/personas/agent-architect.md +57 -0
  7. package/.mindforge/personas/agent-evaluator.md +162 -0
  8. package/.mindforge/personas/agent-memory-designer.md +157 -0
  9. package/.mindforge/personas/agent-ops-engineer.md +120 -0
  10. package/.mindforge/personas/agent-orchestrator.md +112 -0
  11. package/.mindforge/personas/ai-economist.md +57 -0
  12. package/.mindforge/personas/ai-safety-engineer.md +57 -0
  13. package/.mindforge/personas/analytics-engineer.md +57 -0
  14. package/.mindforge/personas/anti-pattern-hunter.md +61 -0
  15. package/.mindforge/personas/api-gateway-designer.md +132 -0
  16. package/.mindforge/personas/auth-engineer.md +112 -0
  17. package/.mindforge/personas/build-engineer.md +57 -0
  18. package/.mindforge/personas/business-analyst.md +56 -0
  19. package/.mindforge/personas/cache-architect.md +100 -0
  20. package/.mindforge/personas/causal-scientist.md +57 -0
  21. package/.mindforge/personas/cdn-architect.md +118 -0
  22. package/.mindforge/personas/change-agent.md +104 -0
  23. package/.mindforge/personas/code-narrator.md +52 -0
  24. package/.mindforge/personas/codegen-specialist.md +68 -0
  25. package/.mindforge/personas/communication-architect.md +102 -0
  26. package/.mindforge/personas/compliance-engineer.md +96 -0
  27. package/.mindforge/personas/consensus-engineer.md +116 -0
  28. package/.mindforge/personas/contract-tester.md +60 -192
  29. package/.mindforge/personas/data-architect.md +108 -0
  30. package/.mindforge/personas/data-mesh-architect.md +57 -0
  31. package/.mindforge/personas/data-pipeline-architect.md +120 -0
  32. package/.mindforge/personas/de-sloppifier.md +60 -0
  33. package/.mindforge/personas/debt-manager.md +66 -0
  34. package/.mindforge/personas/decision-architect.md +82 -51
  35. package/.mindforge/personas/deployment-captain.md +74 -0
  36. package/.mindforge/personas/design-system-lead.md +112 -0
  37. package/.mindforge/personas/dmux-orchestrator.md +75 -0
  38. package/.mindforge/personas/dx-engineer.md +96 -0
  39. package/.mindforge/personas/ecommerce-engineer.md +57 -0
  40. package/.mindforge/personas/edge-engineer.md +94 -0
  41. package/.mindforge/personas/edtech-architect.md +106 -0
  42. package/.mindforge/personas/embedding-architect.md +57 -0
  43. package/.mindforge/personas/environment-engineer.md +57 -0
  44. package/.mindforge/personas/eval-judge.md +55 -0
  45. package/.mindforge/personas/event-architect.md +102 -0
  46. package/.mindforge/personas/experiment-designer.md +138 -0
  47. package/.mindforge/personas/feature-store-engineer.md +57 -0
  48. package/.mindforge/personas/finops-analyst.md +66 -0
  49. package/.mindforge/personas/fintech-architect.md +57 -0
  50. package/.mindforge/personas/flutter-engineer.md +104 -0
  51. package/.mindforge/personas/gaming-engineer.md +57 -0
  52. package/.mindforge/personas/graphql-designer.md +73 -0
  53. package/.mindforge/personas/healthcare-engineer.md +57 -0
  54. package/.mindforge/personas/hiring-strategist.md +105 -0
  55. package/.mindforge/personas/hitl-architect.md +165 -0
  56. package/.mindforge/personas/i18n-architect.md +69 -0
  57. package/.mindforge/personas/iot-architect.md +105 -0
  58. package/.mindforge/personas/knowledge-curator.md +139 -0
  59. package/.mindforge/personas/knowledge-engineer.md +57 -0
  60. package/.mindforge/personas/lakehouse-architect.md +57 -0
  61. package/.mindforge/personas/llm-orchestrator.md +57 -0
  62. package/.mindforge/personas/logistics-architect.md +106 -0
  63. package/.mindforge/personas/market-analyst.md +53 -0
  64. package/.mindforge/personas/marketplace-engineer.md +105 -0
  65. package/.mindforge/personas/mcp-designer.md +54 -0
  66. package/.mindforge/personas/meeting-designer.md +104 -0
  67. package/.mindforge/personas/mentorship-lead.md +106 -0
  68. package/.mindforge/personas/migration-architect.md +57 -0
  69. package/.mindforge/personas/ml-ops-engineer.md +101 -0
  70. package/.mindforge/personas/mobile-architect.md +105 -0
  71. package/.mindforge/personas/mobile-security-engineer.md +106 -0
  72. package/.mindforge/personas/multi-tenancy-architect.md +71 -0
  73. package/.mindforge/personas/multimodal-engineer.md +57 -0
  74. package/.mindforge/personas/offline-specialist.md +105 -0
  75. package/.mindforge/personas/onboarding-navigator.md +63 -0
  76. package/.mindforge/personas/payments-engineer.md +135 -0
  77. package/.mindforge/personas/pipeline-engineer.md +115 -0
  78. package/.mindforge/personas/platform-engineer.md +97 -0
  79. package/.mindforge/personas/platform-lead.md +57 -0
  80. package/.mindforge/personas/privacy-engineer.md +57 -0
  81. package/.mindforge/personas/product-owner.md +56 -0
  82. package/.mindforge/personas/productivity-analyst.md +57 -0
  83. package/.mindforge/personas/prompt-architect.md +101 -0
  84. package/.mindforge/personas/proofreader.md +53 -0
  85. package/.mindforge/personas/pwa-architect.md +105 -0
  86. package/.mindforge/personas/quality-scorer.md +63 -0
  87. package/.mindforge/personas/react-native-engineer.md +106 -0
  88. package/.mindforge/personas/resilience-engineer.md +69 -0
  89. package/.mindforge/personas/rfc-architect.md +64 -0
  90. package/.mindforge/personas/saga-orchestrator.md +80 -0
  91. package/.mindforge/personas/secrets-engineer.md +57 -0
  92. package/.mindforge/personas/skill-smith.md +79 -0
  93. package/.mindforge/personas/sre-lead.md +107 -0
  94. package/.mindforge/personas/stream-engineer.md +57 -0
  95. package/.mindforge/personas/streaming-engineer.md +64 -0
  96. package/.mindforge/personas/swarm-templates.json +674 -44
  97. package/.mindforge/personas/system-designer.md +57 -0
  98. package/.mindforge/personas/team-coach.md +120 -0
  99. package/.mindforge/personas/tech-lead-coach.md +103 -0
  100. package/.mindforge/personas/technical-writer-lead.md +111 -0
  101. package/.mindforge/personas/vibe-checker.md +75 -0
  102. package/.mindforge/personas/worktree-manager.md +56 -0
  103. package/.mindforge/personas/zero-trust-engineer.md +113 -0
  104. package/.mindforge/skills/a11y-testing/SKILL.md +143 -0
  105. package/.mindforge/skills/agent-evaluation-framework/SKILL.md +227 -0
  106. package/.mindforge/skills/agent-memory-design/SKILL.md +199 -0
  107. package/.mindforge/skills/agent-orchestration-patterns/SKILL.md +129 -0
  108. package/.mindforge/skills/agent-tool-selection/SKILL.md +204 -0
  109. package/.mindforge/skills/ai-agent-deployment/SKILL.md +176 -0
  110. package/.mindforge/skills/ai-cost-management/SKILL.md +57 -0
  111. package/.mindforge/skills/ai-safety-alignment/SKILL.md +53 -0
  112. package/.mindforge/skills/analytics-instrumentation/SKILL.md +172 -0
  113. package/.mindforge/skills/api-gateway-patterns/SKILL.md +177 -0
  114. package/.mindforge/skills/api-marketplace/SKILL.md +56 -0
  115. package/.mindforge/skills/api-versioning/SKILL.md +100 -0
  116. package/.mindforge/skills/app-store-deployment/SKILL.md +44 -0
  117. package/.mindforge/skills/architecture-tradeoff-analysis/SKILL.md +97 -0
  118. package/.mindforge/skills/audit-logging/SKILL.md +140 -0
  119. package/.mindforge/skills/auth-patterns/SKILL.md +148 -0
  120. package/.mindforge/skills/autonomous-agent-harness/SKILL.md +218 -0
  121. package/.mindforge/skills/autonomous-agents/SKILL.md +59 -0
  122. package/.mindforge/skills/build-system-optimization/SKILL.md +54 -0
  123. package/.mindforge/skills/build-vs-buy/SKILL.md +80 -0
  124. package/.mindforge/skills/bundle-optimization/SKILL.md +174 -0
  125. package/.mindforge/skills/business-analyst/SKILL.md +82 -0
  126. package/.mindforge/skills/caching-strategies/SKILL.md +132 -0
  127. package/.mindforge/skills/capacity-planning/SKILL.md +96 -0
  128. package/.mindforge/skills/causal-inference/SKILL.md +42 -0
  129. package/.mindforge/skills/cdn-optimization/SKILL.md +212 -0
  130. package/.mindforge/skills/change-management/SKILL.md +106 -0
  131. package/.mindforge/skills/chaos-engineering/SKILL.md +99 -0
  132. package/.mindforge/skills/ci-cd-pipeline/SKILL.md +118 -0
  133. package/.mindforge/skills/cli-design/SKILL.md +118 -0
  134. package/.mindforge/skills/code-generation-patterns/SKILL.md +92 -0
  135. package/.mindforge/skills/code-review-methodology/SKILL.md +180 -0
  136. package/.mindforge/skills/code-tour/SKILL.md +145 -0
  137. package/.mindforge/skills/codebase-onboarding/SKILL.md +95 -0
  138. package/.mindforge/skills/compliance-as-code/SKILL.md +195 -0
  139. package/.mindforge/skills/conflict-resolution/SKILL.md +87 -0
  140. package/.mindforge/skills/connection-pooling/SKILL.md +151 -0
  141. package/.mindforge/skills/container-security/SKILL.md +151 -0
  142. package/.mindforge/skills/context-engineering/SKILL.md +114 -0
  143. package/.mindforge/skills/contract-testing/SKILL.md +85 -0
  144. package/.mindforge/skills/cost-estimation/SKILL.md +82 -0
  145. package/.mindforge/skills/cqrs-event-sourcing/SKILL.md +95 -0
  146. package/.mindforge/skills/cross-platform-testing/SKILL.md +43 -0
  147. package/.mindforge/skills/data-governance/SKILL.md +42 -0
  148. package/.mindforge/skills/data-lakehouse/SKILL.md +42 -0
  149. package/.mindforge/skills/data-mesh/SKILL.md +42 -0
  150. package/.mindforge/skills/data-modeling/SKILL.md +107 -0
  151. package/.mindforge/skills/data-pipeline-design/SKILL.md +171 -0
  152. package/.mindforge/skills/data-privacy-engineering/SKILL.md +42 -0
  153. package/.mindforge/skills/database-performance/SKILL.md +174 -0
  154. package/.mindforge/skills/database-sharding-advanced/SKILL.md +206 -0
  155. package/.mindforge/skills/de-sloppify/SKILL.md +120 -0
  156. package/.mindforge/skills/defense-in-depth/SKILL.md +84 -0
  157. package/.mindforge/skills/delegation-patterns/SKILL.md +123 -0
  158. package/.mindforge/skills/dependency-management/SKILL.md +94 -0
  159. package/.mindforge/skills/deployment-workflow/SKILL.md +135 -0
  160. package/.mindforge/skills/design-system/SKILL.md +113 -0
  161. package/.mindforge/skills/developer-onboarding/SKILL.md +99 -0
  162. package/.mindforge/skills/developer-productivity-metrics/SKILL.md +59 -0
  163. package/.mindforge/skills/distributed-consensus/SKILL.md +141 -0
  164. package/.mindforge/skills/dmux-workflows/SKILL.md +141 -0
  165. package/.mindforge/skills/dns-architecture/SKILL.md +167 -0
  166. package/.mindforge/skills/ecommerce-architecture/SKILL.md +41 -0
  167. package/.mindforge/skills/edge-computing/SKILL.md +91 -0
  168. package/.mindforge/skills/edtech-platform/SKILL.md +41 -0
  169. package/.mindforge/skills/email-deliverability/SKILL.md +177 -0
  170. package/.mindforge/skills/embedding-systems/SKILL.md +55 -0
  171. package/.mindforge/skills/environment-management/SKILL.md +54 -0
  172. package/.mindforge/skills/error-handling-architecture/SKILL.md +118 -0
  173. package/.mindforge/skills/estimation-techniques/SKILL.md +113 -0
  174. package/.mindforge/skills/eval-harness/SKILL.md +180 -0
  175. package/.mindforge/skills/event-driven-architecture/SKILL.md +162 -0
  176. package/.mindforge/skills/experiment-design/SKILL.md +139 -0
  177. package/.mindforge/skills/experiment-platform/SKILL.md +43 -0
  178. package/.mindforge/skills/feature-engineering/SKILL.md +42 -0
  179. package/.mindforge/skills/feature-flag-management/SKILL.md +183 -0
  180. package/.mindforge/skills/fine-tuning-workflow/SKILL.md +189 -0
  181. package/.mindforge/skills/fintech-patterns/SKILL.md +41 -0
  182. package/.mindforge/skills/flutter-architecture/SKILL.md +42 -0
  183. package/.mindforge/skills/gaming-backend/SKILL.md +41 -0
  184. package/.mindforge/skills/git-workflow-design/SKILL.md +129 -0
  185. package/.mindforge/skills/graceful-degradation/SKILL.md +95 -0
  186. package/.mindforge/skills/graphql-patterns/SKILL.md +243 -0
  187. package/.mindforge/skills/guardrails-and-safety/SKILL.md +137 -0
  188. package/.mindforge/skills/healthcare-systems/SKILL.md +40 -0
  189. package/.mindforge/skills/hiring-engineering/SKILL.md +119 -0
  190. package/.mindforge/skills/human-in-the-loop-design/SKILL.md +234 -0
  191. package/.mindforge/skills/i18n-architecture/SKILL.md +147 -0
  192. package/.mindforge/skills/idempotency-patterns/SKILL.md +84 -0
  193. package/.mindforge/skills/incident-communication/SKILL.md +96 -0
  194. package/.mindforge/skills/incident-management/SKILL.md +97 -0
  195. package/.mindforge/skills/infrastructure-as-code/SKILL.md +98 -0
  196. package/.mindforge/skills/instinct-clustering/SKILL.md +190 -0
  197. package/.mindforge/skills/internal-developer-platform/SKILL.md +51 -0
  198. package/.mindforge/skills/iot-platform/SKILL.md +41 -0
  199. package/.mindforge/skills/k8s-deployment/SKILL.md +358 -0
  200. package/.mindforge/skills/knowledge-graphs/SKILL.md +56 -0
  201. package/.mindforge/skills/knowledge-sharing-systems/SKILL.md +112 -0
  202. package/.mindforge/skills/llm-cost-optimization/SKILL.md +198 -0
  203. package/.mindforge/skills/llm-orchestration/SKILL.md +56 -0
  204. package/.mindforge/skills/load-testing/SKILL.md +84 -0
  205. package/.mindforge/skills/logistics-optimization/SKILL.md +40 -0
  206. package/.mindforge/skills/market-researcher/SKILL.md +99 -0
  207. package/.mindforge/skills/marketplace-trust/SKILL.md +40 -0
  208. package/.mindforge/skills/mcp-server-patterns/SKILL.md +264 -0
  209. package/.mindforge/skills/media-streaming/SKILL.md +41 -0
  210. package/.mindforge/skills/meeting-architecture/SKILL.md +146 -0
  211. package/.mindforge/skills/mentoring-patterns/SKILL.md +77 -0
  212. package/.mindforge/skills/microservices-patterns/SKILL.md +83 -0
  213. package/.mindforge/skills/migration-platform/SKILL.md +61 -0
  214. package/.mindforge/skills/migration-strategies/SKILL.md +129 -0
  215. package/.mindforge/skills/ml-feature-store/SKILL.md +56 -0
  216. package/.mindforge/skills/ml-monitoring/SKILL.md +42 -0
  217. package/.mindforge/skills/mobile-performance/SKILL.md +44 -0
  218. package/.mindforge/skills/mobile-security/SKILL.md +45 -0
  219. package/.mindforge/skills/model-evaluation/SKILL.md +53 -0
  220. package/.mindforge/skills/monorepo-management/SKILL.md +100 -0
  221. package/.mindforge/skills/multi-tenancy-patterns/SKILL.md +145 -0
  222. package/.mindforge/skills/multi-turn-conversation-design/SKILL.md +206 -0
  223. package/.mindforge/skills/multimodal-ai/SKILL.md +51 -0
  224. package/.mindforge/skills/mutation-testing/SKILL.md +97 -0
  225. package/.mindforge/skills/notification-system-design/SKILL.md +168 -0
  226. package/.mindforge/skills/observability-stack/SKILL.md +136 -0
  227. package/.mindforge/skills/offline-first-design/SKILL.md +43 -0
  228. package/.mindforge/skills/on-call-design/SKILL.md +111 -0
  229. package/.mindforge/skills/pagination-patterns/SKILL.md +230 -0
  230. package/.mindforge/skills/payment-integration/SKILL.md +176 -0
  231. package/.mindforge/skills/performance-reviews/SKILL.md +140 -0
  232. package/.mindforge/skills/platform-observability/SKILL.md +58 -0
  233. package/.mindforge/skills/platform-reliability/SKILL.md +52 -0
  234. package/.mindforge/skills/post-incident-learning/SKILL.md +96 -0
  235. package/.mindforge/skills/product-manager/SKILL.md +104 -0
  236. package/.mindforge/skills/progressive-web-app/SKILL.md +44 -0
  237. package/.mindforge/skills/prompt-engineering/SKILL.md +94 -0
  238. package/.mindforge/skills/proofreader/SKILL.md +158 -0
  239. package/.mindforge/skills/push-notification-architecture/SKILL.md +45 -0
  240. package/.mindforge/skills/python-performance/SKILL.md +183 -0
  241. package/.mindforge/skills/quality-audit/SKILL.md +171 -0
  242. package/.mindforge/skills/queue-design/SKILL.md +85 -0
  243. package/.mindforge/skills/rag-architecture/SKILL.md +176 -0
  244. package/.mindforge/skills/rate-limiting-design/SKILL.md +94 -0
  245. package/.mindforge/skills/react-native-patterns/SKILL.md +42 -0
  246. package/.mindforge/skills/react-performance/SKILL.md +229 -0
  247. package/.mindforge/skills/real-time-analytics/SKILL.md +42 -0
  248. package/.mindforge/skills/real-time-sync/SKILL.md +83 -0
  249. package/.mindforge/skills/responsive-native/SKILL.md +44 -0
  250. package/.mindforge/skills/responsive-patterns/SKILL.md +141 -0
  251. package/.mindforge/skills/rfc-pipeline/SKILL.md +114 -0
  252. package/.mindforge/skills/saas-multi-tenant/SKILL.md +41 -0
  253. package/.mindforge/skills/santa-method/SKILL.md +134 -0
  254. package/.mindforge/skills/search-implementation/SKILL.md +98 -0
  255. package/.mindforge/skills/secrets-platform/SKILL.md +56 -0
  256. package/.mindforge/skills/secrets-rotation/SKILL.md +173 -0
  257. package/.mindforge/skills/self-serve-infrastructure/SKILL.md +51 -0
  258. package/.mindforge/skills/serverless-patterns/SKILL.md +119 -0
  259. package/.mindforge/skills/skill-creator-meta/SKILL.md +146 -0
  260. package/.mindforge/skills/sprint-retrospective-facilitation/SKILL.md +112 -0
  261. package/.mindforge/skills/stakeholder-communication/SKILL.md +85 -0
  262. package/.mindforge/skills/state-management/SKILL.md +104 -0
  263. package/.mindforge/skills/stream-processing/SKILL.md +43 -0
  264. package/.mindforge/skills/streaming-architecture/SKILL.md +81 -0
  265. package/.mindforge/skills/supply-chain-security/SKILL.md +145 -0
  266. package/.mindforge/skills/synthetic-data-generation/SKILL.md +52 -0
  267. package/.mindforge/skills/system-design/SKILL.md +88 -0
  268. package/.mindforge/skills/team-topology-design/SKILL.md +107 -0
  269. package/.mindforge/skills/technical-debt-management/SKILL.md +86 -0
  270. package/.mindforge/skills/technical-interview-design/SKILL.md +98 -0
  271. package/.mindforge/skills/technical-leadership/SKILL.md +75 -0
  272. package/.mindforge/skills/technical-writing/SKILL.md +237 -0
  273. package/.mindforge/skills/technology-radar/SKILL.md +88 -0
  274. package/.mindforge/skills/testing-anti-patterns/SKILL.md +288 -0
  275. package/.mindforge/skills/tool-design/SKILL.md +138 -0
  276. package/.mindforge/skills/typescript-advanced/SKILL.md +198 -0
  277. package/.mindforge/skills/using-git-worktrees/SKILL.md +139 -0
  278. package/.mindforge/skills/verification-loop/SKILL.md +13 -1
  279. package/.mindforge/skills/vibe-security/SKILL.md +165 -0
  280. package/.mindforge/skills/visual-regression-testing/SKILL.md +97 -0
  281. package/.mindforge/skills/websocket-patterns/SKILL.md +203 -0
  282. package/.mindforge/skills/writing-plans/SKILL.md +170 -0
  283. package/.mindforge/skills/writing-skills/SKILL.md +216 -0
  284. package/.mindforge/skills/zero-trust-architecture/SKILL.md +166 -0
  285. package/CHANGELOG.md +240 -0
  286. package/MINDFORGE.md +4 -4
  287. package/README.md +49 -4
  288. package/RELEASENOTES.md +80 -0
  289. package/SECURITY.md +20 -8
  290. package/bin/autonomous/audit-writer.js +13 -0
  291. package/bin/autonomous/auto-runner.js +74 -16
  292. package/bin/autonomous/context-refactorer.js +26 -11
  293. package/bin/autonomous/state-manager.js +62 -6
  294. package/bin/autonomous/stuck-monitor.js +46 -7
  295. package/bin/autonomous/wave-executor.js +66 -25
  296. package/bin/dashboard/api-router.js +43 -0
  297. package/bin/dashboard/metrics-aggregator.js +28 -1
  298. package/bin/dashboard/server.js +67 -4
  299. package/bin/dashboard/sse-bridge.js +4 -4
  300. package/bin/engine/feedback-loop.js +8 -0
  301. package/bin/engine/intelligence-interlock.js +32 -15
  302. package/bin/engine/logic-drift-detector.js +2 -1
  303. package/bin/engine/nexus-tracer.js +3 -2
  304. package/bin/engine/remediation-engine.js +155 -32
  305. package/bin/engine/self-corrective-synthesizer.js +84 -10
  306. package/bin/engine/sre-manager.js +12 -4
  307. package/bin/engine/temporal-hub.js +131 -34
  308. package/bin/governance/approve.js +41 -5
  309. package/bin/governance/impact-analyzer.js +28 -0
  310. package/bin/governance/policy-engine.js +10 -3
  311. package/bin/governance/quantum-crypto.js +32 -19
  312. package/bin/governance/rbac-manager.js +74 -2
  313. package/bin/governance/ztai-manager.js +49 -7
  314. package/bin/hindsight-injector.js +3 -3
  315. package/bin/memory/eis-client.js +71 -34
  316. package/bin/memory/embedding-engine.js +61 -0
  317. package/bin/memory/knowledge-graph.js +58 -5
  318. package/bin/memory/knowledge-indexer.js +53 -6
  319. package/bin/memory/knowledge-store.js +22 -0
  320. package/bin/migrations/10.7.0-to-11.0.0.js +110 -0
  321. package/bin/migrations/schema-versions.js +13 -0
  322. package/bin/models/anthropic-provider.js +45 -0
  323. package/bin/models/cloud-broker.js +68 -20
  324. package/bin/models/gemini-provider.js +51 -0
  325. package/bin/models/model-client.js +20 -0
  326. package/bin/models/model-router.js +28 -8
  327. package/bin/models/openai-provider.js +44 -0
  328. package/bin/utils/file-io.js +63 -1
  329. package/bin/utils/index.js +58 -0
  330. package/docs/getting-started.md +1 -1
  331. package/docs/user-guide.md +2 -2
  332. package/package.json +2 -2
  333. package/.mindforge/personas/data-privacy-engineer.md +0 -187
@@ -71,6 +71,19 @@ const SCHEMA_HISTORY = [
71
71
  'Plugin API version upgraded to 2.0.0',
72
72
  ],
73
73
  },
74
+ {
75
+ version: '11.0.0',
76
+ date: '2026-05-28',
77
+ description: 'v11.0.0 - Persona Expansion: temporal config, rate limiting, wave execution, audit archival',
78
+ handoff_fields_added: [],
79
+ handoff_fields_removed: [],
80
+ audit_fields_added: [],
81
+ breaking: [
82
+ 'config.json gains temporal, rate_limiting, session, wave_execution sections',
83
+ 'AUDIT.jsonl auto-archived if exceeding 5000 lines',
84
+ 'MINDFORGE.md VERSION format drops suffix (was X.Y.Z-SUFFIX, now X.Y.Z)',
85
+ ],
86
+ },
74
87
  ];
75
88
 
76
89
  module.exports = { SCHEMA_HISTORY };
@@ -72,6 +72,51 @@ class AnthropicProvider {
72
72
  req.end();
73
73
  });
74
74
  }
75
+
76
+ async streamComplete(messages, options = {}) {
77
+ const model = options.model || 'claude-sonnet-4-6';
78
+ const maxTokens = options.maxTokens || 4096;
79
+
80
+ const data = JSON.stringify({
81
+ model,
82
+ messages,
83
+ max_tokens: maxTokens,
84
+ stream: true,
85
+ });
86
+
87
+ return new Promise((resolve, reject) => {
88
+ const req = https.request({
89
+ hostname: 'api.anthropic.com',
90
+ path: '/v1/messages',
91
+ method: 'POST',
92
+ headers: {
93
+ 'Content-Type': 'application/json',
94
+ 'x-api-key': this.apiKey,
95
+ 'anthropic-version': '2023-06-01',
96
+ 'Content-Length': Buffer.byteLength(data),
97
+ },
98
+ timeout: 300_000,
99
+ }, res => {
100
+ if (res.statusCode !== 200) {
101
+ let body = '';
102
+ res.on('data', chunk => body += chunk);
103
+ res.on('end', () => {
104
+ reject(new Error(`Anthropic streaming failed: ${res.statusCode}`));
105
+ });
106
+ return;
107
+ }
108
+ resolve(res);
109
+ });
110
+
111
+ req.on('error', reject);
112
+ req.on('timeout', () => {
113
+ req.destroy();
114
+ reject(new Error('Anthropic stream timeout'));
115
+ });
116
+ req.write(data);
117
+ req.end();
118
+ });
119
+ }
75
120
  }
76
121
 
77
122
  module.exports = AnthropicProvider;
@@ -7,17 +7,37 @@
7
7
  const fs = require('fs');
8
8
  const path = require('path');
9
9
 
10
+ // Per-provider latency ring buffer (last 10 calls)
11
+ const latencyHistory = new Map();
12
+
13
+ function recordLatency(provider, durationMs) {
14
+ if (!latencyHistory.has(provider)) {
15
+ latencyHistory.set(provider, []);
16
+ }
17
+ const history = latencyHistory.get(provider);
18
+ history.push(durationMs);
19
+ if (history.length > 10) history.shift();
20
+ }
21
+
22
+ function getP95Latency(provider) {
23
+ const history = latencyHistory.get(provider);
24
+ if (!history || history.length === 0) return 500;
25
+ const sorted = [...history].sort((a, b) => a - b);
26
+ const idx = Math.ceil(sorted.length * 0.95) - 1;
27
+ return sorted[Math.min(idx, sorted.length - 1)];
28
+ }
29
+
10
30
  class CloudBroker {
11
31
  constructor(config = {}) {
12
32
  this.providers = config.providers || ['anthropic', 'google', 'aws', 'azure'];
13
33
  this.statsPath = config.statsPath || path.join(__dirname, 'performance-stats.json');
14
- this.blacklist = new Map(); // provider -> expiry (Date)
15
- this.failureWindow = new Map(); // provider:taskType -> count
34
+ this.blacklist = new Map();
35
+ this.failureWindow = new Map();
16
36
  this.state = {
17
- 'anthropic': { latency: 450, costMultiplier: 1.0, healthy: true },
18
- 'google': { latency: 600, costMultiplier: 0.85, healthy: true },
19
- 'aws': { latency: 550, costMultiplier: 0.95, healthy: true },
20
- 'azure': { latency: 650, costMultiplier: 1.1, healthy: true }
37
+ 'anthropic': { costMultiplier: 1.0, healthy: true },
38
+ 'google': { costMultiplier: 0.85, healthy: true },
39
+ 'aws': { costMultiplier: 0.95, healthy: true },
40
+ 'azure': { costMultiplier: 1.1, healthy: true }
21
41
  };
22
42
  this.reloadStats();
23
43
  }
@@ -71,21 +91,20 @@ class CloudBroker {
71
91
  return true;
72
92
  })
73
93
  .map(([id, data]) => {
74
- // Calculate Success Probability for this task
75
94
  const stats = this.performanceStats[id]?.[taskType] || { success: 1, failure: 0 };
76
95
  const totalTasks = stats.success + stats.failure;
77
96
  const successProb = totalTasks > 0 ? (stats.success / totalTasks) : 0.5;
78
97
 
79
- // Score Calculation (The "Affinity" Algorithm)
80
98
  const latencyWeight = 0.2;
81
99
  const costWeight = 0.3;
82
- const affinityWeight = 0.5;
100
+ const affinityWeight = 0.5;
83
101
 
84
- const score = (data.latency * latencyWeight) +
85
- (data.costMultiplier * 1000 * costWeight) +
102
+ const providerLatency = getP95Latency(id);
103
+ const score = (providerLatency * latencyWeight) +
104
+ (data.costMultiplier * 1000 * costWeight) +
86
105
  ((1.0 - successProb) * 2000 * affinityWeight);
87
106
 
88
- return { id, score, successProb: successProb.toFixed(2) };
107
+ return { id, score, successProb: successProb.toFixed(2), p95: providerLatency };
89
108
  });
90
109
 
91
110
  scored.sort((a, b) => a.score - b.score);
@@ -110,7 +129,7 @@ class CloudBroker {
110
129
 
111
130
  const fallback = Object.entries(this.state)
112
131
  .filter(([id, data]) => id !== failedProvider && data.healthy)
113
- .sort((a, b) => a[1].latency - b[1].latency)[0];
132
+ .sort((a, b) => getP95Latency(a[0]) - getP95Latency(b[0]))[0];
114
133
 
115
134
  return fallback ? fallback[0] : 'google'; // Default fallback
116
135
  }
@@ -130,33 +149,62 @@ class CloudBroker {
130
149
  return mappings[provider]?.[modelGroup] || mappings[provider]?.['sonnet'];
131
150
  }
132
151
 
152
+ /**
153
+ * Removes failure entries whose sliding window (5 min) has expired.
154
+ */
155
+ _pruneStaleFailures() {
156
+ const now = Date.now();
157
+ const WINDOW_MS = 5 * 60 * 1000;
158
+
159
+ for (const [key, entry] of this.failureWindow.entries()) {
160
+ if (now - entry.firstFailureAt > WINDOW_MS) {
161
+ this.failureWindow.delete(key);
162
+ }
163
+ }
164
+ }
165
+
133
166
  /**
134
167
  * Records a task failure and manages the circuit breaker.
135
168
  */
136
169
  recordFailure(provider, taskType = 'default') {
137
- const key = `${provider}:${taskType}`;
138
- const failures = (this.failureWindow.get(key) || 0) + 1;
139
- this.failureWindow.set(key, failures);
170
+ this._pruneStaleFailures();
140
171
 
141
- if (failures >= 3) {
142
- const expiry = new Date(Date.now() + 10 * 60 * 1000); // 10 min blacklist
172
+ const key = `${provider}:${taskType}`;
173
+ const existing = this.failureWindow.get(key);
174
+ const entry = existing
175
+ ? { count: existing.count + 1, firstFailureAt: existing.firstFailureAt }
176
+ : { count: 1, firstFailureAt: Date.now() };
177
+ this.failureWindow.set(key, entry);
178
+
179
+ if (entry.count >= 3) {
180
+ const expiry = new Date(Date.now() + 10 * 60 * 1000);
143
181
  this.blacklist.set(provider, expiry);
144
182
  console.warn(`[MCA-CIRCUIT-OPEN] Provider '${provider}' blacklisted for 10 min due to consecutive failures on '${taskType}'.`);
145
- this.failureWindow.set(key, 0); // Reset window upon blacklisting
183
+ this.failureWindow.delete(key);
146
184
  }
147
185
  }
148
186
 
149
187
  /**
150
188
  * Hardening: Simulate provider failures to verify Fallback Protocol.
151
189
  */
190
+ recordLatency(provider, durationMs) {
191
+ recordLatency(provider, durationMs);
192
+ }
193
+
194
+ getP95Latency(provider) {
195
+ return getP95Latency(provider);
196
+ }
197
+
152
198
  startChaosMode() {
153
199
  console.log('[ENTERPRISE-RESILIENCE] CloudBroker Chaos Mode ACTIVE. Simulating jitter and provider dropouts...');
154
200
  setInterval(() => {
155
201
  const providers = Object.keys(this.state);
156
202
  const randomProvider = providers[Math.floor(Math.random() * providers.length)];
157
- this.state[randomProvider].latency = Math.random() > 0.7 ? 5000 : 100;
203
+ recordLatency(randomProvider, Math.random() > 0.7 ? 5000 : 100);
158
204
  }, 10000);
159
205
  }
160
206
  }
161
207
 
162
208
  module.exports = CloudBroker;
209
+ module.exports.recordLatency = recordLatency;
210
+ module.exports.getP95Latency = getP95Latency;
@@ -74,6 +74,57 @@ class GeminiProvider {
74
74
  req.end();
75
75
  });
76
76
  }
77
+
78
+ async streamComplete(messages, options = {}) {
79
+ const model = options.model || 'gemini-2.5-pro';
80
+ const maxTokens = options.maxTokens || 8192;
81
+
82
+ const contents = messages.map(msg => ({
83
+ role: msg.role === 'assistant' ? 'model' : 'user',
84
+ parts: [{ text: msg.content }],
85
+ }));
86
+
87
+ const data = JSON.stringify({
88
+ contents,
89
+ generationConfig: {
90
+ maxOutputTokens: maxTokens,
91
+ },
92
+ });
93
+
94
+ const modelId = model.startsWith('models/') ? model : `models/${model}`;
95
+
96
+ return new Promise((resolve, reject) => {
97
+ const req = https.request({
98
+ hostname: 'generativelanguage.googleapis.com',
99
+ path: `/v1beta/${modelId}:streamGenerateContent?alt=sse`,
100
+ method: 'POST',
101
+ headers: {
102
+ 'Content-Type': 'application/json',
103
+ 'x-goog-api-key': this.apiKey,
104
+ 'Content-Length': Buffer.byteLength(data),
105
+ },
106
+ timeout: 300_000,
107
+ }, res => {
108
+ if (res.statusCode !== 200) {
109
+ let body = '';
110
+ res.on('data', chunk => body += chunk);
111
+ res.on('end', () => {
112
+ reject(new Error(`Gemini streaming failed: ${res.statusCode}`));
113
+ });
114
+ return;
115
+ }
116
+ resolve(res);
117
+ });
118
+
119
+ req.on('error', reject);
120
+ req.on('timeout', () => {
121
+ req.destroy();
122
+ reject(new Error('Gemini stream timeout'));
123
+ });
124
+ req.write(data);
125
+ req.end();
126
+ });
127
+ }
77
128
  }
78
129
 
79
130
  module.exports = GeminiProvider;
@@ -82,6 +82,26 @@ class ModelClient {
82
82
  }
83
83
  }
84
84
 
85
+ static async streamComplete(params) {
86
+ const {
87
+ persona = 'developer',
88
+ tier = 1,
89
+ messages,
90
+ maxTokens,
91
+ taskName = 'unknown',
92
+ } = params;
93
+
94
+ const routing = Router.route(persona, tier);
95
+ const modelId = routing.model;
96
+ const provider = this._getProvider(modelId);
97
+
98
+ if (!provider || !provider.streamComplete) {
99
+ throw new Error(`Streaming not supported for model: ${modelId}`);
100
+ }
101
+
102
+ return provider.streamComplete(messages, { ...params, model: modelId });
103
+ }
104
+
85
105
  static _getProvider(modelId) {
86
106
  if (modelId.startsWith('claude') || modelId.startsWith('anthropic.claude')) {
87
107
  if (!process.env.ANTHROPIC_API_KEY) return null;
@@ -36,15 +36,13 @@ const PERSONA_MAP = {
36
36
  };
37
37
 
38
38
  let _settingsCache = null;
39
+ let _settingsMtime = 0;
40
+ const CACHE_CHECK_INTERVAL_MS = 60000;
41
+ let _lastCacheCheck = 0;
39
42
 
40
- function readMindforgeSettings() {
41
- if (_settingsCache) return _settingsCache;
42
- const configPath = path.join(process.cwd(), 'MINDFORGE.md');
43
- if (!fs.existsSync(configPath)) return DEFAULTS;
44
-
45
- const content = fs.readFileSync(configPath, 'utf8');
43
+ function parseSettings(filePath) {
44
+ const content = fs.readFileSync(filePath, 'utf8');
46
45
  const settings = { ...DEFAULTS };
47
-
48
46
  const lines = content.split('\n');
49
47
  for (const line of lines) {
50
48
  const match = line.match(/^([A-Z0-9_]+)=(.*)$/);
@@ -52,10 +50,30 @@ function readMindforgeSettings() {
52
50
  settings[match[1]] = match[2].trim();
53
51
  }
54
52
  }
55
- _settingsCache = settings;
56
53
  return settings;
57
54
  }
58
55
 
56
+ function readMindforgeSettings() {
57
+ const now = Date.now();
58
+ if (now - _lastCacheCheck < CACHE_CHECK_INTERVAL_MS && _settingsCache) {
59
+ return _settingsCache;
60
+ }
61
+ _lastCacheCheck = now;
62
+
63
+ const configPath = path.join(process.cwd(), 'MINDFORGE.md');
64
+ try {
65
+ const stat = fs.statSync(configPath);
66
+ if (stat.mtimeMs !== _settingsMtime) {
67
+ _settingsMtime = stat.mtimeMs;
68
+ _settingsCache = parseSettings(configPath);
69
+ }
70
+ } catch {
71
+ if (!_settingsCache) _settingsCache = { ...DEFAULTS };
72
+ }
73
+
74
+ return _settingsCache;
75
+ }
76
+
59
77
  function route(persona = 'developer', tier = 1) {
60
78
  const settings = readMindforgeSettings();
61
79
 
@@ -105,6 +123,8 @@ function getModel(settingKey) {
105
123
 
106
124
  function clearCache() {
107
125
  _settingsCache = null;
126
+ _settingsMtime = 0;
127
+ _lastCacheCheck = 0;
108
128
  }
109
129
 
110
130
  function getAllSettings() {
@@ -73,6 +73,50 @@ class OpenAIProvider {
73
73
  req.end();
74
74
  });
75
75
  }
76
+
77
+ async streamComplete(messages, options = {}) {
78
+ const model = options.model || 'gpt-4o';
79
+ const maxTokens = options.maxTokens || 4096;
80
+
81
+ const data = JSON.stringify({
82
+ model,
83
+ messages,
84
+ max_tokens: maxTokens,
85
+ stream: true,
86
+ });
87
+
88
+ return new Promise((resolve, reject) => {
89
+ const req = https.request({
90
+ hostname: 'api.openai.com',
91
+ path: '/v1/chat/completions',
92
+ method: 'POST',
93
+ headers: {
94
+ 'Content-Type': 'application/json',
95
+ 'Authorization': `Bearer ${this.apiKey}`,
96
+ 'Content-Length': Buffer.byteLength(data),
97
+ },
98
+ timeout: 300_000,
99
+ }, res => {
100
+ if (res.statusCode !== 200) {
101
+ let body = '';
102
+ res.on('data', chunk => body += chunk);
103
+ res.on('end', () => {
104
+ reject(new Error(`OpenAI streaming failed: ${res.statusCode}`));
105
+ });
106
+ return;
107
+ }
108
+ resolve(res);
109
+ });
110
+
111
+ req.on('error', reject);
112
+ req.on('timeout', () => {
113
+ req.destroy();
114
+ reject(new Error('OpenAI stream timeout'));
115
+ });
116
+ req.write(data);
117
+ req.end();
118
+ });
119
+ }
76
120
  }
77
121
 
78
122
  module.exports = OpenAIProvider;
@@ -4,6 +4,7 @@ const fs = require('fs');
4
4
  const fsp = require('fs/promises');
5
5
  const path = require('path');
6
6
  const crypto = require('crypto');
7
+ const zlib = require('zlib');
7
8
 
8
9
  class AuditWriter {
9
10
  constructor(filePath) {
@@ -99,4 +100,65 @@ function readJSONSync(filePath) {
99
100
  }
100
101
  }
101
102
 
102
- module.exports = { AuditWriter, readJSON, writeJSON, readJSONL, readJSONSync };
103
+ function atomicWriteJSON(filePath, data) {
104
+ const tmpPath = filePath + '.tmp.' + process.pid;
105
+ const content = JSON.stringify(data, null, 2) + '\n';
106
+ const fd = fs.openSync(tmpPath, 'w');
107
+ fs.writeSync(fd, content);
108
+ fs.fsyncSync(fd);
109
+ fs.closeSync(fd);
110
+ fs.renameSync(tmpPath, filePath);
111
+ }
112
+
113
+ async function atomicWriteJSONAsync(filePath, data) {
114
+ const tmpPath = filePath + '.tmp.' + process.pid;
115
+ const content = JSON.stringify(data, null, 2) + '\n';
116
+ const fh = await fsp.open(tmpPath, 'w');
117
+ await fh.write(content);
118
+ await fh.sync();
119
+ await fh.close();
120
+ await fsp.rename(tmpPath, filePath);
121
+ }
122
+
123
+ class AuditRotator {
124
+ constructor(options = {}) {
125
+ this.maxLines = options.maxLines || 5000;
126
+ }
127
+
128
+ shouldRotate(filePath) {
129
+ if (!fs.existsSync(filePath)) return false;
130
+ const content = fs.readFileSync(filePath, 'utf8');
131
+ const lineCount = content.split('\n').filter(l => l.trim()).length;
132
+ return lineCount >= this.maxLines;
133
+ }
134
+
135
+ rotate(filePath, archiveDir) {
136
+ const dir = archiveDir || path.join(path.dirname(filePath), '..', 'audit-archive');
137
+ if (!fs.existsSync(dir)) {
138
+ fs.mkdirSync(dir, { recursive: true });
139
+ }
140
+
141
+ const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
142
+ const baseName = path.basename(filePath, path.extname(filePath));
143
+ const archiveName = `${baseName}-${timestamp}.jsonl.gz`;
144
+ const archivePath = path.join(dir, archiveName);
145
+
146
+ // Crash-safe: write archive FIRST, then truncate source
147
+ const content = fs.readFileSync(filePath);
148
+ const compressed = zlib.gzipSync(content);
149
+ fs.writeFileSync(archivePath, compressed);
150
+
151
+ const lines = content.toString('utf8').split('\n').filter(l => l.trim());
152
+ const carryover = lines.slice(-100).join('\n') + '\n';
153
+ const tmpPath = filePath + '.tmp.' + process.pid;
154
+ const fd = fs.openSync(tmpPath, 'w');
155
+ fs.writeSync(fd, carryover);
156
+ fs.fsyncSync(fd);
157
+ fs.closeSync(fd);
158
+ fs.renameSync(tmpPath, filePath);
159
+
160
+ return archivePath;
161
+ }
162
+ }
163
+
164
+ module.exports = { AuditWriter, AuditRotator, readJSON, writeJSON, readJSONL, readJSONSync, atomicWriteJSON, atomicWriteJSONAsync };
@@ -1,5 +1,63 @@
1
1
  'use strict';
2
+
3
+ class LRUMap {
4
+ constructor(maxSize, options = {}) {
5
+ this._max = maxSize;
6
+ this._onEvict = options.onEvict || null;
7
+ this._map = new Map();
8
+ }
9
+
10
+ get(key) {
11
+ if (!this._map.has(key)) return undefined;
12
+ const value = this._map.get(key);
13
+ this._map.delete(key);
14
+ this._map.set(key, value);
15
+ return value;
16
+ }
17
+
18
+ set(key, value) {
19
+ if (this._map.has(key)) {
20
+ this._map.delete(key);
21
+ } else if (this._map.size >= this._max) {
22
+ const oldest = this._map.keys().next().value;
23
+ const oldestValue = this._map.get(oldest);
24
+ this._map.delete(oldest);
25
+ if (this._onEvict) this._onEvict(oldest, oldestValue);
26
+ }
27
+ this._map.set(key, value);
28
+ }
29
+
30
+ has(key) {
31
+ return this._map.has(key);
32
+ }
33
+
34
+ delete(key) {
35
+ return this._map.delete(key);
36
+ }
37
+
38
+ clear() {
39
+ this._map.clear();
40
+ }
41
+
42
+ get size() {
43
+ return this._map.size;
44
+ }
45
+
46
+ keys() {
47
+ return this._map.keys();
48
+ }
49
+
50
+ values() {
51
+ return this._map.values();
52
+ }
53
+
54
+ entries() {
55
+ return this._map.entries();
56
+ }
57
+ }
58
+
2
59
  module.exports = {
60
+ LRUMap,
3
61
  ...require('./paths'),
4
62
  ...require('./file-io'),
5
63
  ...require('./errors')
@@ -1,4 +1,4 @@
1
- # MindForge — Getting Started (v10.0.1)
1
+ # MindForge — Getting Started (v11.0.0)
2
2
 
3
3
  This guide gets you from zero to a working MindForge project in under five minutes.
4
4
 
@@ -1,4 +1,4 @@
1
- # MindForge User Guide (v10.0.1)
1
+ # MindForge User Guide (v11.0.0)
2
2
 
3
3
  This guide gets you from install to productive, with the minimum needed to run MindForge in a real project.
4
4
 
@@ -136,7 +136,7 @@ Observe your agent waves, token spend, and milestone progress in real-time.
136
136
 
137
137
  The dashboard provides a premium web interface at `http://localhost:7339`.
138
138
 
139
- > **Authentication (v10.0.1+):** The dashboard now requires a bearer token for access. The token is printed to the console at startup. Pass it in the `Authorization` header or use the login prompt in the browser UI.
139
+ > **Authentication (v11.0.0+):** The dashboard now requires a bearer token for access. The token is printed to the console at startup. Pass it in the `Authorization` header or use the login prompt in the browser UI.
140
140
 
141
141
  ---
142
142
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mindforge-cc",
3
- "version": "10.0.3",
4
- "description": "MindForge Sovereign Agentic Intelligence Framework. Bedrock Fortified: Production-Grade Architecture (v10)",
3
+ "version": "11.0.0",
4
+ "description": "MindForge \u2014 Sovereign Agentic Intelligence Framework. Sovereign Stability: Production-Hardened Agentic Intelligence (v11)",
5
5
  "bin": {
6
6
  "mindforge-cc": "bin/install.js",
7
7
  "mindforge": "bin/mindforge-cli.js"