Skip to content

Keep schema nodes out of untyped semantic search (regression since schemas are embedded) #3565

Closed

Description

@mstomar125

Problem

Since schemas are embedded (4aad201f, "Let agents fetch NodeSpace's skills and schemas by task, embed schemas…"), a semantic search that names no type is flooded by schema nodes:

  • nodespace search "Hall Nine" returns 17 hits, 13 of them schemas (e.g. "Horizontal Line").
  • On another database, search "marketing budget" returns 16 hits: 14 schemas, with the one relevant note last and "Checkbox" first.
  • With --type text the same query returns just the right note.
  • v0.3.3 on the same content returned exactly the relevant hit.

Cause: the default Knowledge scope's allowlist includes schema (packages/core/src/ops/search_ops.rs, ~40-60), and SchemaNodeBehavior::get_embeddable_content now returns content (packages/core/src/behaviors/mod.rs, ~1385). The graph-degree boost likely lifts the well-connected schema nodes further.

Untyped search is step 1 of SKILL.md's workflow, so agents get schema noise instead of the user's notes.

Evidence: the 2026-10-05 validation of main a5068fb8. The transcript and DB copies are in the reporter's local scratch (val-1005/smoke/).

Documentation

  • data-layer.md, semantic search: "Semantic search defaults to the Knowledge scope: documents and user-defined types, with system types such as skill left out … A search that names no type keeps the default scope."
  • ADR-029 §5: SearchScope definitions.
  • prompt-skill-system.md: fetching skills and schemas by task, which is why schemas are embedded.

Acceptance criteria

Revised 2026-10-05. Only the core (built-in) schemas leave the default scope. ADR-029 §5 keeps schema in Knowledge, so user-defined schemas stay findable by meaning there. The flood was the ~40 built-in schemas that are now embedded. The original criteria are kept below, struck through.

  • An untyped search (default Knowledge scope) returns no core (built-in) schema nodes, and ranks the relevant user node first.
  • An untyped search can still return a matching user-defined schema (e.g. "Venue" for a venue-like query).
  • --type schema returns core schemas. The skill/schema fetch-by-task path (find_skills) and the desktop everything scope are unchanged.
  • Tests pin each behaviour, each mutation-checked.
Original criteria (superseded)
  • An untyped search (default Knowledge scope) returns no schema nodes. --type schema, and the skill/schema fetch-by-task path, still find them.
  • A test pins both behaviours, and its ranking assertion shows the relevant user node first. Mutation-checked.

🤖 Generated with Claude Code

Activity

  1. self-assigned this
    on Oct 5, 2026
  2. mstomar125 commented on Oct 5, 2026

    @mstomar125
    ContributorAuthor

    Picking this up now as a release blocker for tonight's core release. The plan: keep schema out of the default Knowledge scope, as data-layer.md describes, while --type schema and the skill/schema fetch-by-task path still find schemas. Neither of the open PRs #3572/#3573 touches search_ops.rs or behaviors/mod.rs.

    🤖 Generated with Claude Code

  3. mstomar125 commented on Oct 5, 2026

    @mstomar125
    ContributorAuthor

    Revised the acceptance criteria: only the core (built-in) schemas leave the default Knowledge scope, and user-defined schemas stay in it.

    Why: ADR-029 §5's revision keeps schema on the Knowledge allow-list, and that ADR is Michael's decision, so this fix doesn't amend it. The flood came from the ~40 built-in schemas ("Checkbox", "Horizontal Line", ...) that are now embedded for fetch-by-task. A user-defined schema such as "Venue" is the user's own type and stays findable by meaning.

    The fix is in #3576, with the docs clarification in NodeSpaceAI/nodespace-docs#100. The earlier proposal to amend ADR-029 (nodespace-docs#99) is closed.

    🤖 Generated with Claude Code

  4. added 3 commits that reference this issue on Oct 5, 2026
    793bf3c
    87be717
    4e5fd2a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions