Why Larapilot
AI agents are fast, but isolated prompts are not a product process. Larapilot turns your assistant into a disciplined squad.
A workflow, not prompt lore
Discovery → backlog → plan → implement → review. Every phase has clear inputs, outputs, and guardrails enforced by the CLI.
Spec-driven
The spec → plan → implement loop repeats per increment with enforced status transitions.
Persistent artifacts
PRD, backlog, specs, plans, and mockups live in .larapilot/ — version-controlled.
Laravel-native
Artisan commands, Boost docs, schema, Tinker — not a separate toolchain.
Agent-friendly CLI
Structured JSON envelopes with stable exit codes — built for MCP.
How it works
Larapilot is a product process backed by files and a CLI — not a one-shot prompt. Three layers cooperate.
| Layer | What it is | Role |
|---|---|---|
| Skills | /larapilot-* in your AI editor (via Boost) | Playbooks: personas, context to load, Artisan commands to run |
| Artisan CLI | php artisan larapilot:* | Validates input, persists artifacts, enforces workflow — JSON envelopes + exit codes |
| Artifacts | .larapilot/ in your repo | Source of truth: PRD, backlog, specs, plans, mockups — version-controlled |
Your editor connects to two MCP servers: Laravel Boost (docs, schema, Tinker) and Larapilot (backlog and workflow). Skills orchestrate the conversation; the CLI guarantees consistency; artifacts survive between sessions.
The discovery interview
Everything starts with /larapilot-inception. You bring a rough idea — one sentence is enough. Mark (PM), Jennifer (Strategist), and John (Architect) run a guided conversation, not a form to fill in one shot.
What they explore:
- Market positioning, competitive context, and product risks (Jennifer)
- Market research and enterprise business perspective (Benjamin)
- Competitive challenger: integrations and competitor data porting — import paths for users switching from rival products, lock-in-free export (Sebastian)
- Product scope, personas, and delivery-target trade-offs (Mark)
- SOLID, scalable, performant architecture within budget (John + Aurora) — Budget Sensitivity can be set to
Relaxedto exclude budget evaluation; business validation is loosened, never removed - For public websites: SEO, Analytics, tracking, Lighthouse (Emma) and social strategy (Lauren)
- When personal data is involved: GDPR and privacy (Violet)
How the interview behaves:
- Agents speak in character (
💎 Mark:,🧭 Jennifer:,📐 John:) so you see which lens is asking - Questions appear only when critical — at most 3 per round, grouped in one message; you can skip any of them
- The agent infers what it can from your codebase and existing artifacts before asking
- The conversation follows your language; the PRD is written in the same language
When there is enough context, the team drafts a PRD (Elevator Pitch, Vision, Personas, Functional Requirements, MVP Scope, Technical Architecture), saves it via larapilot:prd-write, and validates it with larapilot:validate-prd. Inception does not create the backlog — that is /larapilot-spec.
From PRD to shipped code
After the PRD, each user story follows the same loop:
/larapilot-spec— MVP broken into backlog entries (backlog.yaml+specs/US-XXX.yaml)/larapilot-plan US-XXX— technical plan with tasks → PLANNED/larapilot-implement US-XXX— code and tests → REVIEW/larapilot-review US-XXX— you approve (DONE) or send back (TODO)
The CLI blocks invalid jumps (implement before plan, approve before review). Optional /larapilot-design adds UI mockups before planning.
Up and running in minutes
Install the package, enable MCP servers, and invoke skills in your AI editor.
Requirements
- PHP ^8.3
- Laravel ^12 or ^13
- Laravel Boost
^1.0or^2.0(installed automatically with Larapilot) - An AI editor with MCP support (Cursor, etc.)
1. Install
Three commands, run from your Laravel project root. Laravel Boost is installed automatically as a Larapilot dependency — no separate composer require needed.
1a — Add the package:
composer require andreapollastri/larapilot --dev
1b — Initialize Larapilot. Creates the .larapilot/ workspace in your repo:
php artisan larapilot:install
INFO Larapilot installed successfully.
- .larapilot/config.yaml
- .larapilot/shared-runtime.md
Next: run php artisan boost:install (or boost:update --discover) to publish AI skills and guidelines.
1c — Publish skills via Laravel Boost. Makes the eight /larapilot-* skills and the coding guidelines available to your AI editor:
php artisan boost:install
Boost's installer asks which editors and agents you use, then publishes guidelines and skills for them. Already running Boost in the project? Use php artisan boost:update --discover instead to pick up the Larapilot skills.
2. Enable MCP servers
Your editor needs both servers: Boost for Laravel context (docs, schema, Tinker) and Larapilot for workflow state.
| Server | Command | Args |
|---|---|---|
laravel-boost | php | artisan boost:mcp |
larapilot | php | artisan mcp:start larapilot |
Concrete example for editors with a JSON MCP config (Cursor: .cursor/mcp.json, Claude Code: .mcp.json):
{
"mcpServers": {
"laravel-boost": {
"command": "php",
"args": ["artisan", "boost:mcp"]
},
"larapilot": {
"command": "php",
"args": ["artisan", "mcp:start", "larapilot"]
}
}
}
3. Use skills in your AI agent
| Skill | Purpose |
|---|---|
/larapilot-inception | Product discovery → .larapilot/docs/PRD.md |
/larapilot-design | UI mockups → .larapilot/mockups/{spec}/ |
/larapilot-spec | Backlog & user stories |
/larapilot-plan US-001 | Technical plan & tasks |
/larapilot-implement US-001 | Code, tests, review |
/larapilot-review US-001 | Human acceptance gate |
/larapilot-ship | OWASP gate + multi-platform deploy |
/larapilot-autopilot | Batch plan + implement |
4. Example: from idea to done
Start with a fresh Laravel app and this prompt in your AI editor:
I want a simple team task board: user registration, projects, and assignable tasks.
| Step | You invoke | What happens | Output / status |
|---|---|---|---|
| 1. Discovery | /larapilot-inception | Guided interview: problem, users, MVP scope, stack — then PRD written and validated | .larapilot/docs/PRD.md |
| 2. Backlog | /larapilot-spec | User stories extracted from the PRD MVP scope | backlog.yaml, specs/US-001.yaml … TODO |
| 3. Design (optional) | /larapilot-design US-001 | Elise builds a registration screen mockup | .larapilot/mockups/US-001/ → /mockups/US-001 |
| 4. Plan | /larapilot-plan US-001 | John and Alex break down migrations, routes, tests | plans/US-001-plan.yaml → PLANNED |
| 5. Implement | /larapilot-implement US-001 | Alex implements, Anne tests, Robert and Lars review | Laravel code + Pest tests → REVIEW |
| 6. Accept | /larapilot-review US-001 | You approve or request changes | DONE — or back to TODO |
| 7. Ship (optional) | /larapilot-ship | Lars OWASP gate; Jack deploys (Cipi preferred, or Forge, Cloud, Ploi, K8s, custom); Emma & Lauren for public sites | Production release |
| 8. Next spec | /larapilot-plan US-002 … | Repeat plan → implement → review for each story | until the backlog is complete |
After step 6, your repo might look like this:
.larapilot/
├── docs/
│ └── PRD.md
├── backlog.yaml
├── specs/
│ ├── US-001.yaml
│ └── US-002.yaml
├── plans/
│ └── US-001-plan.yaml
└── mockups/
└── US-001/
└── index.html
Use /larapilot-autopilot to batch-plan and implement multiple specs when the backlog is stable.
php artisan larapilot:metrics # backlog progress
5. Verify installation
php artisan larapilot:doctor
{
"schema": "larapilot/v1",
"kind": "doctor",
"data": {
"healthy": true,
"checks": {
"config": true,
"shared_runtime": true,
"backlog": false,
"prd": false,
"boost": true
},
"project_root": "/path/to/your-app"
}
}
data.healthy is true when config, shared runtime, and Boost are all in place. On a fresh install backlog and prd are still false — that's expected: they turn true after /larapilot-inception (PRD) and /larapilot-spec (backlog).
6. Keep it updated
Boost publishes guidelines and skills as copies into your editor directories, so after upgrading the package one command brings everything current — the shared runtime doc, the Larapilot guidelines, and the /larapilot-* skills:
composer update andreapollastri/larapilot
php artisan larapilot:update
larapilot:update never touches .larapilot/config.yaml — your project customizations survive — and re-runs boost:update with the editor and agent choices you already made during boost:install (no questions asked). Pass --skip-boost to refresh only the shared runtime and manage Boost publishing yourself.
To keep the project aligned automatically, hook it into Composer in your app's composer.json:
"scripts": {
"post-update-cmd": [
"@php artisan larapilot:update --ansi"
]
}
From then on every composer update republishes runtime, guidelines, and skills — nothing goes stale silently. Run php artisan larapilot:doctor anytime to confirm the install is healthy.
Spec-driven loop
Inception produces the PRD through a guided interview; optional design creates mockups; then each user story cycles through plan → implement → review. Optional ship releases to production on any Laravel hosting target.
Workflow states
| Status | Meaning | Next step |
|---|---|---|
| TODO | Spec exists, not yet planned | /larapilot-plan |
| PLANNED | Technical plan complete | /larapilot-implement |
| IN PROGRESS | Implementation started | Complete tasks → review |
| REVIEW | Ready for human review | /larapilot-review |
| DONE | Accepted (human-gated) | Next spec or /larapilot-ship |
Transition guards
Invalid transitions fail with E_PRECONDITION and exit code 4:
spec-plan— refuses specs inREVIEWorDONEspec-start— requiresPLANNEDspec-review— requiresIN PROGRESSspec-approve/spec-request-changes— requireREVIEW
Eight skills, full coverage
Published via Laravel Boost and invoked in your AI agent. Each orchestrates a workflow phase via Artisan commands.
Product Inception
Guided discovery interview — not a one-shot form. The team explores your idea conversationally, then writes and validates the PRD.
- Team: Mark, Jennifer, Benjamin, Sebastian, John, Aurora; Emma, Lauren, Violet join when relevant
- Explores: positioning, enterprise research, competitor data porting & integrations, MVP scope, budget-aligned architecture (Budget Sensitivity: Tracked or Relaxed)
- Interview rules: max 3 questions per round, skippable; infers from codebase first
- Output:
.larapilot/docs/PRD.md(backlog comes later via/larapilot-spec)
UI Design
Static HTML/CSS mockups with user flows and accessible markup, previewable via dev-only route.
- Team: Elise (UX); Emma & Lauren for public pages
- Preview:
/mockups/{spec}(matches folder under.larapilot/mockups/)
Backlog & Specs
Creates or extends the backlog with user stories from the PRD.
- Team: Tom (Requirements Analyst), Mark (PM)
- Output:
backlog.yaml+specs/US-XXX.yaml
Technical Planning
Detailed implementation plan with tasks, file changes, and test strategy → PLANNED.
Implementation
Executes the plan: code, tests, task tracking, handoff to REVIEW.
- Team: Alex, Anne, Robert, Lars
Human Review
Acceptance gate — Robert presents the increment and residual risks; you approve to DONE or request changes back to TODO.
- Team: Robert (Code Reviewer)
Ship & Deploy
OWASP security gate and production release. Cipi + cipi/agent is the preferred path; also supports Forge, Laravel Cloud, Ploi, Kubernetes, and custom VPS.
- Team: Lars, Jack, Aurora, Violet, Emma & Lauren (public sites)
- Gate: OWASP Top 10 assessment →
.larapilot/docs/security/ - Launch: SEO, Analytics, Lighthouse, GDPR, social →
.larapilot/docs/launch/ - Deploy: platform-specific runbook (Cipi webhook, Forge push, K8s rollout, …)
Autopilot
Batch mode: automatically plans and implements multiple specs in sequence.
The AI squad
Personas that make the process visible during discovery and implementation.
Artisan CLI
Skills call these commands. All emit JSON envelopes with schema larapilot/v1.
Setup & diagnostics
| Command | Description |
|---|---|
larapilot:install | Initialize project |
larapilot:update | Refresh runtime + skills after upgrade |
larapilot:doctor | Diagnose installation |
larapilot:config-show | Project metadata (JSON envelope) |
larapilot:metrics | Backlog progress |
PRD
| Command | Description |
|---|---|
larapilot:prd-write | Save PRD |
larapilot:validate-prd | Validate PRD structure |
Backlog & specs
| Command | Description |
|---|---|
larapilot:spec-list | List backlog |
larapilot:spec-add | Add specs |
larapilot:spec-show {code} | Show spec + tasks |
larapilot:spec-next | Auto-select next spec |
larapilot:validate-spec | Validate spec payload |
larapilot:spec-delete {code} | Remove spec + plan files |
Planning & implementation
| Command | Description |
|---|---|
larapilot:validate-plan {code} | Validate plan payload |
larapilot:spec-plan {code} | Save plan → PLANNED |
larapilot:spec-start {code} | → IN PROGRESS |
larapilot:task-done {code} {taskId} | Mark task complete |
larapilot:spec-review {code} | → REVIEW |
Review & approval
| Command | Description |
|---|---|
larapilot:spec-approve {code} | → DONE |
larapilot:spec-request-changes {code} | → TODO with feedback |
JSON Envelope
Structured JSON on stdout (success) or stderr (error). Branch on error.code, never on message text.
Success envelope
{
"schema": "larapilot/v1",
"kind": "spec_show",
"data": {
"code": "US-001",
"status": "PLANNED",
"workdir": "/absolute/path/to/project",
"tasks": [...]
}
}
Error envelope
{
"schema": "larapilot/v1",
"kind": "error",
"error": {
"code": "E_PRECONDITION",
"message": "Spec US-001 is TODO, expected PLANNED",
"hint": "Run larapilot:spec-plan US-001 first"
}
}
Error codes
| Code | Meaning |
|---|---|
E_INVALID_INPUT | Malformed payload or validation failure |
E_PRECONDITION | Invalid workflow transition |
E_NOT_FOUND | Spec, plan, or file not found |
E_CONNECTOR | Backend/connector failure |
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Generic error |
2 | Invalid input / validation failed |
3 | Connector error |
4 | Precondition failed or not found |
Configuration
Project config in .larapilot/config.yaml. Built-in defaults apply when absent.
connector: file
paths:
prd: .larapilot/docs/PRD.md
mockups: .larapilot/mockups/
test_results: .larapilot/docs/test-results/
workflow:
statuses:
todo: TODO
planned: PLANNED
in_progress: IN PROGRESS
review: REVIEW
done: DONE
file:
backlog: .larapilot/backlog.yaml
specs: .larapilot/specs/
planning: .larapilot/plans/
Environment variables
| Variable | Default | Description |
|---|---|---|
LARAPILOT_ENABLED | true | Disable MCP and mockup route when false |
LARAPILOT_CONNECTOR | file | Storage connector |
LARAPILOT_MOCKUPS_ROUTE | true | Set false to disable mockup route |
Worktree support
spec-show and spec-next return data.workdir for per-spec codebase work. Connector commands run from data.project_root.
MCP Setup
Three tools designed to work alongside Laravel Boost.
| Tool | Description |
|---|---|
backlog_list | List all specs with status |
spec_show | Spec details, plan tasks, workdir |
run_artisan | Run any larapilot:* command |
Cursor configuration
{
"mcpServers": {
"laravel-boost": {
"command": "php",
"args": ["artisan", "boost:mcp"]
},
"larapilot": {
"command": "php",
"args": ["artisan", "mcp:start", "larapilot"]
}
}
}
Project Artifacts
All artifacts stored under .larapilot/ in your repository.
.larapilot/
├── config.yaml
├── shared-runtime.md
├── backlog.yaml
├── docs/
│ ├── PRD.md
│ └── test-results/
├── specs/
│ ├── US-001.yaml
│ └── US-002.yaml
├── plans/
│ ├── US-001-plan.yaml
│ └── US-002-plan.yaml
└── mockups/
└── US-001/
└── index.html
Spec format
#### US-001: User Registration
**Epic:** EP-001 | **Priority:** HIGH | **Points:** 5 | **Status:** TODO
**User Story**
As a new visitor,
I want to create an account,
So that I can access protected features.
**Acceptance Criteria**
- [ ] AC-001: Email validation enforced
- [ ] AC-002: Password minimum 8 characters
Language & validation
Artifacts can be in any language. The structure is fixed — only labels and content are translated.
Every section must use a markdown heading (## Title or **Title**). Plain prose that mentions “User Story” without a heading does not count.
| Artifact | Required sections | Example (EN → IT) |
|---|---|---|
| PRD | 6 level-2 headings | ## Elevator Pitch → ## Sintesi |
| Spec body | User Story, Demonstrates, Acceptance Criteria | **User Story** → **Storia Utente** |
| Plan task | Description | ## Description → ## Descrizione |
The validator first looks for known translations of these section names. If a heading is in another language, validation still passes when there are enough marked headings:
- PRD — 6 headings with
## … - Spec body — 3 headings with
## …or**…** - Plan task — 1 heading with
## …per task
Mockup Preview Route
Served via dynamic route only outside production.
Mockups live in .larapilot/mockups/{spec}/. The {spec} segment must match the folder name — typically a backlog code like US-001.
| Environment | URL pattern | Access |
|---|---|---|
local, staging, testing | /mockups/{spec} | ✅ Browsable |
production | — | ❌ Disabled (404) |
Examples: .larapilot/mockups/US-001/index.html → /mockups/US-001 (default file). Nested assets: /mockups/US-001/css/app.css.
Disable with LARAPILOT_MOCKUPS_ROUTE=false in .env.
Larapilot + Boost
Complementary tools — use both together.
| Concern | Larapilot | Laravel Boost |
|---|---|---|
| Product workflow | ✓ | — |
| PRD, backlog, plans | ✓ | — |
| Laravel docs search | — | ✓ |
| Database schema/query | — | ✓ |
| Tinker, logs, routes | — | ✓ |
| Coding guidelines | partial | ✓ |
Troubleshooting
Run the doctor
php artisan larapilot:doctor
Common issues
- Missing config — Run
php artisan larapilot:install - Skills not found — Run
php artisan boost:install - Invalid transition — Check status with
larapilot:spec-show {code} - Validation failures — Fix
data.findingsfromvalidate-* - MCP not connecting — Register both servers from project root
- Mockups 404 — Check environment and
LARAPILOT_MOCKUPS_ROUTE
Disabled mode
When LARAPILOT_ENABLED=false, MCP and mockup route are gated off. Artisan commands and doctor remain available.