Skip to content

feat(example): add dev:env and verify-local-app skill for pinned-env local verification - #1422

Open
gabrielseco wants to merge 2 commits into
docs-skills-verify-sandbox-deployed-appfrom
verify-local-env
Open

gabrielseco wants to merge 2 commits into
docs-skills-verify-sandbox-deployed-appfrom
verify-local-env

Conversation

@gabrielseco

@gabrielseco gabrielseco commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Lets an AI agent verify a change locally against a fixed environment (sandbox, staging, partners or local Tiger), without touching the developer's own dev setup.

Why

  • The example app only reads example/.env, which developers edit freely while working. An agent can't rely on it: it doesn't know which gateway or company it's pointing at.
  • If the seed script uses one env and the app uses another, the app fails with Company not found.
  • Changing what npm run dev does would affect every contributor and every worktree. So npm run dev stays as it is, and a separate script loads a named root env file.

What changed

Toggle details
  • example/dev_server.js: an optional --env=<name> flag loads ../.env.<name> instead of example/.env. It also passes envDir: false to Vite, so the browser-side import.meta.env is built only from that file too. It exits with a clear error if the flag is bare or the file doesn't exist. Without the flag, behavior is unchanged.
  • example/package.json: adds a dev:env script (plain node, no nodemon).
  • New .claude/skills/verify-local-app/SKILL.md: builds the library (the example app serves dist/ through file:..), starts dev:env on a free port, seeds with the same env name, drives the flow with Playwright, reports back and stops the server it started.
  • verify-sandbox-deployed-app now points to the new skill for local runs. CLAUDE.md lists dev:env.
  • Known limitation: in dev:env mode, every VITE_* key in the root file reaches the browser bundle. That's the same as example/.env today (the client secret is already exposed in dev), and it only happens on localhost.

No library or public API changes.

Screenshots

N/A

Related Resources

Testing

  • Tested against the example/ app in a browser: seeded a DEU employment with --env=sandbox, opened it in dev:env --env=sandbox on a separate port with headless Playwright. It reached Select Country with Germany preselected, and no /api/ call failed.
  • Isolation check: flags that exist only in example/.env (VITE_NEW_PREMIUM_BENEFITS, VITE_TERMINATION_EMPLOYMENT_ID) don't show up in the dev:env browser env.
  • A bare --env and a missing --env=nope file both exit with an error.
  • Feature flag: N/A

🤖 Generated with Claude Code


Note

Low Risk
Example-app dev tooling and agent docs only; no library or public API changes, and existing npm run dev path is preserved.

Overview
Adds a pinned-env local verification path for the example app so agents (and docs) can run onboarding against a known gateway/company without using a developer’s example/.env.

The example dev server gains optional --env=<name>, which loads <repo>/.env.<name> for Express and sets Vite envDir: false so the browser only sees that file’s VITE_* vars; default npm run dev behavior is unchanged. dev:env is a new example/ script (plain node, no nodemon) for that mode.

A new verify-local-app Claude skill documents the full flow: build root dist/, start dev:env on a free port, seed with the same --env, drive onboarding via Playwright, report pass/fail, and stop the server. verify-sandbox-deployed-app and CLAUDE.md now point local checks at this skill/command.

Reviewed by Cursor Bugbot for commit e6da3e4. Bugbot is set up for automated code reviews on this repo. Configure here.

…v file

npm run dev:env -- --env=<name> loads ../.env.<name> and tells Vite not to
read example/.env (envDir: false), so the server and browser env both come
from one file. The seed script already reads the same file, so an app run and
a seeded employment always share a company. npm run dev and example/.env stay
untouched as the human scratchpad.

Adds a verify-local-app skill that builds the library, starts dev:env on a
free port, seeds with the same env and drives the flow with Playwright.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-344n5ioe6-remotecom.vercel.app
Latest Commit:e6da3e4

Deployed with vercel-action

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-ck9neg1vd-remotecom.vercel.app
Latest Commit:e6da3e4

Deployed with vercel-action

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚪ Coverage unchanged

Metric Current Previous Change Status
Lines 86.82% 86.82% 0% ⚪
Statements 86.39% 86.39% 0% ⚪
Functions 85.42% 85.42% 0% ⚪
Branches 78.19% 78.19% 0% ⚪

Detailed Breakdown

Lines Coverage
  • Covered: 5006 / 5766
  • Coverage: 86.82%
  • Change: 0% (0 lines)
Statements Coverage
  • Covered: 5095 / 5898
  • Coverage: 86.39%
  • Change: 0% (0 statements)
Functions Coverage
  • Covered: 1330 / 1557
  • Coverage: 85.42%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 3093 / 3956
  • Coverage: 78.19%
  • Change: 0% (0 branches)

✅ Coverage check passed

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant