Add note summaries to graphify query output #1571

Closed
opened 2026-11-05 14:19:10 +00:00 by jared · 4 comments
Owner

Problem

Graphify query output holds labels only. A caller gets a note title and must open the note to learn a fact. In the 12-question vault test, 0 of 12 outputs held the answer facts, although 8 passed by the title rule.
Evidence: /tmp/claude-1000/-home-jared-Documents-SecondBrain/b10276a0-3582-48b5-b0fe-f13795bdcc75/scratchpad/vault-graph-weak-retrieval-evidence.md and /tmp/claude-1000/-home-jared-Documents-SecondBrain/8a73b51f-d8a3-4dfc-9de7-e72ea77eacac/scratchpad/graph-test-results.md (copied below; do not depend on the paths).

Observed

  • Query output prints label, source file and community per node. It does not print the rationale. Note body text is never searched (serve.py search text: label, id, source path, rationale).
  • 308 of 329 notes with frontmatter have a hand-written summary: field. The graph does not use it. Nodes carry no summary text.
  • 828 of 1344 semantic nodes have a rationale (median 73 chars). The query does not print it.
  • Fact recall by hand on 10 random notes: 11 of 48 facts (23%) sit in a node label or rationale. Note-level recall: 10 of 10.
  • Question 1 output holds "Graceful Rate Limits Automation Standard" but none of the rules (retryOnFail, maxTries 3, waitBetweenTries 5000). Question 2 holds six model nodes but not the chosen model or the reason.
  • 115 notes (35%) have exactly 1 semantic node, so a node label alone often cannot carry a fact.

Reproduce

cd /home/jared/Documents/SecondBrain && graphify query "Which local model is used for graph extraction and why?"

The output lists model nodes and no reason.

Approach

Put the note summary: text on the note's node as an attribute or rationale, so that the query prints it and the term search matches it. Print the rationale in query output. Keep the output within the token budget. Choose where to do the work: the vault build step, or graphify (see the upstream ticket).

Required work: none beyond the acceptance criteria.

Orchestrator work: rebuild the vault graph and re-run the 12 vault questions with a facts-in-output rule.

Acceptance criteria

  1. Given a note with a summary: field, when a query returns its node, then the output includes the summary text.
  2. Given the 12 vault questions, when they run after the change, then the count with answer facts in the output is higher than the 0 of 12 baseline.
  3. Given a query at the default budget of 2000, when the output is built, then it stays within the budget.

Non-goals

The os-vault query skill text (separate ticket). Hub-note crowding (separate ticket).

Origin

  • Trigger: vault graph test of 12 questions, 2026-11-04 (strict facts-in-output 0 of 12).
  • Improvised this session: opened each note by hand to check the facts.
  • Chain: caller sees a title and no fact ← output prints labels only and nodes carry no summary ← graphify prints label, source and community, and the build does not copy summary: ← UPSTREAM-TOOL (graphify 0.9.102, serve.py).
  • Root candidate: none found; searched backlog terms for this ticket (VERDICT: CREATE)
  • Where: graphify 0.9.102 serve.py query output; vault graph build
  • Session: b10276a0-3582-48b5-b0fe-f13795bdcc75
  • Transcript: /home/jared/.claude/projects/-home-jared-Documents-SecondBrain/b10276a0-3582-48b5-b0fe-f13795bdcc75.jsonl
  • Parent: #1540.
## Problem Graphify query output holds labels only. A caller gets a note title and must open the note to learn a fact. In the 12-question vault test, 0 of 12 outputs held the answer facts, although 8 passed by the title rule. Evidence: /tmp/claude-1000/-home-jared-Documents-SecondBrain/b10276a0-3582-48b5-b0fe-f13795bdcc75/scratchpad/vault-graph-weak-retrieval-evidence.md and /tmp/claude-1000/-home-jared-Documents-SecondBrain/8a73b51f-d8a3-4dfc-9de7-e72ea77eacac/scratchpad/graph-test-results.md (copied below; do not depend on the paths). ## Observed - Query output prints label, source file and community per node. It does not print the `rationale`. Note body text is never searched (`serve.py` search text: label, id, source path, rationale). - 308 of 329 notes with frontmatter have a hand-written `summary:` field. The graph does not use it. Nodes carry no summary text. - 828 of 1344 semantic nodes have a rationale (median 73 chars). The query does not print it. - Fact recall by hand on 10 random notes: 11 of 48 facts (23%) sit in a node label or rationale. Note-level recall: 10 of 10. - Question 1 output holds "Graceful Rate Limits Automation Standard" but none of the rules (retryOnFail, maxTries 3, waitBetweenTries 5000). Question 2 holds six model nodes but not the chosen model or the reason. - 115 notes (35%) have exactly 1 semantic node, so a node label alone often cannot carry a fact. ## Reproduce ``` cd /home/jared/Documents/SecondBrain && graphify query "Which local model is used for graph extraction and why?" ``` The output lists model nodes and no reason. ## Approach Put the note `summary:` text on the note's node as an attribute or rationale, so that the query prints it and the term search matches it. Print the rationale in query output. Keep the output within the token budget. Choose where to do the work: the vault build step, or graphify (see the upstream ticket). Required work: none beyond the acceptance criteria. Orchestrator work: rebuild the vault graph and re-run the 12 vault questions with a facts-in-output rule. ## Acceptance criteria 1. Given a note with a `summary:` field, when a query returns its node, then the output includes the summary text. 2. Given the 12 vault questions, when they run after the change, then the count with answer facts in the output is higher than the 0 of 12 baseline. 3. Given a query at the default budget of 2000, when the output is built, then it stays within the budget. ## Non-goals The os-vault query skill text (separate ticket). Hub-note crowding (separate ticket). ## Origin - Trigger: vault graph test of 12 questions, 2026-11-04 (strict facts-in-output 0 of 12). - Improvised this session: opened each note by hand to check the facts. - Chain: caller sees a title and no fact ← output prints labels only and nodes carry no summary ← graphify prints label, source and community, and the build does not copy `summary:` ← UPSTREAM-TOOL (graphify 0.9.102, serve.py). - Root candidate: none found; searched backlog terms for this ticket (VERDICT: CREATE) - Where: graphify 0.9.102 serve.py query output; vault graph build - Session: b10276a0-3582-48b5-b0fe-f13795bdcc75 - Transcript: /home/jared/.claude/projects/-home-jared-Documents-SecondBrain/b10276a0-3582-48b5-b0fe-f13795bdcc75.jsonl - Parent: #1540.
Author
Owner

