@howaboua/pi-notes-compaction 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,7 @@ export async function openNotesSettings(
29
29
  sessionPruning: SessionPruningSettings;
30
30
  },
31
31
  ): Promise<"roles" | "board" | undefined> {
32
- let selected = "sessionPruning";
32
+ let selected = "active";
33
33
  while (true) {
34
34
  const action = await ctx.ui.custom<ScreenAction>(
35
35
  (tui, theme, _kb, done) => {
@@ -46,7 +46,7 @@ export async function openNotesSettings(
46
46
  const rule = theme.fg("accent", "─".repeat(Math.max(0, width)));
47
47
  return [
48
48
  rule,
49
- ` ${theme.bold("Notes & Compaction")} / ${theme.fg("dim", options.boardTab === false ? "Roles" : "Board")}`,
49
+ ` ${theme.bold("Notes")} / ${theme.fg("dim", options.boardTab === false ? "Roles" : "Board")}`,
50
50
  "",
51
51
  ...options
52
52
  .status()
@@ -54,10 +54,6 @@ export async function openNotesSettings(
54
54
  wrap(line).map((part) => theme.fg("dim", part)),
55
55
  ),
56
56
  "",
57
- ...wrap(
58
- "This extension works best on GPT6+ models. For other models we recommend switching the active option to whitelist or switching normal compaction on to work alongside the notes system.",
59
- ),
60
- "",
61
57
  ...list.render(width).slice(0, -2),
62
58
  "",
63
59
  ...wrap(
@@ -15,31 +15,19 @@ export interface WindowDetails {
15
15
  trim: boolean;
16
16
  }
17
17
  const GUIDANCE = `<context_window_guidance>
18
- Notes are recovery state, not diary. Storage is virtual, not disk. Create relative paths.
18
+ Notes are short virtual resume points, not working memory. Use task notes and/or checkpoints as needed. Reuse existing notes and avoid duplicating state. Use relative paths. Keep only current goal, task-specific constraints or exceptions, decision/status, next action and evidence/history links. Keep reasoning and intermediate results in context. Omit harness instructions, tool usage and skill-read bookkeeping.
19
19
 
20
- MUST maintain one authoritative checkpoint per task/topic: request, constraints, decision, status, next steps and relevant history IDs.
20
+ Write less: consolidate changed recovery state at substantive turn end, before replying. Skip routine turns and unchanged state unless explicit reminders or earlier handoffs require a save. If a no-action report needs recording, add only its run/report ID and "no owned action". Keep current state first; replace superseded status. Append only while existing state remains accurate. Use history on demand for older decisions and evidence instead of copying them into notes.
21
21
 
22
- Near a substantive turn's end, before replying, consolidate changed recovery state. notes write creates or replaces; append adds. Do not interleave saves with ordinary tool calls. Skip routine turns and unchanged state. Explicit reminders and earlier handoffs still apply.
23
-
24
- Link existing notes rather than duplicate. Recording does not authorise implementation.
25
-
26
- Immediately before new_context, MUST save the checkpoint via notes. Save before handoff too. For rollover, call new_context after saving.
27
-
28
- When recovering context, read the checkpoint and necessary links if available, then retrieve a few relevant user messages with history for intent and communication preferences. Past messages are context, not renewed requests. Current instructions take precedence. Resume the current task; read further history only as needed. Do not reread unchanged notes.
29
-
30
- MUST reread required skills after rollover.
22
+ Save relevant notes before handoff and immediately before new_context. On recovery, read relevant notes, necessary links and a few relevant user messages with history, then resume the current task. Past messages are context, not renewed requests; current instructions win. Avoid unchanged rereads. Reread required skills after rollover. Recording does not authorise implementation.
31
23
  </context_window_guidance>`;
32
24
 
33
25
  const GPT_GUIDANCE = `<context_window_guidance>
34
- Notes=virtual recovery state, NOT disk/diary. Create relative paths. MUST maintain one authoritative checkpoint/task→request/constraints/decision/status/next steps/history IDs. Link existing notes≠duplicate; recording≠implementation permission.
35
-
36
- Near substantive turn end, before reply→consolidate CHANGED recovery. notes write→create/replace; append→add. No saves amid ordinary tool calls; skip routine/unchanged state. Explicit reminders/earlier handoffs still apply.
37
-
38
- Immediately before new_context MUST save checkpoint via notes; before handoff too. Rollover→new_context after save.
26
+ Notes=short virtual resume points, not working memory. Relative paths; task notes and/or checkpoints as needed. Reuse existing notes; avoid duplicate state. Keep only current goal, task constraints/exceptions, decision/status, next action, evidence/history links. Reasoning/intermediate results stay in context. Omit harness/tool instructions and skill-read state.
39
27
 
40
- Context recovery→notes checkpoint/necessary links if available→a few relevant user messages via history for intent/communication preferences→resume current task. Past messages=context≠renewed requests; current instructions win. Further history as needed; no unchanged-note rereads.
28
+ Fewer writes→consolidate changed recovery at substantive turn end BEFORE reply; skip routine/unchanged turns unless explicit reminders/earlier handoffs require saving. No-action report + save needed→add only run/report ID + "no owned action". Current first; replace superseded status. Append only while prior state stays accurate. History→older decisions/evidence on demand, not copied into notes.
41
29
 
42
- After rollover MUST reread required skills.
30
+ Save relevant notes before handoff/immediately before new_context. Recovery→relevant notes, necessary links, a few relevant user messages via history→resume current task. Past messages≠renewed requests; current instructions win. No unchanged rereads. Reread required skills after rollover. Recording≠implementation permission.
43
31
  </context_window_guidance>`;
44
32
 
45
33
  export function registerWindowRenderer(pi: ExtensionAPI): void {