Skip to content

feat: integrate ritus frontend - #41

Merged
dinh-pham-optimizely merged 3 commits into
mainfrom
feat/integrate-ritus-frontend
Aug 4, 2026
Merged

feat: integrate ritus frontend#41
dinh-pham-optimizely merged 3 commits into
mainfrom
feat/integrate-ritus-frontend

Conversation

@dinh-pham-optimizely

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The change adds companion manifest discovery and session-context injection, configures the session-start hook, documents companion integrations, registers the frontend marketplace plugin, and updates the plugin version to 2.1.0.

Changes

Companion plugin integration

Layer / File(s) Summary
Companion manifest discovery and context generation
scripts/companion-bootstrap.ts
Adds manifest discovery from configured and plugin locations. The script validates, sorts, and formats companions for Copilot CLI or Claude session context.
Session-start hook and companion guidance
hooks/hooks.json, docs/COMPANION_PLUGINS.md
Runs the bootstrap script for supported session lifecycle events. Documents manifest structure, discovery rules, integrations, examples, and verification.
Marketplace registration and version updates
.claude-plugin/marketplace.json, .claude-plugin/plugin.json, marketplace.json, package.json
Registers ritus-frontend in the marketplace and updates the Ritus version from 2.0.9 to 2.1.0.
Legacy manifest removal
.github/plugin/plugin.json
Removes the previous GitHub plugin manifest and its metadata configuration.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided, so the change scope and implementation details are not documented. Add a brief description of the frontend plugin integration, companion bootstrap changes, and related documentation updates.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: integrating the Ritus frontend companion plugin.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/COMPANION_PLUGINS.md`:
- Around line 19-20: Update the requirements text in COMPANION_PLUGINS.md to
state that the registry refreshes for every configured SessionStart lifecycle
event, rather than only on a new session. Preserve the existing Bun PATH
requirement and hook-at-session-start context.
- Around line 38-43: Update the integrations field description in the manifest
schema table to state that it must be a nonempty array containing at least one
entry, matching the validation enforced by validateManifest.

In `@scripts/companion-bootstrap.ts`:
- Around line 93-103: Update the directory traversal around the marketplace and
plugin `readdirSync` calls to catch read errors independently for each
directory, including failures after `isDirectory()` succeeds. Continue scanning
remaining marketplace and plugin directories when a read fails, while preserving
the existing manifest limit checks and registry emission.
- Around line 127-129: Update the manifest discovery flow around
addManifestInDir to remove the cwd lookup and retain only projectRoot,
preserving projectRoot’s existing fallback to cwd when CLAUDE_PROJECT_DIR is
unset.
🪄 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: ASSERTIVE

Plan: Pro Plus

Run ID: 6b643d12-ebc1-4846-854a-ed00a3a802e5

📥 Commits

Reviewing files that changed from the base of the PR and between a3d8c05 and 1d8d45f.

📒 Files selected for processing (5)
  • .claude-plugin/marketplace.json
  • .github/plugin/plugin.json
  • docs/COMPANION_PLUGINS.md
  • hooks/hooks.json
  • scripts/companion-bootstrap.ts
💤 Files with no reviewable changes (1)
  • .github/plugin/plugin.json

Comment thread docs/COMPANION_PLUGINS.md Outdated
Comment thread docs/COMPANION_PLUGINS.md
Comment thread scripts/companion-bootstrap.ts Outdated
Comment thread scripts/companion-bootstrap.ts Outdated

Copilot AI left a comment

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.

Pull request overview

This PR adds a “companion plugin” mechanism to Ritus by discovering ritus-companion.json manifests at session start and injecting a consolidated “Ritus Companion Registry” into the agent’s context, and it registers the ritus-frontend plugin in the Claude marketplace config.

Changes:

  • Added a Bun-based SessionStart bootstrap script to discover and load companion manifests and format a registry context block.
  • Added a Claude hooks configuration to run the bootstrap at session start.
  • Added documentation for authoring/discovering companion manifests, and registered ritus-frontend in .claude-plugin/marketplace.json (while removing the legacy .github/plugin/plugin.json).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/companion-bootstrap.ts Discovers/validates companion manifests and injects a formatted registry into session context.
hooks/hooks.json Runs the bootstrap script on SessionStart hook events.
docs/COMPANION_PLUGINS.md Documents companion manifest format, discovery rules, and usage examples.
.github/plugin/plugin.json Removed legacy plugin manifest file.
.claude-plugin/marketplace.json Adds ritus-frontend plugin entry to the marketplace list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/companion-bootstrap.ts
Comment thread hooks/hooks.json
Comment thread .claude-plugin/marketplace.json
Comment thread scripts/companion-bootstrap.ts Outdated
- companion-bootstrap: add readDirSafe() so an unreadable or removed plugin
  sibling dir no longer aborts registry discovery
- companion-bootstrap: restrict discovery to the project root, dropping the
  extra cwd scan that allowed nested-subdir manifest injection
- companion-bootstrap: print manifest names only, pruning absolute paths from
  the injected registry (and the now-unused LoadedCompanion.path field)
- docs(COMPANION_PLUGINS): note the registry refreshes on each configured
  SessionStart event; mark integrations as a nonempty array
- marketplace: bump ritus to 2.1.0

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.claude-plugin/marketplace.json (1)

16-23: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Use one canonical ritus-frontend manifest in the release.

.claude-plugin/marketplace.json points ritus-frontend to main, while marketplace.json points the same plugin and version to feat/ritus-frontend-plugin. If both manifests are part of the same release, use the same release ref so consumers do not install different plugin revisions for the same version.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude-plugin/marketplace.json around lines 16 - 23, Align the
ritus-frontend source ref in both marketplace manifests: update
.claude-plugin/marketplace.json at lines 16-23 and marketplace.json at lines
18-25 to use the same release ref, specifically feat/ritus-frontend-plugin,
while keeping the plugin name and version unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.claude-plugin/marketplace.json:
- Around line 16-23: Align the ritus-frontend source ref in both marketplace
manifests: update .claude-plugin/marketplace.json at lines 16-23 and
marketplace.json at lines 18-25 to use the same release ref, specifically
feat/ritus-frontend-plugin, while keeping the plugin name and version unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 60b99e34-bf2d-4648-8a03-520545704e4a

📥 Commits

Reviewing files that changed from the base of the PR and between 1d8d45f and 148feb1.

📒 Files selected for processing (6)
  • .claude-plugin/marketplace.json
  • .claude-plugin/plugin.json
  • docs/COMPANION_PLUGINS.md
  • marketplace.json
  • package.json
  • scripts/companion-bootstrap.ts

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Suppressed comments (2)

hooks/hooks.json:10

  • hooks.json hardcodes ${CLAUDE_PLUGIN_ROOT} for locating the bootstrap script, but the rest of the repo treats GitHub Copilot as providing PLUGIN_ROOT (see skills/setup/SKILL.md:447-448 and scripts/companion-bootstrap.ts:128). In environments where only PLUGIN_ROOT is set, this hook will fail to find the script and the companion registry will never load.
            "command": "bun \"${CLAUDE_PLUGIN_ROOT}/scripts/companion-bootstrap.ts\"",

scripts/companion-bootstrap.ts:129

  • pluginRoot discovery relies only on environment variables. If this script is invoked in a context where neither CLAUDE_PLUGIN_ROOT nor PLUGIN_ROOT is set (e.g. manual debugging, or a hook runner that doesn't export them), companion plugin discovery will be silently skipped. Since the script itself lives under <pluginRoot>/scripts/, it can fall back to the parent directory of import.meta.dirname.
  const projectRoot = process.env.CLAUDE_PROJECT_DIR || cwd;
  const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT || process.env.PLUGIN_ROOT;

@dinh-pham-optimizely
dinh-pham-optimizely merged commit c07684f into main Aug 4, 2026
4 checks passed
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.

2 participants