Skip to content

Bob coding assistant support#886

Open
rdruss wants to merge 8 commits intoFission-AI:mainfrom
rdruss:feat/bob-support
Open

Bob coding assistant support#886
rdruss wants to merge 8 commits intoFission-AI:mainfrom
rdruss:feat/bob-support

Conversation

@rdruss
Copy link
Copy Markdown

@rdruss rdruss commented Mar 27, 2026

Add support for IBM's AI coding assistant, Bob, to OpenSpec

Summary by CodeRabbit

  • New Features

    • Bob Shell is now a supported tool for generating commands and installing skills.
  • Chores

    • Added Bob Shell config directory to ignore rules.
    • Updated documentation to list Bob Shell and increased supported-tools count from 20+ to 25+.
  • Tests

    • Added tests covering Bob Shell command formatting, file paths, and YAML escaping.

rdruss added 7 commits March 27, 2026 13:13
- Add 7 tests covering toolId, file paths, formatting, and edge cases
- Include Bob Shell adapter in cross-platform path handling tests
- All 89 adapter tests now passing
- Ensures Bob Shell adapter works correctly with all 11 workflows
- Implement Bob Shell command adapter with YAML frontmatter
- Register adapter in CommandAdapterRegistry
- Export adapter from adapters/index.ts
- Add Bob Shell to AI_TOOLS configuration
- Generates commands in .bob/commands/opsx-<id>.md format
- Supports all 11 workflows via custom profile system
- Add Bob Shell to README.md supported tools list
- Update docs/supported-tools.md with Bob Shell entry
- Document .bob/commands/opsx-<id>.md command path pattern
- Note that Bob Shell uses commands, not Agent Skills spec
- Add comprehensive proposal for Bob Shell integration
- Document command structure and file format
- Include implementation plan and success criteria
- Preserve change documentation for future reference
- Update package-lock.json with latest dependencies
- Add .bob/ to gitignore (test output directory)
@rdruss rdruss requested a review from TabishB as a code owner March 27, 2026 20:15
Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cfa117f3-7f8e-4bee-9675-e6da9a674c94

📥 Commits

Reviewing files that changed from the base of the PR and between e99889d and 0da36ff.

📒 Files selected for processing (1)
  • docs/supported-tools.md

📝 Walkthrough

Walkthrough

Adds Bob Shell as a supported command-generation tool: new adapter implementation, registration in the adapter registry, config and docs updates, tests, and .bob/ ignored in .gitignore.

Changes

Cohort / File(s) Summary
Ignore & Docs
\.gitignore, README.md, docs/supported-tools.md
Added .bob/ to .gitignore, updated README tool count to "25+ tools", and documented bob with skills/commands install path patterns and tool ID in supported tools page.
Configuration
src/core/config.ts
Added Bob Shell entry to AI_TOOLS with value: "bob" and skillsDir: ".bob".
Adapter Implementation
src/core/command-generation/adapters/bob.ts
New bobAdapter implementing ToolCommandAdapter with toolId: 'bob', getFilePath(commandId).bob/commands/opsx-<id>.md, and formatFile producing Markdown with YAML frontmatter description (escaped) and the command body.
Adapter Exports & Registry
src/core/command-generation/adapters/index.ts, src/core/command-generation/registry.ts
Re-exported bobAdapter from adapters index and registered it in the built-in adapter registry.
Tests
test/core/command-generation/adapters.test.ts
Added bobAdapter tests: verifies toolId, file path format, YAML frontmatter formatting and escaping (quotes, newlines), and inclusion in shared path-join assertions.

Sequence Diagram(s)

sequenceDiagram
  participant CLI as "CLI/Invoker"
  participant Gen as "CommandGenerator"
  participant Reg as "AdapterRegistry"
  participant Adapter as "bobAdapter"
  participant FS as "Filesystem"

  CLI->>Gen: request generate command (id, content)
  Gen->>Reg: resolve adapter for toolId 'bob'
  Reg-->>Gen: returns bobAdapter
  Gen->>Adapter: getFilePath(commandId)
  Adapter-->>Gen: ".bob/commands/opsx-<id>.md"
  Gen->>Adapter: formatFile(content)
  Adapter-->>Gen: Markdown with YAML frontmatter
  Gen->>FS: write file at path with formatted content
  FS-->>Gen: write result / success
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A rabbit hops into .bob/ light,
New adapter stitched, YAML tucked tight,
Commands find homes in opsx files bright,
Quotes escaped, skills take flight,
Twenty-five tools now dance tonight.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Bob coding assistant support' clearly and concisely summarizes the main change: adding support for IBM's Bob Shell coding assistant to OpenSpec.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
README.md (1)

