@njeybe/nativ 2.0.2 → 2.2.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/CHANGELOG.md +27 -1
- package/README.md +30 -1
- package/dist/commands/task.d.ts +6 -0
- package/dist/commands/task.js +20 -2
- package/dist/commands/validate.js +14 -0
- package/dist/core/code-shape.d.ts +26 -0
- package/dist/core/code-shape.js +126 -0
- package/dist/core/model-routing.d.ts +6 -0
- package/dist/core/model-routing.js +49 -0
- package/dist/core/spec-slices.d.ts +27 -0
- package/dist/core/spec-slices.js +194 -0
- package/dist/core/verifier.d.ts +8 -1
- package/dist/core/verifier.js +26 -2
- package/dist/index.js +3 -0
- package/dist/mcp/server.js +16 -4
- package/dist/runner/agent-supervisor.js +39 -20
- package/dist/scanner/types.d.ts +7 -0
- package/dist/scanner/types.js +8 -0
- package/package.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/agents/architect.md +38 -1
- package/plugin/agents/verifier.md +1 -0
- package/plugin/agents/worker.md +2 -1
- package/plugin/skills/nativ/SKILL.md +14 -0
- package/templates/AGENTS.md +81 -67
- package/templates/GEMINI.md +21 -6
- package/templates/claude-agents/architect.md +65 -28
- package/templates/claude-agents/verifier.md +29 -28
- package/templates/claude-agents/worker.md +27 -26
- package/templates/dot-ai/subagents/flutter-developer.md +84 -11
- package/templates/dot-ai/subagents/frontend.md +83 -126
- package/templates/dot-ai/ui_specs.md +214 -78
|
@@ -1,78 +1,214 @@
|
|
|
1
|
-
# UI/UX Specifications
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- **
|
|
56
|
-
- **
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
|
|
1
|
+
# UI/UX Specifications
|
|
2
|
+
|
|
3
|
+
Plain language, concise. The Architect fills this in; workers follow it. Tasks point at a component with a specRef such as `ui_specs.md#appointment-list`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Planning Level
|
|
8
|
+
Pick one level and design track and write them here:
|
|
9
|
+
- **Level:** Quick | Standard | Full
|
|
10
|
+
- **Track:** Experience-First (Outside-In) | Data-First (Inside-Out)
|
|
11
|
+
|
|
12
|
+
- **Quick:** small fix, fast-path task, no design phase.
|
|
13
|
+
- **Standard:** new screen in an existing design. Flow + wireframe or component tree + component map. Reuse existing tokens.
|
|
14
|
+
- **Full:** new app, new platform or redesign. Discovery questions, brief, flows, two directions with style tiles, wireframes or component trees, component map.
|
|
15
|
+
|
|
16
|
+
- **Experience-First (Outside-In):** UI flows and screen data needs drive API contracts and DB schema.
|
|
17
|
+
- **Data-First (Inside-Out):** Core database schema or pipeline models drive API contracts and UI views.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Design Brief
|
|
22
|
+
- **Who uses it:**
|
|
23
|
+
- **The job they are doing:**
|
|
24
|
+
- **Tone (three words):**
|
|
25
|
+
- **Things to avoid:**
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Users & Top Tasks
|
|
30
|
+
Top 3-5 user tasks and how often each happens.
|
|
31
|
+
|
|
32
|
+
| Task | Frequency |
|
|
33
|
+
| :--- | :--- |
|
|
34
|
+
| | |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Real Content Samples
|
|
39
|
+
Real sample data per screen, drawn from `db_schema.json` and `api_contracts.json`. Include extremes: long names, empty values, big numbers. Never "Item 1" or lorem ipsum.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## User Flows
|
|
44
|
+
Each key journey step by step, with tap/click counts.
|
|
45
|
+
|
|
46
|
+
1. Journey name (N taps)
|
|
47
|
+
1. Step
|
|
48
|
+
2. Step
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Design Directions
|
|
53
|
+
Exactly two directions.
|
|
54
|
+
|
|
55
|
+
- **Direction A:**
|
|
56
|
+
- **Direction B:**
|
|
57
|
+
- **Chosen and why:**
|
|
58
|
+
- **Full level only:** style tile at `.ai/design/style-tile.html`
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Design Tokens
|
|
63
|
+
Placeholders the Architect fills, each with a one-line rationale. Do not copy a default palette.
|
|
64
|
+
|
|
65
|
+
```css
|
|
66
|
+
:root {
|
|
67
|
+
/* Surface & canvas */
|
|
68
|
+
--bg-canvas: <value>; /* why */
|
|
69
|
+
--surface: <value>; /* why */
|
|
70
|
+
--surface-hover: <value>; /* why */
|
|
71
|
+
--border-subtle: <value>; /* why */
|
|
72
|
+
--border-hover: <value>; /* why */
|
|
73
|
+
|
|
74
|
+
/* Typography & contrast */
|
|
75
|
+
--text-primary: <value>; /* why */
|
|
76
|
+
--text-secondary: <value>; /* why */
|
|
77
|
+
--text-muted: <value>; /* why */
|
|
78
|
+
|
|
79
|
+
/* Brand & accents */
|
|
80
|
+
--brand: <value>; /* why */
|
|
81
|
+
--brand-hover: <value>; /* why */
|
|
82
|
+
--brand-surface: <value>; /* why */
|
|
83
|
+
|
|
84
|
+
/* Status */
|
|
85
|
+
--status-success: <value>; --status-success-bg: <value>;
|
|
86
|
+
--status-warning: <value>; --status-warning-bg: <value>;
|
|
87
|
+
--status-danger: <value>; --status-danger-bg: <value>;
|
|
88
|
+
--status-info: <value>; --status-info-bg: <value>;
|
|
89
|
+
|
|
90
|
+
/* Geometry & elevation */
|
|
91
|
+
--radius-sm: <value>; --radius-md: <value>; --radius-lg: <value>;
|
|
92
|
+
--shadow-sm: <value>; --shadow-md: <value>;
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Flutter mapping:** each token maps to a `ThemeData` field (`colorScheme`, `textTheme`) or a `ThemeExtension` (status colors, radii, shadows). List the mapping here.
|
|
97
|
+
|
|
98
|
+
| Token | Flutter target |
|
|
99
|
+
| :--- | :--- |
|
|
100
|
+
| `--brand` | `colorScheme.primary` |
|
|
101
|
+
| `--status-*` | `ThemeExtension` |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Platform Rules
|
|
106
|
+
- **Primary platform (designed first):**
|
|
107
|
+
- **Web:** sidebar or top bar, density, keyboard support, hover states, targets at least 32px, behavior on wide screens.
|
|
108
|
+
- **Mobile:** bottom nav and sheets, back gesture, one main action per screen, thumb reach, targets at least 48dp, offline / slow / permission-denied states, safe areas and keyboard.
|
|
109
|
+
- **Mobile design language (choose explicitly):** Material 3 | Cupertino | custom.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Wireframes
|
|
114
|
+
Choose the format that best communicates the layout:
|
|
115
|
+
1. **ASCII Box Art:** Max 80 columns. Best for mobile screens, simple CRUD lists, and master-detail views.
|
|
116
|
+
2. **Semantic Component Tree:** Indented hierarchy with layout annotations (e.g. grid, split-view, v-stack, h-stack). Best for dense dashboards, data tables, and responsive multi-column web views.
|
|
117
|
+
|
|
118
|
+
Label each region `<ComponentName>`. One desktop wireframe per key screen, plus mobile for the primary screen. Use real content. No HTML mockups.
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
+--------------------------------------------------+
|
|
122
|
+
| <AppHeader> Clinic Dela Cruz [Sign out] |
|
|
123
|
+
+----------+---------------------------------------+
|
|
124
|
+
| <SideNav>| <AppointmentList> |
|
|
125
|
+
| Today | 09:00 Maria Concepcion-Villanueva |
|
|
126
|
+
| Patients | 09:30 (no name given) |
|
|
127
|
+
+----------+---------------------------------------+
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Or Semantic Component Tree:
|
|
131
|
+
```yaml
|
|
132
|
+
Screen: AppointmentDashboard (Desktop 1280px+)
|
|
133
|
+
Layout: SplitView (sidebar: 240px, content: 1fr)
|
|
134
|
+
Tree:
|
|
135
|
+
- <AppSidebar (sticky, h-full)>:
|
|
136
|
+
- <ClinicBrandHeader title="Clinic Dela Cruz">
|
|
137
|
+
- <NavMenu active="today" items=["Today", "Patients"]>
|
|
138
|
+
- <MainContainer (v-stack, gap-6, p-6)>:
|
|
139
|
+
- <AppointmentFilterBar (h-stack, justify-between)>
|
|
140
|
+
- <AppointmentList (v-stack, gap-3)>:
|
|
141
|
+
- Columns: [Time, PatientName, StatusBadge, ActionButtons]
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Component Map
|
|
147
|
+
|
|
148
|
+
| Region | Component | File path | States | Section |
|
|
149
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
150
|
+
| | | | | [appointment-list](#appointment-list) |
|
|
151
|
+
|
|
152
|
+
### appointment-list
|
|
153
|
+
Example component section. One per component: purpose, data, states, mutations, behavior. Keep the heading anchor stable.
|
|
154
|
+
- **Purpose:** Display upcoming patient appointments with instant check-in.
|
|
155
|
+
- **Data:** `Appointment[]` from `api_contracts.json#GET /appointments`.
|
|
156
|
+
- **States:** Loading skeleton (3 rows), Empty (prompt to book), Error (inline retry).
|
|
157
|
+
- **Mutations:**
|
|
158
|
+
- *Check in:* Inline button spinner -> optimistic status badge change to Checked In.
|
|
159
|
+
- *Cancel:* Confirm dialog -> optimistic remove. On error: rollback item with error toast.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Copy & Wording
|
|
164
|
+
- **UI language(s):** e.g. English / Filipino
|
|
165
|
+
- **Key labels:**
|
|
166
|
+
- **Button verbs (domain words):**
|
|
167
|
+
- **Empty-state text:**
|
|
168
|
+
- **Error messages (plain language):**
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Signature Moments
|
|
173
|
+
One or two. Everything else stays restrained.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Anti-Generic Checklist
|
|
178
|
+
**Web**
|
|
179
|
+
- [ ] No unconsidered font defaults. Consumer/brand: distinct curated typeface (e.g. Outfit, Plus Jakarta Sans, DM Sans). Data-dense B2B SaaS/utility: Inter, Roboto, or native system type permitted for density and zero-FOIT. No unstyled browser defaults without a reason.
|
|
180
|
+
- [ ] No default indigo/purple accent.
|
|
181
|
+
- [ ] No rows of identical cards with pastel icon boxes.
|
|
182
|
+
- [ ] No gradient-text hero.
|
|
183
|
+
- [ ] No decorative blobs.
|
|
184
|
+
- [ ] No greeting banners.
|
|
185
|
+
- [ ] No emojis. Icons are vector SVG.
|
|
186
|
+
|
|
187
|
+
**Mobile**
|
|
188
|
+
- [ ] No default Material seed blue.
|
|
189
|
+
- [ ] No unthemed default widgets without a reason.
|
|
190
|
+
- [ ] No emojis.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## States
|
|
195
|
+
Every component and view covers these.
|
|
196
|
+
|
|
197
|
+
| State | Requirement |
|
|
198
|
+
| :--- | :--- |
|
|
199
|
+
| **Loading** | Skeleton matching loaded dimensions. |
|
|
200
|
+
| **Empty** | Short explanation and a primary action. |
|
|
201
|
+
| **Error** | Plain diagnosis with a Retry action. |
|
|
202
|
+
| **Success** | Clear confirmation. |
|
|
203
|
+
| **Disabled** | Visibly inactive, with a reason where useful. |
|
|
204
|
+
| **Mutation / Action** | Behavior during Create/Update/Delete (optimistic vs inline spinner, disabled submit, rollback on failure). |
|
|
205
|
+
| **Mobile only** | Offline, slow connection, permission denied. |
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Accessibility
|
|
210
|
+
- **Transitions:** `transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);`
|
|
211
|
+
- **Active state:** `transform: scale(0.98)`.
|
|
212
|
+
- **Focus rings:** `:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }`
|
|
213
|
+
- **Dialogs and drawers:** close with `Escape` and backdrop click; lock background scroll.
|
|
214
|
+
- **Labels:** `aria-label` on every icon-only button.
|