You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: .claude-plugin/ui/commands/dev.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,44 @@ arguments:
10
10
11
11
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.
12
12
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.
0 commit comments