/** * Session-start briefing (KARPATHY_LAYERS Feature 6) — Spec layer. * * "Agile speccing" applied to each coding session. Before an agent starts work, * this gathers what aidimag already knows about the area it's about to touch: * relevant memories, stale warnings, in-scope guardrails, coverage gaps, and a * few clarifying questions the agent should ask the human instead of guessing. * * Exposed as the MCP resource aidimag://session-briefing and the session_start * prompt. */ import type { MemoryStore } from "../db/store.js"; import type { GuardrailLevel, MemoryEntry } from "../types.js"; export interface SessionBriefing { branch: string | null; ticket: string | null; changedFiles: string[]; relevantMemories: MemoryEntry[]; staleWarnings: MemoryEntry[]; guardrailsInScope: Array<{ memory: MemoryEntry; level: GuardrailLevel; }>; coverageGaps: string[]; /** recent searches (agent or human) that found NOTHING — questions memory couldn't answer */ unansweredSearches: Array<{ query: string; misses: number; }>; suggestedQuestions: string[]; } export declare function buildSessionBriefing(store: MemoryStore, root: string): SessionBriefing; /** Human/agent-readable rendering of the briefing for the MCP resource + prompt. */ export declare function renderBriefing(b: SessionBriefing): string; /** Prompt that tells the agent to interview the user using the briefing (Karpathy: extract the true goal). */ export declare function sessionStartPrompt(b: SessionBriefing): string;