kernelbot 1.0.26 → 1.0.28

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.
Files changed (41) hide show
  1. package/README.md +198 -124
  2. package/bin/kernel.js +201 -4
  3. package/package.json +1 -1
  4. package/src/agent.js +397 -222
  5. package/src/automation/automation-manager.js +377 -0
  6. package/src/automation/automation.js +79 -0
  7. package/src/automation/index.js +2 -0
  8. package/src/automation/scheduler.js +141 -0
  9. package/src/bot.js +667 -21
  10. package/src/conversation.js +33 -0
  11. package/src/intents/detector.js +50 -0
  12. package/src/intents/index.js +2 -0
  13. package/src/intents/planner.js +58 -0
  14. package/src/persona.js +68 -0
  15. package/src/prompts/orchestrator.js +76 -0
  16. package/src/prompts/persona.md +21 -0
  17. package/src/prompts/system.js +59 -6
  18. package/src/prompts/workers.js +89 -0
  19. package/src/providers/anthropic.js +23 -16
  20. package/src/providers/base.js +76 -2
  21. package/src/providers/index.js +1 -0
  22. package/src/providers/models.js +2 -1
  23. package/src/providers/openai-compat.js +5 -3
  24. package/src/security/confirm.js +7 -2
  25. package/src/skills/catalog.js +506 -0
  26. package/src/skills/custom.js +128 -0
  27. package/src/swarm/job-manager.js +169 -0
  28. package/src/swarm/job.js +67 -0
  29. package/src/swarm/worker-registry.js +74 -0
  30. package/src/tools/browser.js +458 -335
  31. package/src/tools/categories.js +3 -3
  32. package/src/tools/index.js +3 -0
  33. package/src/tools/orchestrator-tools.js +371 -0
  34. package/src/tools/persona.js +32 -0
  35. package/src/utils/config.js +50 -15
  36. package/src/worker.js +305 -0
  37. package/.agents/skills/interface-design/SKILL.md +0 -391
  38. package/.agents/skills/interface-design/references/critique.md +0 -67
  39. package/.agents/skills/interface-design/references/example.md +0 -86
  40. package/.agents/skills/interface-design/references/principles.md +0 -235
  41. package/.agents/skills/interface-design/references/validation.md +0 -48
