Orchestrata Ultimate › Plans › research › audit-03-context-injection

Audit 03 — Context Injection (SPEC-009) + Memory/KG Wiring into Volks

Source: plans/research/audit-03-context-injection.md at 8a2cb42ad · last changed 2026-07-27 · first committed 2026-07-04 · 63 lines.

Prose pending.

Plan text

Audit 03 — Context Injection (SPEC-009) + Memory/KG Wiring into Volks

Research audit for the completion mandate. Paths are repo-relative to /home/mohamed/workspace/orchestrata-ultimate-architecture/.

Headline

Two context injectors exist; the SPEC-009-canonical one is dead code.

What a volk actually receives today

  1. Intent text — first stage (Concierge U:Cx) only. kernel/pipeline.py:219.
  2. Prior-stage artifacts — YES, via manual per-volk payload key-copying (choreography).
  3. KG code-structure facts — only when subject ∈ INJECT_SUBJECTS (implement, fix_issues, review_and_test, design_review, scope_review, ux_design), capped MAX_ENTITIES=50 / MAX_CONTEXT_CHARS=8000.
  4. Specs / Requirement nodes — NO (only in the unused VolkContextInjector).
  5. Relevant memories — NO (zero retrieval anywhere in the execution path).
  6. Session / goal / project state — NO.

Injection mechanism: graph context is prepended to the user message, not the system prompt — llm/client.py:545-547 (effective_message = graph_context + "---" + user_message). System prompts are hardcoded static per volk (e.g. pm/volk.py:16 PM_SYSTEM_PROMPT). GraphContextValidator (knowledge_graph/graph_context_validator.py, client.py:575-602) checks the response references injected entities and can retry.

Wired injection path

Memory (SPEC-010) — standalone, write-only, different runtime

Prior-stage artifacts

Flow via manual key-copying, not an ArtifactStore feedback:

Two parallel runners

Gaps + insertion points (central chokepoint = kernel/pipeline_kg.py:_maybe_inject_context L107)