Repository navigation
feat(narrative): tell readers every line opens by its id - #2259
Conversation
The read and recall descriptions said "open a turn or anything in it by its id", which leaves the model to infer where the id is from a page's last line, and some last lines (Nothing earlier., No more.) give no example. Both now say "open any line by its id", and open and before describe their argument as a line's id. The five query properties move into narrative::query_properties, which recall and the agent tool both declare, so the two readers' parameters cannot drift. Closes #2253.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
The goal is to make both readers of the narrative projection say that every line opens by its id, so a model can open a line even when a page's last line gives no example, and to give recall and agent read one declaration of the query properties. The change does that and leaves the page tails unchanged.
The wording claim holds. Each page line carries the id of its turn/start or of its thing's origin event (crates/dim-agent-capabilities/src/narrative.rs:218-224, :259-263, :966-986), and the production pages render those ids (crates/dim-agent-capabilities/src/narrative/search.rs:404-419, :829-844, :1376-1392). open accepts a turn/start, an input/message through its consumption, the line's own branch/start, and every other origin kind the projection tells (search.rs:932-951); before resolves the same ids through Search::anchor (search.rs:116-180, used at :722-736 and :1129-1140). Inputs, replies, calls, interrupts, permission changes, compactions, session forks and the line opening are all covered, so the "Nothing earlier." and "No more." tails leave no shown line without a way to open it.
The shared schema is one copy (narrative.rs:38-63) declared by recall and the agent tool (crates/dim-agent-capabilities/src/recall.rs:43, crates/dim-app-server/src/collaboration.rs:3110-3113), and ABOUT is private again (narrative.rs:34) with no other reference. The property values and order match the previous declarations. The code strings, the description and schema tables in both Recall.md copies, and the new section 3.8 sentence agree exactly, and no other document quotes the old phrase.
The two new cases pass at this head with the pinned toolchain and an isolated environment: collaboration::leader_delegates_and_team_members_communicate and recall::both_profiles_declare_recall. Both would fail before this change, since the old descriptions lack the phrase and the old before and open descriptions differ from query_properties(). They cover the leader and member descriptions and the recall table.
The sentences are protocol under docs/design/model-prompts.md section 4, as section 5.4 of docs/design/plugins/Recall.md and section 1 of docs/design/plugins/Collaboration.md say. Section 8.2 says protocol text is not evaluated and its flow test changes with it, which this change does.
CI at this head is green: changes, verify (linux), macos-native and ci-ok pass; the other jobs skip.
Optional P3, inline on the new section 3.8 sentence: the English says the parameters cannot drift from what the projection "answers", while the Chinese says it accepts them. The schema governs accepted parameters, so use "accepts". Documentation only.
APPROVE
|
|
||
| Every reader declares the query of §5.2 with the same schema properties, which the component | ||
| owns (`narrative::query_properties`), so a reader's parameters cannot drift from what the | ||
| projection answers. |
There was a problem hiding this comment.
Problem: the clause says a reader's parameters 'cannot drift from what the projection answers', but the schema describes what the projection accepts. Failure scenario: a reader takes 'answers' to mean the page output, so the shared-schema guarantee reads as being about answer text rather than the input contract, and the two language copies describe different promises. Evidence: this line says 'answers', docs/zh/design/plugins/Recall.md:179 says the projection actually accepts them, and the shared properties and their parser are crates/dim-agent-capabilities/src/narrative.rs:39-63 and :303-322. Fix: 'cannot drift from what the projection accepts.'
There was a problem hiding this comment.
Fixed in c5fefd3: "cannot drift from what the projection accepts." It now matches the Chinese copy.
zerob13
left a comment
There was a problem hiding this comment.
The ids rendered by the narrative index, turn, and search views resolve through the existing open and before paths. recall and agent read now share the five schema properties without changing validation, access checks, stored handles, or page tails. The exact-head Linux run passed the declaration tests and the existing handle, pagination, and projection tests. The selected macOS checks and ci-ok also passed; Windows was skipped. No blocking issues.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
The change keeps its goal: both readers of the narrative projection tell the model that every line opens by its id, and recall and agent read declare the query of §5.2 from one shared schema.
c5fefd3 contains one line. docs/design/plugins/Recall.md:388 now says a reader's parameters cannot drift from what the projection "accepts", matching the Chinese copy at docs/zh/design/plugins/Recall.md:179, the shared properties at crates/dim-agent-capabilities/src/narrative.rs:39-63, and the parser at :278-333. The optional P3 from the previous review is fixed and withdrawn.
The other six changed files are identical to fceda06, so the earlier review stands and no finding remains. I re-read the full main...head and the changed sections in both languages; no document quotes the old wording. The doc-only delta does not affect the two declaration cases, whose code and tests are unchanged from fceda06, where they passed with the pinned toolchain and an isolated environment; I did not rebuild them here.
CI at c5fefd3: changes and macos-native pass, verify (linux) is still running, and the other jobs skip. The PR is open at this head and merges cleanly with main.
APPROVE
zerob13
left a comment
There was a problem hiding this comment.
Rechecked the delta from fceda06. The only change is the English Recall design wording, which now correctly describes what the projection accepts and matches the Chinese copy. The previously verified runtime behavior is unchanged. Exact-head Linux and the selected macOS checks and ci-ok passed. No blockers.
Closes #2253
What changes
agent read:read: a team member's activity, latest turns first; open any line by its id, or search with about.(leader and member).recall: the same phrase becomesopen any line by its id; the rest of the description is unchanged.openbecomesA line's id; show it in full.andbeforebecomesA line's id; show what came before it.narrative::query_properties().recalland theagenttool both declare that one copy, so their parameters cannot drift (raised in the feat(collaboration): read a member's line through the narrative projection #2234 review).ABOUTis private again.Why
Each line already starts with its time and id, and
opentakes any of them: a turn, an input or message, a reply, a call. The old wording named only "a turn or anything in it", so the model had to work out where the id sits from a page's last line. Some last lines give no example (Nothing earlier.,More: before=…,No more.), so a short first read showed nothing to open. Saying it once in the description covers every page, without repeating a hint on each one.These sentences say what a page returns and which argument opens it. That makes them protocol under model-prompts §4, and they ship on this rationale under §8.
Docs
Recall.md and its Chinese copy: the description and schema tables, and a §3.8 sentence that the component owns the query's schema properties.
Tests
leader_delegates_and_team_members_communicate: the member'sagentschema declares exactlynarrative::query_properties(), and both the leader and member descriptions containopen any line by its id.both_profiles_declare_recall: therecalldeclaration in the tool table the model receives contains the new phrase and the shared property descriptions.cargo clippy --workspace --all-targets --locked -- -D warnings,cargo test --workspace --lockedandcargo run --locked -p xtask -- checkpass locally.