-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add OSOP workflow example — automated code review pipeline #13727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
f7c1093
ff689d0
7795074
5b2bf02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # OSOP Workflow Examples for Semantic Kernel | ||
|
|
||
| [OSOP](https://github.com/osopcloud/osop-spec) (Open Standard for Orchestration Protocols) is a portable YAML format for describing AI workflows — think OpenAPI, but for agent orchestration. | ||
|
|
||
| ## What's Here | ||
|
|
||
| | File | Description | | ||
| |------|-------------| | ||
| | `code-review-pipeline.osop.yaml` | Automated PR review: fetch diff, parallel analysis (complexity + security + tests), generate review, post comments | | ||
|
|
||
| ## Why OSOP? | ||
|
|
||
| Semantic Kernel provides powerful AI orchestration with plugins, planners, and agents. OSOP provides a **framework-agnostic way to describe** those orchestration patterns so they can be: | ||
|
|
||
| - **Documented** — readable YAML that non-developers can understand | ||
| - **Validated** — check workflow structure before execution | ||
| - **Ported** — same workflow definition works across Semantic Kernel, LangChain, AutoGen, etc. | ||
| - **Visualized** — render the workflow as a graph in the [OSOP Editor](https://github.com/osopcloud/osop-editor) | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ```bash | ||
| # Validate the workflow | ||
| pip install osop | ||
| osop validate code-review-pipeline.osop.yaml | ||
|
|
||
| # Or just read the YAML — it's self-documenting | ||
| cat code-review-pipeline.osop.yaml | ||
| ``` | ||
|
|
||
| ## How It Maps to Semantic Kernel | ||
|
|
||
| | OSOP Concept | Semantic Kernel Equivalent | | ||
| |---|---| | ||
| | `node` with `type: agent` | `ChatCompletionAgent` / `OpenAIAssistantAgent` | | ||
| | `node` with `type: api` | Native function / Plugin | | ||
| | `edge` with `mode: parallel` | Parallel plugin execution | | ||
| | `edge` with `mode: conditional` | `KernelFunction` with conditional logic | | ||
| | `config.plugins` | Semantic Kernel plugins | | ||
|
|
||
| ## Learn More | ||
|
|
||
| - [OSOP Spec](https://github.com/osopcloud/osop-spec) — full specification | ||
| - [OSOP Examples](https://github.com/osopcloud/osop-examples) — 30+ workflow templates | ||
| - [OSOP Editor](https://github.com/osopcloud/osop-editor) — visual workflow editor | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,100 @@ | ||||||||||||||||||||||||||
| # Semantic Kernel Automated Code Review — OSOP Portable Workflow | ||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||
| # AI-powered PR review: fetch the diff, analyze complexity and patterns | ||||||||||||||||||||||||||
| # in parallel, generate a structured review, post comments on GitHub, | ||||||||||||||||||||||||||
| # and request changes if critical issues are found. | ||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||
| # Run with Semantic Kernel or validate: osop validate semantic-kernel-code-review.osop.yaml | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| # Run with Semantic Kernel or validate: osop validate semantic-kernel-code-review.osop.yaml | |
| # Run with Semantic Kernel or validate: osop validate code-review-pipeline.osop.yaml |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filename in the comment doesn't match the actual file. Should be code-review-pipeline.osop.yaml.
| # Run with Semantic Kernel or validate: osop validate semantic-kernel-code-review.osop.yaml | |
| # Run with Semantic Kernel or validate: osop validate code-review-pipeline.osop.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check_tests is the only agent node without a config.model field. All other type: agent nodes specify a model; omitting it here creates an inconsistent and incomplete workflow definition.
| - id: "check_tests" | |
| type: "agent" | |
| subtype: "llm" | |
| name: "Check Test Coverage" | |
| description: "Verify new code paths have corresponding test cases." | |
| - id: "check_tests" | |
| type: "agent" | |
| subtype: "llm" | |
| name: "Check Test Coverage" | |
| description: "Verify new code paths have corresponding test cases." | |
| config: | |
| model: "gpt-4o" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
osoppackage on PyPI has no author, summary, homepage, or project URLs. Recommendingpip install osopin an official Microsoft repo without vetting this package is a trust and supply-chain risk. At minimum, pin to a specific version and verify the package provenance before publishing this.