docs: experiment 57J.46 record and handoff update

This commit is contained in:
2026-08-11 14:15:50 +01:00
parent a5dd9d3f1a
commit 94ca1b92f7
2 changed files with 109 additions and 0 deletions
+20
View File
@@ -811,3 +811,23 @@ Configured Ollama: qwen-claude:latest at http://192.168.1.111:11434. No producti
One explicit instruction-order rule in Additional Guidance: check existing unresolved nodes first; if none represents the same uncertainty, create a new unknown. Deterministic order replaces ambiguous choice-list. No new classifiers, schema state, or validator changes required. Existing rule #11 and deterministic validator remain as safety net.
**Status:** Design complete. READY FOR BOUNDED IMPLEMENTATION: YES. Implementation requires one Additional Guidance bullet in prompt-builder.js plus 8 focused deterministic regressions in tests. Full record in `docs/experiment-57j45.md`.
### Experiment 57J.46 — Existing-First Uncertainty Fallback: Prompt Implementation
**Branch:** `feature/semantic-to-mutation-contract-v0.19`
**Starting HEAD:** `acd1928` (HEAD of v0.18 at branch point)
**What changed:**
- `lib/graph/prompt-builder.js` — Added one Additional Guidance bullet: "When rule #6 applies to explicitly unresolved uncertainty: first check whether an existing unresolved node already represents the same uncertainty; if so, update/refine that existing structure rather than adding a duplicate; if no such node exists, add a new unknown that directly represents the unresolved uncertainty; do not use an edge alone to represent a previously unrepresented uncertainty."
- `tests/graph/prompt-builder.test.js` — Added 14 focused tests verifying: existing-first ordering, reuse path, fallback-to-add, related-node-insufficient, edge-only-prohibited, possibleInference separation, resolution path preserved, duplicate contract preserved, scope uncertainty-only, fidelity/traceability preserved, noop validator untouched, no semantic classifier added.
**Test results:**
- prompt-builder.test.js: 37 tests pass (23 existing + 14 new)
- utils.test.js: 68 tests pass (regression confirmation)
- Total: 105 tests pass, 0 failures
**What this guarantees:** When rule #6 fires for explicitly unresolved uncertainty, the prompt gives a deterministic instruction order: check existing first → reuse if equivalent → otherwise add new. Rule is scoped to unresolved uncertainty only. All existing contracts preserved (duplicate avoidance, fidelity/inference separation, traceability, noop validator, structural-materialization MUST rule).
**What is intentionally left unresolved:** Semantic threshold for "represents the same uncertainty" (relies on model capability + validator safety net). Live production validation (requires next experiment pass). Multi-turn tuning. Edge-connection strategy for Case B new unknowns.
Configured Ollama: none used. Production code changed: prompt + tests only. Dev server disturbed: NO.