Skip to content

ADR-045: Signal Extensions Plugin Architecture#204

Draft
grparry wants to merge 7 commits intoruvnet:mainfrom
grparry:feat/adr-045-signal-extensions
Draft

ADR-045: Signal Extensions Plugin Architecture#204
grparry wants to merge 7 commits intoruvnet:mainfrom
grparry:feat/adr-045-signal-extensions

Conversation

@grparry
Copy link

@grparry grparry commented Feb 24, 2026

Summary

  • Implements ADR-045 signal extensions plugin architecture
  • Adds AcornflowExtensionHandler as reference implementation
  • Fixes pre-existing CI failures on Windows and Apple Silicon

Replaces #197 (branch rename adr-044 → adr-045)

🤖 Generated with Claude Code

Grant Parry and others added 7 commits February 21, 2026 18:56
Proposes a generic extension mechanism for QualitySignal so consumers
can attach domain-specific structured data without upstream changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add generic extension mechanism for QualitySignal, allowing consumers
to attach and process provider-specific structured data without upstream
schema changes.

Rust changes:
- Add `extensions: Option<HashMap<String, serde_json::Value>>` to QualitySignal
- Add `SignalExtensionHandler` trait with extract_trajectory_features,
  extract_embedding_context, and extract_router_features methods
- Add `register_extension_handler()` and `process_extensions()` to
  IntelligenceLoader
- Add `SignalExtensionResults` struct for handler output
- Add 7 tests covering serde roundtrip, backward compatibility,
  handler dispatch, namespace isolation, and file provider passthrough

TypeScript changes:
- Add `extensions?: Record<string, unknown>` to QualitySignal interface
- Add `SignalExtensionHandler` and `SignalExtensionResults` interfaces
- Add `registerExtensionHandler()` and `processExtensions()` to
  IntelligenceLoader class
- Update FileSignalProvider to pass through extension data

All changes are backward compatible — existing signals, providers, and
consumers work unchanged. Extensions default to None/undefined when absent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Demonstrates the SignalExtensionHandler trait (ADR-045) with a concrete
handler for the "acornflow" namespace. Extracts reasoning chain stats,
workflow names, semantic ref counts, and quality aggregates into
trajectory features, embedding context, and router calibration features.

Includes 4 tests: trajectory extraction, embedding context, router
features, and end-to-end through IntelligenceLoader.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Apply rustfmt to intelligence module files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Windows unit tests: PowerShell cannot parse backslash line continuations
with `-- --nocapture`. Add `defaults.run.shell: bash` to the unit-tests
job so all platforms use bash consistently.

Apple Silicon tests: ScopedBuffer.buffer is Option<MetalBuffer>, so
`scoped.buffer.buffer.contents()` fails to compile. Use the existing
`buffer()` accessor method which unwraps the Option.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- intelligence/mod.rs: qualify `load_all_signals` as method link
- bitnet/rlm_embedder.rs: escape brackets in `dst[i] += src[i]`
- bitnet/rlm_refiner.rs: remove link syntax from unresolvable
  `TrainingTriplet` reference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The entire file had escalating indentation and `jobs:` was nested
under `on:` instead of being a top-level key.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant