Harness spec: stubs per request, the compaction table from the reads it covers
context.md and loop.json `context`, spec 3.0.0-draft: - A stub names only a result in the request being built. A chat on the server sends no earlier reply's tool results, so a read in the next reply is answered in full there; the CLI, which resends every result, keeps stubbing across steps. Said for reads and for repeated listings alike. - The compaction table is drawn from the reads the summary covers: the full reads since the previous compaction in turns still in the history, whether or not the request still carries them. A turn taken back takes its reads with it. The CLI's dedupe table is exactly that set; a chat finds it in what it stored. - Ids are the result's number in the session, in hex, at least 4 digits (#0001); the examples and the prompt block now use such ids. - A bracket names the path as the call gave it; what identifies a file is its absolute path. Conformance `context`: a `reply` step (a request carrying none of the results so far) and a case for both rules. The CLI's runner keeps the history apart from the request; compactionTable takes the reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
6 files changed
+150
-40
No files matched your search
+3
-3
@@ -64,7 +64,7 @@
|
||||
"context": {
|
||||
"about": "Context hygiene (spec 3.0.0, context.md): every measure acts when a result is inserted, and nothing already sent to the model is ever rewritten — changing earlier context throws away the prompt cache from that point. conformance/context.json gives the texts.",
|
||||
"ids": {
|
||||
"about": "Every tool result gets an id: `#` and lowercase hex, at least 4 digits, unique in the session and never reused (not after a compaction either), so `recall` finds any of them. It is the first thing in the result, in brackets.",
|
||||
"about": "Every tool result gets an id: `#` and its number in the session, counting from 1, in lowercase hex, at least 4 digits (`#0001`, `#000a`, `#10000`) — unique in the session and never reused (not after a compaction either), so `recall` finds any of them. It is the first thing in the result, in brackets.",
|
||||
"digits": 4
|
||||
},
|
||||
"read_header": "[{{id}} {{path}} lines {{from}}-{{to}} of {{of}} sha {{sha}}]",
|
||||
@@ -88,7 +88,7 @@
|
||||
"tail_chars": 10000
|
||||
},
|
||||
"dedupe": {
|
||||
"about": "by_hash: a read whose file has the same content hash as an earlier full read in the table, and whose lines lie wholly inside that read's, is answered with `unchanged`. by_result: a call with the same arguments as an earlier one in the table, whose result is the same text, is answered with `same_result`. Stubs point at the full result, never at another stub. The table is per session, and compaction empties it.",
|
||||
"about": "by_hash: a read whose file (by its absolute path) has the same content hash as an earlier full read in the table, and whose lines lie wholly inside that read's, is answered with `unchanged`. by_result: a call with the same arguments as an earlier one in the table, whose result is the same text, is answered with `same_result`. Stubs point at the full result, never at another stub. The table is the full results in the request being built — never one the request does not carry (a chat's earlier reply, a turn undone) — and compaction empties it.",
|
||||
"by_hash": [
|
||||
"read"
|
||||
],
|
||||
@@ -100,7 +100,7 @@
|
||||
]
|
||||
},
|
||||
"compaction": {
|
||||
"about": "The one deliberate break of the cache. After the summary the harness adds the table of reads still in the dedupe table — the newest full read of each path, newest last, at most `rows` — and then empties the dedupe table, so no stub ever points at content that is gone from the context. No reads: no table.",
|
||||
"about": "The one deliberate break of the cache. After the summary the harness adds the table of the reads the summary covers — the full reads made since the previous compaction, in turns still in the history being summarised, whether or not the request still carries them; of those the newest full read of each file, newest last, at most `rows` — and then empties the dedupe table, so no stub ever points at content that is gone from the context. No reads: no table.",
|
||||
"heading": "## Files read before this summary",
|
||||
"line": "Read a file again for its content; recall shows a result by its id.",
|
||||
"rows": 50
|
||||
|
||||
Reference in new issue
Block a user