Repository navigation
feat(example): add dev:env and verify-local-app skill for pinned-env local verification - #1422
Open
gabrielseco wants to merge 2 commits into
Open
gabrielseco wants to merge 2 commits into
gabrielseco wants to merge 2 commits into
Conversation
…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>
Contributor
|
Deploy preview for remote-flows ready!
Deployed with vercel-action |
Contributor
|
Deploy preview for adp-cost-calculator ready!
Deployed with vercel-action |
Contributor
📊 Coverage Report⚪ Coverage unchanged
Detailed BreakdownLines Coverage
Statements Coverage
Functions Coverage
Branches Coverage
✅ Coverage check passed |
This branch has not been deployed
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
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
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.Company not found.npm run devdoes would affect every contributor and every worktree. Sonpm run devstays 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 ofexample/.env. It also passesenvDir: falseto Vite, so the browser-sideimport.meta.envis 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 adev:envscript (plainnode, no nodemon)..claude/skills/verify-local-app/SKILL.md: builds the library (the example app servesdist/throughfile:..), startsdev:envon 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-appnow points to the new skill for local runs.CLAUDE.mdlistsdev:env.dev:envmode, everyVITE_*key in the root file reaches the browser bundle. That's the same asexample/.envtoday (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
mainonce it merges.Testing
example/app in a browser: seeded a DEU employment with--env=sandbox, opened it indev:env --env=sandboxon a separate port with headless Playwright. It reached Select Country with Germany preselected, and no/api/call failed.example/.env(VITE_NEW_PREMIUM_BENEFITS,VITE_TERMINATION_EMPLOYMENT_ID) don't show up in thedev:envbrowser env.--envand a missing--env=nopefile both exit with an error.🤖 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 devpath 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 ViteenvDir: falseso the browser only sees that file’sVITE_*vars; defaultnpm run devbehavior is unchanged.dev:envis a newexample/script (plainnode, no nodemon) for that mode.A new
verify-local-appClaude skill documents the full flow: build rootdist/, startdev:envon a free port, seed with the same--env, drive onboarding via Playwright, report pass/fail, and stop the server.verify-sandbox-deployed-appandCLAUDE.mdnow 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.