frontier-python-ts/skills/from-scratch-run/SKILL.md
--- name: from-scratch-run description: Use when the developer advocate needs to verify the application can be cloned and run by a new engineer. Triggers include: adding a new application or service, changing docker-compose or Dockerfiles, changing environment variable handling, changing networking between services, adding or modifying Makefile targets / uv / pnpm scripts, changing the Python or Node toolchain pin, changing database schemas or Alembic migrations, or changing README/setup documen
npx skillsauth add jon23d/skillz frontier-python-ts/skills/from-scratch-runInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A from-scratch run verifies the documented setup actually works. It simulates a new engineer cloning the repo and following the README — nothing more.
The harness has two stacks: a FastAPI backend in apps/api/ (managed by uv) and a Vite frontend in apps/web/ (managed by pnpm). The from-scratch run must exercise both, plus the make targets that wire them together.
Run from scratch when the PR includes any of:
docker-compose.yml or any Dockerfile changed.env.example or environment variable handling changedMakefile targets added or modifiedapps/api/pyproject.toml, apps/api/uv.lock, or Python version pin changedapps/web/package.json, apps/web/pnpm-lock.yaml, or Node version pin changedREADME.md or setup documentation changedSkip if none of the above apply.
You instruct a subagent to perform the run. You do not run it yourself.
You never make code changes. You never modify application source, compose files, Dockerfiles, or scripts — even if you believe you know the fix. The purpose of this run is to surface problems, not solve them.
Dispatch a subagent (use the local-task agent type) with the following instructions, substituting the actual values:
Subagent prompt template:
You are running a from-scratch verification of the <REPO_NAME> monorepo.
Your job is to follow the README exactly and report what happens.
You may NOT make any code changes under any circumstances.
## Setup
1. Clone the repo into a temporary directory:
git clone <REPO_URL> /tmp/scratch-run-<BRANCH>
cd /tmp/scratch-run-<BRANCH>
2. Check out the target branch:
git checkout <BRANCH>
3. Copy .env.example to .env:
cp .env.example .env
4. If any ports in the .env or docker-compose.yml conflict with services
already running on this machine, update the port values in .env only
(not in docker-compose.yml or source files) using a +1000 offset.
Document every port change you make.
## Toolchain prerequisites
Before following the README, confirm the host has the tools the project pins:
- `uv --version` (Python package manager — install via `curl -LsSf https://astral.sh/uv/install.sh | sh` if missing)
- `pnpm --version` (Node package manager — install via `corepack enable && corepack prepare pnpm@latest --activate` if missing)
- `docker --version` and `docker compose version`
- `python --version` matches the `requires-python` in `apps/api/pyproject.toml`
- `node --version` matches `apps/web/package.json` `engines.node` if present
If any are missing, that is itself a documentation gap — note it in the report.
## Run
Follow the README quickstart exactly, step by step. Run each command and
capture its full output. The expected canonical sequence is:
1. `make install` — runs `uv sync` in `apps/api/` and `pnpm install` in `apps/web/`
2. `docker compose up -d postgres redis` — start dependencies
3. `cd apps/api && uv run alembic upgrade head` — apply migrations
4. `make dev` — start `uvicorn` and `pnpm dev` together
5. Smoke checks:
- `curl -fsS http://localhost:8000/health/live` returns `{"status":"ok"}`
- `curl -fsS http://localhost:8000/health/ready` returns `{"status":"ready"}`
- `curl -fsS http://localhost:8000/openapi.json | head` returns valid JSON
- `curl -fsS http://localhost:5173/` returns the Vite index HTML
If the README diverges from this sequence, follow the README — it is the
source of truth being verified. Note any divergence in the report.
If the README instructs you to run docker compose, add --build to ensure
images are rebuilt from the checked-out source.
If the README instructs you to create Docker services or Alembic migrations
that don't exist yet (e.g., for a new feature introduced in this branch),
that is expected and allowed — create them.
## Report back
Return a structured report:
### Environment
- Repo: <REPO_URL>
- Branch: <BRANCH>
- Clone path: /tmp/scratch-run-<BRANCH>
- Port offsets applied (if any): list each
### Step-by-step results
For each README step: the command run, pass/fail, and full output on failure.
### Final status
PASS — all services started and the application is reachable, or
FAIL — one or more steps failed
### Failures (if any)
For each failure:
- Step: exact step from the README
- Command: the exact command run
- Error output: full verbatim output
- Diagnosis: what this error means in plain English
- Likely cause: documentation gap, missing env var, broken compose config, etc.
- NOT your job to fix: state this explicitly and stop
## Cleanup
When done:
docker compose down -v
pkill -f "uvicorn app.main:app" || true
pkill -f "vite" || true
rm -rf /tmp/scratch-run-<BRANCH>
On PASS: Note it in your output to build. No further action needed.
On FAIL: Do not fix the problem yourself. Do not edit any file to work around the failure. Report it directly to build with:
The build agent is responsible for routing failures to the correct engineer.
/tmp path for from-scratch runs. The current checkout is not a clean environment..venv or node_modules — both must be reinstalled inside the fresh clone. A from-scratch run that uses cached dependencies isn't from scratch.alembic upgrade head — the readiness probe will fail and the failure will look like a code bug. Run migrations before starting uvicorn.development
Use when adding or modifying environment variable handling in TypeScript projects or monorepos — especially when using process.env directly, missing startup validation, sharing env schemas across packages, or encountering "undefined is not a string" errors at runtime from missing env vars.
testing
Use when creating a new skill, editing an existing skill, writing a SKILL.md, or verifying a skill works before deployment.
development
React UI design principles and conventions. Load when building or modifying any user interface or React components. Covers application type detection, visual standards, component design and structure, Mantine (business apps) and Tailwind (consumer apps), accessibility, responsiveness, state management, data fetching, testing, and in-app help patterns.
development
Use when setting up ESLint and/or Prettier in a TypeScript project, adding linting to an existing TypeScript codebase, or configuring typescript-eslint, eslint-config-prettier, or related packages.