This directory contains an original, clean-room, dependency-light reference implementation accompanying the defensive publication ../DEFENSIVE-PUBLICATION.md. It exists to make the novel mechanism concrete and runnable. It is illustrative, not production code, and contains no proprietary source, no secrets, and no internal infrastructure identifiers.
The "Proactive-Action Engine with Layered Cooldowns": on each scan tick a single pass runs a plurality of heterogeneous signal sources, each emitting typed candidate actions; every candidate is then filtered by two gates, before any (here stubbed) model call:
- a role-availability gate —
(role, type) → allowed?; and - a per-action-TYPE cooldown gate — keyed on the action class, not the item, so one cooldown spans all instances of a class.
Only survivors are enqueued; the engine never executes the actions itself. Cadence (scan interval, per-type cooldowns, per-type allowed roles) is read from a configuration bridge.
| File | Purpose |
|---|---|
proactive-engine.js |
The engine: ConfigBridge, CooldownLedger, createProactiveEngine, and four illustrative signal sources. |
demo.js |
A deterministic scenario printing per-tick emissions, gate drops, and enqueues. |
self_check.js |
Asserts the three core invariants and exits non-zero on failure. |
Requires Node.js 16+ (standard library only — no npm install needed).
# Watch the mechanism in action (many stale items => one stale-review):
node demo.js
# Verify the core invariants:
node self_check.js PASS INV-1 per-action-type cooldown suppresses class spam
PASS INV-2 role-availability gate suppresses class pre-enqueue
PASS INV-3 config bridge drives cooldown cadence
ALL CHECKS PASSED
- Tick 0:
agent-ana(lead) enqueuesteam-checkinand onestale-review(despite 7 stale items);agent-bob(member) enqueuesdeadline-reminderand onestale-review, but noteam-checkin(role gate). - Tick 1 (+2 min): stale items unchanged, but the
stale-reviewclass is dropped by the per-action-type cooldown for both agents — no duplicate spam. - Tick 2 (+5 h): the 4 h
stale-reviewcooldown has elapsed, so a freshstale-reviewis permitted again.
This implementation deliberately stubs the downstream "cognitive loop" and the model invocation. The point is to demonstrate the control structure — the single-pass multi-source scan plus the two gates plus the class-level cooldown — which is the subject of the publication. It is not a complete agent runtime.
Copyright 2026 Gus IT LLC (Florida, USA). Licensed under AGPL-3.0-or-later.