Project Setup
Freddy has a spec. Now he needs bones: a Laravel + Svelte scaffold, an AGENTS.md so every future session knows the house rules, and the right extensions installed. Total time: about fifteen minutes, most of it Composer.
The problem
A fresh scaffold is where agent projects quietly go wrong. Every Elyra session starts from zero knowledge of your project — the model doesn't remember Chapter 1's conversation. If the project itself doesn't carry its own rules (how to run tests, what the conventions are, what's out of scope), you'll re-explain them every single session. Forever.
The hard way
Skipping setup and diving into features works fine for a
day. Then: session 4 uses npm test when
Freddy uses Pest. Session 7 writes a React component
because nobody said Svelte. Session 12 adds a folder
hierarchy because it never read SPEC.md. Each mistake is
small; the sum is a codebase with five accents.
The Elyra way: scaffolding the SILT stack
You could run the Laravel installer yourself — but
letting Elyra do it means the choices land where the spec
says. In the freddy directory from Chapter 1:
> Scaffold Freddy per SPEC.md: Laravel 12 with the Svelte 5 +
Inertia starter, SQLite (we want FTS5 later), Pest for
tests, Tailwind 4. Auth scaffolding on but single-user.
Don't implement any features yet - scaffold only, then
summarize the layout.
Elyra runs the installers in front of you (every command is visible — nothing happens off-screen), and ends with a tour:
Running composer create-project laravel/laravel...
Running composer require inertiajs/inertia-laravel...
Running npm install @inertiajs/svelte svelte@5...
Configured: SQLite at database/database.sqlite, Pest, Vite.
Layout: routes/web.php, app/Http/Controllers/,
app/Models/, resources/js/pages/ (Svelte pages),
resources/js/layouts/, database/migrations/, tests/Feature/.
Verified: composer test passes (2 example tests),
npm run build compiles.
/init and AGENTS.md
Now the single most important command of the setup phase:
/init
/init analyzes the project — composer.json,
package.json, directory shape — detects the stack,
and generates AGENTS.md: the standing
instructions every future session reads
automatically. This is how the project carries
its own rules. Review what it wrote, then tighten it with
what only you know:
> Edit AGENTS.md: add a Rules section - read SPEC.md before
any feature work and respect "What Freddy refuses to be";
tests are Pest, run with composer test; Svelte 5 runes only,
never stores; migrations are immutable once committed;
never run npm run dev (I keep it running myself).
The result (condensed):
# Freddy - Agent Instructions
## Stack
SILT: Svelte 5 (runes) + Inertia.js + Laravel 12 + Tailwind 4.
SQLite. Pest for tests. Pages in resources/js/pages/.
## Rules
- Read SPEC.md before feature work. Respect "What Freddy
refuses to be": no folders, no rich text, no collaboration.
- Tests: composer test (Pest). New features need a test.
- Svelte 5 runes only ($state, $derived) - never stores.
- Migrations are immutable once committed; add new ones.
- NEVER run npm run dev - the user keeps it running.
Extensions with /ext
Elyra's stack detection has already noticed Freddy is a SILT project — and suggests the matching stack profile. Extensions are how Elyra goes from "capable generalist" to "knows your stack cold". Open the browser:
/ext
This opens a scrollable list — arrow keys to move,
space to select multiple, enter
to install. For Freddy, pick these four now (the rest of
the course adds more as they're needed):
Install Extensions (4 selected)
→ [x] stack-silt SILT: Svelte 5, Inertia.js, Laravel, Tailwind CSS
[x] lsp-php PHP LSP: go-to-definition, references, diagnostics
[x] lsp-typescript TypeScript LSP: go-to-definition, references, ...
[x] laravel Deep Laravel understanding: models, routes, ...
↑↓ navigate space select enter install escape cancel
Installed extensions activate after you run /reload.
What each one buys Freddy:
- stack-silt — deep SILT knowledge: Svelte 5 rune patterns, the Inertia adapter, Laravel/Inertia controller and form conventions, common gotchas.
- lsp-php + lsp-typescript — semantic navigation instead of grep, and (you'll see this shine in Chapter 4) automatic diagnostics and blast-radius reports after every edit.
- laravel — models, routes, and architecture analysis for the Laravel side.
Then activate them:
/reload
The first commit
Close the chapter the way every chapter should close:
> Commit everything as "chore: scaffold Freddy (SILT stack),
add SPEC.md and AGENTS.md"
Elyra stages and commits — but never on its own initiative. Committing is always your call to make; this, too, is a rule worth having in AGENTS.md.
What you learned
- Scaffold through the agent, with the spec in the prompt — and demand a build verification in the same breath.
-
/initis not optional. AGENTS.md is the project's memory across sessions; every rule you add there is a correction you'll never make again. -
Extensions are the difference between a
generalist and a specialist.
/ext, space to multi-select,/reloadto activate. - SPEC.md + AGENTS.md is the contract: one says what to build, the other says how to behave while building it.
/login, pick models with
/model, and set thinking levels — the
dials that decide cost and quality for everything that
follows.