1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Actionable Recommendation Playbooks (ADR-044 Feature 1)
//!
//! This module provides template-driven synthesis of actionable playbooks from
//! patterns, reflections, and summaries. Playbooks provide step-by-step guidance
//! for agents, including when to apply, when not to apply, and expected outcomes.
//!
//! # Overview
//!
//! Unlike raw patterns, playbooks synthesize multiple data sources to provide:
//! - Ordered, actionable steps
//! - Context-aware applicability guidance
//! - Expected outcomes and pitfalls to avoid
//!
//! # Template-Driven Synthesis
//!
//! Playbooks are generated using templates - NO LLM on the hot path. The synthesis
//! uses:
//! - Existing pattern types (ToolSequence, DecisionPoint, ErrorRecovery, ContextPattern)
//! - Episode reflections (successes, improvements, insights)
//! - Semantic summaries (key concepts, key steps)
//!
//! # Example
//!
//! ```no_run
//! use do_memory_core::memory::playbook::{PlaybookGenerator, PlaybookRequest};
//! use do_memory_core::{TaskContext, TaskType};
//!
//! # fn example() -> anyhow::Result<()> {
//! let generator = PlaybookGenerator::new();
//!
//! let request = PlaybookRequest {
//! task_description: "Implement user authentication".to_string(),
//! domain: "web-api".to_string(),
//! task_type: TaskType::CodeGeneration,
//! context: TaskContext::default(),
//! max_steps: 5,
//! };
//!
//! let playbook = generator.generate(&request, &[], &[], &[])?;
//!
//! println!("Playbook: {}", playbook.playbook_id);
//! println!("Confidence: {:.1}%", playbook.confidence * 100.0);
//! # Ok(())
//! # }
//! ```
pub use ReflectionData;
pub use PlaybookGenerator;
pub use ;