feat(confidence-engine): strengthen initial reconstruction contract
This commit is contained in:
@@ -1556,6 +1556,58 @@ The initial decomposition represents core factual uncertainty channels (normalis
|
||||
|
||||
---
|
||||
|
||||
## v0.4 — Strengthened Initial Reconstruction Contract (Implementation)
|
||||
|
||||
**Status:** COMPLETE — deterministic tests pass, one live smoke accepted
|
||||
|
||||
### Starting checkpoint
|
||||
|
||||
- **Branch:** `feature/initial-decomposition-v0.61`
|
||||
- **HEAD:** `37245a8` — fix(confidence-engine): expose reconstruction failure evidence
|
||||
|
||||
### What was implemented
|
||||
|
||||
| File | Change |
|
||||
|---|---|
|
||||
| `prompts/reconstruct-v0.4.md` | New prompt file — provenance-preserving decomposition contract with explicit stop boundary, supplied-relationship preservation, interpretation separation, normalisation guidance |
|
||||
| `lib/reconstruction/prompt.js` | Added v0.4 to PROMPT_VERSIONS; set DEFAULT_PROMPT_VERSION = "v0.4"; added buildV4Prompt loader; added v0.4 case to switch/default |
|
||||
| `tests/v03-reasoning.test.js` | Updated existing default-version assertions to accept v0.4; added 15 new targeted v0.4 prompt contract tests (loading, output-format preservation, provenance stop contract, relationship preservation, interpretation separation, normalisation, next-question discipline) |
|
||||
|
||||
### Architecture present
|
||||
|
||||
| Principle | Present |
|
||||
|---|---|
|
||||
| Provenance-preserving decomposition | ✅ — rule 1: each child's distinguishing semantic content must be directly supported by meaning supplied; plausible/likely/domain-typical not sufficient |
|
||||
| Relationship preservation | ✅ — "Preserve supplied relationships" section (rules 36-37) |
|
||||
| Explicit stop boundary | ✅ — "Explicit stop boundary for decomposition" section |
|
||||
| Interpretation separation | ✅ — rule 6: interpretation never smuggled into decomposition; provisional status required |
|
||||
|
||||
### Deterministic verification
|
||||
|
||||
| Item | Value |
|
||||
|---|---|
|
||||
| Command | `npx vitest run tests/v03-reasoning.test.js` |
|
||||
| Result | **89/89 passed** on first run, zero reruns |
|
||||
|
||||
### Live smoke
|
||||
|
||||
| Item | Value |
|
||||
|---|---|
|
||||
| Route | POST /api/cases/start (no promptVersion — uses default v0.4) |
|
||||
| HTTP status | 200 |
|
||||
| Validation status | valid |
|
||||
| Prompt version in diagnostics | v0.4 |
|
||||
| Supplied meaning preserved | ✅ complaints +35%, production +40%, complaint-rate-per-unit uncertainty, late delivery, minor defects, supplier change, weekend shift, CRM/counting uncertainty, £120k inspection decision |
|
||||
| Provenance boundary enforced | ✅ no decomposition into unsupported CRM mechanisms (segments, training, classification, logging delays) |
|
||||
| Relationship boundary preserved | ✅ unresolved dependency between automated-inspection appropriateness and complaint-kind preserved as unknown investigative path |
|
||||
| Interpretation separation | ✅ model-generated interpretations remain provisional in plausibleInterpretations, not smuggled into decomposition structure |
|
||||
|
||||
### Acceptance: PASS
|
||||
|
||||
**v0.4 initial reconstruction is now production default.** This does NOT yet establish repeatability or cross-scenario consistency.
|
||||
|
||||
---
|
||||
|
||||
## v0.61 active restart point
|
||||
|
||||
The current handoff direction is the repeated-same-input decomposition stability experiment described in the **active design** section at the top of §v0.61.
|
||||
|
||||
Reference in New Issue
Block a user