chore(engine): remove legacy Playbook doc type, superseded by Skill

Drop DocType::Playbook variant and all references — playbook extraction
mission was already renamed to skill extraction in the previous session.
Updates CLAUDE.md, architecture docs, context builder, retrieval weights,
mission comments, and store adapter path mapping.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This commit is contained in:
2026-03-27 19:46:05 -07:00
co-authored by Claude Opus 4.6
parent 96266cb46d
commit ecbe3f5352
8 changed files with 10 additions and 17 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ See `docs/plans/2026-03-20-engine-v2-architecture.md` for the 8-phase roadmap.
| **Thread** | Unit of work with lifecycle, parent-child tree, capability leases | Session + Job + Routine + Sub-agent |
| **Step** | Unit of execution (one LLM call + its action executions) | Agentic loop iteration + tool calls |
| **Capability** | Unit of effect (actions + knowledge + policies) | Tool + Skill + Hook + Extension |
| **MemoryDoc** | Unit of durable knowledge (summaries, lessons, playbooks) | Workspace memory blobs |
| **MemoryDoc** | Unit of durable knowledge (summaries, lessons, skills) | Workspace memory blobs |
| **Project** | Unit of context (scopes memory, threads, missions) | Flat workspace namespace |
## Build & Test
@@ -33,7 +33,7 @@ src/
│ ├── thread.rs # Thread, ThreadId, ThreadState (state machine), ThreadType, ThreadConfig
│ ├── step.rs # Step, StepId, LlmResponse, ActionCall, ActionResult, TokenUsage
│ ├── capability.rs # Capability, ActionDef, EffectType, CapabilityLease, PolicyRule
│ ├── memory.rs # MemoryDoc, DocId, DocType (Summary/Lesson/Playbook[legacy]/Skill/Issue/Spec/Note)
│ ├── memory.rs # MemoryDoc, DocId, DocType (Summary/Lesson/Skill/Issue/Spec/Note)
│ ├── project.rs # Project, ProjectId
│ ├── event.rs # ThreadEvent, EventKind (18 variants for event sourcing)
│ ├── message.rs # ThreadMessage, MessageRole
@@ -20,7 +20,7 @@ const MAX_CONTEXT_DOCS: usize = 5;
///
/// Retrieves relevant memory docs from the project and injects them as a
/// system message after the main system prompt. This gives the LLM access
/// to lessons learned, playbooks, and known issues from prior threads.
/// to lessons learned, skills, and known issues from prior threads.
pub async fn build_step_context(
messages: &[ThreadMessage],
leases: &[CapabilityLease],
@@ -67,7 +67,6 @@ fn format_docs_as_context(docs: &[MemoryDoc]) -> String {
let type_label = match doc.doc_type {
crate::types::memory::DocType::Lesson => "LESSON",
crate::types::memory::DocType::Spec => "MISSING CAPABILITY",
crate::types::memory::DocType::Playbook => "PLAYBOOK",
crate::types::memory::DocType::Issue => "KNOWN ISSUE",
crate::types::memory::DocType::Summary => "CONTEXT",
crate::types::memory::DocType::Note => "NOTE",
@@ -119,7 +119,6 @@ fn doc_type_weight(doc_type: DocType) -> f64 {
DocType::Spec => 0.5, // Missing capability info is highest priority
DocType::Skill => 0.45, // Skills with activation metadata and code snippets
DocType::Lesson => 0.4, // Lessons prevent repeating mistakes
DocType::Playbook => 0.3, // Reusable procedures
DocType::Issue => 0.2, // Known problems
DocType::Summary => 0.1, // Background context
DocType::Note => 0.05, // Scratch notes, lowest priority
@@ -285,8 +284,7 @@ mod tests {
#[test]
fn doc_type_weight_ordering() {
assert!(doc_type_weight(DocType::Spec) > doc_type_weight(DocType::Lesson));
assert!(doc_type_weight(DocType::Lesson) > doc_type_weight(DocType::Playbook));
assert!(doc_type_weight(DocType::Playbook) > doc_type_weight(DocType::Issue));
assert!(doc_type_weight(DocType::Lesson) > doc_type_weight(DocType::Issue));
assert!(doc_type_weight(DocType::Issue) > doc_type_weight(DocType::Summary));
assert!(doc_type_weight(DocType::Summary) > doc_type_weight(DocType::Note));
}
@@ -274,7 +274,7 @@ impl MissionManager {
/// for `StateChanged { to: Done }`. For each completed non-Mission thread:
///
/// 1. **Error diagnosis** — if trace has issues, fires `thread_completed_with_issues`
/// 2. **Playbook extraction** — if thread succeeded with many steps/actions,
/// 2. **Skill extraction** — if thread succeeded with many steps/actions,
/// fires `thread_completed_with_learnings`
/// 3. **Conversation insights** — after every N threads in a conversation,
/// fires `conversation_insights_due`
@@ -374,7 +374,7 @@ impl MissionManager {
}
}
// ── Trigger 2: Playbook extraction ──────────────
// ── Trigger 2: Skill extraction ──────────────────
let action_count = thread
.events
.iter()
@@ -564,7 +564,7 @@ impl MissionManager {
/// Ensure all three learning missions exist for the given project.
///
/// Creates (if missing) the self-improvement, playbook extraction, and
/// Creates (if missing) the self-improvement, skill extraction, and
/// conversation insights missions. This is the preferred entry point —
/// call once at project bootstrap.
pub async fn ensure_learning_missions(
@@ -1099,7 +1099,7 @@ pub const FIX_PATTERN_DB_TITLE: &str = "fix_pattern_database";
/// Well-known tag for the fix pattern database.
pub const FIX_PATTERN_DB_TAG: &str = "fix_patterns";
/// The goal for the skill extraction mission (replaces playbook extraction).
/// The goal for the skill extraction mission.
const SKILL_EXTRACTION_GOAL: &str = "\
You extract reusable skills from successfully completed multi-step threads.
@@ -34,8 +34,6 @@ pub enum DocType {
Summary,
/// Durable learning from experience.
Lesson,
/// Reusable multi-step procedure.
Playbook,
/// Detected problem for follow-up.
Issue,
/// Missing capability request.
+1 -2
View File
@@ -128,7 +128,6 @@ For trace debugging: `ENGINE_V2_TRACE=1` writes full JSON traces to `engine_trac
|------|---------|-------------|
| `Summary` | What a thread accomplished | Conversation insights mission |
| `Lesson` | Durable learning from experience | Self-improvement mission |
| `Playbook` | Reusable multi-step procedure | Legacy (superseded by Skill) |
| `Skill` | Reusable skill with activation metadata and code snippets | Skill extraction mission, v1 migration |
| `Issue` | Detected problem for follow-up | Self-improvement mission |
| `Spec` | Missing capability request | Self-improvement mission |
@@ -154,7 +153,7 @@ On each LLM call, two knowledge sources are injected into the system prompt:
## Skills System
Skills are the v2 replacement for both v1 SKILL.md prompt extensions and v1 playbooks. They provide deterministic, keyword-driven knowledge injection with optional executable code snippets for the CodeAct runtime.
Skills are the v2 evolution of SKILL.md prompt extensions. They provide deterministic, keyword-driven knowledge injection with optional executable code snippets for the CodeAct runtime.
### Architecture
+1 -1
View File
@@ -151,7 +151,7 @@ For Rust bugs in the engine or bridge, the self-improvement thread describes the
## Fix Pattern Database
A Playbook MemoryDoc maps known trace symptoms to fix strategies:
A Note MemoryDoc maps known trace symptoms to fix strategies:
| Trace Pattern | Fix Strategy | Location |
|---|---|---|
-1
View File
@@ -202,7 +202,6 @@ fn doc_workspace_path(doc: &MemoryDoc) -> String {
let type_dir = match doc.doc_type {
DocType::Summary => "summaries",
DocType::Lesson => "lessons",
DocType::Playbook => "playbooks",
DocType::Issue => "issues",
DocType::Spec => "specs",
DocType::Note => "notes",