Phase 14: add debug reinject diag logging — B-002 filter visibility

Expose settings.debug snapshots on session_compact and before_agent_start
so Phase 14 can see which filter stage drops --skill paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-17 14:29:56 +07:00
parent 2894ed751d
commit 8f48040eac
6 changed files with 175 additions and 2 deletions
+6
View File
@@ -26,6 +26,8 @@ export interface SkillReinjectSettings {
suffix: string;
/** Soft warn threshold; omit for unlimited with default warn above 3 (SPEC §15). */
maxSkills?: number;
/** Verbose reinject filter logging via ui.notify (Phase 14 / B-002). */
debug: boolean;
}
/** Defaults from SPEC §7.3 — extension off until explicitly enabled. */
@@ -36,6 +38,7 @@ export const DEFAULT_SKILL_REINJECT_SETTINGS: Readonly<SkillReinjectSettings> =
reinjectOnManualCompaction: false,
autoCompactIntegration: "auto",
suffix: "[skill-reinject] Re-applied after compaction.",
debug: false,
};
export function createDefaultSettings(): SkillReinjectSettings {
@@ -77,6 +80,9 @@ export function parseSkillReinjectPartial(raw: unknown): PartialSkillReinjectSet
if (typeof obj.maxSkills === "number" && Number.isInteger(obj.maxSkills) && obj.maxSkills > 0) {
result.maxSkills = obj.maxSkills;
}
if (typeof obj.debug === "boolean") {
result.debug = obj.debug;
}
return result;
}