Research digest — 2026-07-21 investigation wave
Six parallel investigations ran in sessions 242–244. Full reports live in the
repo under reports/; this page records the verdicts and the findings other
agents need. Pending decisions from all of them are consolidated on
open decisions; actionable
work on upcoming work.
1. DSL benefit — verdict: NO (reports/research-dsl-benefit.md)
Do not build a new DSL for any surface. Every candidate exhibits the same root failure: N hand-maintained representations of one truth synced by convention. A grammar adds an (N+1)th representation plus a parser; every evidenced defect closes via single-sourcing + parity checks in ~1 focused week total.
- Found a live production bug (fixed same day, commit
88e88797— see §7). intent_grammar.pl↔intent_vocabulary.py: 16 keywords missing from the Prolog lexicon since both were created; the covering test passes via a decoy. The sibling pair (routing.pl↔INTENT_VOLK_MAPPING) has an exact-equality parity test and never drifted — the proven cheap fix.- REQ/@traces grammar: 10 independent regexes across 5 files; the dominant cost is semantic (55% corpus correctness), which no grammar touches.
- Precedent: SPEC-104 (OpenSpec), SPEC-105 (OWL/SHACL), org-mode REJECT all
ratified reuse-over-invention; domaingen (a complete DSL pipeline) has zero
.ttlconsumers in the repo.
2. Prolog next-impact (reports/proposal-prolog-next-impact.md)
Ranked proposal for the most impactful Prolog enhancement to implement next, derived from the earlier Prolog capabilities report. Top pick awaits user approval — see open decisions.
3. Module versioning + Claude plugin installer (reports/research-module-versioning-plugin-installer.md)
Workspace-split is dead on the import-graph evidence: core is imported by
all 25 other packages at 455 sites; 10 mutually-dependent pairs form a
12-package cluster covering 73% of modules. Instead: a generated
COMPONENTS.json manifest (per-module 1.3.0+<pkg>.g<sha>.<n> from git
history, zero source churn). Installer: orchgraph-convention bash installer
shipping wheel + plugin tree (.claude-plugin/plugin.json, portable skills,
.mcp.json) via the GitLab generic package registry, sha256-or-die,
fail-closed infra preflight (the Incus fleet is not portable), live MCP
handshake gate before symlink flip, venv-swap rollback. ~4 sessions beyond
the MCP server (which stays first per the standing ruling). Six decisions open.
Why a workspace split is dead — the coupling evidence:
4. Ontology-skill consumption (reports/research-ontology-skill-consumption.md)
Verdict: BOTH a Claude skill and volk tools, over ONE shared ArchitectureQuery
read layer — because the ontology's read side barely exists: the SPEC-106
selector links zero architecture labels; the ArchitectureChunk semantic twin is
reachable only via an undocumented env override; design_patterns serves a
static YAML catalog, never the graph; the only working ontology read is the
ADR-integrity gate. 12-query catalog (Q1–Q12), 5-phase plan, 5 decisions open.
Ontology-skill consumption — phased plan:
5. BDD runtime tracing for the RTM — verdict: PARTIAL YES (reports/research-bdd-runtime-tracing-rtm.md)
Runtime attribution fixes the PRECISION half of the frozen-at-55% trace problem; the RECALL half moves only as test-side citations grow (today 6.6% of decorator occurrences have any claiming test).
- Hard gate PASSED with a landmine: coverage 7.13.5 per-test contexts work
on free-threaded 3.14t, but the default
sysmoncore silently drops attributions —COVERAGE_CORE=ctraceis mandatory (pilot: 2/11 vs 11/11 tests attributed). - Live pilot: 25/33 decorator ids confirmed; 1 genuinely missing id found
(
relevance.py:rescore_by_tier→ REQ-106-063). - BDD form: NO Gherkin (pytest-bdd installed, zero usage). Canonical citation
form =
@traceson test defs (392 already exist; 82 ids invisible to the current harvester — a found gap) + docstring citations. - Plan of record:
plans/bdd-runtime-tracing-plan.md— Phases 0–3 unblocked (~3–4.5 builder days, zero LLM tokens), Phase 4 + 5 decisions await user.
6. Governance wiring forensics (in flight)
reports/proposal-wire-prolog-governance.md — commissioned after the third
governance-wiring incident (see §7): full WIRED/PARTIAL/DEAD map of every
enforcement surface, root-cause analysis, phased wiring plan with end-to-end
deny/allow proof tests and a static predicate/arity boundary gate.
7. Found + fixed: the dead governance rules bug (commit 88e88797)
governance/prolog_client.py queried a nonexistent may_execute/3 with the
arguments REVERSED vs governance.pl:690's may_execute/2 (agent-first,
SPEC-007 FR-GOV-SPIKE-1). Every production PolicyEngine check errored into
deny since inception; the per-role rules were dead code; masked by tests
asserting their own /3 facts. Third incident of this shape (no-op bridge
2026-07-06; missing permission_granted/2 rule base 2026-07-11).
Consequence now live: the shipped rule base's PERMISSIVE fallback for unknown agents (governance.pl:696-699) is active — matches the interim default-allow posture of intent_policy.pl. The deny-posture ruling is still the user's.
8. Deployed: the TRACES_TO pipeline (commits 4c5d5615 + writer)
- Canonical spec corpus synced live via kg_sync
sync_specs: 87 Specs, 559 Requirements, 5,388 RequirementItems (project-qualified ids). scripts/sync_traces_to_neo4j.pymerged 6,298 TRACES_TO edges onto 3,417 code symbols, targeting canonical RequirementItem percanonical_schema.py(TRACES_TO never targets Requirement directly). 5 phantom req ids (REQ-001-901..910) and 31 unmatched symbols reported, not fabricated.- New
qualified_nameRANGE indexes (Class/Function/Method) deployed ONLINE on all 4 Neo4j DBs +schema.pyDDL. - Measured payoff: SearchEngine build context pack 148 → 1,282 tokens, 4 → 25 sections now including traced RequirementItems; p50 206 ms (target 500 ms). Full iteration chain: 0 (broken linker) → 148 → 516 → 1,282.
- Found en route: kg_sync
sync_tracesstage is a silent no-op on the ruling-2 graph (legacy id shapes) — backlogged; 29 leaked test pollution nodes swept.
The TRACES_TO pipeline:
9. RAG stack evaluation (earlier same day; reports/rag-stack-evaluation.md)
codestral-embed-2505 upgrade is real (hit@1 0.50 vs 0.38 MiniLM); the cohere/rerank-4-pro reranker is on probation pending a 100-query goldset; 4 persistent misses are wiki CONTENT gaps, not retrieval failures.