@moolam/learning
v1.1.0
Published
Internal component of Sutra SDK — applications should install sutra-sdk. Learning substrate contracts: turn-trajectory schema (B9 metadata + C0 training fields), parse boundary for corpus/gym/critic pipelines.
Readme
@moolam/learning
Learning substrate contracts: turn-trajectory schema, outcome signals, baseline registry, and frozen eval slices for Track C.
Anti-cheat charter
Training environments must use the same production harness code path as live turns. The binding governance document is:
Executable replay-parity coverage: pnpm --filter @moolam/training-gym parity:check (and test).
Rewards computed under a diverged gym path are void and must not be promoted.
Trajectory critics (C3)
Pack-pluggable TrajectoryCritic / CriticScore contracts live in this package
and are re-exported from training/critics/.
- Pure
score(record)— no network / LLM on the default path - Versioned
rubricId+rubricVersionon every score CriticRegistrystores critics by id@version; pack oracles load from JSON manifests undertraining/critics/fixtures/pack-oracles/(nodomains/imports)
pnpm --filter @moolam/learning test
# critics_interface + critics_pack_oracles cover determinism, hack ≤0, two CI oraclesLearning constitution
Binding governance law: docs/learning/CONSTITUTION.md.
One-surgery-per-stage promotion-candidate lint:
pnpm --filter @moolam/learning surgery:check
(green + seeded multi-surgery violation fixtures under
training/eval/fixtures/promotion-candidates/).
Kill-switch operator runbook (constitution L4):
docs/learning/KILL_SWITCH_RUNBOOK.md
— copy-paste revert checklist, monthly safety-alignment drill schedule,
verify once with parity:check + golden:replay.
Research intake (C7 breakthrough RFC)
New learning techniques enter through an eval-gated RFC — never ad-hoc trainer forks. Template + review workflow:
docs/learning/research-intake/RFC_TEMPLATE.mddocs/learning/research-intake/REVIEW_WORKFLOW.mddocs/learning/research-intake/ADOPTION_CHECKLIST.md— approved → manifest → regenerate → micro-run → PROGRESS- Worked example (GRPO G=8→G=6):
docs/learning/research-intake/rfcs/RFC-2026-004-grpo-g8-to-g6.md - Generator hook:
docs/stages/tracks/_generator/track-c/research-intake-rfc.md
pnpm --filter @moolam/learning build
node --test packages/learning/tests/research_intake_rfc.test.mjs
node --test packages/learning/tests/research_intake_worked_example.test.mjs
node --test packages/learning/tests/research_intake_adoption.test.mjs
pnpm --filter @moolam/learning research-rfc-adoption:checkLLM-judge policy (C3)
Narrow lane for non-verifiable aspects only (tone, clarity).
Binding governance: docs/learning/LLM_JUDGE_POLICY.md.
Published mirror: training/critics/llm_judge_lane.ts.
pnpm --filter @moolam/learning llm-judge-policy:check
pnpm --filter @moolam/learning llm-judge-gate:checkLLM judges must never score mastery math, citations, schema validity, or contract obligations — those stay with rule critics / pack oracles.
Held-out tone/clarity agreement fixtures live under
training/eval/llm_judge_sets/
and are independent of critic human-label calibration.
Scripts
pnpm --filter @moolam/learning test
pnpm --filter @moolam/learning schemas:check
pnpm --filter @moolam/learning baselines:check
pnpm --filter @moolam/learning slices:check
pnpm --filter @moolam/learning surgery:check
pnpm --filter @moolam/learning hack:check
pnpm --filter @moolam/learning llm-judge-policy:check
pnpm --filter @moolam/learning llm-judge-gate:check
pnpm --filter @moolam/learning calibration:check