Repository navigation
feat(judge): semantic.scope and semantic.includeContent - #165
Merged
Merged
Conversation
mindsocket
force-pushed
the
issue-152-scope
branch
from
October 16, 2026 04:01
bd24023 to
c7f66d7
Compare
mindsocket
force-pushed
the
issue-152-scope
branch
4 times, most recently
from
October 16, 2026 04:34
c16c93c to
f9bbc79
Compare
mindsocket
marked this pull request as ready for review
October 16, 2026 04:34
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
mindsocket
force-pushed
the
issue-152-scope
branch
from
October 16, 2026 04:36
f9bbc79 to
f17fc3f
Compare
A semantic rule can add related nodes (parent, siblings, children, ancestors, descendants; main-hierarchy edges only) and choose which node bodies are sent. Providers receive related nodes as a flat list with their relations. Without includeContent no body is sent, including the evaluated node's own.
Also recommend attaching wide-scope rules at a level where parent, children or ancestors covers what they need.
Equal node sets now give equal inputs, and a direct parent or child keeps its relation label.
mindsocket
force-pushed
the
issue-152-scope
branch
from
October 16, 2026 04:43
f17fc3f to
07b8a63
Compare
Per-rule providers take the whole judge input, so new input fields need no signature change. Related nodes keep nearest-first selection order instead of an alphabetical re-sort. Drop the judgeNode wrapper, the body fallback and the includeContent oneOf.
mindsocket
commented
Oct 16, 2026
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.
Part of #152. Stacked on #164.
Summary
semantic.scopesends related nodes with the evaluated node, following the edges of the main hierarchy only. It takes any ofparent,siblings,children,ancestors,descendants, andbranch.branchmeansancestors+descendants.ancestorsimpliesparent, anddescendantsimplieschildren. So equal node sets give equal input, and a direct parent or child keeps its relation label.semantic.includeContentisnodeOnlyorfullScope(truemeansfullScope). Without it no body is sent, not even the evaluated node's. This is a behaviour change for existing semantic rules.docs/semantic-rules.mddocuments the feature, and recommends attaching wide-scope rules whereparent,childrenorancestorscovers what they need.docs/concepts.mdadds the terms "evaluated node" and "related nodes".Tests
lint and typecheck clean;
bun run test757 pass, 15 skip, 0 fail.