exclude: remove user-contributed domain-skills from vendored harness#27
Merged
Alezander9 merged 2 commits intomainfrom May 1, 2026
Merged
exclude: remove user-contributed domain-skills from vendored harness#27Alezander9 merged 2 commits intomainfrom
Alezander9 merged 2 commits intomainfrom
Conversation
Domain-skills (`agent-workspace/domain-skills/` post-PR-#229 + top-level `domain-skills/` from PR #247) are user-contributed site recipes maintained on browser-use/browser-harness. We exclude them from browsercode's vendored tree on quality, maintenance, and prompt-injection grounds. Browsercode (cloud- first, performance-focused) curates its own skills server-side. Mechanism — three places that all reference UPSTREAM.md §3 "Excluded paths" as the source of truth: 1. `script/check-harness-diff.sh` gains an `IGNORED_PATHS_REGEX` filter applied before the noise/expected/unexpected split, so future syncs treat upstream domain-skills changes as if they don't exist. 2. `harness-sync.md` step 5 documents the skip rule as a top-row action in the file-category table; sync agents pre-filter excluded paths instead of deciding per-file. 3. The directories themselves are removed from the vendored tree (`git rm -r`). Runtime safety: `helpers.goto_url()` already guards with `if d.is_dir():`, so absence is a clean no-op (no exception, no missing key, no broken tool). Smoke-tested: `from browser_harness import run, helpers, daemon, admin, _ipc` imports cleanly; `browser-harness --version` prints 0.1.0. Doc trims (`SKILL.md`, `README.md`, `install.md`) are minimal surgical edits — only direct `domain-skills/` references are removed; surrounding prose is preserved so future sync diffs stay localized to specific lines. UPSTREAM.md §3 records these as "expect ongoing drift on sync" so future sync agents reconcile them hunk-by-hunk. Net: 82 files removed (76 agent-workspace skills + 4 shopify-admin + 2 README files), 7 files modified, 1 PR. Maintenance cost going forward: zero on the excluded paths (filtered automatically); small on the three trimmed docs. Refs: AGENTS.md, UPSTREAM.md \u00a73.
Per discussion in originating thread: `README.md` and `install.md` are not referenced by any browsercode prompt or TS code, so trimming them changed nothing the agent reads. `SKILL.md` IS referenced by `packages/opencode/src/tool/browser-execute.txt`, but that pointer is ours — long-term plan is to replace it with a browsercode-owned prompt file that we evolve independently of upstream, which makes vendored `SKILL.md` inert too. Net: trimming these files added per-sync drift forever for zero agent-behavior benefit. Reverting to upstream verbatim eliminates the drift and keeps future syncs mechanical. UPSTREAM.md §3 'Modified files' table loses three rows (only `.gitignore` remains). Replaced with a paragraph explaining why domain-skills mentions are tolerated in these files: the agent never reads them, or won't once we own the prompt. Verified: smoke test clean, `check-harness-diff.sh` post-revert shows only the expected `.gitignore` divergence + 3 real upstream commits we haven't synced (daemon.py, run.py, test_run.py). Roadmap entry for the custom prompt replacement work tracked separately in maintainer memory.
There was a problem hiding this comment.
3 issues found across 4 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/bcode-browser/harness/README.md">
<violation number="1">
P2: README now points users to `agent-workspace/domain-skills/`, but that directory is absent, creating broken guidance/links in setup instructions.</violation>
</file>
<file name="packages/bcode-browser/harness/install.md">
<violation number="1">
P2: This documentation now directs edits to `agent-workspace/domain-skills/`, but that path does not exist in the vendored harness, so the guidance is broken.</violation>
</file>
<file name="packages/bcode-browser/harness/SKILL.md">
<violation number="1">
P2: This adds guidance to use `agent-workspace/domain-skills/` even though the PR removes/excludes that directory, so the docs now direct users to a non-existent/ignored path.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Exclude
(agent-workspace/)?domain-skills/from browsercode's vendored copy ofbrowser-use/browser-harness. User-contributed site recipes are kept on the public harness for community contribution; browsercode (cloud-first, performance-focused) curates its own skills server-side and treats these paths as if they don't exist.Goal stated in the originating thread: "feel like that folder is just gitignored and out of mind."
Mechanism
Three places, all referencing
UPSTREAM.md§3 "Excluded paths" as the source of truth:script/check-harness-diff.sh— newIGNORED_PATHS_REGEXapplied before the noise/expected/unexpected split. Matches bothdiff -rqline shapes (Files .../domain-skills/foo and ...andOnly in .../...: domain-skills). Also added--exclude='domain-skills'to thediff -ruNline-stats pass.harness-sync.md— step 5 file-category table gets a new top row: Excluded paths → Skip entirely. Path-allowlist policy block updated.packages/bcode-browser/harness/agent-workspace/domain-skills/andpackages/bcode-browser/harness/domain-skills/(the legacy/PR-#247 top-level dir) removed viagit rm -r.Runtime safety
src/browser_harness/helpers.py:165(goto_url) already guards withif d.is_dir():— absence is a clean no-op. No exception, no missing key, no broken tool. Verified:No TS code in browsercode references
domain-skills/. The harness wheel issrc/-only (pyproject.tomlpackages.find where=src), so packaging is unaffected.Doc trims
Minimal surgical edits — only direct
domain-skills/references removed; surrounding prose preserved so future sync diffs stay localized:packages/bcode-browser/harness/SKILL.md— removed the "Search first" lead paragraph + the "Always contribute back" + "What a domain skill should capture" + "Do not write" subsections + the bottom interaction-notes bullet.packages/bcode-browser/harness/README.md— removed agent-instruction mention, the example-tasks link, the layout bullet, and the contributing section's domain-skills paragraph.packages/bcode-browser/harness/install.md— removed one-line mention.AGENTS.md— vendored-harness path-allowlist updated.UPSTREAM.md§3 records these as "expect ongoing drift on sync" so future sync agents reconcile them hunk-by-hunk rather than treating them as fully-stable divergences.Files
Verification
imports ok,--versionprints 0.1.0).goto_urlno-op confirmed:helpers.AGENT_WORKSPACE / 'domain-skills' / ....is_dir()returnsFalse, response returned unmodified.script/check-harness-diff.shno longer reportsdomain-skillslines as drift. Remaining "Unexpected drift" entries are unrelated upstream commits we're behind by (8) — separate sync concern.Future-sync ergonomics
Next harness sync will see:
check-harness-diff.sh, skipped perharness-sync.mdstep 5.If upstream eventually removes domain-skills entirely, this exclusion becomes a no-op; just retire the §3 row.
Closes thread discussion in #internal-slack.