106-106: Prefer count-agnostic wording to avoid future drift.

Line 106 hardcodes “25+ tools,” which can get out of sync with other README sections and docs. Consider wording that doesn’t require manual recounts.

📝 Suggested edit
-> Not sure if your tool is supported? [View the full list](docs/supported-tools.md) – we support 25+ tools and growing.
+> Not sure if your tool is supported? [View the full list](docs/supported-tools.md) – we support many tools and growing.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 106, Replace the hardcoded phrase "25+ tools" in the
README line that reads "Not sure if your tool is supported? [View the full
list](docs/supported-tools.md) – we support 25+ tools and growing." with
count-agnostic wording such as "many tools," "a growing list of tools," or
"dozens of tools" to avoid drift; update the text surrounding the link so it
reads e.g. "Not sure if your tool is supported? View the full list — we support
a growing roster of tools." and ensure the link target (docs/supported-tools.md)
remains unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/core/command-generation/adapters/bob.ts`:
- Around line 15-21: The escapeYamlValue function currently replaces
backslashes, double quotes, and newlines but omits carriage returns; update
escapeYamlValue so it also escapes '\r' when serializing YAML (e.g., add a
replacement for /\r/g to produce '\\r' in the same escape chain used for
value.replace(...)). Ensure the function still wraps the escaped string in
double quotes and preserves the existing escapes for backslashes, quotes, and
newlines.

---

Nitpick comments:
In `@README.md`:
- Line 106: Replace the hardcoded phrase "25+ tools" in the README line that
reads "Not sure if your tool is supported? [View the full
list](docs/supported-tools.md) – we support 25+ tools and growing." with
count-agnostic wording such as "many tools," "a growing list of tools," or
"dozens of tools" to avoid drift; update the text surrounding the link so it
reads e.g. "Not sure if your tool is supported? View the full list — we support
a growing roster of tools." and ensure the link target (docs/supported-tools.md)
remains unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a0738528-ec68-436f-96bb-9f5c7832c974

📥 Commits

Reviewing files that changed from the base of the PR and between afdca0d and e99889d.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • .gitignore
  • README.md
  • docs/supported-tools.md
  • src/core/command-generation/adapters/bob.ts
  • src/core/command-generation/adapters/index.ts
  • src/core/command-generation/registry.ts
  • src/core/config.ts
  • test/core/command-generation/adapters.test.ts

Comment on lines +15 to +21
function escapeYamlValue(value: string): string {
// Check if value needs quoting (contains special YAML characters or starts/ends with whitespace)
const needsQuoting = /[:\n\r#{}[\],&*!|>'"%@`]|^\s|\s$/.test(value);
if (needsQuoting) {
// Use double quotes and escape internal double quotes and backslashes
const escaped = value.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n');
return `"${escaped}"`;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Escape \r as well when serializing YAML description.

escapeYamlValue flags carriage returns at Line 17, but Line 20 doesn’t escape them. That can produce malformed or parser-dependent frontmatter on CRLF input.

🔧 Suggested fix
-    const escaped = value.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n');
+    const escaped = value
+      .replace(/\\/g, '\\\\')
+      .replace(/"/g, '\\"')
+      .replace(/\r/g, '\\r')
+      .replace(/\n/g, '\\n');
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
function escapeYamlValue(value: string): string {
// Check if value needs quoting (contains special YAML characters or starts/ends with whitespace)
const needsQuoting = /[:\n\r#{}[\],&*!|>'"%@`]|^\s|\s$/.test(value);
if (needsQuoting) {
// Use double quotes and escape internal double quotes and backslashes
const escaped = value.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n');
return `"${escaped}"`;
function escapeYamlValue(value: string): string {
// Check if value needs quoting (contains special YAML characters or starts/ends with whitespace)
const needsQuoting = /[:\n\r#{}[\],&*!|>'"%@`]|^\s|\s$/.test(value);
if (needsQuoting) {
// Use double quotes and escape internal double quotes and backslashes
const escaped = value
.replace(/\\/g, '\\\\')
.replace(/"/g, '\\"')
.replace(/\r/g, '\\r')
.replace(/\n/g, '\\n');
return `"${escaped}"`;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/command-generation/adapters/bob.ts` around lines 15 - 21, The
escapeYamlValue function currently replaces backslashes, double quotes, and
newlines but omits carriage returns; update escapeYamlValue so it also escapes
'\r' when serializing YAML (e.g., add a replacement for /\r/g to produce '\\r'
in the same escape chain used for value.replace(...)). Ensure the function still
wraps the escaped string in double quotes and preserves the existing escapes for
backslashes, quotes, and newlines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant