feat(agents): add design gate for automatic ui-ux-pro-max detection
Lightweight skills (feat, hotfix, bugfix) had zero plugin awareness — design tasks ran without ui-ux-pro-max even when relevant. Add a design gate (lib/design-gate.md) that auto-detects UI/style signals in task description and filesystem, then asks the user to activate ui-ux-pro-max if inactive. Orchestrators already handle this via their STEP 0 plugin-check. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+8
-1
@@ -34,6 +34,13 @@ Identify:
|
||||
git log --oneline -20 --all -- <suspected files>
|
||||
```
|
||||
|
||||
## STEP 1.5 — DESIGN GATE
|
||||
|
||||
Follow `$HOME/.claude/lib/design-gate.md`:
|
||||
- Scan $ARGUMENTS and target files for design/UI/style signals (CSS, component, layout, animation).
|
||||
- If signals found and `ui-ux-pro-max` inactive → ask user to activate.
|
||||
- If no signals → skip (zero overhead).
|
||||
|
||||
## STEP 2 — INVESTIGATE
|
||||
|
||||
Trace the bug from symptom to root cause:
|
||||
@@ -126,7 +133,7 @@ Execute in automatic mode:
|
||||
|
||||
## RULES
|
||||
- No fix without understanding the root cause first.
|
||||
- No plugin check (lightweight skill, not an orchestrator).
|
||||
- Design gate only if UI/style signals detected. See STEP 1.5.
|
||||
- If investigation reveals a design flaw requiring significant
|
||||
refactoring → stop, explain, suggest `/ship-feature` for the
|
||||
proper fix.
|
||||
|
||||
+8
-1
@@ -39,6 +39,13 @@ Print a one-line scope confirmation:
|
||||
FEAT: <feature name> — ~<N> files, <brief approach>
|
||||
```
|
||||
|
||||
## STEP 0.5 — DESIGN GATE
|
||||
|
||||
Follow `$HOME/.claude/lib/design-gate.md`:
|
||||
- Scan $ARGUMENTS and target files for design/UI/style signals.
|
||||
- If signals found and `ui-ux-pro-max` inactive → ask user to activate.
|
||||
- If no signals → skip (zero overhead).
|
||||
|
||||
## STEP 1 — MINI-PLAN
|
||||
|
||||
Quick mental model, not a formal plan document:
|
||||
@@ -116,7 +123,7 @@ Execute in automatic mode:
|
||||
|
||||
## RULES
|
||||
- Max 5 files. If more needed → `/ship-feature`.
|
||||
- No plugin check (not an orchestrator).
|
||||
- Design gate only (not full plugin check). See STEP 0.5.
|
||||
- No brainstorm/design phase (if needed → `/ship-feature`).
|
||||
- No subagents — direct implementation.
|
||||
- Keep scope tight. If scope creep happens mid-work, stop
|
||||
|
||||
+8
-1
@@ -31,6 +31,13 @@ git log --oneline -3
|
||||
"This looks deeper than a hotfix. Load `$HOME/.claude/agents/bugfixer.md`
|
||||
and run the BUGFIXER agent on this target."
|
||||
|
||||
## STEP 1.5 — DESIGN GATE
|
||||
|
||||
Follow `$HOME/.claude/lib/design-gate.md`:
|
||||
- Scan $ARGUMENTS and target files for design/UI/style signals (CSS, component, styling, animation).
|
||||
- If signals found and `ui-ux-pro-max` inactive → ask user to activate.
|
||||
- If no signals → skip (zero overhead).
|
||||
|
||||
## STEP 2 — FIX
|
||||
|
||||
Apply the minimal change that fixes the bug:
|
||||
@@ -72,7 +79,7 @@ Execute in automatic mode:
|
||||
## RULES
|
||||
- Max 2 files changed. If more needed → `/bugfix`.
|
||||
- No refactoring. No "while we're here" improvements.
|
||||
- No plugin check (overhead > value for a hotfix).
|
||||
- Design gate only if CSS/style signals detected. See STEP 1.5.
|
||||
- If root cause is unclear → escalate to `/bugfix`.
|
||||
- If fix touches >5 lines of logic → reconsider if this is
|
||||
truly a hotfix.
|
||||
|
||||
@@ -165,12 +165,14 @@ When the plugin-advisor detects a `simple` or `hotfix` signal, suggest the appro
|
||||
|---|---|---|---|
|
||||
| Typo, CSS fix, wrong value, missing import | `/hotfix` | Root cause obvious, 1-2 files max | ~30s |
|
||||
| Bug with unclear root cause, multi-file | `/bugfix` | Needs investigation before fixing, up to ~5 files | ~3 min |
|
||||
| Small feature, 1-5 files | `/feat` | Well-scoped addition, no design needed | ~2 min |
|
||||
| Small feature, 1-5 files | `/feat` | Well-scoped addition, design gate included | ~2 min |
|
||||
| Large feature, design decisions needed | `/ship-feature` | Multi-file, needs brainstorm + plan + review | ~10 min |
|
||||
| New project from scratch | `/init-project` | Full project setup with scaffolding | ~15 min |
|
||||
|
||||
**Escalation path:** `/hotfix` → `/bugfix` → `/ship-feature` (bugs), `/feat` → `/ship-feature` (features). Each skill documents when to escalate to the next level.
|
||||
|
||||
**Design gate:** `/feat`, `/hotfix`, and `/bugfix` include a lightweight design gate (`lib/design-gate.md`) that auto-detects UI/style signals and asks the user to activate `ui-ux-pro-max` if inactive. This covers the gap where lightweight skills previously had no plugin awareness for design tasks.
|
||||
|
||||
---
|
||||
|
||||
## COMPATIBILITY MATRIX
|
||||
|
||||
Reference in New Issue
Block a user