@njeybe/nativ 2.0.1 → 2.1.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 +21 -1
- package/README.md +28 -1
- package/dist/commands/doctor.js +7 -0
- 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 +33 -0
- 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 +13 -2
- package/templates/claude-agents/architect.md +61 -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 +74 -11
- package/templates/dot-ai/subagents/frontend.md +73 -126
- package/templates/dot-ai/ui_specs.md +184 -78
|
@@ -1,78 +1,184 @@
|
|
|
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 and write it here: **Level: Quick | Standard | Full**
|
|
9
|
+
|
|
10
|
+
- **Quick:** small fix, fast-path task, no design phase.
|
|
11
|
+
- **Standard:** new screen in an existing design. Flow + wireframe + component map. Reuse existing tokens.
|
|
12
|
+
- **Full:** new app, new platform or redesign. Discovery questions, brief, flows, two directions with style tiles, wireframes, component map.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Design Brief
|
|
17
|
+
- **Who uses it:**
|
|
18
|
+
- **The job they are doing:**
|
|
19
|
+
- **Tone (three words):**
|
|
20
|
+
- **Things to avoid:**
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Users & Top Tasks
|
|
25
|
+
Top 3-5 user tasks and how often each happens.
|
|
26
|
+
|
|
27
|
+
| Task | Frequency |
|
|
28
|
+
| :--- | :--- |
|
|
29
|
+
| | |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Real Content Samples
|
|
34
|
+
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.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## User Flows
|
|
39
|
+
Each key journey step by step, with tap/click counts.
|
|
40
|
+
|
|
41
|
+
1. Journey name (N taps)
|
|
42
|
+
1. Step
|
|
43
|
+
2. Step
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Design Directions
|
|
48
|
+
Exactly two directions.
|
|
49
|
+
|
|
50
|
+
- **Direction A:**
|
|
51
|
+
- **Direction B:**
|
|
52
|
+
- **Chosen and why:**
|
|
53
|
+
- **Full level only:** style tile at `.ai/design/style-tile.html`
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Design Tokens
|
|
58
|
+
Placeholders the Architect fills, each with a one-line rationale. Do not copy a default palette.
|
|
59
|
+
|
|
60
|
+
```css
|
|
61
|
+
:root {
|
|
62
|
+
/* Surface & canvas */
|
|
63
|
+
--bg-canvas: <value>; /* why */
|
|
64
|
+
--surface: <value>; /* why */
|
|
65
|
+
--surface-hover: <value>; /* why */
|
|
66
|
+
--border-subtle: <value>; /* why */
|
|
67
|
+
--border-hover: <value>; /* why */
|
|
68
|
+
|
|
69
|
+
/* Typography & contrast */
|
|
70
|
+
--text-primary: <value>; /* why */
|
|
71
|
+
--text-secondary: <value>; /* why */
|
|
72
|
+
--text-muted: <value>; /* why */
|
|
73
|
+
|
|
74
|
+
/* Brand & accents */
|
|
75
|
+
--brand: <value>; /* why */
|
|
76
|
+
--brand-hover: <value>; /* why */
|
|
77
|
+
--brand-surface: <value>; /* why */
|
|
78
|
+
|
|
79
|
+
/* Status */
|
|
80
|
+
--status-success: <value>; --status-success-bg: <value>;
|
|
81
|
+
--status-warning: <value>; --status-warning-bg: <value>;
|
|
82
|
+
--status-danger: <value>; --status-danger-bg: <value>;
|
|
83
|
+
--status-info: <value>; --status-info-bg: <value>;
|
|
84
|
+
|
|
85
|
+
/* Geometry & elevation */
|
|
86
|
+
--radius-sm: <value>; --radius-md: <value>; --radius-lg: <value>;
|
|
87
|
+
--shadow-sm: <value>; --shadow-md: <value>;
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Flutter mapping:** each token maps to a `ThemeData` field (`colorScheme`, `textTheme`) or a `ThemeExtension` (status colors, radii, shadows). List the mapping here.
|
|
92
|
+
|
|
93
|
+
| Token | Flutter target |
|
|
94
|
+
| :--- | :--- |
|
|
95
|
+
| `--brand` | `colorScheme.primary` |
|
|
96
|
+
| `--status-*` | `ThemeExtension` |
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Platform Rules
|
|
101
|
+
- **Primary platform (designed first):**
|
|
102
|
+
- **Web:** sidebar or top bar, density, keyboard support, hover states, targets at least 32px, behavior on wide screens.
|
|
103
|
+
- **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.
|
|
104
|
+
- **Mobile design language (choose explicitly):** Material 3 | Cupertino | custom.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Wireframes
|
|
109
|
+
ASCII box-drawing, max 80 columns. Label each region `<ComponentName>`. One desktop wireframe per key screen, plus mobile for the primary screen. Use real content. No HTML mockups.
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
+--------------------------------------------------+
|
|
113
|
+
| <AppHeader> Clinic Dela Cruz [Sign out] |
|
|
114
|
+
+----------+---------------------------------------+
|
|
115
|
+
| <SideNav>| <AppointmentList> |
|
|
116
|
+
| Today | 09:00 Maria Concepcion-Villanueva |
|
|
117
|
+
| Patients | 09:30 (no name given) |
|
|
118
|
+
+----------+---------------------------------------+
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Component Map
|
|
124
|
+
|
|
125
|
+
| Region | Component | File path | States | Section |
|
|
126
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
127
|
+
| | | | | [appointment-list](#appointment-list) |
|
|
128
|
+
|
|
129
|
+
### appointment-list
|
|
130
|
+
Example component section. One per component: purpose, data, states, behavior. Keep the heading anchor stable.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Copy & Wording
|
|
135
|
+
- **UI language(s):** e.g. English / Filipino
|
|
136
|
+
- **Key labels:**
|
|
137
|
+
- **Button verbs (domain words):**
|
|
138
|
+
- **Empty-state text:**
|
|
139
|
+
- **Error messages (plain language):**
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Signature Moments
|
|
144
|
+
One or two. Everything else stays restrained.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Anti-Generic Checklist
|
|
149
|
+
**Web**
|
|
150
|
+
- [ ] No default Inter or system-only type without a reason.
|
|
151
|
+
- [ ] No default indigo/purple accent.
|
|
152
|
+
- [ ] No rows of identical cards with pastel icon boxes.
|
|
153
|
+
- [ ] No gradient-text hero.
|
|
154
|
+
- [ ] No decorative blobs.
|
|
155
|
+
- [ ] No greeting banners.
|
|
156
|
+
- [ ] No emojis. Icons are vector SVG.
|
|
157
|
+
|
|
158
|
+
**Mobile**
|
|
159
|
+
- [ ] No default Material seed blue.
|
|
160
|
+
- [ ] No unthemed default widgets without a reason.
|
|
161
|
+
- [ ] No emojis.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## States
|
|
166
|
+
Every component and view covers these.
|
|
167
|
+
|
|
168
|
+
| State | Requirement |
|
|
169
|
+
| :--- | :--- |
|
|
170
|
+
| **Loading** | Skeleton matching loaded dimensions. |
|
|
171
|
+
| **Empty** | Short explanation and a primary action. |
|
|
172
|
+
| **Error** | Plain diagnosis with a Retry action. |
|
|
173
|
+
| **Success** | Clear confirmation. |
|
|
174
|
+
| **Disabled** | Visibly inactive, with a reason where useful. |
|
|
175
|
+
| **Mobile only** | Offline, slow connection, permission denied. |
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Accessibility
|
|
180
|
+
- **Transitions:** `transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);`
|
|
181
|
+
- **Active state:** `transform: scale(0.98)`.
|
|
182
|
+
- **Focus rings:** `:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }`
|
|
183
|
+
- **Dialogs and drawers:** close with `Escape` and backdrop click; lock background scroll.
|
|
184
|
+
- **Labels:** `aria-label` on every icon-only button.
|