-
Notifications
You must be signed in to change notification settings - Fork 10.9k
feat: update Bob integration to skills-based layout for Bob 2.0 #3415
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
Open
davidebibm
wants to merge
23
commits into
github:main
Choose a base branch
from
davidebibm:feat/update-bob-skills-integration
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.
+1,032
−62
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
b01f1f6
feat: update Bob integration to skills-based layout for Bob 2.0
davidebibm e893245
Merge remote-tracking branch 'origin/main' into feat/update-bob-skill…
davidebibm dea23f0
PR comments fix: keep old Bob 1 commands till next release
davidebibm 1c3d1cf
Copilot suggested change
davidebibm 674a8db
feat(bob): address copilot comments, make skills layout default, demo…
davidebibm 71ba3b9
fix(bob): honor legacy_commands in ai_skills persistence and add bob …
davidebibm d5e0e95
Copilot suggestion
davidebibm 3679697
fix(bob): extend IntegrationBase directly to avoid false isinstance(S…
davidebibm 64c0b9d
fix(lint): remove unused SkillsIntegration import from _helpers.py
davidebibm 6ab8d61
Copilot suggested change
davidebibm 7edf5b5
feat(bob): add bob skills integration with registrar-based mode detec…
davidebibm 68bb876
address 3 comments from copilot
davidebibm f47ab61
feat(bob): update registrar config to use legacy commands layout
davidebibm d851289
fix lint
davidebibm 73725c5
Suggested fix from Copilot
davidebibm 230b287
Merge branch 'main' into feat/update-bob-skills-integration
davidebibm c6edc66
fix pr comment
davidebibm ef2cb53
fix pr comment
davidebibm cad76d3
fix pr comment
davidebibm 5a8cb61
refactor(bob): resolve skills mode via base-class hooks + fix command…
mnriem 04278b2
Merge remote-tracking branch 'origin/main' into mnriem-review-bob-ski…
mnriem d929bfb
fix(bob,copilot): address review — preserve legacy layout, dual-mode …
mnriem 8a162b3
fix(bob): resolve command-ref separator with project-aware mode befor…
mnriem 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
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 |
|---|---|---|
|
|
@@ -637,6 +637,23 @@ def register_commands( | |
| is_cline_ext = agent_name == "cline" and source_id != "core" | ||
| source_root = source_dir.resolve() | ||
|
|
||
| # Resolve the command-reference separator once for this agent/project. | ||
| # Dual-layout agents (e.g. Bob) use different separators for their | ||
| # skills vs command layouts, so we ask the integration to map the | ||
| # project's persisted skills state to the correct separator rather than | ||
| # relying on the single static AGENT_CONFIGS value. | ||
| _sep = agent_config.get("invoke_separator", ".") | ||
| try: | ||
| from specify_cli.integrations import get_integration # noqa: PLC0415 | ||
|
|
||
| _integ = get_integration(agent_name) | ||
| if _integ is not None: | ||
| _sep = _integ.invoke_separator_for_mode( | ||
| is_ai_skills_enabled(load_init_options(project_root)) | ||
| ) | ||
|
Comment on lines
+651
to
+653
Author
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. @mnriem is it valid? |
||
| except Exception: | ||
| pass | ||
|
|
||
| for cmd_info in commands: | ||
| cmd_name = cmd_info["name"] | ||
| aliases = cmd_info.get("aliases", []) | ||
|
|
@@ -709,13 +726,15 @@ def register_commands( | |
| ) | ||
|
|
||
| # Resolve __SPECKIT_COMMAND_*__ tokens using the agent's invoke separator. | ||
| # The separator is sourced from agent_config (populated by _build_agent_configs, | ||
| # which propagates each integration's invoke_separator class attribute). | ||
| # For dual-layout agents (e.g. Bob) the separator differs between the | ||
| # skills and command layouts, so a single static AGENT_CONFIGS value is | ||
| # insufficient. Resolve it from the integration using the project's | ||
| # persisted skills state; single-layout agents fall back to the static | ||
| # AGENT_CONFIGS value unchanged (invoke_separator_for_mode default). | ||
| # Deferred import of IntegrationBase avoids a circular import at module load | ||
| # (base.py itself imports CommandRegistrar lazily). | ||
| from specify_cli.integrations.base import IntegrationBase # noqa: PLC0415 | ||
|
|
||
| _sep = agent_config.get("invoke_separator", ".") | ||
| body = IntegrationBase.resolve_command_refs(body, _sep) | ||
|
|
||
| output_name = self._compute_output_name(agent_name, cmd_name, agent_config) | ||
|
|
||
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.