Expand description
The nudge/progress engine (Phase 18 #9). Public so the as-yet-unwired
scorer is part of the lib API surface; the aristo nudge emitter (S0d)
is its in-crate consumer.
The nudge/progress engine’s DECIDE leg (Phase 18 #9, S0c).
A plug-and-play scorer over a registry of Signals. Each signal turns
some engine input into a raw “pressure” m; the scorer normalizes it by
the signal’s base b and scales by the configured aggressiveness factor
f, firing iff pressure * f >= 1. Adding a nudge is one SIGNALS
entry — the scorer, ordering, and (later) throttle/render are generic.
Two design invariants this module enforces:
aggressiveness = offis a hard silence.factor()is0.0, sopressure * 0.0 >= 1is false for every signal at every pressure — nothing can fire (cf. theaggressiveness_off_is_hard_silenceintent inaristo-core::config).- Ordering is fixed priority, not pressure. Pressures of counts and
fractions are incommensurable, so the surfaced order is the static
SIGNALSorder (congrats banner, then review > canon > verify > proof-review > slump); the Agent-audience signal is a separate surface.
Modules§
- intents
- Enumerate authored intents for the reviewed/unreviewed axis (Phase 18 #7).
- state
- Persistent, git-untracked engine state:
.aristo/nudge-state.toml(Phase 18 #9, S0c). Holds the runtime facts the index can’t carry: - throttle
- Anti-nag throttle for the human-facing nudge surface (Phase 18 #9, S0d).
Structs§
- Decision
- The scorer’s verdict: the fired signals in priority order, split by audience, plus the recommended lead (the highest-priority fired human signal — the engine kicks its low-friction/background action).
- Engine
Inputs - Everything the signal metrics read. The cli’s union function (S0c+)
populates the runtime fields it can’t see from the index alone (reviewed
map, queue/canon counts, the edit-window baseline); the index-derived
part is
Metrics. - Fired
- A signal that fired, with the pressure that fired it and the raw
metric/base(so the throttle can apply a material-increase re-arm against the same numbers). - Signal
- A registered nudge.
metricextracts the raw pressure numeratormfrom the inputs;baseis the denominatorb; the signal fires when(m / b) * factor >= 1.
Enums§
- Audience
- Who a fired signal is addressed to. The two are surfaced through
different channels (D4/D10): the agent gets an inline
<system-reminder>; the human gets the consolidated review prompt the agent pops.
Statics§
- SIGNALS
- The registry. Order IS priority for the human surface: the congrats
banner leads, then review > canon > verify > proof-review > slump. The
Agent-audience
authoring_debtsits last (separate channel, order among human signals irrelevant to it).
Functions§
- score
- score_
authoring_ debt - Score ONLY the
authoring_debtsignal, from the edit counter alone — noEngineInputs/Metricsand so no source walk (PostToolUse fires on every edit and must stay cheap). Returns theFired(carrying metric + base for the throttle) when it fires.