@@ -1,235 +0,0 @@
1
- # Core Craft Principles
2
-
3
- These apply regardless of design direction. This is the quality floor.
4
-
5
- ---
6
-
7
- ## Surface & Token Architecture
8
-
9
- Professional interfaces don't pick colors randomly — they build systems. Understanding this architecture is the difference between "looks okay" and "feels like a real product."
10
-
11
- ### The Primitive Foundation
12
-
13
- Every color in your interface should trace back to a small set of primitives:
14
-
15
- - **Foreground** — text colors (primary, secondary, muted)
16
- - **Background** — surface colors (base, elevated, overlay)
17
- - **Border** — edge colors (default, subtle, strong)
18
- - **Brand** — your primary accent
19
- - **Semantic** — functional colors (destructive, warning, success)
20
-
21
- Don't invent new colors. Map everything to these primitives.
22
-
23
- ### Surface Elevation Hierarchy
24
-
25
- Surfaces stack. A dropdown sits above a card which sits above the page. Build a numbered system:
26
-
27
- ```
28
- Level 0: Base background (the app canvas)
29
- Level 1: Cards, panels (same visual plane as base)
30
- Level 2: Dropdowns, popovers (floating above)
31
- Level 3: Nested dropdowns, stacked overlays
32
- Level 4: Highest elevation (rare)
33
- ```
34
-
35
- In dark mode, higher elevation = slightly lighter. In light mode, higher elevation = slightly lighter or uses shadow. The principle: **elevated surfaces need visual distinction from what's beneath them.**
36
-
37
- ### The Subtlety Principle
38
-
39
- This is where most interfaces fail. Study Vercel, Supabase, Linear — their surfaces are **barely different** but still distinguishable. Their borders are **light but not invisible**.
40
-
41
- **For surfaces:** The difference between elevation levels should be subtle — a few percentage points of lightness, not dramatic jumps. In dark mode, surface-100 might be 7% lighter than base, surface-200 might be 9%, surface-300 might be 12%. You can barely see it, but you feel it.
42
-
43
- **For borders:** Borders should define regions without demanding attention. Use low opacity (0.05-0.12 alpha for dark mode, slightly higher for light). The border should disappear when you're not looking for it, but be findable when you need to understand the structure.
44
-
45
- **The test:** Squint at your interface. You should still perceive the hierarchy — what's above what, where regions begin and end. But no single border or surface should jump out at you. If borders are the first thing you notice, they're too strong. If you can't find where one region ends and another begins, they're too subtle.
46
-
47
- **Common AI mistakes to avoid:**
48
- - Borders that are too visible (1px solid gray instead of subtle rgba)
49
- - Surface jumps that are too dramatic (going from dark to light instead of dark to slightly-less-dark)
50
- - Using different hues for different surfaces (gray card on blue background)
51
- - Harsh dividers where subtle borders would do
52
-
53
- ### Text Hierarchy via Tokens
54
-
55
- Don't just have "text" and "gray text." Build four levels:
56
-
57
- - **Primary** — default text, highest contrast
58
- - **Secondary** — supporting text, slightly muted
59
- - **Tertiary** — metadata, timestamps, less important
60
- - **Muted** — disabled, placeholder, lowest contrast
61
-
62
- Use all four consistently. If you're only using two, your hierarchy is too flat.
63
-
64
- ### Border Progression
65
-
66
- Borders aren't binary. Build a scale:
67
-
68
- - **Default** — standard borders
69
- - **Subtle/Muted** — softer separation
70
- - **Strong** — emphasis, hover states
71
- - **Stronger** — maximum emphasis, focus rings
72
-
73
- Match border intensity to the importance of the boundary.
74
-
75
- ### Dedicated Control Tokens
76
-
77
- Form controls (inputs, checkboxes, selects) have specific needs. Don't just reuse surface tokens — create dedicated ones:
78
-
79
- - **Control background** — often different from surface backgrounds
80
- - **Control border** — needs to feel interactive
81
- - **Control focus** — clear focus indication
82
-
83
- This separation lets you tune controls independently from layout surfaces.
84
-
85
- ### Context-Aware Bases
86
-
87
- Different areas of your app might need different base surfaces:
88
-
89
- - **Marketing pages** — might use darker/richer backgrounds
90
- - **Dashboard/app** — might use neutral working backgrounds
91
- - **Sidebar** — might differ from main canvas
92
-
93
- The surface hierarchy works the same way — it just starts from a different base.
94
-
95
- ### Alternative Backgrounds for Depth
96
-
97
- Beyond shadows, use contrasting backgrounds to create depth. An "alternative" or "inset" background makes content feel recessed. Useful for:
98
-
99
- - Empty states in data grids
100
- - Code blocks
101
- - Inset panels
102
- - Visual grouping without borders
103
-
104
- ---
105
-
106
- ## Spacing System
107
-
108
- Pick a base unit (4px and 8px are common) and use multiples throughout. The specific number matters less than consistency — every spacing value should be explainable as "X times the base unit."
109
-
110
- Build a scale for different contexts:
111
- - Micro spacing (icon gaps, tight element pairs)
112
- - Component spacing (within buttons, inputs, cards)
113
- - Section spacing (between related groups)
114
- - Major separation (between distinct sections)
115
-
116
- ## Symmetrical Padding
117
-
118
- TLBR must match. If top padding is 16px, left/bottom/right must also be 16px. Exception: when content naturally creates visual balance.
119
-
120
- ```css
121
- /* Good */
122
- padding: 16px;
123
- padding: 12px 16px; /* Only when horizontal needs more room */
124
-
125
- /* Bad */
126
- padding: 24px 16px 12px 16px;
127
- ```
128
-
129
- ## Border Radius Consistency
130
-
131
- Sharper corners feel technical, rounder corners feel friendly. Pick a scale that fits your product's personality and use it consistently.
132
-
133
- The key is having a system: small radius for inputs and buttons, medium for cards, large for modals or containers. Don't mix sharp and soft randomly — inconsistent radius is as jarring as inconsistent spacing.
134
-
135
- ## Depth & Elevation Strategy
136
-
137
- Match your depth approach to your design direction. Choose ONE and commit:
138
-
139
- **Borders-only (flat)** — Clean, technical, dense. Works for utility-focused tools where information density matters more than visual lift. Linear, Raycast, and many developer tools use almost no shadows — just subtle borders to define regions.
140
-
141
- **Subtle single shadows** — Soft lift without complexity. A simple `0 1px 3px rgba(0,0,0,0.08)` can be enough. Works for approachable products that want gentle depth.
142
-
143
- **Layered shadows** — Rich, premium, dimensional. Multiple shadow layers create realistic depth. Stripe and Mercury use this approach. Best for cards that need to feel like physical objects.
144
-
145
- **Surface color shifts** — Background tints establish hierarchy without any shadows. A card at `#fff` on a `#f8fafc` background already feels elevated.
146
-
147
- ```css
148
- /* Borders-only approach */
149
- --border: rgba(0, 0, 0, 0.08);
150
- --border-subtle: rgba(0, 0, 0, 0.05);
151
- border: 0.5px solid var(--border);
152
-
153
- /* Single shadow approach */
154
- --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
155
-
156
- /* Layered shadow approach */
157
- --shadow-layered:
158
- 0 0 0 0.5px rgba(0, 0, 0, 0.05),
159
- 0 1px 2px rgba(0, 0, 0, 0.04),
160
- 0 2px 4px rgba(0, 0, 0, 0.03),
161
- 0 4px 8px rgba(0, 0, 0, 0.02);
162
- ```
163
-
164
- ## Card Layouts
165
-
166
- Monotonous card layouts are lazy design. A metric card doesn't have to look like a plan card doesn't have to look like a settings card.
167
-
168
- Design each card's internal structure for its specific content — but keep the surface treatment consistent: same border weight, shadow depth, corner radius, padding scale, typography.
169
-
170
- ## Isolated Controls
171
-
172
- UI controls deserve container treatment. Date pickers, filters, dropdowns — these should feel like crafted objects.
173
-
174
- **Never use native form elements for styled UI.** Native `<select>`, `<input type="date">`, and similar elements render OS-native dropdowns that cannot be styled. Build custom components instead:
175
-
176
- - Custom select: trigger button + positioned dropdown menu
177
- - Custom date picker: input + calendar popover
178
- - Custom checkbox/radio: styled div with state management
179
-
180
- Custom select triggers must use `display: inline-flex` with `white-space: nowrap` to keep text and chevron icons on the same row.
181
-
182
- ## Typography Hierarchy
183
-
184
- Build distinct levels that are visually distinguishable at a glance:
185
-
186
- - **Headlines** — heavier weight, tighter letter-spacing for presence
187
- - **Body** — comfortable weight for readability
188
- - **Labels/UI** — medium weight, works at smaller sizes
189
- - **Data** — often monospace, needs `tabular-nums` for alignment
190
-
191
- Don't rely on size alone. Combine size, weight, and letter-spacing to create clear hierarchy. If you squint and can't tell headline from body, the hierarchy is too weak.
192
-
193
- ## Monospace for Data
194
-
195
- Numbers, IDs, codes, timestamps belong in monospace. Use `tabular-nums` for columnar alignment. Mono signals "this is data."
196
-
197
- ## Iconography
198
-
199
- Icons clarify, not decorate — if removing an icon loses no meaning, remove it. Choose a consistent icon set and stick with it throughout the product.
200
-
201
- Give standalone icons presence with subtle background containers. Icons next to text should align optically, not mathematically.
202
-
203
- ## Animation
204
-
205
- Keep it fast and functional. Micro-interactions (hover, focus) should feel instant — around 150ms. Larger transitions (modals, panels) can be slightly longer — 200-250ms.
206
-
207
- Use smooth deceleration easing (ease-out variants). Avoid spring/bounce effects in professional interfaces — they feel playful, not serious.
208
-
209
- ## Contrast Hierarchy
210
-
211
- Build a four-level system: foreground (primary) → secondary → muted → faint. Use all four consistently.
212
-
213
- ## Color Carries Meaning
214
-
215
- Gray builds structure. Color communicates — status, action, emphasis, identity. Unmotivated color is noise. Color that reinforces the product's world is character.
216
-
217
- ## Navigation Context
218
-
219
- Screens need grounding. A data table floating in space feels like a component demo, not a product. Consider including:
220
-
221
- - **Navigation** — sidebar or top nav showing where you are in the app
222
- - **Location indicator** — breadcrumbs, page title, or active nav state
223
- - **User context** — who's logged in, what workspace/org
224
-
225
- When building sidebars, consider using the same background as the main content area. Rely on a subtle border for separation rather than different background colors.
226
-
227
- ## Dark Mode
228
-
229
- Dark interfaces have different needs:
230
-
231
- **Borders over shadows** — Shadows are less visible on dark backgrounds. Lean more on borders for definition.
232
-
233
- **Adjust semantic colors** — Status colors (success, warning, error) often need to be slightly desaturated for dark backgrounds.
234
-
235
- **Same structure, different values** — The hierarchy system still applies, just with inverted values.
@@ -1,48 +0,0 @@
1
- # Memory Management
2
-
3
- When and how to update `.interface-design/system.md`.
4
-
5
- ## When to Add Patterns
6
-
7
- Add to system.md when:
8
- - Component used 2+ times
9
- - Pattern is reusable across the project
10
- - Has specific measurements worth remembering
11
-
12
- ## Pattern Format
13
-
14
- ```markdown
15
- ### Button Primary
16
- - Height: 36px
17
- - Padding: 12px 16px
18
- - Radius: 6px
19
- - Font: 14px, 500 weight
20
- ```
21
-
22
- ## Don't Document
23
-
24
- - One-off components
25
- - Temporary experiments
26
- - Variations better handled with props
27
-
28
- ## Pattern Reuse
29
-
30
- Before creating a component, check system.md:
31
- - Pattern exists? Use it.
32
- - Need variation? Extend, don't create new.
33
-
34
- Memory compounds: each pattern saved makes future work faster and more consistent.
35
-
36
- ---
37
-
38
- # Validation Checks
39
-
40
- If system.md defines specific values, check consistency:
41
-
42
- **Spacing** — All values multiples of the defined base?
43
-
44
- **Depth** — Using the declared strategy throughout? (borders-only means no shadows)
45
-
46
- **Colors** — Using defined palette, not random hex codes?
47
-
48
- **Patterns** — Reusing documented patterns instead of creating new?