-
Notifications
You must be signed in to change notification settings - Fork 18
Feat/onboarding_agent using bazel #177
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 all commits
3771737
64392fd
96f11c0
7b5bedf
b4dc3c6
4ee1a3d
b44312f
92ff037
4daa01a
47533a1
6ead14b
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,30 @@ | ||
| <!-- | ||
| ******************************************************************************* | ||
| Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
|
|
||
| See the NOTICE file(s) distributed with this work for additional | ||
| information regarding copyright ownership. | ||
|
|
||
| This program and the accompanying materials are made available under the | ||
| terms of the Apache License Version 2.0 which is available at | ||
| https://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| SPDX-License-Identifier: Apache-2.0 | ||
| ******************************************************************************* | ||
| --> | ||
|
|
||
| # Eclipse S-CORE | ||
|
|
||
| Start onboarding: `/sdlc` (or `bazel run @score_onboarding//tools/onboarding:sdlc`) | ||
|
|
||
| The onboarding agent (`tools/onboarding/`): | ||
| - identifies repository context (ASIL, languages, toolchains, build/docs system) | ||
| - classifies your contribution (bug fix, improvement, PoC, documentation, feature, question) | ||
| - recommends a workflow (SDLC Harness, Technical Analysis, Issue Planning, Traditional) | ||
| - writes a single context contract to `.onboarding/context.json` | ||
|
|
||
| See [`tools/onboarding/tools/onboarding/agent/onboarding.skill.md`](tools/onboarding/tools/onboarding/agent/onboarding.skill.md) | ||
| for the full skill definition. | ||
|
|
||
| See [`CONTRIBUTION.md`](CONTRIBUTION.md) for contribution rules, PR/issue | ||
| templates, and the ECA/DCO signing requirement. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 8.7.0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| # Nested Bazel module so other repos can depend on the onboarding agent | ||
| # directly, e.g.: | ||
| # bazel_dep(name = "score_onboarding", version = "0.1.0") | ||
| # bazel run @score_onboarding//tools/onboarding:sdlc | ||
| module( | ||
| name = "score_onboarding", | ||
| version = "0.1.0", | ||
| ) | ||
|
|
||
| # Needed to resolve py_library/py_binary/py_test macros; toolchain | ||
| # registration is the consuming (root) module's responsibility. | ||
| bazel_dep(name = "rules_python", version = "1.8.5") |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test") | ||
|
|
||
| package(default_visibility = ["//visibility:public"]) | ||
|
|
||
| py_library( | ||
| name = "onboarding_lib", | ||
| srcs = [ | ||
| "__init__.py", | ||
| "cli.py", | ||
| "discovery.py", | ||
| "models.py", | ||
| "output.py", | ||
| "recommendation.py", | ||
| "state_machine.py", | ||
| "validators.py", | ||
| ], | ||
| data = [ | ||
| "agent/onboarding.agent.yaml", | ||
| "agent/onboarding.skill.md", | ||
| "schemas/context.schema.json", | ||
| ], | ||
| imports = ["../.."], | ||
| ) | ||
|
|
||
| py_binary( | ||
| name = "sdlc", | ||
| srcs = ["__main__.py"], | ||
| main = "__main__.py", | ||
| deps = [":onboarding_lib"], | ||
| ) | ||
|
|
||
| [ | ||
| py_test( | ||
| name = test_file.removesuffix(".py"), | ||
| srcs = [test_file], | ||
| deps = [":onboarding_lib"], | ||
| ) | ||
| for test_file in [ | ||
| "tests/test_state_machine.py", | ||
| "tests/test_discovery.py", | ||
| "tests/test_recommendation.py", | ||
| "tests/test_output.py", | ||
| ] | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| """Minimal onboarding agent: collects context, discovers repo, routes workflow.""" | ||
|
|
||
| from .models import ContextEnvelope, ContributorProfile, RepositoryContext, WorkItem, WorkflowSelection | ||
|
|
||
| __all__ = [ | ||
| "ContextEnvelope", | ||
| "ContributorProfile", | ||
| "RepositoryContext", | ||
| "WorkItem", | ||
| "WorkflowSelection", | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| import sys | ||
|
|
||
| # Absolute import: Bazel's py_binary stub runs this file as a top-level | ||
| # script, so `__package__` is empty and relative imports fail. | ||
| from tools.onboarding.cli import cli | ||
|
|
||
| if __name__ == "__main__": | ||
| cli(sys.argv[1:]) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| <!-- | ||
| ******************************************************************************* | ||
| Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
|
|
||
| See the NOTICE file(s) distributed with this work for additional | ||
| information regarding copyright ownership. | ||
|
|
||
| This program and the accompanying materials are made available under the | ||
| terms of the Apache License Version 2.0 which is available at | ||
| https://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| SPDX-License-Identifier: Apache-2.0 | ||
| ******************************************************************************* | ||
| --> | ||
|
|
||
| # Onboarding Skill | ||
|
|
||
| Single entry point into the Eclipse S-CORE AI SDLC ecosystem. Collects | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. S-CORE AI SLDC does not exist, must be defined and shall be follow S-CORE process_description |
||
| context, classifies the contribution, recommends a workflow, and hands off — | ||
| it does not execute SDLC Harness, Technical Analysis, or Planning itself. | ||
|
|
||
| ## Role Detection | ||
| Ask the contributor for their role: `developer`, `reviewer`, `maintainer`, or | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where comes these roles from? S-CORE roles are defined here https://eclipse-score.github.io/process_description/main/roles/index.html#project-roles-list |
||
| `committer`. Returning contributors may skip the introduction. | ||
|
|
||
| ## Repository Discovery | ||
| Read (never execute) `MODULE.bazel`, `project_config.bzl`, `README.md`, and | ||
| `CONTRIBUTION.md` at the repository root. Extract: repository name, module, | ||
| ASIL level, declared languages, build system. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ASIL Level is declared in the sphinx model |
||
|
|
||
| ## Technology Discovery | ||
| From `MODULE.bazel`, detect toolchains by dependency name: | ||
| - `rules_rust` → Rust | ||
| - `rules_cc` → C++ | ||
| - `toolchains_llvm` → LLVM | ||
| - `qnx` (in `MODULE.bazel` or `scripts/`) → QNX | ||
|
|
||
| ## Contribution Classification | ||
| Ask for the contribution type: `bug_fix`, `improvement`, `poc`, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not S-CORE definition, we have Feature Requests, Component Requests, etc., check for contribution guidelines |
||
| `documentation`, `feature`, or `question`. | ||
|
|
||
| ## Workflow Recommendation | ||
| Map contribution type to a workflow (see `recommendation.py`): | ||
| - `bug_fix` → SDLC Harness | ||
| - `improvement` → SDLC Harness | ||
| - `poc` → SDLC Harness | ||
| - `documentation` → Traditional | ||
| - otherwise → Technical Analysis / Issue Planning | ||
|
|
||
| If the repository's ASIL level is not `QM`, always recommend SDLC Harness | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qm also must fulfill traceability, please follow S-CORE process_description and do not invent a new workflow |
||
| regardless of contribution type, since safety-relevant work requires full | ||
| traceability. The contributor may always override the recommendation. | ||
|
|
||
| ## Guardrails | ||
| - Never write outside `.onboarding/context.json`. | ||
| - Never auto-start a downstream agent; always require explicit confirmation. | ||
| - Never fabricate repository metadata that discovery could not detect — | ||
| surface it as `"Unknown"` and let the contributor confirm/correct it. | ||
|
|
||
| ## Open-source contribution rules | ||
| Point contributors to `CONTRIBUTION.md` for PR/issue templates, the ECA/DCO | ||
| signing requirement, and commit message rules before any handoff. | ||
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.
What is the meaning of SDLC ? Software Development Life Cycle ?