@foliox/transparent-compact-pi 0.8.4 → 0.8.5
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.
- package/docs/DESIGN.md +10 -3
- package/extensions/transparent-compact.ts +5 -4
- package/package.json +1 -1
package/docs/DESIGN.md
CHANGED
|
@@ -118,9 +118,16 @@ Any pending new user input
|
|
|
118
118
|
Mandatory re-orientation checklist + brief recovery recap
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
The numbered checklist requires
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
The numbered checklist requires identifying documents mandated by system,
|
|
122
|
+
developer and applicable project instructions, then re-reading each in its
|
|
123
|
+
entirety before task planning or changes. For this step, a document is required
|
|
124
|
+
reading if and only if those instructions explicitly instruct the agent to read
|
|
125
|
+
it; merely mentioning or linking a document does not qualify. Grep matches, selected sections,
|
|
126
|
+
summaries and reading only edit targets explicitly do not satisfy this step;
|
|
127
|
+
truncated reads must continue to the end, and unavailable documents must be
|
|
128
|
+
reported rather than silently skipped. It also requires restoring missing inputs
|
|
129
|
+
rather than repeating completed writes, inspecting Git state, re-reading files
|
|
130
|
+
before editing and verifying evidence before relying on it. It is a saved
|
|
124
131
|
custom message tagged with the current compaction entry ID, not a temporary nudge:
|
|
125
132
|
subsequent responses and user turns retain it in history before the work that
|
|
126
133
|
followed it. `before_agent_start` adds it on normal starts/resume when missing;
|
|
@@ -607,10 +607,11 @@ function capSpans(spans: string[][], budget: number): string[][] {
|
|
|
607
607
|
}
|
|
608
608
|
|
|
609
609
|
const REORIENT_BLOCK = `**Post-compaction re-orientation — REQUIRED BEFORE CONTINUING.** Compaction may have removed information needed to follow the project instructions. Before planning or performing the next task, you MUST complete this checklist:
|
|
610
|
-
1. Re-read
|
|
611
|
-
2.
|
|
612
|
-
3.
|
|
613
|
-
4.
|
|
610
|
+
1. **Re-read every required document IN ITS ENTIRETY.** For this step, a document is required reading **if and only if** your applicable system prompt, developer instructions, or project instructions (including AGENTS.md / CLAUDE.md) explicitly instruct you to read it. Merely mentioning or linking a document does not qualify. Identify all such documents and re-read each from beginning to end, even if you read them before compaction. Grep matches, selected sections, summaries, and reading only files you intend to edit do NOT satisfy this requirement. If output is truncated, continue reading until you reach the end. Complete these reads before planning or changing anything; intending or promising to read does not count. If a required document is unavailable, report the blocker rather than silently skipping it.
|
|
611
|
+
2. Re-acquire any other information needed for the current task that is no longer in context. This means restoring inputs, not repeating completed work: do not redo writes, edits, or other state-changing actions merely because their results were dropped. If needed, recover those results with \`context_lookup\`, or verify current state.
|
|
612
|
+
3. If this is a Git repository, run \`git status\` and review uncommitted work. Re-verify build/test state if you are about to rely on it.
|
|
613
|
+
4. Re-read any file you are about to modify — do not trust content you only remember from before the compaction.
|
|
614
|
+
5. **Treat other pre-compaction knowledge as unverified too.** Thinking and tool outputs were removed. Anything you know only from them — or from earlier assistant prose describing them — is a note, not evidence. Before you state it as fact or base a decision on it, re-read the source or ask \`context_lookup\`. If you cannot verify it, say explicitly that it is unverified.`;
|
|
614
615
|
|
|
615
616
|
const CHECKPOINT_EXPLANATION = "**Compacted conversation follows.** The earlier part of this conversation has been compacted into the checkpoint below. This is not the full transcript: assistant thinking and tool outputs have been removed from the compacted spans, but are preserved in the session and can be recovered.";
|
|
616
617
|
|
package/package.json
CHANGED