Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kernel/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion kernel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "acp-kernel",
"version": "0.0.200",
"version": "0.0.201",
"description": "Framework-agnostic context-compression engine (model-driven, 3-tier LSM). Pure core: no host dependency.",
"license": "MIT",
"author": "ranxianglei",
Expand Down
1 change: 1 addition & 0 deletions kernel/src/packs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ const LEAN_PROMPT_SECTIONS = {
acpTags: [
`User/tool messages carry hidden \x3cacp\x3e refs such as m00123. Never echo the XML tags; use only refs in ACP tool calls.`,
`Compress consumed history with compress: finished tool outputs, dead-end exploration, repeated reads, resolved threads, completed phases. Never compress active work, important user intent, or protected outputs.`,
`Compress receipts are authoritative stop signals: after a no-op, an "already compressed" receipt, or "No compressible ranges remain", issue no further compress calls until a receipt or nudge names ranges to fold or the user explicitly asks to compress.`,
`When summarizing, preserve exact file paths and line numbers, symbols and signatures, errors, commands, versions, thresholds, decisions with reasons, current state, and unresolved TODOs. Never replace exact technical values with vague wording — a good summary is the primary carrier and makes recall unnecessary.`,
`Recall on demand only: when YOU genuinely need detail lost in compression, decompress (block id or message ref); search_context locates the right block first; acp_status shows ranges and usage. Never run recall as a routine post-compress step.`,
`Message refs remain stable across compression within the same session state. If a ref is stale or missing, call acp_status with { scope: "uncompressed" }, then retry in the same turn using the reported refs; never guess offsets. Batch target ranges in one call.`,
Expand Down
25 changes: 25 additions & 0 deletions kernel/tests/packs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,31 @@ test("lean acpTags carries BOTH the summary-trust guardrail and the post-compres
);
});

test("lean acpTags carries the receipt stop-signal clause after the standing compress bullet (#6930)", () => {
const pi = leanPack.surface.adapters?.pi as {
promptSections: Record<string, string | null>;
};
const tags = pi.promptSections.acpTags ?? "";
const standing = "Compress consumed history with compress:";
const stopClause = "Compress receipts are authoritative stop signals:";
assert.ok(tags.includes(standing), "standing compress bullet must be present");
assert.ok(tags.includes(stopClause), "stop-signal clause must be present");
assert.ok(
tags.indexOf(stopClause) > tags.indexOf(standing),
"stop-signal clause must be positioned after the standing compress bullet",
);
// The clause names the stop triggers and the two resume conditions — not a blanket ban.
for (const marker of [
'an "already compressed" receipt',
'"No compressible ranges remain"',
"issue no further compress calls",
"a receipt or nudge names ranges to fold",
"the user explicitly asks to compress",
]) {
assert.ok(tags.includes(marker), `missing stop/resume detail: ${marker}`);
}
});

test("lean acpTags states ref stability across compression (no false renumbering claim, #417)", () => {
const pi = leanPack.surface.adapters?.pi as {
promptSections: Record<string, string | null>;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading