You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a Workspace Context plugin for editing agent instructions and skills - #51874
Open Context, choose an agent, and click its instructions or a skill. Orca opens the original Markdown file for editing. The sidebar shows whether a file belongs to this workspace or to the user.
What Changed
Added an opt-in example under examples/plugins/workspace-context. It follows the selected local workspace and looks for Markdown files in the workspace and the current user's standard agent directories.
Context → Instructions or Skills → select a file
Source in an Orca workspace → open or focus its Markdown tab
Shared source outside Orca workspaces → edit inline and save to the source
The plugin resolves symlinks before opening a file. A linked file can open in another registered workspace. The two Codex choices share a lookup. The other choices are Claude Code, Gemini CLI, Grok Build, and Hermes.
Why
The Files browser already edits project Markdown well. A person checking an agent's instructions also has to know which other directories to look in. Context brings those files into one list and reuses Orca's editor, including unsaved tabs and the user's preferred Markdown mode.
Linked Issue
This implements the local editing workflow in #14925. Parent-directory discovery remains open. PR #14875 proposes a broader built-in agent inventory. This contribution can be tried independently as an example plugin.
Visual Proof
Before · Files shows the project tree.
After · Context shows both Codex instruction files. Clicking the project copy opens its Markdown tab alongside the README.
Testing
Exercised the published Orca 1.4.274 macOS app in an isolated profile with a fresh home and project. Opened a project instruction, applied bold, reopened the dirty tab, saved, and verified the Markdown on disk. Also opened a skill and checked the inline editor for a personal instruction outside the workspace.
Both plugin tests passed. They cover empty profiles, project instruction fallbacks, opening a linked source, preserving the link on save, and refusing a stale draft.
The fallback regression test fails if the Claude or Hermes lookup change is removed. The save test checks the original file on disk.
Plugin validation, plugin check, TypeScript, and all 15 checks selected by pnpm check:changed passed against upstream main.
To try it, enable plugins and run orca plugin dev load . from the example directory. Approve the access Orca displays, then run orca plugin open local.workspace-context --panel context.
Performance
Opening the panel, switching workspaces, and refreshing scan the supported locations. Opening or saving a row rescans to confirm its source. Resolving a shared file can also check the other registered local workspace roots. Large skill collections may take longer. Typing in an open tab uses the regular editor.
Risk
Medium for people who enable the plugin. The trusted Node worker runs with the user's filesystem access. Saving a personal instruction can affect several projects. Inline saving rejects a changed digest and preserves symlinks. Disabling the plugin removes the panel. Edits already saved are ordinary file edits.
AI Disclosure
OpenAI Codex (GPT-6) helped implement and test the plugin and prepared this PR.
Review
Reviewed local path resolution, source validation before edits, workspace switching, and reuse of the native editor. The panel lists Markdown files present on disk. Agent versions, profiles, trust settings, and imports can affect what enters a particular session. Each user must enable and approve the example.
Agent skill upstream boundary
This change copies no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Desktop macOS was exercised. Windows and Linux use Node's platform-aware filesystem and path APIs and still need desktop verification. SSH, WSL, containers, mobile, custom profile homes, and full runtime context inspection are outside this example's coverage.
Checklist
Focused on one example plugin and registration of its test runner.
Described the workflow, implementation, and reason for the change.
Documented editing risk and how to disable the plugin.
Attached before and after captures from the same disposable project.
Reviewed correctness, security, and performance.
Considered platform, remote workspace, path, and shortcut behavior.
Ran local changed-code checks. Full product builds and suites are left to CI.
The pull request adds a Workspace Context Orca plugin. It discovers user- and project-level instruction files, rules, and skills for five tools. The panel lists and opens those sources, and supports inline edits with digest checks and symbolic-link handling. The changes also add plugin setup documentation, configuration, tests, and a CI runner entry for example-plugin tests.
Merge Risk: Low · up to 654ef
The example plugin works for its main flows, but a save can overwrite an edit made in another editor within a very short window. Some linked, nested, or Gemini-configured instruction files will not appear in the panel. These are bounded issues for an opt-in example, but they should be fixed or accepted explicitly.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: adding a Workspace Context plugin example for editing agent instructions and skills. The changeset adds the workspace-context plugin (panel, discovery, worker, protoco…
Description check
The description follows the repository template and covers each required section: ELI5, What Changed, Why, Linked Issue (#14925, with related PR #14875 noted), Visual Proof (before and after images), …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: adding a Workspace Context plugin example for editing agent instructions and skills. The changeset adds the workspace-context plugin (panel, discovery, worker, protocol, tests) and registers its test runner, so the title matches the primary change and is specific enough for a scanning teammate.
Full details: Description check
Explanation
The description follows the repository template and covers each required section: ELI5, What Changed, Why, Linked Issue (#14925, with related PR #14875 noted), Visual Proof (before and after images), Testing, Performance, Risk (Medium, with rollback via disabling the plugin), AI Disclosure, Review, upstream boundary, Notes, and Checklist. Its content matches the file-level summaries. Minor gaps: the 'Fixes #' line is replaced by 'implements ... #14925' rather than the template's closing keyword, and the Testing section reports the author's own runs without an independent check. The description is mostly complete, so it passes.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Allow links into other registered local workspaces.
If /projects/app/AGENTS.md links to /projects/shared/policy.md, this check removes the source unless a user-level entry already trusts that target. Registering /projects/shared does not help because discover receives no registered workspace roots. The documented cross-workspace opening path is therefore unreachable for this link. (raw.githubusercontent.com)
Include registered local workspace roots in the allowed-target check. Keep rejecting targets outside those roots unless an existing user-source rule permits them.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Discover rules in subdirectories.
A rule such as .claude/rules/backend/security.md never reaches add: backend fails the .md check, and this function does not visit it. Claude supports recursive rule directories, so the panel omits a standard instruction source. (code.claude.com)
Traverse rule subdirectories while retaining target containment checks. Track resolved directories to prevent symlink cycles. Keep direct .md files discoverable.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Apply Gemini's configured filenames to user instructions.
If ~/.gemini/settings.json sets context.fileName to "CONTEXT.md", the later loop uses that name only for project files. This line still lists ~/.gemini/GEMINI.md and omits ~/.gemini/CONTEXT.md. Gemini applies the configured filename to its global context file too. (geminicli.com)
Resolve the effective filenames before adding user instructions, then use them for both locations. Preserve GEMINI.md as the default when no override exists.
The reason will be displayed to describe this comment to others. Learn more.
Major · Data Integrity & Integration · Heavy lift
Close the gap between the digest check and the replacement in save.
The digest comparison at lines 133-135 and the rename at line 137 are separate operations. An external editor can write to target after the comparison and before the rename. The rename then replaces that external edit, and the save still reports success. The worker-local saving marker does not block external writers.
The window is short. The overwrite requires an external write during that interval. The result is silent loss of user content with no recovery path in the save flow, so the gap needs a fix.
Require that a save never replace a target whose content changed after the digest check. A save that detects such a change must reject and leave the target unchanged. Any change must keep the existing stale-draft rejection and the hard-link check. POSIX rename does not compare the target content, so a complete fix needs a design choice. The source does not establish which mechanism to use, so this comment does not prescribe one.
This branch has not been deployed
No deployments
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
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.
ELI5
Open Context, choose an agent, and click its instructions or a skill. Orca opens the original Markdown file for editing. The sidebar shows whether a file belongs to this workspace or to the user.
What Changed
Added an opt-in example under
examples/plugins/workspace-context. It follows the selected local workspace and looks for Markdown files in the workspace and the current user's standard agent directories.The plugin resolves symlinks before opening a file. A linked file can open in another registered workspace. The two Codex choices share a lookup. The other choices are Claude Code, Gemini CLI, Grok Build, and Hermes.
Why
The Files browser already edits project Markdown well. A person checking an agent's instructions also has to know which other directories to look in. Context brings those files into one list and reuses Orca's editor, including unsaved tabs and the user's preferred Markdown mode.
Linked Issue
This implements the local editing workflow in #14925. Parent-directory discovery remains open. PR #14875 proposes a broader built-in agent inventory. This contribution can be tried independently as an example plugin.
Visual Proof
Before · Files shows the project tree.
After · Context shows both Codex instruction files. Clicking the project copy opens its Markdown tab alongside the README.
Testing
pnpm check:changedpassed against upstream main.To try it, enable plugins and run
orca plugin dev load .from the example directory. Approve the access Orca displays, then runorca plugin open local.workspace-context --panel context.Performance
Opening the panel, switching workspaces, and refreshing scan the supported locations. Opening or saving a row rescans to confirm its source. Resolving a shared file can also check the other registered local workspace roots. Large skill collections may take longer. Typing in an open tab uses the regular editor.
Risk
Medium for people who enable the plugin. The trusted Node worker runs with the user's filesystem access. Saving a personal instruction can affect several projects. Inline saving rejects a changed digest and preserves symlinks. Disabling the plugin removes the panel. Edits already saved are ordinary file edits.
AI Disclosure
OpenAI Codex (GPT-6) helped implement and test the plugin and prepared this PR.
Review
Reviewed local path resolution, source validation before edits, workspace switching, and reuse of the native editor. The panel lists Markdown files present on disk. Agent versions, profiles, trust settings, and imports can affect what enters a particular session. Each user must enable and approve the example.
Agent skill upstream boundary
Notes
Desktop macOS was exercised. Windows and Linux use Node's platform-aware filesystem and path APIs and still need desktop verification. SSH, WSL, containers, mobile, custom profile homes, and full runtime context inspection are outside this example's coverage.
Checklist