Skip to content

feat(plugins): backend-engine-definition plugin (Phase 5 #47)#283

Merged
charlie83Gs merged 1 commit intomainfrom
feat/backend-engine-definition-plugin
Apr 21, 2026
Merged

feat(plugins): backend-engine-definition plugin (Phase 5 #47)#283
charlie83Gs merged 1 commit intomainfrom
feat/backend-engine-definition-plugin

Conversation

@charlie83Gs
Copy link
Copy Markdown
Contributor

Summary

  • First Phase-5 provider plugin: plugins/backend-engine-definition/
  • Contributes default NodeDefinitionProvider matching GraphTypeComposition.definition on the default graph type
  • Registered in kt_config.plugin.load_default_plugins alongside existing built-in plugins

What changes

  • New DefaultNodeDefinitionProvider wraps the LLM definition-synthesis flow today's DefinitionPipeline.generate_definition runs inline — registry-driven dispatch resolves to an identical prompt/LLM call, zero behaviour change for existing graphs.
  • Provider is stateless: caller pre-fetches dimensions and passes them via NodeDefinitionContext.options['dimensions']. Keeps a graph-engine handle out of the ABC while preserving the legacy skip-path contract (no dims / empty LLM output / gateway exception → returns None, caller keeps previous definition).
  • No worker wiring in this PR — the DefinitionPipeline call sites continue to run the legacy path. A follow-up will thread plugin_registry.get_definition_provider through every consumer (mirrors the P4 fact-decomposition plugin-then-wire sequencing: feat(plugins): backend-engine-fact-decomposition plugin (Phase 4 #44) #279feat(frontend): earth-tone theme, dark/light toggle, synthesis page improvements #44).

Test plan

  • uv run --project plugins/backend-engine-definition pytest -x -v (10 contract tests green)
  • uv run --project libs/kt-config pytest -x -v (236 green — registration doesn't regress registry)
  • uv run --frozen ruff format --check . / ruff check .
  • Pre-push hook ran full unit test suite across 14 libs + 7 services + 2 plugins — all green

🤖 Generated with Claude Code

Ships `plugins/backend-engine-definition/` as the first Phase-5 provider
plugin — a new internal plugin that contributes the `default`
`NodeDefinitionProvider` behind `GraphTypeComposition.definition` on
the default graph type.

The `DefaultNodeDefinitionProvider` wraps the LLM definition-synthesis
flow today's `DefinitionPipeline.generate_definition` runs inline
(`services/worker-nodes/.../pipelines/definitions/pipeline.py`) so
registry-driven dispatch resolves to an identical prompt/LLM call —
zero behaviour change for existing graphs.

The provider is stateless: caller pre-fetches dimensions and passes
them through `NodeDefinitionContext.options['dimensions']`. Keeps a
graph-engine handle out of the ABC while matching the legacy pipeline's
skip-path contract (no dims / empty LLM output / gateway exception
→ returns `None`, caller keeps previous definition).

Registered in `kt_config.plugin.load_default_plugins` alongside the
existing built-in plugins. No worker wiring in this PR — the
`DefinitionPipeline` call sites continue to run the legacy path until
a follow-up threads `plugin_registry.get_definition_provider` through
every consumer (mirrors the P4 fact-decomposition plugin-then-wire
sequencing in #279#44).

Tests: 10 contract tests pinning plugin identity, `is_enabled` default,
contribution id, registry round-trip, and provider semantics
(empty-dims skip, dict/ORM dim rendering, `options` model override,
empty-LLM skip, gateway-exception skip).
@charlie83Gs charlie83Gs merged commit 5ce0a58 into main Apr 21, 2026
30 checks passed
@charlie83Gs charlie83Gs deleted the feat/backend-engine-definition-plugin branch April 21, 2026 17:42
@github-actions
Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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