agentleFS
B-M-Capital-ResearchB-M-Capital-Research/honeclaw/.agents/skills/event-engine-baseline-testing/SKILL.md

event-engine-baseline-testing

Skill748 starsChanged 3 months agoMITView on GitHub

Use in the honeclaw repository when Codex needs to validate event-engine notification quality changes, run the event-engine/core/web-api regression subset, rerun the saved news classifier baseline against OpenRouter models, or add new real-news samples to the baseline fixture without overfitting.

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 13 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill for event-engine push quality work, especially changes touching:

    line 8
  2. Distinctive:

    Use repository-native commands exactly as written in this skill.

    line 18
  3. Distinctive:

    Before changing code or fixtures, write a short todo that includes:

    line 22
  4. Distinctive:

    Check the worktree first:

    line 29
  5. Distinctive:

    Do not commit if main is behind, or if staged/unrelated files would make an isolated commit unsafe.

    line 35
  6. Distinctive:

    Run the smallest useful subset first, then broaden.

    line 39
  7. Distinctive:

    Always finish Rust work with:

    line 59
  8. Distinctive:

    If formatting fails, run:

    line 65
  9. Distinctive:

    Run it directly when touching source classification or transcript splitting:

    line 89
  10. Distinctive:

    Do not update the expected baseline just to make a new model pass.

    line 132
  11. Very specific:

    When the user marks a stable reusable case, copy only the durable public fields into …

    line 157
  12. Distinctive:

    Add a new baseline when live logs or user feedback exposes a reusable decision case, such as:

    line 164
  13. Very specific:

    If a result depends on article body that is not stored, add expected_llm_title_only_after_engine for the manual script.

    line 182
  14. Very specific:

    Update summary counts in the fixture (items, LLM item count, yes/no counts).

    line 183
  15. Very specific:

    If the user explicitly asked for live model validation, also run the live script and report cost/latency/drift.

    line 193
  16. Distinctive:

    Keep these invariants unless the user explicitly changes product policy:

    line 197
  17. Distinctive:

    Update the active event-engine plan or automation memory if this work is part of the ongoing push-quality track.

    line 210

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Event Engine Baseline Testing

Use this skill for event-engine push quality work, especially changes touching:

  • crates/hone-event-engine/src/pollers/*
  • crates/hone-event-engine/src/router.rs
  • crates/hone-event-engine/src/digest.rs
  • crates/hone-event-engine/src/news_classifier.rs
  • crates/hone-core/src/config/event_engine.rs
  • crates/hone-web-api/src/lib.rs
  • tests/fixtures/event_engine/news_classifier_baseline_*.json

Use repository-native commands exactly as written in this skill. Do not add local wrapper prefixes.

Start Checklist

Before changing code or fixtures, write a short todo that includes:

  1. Goal: which behavior is being changed or verified.
  2. Files: implementation files plus baseline/test files.
  3. Verification: exact commands, including whether a live LLM run is needed.
  4. Documentation: update the active plan/memory when the work affects the event-engine quality track; otherwise state why no doc sync is needed.

Check the worktree first:

git status --short --branch

Do not commit if main is behind, or if staged/unrelated files would make an isolated commit unsafe.

Test Matrix

Run the smallest useful subset first, then broaden.

For event-engine logic:

cargo test -p hone-event-engine --lib

For config schema/default changes:

cargo test -p hone-core --lib

For web-api assembly changes, such as sink/classifier model wiring:

cargo check -p hone-web-api

Always finish Rust work with:

cargo fmt --all -- --check

If formatting fails, run:

cargo fmt --all
cargo fmt --all -- --check

Existing News Baseline

The current reusable baseline is:

  • tests/fixtures/event_engine/news_classifier_baseline_2026-04-23.json
  • tests/regression/manual/test_event_engine_news_classifier_baseline.sh

The fixture stores real FMP titles/sites/symbols and expected post-tuning route decisions. It intentionally does not store full FMP article bodies. Some entries therefore have both:

  • expected_llm_after_engine: original live run result with FMP text in prompt.
  • expected_llm_title_only_after_engine: expected result for the saved title-only rerun script.

The CI-safe source/kind drift test is in:

  • crates/hone-event-engine/src/pollers/news.rs
  • test: live_news_classifier_baseline_source_policy_is_stable

Run it directly when touching source classification or transcript splitting:

cargo test -p hone-event-engine pollers::news::tests::live_news_classifier_baseline_source_policy_is_stable --lib

Rerun Baseline

Offline check, no network/API cost:

bash tests/regression/manual/test_event_engine_news_classifier_baseline.sh

Live model drift check against the saved title-only samples:

env RUN_EVENT_ENGINE_LLM_BASELINE=1 bash tests/regression/manual/test_event_engine_news_classifier_baseline.sh

To explicitly check the current recommended model:

env RUN_EVENT_ENGINE_LLM_BASELINE=1 EVENT_ENGINE_NEWS_CLASSIFIER_MODEL=amazon/nova-lite-v1 bash tests/regression/manual/test_event_engine_news_classifier_baseline.sh

To compare another model:

env RUN_EVENT_ENGINE_LLM_BASELINE=1 EVENT_ENGINE_NEWS_CLASSIFIER_MODEL=x-ai/grok-4.3 bash tests/regression/manual/test_event_engine_news_classifier_baseline.sh

To collect a non-blocking drift report:

env RUN_EVENT_ENGINE_LLM_BASELINE=1 ALLOW_EVENT_ENGINE_LLM_BASELINE_DRIFT=1 bash tests/regression/manual/test_event_engine_news_classifier_baseline.sh

Interpretation:

  • Any drift on noisy/title-only samples is a prompt/model review signal, not automatically a bug.
  • Drift that promotes opinion/list/preview/social noise should usually be fixed in source classification, router gating, or prompt rules.
  • Drift that demotes a concrete hard event should usually be fixed in prompt rules or deterministic fallback.
  • Do not update the expected baseline just to make a new model pass. First decide whether the new answer is better.

Daily Push Calibration Export

Daily Telegram calibration should start from the actual delivery evidence already stored in PostgreSQL. Use the read-only exporter to produce an ignored local JSON/Markdown snapshot for one actor and one local day:

python3 scripts/diagnose_event_engine_daily_pushes.py --date 2026-04-23 --actor telegram::::8039067465

The default output directory is data/exports/event-engine-calibration/, which is ignored by git. The JSON report includes blank calibration_label and calibration_note fields. The Markdown report is for quick human review.

Suggested labels:

  • useful
  • noise
  • should_immediate
  • should_digest
  • should_filter
  • baseline_candidate

When the user marks a stable reusable case, copy only the durable public fields into tests/fixtures/event_engine/news_classifier_baseline_2026-04-23.json or a newer fixture. Do not commit daily exports, private runtime DB files, full copyrighted article bodies, or one-off labels that only explain a single noisy day.

Add New Baseline Samples

Add a new baseline when live logs or user feedback exposes a reusable decision case, such as:

  • a noisy source that should stay Low/digest;
  • a concrete hard event that should reach Medium digest or High immediate;
  • a transcript/earnings item that should be independently controllable;
  • a route timing issue that should not regress after future prompt/model changes.

Workflow:

  1. Pull or extract the real sample, but do not store API keys, private actor data beyond the stable actor key, or full copyrighted article bodies.
  2. Save only durable fields needed for regression:
    • symbol
    • site
    • title
    • expected source class
    • expected event kind
    • old/new model answers when known
    • expected route after engine
  3. If a result depends on article body that is not stored, add expected_llm_title_only_after_engine for the manual script.
  4. Update summary counts in the fixture (items, LLM item count, yes/no counts).
  5. Extend or adjust the CI-safe unit test if the fixture schema changes.
  6. Run:
python3 -m json.tool tests/fixtures/event_engine/news_classifier_baseline_2026-04-23.json >/dev/null
bash tests/regression/manual/test_event_engine_news_classifier_baseline.sh
cargo test -p hone-event-engine pollers::news::tests::live_news_classifier_baseline_source_policy_is_stable --lib
  1. If the user explicitly asked for live model validation, also run the live script and report cost/latency/drift.

Preserve Semantics

Keep these invariants unless the user explicitly changes product policy:

  • Source classification and deterministic router behavior must be CI-safe and mockable.
  • Live LLM calls are manual validation only, never default CI gates.
  • earnings_call_transcript is a standalone controllable kind, not generic news_critical.
  • Legal ads, shareholder alerts, listicles, valuation commentary, and earnings previews should not become immediate alerts by LLM enthusiasm.
  • High/immediate routing must be explainable through kind, severity, actor preference, cap/cooldown, and sink result.

Closeout

Before final response:

  • Re-run the relevant test subset and report exact pass/fail results.
  • Update the active event-engine plan or automation memory if this work is part of the ongoing push-quality track.
  • Mention whether live LLM baseline was run, skipped, or only run offline.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.