Repository navigation
Feat(yaml canvas): converting yaml into canvas and searchable graphs. - #3
Open
patrickCNMartin wants to merge 23 commits into
Open
patrickCNMartin wants to merge 23 commits into
patrickCNMartin wants to merge 23 commits into
Conversation
Frontmatter stays with the hand-written parser; PyYAML reads with safe_load only. Needed now for the canvas views, and later for other jobs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
listdir skips it, so the pictures the canvas commands will draw there can't make a summary stale, need a header, or show up in a listing. Named with an underscore so a lab's own maps/ folder is never hidden. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An Obsidian canvas or a self-contained web page, chosen by --view or the new LABBRAIN_VIEW setting. Pictures go in _maps/, which ignores itself in git. title, description, path, children and links shape the picture; every other key is drawn as it nests. YAML is read with safe_load only. Experimental. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Writes _maps/hierarchy.yaml from the summaries' frontmatter and links, then draws it as canvas does. Code only: no model, no note read. A link to a note becomes a link to the summary that covers it; links the tree already shows are left out. The web page now draws arrows above the boxes, so a crossing can't pass for a link from the box it crosses. Experimental. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The model runs labbrain stale, hierarchy or canvas, reads the tree, and reports what it shows; code does all the drawing. Experimental. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a real wiki, 45 such files made one row 23,000 px wide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a real wiki, 246 link arrows crossed whole columns of boxes. Each box now ends with one line, "→ Garden — Summary · Beans", each name a link to its file. The extra boxes for unlinked files and the arrow routing go with them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With --vault naming an inner bundle, pictures land in <bundle>/_maps/, and a later run on the whole wiki would have taken them for the bundle summary's sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each FOLDER gets its own tree, in _maps/<FOLDER>/. Its top is the folder's own summary when everything else in it sits under that summary, else the folder itself. Links that leave the folder stay, to show how it connects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two levels of configuration: a person's settings in env/.env, and rules for everyone in two committed files at the wiki root. labbrain.yaml holds the graph page's hidden note types and file URL; topics.yaml is the vocabulary, with synonyms and narrower topics. Read once in cli.py; a bad file stops every command. No summary covers them and no listing shows them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each markdown file a node; link, covers and child edges. Deterministic: sorted, no times, the same bytes for the same commits. A per-file cache keyed by git blob hash means a rebuild reads only the files that changed; links are resolved again on every run. Git ignores it all. Experimental. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Step 1, the headers (title, description, path, tags, topics), widened by the wiki's vocabulary; step 2, the full text, only when step 1 finds nothing or with --text; step 3, the files linked to what was found, up to --depth, and the summaries over them. Writes what it found to _maps/search/ in the graph's format. The search skill now runs it before reading anything. Experimental. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One HTML file with the graph inside, nothing loaded from elsewhere. Opens at the wiki's root; a click puts a file in the middle, with rings 1, 2, 3 away; a search (headers, with the vocabulary) puts its hits around the query. Show and hide edges, types and paths; the side panel lists all in view. labbrain graph draws _maps/graph.html; labbrain search draws a page that opens on what it found. Colours validated for colour-blind readers, in light and dark. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a real wiki, side-by-side labels on a ring overlapped and labels on the edge were cut off. Labels now point outward (turned over on the left half), are cut at 28 characters, and the view fits them in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… graph page Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… decision records logs/audit_log.md is main's, frozen: the five entries this branch appended there move to logs/decisions/, one file each, in the commits that follow. The dependency rule keeps main's wording and names PyYAML in the runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Decision record for work already committed on this branch; it was an entry in logs/audit_log.md before main froze that file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Decision record for work already committed on this branch; it was an entry in logs/audit_log.md before main froze that file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Decision record for work already committed on this branch; it was an entry in logs/audit_log.md before main froze that file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Decision record for work already committed on this branch; it was an entry in logs/audit_log.md before main froze that file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…raph page Decision record for work already committed on this branch; it was an entry in logs/audit_log.md before main froze that file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pictures, a graph and code-only search for the wiki (experimental)
Ways to see and search a wiki without a model reading all of it. Everything here is code; no LLM calls.
Commands
labbrain canvas FILE...: draws any JSON or YAML file as a tree of boxes, as an Obsidian canvas or a web page.labbrain hierarchy [FOLDER...]: the folder summaries as one tree, with the links between them, for the whole wiki or one folder.labbrain graph: the wiki as a graph in_maps/graph.json. Each markdown file is a node, with link, covers and child edges. A rebuild reads only files whose git hash changed. Also drawsgraph.html, a self-contained page to explore it in any browser.labbrain search WORD...: headers first (title, description, path, tags, topics), then full text only if needed, then the links around the hits. It writes the results and a page that opens on them.Config and conventions
labbrain.yaml(graph page options) andtopics.yaml(topic vocabulary with synonyms). Person-level settings stay inenv/.env, which gainsLABBRAIN_VIEW._maps/is labbrain's output folder: git-ignored, and no other command looks inside it. The config files are likewise left out of summaries and listings.safe_loadonly). Frontmatter keeps its hand-written parser.canvasskill. Thesearchskill now runslabbrain searchbefore reading files.Checks
okf_vault.shholds, apart from the documented differences.staleoutput was identical before and after.Not in this PR: the nightly graph agent that curates topics and relations, which will go on
feat/graph-agent.17 commits; decisions are recorded in
logs/audit_log.md.🤖 Generated with Claude Code