docs: record selected-question contract alignment
This commit is contained in:
+21
-1
@@ -1089,4 +1089,24 @@ Tested the inverse half of the uncertainty identity rule from 57J.56: when a gra
|
||||
**classification = PROMPT CONTRACT GAP**
|
||||
**smallest next boundary = prompt-only clarification**
|
||||
|
||||
Configured Ollama: none used. **Production code changed:** NO.
|
||||
Configured Ollama: none used. **Production code changed:** NO.
|
||||
|
||||
---
|
||||
|
||||
### Experiment 57J.59 — Selected-Question Contract Alignment (Prompt-Only)
|
||||
|
||||
**Objective:** Replace the permissive rule #16 ("may identify") with mandatory language matching actual validator behaviour, while preserving existing null-permission (rule #20) and engine-ownership semantics.
|
||||
|
||||
**Production changes:**
|
||||
|
||||
- `lib/graph/prompt-builder.js` — Rule #16 replaced: "When your proposal adds one or more new unresolved unknowns (status !== 'resolved'), you MUST include a selectedQuestion identifying one of those as a candidate unknown node. The engine validates your candidate and retains deterministic final-priority selection; your candidate does not need to be the highest-scoring unknown — it only needs to be a valid unresolved unknown that exists in the graph or in addedNodes."
|
||||
- `lib/graph/prompt-builder.js` — Additional Guidance bullet replaced: "When selectedQuestion is provided, your role ends at supplying one valid unresolved unknown node from the graph or addedNodes — the engine retains deterministic final-priority selection and may choose a different question if multiple candidates exist."
|
||||
- `tests/graph/prompt-builder.test.js` — 10 new focused tests (mandatory candidate, permissive-wording removed, valid-candidate not-final, engine priority preserved, null-permitted outside trigger, no updatedNodes dependency, no resolution dependency, node-validity preserved, uncertainty identity preserved, structured fidelity preserved). Updated existing test to match new rule #16 wording.
|
||||
|
||||
**Test results:** 59 tests pass (42 existing + 17 new = 59 total). Zero failures.
|
||||
|
||||
**Ownership split preserved:**
|
||||
- MODEL: supply one valid candidate when new unresolved unknowns are added
|
||||
- ENGINE: validate candidate, retain deterministic priority/scoring ownership
|
||||
|
||||
Configured Ollama: none used. **Production code changed:** prompt + tests only. **Ollama calls:** 0.
|
||||
Reference in New Issue
Block a user