review/ledger¶
Source: src/review/ledger.ts
What is left to do, as a list nobody can lose track of.
A review produces two kinds of thing: a decision, which src/verdict.ts
carries, and a set of things that must happen before the work is finished.
Asking the reviewer to restate the second set every round puts us back to
matching one round’s prose against another’s, where “is this the same remark
as last time” is a guess.
So this code holds the list. An obligation gets an id when it first appears and keeps it, and the agent answers a closed question per id instead of writing its remarks again.
Three rules make it safe, and they are here rather than in a prompt:
Only whoever opened an obligation may close it. A worker cannot declare its own work accepted.
An obligation nobody mentions stays open. A model that forgets has not approved, and failing closed is the only default that cannot be talked round.
Nothing is rewritten. An obligation opens, it closes, and it keeps the text it was opened with.
A judgement stays a judgement through all of this. What changes is that the unfinished set is explicit, and each judgement in it covers one sentence rather than the whole of the work.
Closure¶
type
export type Closure = {
/** `"addressed"` when the work was done, `"withdrawn"` when it was dropped. */
how: "addressed" | "withdrawn";
/** Why. Kept whatever the outcome: a withdrawal without a reason is a silent drop. */
reason?: string;
/** The round it closed in, so a reader can see what moved and what did not. */
at: number;
};
How an obligation stopped being open.
Obligation¶
type
export type Obligation = {
/** Short and stable: the agent has to echo it, and it never changes. */
readonly id: string;
/** The agent that raised it. The only one allowed to close it. */
readonly openedBy: string;
/** As it was written. Never rewritten - a reworded obligation is a new one. */
readonly text: string;
/** The round it first appeared in. */
readonly openedAt: number;
/** Absent while it is open. */
closed?: Closure;
};
One thing that has to happen before the work is finished.