Skip to content

Define code/config embeddings: unit, metadata, usage — and whether they share the prose embedding dump #1518

Open

Description

@dezren39

Define "code embeddings": what they are, how they're used, same dump as prose or not

Problem

The fleet's semantic index covers prose memory only. Code and infrastructure-defining config files are invisible to it. Concrete miss (2026-10-27): infra/dns/dns_config.yaml — the YAML config behind the legacy OpenTofu DNS project — was never embedded; memory held only prose about the project, so a semantic lookup for the config itself found nothing (see dezren39/darwin-nix#974).

Drew's rule: configs of this class (infrastructure-defining YAML and peers) qualify for embeddings by default.

Design work this issue owns

  1. Definition. What is a code/config embedding entry?

    • Unit of embedding: whole file, symbol/block, config section, or chunked windows — and how that differs per artifact type (YAML config, Terraform, source code).
    • Required metadata: repo, path, commit SHA, language/kind, embedding timestamp, source-of-truth pointer.
    • Freshness: what triggers re-embedding (commit, deploy, manual), and how stale entries are marked or evicted.
  2. Usage. How the fleet actually consumes them:

    • Semantic retrieval over configs+code during agent work ("where is X defined", infra and routing reviews).
    • Cross-referencing prose memory against the artifacts it describes (the prose said a DNS project exists; retrieval should reach the config itself).
    • Drift support: prose claims vs current config content.
  3. The same-dump question (Drew, posed directly): why can't code embeddings live in the same dump as the prose ones?

    • Default hypothesis: ONE dump/index, entries discriminated by a kind tag (prose | code | config). Separation must be argued, not assumed.
    • Weigh concretely: embedding-model fit (prose-tuned vs code-aware), chunk-granularity mismatch, retrieval pollution both directions, differing update cadences (append-only memory vs git commits), dump portability/export, and access scope.
    • Return a verdict with reasons; if same-dump loses, specify exactly what forces the split.
  4. Qualifying criteria + first ingestion. Codify which artifacts qualify (starting rule: infrastructure-defining configs qualify by default) and land a minimal ingestion path whose first entry is infra/dns/dns_config.yaml, verified retrievable by a semantic query afterwards.

Done when

A written definition exists (unit, metadata, freshness), the same-dump question has a reasoned verdict, qualifying criteria are recorded, and at least the DNS config is embedded and provably retrievable.

Acceptance criteria

  • A decision is recorded on this issue for each of the three questions: (1) the embedding unit (whole file vs declaration), (2) whether retrieved config code is re-ranked as config or as prose, and (3) whether the config and prose embedding budgets are shared or separate.
  • Each decision names the failure it accepts (e.g. semantic neighbours dropped when one declaration changes) and the evidence behind it.
  • If the decision requires implementation, a follow-up implementation issue is filed and linked from this issue in the same pass — the design does not sit without a next action.

Activity

  1. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  2. added
    kind/questionQuestion or design decision to resolve
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    source/humanFiled directly by a human
    user/reviewNeeds a user-look: Muse reviews first and handles what it can
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 28, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    Intake review

    Related: No directly related open issue found; this sits next to the code/config corpus work the body cites (Semble chunk_id metadata) and the memory/embedding conventions recorded in the repo's design docs. No merged PR decides these questions — they are genuinely open design choices, so this item is routed to user/review for a Muse/Drew decision rather than the queue.

    Notes: The issue arrived with no labels at all; a full intake set was applied. The three questions are well-posed and each names the risk that makes it load-bearing (re-embedding blast radius, re-rank domain, shared-budget starvation). It is a decision item, not an implementation task — effort/m reflects the design pass, not a build.

    Risks: Deciding the unit question implicitly (by whatever the first implementation happens to do) locks in the re-embedding cost profile without the trade-off ever being weighed.

    Suggested approach: Decide (1) first — it constrains the other two. Record each decision on the issue with its accepted failure, then file the implementation follow-up in the same pass if one is needed. An acceptance-criteria section was appended to the body (original preserved verbatim above it).

    Labels normalized by the fleet monitor (intake enrichment): kind/question, priority/normal, effort/m, status/needs-triage, source/human, user/review, meta/enriched.

  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 1, 2026
  5. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: repo-worker-code (openchamber-scheduled-lane)
    • Task: queue triage 2602
    • Next: inspect current design evidence and existing ownership; user/review is not a stop.
  6. 4 remaining items

  7. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  8. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 1, 2026
  9. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  10. added
    user/escalatedQueue or user escalation state
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    and removed
    user/reviewNeeds a user-look: Muse reviews first and handles what it can
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  11. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triage verdict — escalated for Drew decision

    • Agent: queue worker (repo-worker-code), OpenChamber scheduled lane; task 2602.
    • Evidence at current main: 3eafbe66eb460a42322f5d61e0b1457423b9245. Repo-owned mcpx semantic search builds/ranks MCP tool-schema candidates (pkgs/mcpx/internal/daemon/registry.go:632-675,694-794); its vector store is only key + vector (pkgs/mcpx/internal/catalog/vector.go:126-156). The embeddings API imports vectors but does not index source text (pkgs/mcpx/internal/daemon/routes_embeddings.go:37-95,111-127). DNS config is generated and consumed as Terraform input (infra/dns/generate_dns_config.sh:14-35, infra/dns/main.tf:22-24), with no in-repo semantic-file ingestion or retrieval path.
    • External-system caveat: .mcpx.json:70-94 configures codebase-memory and disables codedb; their ingestion rules are external, and pkgs/mcpx/ASSESSMENT.md:114-118 records a codebase-memory startup failure. This does not prove the DNS file is indexed elsewhere.
    • Related work: infra/dns/dns_config.yaml is not embedded in any fleet semantic index found in this repo #2469 already tracks the concrete DNS-config coverage gap and remains open without a PR. I did not create a duplicate small-fix task.
    • Why escalated: Define code/config embeddings: unit, metadata, usage — and whether they share the prose embedding dump #1518 explicitly asks for Drew-directed policy decisions on embedding unit, ranking code/config against prose, and shared dump/index plus budget. A small-fix packet would guess at those decisions and is not safely scoped yet.
    • Worker read for decision: default to one shared index with kind metadata and source identity; use whole-file units for small configs and declaration-sized chunks for large code/config; keep retrieval quotas kind-aware to limit cross-domain pollution. Please confirm or revise those defaults and identify the authoritative index owner.
    • Resume condition: Drew settles those three choices and confirms where ingestion belongs; then route the scoped implementation, coordinating with infra/dns/dns_config.yaml is not embedded in any fleet semantic index found in this repo #2469.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

effort/mMedium: expected under 1 day of workkind/questionQuestion or design decision to resolvemeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)queue/blockedQueue or user escalation statequeue/queuedHas a queued task in the Supabase agent queuesource/humanFiled directly by a humanstatus/blockedQueue or user escalation stateuser/escalatedQueue or user escalation state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions