Make what the system believes inspectable
See each consequential belief with its origin, scope, standing, confidence, authority decision and effects — and a correction that invalidates its dependents.
“What the system believes about you must be visible” — and the chapter’s second half is that visible is not valid and not authorised. A belief is shown with everything needed to argue with it, and a correction appends a revision rather than rewriting history.
Run it
git clone https://github.com/ernanhughes/project-language.git
cd project-language
git checkout 329660f679a5a87831f91fe1430c20ac9360dda8
npm ci
npm run example:personal -- ch27The example is cumulative. The model is a scripted stand-in and the correction’s reason is supplied.
Expected outcome
Each belief is shown with its provenance, its two scopes, its standing, its confidence, its authority decision and what it changed:
...
Chapter 27: what the system believes about her, as inspectable facts (visible is not valid is not authorised)
inf-001: "expanded derivations may be useful in similar architecture reviews" | by model | supports architecture-review, applied to architecture-review | confidence moderate | valid true | authority granted | affects plan-003, plan-004
inf-002: "consensus foundations are already known" | by model | supports architecture-review:protocol-p1, applied to architecture-review:talk-q (EXPANDED) | confidence high | valid false | authority granted | affects nothingThe correction is appended, and it reaches everything that depended on the belief:
...
corrected inf-001. Operation: belief rejected as incorrect; your reason is recorded with it and is not interpreted.
stopped being used: yes
dependants invalidated: plan-003, plan-004 (recomputed only when something recomputes it)
NOT done: scope narrowed, one use stopped, standing policy revised, re-derivation blocked, item forgotten
already shown or acted on: not reversedThat last block is the point: a correction is not a claim that the past was different, and it is not a rewind.
Visible is not valid and not authorised
The view object is the mechanism. Every field is a separate claim, and the
authority decision is made by core/authority, never by confidence.
export interface BeliefView {
id: string;
proposition: string;
origin: "inferred";
provenance: { by: Actor; recorded_at: string; evidence_refs: string[] };
supported_scope: string;
applied_scope: string;
scope_expanded: boolean;
standing: InferredBelief["standing"];
/** How sure the interpretation is. Not authority, and unrelated to the authority decision below. */
confidence: InferredBelief["confidence"];
consequence: Consequence;
/** Can the person inspect it? Always, here. */
visible: true;
/** Does the evidence support it in this scope, now? */
valid: { ok: boolean; why: string };
/** May this use be made? Decided by core/authority; never by confidence. */
authority: { allowed: boolean; verdict: string; why: string; receipt_id: string };
/** What changed because of it: the cached or derived state that depends on it, directly and through other dependents. */
consequences: { direct: string[]; transitive: string[] };
}A correction appends and invalidates; it does not rewrite:
export function correctBelief(
state: PersonalState,
i: { id: string; now: string; by: Actor; reason: string; replacement?: PersonalRecord; unreachable_dependents?: string[] },
sink?: ProvenanceSink,
): RepairReport {
if (i.by.by !== "person") throw new PersonalError("CORRECTION_REQUIRES_PERSON", "only a person corrects a belief about herself");
const e = state.entries.get(i.id);
if (!e || e.record.kind !== "inferred_belief") throw new PersonalError("NOT_A_BELIEF", i.id);
const events: PersonalEvent[] = [{ type: "belief_rejected", at: i.now, id: i.id, reason: i.reason, by: i.by }];
if (i.replacement) {
const rep = validateRecord(i.replacement);
if (rep.source.by !== "person") throw new PersonalError("REPLACEMENT_REQUIRES_PERSON", "a replacement supplied in a correction is the person's own statement");
events.push({ type: "added", at: i.now, record: rep });
events.push({ type: "corrected", at: i.now, id: i.id, by: rep.id, reason: i.reason });
}
const inv = invalidateDependents(state, i.id, i.now, `belief ${i.id} corrected: ${i.reason}`, sink);
return {
record_corrected: true, future_use_stopped: true, downstream: { invalidated: [...inv.direct, ...inv.transitive], recomputed: false },
past_effect_reversed: false, unconfirmed: i.unreachable_dependents ?? [], events: [...events, ...inv.events],
};
}And forgetting, blocking re-derivation and correcting are three different operations:
// ─── forgetting and re-derivation are separate ────────────────────────────────────────────────────
/** Forgetting retracts the retained item. It does not stop the same proposition from being derived again from evidence. */
export function forgetBelief(state: PersonalState, id: string, now: string, by: Actor, reason: string): { events: PersonalEvent[]; rederivation_blocked: false; evidence_retained: boolean } {
if (by.by !== "person") throw new PersonalError("FORGET_REQUIRES_PERSON", "only a person asks the system to forget");
const e = state.entries.get(id);
if (!e) throw new PersonalError("NOT_FOUND", id);
const b = e.record.kind === "inferred_belief" ? e.record : null;
return { events: [{ type: "retracted", at: now, id, reason, by }], rederivation_blocked: false, evidence_retained: !!b && b.evidence_refs.length > 0 };
}Mechanism and limitations
Documented: the belief view, the correction, and the separation of
forgetting, blocking re-derivation and correcting are in
core/personal/src/beliefs.ts.
Observed: the run above. Both beliefs were inspectable; inf-002 was
reported invalid because it was applied outside its supported scope; the
correction stopped future use, invalidated two dependent plans, and explicitly
did not narrow the scope, revise the policy, block re-derivation, forget the
item or reverse what had already been shown.
Not shown. A correction’s reason is recorded with the belief and is not interpreted — nothing here claims the person’s reason was understood. The beliefs are supplied by a scripted model, not produced by a real one. The correction vocabulary, the scope algebra and the communication dimensions are not shown to cover real use. What has already been shown or acted on is not reversed, and the run does not measure whether any of this helps a person.
Understand this example
Copy this prompt into your AI tool. No code runs here.
Apply this example
Copy this prompt into your AI tool. No code runs here.