@signalsafe/tree-spec-assessment
v0.4.2
Published
Deterministic TreeSpec assessment and UI-kit agnostic React learner presentation
Downloads
48
Maintainers
Readme
@signalsafe/tree-spec-assessment
Current source, ownership and release preparation: current-state summary.
npm source 0.4.2 supports Node >=22.12 and @signalsafe/tree-spec ^0.4.4.
The 0.4.1 baseline is published; the new source is an approval candidate.
Core exports provide pure score addition with explicit host dimensions and no React or infrastructure.
React learner/results presentation is available through optional explicit subpaths.
import {
assessmentDefinition,
assessBinary64Scores,
assessIntegerScores,
resultToWire,
} from '@signalsafe/tree-spec-assessment';
const definition = assessmentDefinition(['total', 'awareness']);
const exact = assessIntegerScores(definition, { total: 9007199254740993n }, { total: 2n });
console.log(resultToWire(exact)); // exact decimal string 9007199254740995
const preview = assessBinary64Scores(definition, { total: 0.1 }, { total: 0.2 });
console.log(preview.score['total']); // 0.30000000000000004Missing dimensions mean zero; present null, booleans, strings, unknown dimensions and
nonfinite values are rejected. Integer inputs are bigint; binary64 inputs are number.
No weights, thresholds, rounding, clamping or outcome inference is introduced.
Use assessTransitionDelta with an already parsed TreeSpec transition; whole-delta null
or omission is a legacy no-op, while null dimension values are rejected.
Backend results stay authoritative. No new browser scoring feature is needed.
AssessmentError carries stable code and path. The npm candidate shares assessment
schema v1 and TreeSpec wire v1 with Python. Install the candidate tarball for a pilot;
registry adoption requires an independently reviewed, authorized release.
Ordered score replay is available in Python tree_spec_assessment.replay and TS
@signalsafe/tree-spec-assessment/replay. It consumes host-selected deltas lazily.
Authored-outcome summaries use OutcomeObservation, immutable OutcomeSummary and
summarize_outcomes (TS summarizeOutcomes from ./outcomes). Weights are exact signed
integers; empty/null outcomes are absent from buckets but included in overall count.
Inputs receive stable diagnostics; hosts retain completion and success policy.
React score content is exported from @signalsafe/tree-spec-assessment/react/results;
learner presentation is exported from @signalsafe/tree-spec-assessment/react/learner. Hosts supply labels, formatted values and existing theme
classes. The core has no React dependency. See the repository's docs/consolidation.md
for real consumers, verified artifacts and remaining local/release limitations.
