Skip to content

Fix bundled resource paths in skills and reviewers - #456

Open
asmirnov-ias wants to merge 2 commits into
google:mainfrom
asmirnov-ias:fix/plugin-root-path-resolution
Open

asmirnov-ias wants to merge 2 commits into
google:mainfrom
asmirnov-ias:fix/plugin-root-path-resolution

Conversation

@asmirnov-ias

@asmirnov-ias asmirnov-ias commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary of Key Changes

Under omp, every read through skill://<name>/ is confined to that skill's own folder, and .. traversal is rejected. EGM's bundled files — the shared execution instructions, the review standards in resources/document_standards/, the reviewer personas in agents/ — all sit at the plugin root, two directories above any skill folder. An omp agent that resolves those references relative to the skill finds nothing, and misreports the files as absent from the plugin; egm-draft ran without its mandatory execution constraints and reviewer personas could not read their standards. Closes #455.

This PR gives every remaining entry point an explicit path-resolution hint, all pointing at the single shared rule (the Plugin-Root Resource Paths section of resources/execution_instructions.md): resolve the physical plugin root — under omp by running realpath skill://<skill-name> or taking the physical path from the header of read skill://<skill-name> — then read bundled files by absolute path and pass spawned reviewers the absolute paths of their persona file and standard.

  • skills/egm-draft/SKILL.md: constraint 1 links the execution instructions and lists the per-harness ways to reach them (relative link, Claude Code ${CLAUDE_PLUGIN_ROOT}, pathless <SKILL>, omp realpath / read-header fallback).
  • skills/egm-review-loop/SKILL.md: a Plugin Root bullet in the path-resolution section resolves agents/{name}.md and resources/document_standards/{name}.md from the plugin root and requires absolute paths for spawned reviewers.
  • agents/zoom_out.md, agents/synthesizer.md: personas use the absolute paths from the caller, fall back to the omp read-header method when none were given, and report the miss instead of auditing or dispatching reviewers without the standard. The synthesizer guidance applies to both of its dispatch modes (BRAINSTORM swarm and REVIEW swarm).
  • docs/harnesses.md: the omp section documents the skill:// confinement and the physical-root resolution.

Contribution Type

Track: Bug Fix / Minor Patch

Note for triage: 34 changed lines across 4 core files (2 skills, 2 personas) plus one docs file — above the fewer-than-3-core-files bar because the defect spans exactly these entry points; every hint points at the one shared rule rather than adding per-skill variants.

Labels: none of docs, site, ci, deps applies.

Verification

Harness support change — host omp 18.20.3 on macOS arm64; EGM installed from the marketplace (omp plugin install egm@egm), full plugin tree present including resources/.

  • egm-brainstorm: not run.
  • egm-draft: failure reproduced from a user report on 18.20.3 (agent announced resources/execution_instructions.md "doesn't ship in the plugin" and drafted without the execution constraints). Post-fix end-to-end run not run — the installed plugin predates the change; the resolution mechanism is verified below.
  • egm-review: reviewer personas registered as native subagents; spawned egm-zoom-out and egm-style subagents resolved skill://egm-review live, took the physical path from the read-result header, went two directories up, and read resources/document_standards/zoom-out-standard.md by absolute path. read skill://egm-review/../resources/README.md fails as expected (traversal rejected); realpath skill://egm-draft (a builtin in omp's agent shell) prints <plugin>/skills/egm-draft and <skill-folder>/../../resources/execution_instructions.md resolves.
  • Unit tests on current main: uv run --group test pytest — 398 passed, 2 skipped (offline env-gated probes), including the skill body-size limits (egm-draft 17,746 B, egm-review-loop 10,426 B) and packaging checks.
  • Fresh-context review round (egm-codebase-details persona): wording, path math, and the pass-absolute-paths rule verified against the shared rule; no test or limit regressions.

Human Accountability Affirmation

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Scope check

Thank you for your contribution! This PR changes 33 counted lines and 4 core files in skills/ or agents/. The minor-patch limit is 100 counted lines and fewer than 3 core files. Docs, tests, and lockfiles are excluded from these counts.

Ask a maintainer whether this can proceed as a minor patch or needs the design process.

This notice does not block merging or grant approval.

