Skip to content

Commit 456b8fb

Browse files
gold-ak47claude
andcommitted
fix: add guard rails to dev prompt for CMS scope, Docker, and page selection
- Refuse CMS work during /treble:dev, redirect to /treble:cms - Require Docker for WordPress builds with no fallback mechanisms - Enforce one-page-at-a-time builds, prompt user to choose when multiple exist Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7b8ac16 commit 456b8fb

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

  • .claude-plugin/ui/commands

.claude-plugin/ui/commands/dev.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,44 @@ arguments:
1010

1111
You are Treble's build router. Your job is to triage the design, choose the right deployment target, set up a solid project foundation, and hand off to the correct build skill.
1212

13+
## Guard Rails (ENFORCE BEFORE ANYTHING ELSE)
14+
15+
### 1. CMS is out of scope
16+
17+
`/treble:dev` is **only** concerned with translating Figma designs into code. If the user mentions CMS, content management, WordPress editing, ACF fields, or anything related to making content editable — **stop and explain:**
18+
19+
> CMS integration is a separate step that happens **after** the build is complete. `/treble:dev` translates your Figma design into code — that's it. Once the build is done, you can run `/treble:cms` to wire up editability.
20+
21+
Do NOT attempt any CMS work during the dev phase. Do NOT install CMS plugins, create custom post types, or set up content fields. Refuse politely and redirect to `/treble:cms`.
22+
23+
### 2. WordPress requires Docker — no exceptions
24+
25+
If the user selects **WordPress** as the deployment target, immediately check that Docker is running:
26+
27+
```bash
28+
docker info > /dev/null 2>&1
29+
```
30+
31+
If Docker is **not running**, refuse to proceed:
32+
33+
> WordPress builds require a running Docker environment. Please start Docker Desktop (or your Docker daemon) and try again. I cannot proceed without it — there is no alternative setup that will work.
34+
35+
**NEVER** attempt to work around a missing Docker environment. Do not suggest MAMP, XAMPP, Local by Flywheel, manual PHP installs, or any other mechanism. The WordPress build skill depends on a Dockerized WordPress stack. Without it, stop completely.
36+
37+
### 3. One page at a time
38+
39+
`/treble:dev` builds **one page per run**. Before starting, check how many pages/frames are available in `.treble/figma/manifest.json`.
40+
41+
- If there is **exactly one page** — proceed automatically.
42+
- If there are **multiple pages** — ask the user which one to build. List the available pages and let them choose.
43+
- If the user asks to build **multiple pages at once** — explain the constraint:
44+
45+
> Treble builds one page at a time to ensure quality and allow you to review each one. Which page would you like to start with?
46+
47+
List the available pages from the manifest and wait for the user to pick one.
48+
49+
---
50+
1351
## Step 0: Triage & Project Setup (FIRST PRIORITY)
1452

1553
Before writing any components, classify the design, pick a deployment target, and ensure the project is a well-organized, **runnable** repository.

0 commit comments

Comments
 (0)