practice slice 1 — contracts, the chain bijection, coverage

src/core/contracts/practice.ts (new domain): ReasoningChain (group by
conclusion, id = conclusion node id), PracticeParams (three 0..1 dials),
ProblemSet/Problem lifecycle, feedback-only ProblemGrade. src/core/
practice.ts: chainsForSelection (follows-only, both-ends-in-selection,
group-by-conclusion, singletons for edge-less nodes), chainsToGraph
(the exact inverse — bijection pinned), chainCoverage (the completeness
law: union of problems' chains = the set's chains; duplicated allowed).
13-test suite: diamond, premise-only, singleton, supports-invisible,
outside-endpoint, dedupe, determinism, round-trips, coverage cases.
This commit is contained in:
amosblomqvist
2026-09-29 17:48:20 +03:00
parent f12489fe49
commit 05dcaafc68
4 changed files with 386 additions and 3 deletions
+5 -3
View File
@@ -4,9 +4,10 @@
* Split by domain (src/core/contracts/): plan.ts (the session plan tree),
* graph.ts (the global knowledge graph + its extraction pipeline), chat.ts
* (session records + UI extension points), jobs.ts (the async sub-agent
* protocol). Each domain file is owned outright by its stream; schema
* changes to a domain you don't own go through master. This barrel keeps
* every existing import path ("@/src/core" and "./contracts.ts") unchanged.
* protocol), practice.ts (the practice-problem system). Each domain file is
* owned outright by its stream; schema changes to a domain you don't own go
* through master. This barrel keeps every existing import path
* ("@/src/core" and "./contracts.ts") unchanged.
*/
export * from "./contracts/plan.ts";
@@ -15,3 +16,4 @@ export * from "./contracts/chat.ts";
export * from "./contracts/jobs.ts";
export * from "./contracts/probe.ts";
export * from "./contracts/models.ts";
export * from "./contracts/practice.ts";