aped-method 1.6.0 → 1.7.0
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/package.json +1 -1
- package/src/templates/commands.js +1 -1
- package/src/templates/skills.js +171 -104
package/package.json
CHANGED
|
@@ -55,7 +55,7 @@ Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-r/SKILL.md
|
|
|
55
55
|
path: `${c.commandsDir}/aped-ux.md`,
|
|
56
56
|
content: `---
|
|
57
57
|
name: aped-ux
|
|
58
|
-
description: 'Designs UX
|
|
58
|
+
description: 'Designs UX via the ANF framework (Assemble design system, Normalize with React preview, Fill all screens). Use when user says "design UX", "UX spec", "aped ux", or invokes /aped-ux. Runs between PRD and Epics phases.'
|
|
59
59
|
---
|
|
60
60
|
|
|
61
61
|
Read and follow the SKILL.md at $PROJECT_ROOT/${a}/aped-ux/SKILL.md
|
package/src/templates/skills.js
CHANGED
|
@@ -471,12 +471,25 @@ Update \`${o}/state.yaml\`. If more stories remain: invoke Skill tool with \`ski
|
|
|
471
471
|
path: `${a}/aped-ux/SKILL.md`,
|
|
472
472
|
content: `---
|
|
473
473
|
name: aped-ux
|
|
474
|
-
description: 'Designs UX
|
|
474
|
+
description: 'Designs UX via the ANF framework (Assemble design system, Normalize with React preview, Fill all screens). Use when user says "design UX", "UX spec", "aped ux", or invokes /aped-ux. Runs between PRD and Epics phases.'
|
|
475
475
|
---
|
|
476
476
|
|
|
477
|
-
# APED UX —
|
|
477
|
+
# APED UX — ANF Framework
|
|
478
478
|
|
|
479
|
-
|
|
479
|
+
Produces a validated, interactive React prototype from the PRD. The prototype becomes the UX spec that \`/aped-e\` consumes as the visual source of truth.
|
|
480
|
+
|
|
481
|
+
**ANF = Assemble → Normalize → Fill**
|
|
482
|
+
|
|
483
|
+
\`\`\`
|
|
484
|
+
A: Design DNA N: React Preview F: Complete + Validate
|
|
485
|
+
(inputs) (live prototype) (user-approved spec)
|
|
486
|
+
|
|
487
|
+
Inspirations Vite + React app All screens built
|
|
488
|
+
+ UI library with REAL content + interaction states
|
|
489
|
+
+ color/typo from PRD context + responsive behavior
|
|
490
|
+
+ components (no lorem ipsum) + user review cycles
|
|
491
|
+
= UX spec for /aped-e
|
|
492
|
+
\`\`\`
|
|
480
493
|
|
|
481
494
|
## Setup
|
|
482
495
|
|
|
@@ -489,139 +502,185 @@ Generates UX specifications from the PRD before epics creation. Produces screen
|
|
|
489
502
|
## Task Tracking
|
|
490
503
|
|
|
491
504
|
\`\`\`
|
|
492
|
-
TaskCreate: "
|
|
493
|
-
TaskCreate: "
|
|
494
|
-
TaskCreate: "
|
|
495
|
-
TaskCreate: "
|
|
496
|
-
TaskCreate: "
|
|
497
|
-
TaskCreate: "
|
|
498
|
-
TaskCreate: "
|
|
505
|
+
TaskCreate: "A — Assemble: collect design DNA"
|
|
506
|
+
TaskCreate: "A — Assemble: scaffold Vite + React preview app"
|
|
507
|
+
TaskCreate: "N — Normalize: build layout + navigation + design tokens"
|
|
508
|
+
TaskCreate: "N — Normalize: implement screens with real PRD content"
|
|
509
|
+
TaskCreate: "F — Fill: complete all states (loading, error, empty)"
|
|
510
|
+
TaskCreate: "F — Fill: responsive + accessibility pass"
|
|
511
|
+
TaskCreate: "F — Fill: user review + validation"
|
|
499
512
|
\`\`\`
|
|
500
513
|
|
|
501
|
-
|
|
514
|
+
---
|
|
515
|
+
|
|
516
|
+
## A — ASSEMBLE (Design DNA)
|
|
502
517
|
|
|
503
|
-
|
|
504
|
-
- Extract: user journeys, FRs grouped by capability, actors, key workflows
|
|
518
|
+
### A1: Collect Design Inputs
|
|
505
519
|
|
|
506
|
-
|
|
520
|
+
Ask the user (adapt to \`communication_language\`):
|
|
507
521
|
|
|
508
|
-
|
|
522
|
+
1. **Inspirations** — "Share screenshots, URLs, or describe the visual direction you want"
|
|
523
|
+
- Accept: image files (Read tool), URLs (WebFetch), or verbal description
|
|
524
|
+
- If images: analyze layout, density, color palette, typography, component style
|
|
525
|
+
- If URLs: fetch and analyze visual patterns
|
|
509
526
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
527
|
+
2. **UI Library** — "Which component library? Or none (custom)?"
|
|
528
|
+
- Options: shadcn/ui, Radix UI, MUI, Ant Design, Chakra UI, Mantine, none
|
|
529
|
+
- If specified: use MCP context7 (\`resolve-library-id\` then \`query-docs\`) to load component API
|
|
530
|
+
- If none: will create custom components styled to match inspirations
|
|
514
531
|
|
|
515
|
-
|
|
532
|
+
3. **Design Tokens** — Extract or ask:
|
|
533
|
+
- **Colors**: primary, secondary, accent, neutral scale, semantic (success/warning/error/info)
|
|
534
|
+
- **Typography**: font family, size scale (xs to 2xl), weight scale, line heights
|
|
535
|
+
- **Spacing**: base unit (4px/8px), scale (1-12)
|
|
536
|
+
- **Radius**: none/sm/md/lg/full
|
|
537
|
+
- **Shadows**: sm/md/lg/xl
|
|
516
538
|
|
|
517
|
-
|
|
539
|
+
4. **Branding** — Logo, brand colors, tone (playful/serious/minimal/bold)
|
|
518
540
|
|
|
519
|
-
|
|
541
|
+
### A2: Scaffold Preview App
|
|
520
542
|
|
|
521
|
-
|
|
543
|
+
\`\`\`bash
|
|
544
|
+
mkdir -p ${o}/ux-preview
|
|
545
|
+
cd ${o}/ux-preview
|
|
546
|
+
npm create vite@latest . -- --template react-ts
|
|
547
|
+
npm install
|
|
522
548
|
\`\`\`
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
549
|
+
|
|
550
|
+
If UI library chosen:
|
|
551
|
+
\`\`\`bash
|
|
552
|
+
# Example for shadcn/ui:
|
|
553
|
+
npx shadcn@latest init
|
|
554
|
+
# Example for MUI:
|
|
555
|
+
npm install @mui/material @emotion/react @emotion/styled
|
|
528
556
|
\`\`\`
|
|
529
557
|
|
|
530
|
-
|
|
531
|
-
|
|
558
|
+
Create design token files:
|
|
559
|
+
- \`src/tokens/colors.ts\` — color palette as CSS custom properties or theme object
|
|
560
|
+
- \`src/tokens/typography.ts\` — font config
|
|
561
|
+
- \`src/tokens/spacing.ts\` — spacing scale
|
|
562
|
+
- \`src/theme.ts\` — unified theme export
|
|
532
563
|
|
|
533
|
-
|
|
564
|
+
Create \`src/data/mock.ts\` — **real content from PRD**, not lorem ipsum:
|
|
565
|
+
- Extract product name, user types, feature names, sample data from PRD
|
|
566
|
+
- Generate realistic mock data that matches the product domain
|
|
567
|
+
- Example: if building a project manager, mock projects have real-sounding names and dates
|
|
534
568
|
|
|
535
|
-
|
|
569
|
+
\`TaskUpdate: "A — Assemble: scaffold" → completed\`
|
|
536
570
|
|
|
537
|
-
|
|
538
|
-
┌─────────────────────────────────┐
|
|
539
|
-
│ [Logo] [Nav] [Avatar] │
|
|
540
|
-
├─────────────────────────────────┤
|
|
541
|
-
│ │
|
|
542
|
-
│ ┌──────────┐ ┌──────────────┐ │
|
|
543
|
-
│ │ Sidebar │ │ Content │ │
|
|
544
|
-
│ │ │ │ │ │
|
|
545
|
-
│ │ • Item 1 │ │ ┌────────┐ │ │
|
|
546
|
-
│ │ • Item 2 │ │ │ Card 1 │ │ │
|
|
547
|
-
│ │ • Item 3 │ │ └────────┘ │ │
|
|
548
|
-
│ │ │ │ ┌────────┐ │ │
|
|
549
|
-
│ │ │ │ │ Card 2 │ │ │
|
|
550
|
-
│ └──────────┘ │ └────────┘ │ │
|
|
551
|
-
│ └──────────────┘ │
|
|
552
|
-
├─────────────────────────────────┤
|
|
553
|
-
│ [Footer] │
|
|
554
|
-
└─────────────────────────────────┘
|
|
555
|
-
\`\`\`
|
|
571
|
+
---
|
|
556
572
|
|
|
557
|
-
|
|
558
|
-
- Use box drawing characters (┌ ─ ┐ │ └ ┘ ├ ┤)
|
|
559
|
-
- Label every zone with its purpose
|
|
560
|
-
- Show content hierarchy (headings, lists, cards, forms)
|
|
561
|
-
- Annotate interactive elements: \`[Button]\`, \`(Input)\`, \`{Dropdown}\`
|
|
562
|
-
- Include responsive notes: "sidebar collapses to hamburger on mobile"
|
|
573
|
+
## N — NORMALIZE (React Preview with Real Content)
|
|
563
574
|
|
|
564
|
-
|
|
575
|
+
### N1: Layout + Navigation
|
|
565
576
|
|
|
566
|
-
|
|
577
|
+
Read PRD user journeys and screen inventory (from \`${a}/aped-ux/references/ux-patterns.md\`).
|
|
567
578
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
│ ├── Header (logo, nav, avatar)
|
|
573
|
-
│ ├── Sidebar (nav items, collapsible)
|
|
574
|
-
│ └── Footer
|
|
575
|
-
├── Shared
|
|
576
|
-
│ ├── Button (primary, secondary, ghost, danger)
|
|
577
|
-
│ ├── Input (text, email, password, search)
|
|
578
|
-
│ ├── Card (title, body, actions)
|
|
579
|
-
│ ├── Modal (header, body, footer)
|
|
580
|
-
│ └── Toast (success, error, warning, info)
|
|
581
|
-
└── Feature-specific
|
|
582
|
-
├── UserAvatar (image, initials fallback)
|
|
583
|
-
├── DataTable (sortable, filterable, paginated)
|
|
584
|
-
└── StatsCard (value, label, trend)
|
|
585
|
-
\`\`\`
|
|
579
|
+
1. **Map screens** from PRD user journeys:
|
|
580
|
+
- Each journey → concrete screens
|
|
581
|
+
- Name: \`{area}-{action}\` slug (e.g., \`auth-login\`, \`dashboard-overview\`)
|
|
582
|
+
- Classify: form, list, detail, dashboard, wizard, modal
|
|
586
583
|
|
|
587
|
-
|
|
588
|
-
-
|
|
589
|
-
-
|
|
590
|
-
-
|
|
591
|
-
- **Accessibility**: ARIA role, keyboard navigation, focus management
|
|
584
|
+
2. **Build layout shell** — \`src/layouts/\`:
|
|
585
|
+
- App layout (header, sidebar/nav, content, footer)
|
|
586
|
+
- Auth layout (centered card)
|
|
587
|
+
- Apply design tokens throughout
|
|
592
588
|
|
|
593
|
-
|
|
589
|
+
3. **Set up routing** — React Router with all screens as routes:
|
|
590
|
+
- \`src/App.tsx\` — router config
|
|
591
|
+
- \`src/pages/{ScreenSlug}.tsx\` — one page per screen (initially placeholder)
|
|
594
592
|
|
|
595
|
-
|
|
593
|
+
4. **Navigation** — working nav that links all screens:
|
|
594
|
+
- Sidebar or top nav matching design inspiration
|
|
595
|
+
- Active state indicators
|
|
596
|
+
- Mobile responsive (hamburger/drawer)
|
|
596
597
|
|
|
597
|
-
|
|
598
|
-
2. **Empty states**: first-use, no-results, error
|
|
599
|
-
3. **Error handling**: inline validation, toast, error page
|
|
600
|
-
4. **Animations**: page transitions, micro-interactions (optional)
|
|
601
|
-
5. **Responsive behavior**: breakpoints, layout changes, touch targets
|
|
598
|
+
Run: \`npm run dev\` — verify app runs with working navigation.
|
|
602
599
|
|
|
603
|
-
|
|
600
|
+
### N2: Screen Implementation
|
|
601
|
+
|
|
602
|
+
For each screen, in priority order (core journey first):
|
|
603
|
+
|
|
604
|
+
1. **Read relevant FRs** for this screen
|
|
605
|
+
2. **Build with UI library components** (or custom styled components)
|
|
606
|
+
3. **Use real mock data** from \`src/data/mock.ts\` — product names, user names, realistic dates and numbers
|
|
607
|
+
4. **Implement the primary content** — forms, tables, cards, etc.
|
|
608
|
+
5. **Wire interactions** — form submits, button clicks, navigation (can be no-op handlers)
|
|
604
609
|
|
|
605
|
-
|
|
606
|
-
-
|
|
607
|
-
-
|
|
608
|
-
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
610
|
+
**CRITICAL: No lorem ipsum.** Every text element must reflect the actual product:
|
|
611
|
+
- If it's a SaaS dashboard, show realistic metric names and values
|
|
612
|
+
- If it's an e-commerce, show real-looking product names and prices
|
|
613
|
+
- If it's a project tool, show plausible project names and statuses
|
|
614
|
+
|
|
615
|
+
\`TaskUpdate: "N — Normalize: implement screens" → completed\`
|
|
616
|
+
|
|
617
|
+
---
|
|
618
|
+
|
|
619
|
+
## F — FILL (Complete + Validate)
|
|
620
|
+
|
|
621
|
+
### F1: Interaction States
|
|
622
|
+
|
|
623
|
+
For each screen, add:
|
|
624
|
+
|
|
625
|
+
1. **Loading states** — skeleton components or spinners where data loads
|
|
626
|
+
2. **Empty states** — first-use experience, "no results" views with CTAs
|
|
627
|
+
3. **Error states** — inline form validation, error boundaries, toast/snackbar
|
|
628
|
+
4. **Success feedback** — confirmation messages, success toasts
|
|
629
|
+
|
|
630
|
+
### F2: Responsive + Accessibility
|
|
631
|
+
|
|
632
|
+
1. **Responsive** — test and fix at 3 breakpoints:
|
|
633
|
+
- Mobile (375px): single column, hamburger nav, touch targets ≥44px
|
|
634
|
+
- Tablet (768px): adapted layout, sidebar may collapse
|
|
635
|
+
- Desktop (1440px): full layout
|
|
636
|
+
|
|
637
|
+
2. **Accessibility** — verify:
|
|
638
|
+
- All images have alt text
|
|
639
|
+
- Form inputs have labels
|
|
640
|
+
- Color contrast ≥ 4.5:1
|
|
641
|
+
- Keyboard navigation works (Tab, Enter, Escape)
|
|
642
|
+
- Focus indicators visible
|
|
643
|
+
|
|
644
|
+
### F3: User Review Cycle
|
|
645
|
+
|
|
646
|
+
**This is the most important step.** The prototype must be validated by the user.
|
|
647
|
+
|
|
648
|
+
1. Run \`npm run dev\` and give the user the local URL
|
|
649
|
+
2. Ask: "Review each screen. What needs to change?"
|
|
650
|
+
3. Categories of feedback:
|
|
651
|
+
- **Layout** — move, resize, reorder sections
|
|
652
|
+
- **Content** — missing info, wrong hierarchy, unclear labels
|
|
653
|
+
- **Style** — colors, spacing, typography adjustments
|
|
654
|
+
- **Flow** — navigation changes, missing screens, wrong order
|
|
655
|
+
- **Components** — wrong component type, missing states, wrong behavior
|
|
656
|
+
|
|
657
|
+
4. **Iterate** until user says "approved" or "good enough"
|
|
658
|
+
5. Each iteration: apply feedback → run dev → ask again
|
|
659
|
+
|
|
660
|
+
\`TaskUpdate: "F — Fill: user review" → completed\`
|
|
661
|
+
|
|
662
|
+
---
|
|
612
663
|
|
|
613
664
|
## Output
|
|
614
665
|
|
|
666
|
+
Once user approves the prototype:
|
|
667
|
+
|
|
615
668
|
\`\`\`bash
|
|
616
669
|
mkdir -p ${o}/ux
|
|
617
670
|
\`\`\`
|
|
618
671
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
672
|
+
1. **Preview app stays** at \`${o}/ux-preview/\` — living reference
|
|
673
|
+
2. Write \`${o}/ux/design-spec.md\`:
|
|
674
|
+
- Design tokens (colors, typo, spacing, radius)
|
|
675
|
+
- UI library + version
|
|
676
|
+
- Screen inventory with routes
|
|
677
|
+
- Component tree with props
|
|
678
|
+
- Layout specifications
|
|
679
|
+
- Responsive breakpoints
|
|
680
|
+
3. Write \`${o}/ux/screen-inventory.md\` — all screens with FR mapping
|
|
681
|
+
4. Write \`${o}/ux/components.md\` — component catalog from the preview app
|
|
682
|
+
5. Write \`${o}/ux/flows.md\` — navigation flow diagrams
|
|
683
|
+
6. Take **screenshots** of each screen at desktop resolution → \`${o}/ux/screenshots/\`
|
|
625
684
|
|
|
626
685
|
## State Update
|
|
627
686
|
|
|
@@ -633,12 +692,20 @@ pipeline:
|
|
|
633
692
|
ux:
|
|
634
693
|
status: "done"
|
|
635
694
|
output: "${o}/ux/"
|
|
695
|
+
preview: "${o}/ux-preview/"
|
|
696
|
+
design_system:
|
|
697
|
+
ui_library: "{library}"
|
|
698
|
+
tokens: "${o}/ux-preview/src/tokens/"
|
|
636
699
|
\`\`\`
|
|
637
700
|
|
|
638
701
|
## Chain
|
|
639
702
|
|
|
640
703
|
Invoke Skill tool with \`skill: "aped-e"\` to proceed to Epics phase.
|
|
641
|
-
\`/aped-e\`
|
|
704
|
+
\`/aped-e\` reads \`${o}/ux/design-spec.md\` and the preview app to enrich stories with:
|
|
705
|
+
- Component references (which component to use, which props)
|
|
706
|
+
- Screen references (wireframe screenshots)
|
|
707
|
+
- Design tokens to respect
|
|
708
|
+
- Responsive requirements per screen
|
|
642
709
|
`,
|
|
643
710
|
},
|
|
644
711
|
// ── aped-s ──────────────────────────────────────────────
|