feat(core): extension points for workflow resolution, orchestrator class, and CLI plugins - #99
Merged
Merged
Conversation
…r class, and CLI plugins Three small, behavior-preserving seams so downstream builds can extend ZO without editing core files. The default build registers nothing, so behavior is unchanged. - Orchestrator._resolve_phases(): extract the workflow-mode -> phase-factory lookup out of decompose_plan into an overridable method (logic identical). Subclasses can supply phases from another source and fall back to super(). - zo.extensions (new): get/set_orchestrator_class (the CLI instantiates a registered Orchestrator subclass if set) and a CLI plugin loader (register_cli_plugin + discovery of the "zo.commands" entry-point group). Broken plugins are logged and skipped. - cli.py: build() uses get_orchestrator_class() or Orchestrator; plugins load at import after all core commands are defined. No behavior change in the default build: zo --help, the orchestrator, and decompose_plan are identical. +8 tests; ruff clean; pytest green on 3.11 and 3.12; validate-docs clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Deploying zero-operators with
|
| Latest commit: |
f50eafb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://36c9147c.zero-operators.pages.dev |
| Branch Preview URL: | https://claude-workflow-extension-se.zero-operators.pages.dev |
SamPlvs
added a commit
that referenced
this pull request
Jul 5, 2026
test_cli_group_has_all_commands asserted strict equality on cli.commands, which contradicts the extension points shipped in #99: a downstream build installing a zo.commands entry-point plugin (the documented mechanism in zo.extensions.load_cli_plugins) adds commands and turns the CORE suite red in that environment with zero core changes. Assert subset instead — removals of core commands still fail; additions have always required updating the expected set anyway. 854 passed / 7 skipped on Python 3.11 AND 3.12, ruff clean, validate-docs 0 failures. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three small, behavior-preserving, generic extension points so downstream builds can extend ZO without editing core files. The default build registers nothing, so behavior is unchanged.
What changed
Orchestrator._resolve_phases()— extracted the workflow-mode → phase-factory lookup out ofdecompose_planinto an overridable method (logic identical). Subclasses can return phases from an alternative source and fall back tosuper()._resolve_phases().zo.extensions(new module) — the public extension surface:get/set_orchestrator_class()— the CLI instantiates a registeredOrchestratorsubclass if set, else the default.register_cli_plugin()+ discovery of thezo.commandsentry-point group — plugins are callablesregister(cli_group)that may add commands/options and/or set the orchestrator class. Broken plugins are logged and skipped, never breaking the core CLI.cli.py—build()resolves the orchestrator class via the hook; plugins load at import after all core commands are defined.Verified
zo --help, the orchestrator, anddecompose_planare identical when nothing is registered.ruff check src/clean;pytest826 passed / 7 skipped on Python 3.11 and 3.12;validate-docs.sh10/0.🤖 Generated with Claude Code