mockforge_intelligence/lib.rs
1// Some ai_response helpers are themselves deprecated in favor of
2// mockforge-template-expansion; internal tests still reference them.
3#![allow(deprecated)]
4
5//! AI-powered intelligence for MockForge
6//!
7//! This crate contains modules extracted from `mockforge-core` related to
8//! intelligent behavior, AI response generation, and behavioral cloning.
9//!
10//! Currently migrated:
11//! - `ai_response`: Typed AI response generation helpers
12//! - `behavioral_cloning`: Probability models, sequence learning, edge amplification
13//! - `pr_generation`: GitHub/GitLab PR generation client (Issue #562 phase 1 —
14//! moved out of `mockforge-core` because it only depends on
15//! `mockforge_foundation::Error`, no other core internals)
16//! - `intelligent_behavior`: LLM-driven behavior model, persona-aware response
17//! generation, OpenAPI-backed example/rule generation (Issue #562 phase 2 —
18//! the AI cluster's leaf module, depends only on `mockforge-openapi` and
19//! `mockforge-foundation`)
20//! - `threat_modeling`: LLM-driven security analyzer (DoS / PII / schema /
21//! error / threat / remediation generators) for the contract-drift pillar
22//! (Issue #562 phase 3). Depends only on sibling `intelligent_behavior` +
23//! `mockforge-openapi` + `mockforge-foundation`.
24//! - `ai_contract_diff`: LLM-assisted OpenAPI diff with semantic analysis,
25//! confidence scoring, recommendations, and correction proposals (Issue #562
26//! phase 4). Records `ai_generation` pillar usage via the now-foundation
27//! `pillar_tracking` global, so the analytics dashboard keeps reflecting
28//! contract-diff activity unchanged.
29//! - `contract_validation`: OpenAPI-spec-to-response contract validator (Issue
30//! #562 phase 5). Single file; depends only on `serde` + `mockforge-openapi`
31//! + `mockforge-foundation::pillar_tracking`.
32//! - `failure_analysis`: LLM-driven failure context + narrative generator
33//! (Issue #562 phase 5). Depends only on sibling `intelligent_behavior`.
34//!
35//! Still in `mockforge-core` and worth migrating in follow-ups:
36//! - `ai_studio`: 3 sub-files still pull `reality` (debug_context,
37//! debug_context_integrator) and `voice` (nl_mock_generator). Reality is
38//! moveable next; voice is the wall and a multi-day campaign.
39
40pub mod ai_contract_diff;
41pub mod ai_response;
42pub mod ai_studio;
43pub mod behavioral_cloning;
44pub mod contract_validation;
45pub mod failure_analysis;
46pub mod intelligent_behavior;
47pub mod pr_generation;
48pub mod reality;
49pub mod threat_modeling;
50pub mod voice;