Muonroi.RuleEngine.Proliferation
1.0.0-alpha.16
dotnet add package Muonroi.RuleEngine.Proliferation --version 1.0.0-alpha.16
NuGet\Install-Package Muonroi.RuleEngine.Proliferation -Version 1.0.0-alpha.16
<PackageReference Include="Muonroi.RuleEngine.Proliferation" Version="1.0.0-alpha.16" />
<PackageVersion Include="Muonroi.RuleEngine.Proliferation" Version="1.0.0-alpha.16" />
<PackageReference Include="Muonroi.RuleEngine.Proliferation" />
paket add Muonroi.RuleEngine.Proliferation --version 1.0.0-alpha.16
#r "nuget: Muonroi.RuleEngine.Proliferation, 1.0.0-alpha.16"
#:package Muonroi.RuleEngine.Proliferation@1.0.0-alpha.16
#addin nuget:?package=Muonroi.RuleEngine.Proliferation&version=1.0.0-alpha.16&prerelease
#tool nuget:?package=Muonroi.RuleEngine.Proliferation&version=1.0.0-alpha.16&prerelease
Muonroi.RuleEngine.Proliferation
AI-driven neuron scenario generation and execution for the Muonroi RuleEngine — automatically proliferates test and simulation scenarios from your live rule set using Ollama, OpenAI, or Claude.
The Proliferation Engine connects to a running Muonroi.RuleEngine.Runtime instance and uses a configurable AI brain to analyse your rule set, generate NeuronScenario objects that cover untested paths, and execute them automatically via a ProliferationWorker hosted service. Scenarios, results, and rule lineage are persisted through IProliferationStore — defaulting to an in-memory store; swap to Postgres by adding Muonroi.RuleEngine.Proliferation.Persistence.
Installation
dotnet add package Muonroi.RuleEngine.Proliferation --prerelease
Quick Start
using Muonroi.Integration.Connectors.Registration;
using Muonroi.RuleEngine.Proliferation;
// IServiceTaskConnector is required by ExternalScenarioExecutor.
// AddMBuiltInConnectors() provides it. Register a standalone config
// provider so every scenario routes to the internal executor.
builder.Services.AddMBuiltInConnectors();
builder.Services.AddSingleton<IExternalProjectConfigProvider,
StandaloneExternalProjectConfigProvider>();
// Register the AI scenario-generation stack:
// brain provider (Ollama / OpenAI / Claude per ProliferationOptions),
// prompt builder, deduplicators, budget allocator, scenario executors,
// and the ProliferationWorker hosted service.
// Defaults to InMemoryProliferationStore.
builder.Services.AddMProliferationEngine(builder.Configuration);
appsettings.json — brain selection and key tunables:
{
"Proliferation": {
"BrainProvider": "ollama",
"OllamaEndpoint": "http://127.0.0.1:11434",
"PrimaryModel": "qwen2.5-coder:14b-instruct-q5_K_M",
"AiTimeoutSeconds": 60,
"EnableSemanticDedup": false,
"EnableInfraAwareBudget": false
}
}
Once running, ProliferationWorker polls every WorkerIntervalSeconds (default 300 s), calls IRuleProliferationBrain.AnalyzeAsync, and hands new NeuronScenario objects to IScenarioExecutor.
Features
- Pluggable AI brain — built-in
OllamaProliferationBrain,OpenAiProliferationBrain, andClaudeProliferationBrain; swap viaBrainProviderconfig key. - Composite brain mode — chain multiple providers in
parallelorsequentialorder viaCompositeBrains+CompositeMode. - Failure feedback loop —
DefaultFailureAnalyzerdrives additional scenario generation from execution failures whenEnableFailureFeedbackis true. - Semantic deduplication —
VectorSemanticDeduplicator(backed byOllamaEmbedder) prevents near-duplicate scenarios whenEnableSemanticDedupis true. - Hash deduplication —
InputHashDeduplicatoris always active as the base deduplication layer. - Chaos mode —
DefaultChaosScenarioGeneratorgenerates adversarial edge-case scenarios whenEnableChaosModeis true. - Coverage-weighted budget —
CoverageWeightedBudgetAllocatordirects generation budget towards uncovered rule paths whenEnableSmartBudgetis true. - Infrastructure-aware budget —
InfraHealthMonitordynamically scales the budget based on measured endpoint latency whenEnableInfraAwareBudgetis true. - Continuous simulation — autonomous run loop (interval, batch size, and strategy are configurable) when
EnableContinuousModeis true. - Auto-trigger — re-proliferates automatically after rule-set changes (debounced) when
EnableAutoTriggeris true. - Multi-tenant simulation — routes scenarios per configured
SimulatedTenantIdswhenEnableMultiTenantSimulationis true. - External project routing —
RoutingScenarioExecutordelegates toExternalScenarioExecutorwith mTLS, OAuth2, and API-key auth when a control-planeIExternalProjectConfigProvideris present. - Natural language rule conversion —
NaturalLanguageRuleConvertertranslates plain-text rule descriptions to structured rule JSON via the configured brain. - Regression runner —
DefaultRegressionRunnerre-executes historical scenarios to guard against regressions. - Webhook notifications — optional
IWebhookNotificationServicedelivers lifecycle events to external consumers. - Pluggable persistence —
IProliferationStoredefaults toInMemoryProliferationStore; replace withMuonroi.RuleEngine.Proliferation.Persistencefor Postgres-backed durability.
Configuration
All options are bound from the "Proliferation" configuration section (ProliferationOptions.SectionName).
| Key | Default | Description |
|---|---|---|
BrainProvider |
"ollama" |
AI backend: ollama, openai, or claude |
OllamaEndpoint |
"http://127.0.0.1:11434" |
Ollama base URL |
PrimaryModel |
"qwen2.5-coder:14b-instruct-q5_K_M" |
Primary Ollama model |
FallbackModel |
"qwen2.5-coder:7b-instruct-q5_K_M" |
Fallback Ollama model |
OpenAiEndpoint |
"https://api.openai.com" |
OpenAI base URL |
OpenAiApiKey |
"" |
OpenAI API key |
OpenAiModel |
"gpt-4o-mini" |
OpenAI model |
ClaudeEndpoint |
"https://api.anthropic.com" |
Anthropic API base URL |
ClaudeApiKey |
"" |
Anthropic API key |
ClaudeModel |
"claude-haiku-4-5-20251001" |
Claude model |
CompositeBrains |
null |
Comma-separated brain names to chain |
CompositeMode |
"parallel" |
parallel or sequential |
MaxScenariosPerRule |
20 |
Scenario cap per seed rule |
MaxTotalScenarios |
500 |
Total scenario cap |
WorkerIntervalSeconds |
300 |
Worker poll interval |
AiTimeoutSeconds |
120 |
Per-request AI timeout |
Temperature |
0.7 |
Generative sampling temperature |
EnableFailureFeedback |
true |
Generate additional scenarios from failures |
EnableSemanticDedup |
false |
Vector-based semantic deduplication |
SemanticDedupThreshold |
0.85 |
Cosine similarity threshold for dedup |
EnableChaosMode |
false |
Chaos scenario generation |
EnableSmartBudget |
false |
Coverage-weighted budget allocation |
EnableInfraAwareBudget |
false |
Latency-aware dynamic budget scaling |
EnableContinuousMode |
false |
Continuous autonomous simulation loop |
EnableAutoTrigger |
false |
Auto-proliferate on rule-set changes |
EnableMultiTenantSimulation |
false |
Per-tenant scenario routing |
API Reference
| Type | Purpose |
|---|---|
ProliferationServiceCollectionExtensions.AddMProliferationEngine |
Registers all engine services and the ProliferationWorker hosted service |
ProliferationOptions |
Bound from "Proliferation" section; controls brain selection, limits, and feature flags |
IRuleProliferationBrain |
Analyses a rule set and returns a ProliferationPlan of generated scenarios |
IScenarioExecutor |
Executes a single NeuronScenario and returns a ScenarioResult |
IProliferationStore |
Persists scenarios, results, lineage, and aggregate stats |
IExternalProjectConfigProvider |
Resolves per-tenant external execution config; implement for control-plane integration |
IProliferationChangeNotifier |
Broadcasts lifecycle events (triggered, scenario completed) — implement for SignalR or webhooks |
IWebhookNotificationService |
Delivers HTTP webhook notifications for proliferation events |
IRuleProliferationBrain implementations |
OllamaProliferationBrain, OpenAiProliferationBrain, ClaudeProliferationBrain |
CompositeProliferationBrain |
Chains multiple brains in parallel or sequential mode |
IScenarioDeduplicator |
Deduplication contract; InputHashDeduplicator (hash) or VectorSemanticDeduplicator (semantic) |
ICoverageTracker / DefaultCoverageTracker |
Tracks which rule paths have been exercised |
IBudgetAllocator / CoverageWeightedBudgetAllocator |
Allocates generation budget toward coverage gaps |
INaturalLanguageRuleConverter |
Converts plain-text rule descriptions to structured rule JSON via the brain |
IChaosScenarioGenerator / DefaultChaosScenarioGenerator |
Generates adversarial edge-case scenarios |
IRegressionRunner / DefaultRegressionRunner |
Re-executes historical scenarios to detect regressions |
IAuthStrategyResolver |
Resolves the auth strategy (mTLS, OAuth2, API key) for external project calls |
IOAuth2TokenProvider / CachingOAuth2TokenProvider |
Fetches and caches OAuth2 tokens for external executor |
IMtlsHttpClientFactory / MtlsHttpClientFactory |
Creates mTLS-configured HttpClient instances |
IApiKeyRotationService / ApiKeyRotationService |
Rotates API keys used by the external executor |
InMemoryProliferationStore |
Default in-process store; no persistence across restarts |
ProliferationWorker |
BackgroundService that drives the generate → execute → feedback loop |
Samples
- Quickstart.RuleEngine.Proliferation — end-to-end ASP.NET Core API demonstrating
AddMProliferationEngine+ Postgres persistence viaAddMProliferationPostgres, with a stats controller reading fromIProliferationStore.
Compatibility
- Target framework:
net8.0 - License: Apache-2.0 (OSS)
Related Packages
Muonroi.RuleEngine.Abstractions— contracts shared across the rule engine stackMuonroi.RuleEngine.Runtime— rule execution runtime that the Proliferation Engine generates scenarios againstMuonroi.Integration.Connectors— providesIServiceTaskConnectorrequired byExternalScenarioExecutor
License
Apache-2.0. See LICENSE-APACHE for terms.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- BouncyCastle.Cryptography (>= 2.6.2)
- MailKit (>= 4.17.0)
- MimeKit (>= 4.17.0)
- Muonroi.Core.Abstractions (>= 1.0.0-alpha.16)
- Muonroi.Integration.Abstractions (>= 1.0.0-alpha.16)
- Muonroi.Integration.Connectors (>= 1.0.0-alpha.16)
- Muonroi.Logging.Abstractions (>= 1.0.0-alpha.16)
- Muonroi.RuleEngine.Abstractions (>= 1.0.0-alpha.16)
- Muonroi.RuleEngine.Runtime (>= 1.0.0-alpha.16)
- Muonroi.Tenancy.Core (>= 1.0.0-alpha.16)
- Scriban (>= 7.2.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Muonroi.RuleEngine.Proliferation:
| Package | Downloads |
|---|---|
|
Muonroi.RuleEngine.Proliferation.Persistence
EF Core persistence for Muonroi Rule Proliferation Engine — Postgres store with tenant isolation. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha.16 | 50 | 6/22/2026 |
| 1.0.0-alpha.15 | 66 | 5/31/2026 |
| 1.0.0-alpha.14 | 61 | 5/15/2026 |
| 1.0.0-alpha.13 | 63 | 5/2/2026 |
| 1.0.0-alpha.12 | 78 | 4/2/2026 |
| 1.0.0-alpha.11 | 72 | 4/2/2026 |
| 1.0.0-alpha.8 | 153 | 3/28/2026 |