Core without documents: no slugs; a node's top; targets by titles from the library root
The model has no slug any more (field, ops, canonical row, slugFor, freeSlug, RESERVED, findDoc). The child of the root a node is under is a derived relation, topOf (docOf and documents stay as deprecated aliases for the UI until step 2); ancestorsInDoc becomes ancestorsBelowRoot. Slug keys and a target's old `doc` in stored libraries are ignored. A node target's path is the titles down from the library root; `rel` marks a path read below a top (a file being imported, what the agent or a person typed). Where two sections share a title, the one the link is written in wins. The text format writes /Top title/…, and ./… inside the exported subtree. The agent may give a node id as a target. renderContext renders the top's outline in an <outline> tag, and steps down the focus path when even titles are over budget. Prompts, the reviewer and the scanner speak of the library, trees and tops; the scanner's unit is the top, with the same behaviour (scripts/linkEval.ts gives identical metrics). src/core/library.ts keeps a slug-free shim for the UI's document features (names made from titles) until step 2 removes them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
1 parent
626dc19e1b
commit
44d2e437eb
32 files changed
+634
-577
No files matched your search
+2
-2
@@ -76,7 +76,7 @@ export function LinkCard({ r, compact }: { r: Ref; compact?: boolean }) {
|
||||
return (
|
||||
<div class="lcard l-node broken">
|
||||
<div class="lhead"><span class="lmark l-node">§</span> broken link</div>
|
||||
<div class="lsub">The note this pointed to is gone{r.path?.length ? `: it was “${r.path.join(" › ")}”${r.doc ? ` in ${r.doc}` : ""}` : ""}.</div>
|
||||
<div class="lsub">The note this pointed to is gone{r.path?.length ? `: it was “${r.path.join(" › ")}”` : ""}.</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -221,7 +221,7 @@ export function NodeRelated({ id }: { id: NodeId }) {
|
||||
<li key={r.node} class={forkMark?.(`n:${r.node}`) || undefined} data-related={r.node}>
|
||||
<span class="bl-key">{i + 1}</span>
|
||||
<span class="bl-title">{r.title}</span>
|
||||
<span class="bl-doc">{r.doc}</span>
|
||||
<span class="bl-doc">{r.top}</span>
|
||||
<span class="bl-quote">{r.why}</span>
|
||||
</li>
|
||||
))}
|
||||
|
||||
Reference in new issue
Block a user