Evidence from the V4 re-extraction (diff-reextract.md, section 7): output form is the first limit on answers. All 25 facts are in the notes, 13 are in graph text, and 3 reach the output. A second limit is start nodes: 4 of the 5 reworded misses stay absent at budget 40000. More nodes per note did not raise answers.

Evidence from the V4 re-extraction (`diff-reextract.md`, section 7): output form is the first limit on answers. All 25 facts are in the notes, 13 are in graph text, and 3 reach the output. A second limit is start nodes: 4 of the 5 reworded misses stay absent at budget 40000. More nodes per note did not raise answers.
Author
Owner

/os-backlog:ticket-decompose routed this to /os-sdlc:ticket-takedown because the owner is a new object.

One change: print the note summary: text in query output. Owner: new query wrapper in os-vault around graphify query; its secret is how a graph result maps to note text. Evidence: _subgraph_to_text (serve.py:1168) prints no rationale; attrs= cuts each value to 60 characters and the total to 200 (serve.py:1253-1275); 455 of 478 notes have summary:, median 203 characters, so a stub-step copy into attributes loses most of the text. A wrapper needs no model, no GPU, and no rebuild, works on all notes at once, and also carries the #1570 cap. Graph-side alternatives: stub step plus cut text, or a graphify patch lost on upgrade. Measure the 12 questions before and after.

/os-backlog:ticket-decompose routed this to `/os-sdlc:ticket-takedown` because the owner is a new object. One change: print the note `summary:` text in query output. Owner: new query wrapper in os-vault around `graphify query`; its secret is how a graph result maps to note text. Evidence: `_subgraph_to_text` (`serve.py:1168`) prints no rationale; `attrs=` cuts each value to 60 characters and the total to 200 (`serve.py:1253-1275`); 455 of 478 notes have `summary:`, median 203 characters, so a stub-step copy into `attributes` loses most of the text. A wrapper needs no model, no GPU, and no rebuild, works on all notes at once, and also carries the #1570 cap. Graph-side alternatives: stub step plus cut text, or a graphify patch lost on upgrade. Measure the 12 questions before and after.
Author
Owner

Work started by hand on branch ticket-1571, per the 2026-11-06 handoff. Baseline before the change: facts 0/11 questions, 3/25 facts; original 12/12; reworded 8/13.

Work started by hand on branch ticket-1571, per the 2026-11-06 handoff. Baseline before the change: facts 0/11 questions, 3/25 facts; original 12/12; reworded 8/13.
Author
Owner

Resolution

Done: bin/vault-query prints the top notes' summaries as NOTE lines, then graph lines cut to the budget. The query skill uses it. No rebuild, model, or GPU.

Evidence: main 7f2266cc, 7379090a. results-before-1571 vs results-after-1571: facts 3/25 to 17/25, questions with all facts 0/11 to 6/11, original 12/12 unchanged. AC 3: largest output 6002 bytes at budget 2000 (6000 characters; multibyte text adds bytes).

Follow-ups: none

## Resolution **Done:** bin/vault-query prints the top notes' summaries as NOTE lines, then graph lines cut to the budget. The query skill uses it. No rebuild, model, or GPU. **Evidence:** main 7f2266cc, 7379090a. results-before-1571 vs results-after-1571: facts 3/25 to 17/25, questions with all facts 0/11 to 6/11, original 12/12 unchanged. AC 3: largest output 6002 bytes at budget 2000 (6000 characters; multibyte text adds bytes). **Follow-ups:** none
jared closed this issue 2026-11-06 21:30:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1571
No description provided.