@playform/hook-dsh-graph-suggester
v0.2.1 - UNPUBLISHED - plan:
SEARCH-SUGGESTER-PLUGIN
The role
The graph-suggester hook: a DeepSeek Harness plugin that upgrades the candidate list of the
suggester family from paths and globs to the connected component around the symbol
(SEARCH-SUGGESTER-PLUGIN.md §9.2).
When the model reads or greps a source file, the hook asks the workspace v4.1 graph service for the
code-block neighborhood (the definition, the callers, the tests, the doc block) and prepends ONE
labeled additionalContexts notice that names it.
Two intents live in the embedded pack (Source/Variable/Defaults.ts):
-
Neighborhood - resolved through the graph service, and a static fallback set is appended only
when the graph answers with an empty component.
When the service is absent or throws, the intent abstains with a graph unavailable ledger
line (once per apply), because the graph intent never guesses.
-
Sibling - a package-name grep resolves statically (the family roster, the inventory, the
sibling README).
The graph service shape is declared in the own Source/Interface/Graph.ts of this package (the
self-contained PoC rule): no import from sibling workspace packages.
The real service (@playform/plugin-dsh-workspace-graph) now exposes the same
neighborhood(path, limit) query, served from its W1 contains/imports edges, so W1 gives
importers and tests rather than callers.
The Real-Graph-Neighborhood smoke folder proves this hook against the real populated graph, which
the indexWorkspace of the real graph fills.
How it works
-
The post-execute listener.
The tools/post-execute listener (waterfall, plain registration - after the {prepend: true}
listener of ccr) calls next() first.
Then the hook runs detect -> gate -> resolve (graph query for Neighborhood) -> prepend ONE
notice.
Content is never replaced.
-
The pre-step listener.
The agent/pre-step listener resets the note counter each turn when a user message enters.
The plan
Built and smoked, with the suite as the arbiter: Loader-And-Activation, Pipeline-And-Graph (the
FakeGraph contract) and Real-Graph-Neighborhood (the real service).
Ships enabled: false in the bundle patch.
Plan: SEARCH-SUGGESTER-PLUGIN §9.2.
License
CC0-1.0.