Skip to content

exclude: remove user-contributed domain-skills from vendored harness#27

Merged
Alezander9 merged 2 commits intomainfrom
exclude/harness-domain-skills
May 1, 2026
Merged

exclude: remove user-contributed domain-skills from vendored harness#27
Alezander9 merged 2 commits intomainfrom
exclude/harness-domain-skills

Conversation

@Alezander9
Copy link
Copy Markdown
Member

Summary

Exclude (agent-workspace/)?domain-skills/ from browsercode's vendored copy of browser-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:

  1. script/check-harness-diff.sh — new IGNORED_PATHS_REGEX applied before the noise/expected/unexpected split. Matches both diff -rq line shapes (Files .../domain-skills/foo and ... and Only in .../...: domain-skills). Also added --exclude='domain-skills' to the diff -ruN line-stats pass.
  2. harness-sync.md — step 5 file-category table gets a new top row: Excluded paths → Skip entirely. Path-allowlist policy block updated.
  3. Vendored tree — both packages/bcode-browser/harness/agent-workspace/domain-skills/ and packages/bcode-browser/harness/domain-skills/ (the legacy/PR-#247 top-level dir) removed via git rm -r.

Runtime safety

src/browser_harness/helpers.py:165 (goto_url) already guards with if d.is_dir(): — absence is a clean no-op. No exception, no missing key, no broken tool. Verified:

from browser_harness import run, helpers, daemon, admin, _ipc  # imports ok
browser-harness --version                                       # 0.1.0

No TS code in browsercode references domain-skills/. The harness wheel is src/-only (pyproject.toml packages.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

  • 82 deleted (76 agent-workspace skills + 4 shopify-admin + 2 README files)
  • 7 modified

Verification

  • Smoke test: clean (imports ok, --version prints 0.1.0).
  • goto_url no-op confirmed: helpers.AGENT_WORKSPACE / 'domain-skills' / ... .is_dir() returns False, response returned unmodified.
  • script/check-harness-diff.sh no longer reports domain-skills lines 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:

  • Domain-skills changes (new skills, edits) → invisible, filtered out of check-harness-diff.sh, skipped per harness-sync.md step 5.
  • SKILL.md / README.md / install.md changes → flagged as drift (correctly), reconciled hunk-by-hunk per UPSTREAM.md §3 modified-files note.
  • Everything else → unchanged behavior.

If upstream eventually removes domain-skills entirely, this exclusion becomes a no-op; just retire the §3 row.

Closes thread discussion in #internal-slack.

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.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 89 files

Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed. cubic prioritises the most important files to review.

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.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

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.

@Alezander9 Alezander9 merged commit 763a2ba into main May 1, 2026
3 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.

1 participant