Feat/context overlay sidecar - #16
Merged
Merged
Conversation
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: Frank Scholter Peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: Frank Scholter Peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: Frank Scholter Peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: Frank Scholter Peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: Frank Scholter Peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: Frank Scholter Peres <frank.scholter.peres@mercedes-benz.com>
Signed-off-by: Frank Scholter Peres <frank.scholter.peres@mercedes-benz.com>
Signed-off-by: Frank Scholter Peres <frank.scholter.peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com> Co-Authored-By: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com> Co-Authored-By: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com> Co-Authored-By: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
FScholPer
force-pushed
the
feat/context-overlay-sidecar
branch
from
September 9, 2026 06:55
62d4d31 to
e6137cf
Compare
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com> Co-Authored-By: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com> Co-Authored-By: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com> Co-Authored-By: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
FScholPer
force-pushed
the
feat/context-overlay-sidecar
branch
from
September 10, 2026 09:46
d11e42e to
fddf9f7
Compare
FScholPer
marked this pull request as ready for review
September 14, 2026 12:34
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com> Co-Authored-By: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
Signed-off-by: frank.scholter_peres <frank.scholter_peres@mercedes-benz.com>
odra
reviewed
Sep 16, 2026
odra
reviewed
Sep 16, 2026
odra
reviewed
Sep 16, 2026
odra
approved these changes
Sep 17, 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.
Why
An agent working in one S-CORE repository knows nothing about what was decided
in another session, in another module, last week. The knowledge exists — it is
just not selectable. Storing context is not the hard part; selecting the
context that matters for the task at hand is.
This PR adds that selection layer to
context-discipline. It is local,deterministic, and Git-native: no service, no embedding model, no network call.
What an agent gets
get_prior_context(task_text, current_nodes)returns the reasoning recordsfrom other sessions that are relevant to the current task, plus the score
factors of the ones it rejected, so an empty result is diagnosable instead of
silent.
Relevance is one number per candidate:
semantic— token overlap between the current task and the prior record.Unicode-aware, function words filtered; without that filter, German prose
matched on
die/und/wirdand produced a measured false positive.structural— the share of the prior record's grounded nodes that liesinside the code-graph neighbourhood of the current task. This is what lets
"same pattern, different module" match at all.
live_ratio— how much of a record's ground still exists in the graph;floored so that build/config decisions are not permanently unreachable.
recency— off by default; retention already drops records after 90days, and on a small corpus age does not discriminate.
Selection is by rank, not by an absolute threshold: candidates above the
measured
noise_floorand withinrank_gap_ratioof the best one. Everylookup writes an
attentionrecord with all factors, so any decision the layermade can be replayed afterwards.
Why the numbers are what they are
They are measured, not chosen. Each pair of runs was one task that should
match and one that must not:
noise_floor = 0.037is the geometric mean of the worst relevant score andthe best control score after tokenization was fixed.
rank_gap_ratio = 0.35is the value that still keeps the weakest relevantprior once
structuralraises the top of the scale.In the most recent real run, all five relevant priors were returned and both
control records were rejected, with a factor of 36 between them.
Scope and boundaries
.score-local/on the developer's machine. Nothing isshared between developers in this PR.
recorded by other sessions, never instructions to follow.
record_outcomenow requiresverdictto be exactlypassorfail, withthe justification in the new
rationalefield. This is a breaking changefor callers that passed prose verdicts.
structuralonly contributes whencurrent_nodescontains module ordirectory paths; the tool schema now says so at call time, and the response
reports
focus_sizeso an agent can see that its input carried no structuralsignal.
What is deliberately not in here
Exploration sampling, IDF weighting (it makes every score depend on corpus
composition, so a recorded decision stops being reproducible), and a
specificity cap on focus expansion (measured, it lost more signal than it
saved). Each was tried against the real graph and rejected on evidence.
Frank Scholter Peres frank.scholter_peres@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH
Provider Information
AI Assisted by Devin