Skip to main content

brainwires_prompting/
lib.rs

1#![deny(missing_docs)]
2//! `brainwires-prompting` — adaptive prompting techniques for the
3//! Brainwires Agent Framework.
4//!
5//! Originally lived in `brainwires-knowledge::prompting`; extracted in
6//! Phase 6 of the layout refactor. Pulls only `linfa` / `linfa-clustering`
7//! / `ndarray` / `bincode` for the K-means task-clustering pipeline.
8//! Optional integration with the BKS/PKS knowledge layer for the
9//! adaptive `PromptGenerator` is gated behind the `knowledge` feature.
10
11/// K-means task clustering by semantic-vector similarity.
12pub mod clustering;
13/// Dynamic prompt generation. With the `knowledge` feature enabled,
14/// integrates BKS (Behavioral Knowledge System) / PKS (Personal Knowledge
15/// System) / SEAL feedback to adapt outputs over time.
16pub mod generator;
17/// Technique-effectiveness tracking and BKS promotion logic.
18pub mod learning;
19/// Library of 15 prompting techniques from the adaptive-selection paper.
20pub mod library;
21/// SEAL (Self-Evolving Agentic Learning) feedback hook used by `generator`.
22pub mod seal;
23/// SQLite-backed cluster storage (gated by the `storage` feature).
24#[cfg(feature = "storage")]
25pub mod storage;
26/// Technique enum + per-technique metadata (category / complexity / characteristics).
27pub mod techniques;
28/// Adaptive temperature optimisation per task cluster.
29pub mod temperature;
30
31// ── Public re-exports — preserve the surface previously exposed at
32// `brainwires_knowledge::{TaskCluster, PromptingTechnique, …}`.
33
34pub use clustering::{TaskCluster, TaskClusterManager, cosine_similarity};
35pub use library::TechniqueLibrary;
36pub use seal::SealProcessingResult;
37pub use techniques::{
38    ComplexityLevel, PromptingTechnique, TaskCharacteristic, TechniqueCategory, TechniqueMetadata,
39};
40
41pub use generator::{GeneratedPrompt, PromptGenerator};
42pub use learning::{ClusterSummary, PromptingLearningCoordinator, TechniqueStats};
43pub use temperature::{TemperatureOptimizer, TemperaturePerformance};
44
45#[cfg(feature = "storage")]
46pub use storage::{ClusterStorage, StorageStats};