-
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
Draft
aryansingh0012
wants to merge
6
commits into
eclipse-score:main
Choose a base branch
from
aryansingh0012:feat/onboarding-bazel-module
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3771737
feat: add onboarding Bazel module
aryansingh0012 64392fd
docs: describe onboarding module
aryansingh0012 96f11c0
Merge branch 'eclipse-score:main' into feat/onboarding-bazel-module
aryansingh0012 7b5bedf
chore: satisfy onboarding pre-commit checks
aryansingh0012 b4dc3c6
style: apply yamlfmt formatting
aryansingh0012 4ee1a3d
Update onboarding.agent.yaml
aryansingh0012 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <!-- | ||
| ******************************************************************************* | ||
| 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, SpecKit, BMAD, Technical Analysis, Issue Planning, Traditional) | ||
| - writes a single context contract to `.onboarding/context.json` | ||
| - recommends a handoff to the next agent — it never starts one automatically | ||
|
|
||
| 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. | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,6 +100,22 @@ bazel test //tests/... | |
|
|
||
| --- | ||
|
|
||
| ## Onboarding | ||
|
|
||
| The repository includes the `score_onboarding` Bazel module to guide | ||
| contributors into the appropriate Eclipse S-CORE SDLC workflow. From the | ||
|
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. What is the meaning of SDLC ? Software Development Life Cycle ? |
||
| repository root, start the interactive flow with: | ||
|
|
||
| ```sh | ||
| bazel run @score_onboarding//tools/onboarding:sdlc | ||
| ``` | ||
|
|
||
| The tool reads repository metadata, collects the contributor role and change | ||
| type, recommends a workflow, and writes the confirmed context to | ||
| `.onboarding/context.json`. It does not start downstream agents automatically. | ||
|
|
||
| --- | ||
|
|
||
| ## 🛠 Tools & Linters | ||
|
|
||
| The template integrates **tools and linters** from **centralized repositories** to ensure consistency across projects. | ||
|
|
||
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
Empty file.
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
| 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") |
Empty file.
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
| 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", | ||
| ] | ||
| ] |
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
| 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", | ||
| ] |
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
| 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:]) |
39 changes: 39 additions & 0 deletions
39
tools/onboarding/tools/onboarding/agent/onboarding.agent.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # ******************************************************************************* | ||
| # 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 | ||
| # ******************************************************************************* | ||
|
|
||
| description: "Type /sdlc or KICKOFF to start Eclipse S-CORE onboarding." | ||
| entry_point: "tools.onboarding.cli:cli" | ||
| skill: "onboarding.skill.md" | ||
|
|
||
| collects: | ||
| - role | ||
| - repository | ||
| - technology | ||
| - contribution_type | ||
| - workflow | ||
|
|
||
| produces: | ||
| - .onboarding/context.json | ||
|
|
||
| handoffs: | ||
| - label: Start Issue Planning | ||
| agent: plan-issue-creation | ||
| - label: Start Technical Analysis | ||
| agent: plan-tech-analysis | ||
| - label: Start PLAN | ||
| agent: plan-requirements | ||
| - label: Start CODE (PoC / Spike) | ||
| agent: code-design | ||
|
|
||
| notes: > | ||
| This agent only recommends a handoff. It never executes downstream agents automatically; the contributor must confirm before a handoff is started. |
63 changes: 63 additions & 0 deletions
63
tools/onboarding/tools/onboarding/agent/onboarding.skill.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| <!-- | ||
| ******************************************************************************* | ||
| 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 | ||
| context, classifies the contribution, recommends a workflow, and hands off — | ||
| it does not execute SDLC Harness, SpecKit, BMAD, Technical Analysis, or | ||
| Planning itself. | ||
|
|
||
| ## Role Detection | ||
| Ask the contributor for their role: `developer`, `reviewer`, `maintainer`, or | ||
| `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. | ||
|
|
||
| ## 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`, | ||
| `documentation`, `feature`, or `question`. | ||
|
|
||
| ## Workflow Recommendation | ||
| Map contribution type to a workflow (see `recommendation.py`): | ||
| - `bug_fix` → SDLC Harness | ||
| - `improvement` → SpecKit | ||
| - `poc` → BMAD | ||
| - `documentation` → Traditional | ||
| - otherwise → Technical Analysis / Issue Planning | ||
|
|
||
| If the repository's ASIL level is not `QM`, always recommend SDLC Harness | ||
| 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. |
Oops, something went wrong.
Oops, something went wrong.
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.
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 BMAD ? Breakthrough Method for Agile AI-Driven Development ?