---
name: lakreame/agentic-project-builder
source: https://app.decimal.ai/s/lakreame-agentic-project-builder@1/SKILL.md
source_sha256: cd95ee395b70
---

# Agentic Project Builder

Senior Software Developer skill for building **SaaS / DaaS / AIaaS** projects through a
structured agentic loop:

```
Prompt → Plan → Execute → Verify → Iterate
```

---

## Token Efficiency — Caveman Integration (optional)

If the `caveman` skill is installed, activate it at session start to compress loop overhead.
If it is not available, proceed normally — do not fail or mention it.

Rules while caveman is active:
- Internal phases (Plan, Verify, Iterate) → **compressed caveman output**
- Code output, file contents → **always full, never compressed**
- User confirmations and questions → **short prose, no bullets**
- Phase headers are always prefixed: `[PLAN]` `[EXEC]` `[VERIFY]` `[ITERATE]`

---

## Loop Protocol

### Phase 0 — PROMPT (Session Init)

**Infer everything you can from the user's request first.** Only ask about what is genuinely
missing — never re-ask something the user already stated:

1. **Goal** — one sentence: what are we building?
2. **Type** — SaaS / DaaS / AIaaS (or hybrid — pick all that apply)
3. **Stack** — infer from the request; show the Stack Menu only if the stack is unclear
4. **Scope** — MVP or full product? (default: MVP if unstated)

Output a confirmed **Project Brief**:

```
GOAL: [one-line description]
TYPE: [SaaS|DaaS|AIaaS|hybrid]
STACK: [selected components, comma-separated]
SCOPE: [MVP|Full]
LOOP: 0
```

Then immediately go to Phase 1.

---

### Phase 1 — PLAN

Break the goal into **the single next concrete step** only.
Not the whole project — just what needs to happen **right now**.

Output format:

```
[PLAN] Loop N
STEP: [verb + object, ≤10 words]
TASKS:
  1. [specific subtask]
  2. [specific subtask]
  3. [specific subtask]
DONE WHEN: [clear, testable completion criterion]
STACK: [components used this step]
```

Keep task list to **3–7 items**. No speculative tasks. No rabbit holes.

---

### Phase 2 — EXECUTE

Carry out every task from the Plan. **Create real files with the file tools (Write/Edit) in
the project directory — do not dump code into chat.** Deliverables:

- **Code files** — written to disk at their correct relative path
- **Config files** — Dockerfiles, docker-compose, `.env.example`, CI YAML
- **Schema** — SQL migrations or EF Core models
- **CLI commands** — run them via the shell when available; otherwise provide copy-pasteable commands with brief context
- **Scaffolding** — folder structure if starting fresh

Follow stack conventions from the relevant reference file (see bottom).
Code output is **always full quality** — no compression, no stubs, no `// TODO`.

---

### Phase 3 — VERIFY

Check every task against `DONE WHEN` from the Plan.
**When a shell is available, actually run it: build, lint, run tests, start the service and
hit an endpoint.** Do not mark tasks done on inspection alone if execution is possible.

Output format:

```
[VERIFY] Loop N
DONE? [YES|NO|PARTIAL]
COMPLETED: [what was actually delivered]
RAN: [commands/tests executed and their results, or "no shell available"]
GAPS: [what is missing or broken]
NEXT: [continue→loop N+1 | present→user | blocked→ask]
```

- `YES` → surface results to user, ask: **continue building or stop?**
- `NO` / `PARTIAL` → go directly to Phase 4
- `blocked` → ask user for missing info before continuing

---

### Phase 4 — ITERATE

Feed gaps back into a new plan. Increment loop counter.

Output format:

```
[ITERATE] → Loop N+1
CARRYING: [unresolved gaps from verify]
```

Then restart at Phase 1 with updated context.

---

## Stack Menu

**Only present this menu when the stack cannot be inferred from the user's request.**
When shown, present these grouped options:

**Frontend**
- `react-ts` — React + TypeScript (Vite, Tailwind, shadcn/ui)
- `blazor` — Blazor (.NET 8, MudBlazor or Radzen)
- `flutter` — Flutter (Dart, mobile/web/desktop, Riverpod or Bloc)

**Backend**
- `node` — Node.js (Express or Fastify, TypeScript, Zod)
- `dotnet` — C# .NET 8 (Minimal API or Controllers, Scalar docs)
- `python` — Python (FastAPI, Pydantic, async-first)

**Database**
- `postgres` — PostgreSQL (Docker-composed, Flyway or EF Core migrations)
- `mssql` — SQL Server (Docker-composed, EF Core migrations or Flyway; pairs naturally with .NET)

**AI / ML**
- `huggingface` — HuggingFace Transformers (hosted or local inference)
- `yolo` — Ultralytics YOLO (YOLO11, Python REST wrapper)

**Infrastructure**
- `docker` — Docker (multi-stage builds, docker-compose dev setup)
- `vercel` — Vercel (Next.js or static React, preview deploys)

**Integrations**
- `alpaca` — Alpaca Markets (trading API, paper/live, market data)
- `stripe` — Stripe (webhook handler + subscription boilerplate)
- `playwright` — Playwright (e2e scaffold + CI integration)
- `github` — GitHub Actions (CI/CD pipeline, branch protection)
- `openapi` — OpenAPI + Scalar (spec-first design, auto docs)
- `swagger` — Swagger UI (Swashbuckle for .NET, @fastify/swagger-ui for Node; alternative to Scalar)

---

## Reference Files

Load the relevant file(s) at session start depending on project type and stack:

| Trigger         | File                           | Contents                                              |
|-----------------|--------------------------------|-------------------------------------------------------|
| Type: SaaS      | `references/saas-pattern.md`   | Auth, multi-tenancy, RBAC, billing patterns           |
| Type: DaaS      | `references/daas-pattern.md`   | Ingestion, transforms, API layer, rate limiting       |
| Type: AIaaS     | `references/aiaas-pattern.md`  | Model serving, inference API, batching, observability |
| Stack: `alpaca` | `references/alpaca-markets.md` | Trading API integration, paper/live, order tracking   |

---

## Loop Rules

1. **One step at a time** — never plan beyond the next concrete deliverable
2. **Verify before iterating** — no blind loops; run code when a shell exists
3. **Ask before context switch** — if user changes goal mid-loop, confirm before resetting
4. **Compressed planning, full code** — terse phases, complete output
5. **Stack discipline** — never introduce unlisted tools without asking
6. **Loop cap** — after 10 loops, surface a progress summary and ask user to confirm direction
7. **No stubs** — all generated code must be runnable, not placeholders
8. **Trading safety** — never place live trades automatically; paper trading is the default, live requires explicit user confirmation per session