@valentia-ai-skills/framework 1.0.13 → 1.0.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@valentia-ai-skills/framework",
3
- "version": "1.0.13",
4
- "description": "AI development skills framework — centralized coding standards, security patterns, and SOPs for AI-assisted development. Works with Claude Code, Cursor, Copilot, Windsurf, and any AI coding tool.",
3
+ "version": "1.0.14",
4
+ "description": "AI development skills framework — centralized coding standards, security patterns, and SOPs for AI-assisted development. Works with Claude Code, Cursor, Copilot, Windsurf, and any AI coding tool.",
5
5
  "keywords": [
6
6
  "ai-skills",
7
7
  "claude-code",
@@ -3,7 +3,7 @@ name: aisupportapp/project-architecture
3
3
  description: Auto-generated project-architecture for aisupportapp. Created by project-scanner.
4
4
  version: 1.0.0
5
5
  scope: project
6
- last_reviewed: 2026-03-19
6
+ last_reviewed: 2026-03-27
7
7
  ---
8
8
 
9
9
  ---
@@ -3,7 +3,7 @@ name: aisupportapp/project-conventions
3
3
  description: Auto-generated project-conventions for aisupportapp. Created by project-scanner.
4
4
  version: 1.0.0
5
5
  scope: project
6
- last_reviewed: 2026-03-19
6
+ last_reviewed: 2026-03-27
7
7
  ---
8
8
 
9
9
  ---
@@ -3,7 +3,7 @@ name: aisupportapp/project-workflows
3
3
  description: Auto-generated project-workflows for aisupportapp. Created by project-scanner.
4
4
  version: 1.0.0
5
5
  scope: project
6
- last_reviewed: 2026-03-19
6
+ last_reviewed: 2026-03-27
7
7
  ---
8
8
 
9
9
  ---
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: aisupportapp/test-installation
3
+ description: No description
4
+ version: 1.0.0
5
+ scope: project
6
+ last_reviewed: 2026-03-27
7
+ ---
8
+
9
+ # Skill Name
10
+
11
+ ## Overview
12
+
13
+ Describe what this skill covers and when it should be applied.
14
+
15
+ ## 1. First Rule
16
+
17
+ - Rule details here
18
+ - Use clear, actionable language
19
+
20
+ ```typescript
21
+ // ✅ Good
22
+ const example = 'good pattern'
23
+
24
+ // ❌ Bad
25
+ const example = 'bad pattern'
26
+ ```
27
+
28
+ ## Checklist
29
+
30
+ - [ ] First check
31
+ - [ ] Second check
32
+ - [ ] Third check
@@ -3,7 +3,7 @@ name: api-design
3
3
  description: No description
4
4
  version: 1.0.0
5
5
  scope: global
6
- last_reviewed: 2026-03-19
6
+ last_reviewed: 2026-03-27
7
7
  ---
8
8
 
9
9
  ---
@@ -0,0 +1,169 @@
1
+ ---
2
+ name: appointment-oas-app
3
+ description: No description
4
+ version: 1.0.1
5
+ scope: global
6
+ last_reviewed: 2026-03-27
7
+ ---
8
+
9
+ ---
10
+ name: appointment-booking-app
11
+ description: >
12
+ Build a complete appointment booking web application in React JS (Vite + Tailwind + Redux Toolkit + React Query).
13
+ This skill handles TWO phases: (1) pixel-perfect UI replication from any design input — Figma exports, HTML/CSS mockups,
14
+ or screenshot images — auto-detecting whether the UI is a wizard/stepper, single-page form, tabbed layout, or other pattern;
15
+ and (2) full API integration with business rules across a 6-step booking flow including authentication, service/category
16
+ selection, clinic/location filtering, provider selection with first-available slots, calendar/slot picker, patient
17
+ registration with NZ address lookup (eSAM), and Stripe payment.
18
+
19
+ USE THIS SKILL whenever the user asks to: build an appointment booking app or flow, replicate a booking UI from a design,
20
+ wire up booking APIs, implement a multi-step scheduling wizard, create a date/time picker booking interface, or anything
21
+ involving appointment scheduling with API integration. Also trigger when the user shares a Figma link, HTML mockup,
22
+ or screenshot and says "build this" or "replicate this" and the context is a booking or scheduling flow.
23
+ Trigger even if they just say "booking app", "appointment page", "scheduling UI", or share a design with calendar/time elements.
24
+ ---
25
+
26
+ # Appointment Booking App Skill
27
+
28
+ This skill builds a production-grade appointment booking web application in two phases:
29
+ - **Phase 1 — UI Replication**: Pixel-perfect reproduction of a provided design
30
+ - **Phase 2 — API Integration**: 6-step API wiring with business rules
31
+
32
+ ## Tech Stack (Non-negotiable)
33
+
34
+ | Layer | Choice |
35
+ |-------------------|-------------------------------|
36
+ | Build tool | Vite + React |
37
+ | Styling | Tailwind CSS |
38
+ | State management | Redux Toolkit (global state) |
39
+ | Server state | React Query / TanStack Query |
40
+ | Routing | React Router v6 |
41
+ | HTTP client | Axios (with interceptors) |
42
+ | Payment | Stripe.js + @stripe/react-stripe-js |
43
+
44
+ ## Environment Variables (Vite standard)
45
+
46
+ ```env
47
+ VITE_S_PRACTICE_ID=<encrypted practice ID>
48
+ VITE_API_BASE_URL=https://bookinggateway.vitonta.com
49
+ VITE_STRIPE_PUBLISHABLE_KEY=<stripe publishable key>
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Phase 1 — UI Replication
55
+
56
+ Read `references/ui-replication.md` for the full design-to-code workflow including:
57
+ - Design input detection (Figma/HTML/screenshot)
58
+ - UI pattern auto-detection (wizard, split-panel, calendar-first, etc.)
59
+ - Design token extraction and Tailwind config mapping
60
+ - Component patterns (stepper, calendar grid, provider cards, booking summary)
61
+
62
+ ---
63
+
64
+ ## Phase 2 — API Integration (6-Step Booking Flow)
65
+
66
+ Read `references/api-contracts.md` for complete endpoint specs, payloads, and response shapes.
67
+ Read `references/business-rules.md` for filtering logic, validation rules, and state transitions.
68
+
69
+ ### Flow Overview
70
+
71
+ ```
72
+ Step 0: POST /PublicAccessToken → JWT token (Bearer auth for all calls)
73
+
74
+ Step 1: GET /GetServiceCategory?practiceID={id} → User picks a category
75
+
76
+ Step 2: GET /GetServiceMapping → Filter services by category keywords across `serviceName` and `indiciReasonForContactTitle`
77
+
78
+ Step 3: GET /GetPracticeLocation → Filter locations by serviceID
79
+
80
+ Step 4: GET /GetPracticeProvider + POST /GetFirstAvailableSlotforMultiProvider
81
+ → Filter providers by serviceID + locationID, show first available slots
82
+
83
+ Step 5: POST /GetDayRoaster + POST /SearchListOfSlot
84
+ → Calendar on left, time slots on right
85
+
86
+ Step 6: Patient Registration + Address Lookup + Booking + Payment
87
+ → Multiple sub-APIs (see api-contracts.md Step 6)
88
+ ```
89
+
90
+ ### Redux Slice Structure
91
+
92
+ ```javascript
93
+ // store/bookingSlice.js
94
+ const bookingSlice = createSlice({
95
+ name: 'booking',
96
+ initialState: {
97
+ currentStep: 0,
98
+ token: null,
99
+ selectedCategory: null, // Step 1
100
+ selectedService: null, // Step 2
101
+ selectedLocation: null, // Step 3
102
+ selectedProvider: null, // Step 4
103
+ firstAvailableSlots: [], // Step 4
104
+ dayRoster: [], // Step 5
105
+ selectedDate: null, // Step 5
106
+ selectedSlots: [], // Step 5 (array — may need 2+ for longer durations)
107
+ appointmentID: null, // Step 6 (from AddAppointment)
108
+ invoiceID: null, // Step 6
109
+ patient: null, // Step 6
110
+ paymentIntent: null, // Step 6
111
+ },
112
+ reducers: { /* one setter per field + resetBooking */ },
113
+ });
114
+ ```
115
+
116
+ ### React Query Hook Pattern
117
+
118
+ ```javascript
119
+ // Every API step gets a dedicated hook
120
+ export const useServiceCategories = (practiceID) => useQuery({
121
+ queryKey: ['serviceCategories', practiceID],
122
+ queryFn: () => api.getServiceCategories(practiceID),
123
+ enabled: !!practiceID,
124
+ staleTime: 10 * 60 * 1000,
125
+ });
126
+
127
+ // Mutations for POST endpoints
128
+ export const useAddAppointment = () => useMutation({
129
+ mutationFn: (payload) => api.addAppointment(payload),
130
+ onSuccess: (data) => { dispatch(setAppointmentID(data.appointmentID)); },
131
+ });
132
+ ```
133
+
134
+ ### Slot Booking Duration Logic (CRITICAL)
135
+
136
+ When booking, the number of slots to reserve depends on the service's `timeDuration` vs the slot `interval`:
137
+ ```
138
+ slotsNeeded = Math.ceil(service.timeDuration / slot.interval)
139
+ ```
140
+ Example: If `timeDuration` is 40 mins and slots are 20 min intervals → book 2 consecutive slots.
141
+ The `SlotID` array in `AddAppointment` must contain that many consecutive slot IDs.
142
+
143
+ ### Error Handling
144
+
145
+ - Every API call must have loading, success, and error states in UI.
146
+ - Network failures → "Connection issue. Please try again."
147
+ - 4xx → map to business rule messages per step.
148
+ - 5xx → "Something went wrong on our end. Please try again later."
149
+ - Slot conflict (409) → refresh available slots and notify user.
150
+
151
+ ### Checklist Before Delivering
152
+
153
+ - [ ] All design tokens in `tailwind.config.js`
154
+ - [ ] UI pattern correctly identified and implemented
155
+ - [ ] All API steps wired with React Query hooks
156
+ - [ ] Redux slice holds cross-step booking state
157
+ - [ ] Service filtering uses meaningful category keywords against `serviceName` and `indiciReasonForContactTitle`
158
+ - [ ] Location filtering by serviceID
159
+ - [ ] Provider dual-filter: serviceID + locationID
160
+ - [ ] Slot duration logic: consecutive slot booking
161
+ - [ ] eSAM address autocomplete + detail fetch
162
+ - [ ] Stripe payment integration with clientSecret
163
+ - [ ] Loading spinners on every async operation
164
+ - [ ] Error states handled for every API call
165
+ - [ ] Client-side validation before each API call
166
+ - [ ] Step 6 Mantine form initializes from a cloned draft object, not frozen Redux state
167
+ - [ ] Step 6 does not use unconditional `form.setValues(...)` sync effects that can cause update-depth loops
168
+ - [ ] Back navigation preserves state (React Query cache)
169
+ - [ ] AddAppointment fires on Step 6 page mount (before patient registration)
@@ -3,7 +3,7 @@ name: code-standards
3
3
  description: No description
4
4
  version: 1.0.0
5
5
  scope: global
6
- last_reviewed: 2026-03-19
6
+ last_reviewed: 2026-03-27
7
7
  ---
8
8
 
9
9
  ---
@@ -11,7 +11,7 @@ description: Reverse-engineer any codebase into AI-ready skill files. Use this s
11
11
  auto-trigger.
12
12
  version: 1.0.0
13
13
  scope: global
14
- last_reviewed: 2026-03-19
14
+ last_reviewed: 2026-03-27
15
15
  ---
16
16
 
17
17
  # Project Scanner
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: viteapp/core-workflows
3
+ description: No description
4
+ version: 1.0.0
5
+ scope: project
6
+ last_reviewed: 2026-03-27
7
+ ---
8
+
9
+ # Skill Name
10
+
11
+ ## Overview
12
+
13
+ Describe what this skill covers and when it should be applied.
14
+
15
+ ## 1. First Rule
16
+
17
+ - Rule details here
18
+ - Use clear, actionable language
19
+
20
+ ```typescript
21
+ // ✅ Good
22
+ const example = 'good pattern'
23
+
24
+ // ❌ Bad
25
+ const example = 'bad pattern'
26
+ ```
27
+
28
+ ## Checklist
29
+
30
+ - [ ] First check
31
+ - [ ] Second check
32
+ - [ ] Third check