(name: string, r: { content: string; isError?: boolean })
| 991 | const { writeCandidate } = await import('../skills/learning/candidate-store.js'); |
| 992 | const { scoreConfidence } = await import('../skills/learning/confidence.js'); |
| 993 | const { recordLearningEvent } = await import('../skills/learning/ledger.js'); |
| 994 | const confidence = scoreConfidence(signal).score; |
| 995 | // Flywheel phase 1: prefer the richer distilled DRAFT (trigger + collapsed |
| 996 | // step outline + evidence) over the minimal capture. distillDraft is pure and |
| 997 | // returns null for sessions too thin to outline — then the minimal capture |
| 998 | // runs exactly as before. Either way the result is quarantined, not promoted. |
| 999 | const { distillDraft } = await import('../skills/learning/distill.js'); |
| 1000 | const nowIso = new Date().toISOString(); |
| 1001 | const draft = distillDraft( |
| 1002 | { prompt: String(firstUserMsg), finalSummary: finalContent.slice(0, 500), toolSequence: [...this.sessionToolSequence], filesChanged: changedFiles }, |
| 1003 | { nowIso, confidence }, |
| 1004 | ); |
nothing calls this directly
no test coverage detected