name: local-dev-stack description: | Shared local development environment contract for Superloop and target repos. Use when setting up local tooling, startup commands, or local URL contracts. Triggers: "devenv", "direnv", "portless", "local stack", "dev environment"
Local Dev Stack
This skill is runner-agnostic and applies equally to Claude Code and Codex.
Purpose
Keep local execution reproducible and stable across contributors and agents without coupling product behavior to one local setup.
Baseline Contract
Use three layers by default:
devenvfor reproducible tooling.direnvfor per-repo auto-loading.portlessfor stable named*.localhostroutes.
Canonical Commands
When available in a repo, prefer these commands:
direnv allow
scripts/dev-env-doctor.sh
For Superloop UI lane:
scripts/dev-superloop-ui.sh
For target-repo lanes (when wrappers exist in that repo):
scripts/dev-<target>.sh
scripts/dev-<target>-verify.sh
URL and Env Rules
Prefer env-driven URLs over hardcoded ports.
- Superloop UI (canonical):
SUPERLOOP_UI_BASE_URL(defaulthttp://superloop-ui.localhost:1355) - Superloop UI compatibility alias:
SUPERLOOP_UI_URL(fallback only) - Canonical app URL:
SUPERLOOP_DEV_BASE_URL(profile default depends on target repo) - Canonical verify URL:
SUPERLOOP_VERIFY_BASE_URL(profile default depends on target repo) - Canonical raw dev port (optional):
SUPERLOOP_DEV_PORT(target-repo default often5174)
For repos still migrating, keep compatibility aliases as fallback only:
<TARGET>_BASE_URL-> fallback alias forSUPERLOOP_DEV_BASE_URL<TARGET>_VERIFY_BASE_URL(or repo-specific equivalent) -> fallback alias forSUPERLOOP_VERIFY_BASE_URL<TARGET>_DEV_PORT-> fallback alias forSUPERLOOP_DEV_PORT
Resolution order should be:
- Canonical
SUPERLOOP_* - Product-specific alias
- Generic env fallback (
TEST_BASE_URL,PORT) where applicable - Explicit localhost fallback only for approved raw-runtime scripts
See docs/dev-env-contract-v1.md for the full contract.
Target Adapter Readiness
For target repos adopting the contract, require:
- Target adapter manifest at
.superloop/dev-env/adapter.manifest.json. - Manifest mode declaration:
canonical_onlyorcanonical_with_aliases. - Evidence coverage for:
script_resolution_proofrunbook_alignment_proofguardrail_check_proof
If a target has no active alias usage, set mode to canonical_only and keep this explicit in the manifest and runbook packet.
Escape Hatches
The baseline must remain optional for compatibility and incident response.
USE_DEVENV=0to bypass devenv activation.PORTLESS=0to bypass named proxy routing.DIRENV_DISABLE=1to disable direnv.
Authoring Guidance
When generating specs, docs, or scripts:
- Prefer wrapper scripts over direct tool invocations.
- Prefer env vars over hardcoded localhost ports.
- Keep CI behavior independent of local stack requirements.
- Do not make acceptance criteria depend on
devenv,direnv, orportlessbeing mandatory.