@github-actions github-actions Bot added the design-needed Automated scope advisory: Bug Fix PR exceeds minor fix bounds label Nov 16, 2026

@egm-triage-bot egm-triage-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated first-pass review found zero blocking or major issues. Routing to @google/egm-maintainers for maintainer review.

@egm-triage-bot egm-triage-bot added the triage: passed Automated Stage-1 PR triage found zero blocking or major issues label Nov 16, 2026
@egm-triage-bot
egm-triage-bot requested review from a team and briansuchy and removed request for a team November 16, 2026 14:31
@n3wth n3wth changed the title Resolve plugin-root path lookups in skills and personas Fix bundled resource paths in skills and reviewers Nov 18, 2026
@n3wth

n3wth commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

@asmirnov-ias, Could you show one failing omp resource lookup and the smallest change that fixes it? Please coordinate the shared path rule with #369 so each skill doesn't get a different workaround.

@asmirnov-ias

Copy link
Copy Markdown
Contributor Author

One failing lookup An agent running egm-draft resolves resources/execution_instructions.md against the skill folder. omp confines skill:// reads to the skill's own directory, so the lookup fails:

$ cat skill://egm-draft/resources/execution_instructions.md
cat: skill://egm-draft/resources/execution_instructions.md: No such file or directory

Traversal is rejected as well: read skill://egm-review/../resources/README.md returns File not found: …/skills/egm-review/resources/README.md — omp folds the .. back inside the skill folder. In the run that reported this, the agent concluded the file "doesn't ship in the plugin" and drafted on without the execution constraints; the file exists at the plugin root, two directories above the skill folder.

Smallest fix: one sentence in skills/egm-draft/SKILL.md stating where the file sits and how to reach it under omp:

the file sits at the plugin root, two directories above this skill's folder. In omp, skill:// reads cannot leave the skill's folder, so run realpath skill://egm-draft first and read the file by absolute path.

realpath skill://<name> is a builtin in omp's agent shell that maps the skill:// URI scheme to the installed skill directory; it is not a command in a plain terminal. Agents whose omp profile has no shell use the fallback instead: read skill://<name> and take the physical path from the result header

Coordination with #369: agreed that #369 lands first — it is the major refactoring, and both changes need the same single rule. I will re-implement this fix on top of #369 rather than merging both orders.

Keeping this PR open as reference until then.

briansuchy pushed a commit that referenced this pull request Nov 23, 2026
Rebases onto origin/main (8b1553f), preserving #359 worker/scout caps and #418 untouched. Scopes #369 strictly to the two near-limit skills (egm-bootstrap and egm-review), moves only rules that are already shared across multiple skills into resources/execution_instructions.md (keeping egm-draft-only rules intact under a scoped section), and adds the cross-host plugin-root path resolution rule (including omp skill:// confinement from #456).
@briansuchy

Copy link
Copy Markdown
Collaborator

@asmirnov-ias Thanks for the clear omp repro and for holding #456. I just updated #369 (f56a66a) to narrow it to egm-bootstrap and egm-review and included the shared Plugin-Root Resource Paths wording inside resources/execution_instructions.md (plus the realpath skill://<name> / header-path fallback inline in both egm-bootstrap and egm-review). Once #369 lands, #456 will only need the matching hints on the remaining skills/reviewers (egm-draft, egm-review-loop, agents/synthesizer.md, agents/zoom_out.md) and docs.

briansuchy added a commit that referenced this pull request Nov 23, 2026
)

Refs #371. Narrows to the two near-limit skills (egm-bootstrap 23,973 B -> 12,973 B, egm-review 23,887 B -> 13,294 B), moves only already-shared rules into scoped sections of resources/execution_instructions.md while preserving all five egm-draft-only rules, adds cross-host plugin-root path resolution (including omp skill:// confinement aligned with #456), preserves #359 worker/scout caps and interactive egm-review-loop delegation in Stages 7 and 9.
@briansuchy

Copy link
Copy Markdown
Collaborator

@asmirnov-ias PR #369 is now squash-merged into main (ef27af6). You are clear to rebase #456 onto main and add the matching omp path hints for the remaining skills/reviewers (egm-draft, egm-review-loop, agents/synthesizer.md, agents/zoom_out.md) and docs.

Reimplemented on top of google#369 (ef27af6), which added the shared Plugin-Root Resource Paths rule to resources/execution_instructions.md and inline omp hints to egm-bootstrap and egm-review.
egm-draft constraint 1 and an egm-review-loop Plugin Root bullet now carry the matching hint, cloned from the merged pattern.
agents/zoom_out.md and agents/synthesizer.md personas use the caller's absolute path with a labeled omp fallback (read skill://egm-review and go two directories up from the header path) and a failure guard.
docs/harnesses.md documents the skill:// confinement, the physical-root resolution, and the shared rule's location.
@asmirnov-ias
asmirnov-ias force-pushed the fix/plugin-root-path-resolution branch from 28d395c to 01fd7b1 Compare November 24, 2026 10:23
@asmirnov-ias

asmirnov-ias commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Reimplemented on top of the merged #369 per the plan above:

matching hints on egm-draft, egm-review-loop, agents/synthesizer.md, agents/zoom_out.md, and the omp note in docs/harnesses.md.

Local review round: hoist the synthesizer path guidance above the Mode split so BRAINSTORM swarm dispatch is covered, not just REVIEW; drop the now-redundant REVIEW-only copy.
docs/harnesses.md: state that skill:// cannot read plugin-root assets (resources/, agents/, docs/) and they are read by absolute path from the physical root, matching the shared rule.
@asmirnov-ias

asmirnov-ias commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Ran a fresh-context review round on the local diff (egm-codebase-details persona).

Verdict: the hints match the #369 convention (path math, wording, pass-absolute-paths rule, no test or limit regressions).

Two findings applied in fc70437:

  • the synthesizer's path guidance now sits above the Mode split so its BRAINSTORM swarm dispatch is covered, not just REVIEW;
  • docs/harnesses.md now states plainly that skill:// cannot read plugin-root assets (resources/, agents/, docs/) and that they are read by absolute path from the physical root.

@egm-triage-bot egm-triage-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated first-pass review found zero blocking or major issues. Routing to @google/egm-maintainers for maintainer review.

@briansuchy

Copy link
Copy Markdown
Collaborator

@asmirnov-ias Thanks for rebasing cleanly onto #369 and following the plan I outlined yesterday. Apologies for the change of direction here.

Looking closely at the final diff, I realized we should not specialize the canonical skills/ and agents/ files for individual harnesses. Right now none of the canonical personas in agents/*.md reference any specific framework, and as more harnesses are supported we want to avoid accumulating per-tool workarounds inside the shared prompts.

Instead, could we solve the omp skill:// confinement in an omp-specific adapter layer (similar to how Cursor uses .cursor-plugin/rules/egm.mdc, Claude Code uses .claude-plugin/agents/, and OpenCode uses adapters/opencode/), keeping the canonical skills/ and agents/ harness-agnostic? That adapter (plus docs/harnesses.md or a dedicated docs/omp.md) can own the skill:// root-resolution logic for omp (and fits nicely with #186).

On our side, I'll also follow up to strip the omp-specific inline lines that landed in #369 so the boundary is consistent across the repo. Happy to discuss what omp adapter shape works best (an .omp rule/extension, plugin config, or installer under adapters/omp/) before you write more code.

@briansuchy

Copy link
Copy Markdown
Collaborator

Opened #565 to remove the inline omp hints that landed in #369 and move that skill:// note to docs/harnesses.md while we work out the omp adapter direction here / in #186.

One detail we noticed while checking oh-my-pi's plugin discovery code (claude-plugins.ts and docs/marketplace.md): omp supports .omp-plugin/marketplace.json and loads plugin rules/, though a repo-root rules/ folder would also be picked up by Antigravity and subdirectory plugin sources reject .. traversal. So an installer under adapters/omp/ (mirroring adapters/opencode/install.py) or an omp extension is likely the cleanest route. (Also worth checking if newer omp's ${CLAUDE_PLUGIN_ROOT} / ${OMP_PLUGIN_ROOT} substitution in skill bodies changes what's needed.)

This branch has not been deployed

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

Labels

design-needed Automated scope advisory: Bug Fix PR exceeds minor fix bounds triage: passed Automated Stage-1 PR triage found zero blocking or major issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix bundled resource paths in omp skills and reviewers

4 participants