Skip to content

feat(vibe-tests): per-agent isolated project environments - #1590

Merged
cixzhang merged 5 commits into
mainfrom
navi/feat/vibe-test-environments
Apr 21, 2026
Merged

cixzhang merged 5 commits into
mainfrom
navi/feat/vibe-test-environments

Conversation

@cixzhang

@cixzhang cixzhang commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

What

Per-agent isolated project directories for vibe test fairness (checker protocol invariant #4).

Agent Environments

Each sub-agent gets its own cloned project that looks like a real consumer project:

Target Agent sees
XDS package.json + node_modules/@xds/core (README, docs.mjs, src) + node_modules/@xds/cli (npx xds works)
Baseline package.json + components/ui/*.tsx + lib/utils.ts + README.md
HTML package.json only

Agents discover docs by exploring their project — XDS agents find README → docs.mjs (or CLI), baseline agents find README → component sources.

New Files

  • environments/project-{a,b,c}/ — templates (generic names to avoid leaking target)
  • src/setup-environment.mjs — creates per-agent project clones with symlinks
  • src/collect-results.mjs — copies agent output to standard eval path
  • Updated src/setup-nightly.mjs — prompts say "Your project is at <path>. Explore it."

Core README Update

Added "Page Layouts" section pointing agents to templates for full-page composition patterns (AppShell, Layout, TopNav, SideNav).

Tested

2 prompts × 3 targets, all 6 passed tsc with 0 errors. XDS agents found README → docs.mjs. Baseline agents found README → components/ui/. Collect step copies output correctly.

Related: #1576, #1577


cixzhang and others added 2 commits April 21, 2026 11:25
Each sub-agent gets its own cloned project directory:
- XDS: package.json + node_modules/@xds/core (symlinked to source)
- Baseline: package.json + components/ui/ + lib/ + README.md
- HTML: package.json only (bare React project)

Templates: environments/project-{a,b,c}/ (generic names)
Runtime: setup-environment.mjs creates per-agent clones
Pipeline: collect-results.mjs copies output to eval path

Nightly prompts updated: 'Your project is at <path>. Explore it.'
No system-specific hints, no expected components, no coaching rules.

Tested: 2 prompts × 3 targets, all 6 passed tsc with 0 errors.
XDS agents found README → docs.mjs. Baseline found README → components/ui/.

Fixes checker protocol invariant #4 (representative environment)
and #5 (agent isolation — no cross-contamination).

Related: #1576, #1577

Co-authored-by: Navi <[email protected]>
…README

- Symlink @xds/cli + .bin/xds into agent project dirs so npx xds works
  Lets us measure whether agents reach for CLI (templates, theming docs)
  vs docs.mjs (component API)

- Add 'Page Layouts' section to core README recommending templates for
  full-page composition (AppShell, Layout, TopNav, SideNav patterns)

Co-authored-by: Navi <[email protected]>
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 21, 2026
cixzhang and others added 3 commits April 21, 2026 11:33
Templates renamed: project-{a,b,c} → project-{xds,baseline,html}
(agents see cloned copies, not the template names)

Added @xds/cli as devDependency in project-xds template so the
package.json looks like a real XDS project.

Co-authored-by: Navi <[email protected]>
- Templates section now notes @xds/cli is required
- CLI section reworded to describe additional tooling beyond templates
- Removed duplicate template commands from CLI section
- Environment template uses * versions (always matches current)

Co-authored-by: Navi <[email protected]>
List all CLI commands with descriptions so agents (and humans)
can see the full capability surface at a glance.

Co-authored-by: Navi <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 16.2KB 25.4KB 3.8KB

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@cixzhang
cixzhang merged commit bb6eec9 into main Apr 21, 2026
16 checks passed
@cixzhang
cixzhang deleted the navi/feat/vibe-test-environments branch April 25, 2026 20:58
cixzhang added a commit that referenced this pull request Apr 26, 2026
* feat(vibe-tests): per-agent isolated project environments

Each sub-agent gets its own cloned project directory:
- XDS: package.json + node_modules/@xds/core (symlinked to source)
- Baseline: package.json + components/ui/ + lib/ + README.md
- HTML: package.json only (bare React project)

Templates: environments/project-{a,b,c}/ (generic names)
Runtime: setup-environment.mjs creates per-agent clones
Pipeline: collect-results.mjs copies output to eval path

Nightly prompts updated: 'Your project is at <path>. Explore it.'
No system-specific hints, no expected components, no coaching rules.

Tested: 2 prompts × 3 targets, all 6 passed tsc with 0 errors.
XDS agents found README → docs.mjs. Baseline found README → components/ui/.

Fixes checker protocol invariant #4 (representative environment)
and #5 (agent isolation — no cross-contamination).

Related: #1576, #1577

Co-authored-by: Navi <[email protected]>

* feat(vibe-tests): symlink CLI for XDS agents, add layout guidance to README

- Symlink @xds/cli + .bin/xds into agent project dirs so npx xds works
  Lets us measure whether agents reach for CLI (templates, theming docs)
  vs docs.mjs (component API)

- Add 'Page Layouts' section to core README recommending templates for
  full-page composition (AppShell, Layout, TopNav, SideNav patterns)

Co-authored-by: Navi <[email protected]>

* refactor: rename environment templates, add @xds/cli to devDeps

Templates renamed: project-{a,b,c} → project-{xds,baseline,html}
(agents see cloned copies, not the template names)

Added @xds/cli as devDependency in project-xds template so the
package.json looks like a real XDS project.

Co-authored-by: Navi <[email protected]>

* docs: add CLI install note to README templates section, use * versions

- Templates section now notes @xds/cli is required
- CLI section reworded to describe additional tooling beyond templates
- Removed duplicate template commands from CLI section
- Environment template uses * versions (always matches current)

Co-authored-by: Navi <[email protected]>

* docs(core): complete CLI command reference in README

List all CLI commands with descriptions so agents (and humans)
can see the full capability surface at a glance.

Co-authored-by: Navi <[email protected]>

---------

Co-authored-by: Navi <[email protected]>
cixzhang added a commit that referenced this pull request Jun 21, 2026
* feat(vibe-tests): per-agent isolated project environments

Each sub-agent gets its own cloned project directory:
- XDS: package.json + node_modules/@xds/core (symlinked to source)
- Baseline: package.json + components/ui/ + lib/ + README.md
- HTML: package.json only (bare React project)

Templates: environments/project-{a,b,c}/ (generic names)
Runtime: setup-environment.mjs creates per-agent clones
Pipeline: collect-results.mjs copies output to eval path

Nightly prompts updated: 'Your project is at <path>. Explore it.'
No system-specific hints, no expected components, no coaching rules.

Tested: 2 prompts × 3 targets, all 6 passed tsc with 0 errors.
XDS agents found README → docs.mjs. Baseline found README → components/ui/.

Fixes checker protocol invariant #4 (representative environment)
and #5 (agent isolation — no cross-contamination).

Related: #1576, #1577

Co-authored-by: Navi <[email protected]>

* feat(vibe-tests): symlink CLI for XDS agents, add layout guidance to README

- Symlink @xds/cli + .bin/xds into agent project dirs so npx xds works
  Lets us measure whether agents reach for CLI (templates, theming docs)
  vs docs.mjs (component API)

- Add 'Page Layouts' section to core README recommending templates for
  full-page composition (AppShell, Layout, TopNav, SideNav patterns)

Co-authored-by: Navi <[email protected]>

* refactor: rename environment templates, add @xds/cli to devDeps

Templates renamed: project-{a,b,c} → project-{xds,baseline,html}
(agents see cloned copies, not the template names)

Added @xds/cli as devDependency in project-xds template so the
package.json looks like a real XDS project.

Co-authored-by: Navi <[email protected]>

* docs: add CLI install note to README templates section, use * versions

- Templates section now notes @xds/cli is required
- CLI section reworded to describe additional tooling beyond templates
- Removed duplicate template commands from CLI section
- Environment template uses * versions (always matches current)

Co-authored-by: Navi <[email protected]>

* docs(core): complete CLI command reference in README

List all CLI commands with descriptions so agents (and humans)
can see the full capability surface at a glance.

Co-authored-by: Navi <[email protected]>

---------

Co-authored-by: Navi <[email protected]>
cixzhang added a commit that referenced this pull request Jun 21, 2026
* feat(vibe-tests): per-agent isolated project environments

Each sub-agent gets its own cloned project directory:
- XDS: package.json + node_modules/@xds/core (symlinked to source)
- Baseline: package.json + components/ui/ + lib/ + README.md
- HTML: package.json only (bare React project)

Templates: environments/project-{a,b,c}/ (generic names)
Runtime: setup-environment.mjs creates per-agent clones
Pipeline: collect-results.mjs copies output to eval path

Nightly prompts updated: 'Your project is at <path>. Explore it.'
No system-specific hints, no expected components, no coaching rules.

Tested: 2 prompts × 3 targets, all 6 passed tsc with 0 errors.
XDS agents found README → docs.mjs. Baseline found README → components/ui/.

Fixes checker protocol invariant #4 (representative environment)
and #5 (agent isolation — no cross-contamination).

Related: #1576, #1577


* feat(vibe-tests): symlink CLI for XDS agents, add layout guidance to README

- Symlink @xds/cli + .bin/xds into agent project dirs so npx xds works
  Lets us measure whether agents reach for CLI (templates, theming docs)
  vs docs.mjs (component API)

- Add 'Page Layouts' section to core README recommending templates for
  full-page composition (AppShell, Layout, TopNav, SideNav patterns)


* refactor: rename environment templates, add @xds/cli to devDeps

Templates renamed: project-{a,b,c} → project-{xds,baseline,html}
(agents see cloned copies, not the template names)

Added @xds/cli as devDependency in project-xds template so the
package.json looks like a real XDS project.


* docs: add CLI install note to README templates section, use * versions

- Templates section now notes @xds/cli is required
- CLI section reworded to describe additional tooling beyond templates
- Removed duplicate template commands from CLI section
- Environment template uses * versions (always matches current)


* docs(core): complete CLI command reference in README

List all CLI commands with descriptions so agents (and humans)
can see the full capability surface at a glance.


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

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant