viepilot 2.50.1 → 3.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +204 -0
- package/README.md +1 -1
- package/bin/viepilot.cjs +1 -0
- package/bin/vp-tools.cjs +123 -1
- package/docs/brainstorm/session-2026-05-22.md +472 -0
- package/docs/dev/agents.md +51 -41
- package/lib/adapter-context.cjs +294 -0
- package/lib/adapters/antigravity.cjs +8 -2
- package/lib/adapters/claude-code.cjs +4 -0
- package/lib/audit/browser-runner.cjs +102 -0
- package/lib/intake/adapters/browser.cjs +58 -0
- package/lib/intake/adapters/excel-m365.cjs +54 -6
- package/lib/intake/auto-intake.cjs +194 -0
- package/lib/intake/classifier.cjs +22 -4
- package/lib/intake/manifest.cjs +81 -0
- package/lib/intake/triage-ux.cjs +10 -2
- package/lib/intake/validator.cjs +97 -0
- package/lib/intake/writeback.cjs +169 -3
- package/lib/request/url-enricher.cjs +69 -0
- package/lib/viepilot-install.cjs +15 -0
- package/package.json +1 -1
- package/skills/vp-audit/SKILL.md +99 -3
- package/skills/vp-auto/SKILL.md +54 -4
- package/skills/vp-brainstorm/SKILL.md +69 -3
- package/skills/vp-crystallize/SKILL.md +52 -3
- package/skills/vp-debug/SKILL.md +52 -3
- package/skills/vp-design/SKILL.md +52 -3
- package/skills/vp-docs/SKILL.md +52 -3
- package/skills/vp-evolve/SKILL.md +52 -3
- package/skills/vp-info/SKILL.md +52 -3
- package/skills/vp-intake/SKILL.md +306 -7
- package/skills/vp-pause/SKILL.md +52 -3
- package/skills/vp-persona/SKILL.md +52 -3
- package/skills/vp-proposal/SKILL.md +52 -3
- package/skills/vp-request/SKILL.md +72 -3
- package/skills/vp-resume/SKILL.md +52 -3
- package/skills/vp-rollback/SKILL.md +52 -3
- package/skills/vp-skills/SKILL.md +52 -3
- package/skills/vp-status/SKILL.md +52 -3
- package/skills/vp-task/SKILL.md +52 -3
- package/skills/vp-ui-components/SKILL.md +52 -3
- package/skills/vp-update/SKILL.md +52 -3
- package/workflows/autonomous.md +268 -18
- package/workflows/brainstorm.md +222 -7
- package/workflows/crystallize.md +124 -6
- package/workflows/design.md +62 -1
- package/workflows/request.md +54 -8
package/workflows/brainstorm.md
CHANGED
|
@@ -5,12 +5,18 @@ Allows research inline within the same brainstorm session when needed.
|
|
|
5
5
|
|
|
6
6
|
## Adapter Compatibility
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|---------|----------------------|-----------------------|-----------|----------------------|
|
|
10
|
-
| Interactive prompts | ✅ `AskUserQuestion` tool — **REQUIRED** | ❌ text fallback | ❌ text fallback | ❌ text fallback |
|
|
8
|
+
Detected at session start via `vp-tools detect-adapter` → ADAPTER_CONTEXT. Use ADAPTER_CONTEXT.interactive to select prompt mode.
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
| Feature | claude-code | cursor-agent | antigravity | codex | copilot |
|
|
11
|
+
|---------|------------|--------------|-------------|-------|---------|
|
|
12
|
+
| Interactive (ADAPTER_CONTEXT.interactive) | `AUQ` | `text` | `none` | `none` | `text` |
|
|
13
|
+
| Prompt tool | `AskUserQuestion` | text list | defaults | defaults | text list |
|
|
14
|
+
| Shell tool | `Bash` | `run_terminal_cmd` | `shell` | `container.exec` | `runCommands` |
|
|
15
|
+
|
|
16
|
+
**Interactive fallback chain** (read from ADAPTER_CONTEXT.interactive):
|
|
17
|
+
1. `"AUQ"` → call `AskUserQuestion` (preload via ToolSearch first)
|
|
18
|
+
2. `"text"` → show plain-text numbered list
|
|
19
|
+
3. `"none"` → proceed with session defaults (log decision)
|
|
14
20
|
|
|
15
21
|
## ViePilot Skill Scope Policy (BUG-004)
|
|
16
22
|
|
|
@@ -22,7 +28,24 @@ Allows research inline within the same brainstorm session when needed.
|
|
|
22
28
|
<process>
|
|
23
29
|
|
|
24
30
|
<step name="detect_session_language">
|
|
25
|
-
## 0.
|
|
31
|
+
## 0. ADAPTER_CONTEXT Load (FEAT-021)
|
|
32
|
+
|
|
33
|
+
Detect active adapter and inject capability context. All interactive prompts in this workflow
|
|
34
|
+
use ADAPTER_CONTEXT.interactive to select the correct prompt mode.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
ADAPTER_CONTEXT_JSON=$(node "$HOME/.claude/viepilot/bin/vp-tools.cjs" detect-adapter --json 2>/dev/null \
|
|
38
|
+
|| node "$(pwd)/bin/vp-tools.cjs" detect-adapter --json 2>/dev/null \
|
|
39
|
+
|| echo '{"adapter":"claude-code","interactive_mode":"AUQ","orchestration":{"parallel":true}}')
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Parse `interactive_mode` from JSON:
|
|
43
|
+
- `"AUQ"` → use `AskUserQuestion` tool (preload via ToolSearch first)
|
|
44
|
+
- `"text"` or `"none"` → use plain-text numbered list fallback
|
|
45
|
+
|
|
46
|
+
Silent on error — fallback assumes claude-code defaults. Continue without blocking.
|
|
47
|
+
|
|
48
|
+
## 0B. Detect Session Language (ENH-032)
|
|
26
49
|
|
|
27
50
|
Read `~/.viepilot/config.json` → set `BRAINSTORM_LANG`:
|
|
28
51
|
- `BRAINSTORM_LANG` = `language.document` from config (default: `en`)
|
|
@@ -254,6 +277,38 @@ If the user chooses to continue:
|
|
|
254
277
|
5. If the session already has a **`## Phases`** section: briefly summarize existing phases; all subsequent updates must **merge** into that section (no silent deletion) unless the user explicitly requests narrowing/expanding scope.
|
|
255
278
|
</step>
|
|
256
279
|
|
|
280
|
+
<step name="reference_url_research">
|
|
281
|
+
### Step 3A: Reference URL Research (ENH-092)
|
|
282
|
+
|
|
283
|
+
**Trigger**: User provides a URL in their brainstorm input (competitor, reference app, documentation site).
|
|
284
|
+
|
|
285
|
+
URL pattern detection: `https?://` present in user message before or during Step 3.
|
|
286
|
+
|
|
287
|
+
When triggered:
|
|
288
|
+
1. Extract URL from user message
|
|
289
|
+
2. Dispatch research-agent with browser research op:
|
|
290
|
+
```js
|
|
291
|
+
Agent({ subagent_type: "research-agent",
|
|
292
|
+
description: "research-agent: browse reference URL for brainstorm context",
|
|
293
|
+
prompt: `op: browse_url. url: "${url}". extract_focus: "features,ux-patterns,pricing,tech-stack". topic: "${sessionTitle}"` })
|
|
294
|
+
```
|
|
295
|
+
3. Present findings as `## Reference Research` section in brainstorm output:
|
|
296
|
+
- Key features / capabilities
|
|
297
|
+
- UX patterns observed
|
|
298
|
+
- Pricing model (if applicable)
|
|
299
|
+
- Tech stack clues
|
|
300
|
+
4. Use findings as context for subsequent brainstorm questions
|
|
301
|
+
5. If agent-browser not available: attempt WebFetch fallback (static HTML only — warn if empty)
|
|
302
|
+
|
|
303
|
+
**Multiple URLs**: if user provides 2+ URLs, dispatch `compare_products` op:
|
|
304
|
+
```js
|
|
305
|
+
Agent({ subagent_type: "research-agent",
|
|
306
|
+
prompt: `op: compare_products. urls: ${JSON.stringify(urls)}. topic: "${sessionTitle}"` })
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**Non-CC adapters**: skip agent dispatch, use WebFetch directly on the URL.
|
|
310
|
+
</step>
|
|
311
|
+
|
|
257
312
|
<step name="upgrade_gap_detection">
|
|
258
313
|
### Step 3B: Upgrade Gap Detection (ENH-067)
|
|
259
314
|
|
|
@@ -671,7 +726,7 @@ Map brainstorm UI signal keywords to capability tags:
|
|
|
671
726
|
| UI Signal keywords | Capability match |
|
|
672
727
|
|-------------------|-----------------|
|
|
673
728
|
| `component`, `layout`, `screen`, `page`, `UI`, `UX` | `ui-generation`, `component-design` |
|
|
674
|
-
| `responsive`, `mobile`, `grid` | `responsive-layout` |
|
|
729
|
+
| `responsive`, `mobile`, `grid`, `breakpoint`, `viewport`, `adaptive`, `touch`, `swipe`, `safe-area`, `hamburger` | `responsive-layout` |
|
|
675
730
|
| `design`, `theme`, `color`, `typography` | `design-system`, `design-tokens` |
|
|
676
731
|
| `form`, `button`, `input`, `modal` | `component-design` |
|
|
677
732
|
|
|
@@ -699,6 +754,96 @@ After the session's first UI artifact is generated (or updated), append to `note
|
|
|
699
754
|
If `## skills_used` already exists: merge (add new skills, update applied_at).
|
|
700
755
|
If no skills matched or registry absent: omit `## skills_used` section.
|
|
701
756
|
|
|
757
|
+
### Mobile Design Direction Sub-Phase (ENH-085)
|
|
758
|
+
|
|
759
|
+
**Trigger:** UI Direction Mode is active AND any of these keywords appear in the session:
|
|
760
|
+
`mobile` · `responsive` · `breakpoint` · `viewport` · `adaptive` · `touch` · `swipe`
|
|
761
|
+
`safe-area` · `hamburger` · `tablet` · `phone` · `narrow` · `narrow screen` · `screen size`
|
|
762
|
+
|
|
763
|
+
**When triggered — fire TWO sequential AUQ prompts before HTML generation begins:**
|
|
764
|
+
|
|
765
|
+
**AUQ 1 — Viewport Strategy:**
|
|
766
|
+
```
|
|
767
|
+
question: "What is the responsive design strategy for this project?"
|
|
768
|
+
options:
|
|
769
|
+
- label: "Mobile-first (Recommended)"
|
|
770
|
+
description: "Base styles target mobile; breakpoints (md:, lg:) scale up. Default for most web apps."
|
|
771
|
+
- label: "Desktop-first"
|
|
772
|
+
description: "Full desktop layout; shrink down with max-width breakpoints."
|
|
773
|
+
- label: "Mobile only"
|
|
774
|
+
description: "No desktop variant needed (PWA, native-style app, mobile-specific tool)."
|
|
775
|
+
- label: "Desktop only"
|
|
776
|
+
description: "Internal tool or dashboard — no mobile support required."
|
|
777
|
+
```
|
|
778
|
+
|
|
779
|
+
**AUQ 2 — Target Device Scope (multiSelect: true):**
|
|
780
|
+
```
|
|
781
|
+
question: "Which device types need UI direction?"
|
|
782
|
+
multiSelect: true
|
|
783
|
+
options:
|
|
784
|
+
- label: "Phone (≤767px)"
|
|
785
|
+
description: "Small screens, touch-first, vertical scroll, hamburger nav."
|
|
786
|
+
- label: "Tablet (768–1023px)"
|
|
787
|
+
description: "Medium screens, touch+pointer, hybrid layouts."
|
|
788
|
+
- label: "Desktop (≥1024px)"
|
|
789
|
+
description: "Large screens, pointer-first, dense information layouts."
|
|
790
|
+
- label: "Wide / TV (≥1280px)"
|
|
791
|
+
description: "Very large screens, 3+ column layouts, dashboard displays."
|
|
792
|
+
```
|
|
793
|
+
|
|
794
|
+
**Store answers as session context:**
|
|
795
|
+
```yaml
|
|
796
|
+
responsive_strategy: mobile-first | desktop-first | mobile-only | desktop-only
|
|
797
|
+
target_devices: [phone, tablet, desktop, wide] # subset based on AUQ selections
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
**Fallback (if AUQ not available):** set `responsive_strategy: mobile-first`, `target_devices: [phone, tablet, desktop]` silently.
|
|
801
|
+
|
|
802
|
+
**Skip conditions:**
|
|
803
|
+
- No mobile/responsive keywords in session → skip entirely (non-mobile project)
|
|
804
|
+
- `responsive_strategy` already set in session context (resume) → skip AUQ, reuse stored values
|
|
805
|
+
|
|
806
|
+
**Component Responsive Map in notes.md (ENH-085)**
|
|
807
|
+
|
|
808
|
+
After the Mobile Design Direction AUQ completes (or on session resume with `responsive_strategy` set),
|
|
809
|
+
append a `## Component Responsive Map` section to `notes.md`:
|
|
810
|
+
|
|
811
|
+
```markdown
|
|
812
|
+
## Component Responsive Map
|
|
813
|
+
|
|
814
|
+
> ViePilot ENH-085 — Strategy: {responsive_strategy} | Devices: {target_devices joined with ", "}
|
|
815
|
+
> Generated: {date}
|
|
816
|
+
|
|
817
|
+
| Component | Mobile (≤767px) | Tablet (768–1023px) | Desktop (≥1024px) |
|
|
818
|
+
|----------------|------------------------|------------------------|----------------------|
|
|
819
|
+
| Navigation | {mobile_nav} | {tablet_nav} | {desktop_nav} |
|
|
820
|
+
| Layout grid | 1 column, full-width | 2 columns | 3+ columns / sidebar |
|
|
821
|
+
| Data table | Card list (stacked) | Scrollable table | Full table + filters |
|
|
822
|
+
| Modal / dialog | Bottom sheet | Centered dialog | Centered dialog |
|
|
823
|
+
| Forms | Single column | 2-col grouped | 2-col grouped |
|
|
824
|
+
| Buttons (CTA) | Full-width | Auto / inline | Auto / inline |
|
|
825
|
+
| Images / media | 100% width, cropped | 50–75% width | Fixed aspect ratio |
|
|
826
|
+
|
|
827
|
+
### Navigation Pattern Detail
|
|
828
|
+
- **Mobile**: {mobile_nav_detail}
|
|
829
|
+
- **Tablet**: {tablet_nav_detail}
|
|
830
|
+
- **Desktop**: {desktop_nav_detail}
|
|
831
|
+
|
|
832
|
+
### Responsive Utilities Reference (Tailwind)
|
|
833
|
+
```
|
|
834
|
+
Mobile base → no prefix (e.g., flex flex-col p-4)
|
|
835
|
+
Tablet → `md:` prefix (e.g., md:flex-row md:grid-cols-2)
|
|
836
|
+
Desktop → `lg:` prefix (e.g., lg:grid-cols-3 lg:sidebar-fixed)
|
|
837
|
+
Wide → `xl:` prefix (e.g., xl:max-w-7xl xl:px-12)
|
|
838
|
+
```
|
|
839
|
+
```
|
|
840
|
+
|
|
841
|
+
Nav values for the table: use Navigation strategy lookup table defined in the per-breakpoint HTML section above.
|
|
842
|
+
|
|
843
|
+
**Guard:** If `notes.md` already contains `## Component Responsive Map` → skip (do not overwrite).
|
|
844
|
+
|
|
845
|
+
**Skip:** If `responsive_strategy` is null (non-mobile session) → omit section entirely.
|
|
846
|
+
|
|
702
847
|
**Required hook (multi-page only)**
|
|
703
848
|
|
|
704
849
|
When the `pages/` directory exists or any `pages/*.html` is added / renamed / removed:
|
|
@@ -707,6 +852,76 @@ When the `pages/` directory exists or any `pages/*.html` is added / renamed / re
|
|
|
707
852
|
- Immediately update the **`## Pages inventory`** section in `notes.md` (table: Slug | File | Title | Purpose | Key sections | Nav to) — must match 100% of the current `pages/*.html` file set.
|
|
708
853
|
- Do not end a topic / do not consider the UI session “synced” if the inventory diverges from files on disk.
|
|
709
854
|
|
|
855
|
+
**Per-breakpoint sections in pages/*.html (ENH-085)**
|
|
856
|
+
|
|
857
|
+
When `responsive_strategy` is set (from Mobile Design Direction sub-phase), append a
|
|
858
|
+
`<div class="responsive-breakdown">` section to the bottom of every generated `pages/{slug}.html`:
|
|
859
|
+
|
|
860
|
+
```html
|
|
861
|
+
<!-- Responsive Breakdown — ViePilot ENH-085 -->
|
|
862
|
+
<div class="responsive-breakdown">
|
|
863
|
+
<h2>Responsive Breakdown</h2>
|
|
864
|
+
<!-- Render only sections for active target_devices -->
|
|
865
|
+
|
|
866
|
+
<!-- Phone section: render when target_devices includes "phone" -->
|
|
867
|
+
<details open>
|
|
868
|
+
<summary>📱 Mobile (≤767px)</summary>
|
|
869
|
+
<div class="breakpoint-notes">
|
|
870
|
+
<p><strong>Layout:</strong> {mobile_layout}</p>
|
|
871
|
+
<p><strong>Navigation:</strong> {mobile_nav}</p>
|
|
872
|
+
<ul>{mobile_key_changes}</ul>
|
|
873
|
+
</div>
|
|
874
|
+
</details>
|
|
875
|
+
|
|
876
|
+
<!-- Tablet section: render when target_devices includes "tablet" -->
|
|
877
|
+
<details>
|
|
878
|
+
<summary>💻 Tablet (768–1023px)</summary>
|
|
879
|
+
<div class="breakpoint-notes">
|
|
880
|
+
<p><strong>Layout:</strong> {tablet_layout}</p>
|
|
881
|
+
<p><strong>Navigation:</strong> {tablet_nav}</p>
|
|
882
|
+
<ul>{tablet_key_changes}</ul>
|
|
883
|
+
</div>
|
|
884
|
+
</details>
|
|
885
|
+
|
|
886
|
+
<!-- Desktop section: render when target_devices includes "desktop" -->
|
|
887
|
+
<details>
|
|
888
|
+
<summary>🖥 Desktop (≥1024px)</summary>
|
|
889
|
+
<div class="breakpoint-notes">
|
|
890
|
+
<p><strong>Layout:</strong> {desktop_layout}</p>
|
|
891
|
+
<p><strong>Navigation:</strong> {desktop_nav}</p>
|
|
892
|
+
</div>
|
|
893
|
+
</details>
|
|
894
|
+
</div>
|
|
895
|
+
```
|
|
896
|
+
|
|
897
|
+
**`<details open>`** = primary breakpoint (phone if mobile-first, desktop if desktop-first).
|
|
898
|
+
|
|
899
|
+
**Navigation strategy lookup** (infer from page purpose):
|
|
900
|
+
|
|
901
|
+
| Page purpose | Mobile nav | Tablet nav | Desktop nav |
|
|
902
|
+
|---|---|---|---|
|
|
903
|
+
| App / dashboard | Hamburger drawer | Bottom tab bar | Left sidebar |
|
|
904
|
+
| Marketing / landing | Hamburger menu | Hamburger menu | Full horizontal nav |
|
|
905
|
+
| E-commerce | Bottom tab (Home/Search/Cart/Profile) | Tab bar + filters | Full nav + mega menu |
|
|
906
|
+
| Admin / internal | Bottom nav (compact) | Collapsible sidebar | Full left sidebar |
|
|
907
|
+
| Auth (login/signup) | Single-column form | Centered card | Centered card |
|
|
908
|
+
| Content / reader | Bottom nav | Collapsed sidebar | Persistent sidebar |
|
|
909
|
+
|
|
910
|
+
**Skip conditions:**
|
|
911
|
+
- `responsive_strategy` absent → skip block entirely
|
|
912
|
+
- `responsive_strategy: mobile-only` → render Phone section only (no details wrapper needed)
|
|
913
|
+
- `responsive_strategy: desktop-only` → render Desktop section only
|
|
914
|
+
|
|
915
|
+
**CSS to append to shared `style.css`** (once per workspace, not per page):
|
|
916
|
+
|
|
917
|
+
```css
|
|
918
|
+
/* ENH-085 — Responsive Breakdown */
|
|
919
|
+
.responsive-breakdown{margin-top:2rem;border-top:2px solid #e5e7eb;padding-top:1.5rem}
|
|
920
|
+
.responsive-breakdown details{margin-bottom:1rem;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}
|
|
921
|
+
.responsive-breakdown summary{font-weight:600;cursor:pointer;padding:.25rem 0;user-select:none}
|
|
922
|
+
.breakpoint-notes{padding-top:.75rem}
|
|
923
|
+
```
|
|
924
|
+
|
|
710
925
|
3. If the user sends references/components (including 21st.dev prompts/links), record clearly:
|
|
711
926
|
- reference source
|
|
712
927
|
- the UI area it applies to (page slug if multi-page)
|
package/workflows/crystallize.md
CHANGED
|
@@ -4,12 +4,20 @@ Convert brainstorm sessions into structured artifacts for autonomous AI executio
|
|
|
4
4
|
|
|
5
5
|
## Adapter Compatibility
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|---------|----------------------|-----------------------|-----------|----------------------|
|
|
9
|
-
| Interactive prompts | ✅ `AskUserQuestion` tool — **REQUIRED** | ❌ text fallback | ❌ text fallback | ❌ text fallback |
|
|
7
|
+
Detected at session start via `vp-tools detect-adapter` → ADAPTER_CONTEXT. Use ADAPTER_CONTEXT.interactive to select prompt mode.
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
| Feature | claude-code | cursor-agent | antigravity | codex | copilot |
|
|
10
|
+
|---------|------------|--------------|-------------|-------|---------|
|
|
11
|
+
| Interactive (ADAPTER_CONTEXT.interactive) | `AUQ` | `text` | `none` | `none` | `text` |
|
|
12
|
+
| Prompt tool | `AskUserQuestion` | text fallback | text fallback | text fallback | text fallback |
|
|
13
|
+
| Shell tool (Sub-scan A) | `Bash` | `run_terminal_cmd` | `shell` | `container.exec` | `runCommands` |
|
|
14
|
+
|
|
15
|
+
**Interactive fallback chain** (read from ADAPTER_CONTEXT.interactive):
|
|
16
|
+
1. `"AUQ"` → call `AskUserQuestion` (preload via ToolSearch first)
|
|
17
|
+
2. `"text"` → show plain-text numbered list
|
|
18
|
+
3. `"none"` → proceed with session defaults (log decision)
|
|
19
|
+
|
|
20
|
+
**Sub-scan A shell tool**: use `ADAPTER_CONTEXT.tools.shell` — `Bash` on claude-code, `run_terminal_cmd` on cursor-agent, `shell` on antigravity.
|
|
13
21
|
|
|
14
22
|
## ViePilot Skill Scope Policy (BUG-004)
|
|
15
23
|
|
|
@@ -789,6 +797,15 @@ Rule: `secondary_languages[]` = languages with ≥5 files that are not `primary_
|
|
|
789
797
|
|
|
790
798
|
1. `tailwind.config.js` / `tailwind.config.ts`
|
|
791
799
|
- Extract: `theme.extend.colors`, `theme.colors`, `theme.fontFamily`, `theme.spacing`, `theme.borderRadius`
|
|
800
|
+
- **ENH-085 — Breakpoint extraction:** also read `theme.screens` / `theme.extend.screens`
|
|
801
|
+
- If present: record custom breakpoint values (e.g., `{ sm: '640px', md: '768px', lg: '1024px' }`)
|
|
802
|
+
- If absent: use Tailwind defaults `{ sm: 640, md: 768, lg: 1024, xl: 1280, '2xl': 1536 }` (report as "Tailwind defaults")
|
|
803
|
+
- **ENH-085 — Responsive utility detection:** after token scan, grep component source files for responsive prefix patterns:
|
|
804
|
+
- Scan: `src/**/*.{jsx,tsx,vue,svelte}`, `pages/**/*.{jsx,tsx}`, `app/**/*.{jsx,tsx,svelte}`
|
|
805
|
+
- Pattern: `\b(sm|md|lg|xl|2xl):[a-zA-Z0-9-]+`
|
|
806
|
+
- Count occurrences per file; identify top 10 files by responsive class count
|
|
807
|
+
- Track which prefixes are used (sm/md/lg/xl/2xl) and their relative frequency
|
|
808
|
+
- Infer strategy: if sm: > 40% of total responsive classes → `mobile-first`; if xl:/2xl: > 40% → `desktop-first`; else → `mixed`
|
|
792
809
|
|
|
793
810
|
2. CSS custom properties in `*.css` / `globals.css` / `variables.css` / `_variables.scss`
|
|
794
811
|
- `--color-*`, `--primary-*`, `--bg-*`, `--text-*` → TOKEN_MAP.colors
|
|
@@ -804,7 +821,38 @@ Rule: `secondary_languages[]` = languages with ≥5 files that are not `primary_
|
|
|
804
821
|
- ASSUMED prefix for any token not found in any source.
|
|
805
822
|
- Track `source_files[]` — list of all files scanned.
|
|
806
823
|
|
|
807
|
-
**Scan Report field:**
|
|
824
|
+
**Scan Report field:**
|
|
825
|
+
```yaml
|
|
826
|
+
ui_tokens:
|
|
827
|
+
detected: N
|
|
828
|
+
assumed: M
|
|
829
|
+
source_files: []
|
|
830
|
+
# ENH-085 — responsive additions (present only when tailwind detected):
|
|
831
|
+
breakpoints: { sm: 640, md: 768, lg: 1024, xl: 1280 } # custom or Tailwind defaults
|
|
832
|
+
breakpoints_source: custom | tailwind-defaults
|
|
833
|
+
responsive_utilities:
|
|
834
|
+
prefixes_used: [sm, md, lg, xl]
|
|
835
|
+
strategy_inference: mobile-first | desktop-first | mixed | unknown
|
|
836
|
+
top_responsive_files:
|
|
837
|
+
- { file: "src/components/Nav.tsx", prefixes: [sm, md, lg], count: 34 }
|
|
838
|
+
- { file: "src/layouts/Dashboard.tsx", prefixes: [md, lg], count: 21 }
|
|
839
|
+
# (top 10 files by responsive class count; omitted if no responsive classes found)
|
|
840
|
+
```
|
|
841
|
+
|
|
842
|
+
**RESPONSIVE SUMMARY block** (appended to Sub-scan A output when breakpoints detected):
|
|
843
|
+
```
|
|
844
|
+
📱 RESPONSIVE SUMMARY
|
|
845
|
+
──────────────────────────────────────────────────
|
|
846
|
+
Breakpoints: sm(640) md(768) lg(1024) xl(1280) [source: tailwind-defaults]
|
|
847
|
+
Strategy inference: mobile-first (sm: dominant — 52% of responsive classes)
|
|
848
|
+
Top responsive files:
|
|
849
|
+
src/components/Nav.tsx — 34 responsive classes [sm, md, lg]
|
|
850
|
+
src/layouts/Dashboard.tsx — 21 responsive classes [md, lg]
|
|
851
|
+
src/components/DataTable.tsx — 15 responsive classes [sm, md]
|
|
852
|
+
```
|
|
853
|
+
|
|
854
|
+
> If no `tailwind.config.js` found → skip breakpoint extraction and responsive utility detection silently.
|
|
855
|
+
> If no responsive classes found in source → emit `strategy_inference: unknown`, omit top_responsive_files.
|
|
808
856
|
|
|
809
857
|
---
|
|
810
858
|
|
|
@@ -1486,10 +1534,12 @@ ls -la .viepilot/ui-direction/ 2>/dev/null
|
|
|
1486
1534
|
|
|
1487
1535
|
When available, for the selected/latest session:
|
|
1488
1536
|
- Read `.viepilot/ui-direction/{session-id}/notes.md` first (source of design decisions)
|
|
1537
|
+
- Also check for: `## Component Responsive Map`, `responsive_strategy`, `target_devices` (ENH-085 — consumed in Step 1A-iv)
|
|
1489
1538
|
- If `pages/` exists and contains `*.html`:
|
|
1490
1539
|
- Require section **`## Pages inventory`** in `notes.md`; treat it as the **site map** (page count, purpose, navigation).
|
|
1491
1540
|
- List all `pages/*.html` and confirm each file is represented in the inventory table (if mismatch → stop and ask user to fix brainstorm artifacts or document assumptions).
|
|
1492
1541
|
- Read **each** `pages/{slug}.html` for section structure, components, and interaction hints.
|
|
1542
|
+
- Also check each page for `<div class="responsive-breakdown">` sections (ENH-085 — consumed in Step 1A-iv)
|
|
1493
1543
|
- Read hub `index.html` for cross-page navigation intent.
|
|
1494
1544
|
- Else (legacy single-file layout):
|
|
1495
1545
|
- Read `index.html` + `style.css` only (no `pages/`).
|
|
@@ -1561,6 +1611,74 @@ For each idea entry:
|
|
|
1561
1611
|
|
|
1562
1612
|
Record all resolutions in working notes before Step 7 runs.
|
|
1563
1613
|
|
|
1614
|
+
---
|
|
1615
|
+
|
|
1616
|
+
### Step 1A-iv: Consume Responsive / Breakpoint Metadata (ENH-085)
|
|
1617
|
+
|
|
1618
|
+
**Run after Step 1A-i and Step 1A-iii.**
|
|
1619
|
+
|
|
1620
|
+
**Source 1 — notes.md Component Responsive Map:**
|
|
1621
|
+
If `notes.md` contains `## Component Responsive Map`:
|
|
1622
|
+
- Extract `responsive_strategy` from the metadata comment (first line after the heading)
|
|
1623
|
+
- Extract `target_devices` from the metadata comment
|
|
1624
|
+
- Extract the component table rows (Nav / Grid / Table / Modal / Forms / Buttons / Images)
|
|
1625
|
+
- Store as `crystallize_context.responsive_components`
|
|
1626
|
+
|
|
1627
|
+
**Source 2 — notes.md or session context responsive_strategy:**
|
|
1628
|
+
If `responsive_strategy` is set anywhere in `notes.md` (metadata comment, YAML front-matter, or `## design_tokens`):
|
|
1629
|
+
- Store `crystallize_context.responsive.strategy`
|
|
1630
|
+
|
|
1631
|
+
**Source 3 — pages/*.html responsive-breakdown sections:**
|
|
1632
|
+
For each `pages/{slug}.html` that contains `<div class="responsive-breakdown">`:
|
|
1633
|
+
- Extract Mobile layout description and nav
|
|
1634
|
+
- Extract Tablet layout description and nav (if present)
|
|
1635
|
+
- Extract Desktop layout description and nav (if present)
|
|
1636
|
+
- Store per-page: `responsive_pages[slug] = { mobile: {...}, tablet: {...}, desktop: {...} }`
|
|
1637
|
+
|
|
1638
|
+
**Source 4 — Sub-scan A ui_tokens.responsive_utilities (brownfield only):**
|
|
1639
|
+
If `ui_tokens.responsive_utilities` is present in the HANDOFF/scan data:
|
|
1640
|
+
- Copy `breakpoints`, `strategy_inference`, `top_responsive_files` into `crystallize_context.responsive`
|
|
1641
|
+
|
|
1642
|
+
**Output — Responsive Implementation Notes in ARCHITECTURE.md:**
|
|
1643
|
+
|
|
1644
|
+
When ANY of Sources 1–4 yields data, append to `.viepilot/ARCHITECTURE.md`:
|
|
1645
|
+
|
|
1646
|
+
```markdown
|
|
1647
|
+
## Responsive Implementation Notes
|
|
1648
|
+
|
|
1649
|
+
> Generated by crystallize ENH-085 from UI Direction artifacts + Sub-scan A data.
|
|
1650
|
+
|
|
1651
|
+
**Strategy**: {responsive_strategy} (base styles {mobile-first: no prefix / desktop-first: full width} → {sm:/md:/lg:} scale {up/down})
|
|
1652
|
+
**Breakpoints**: {breakpoints list, e.g. "sm(640px) md(768px) lg(1024px) xl(1280px)"}
|
|
1653
|
+
|
|
1654
|
+
### Per-Page Responsive Targets
|
|
1655
|
+
| Page | Mobile Layout | Tablet Layout | Desktop Layout | Nav Pattern |
|
|
1656
|
+
|------|---------------|---------------|----------------|-------------|
|
|
1657
|
+
| {slug} | {mobile.layout} | {tablet.layout} | {desktop.layout} | {mobile.nav} → {tablet.nav} → {desktop.nav} |
|
|
1658
|
+
| ... | | | | |
|
|
1659
|
+
|
|
1660
|
+
### Component Responsive Map
|
|
1661
|
+
(Copied from UI Direction notes.md — source of truth)
|
|
1662
|
+
|
|
1663
|
+
| Component | Mobile (≤767px) | Tablet (768–1023px) | Desktop (≥1024px) |
|
|
1664
|
+
|----------------|---------------------|---------------------|--------------------|
|
|
1665
|
+
| Navigation | {from notes.md} | ... | ... |
|
|
1666
|
+
| ... | ... | ... | ... |
|
|
1667
|
+
|
|
1668
|
+
### High-Priority Responsive Components (brownfield only)
|
|
1669
|
+
| File | Breakpoints Used | Responsive Class Count |
|
|
1670
|
+
|------|-----------------|------------------------|
|
|
1671
|
+
| {from top_responsive_files} | | |
|
|
1672
|
+
|
|
1673
|
+
> **Implementation guidance**: Use `{responsive_strategy}` approach. Start with base styles,
|
|
1674
|
+
> apply `md:` for tablet overrides, `lg:` for desktop. See Component Responsive Map for
|
|
1675
|
+
> per-component variant expectations.
|
|
1676
|
+
```
|
|
1677
|
+
|
|
1678
|
+
**Skip condition:** If none of Sources 1–4 yields any responsive data → omit `## Responsive Implementation Notes` entirely (backward-compat, non-mobile projects).
|
|
1679
|
+
|
|
1680
|
+
---
|
|
1681
|
+
|
|
1564
1682
|
</step>
|
|
1565
1683
|
|
|
1566
1684
|
<step name="research_stack_official">
|
package/workflows/design.md
CHANGED
|
@@ -4,6 +4,28 @@ community import), syncing tokens to stylesheets (Tailwind/CSS/SCSS), auditing c
|
|
|
4
4
|
and importing brand templates from the awesome-design-md catalog.
|
|
5
5
|
</purpose>
|
|
6
6
|
|
|
7
|
+
<adapter_context>
|
|
8
|
+
## ADAPTER_CONTEXT (FEAT-021)
|
|
9
|
+
|
|
10
|
+
At skill start, read ADAPTER_CONTEXT to determine shell tool for --sync file operations:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
ADAPTER_CONTEXT_JSON=$(node "$HOME/.claude/viepilot/bin/vp-tools.cjs" detect-adapter --json 2>/dev/null \
|
|
14
|
+
|| echo '{"adapter":"claude-code","tools":{"shell":"Bash"}}')
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Shell tool by adapter:
|
|
18
|
+
| Adapter | Shell tool | Notes |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| claude-code | `Bash` | Full file I/O |
|
|
21
|
+
| cursor-agent | `run_terminal_cmd` | Full file I/O |
|
|
22
|
+
| antigravity | `shell` | Via MCP plugins |
|
|
23
|
+
| codex | `container.exec` | Sandboxed |
|
|
24
|
+
| copilot | `runCommands` | Limited |
|
|
25
|
+
|
|
26
|
+
Silent on error — fall back to `Bash` (claude-code default).
|
|
27
|
+
</adapter_context>
|
|
28
|
+
|
|
7
29
|
<process>
|
|
8
30
|
|
|
9
31
|
<step name="command_router">
|
|
@@ -207,6 +229,13 @@ rounded:
|
|
|
207
229
|
md: "{radius}px"
|
|
208
230
|
lg: "{radius * 2}px"
|
|
209
231
|
full: "9999px"
|
|
232
|
+
# ─── Responsive Breakpoints ────────────────────────────────
|
|
233
|
+
screens:
|
|
234
|
+
mobile: "0–767px"
|
|
235
|
+
tablet: "768–1023px"
|
|
236
|
+
desktop: "1024–1279px"
|
|
237
|
+
wide: "1280px+"
|
|
238
|
+
strategy: mobile-first
|
|
210
239
|
---
|
|
211
240
|
|
|
212
241
|
# Design System — {brand_name}
|
|
@@ -238,6 +267,21 @@ Base unit: {n}px. Scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 / 128
|
|
|
238
267
|
## Border Radius
|
|
239
268
|
sm={rounded.sm} · md={rounded.md} · lg={rounded.lg} · full={rounded.full}
|
|
240
269
|
|
|
270
|
+
## Responsive Breakpoints
|
|
271
|
+
**Strategy:** {strategy} | **Breakpoints:** mobile(0–767px) · tablet(768–1023px) · desktop(1024–1279px) · wide(1280px+)
|
|
272
|
+
|
|
273
|
+
## Responsive Components
|
|
274
|
+
|
|
275
|
+
| Component | Mobile (≤767px) | Tablet (768–1023px) | Desktop (≥1024px) |
|
|
276
|
+
|-------------|----------------------|----------------------|---------------------|
|
|
277
|
+
| Navigation | Hamburger drawer | Tab bar | Full horizontal |
|
|
278
|
+
| Layout grid | 1 column | 2 columns | 3+ columns |
|
|
279
|
+
| Modal | Bottom sheet | Centered dialog | Centered dialog |
|
|
280
|
+
| Data table | Card list | Scrollable table | Full table |
|
|
281
|
+
| Forms | Stacked single-col | 2-col grouped | 2-col grouped |
|
|
282
|
+
| Buttons CTA | Full-width | Auto / inline | Auto / inline |
|
|
283
|
+
| Images | 100% width, cropped | 50–75% width | Fixed aspect ratio |
|
|
284
|
+
|
|
241
285
|
## Components
|
|
242
286
|
> Extend this section per component as your design system grows.
|
|
243
287
|
|
|
@@ -359,7 +403,9 @@ TOKEN_MAP = {
|
|
|
359
403
|
colors: { primary, surface, surface_secondary, error, success, warning, text_primary, text_secondary },
|
|
360
404
|
typography: { font_sans, font_mono, scale_ratio, heading_line_height, body_line_height },
|
|
361
405
|
spacing: { base, scale[] },
|
|
362
|
-
rounded: { sm, md, lg, full }
|
|
406
|
+
rounded: { sm, md, lg, full },
|
|
407
|
+
screens: { mobile, tablet, desktop, wide }, // optional — present only when screens: block exists
|
|
408
|
+
strategy: "mobile-first" | "desktop-first" // optional — defaults to mobile-first when absent
|
|
363
409
|
}
|
|
364
410
|
```
|
|
365
411
|
|
|
@@ -412,10 +458,21 @@ theme: {
|
|
|
412
458
|
lg: '{rounded.lg}',
|
|
413
459
|
full: '{rounded.full}',
|
|
414
460
|
},
|
|
461
|
+
// Responsive breakpoints — emitted only when screens: block exists in design.md
|
|
462
|
+
// Strategy: {strategy} (mobile-first = min-width; desktop-first = max-width)
|
|
463
|
+
screens: {
|
|
464
|
+
mobile: '0px', // base — mobile-first (no prefix needed)
|
|
465
|
+
tablet: '768px', // md: breakpoint
|
|
466
|
+
desktop: '1024px', // lg: breakpoint
|
|
467
|
+
wide: '1280px', // xl: breakpoint
|
|
468
|
+
},
|
|
415
469
|
},
|
|
416
470
|
},
|
|
417
471
|
```
|
|
418
472
|
|
|
473
|
+
> **Note:** `screens` block is skipped gracefully if `TOKEN_MAP.screens` is absent (backward-compat).
|
|
474
|
+
> Custom px values from `design.md` override the defaults above.
|
|
475
|
+
|
|
419
476
|
**CSS custom properties mode** — inject into `:root` block in target CSS file:
|
|
420
477
|
```css
|
|
421
478
|
:root {
|
|
@@ -434,6 +491,10 @@ theme: {
|
|
|
434
491
|
--rounded-md: {rounded.md};
|
|
435
492
|
--rounded-lg: {rounded.lg};
|
|
436
493
|
--rounded-full: {rounded.full};
|
|
494
|
+
/* Responsive breakpoints (emitted only when screens: block present in design.md) */
|
|
495
|
+
--screen-tablet: 768px;
|
|
496
|
+
--screen-desktop: 1024px;
|
|
497
|
+
--screen-wide: 1280px;
|
|
437
498
|
}
|
|
438
499
|
```
|
|
439
500
|
|
package/workflows/request.md
CHANGED
|
@@ -52,6 +52,57 @@ DEBT_COUNT=$(ls .viepilot/requests/DEBT-*.md 2>/dev/null | wc -l)
|
|
|
52
52
|
```
|
|
53
53
|
</step>
|
|
54
54
|
|
|
55
|
+
<step name="url_enrichment">
|
|
56
|
+
## 1B. URL Enrichment Pre-Step (ENH-093)
|
|
57
|
+
|
|
58
|
+
**Trigger**: `{{VP_ARGS}}` contains a URL matching a known issue tracker pattern.
|
|
59
|
+
|
|
60
|
+
Run URL detection before Step 2:
|
|
61
|
+
```js
|
|
62
|
+
const { detectIssueUrl } = require('lib/request/url-enricher.cjs');
|
|
63
|
+
const result = detectIssueUrl(VP_ARGS);
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**On match** (github / linear / jira / trello / notion):
|
|
67
|
+
|
|
68
|
+
**Claude Code adapter** — dispatch browser-intake-agent:
|
|
69
|
+
```js
|
|
70
|
+
Agent({ subagent_type: "browser-intake-agent",
|
|
71
|
+
description: "browser-intake-agent: extract request details from issue URL",
|
|
72
|
+
prompt: `op: read_url. url: ${result.url}. extract_mode: ticket. projectRoot: ${projectRoot}` })
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
On success, display pre-fill preview and ask user to confirm:
|
|
76
|
+
```
|
|
77
|
+
Context extracted from: {url}
|
|
78
|
+
|
|
79
|
+
Title: {title}
|
|
80
|
+
Type: {type} (detected from labels)
|
|
81
|
+
Description: {description preview}
|
|
82
|
+
Priority: {priority}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**AUQ prompt** (Claude Code terminal):
|
|
86
|
+
```
|
|
87
|
+
question: "Review extracted details — confirm or edit?"
|
|
88
|
+
options:
|
|
89
|
+
- label: "Confirm — use these details"
|
|
90
|
+
description: "Skip redundant questions, proceed to acceptance criteria"
|
|
91
|
+
- label: "Edit — adjust before proceeding"
|
|
92
|
+
description: "Return to Step 2 with pre-filled values"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
On "Confirm": skip Step 2 gather questions, jump directly to Step 3 (create request file) using extracted values.
|
|
96
|
+
On "Edit": proceed to Step 2 with extracted values pre-loaded as defaults.
|
|
97
|
+
|
|
98
|
+
**On no match / extraction failure / agent-browser not available**:
|
|
99
|
+
- Skip enrichment silently
|
|
100
|
+
- Proceed normally from Step 2
|
|
101
|
+
- URL stored as `related_url` in request file if present
|
|
102
|
+
|
|
103
|
+
**Non-CC adapters**: skip Agent dispatch entirely, proceed from Step 2. URL stored as `related_url`.
|
|
104
|
+
</step>
|
|
105
|
+
|
|
55
106
|
<step name="detect_type">
|
|
56
107
|
## 2. Detect Request Type
|
|
57
108
|
|
|
@@ -104,14 +155,9 @@ If triggered:
|
|
|
104
155
|
**Claude Code (terminal) — invoke research-agent:**
|
|
105
156
|
```
|
|
106
157
|
Agent({
|
|
107
|
-
subagent_type: "
|
|
108
|
-
description: "
|
|
109
|
-
prompt:
|
|
110
|
-
Load agents/research-agent.md for full spec.
|
|
111
|
-
Topic: {extracted from user description}
|
|
112
|
-
Questions: ["What SDK/API exists?", "What are integration points?", "What config dir/convention?", "Feasibility rating?"]
|
|
113
|
-
Return a ## Research Findings section + ## Sources.
|
|
114
|
-
`
|
|
158
|
+
subagent_type: "research-agent",
|
|
159
|
+
description: "Feasibility study: {topic}",
|
|
160
|
+
prompt: "topic: {extracted from user description}. questions: [\"What SDK/API exists?\", \"What are integration points?\", \"What config dir/convention?\", \"Feasibility rating?\"]"
|
|
115
161
|
})
|
|
116
162
|
```
|
|
117
163
|
|