@lukeashford/aurelius 2.11.0 → 2.13.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/README.md +109 -118
- package/dist/index.d.mts +266 -24
- package/dist/index.d.ts +266 -24
- package/dist/index.js +1042 -338
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +984 -294
- package/dist/index.mjs.map +1 -1
- package/dist/styles/theme.css +20 -0
- package/llms.md +294 -82
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,161 +1,152 @@
|
|
|
1
|
-
# Aurelius
|
|
1
|
+
# Aurelius — Agent Development Guide
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
This file provides instructions for AI coding agents working **on** this repository (developing the
|
|
4
|
+
library itself).
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
cinematic aesthetic.
|
|
8
|
-
|
|
9
|
-
[Live Demo](https://aurelius.lukeashford.com/)
|
|
6
|
+
For agents **using** the library in other projects, see `llms.md`.
|
|
10
7
|
|
|
11
8
|
---
|
|
12
9
|
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
Aurelius relies on deep blacks, rich golds, and refined typography to convey stability, trust, and
|
|
16
|
-
quiet luxury.
|
|
17
|
-
|
|
18
|
-
**Core principles:**
|
|
19
|
-
|
|
20
|
-
- **Cinematic:** Strictly dark mode. No white backgrounds.
|
|
21
|
-
- **Refined:** Gold (`#c9a227`) is reserved for primary actions and key highlights.
|
|
22
|
-
- **Grounded:** Subtle 1px borders over heavy drop shadows.
|
|
10
|
+
## README
|
|
23
11
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
1. **React Components** — Use `<Button />`, `<Card />`, etc. whenever possible
|
|
27
|
-
2. **Tailwind utilities** — Build custom layouts with token-based classes (`bg-obsidian`,
|
|
28
|
-
`text-gold`)
|
|
29
|
-
3. **Design tokens** — Direct access to values as a last resort
|
|
12
|
+
See @README.md for project orientation, philosophy, and quick start commands.
|
|
30
13
|
|
|
31
14
|
---
|
|
32
15
|
|
|
33
|
-
##
|
|
34
|
-
|
|
35
|
-
This package includes a machine-readable manifest and ESLint enforcement for AI coding assistants.
|
|
36
|
-
|
|
37
|
-
**Prompt your agent:**
|
|
16
|
+
## Project Structure
|
|
38
17
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
18
|
+
```
|
|
19
|
+
aurelius/
|
|
20
|
+
├── src/ # Library source code
|
|
21
|
+
│ ├── components/ # React components
|
|
22
|
+
│ │ ├── chat/ # Chat interface components
|
|
23
|
+
│ │ │ └── hooks/ # React hooks (useArtifacts, useScrollAnchor, etc.)
|
|
24
|
+
│ │ └── icons/ # Icon components
|
|
25
|
+
│ ├── styles/ # CSS and theme definitions
|
|
26
|
+
│ │ ├── base.css # Entry point (imports theme + Tailwind)
|
|
27
|
+
│ │ └── theme.css # Design tokens and custom utilities
|
|
28
|
+
│ └── utils/ # Utility functions (cx, etc.)
|
|
29
|
+
├── demo/ # Demo site (Vite + React)
|
|
30
|
+
│ └── src/components/ # Demo components (ChatDemo, etc.)
|
|
31
|
+
├── scripts/ # Build scripts
|
|
32
|
+
│ └── generate-manifest.js # Generates llms.md from source
|
|
33
|
+
├── llms.md # Auto-generated AI manifest (DO NOT EDIT)
|
|
34
|
+
├── CLAUDE.md # This file
|
|
35
|
+
└── README.md # Human-readable overview
|
|
36
|
+
```
|
|
45
37
|
|
|
46
|
-
|
|
47
|
-
while staying within design system constraints.
|
|
38
|
+
---
|
|
48
39
|
|
|
49
|
-
|
|
40
|
+
## Development Guidelines
|
|
50
41
|
|
|
51
|
-
|
|
42
|
+
### Adding Components
|
|
52
43
|
|
|
53
|
-
|
|
44
|
+
1. Create component file in `src/components/` (or appropriate subdirectory)
|
|
45
|
+
2. Add JSDoc comments to the component and its props interface — these are auto-extracted to
|
|
46
|
+
`llms.md`
|
|
47
|
+
3. Export from `src/components/index.ts`
|
|
48
|
+
4. Run `npm run build` to regenerate `llms.md`
|
|
54
49
|
|
|
55
|
-
###
|
|
50
|
+
### JSDoc Format for Props
|
|
56
51
|
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
```tsx
|
|
53
|
+
export interface MyComponentProps {
|
|
54
|
+
/**
|
|
55
|
+
* Description of this prop
|
|
56
|
+
*/
|
|
57
|
+
propName: string
|
|
58
|
+
/**
|
|
59
|
+
* Another prop with type annotation in description
|
|
60
|
+
* @default "defaultValue"
|
|
61
|
+
*/
|
|
62
|
+
optionalProp?: 'option1' | 'option2'
|
|
63
|
+
}
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Component description goes here.
|
|
67
|
+
* This will be extracted to llms.md.
|
|
68
|
+
*/
|
|
69
|
+
export function MyComponent({propName, optionalProp = 'option1'}: MyComponentProps) {
|
|
70
|
+
// ...
|
|
71
|
+
}
|
|
64
72
|
```
|
|
65
73
|
|
|
66
|
-
###
|
|
74
|
+
### Tailwind CSS v4
|
|
67
75
|
|
|
68
|
-
|
|
76
|
+
This project uses Tailwind CSS v4 with `@theme` design tokens:
|
|
69
77
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
- All colors defined in `src/styles/theme.css` under `@theme { }`
|
|
79
|
+
- Custom utilities defined with `@utility` directive
|
|
80
|
+
- ESLint enforces design system constraints (no arbitrary values)
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
plugins: [
|
|
76
|
-
tailwindcss(),
|
|
77
|
-
],
|
|
78
|
-
})
|
|
79
|
-
```
|
|
82
|
+
**Restricted patterns (will fail lint):**
|
|
80
83
|
|
|
81
|
-
|
|
84
|
+
- `bg-[#...]`, `text-[...]` — arbitrary color values
|
|
85
|
+
- `rounded-sm`, `rounded` — use design system border radius
|
|
86
|
+
- `max-h-[...]`, `w-[...]` — use relative units or design tokens
|
|
82
87
|
|
|
83
|
-
|
|
88
|
+
### Testing Changes
|
|
84
89
|
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
```bash
|
|
91
|
+
# Type check
|
|
92
|
+
npm run typecheck
|
|
88
93
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
```
|
|
94
|
+
# Lint (must pass with 0 warnings)
|
|
95
|
+
npm run lint
|
|
92
96
|
|
|
93
|
-
|
|
97
|
+
# Full build (typecheck + lint + compile + generate manifest)
|
|
98
|
+
npm run build
|
|
94
99
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
import './index.css'
|
|
100
|
+
# Run demo to visually test
|
|
101
|
+
npm run dev:demo
|
|
98
102
|
```
|
|
99
103
|
|
|
100
|
-
###
|
|
104
|
+
### Documentation
|
|
101
105
|
|
|
102
|
-
|
|
103
|
-
|
|
106
|
+
- **README.md** — Keep focused on human orientation. No component API docs.
|
|
107
|
+
- **llms.md** — Auto-generated. Never edit directly. Add JSDoc to components instead.
|
|
108
|
+
- **CLAUDE.md** — This file. Update when project structure or processes change.
|
|
104
109
|
|
|
105
|
-
|
|
106
|
-
// eslint.config.mjs
|
|
107
|
-
export {default} from '@lukeashford/aurelius/eslint';
|
|
108
|
-
```
|
|
110
|
+
### Commit Guidelines
|
|
109
111
|
|
|
110
|
-
|
|
112
|
+
- Use conventional commits: `feat:`, `fix:`, `refactor:`, `docs:`, `chore:`
|
|
113
|
+
- Run `npm run build` before committing to ensure everything compiles
|
|
114
|
+
- The build regenerates `llms.md` — commit it with your changes
|
|
111
115
|
|
|
112
|
-
|
|
113
|
-
// eslint.config.mjs
|
|
114
|
-
import {createAureliusESLintConfig} from '@lukeashford/aurelius/eslint';
|
|
116
|
+
---
|
|
115
117
|
|
|
116
|
-
|
|
117
|
-
entryPoint: './app/styles.css'
|
|
118
|
-
});
|
|
119
|
-
```
|
|
118
|
+
## Key Files
|
|
120
119
|
|
|
121
|
-
|
|
120
|
+
| File | Purpose |
|
|
121
|
+
|---------------------------------------------|------------------------------------------|
|
|
122
|
+
| `src/styles/theme.css` | Design tokens (colors, fonts, utilities) |
|
|
123
|
+
| `src/components/index.ts` | Main export barrel |
|
|
124
|
+
| `src/components/chat/hooks/useArtifacts.ts` | Artifacts panel state management |
|
|
125
|
+
| `src/components/chat/ChatInterface.tsx` | Main chat orchestrator component |
|
|
126
|
+
| `scripts/generate-manifest.js` | Generates llms.md from source |
|
|
127
|
+
| `eslint/index.js` | ESLint config enforcing design system |
|
|
122
128
|
|
|
123
|
-
|
|
124
|
-
`bg-[#123456]` or `text-[15px]`
|
|
125
|
-
- **CSS files:** Tailwind v4 CSS best practices, valid `@apply` directives, no arbitrary value
|
|
126
|
-
overuse, and proper theme token usage
|
|
129
|
+
---
|
|
127
130
|
|
|
128
|
-
|
|
131
|
+
## Common Tasks
|
|
129
132
|
|
|
130
|
-
Add a
|
|
133
|
+
### Add a new icon
|
|
131
134
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"dev": "npm run lint && vite",
|
|
137
|
-
"build": "npm run lint && vite build"
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
```
|
|
135
|
+
1. Create `src/components/icons/MyIcon.tsx`
|
|
136
|
+
2. Add React import and IconProps type
|
|
137
|
+
3. Export from `src/components/icons/index.ts`
|
|
138
|
+
4. Export from `src/components/index.ts`
|
|
141
139
|
|
|
142
|
-
|
|
143
|
-
pipeline so lint failures block merges.
|
|
140
|
+
### Add a new color token
|
|
144
141
|
|
|
145
|
-
|
|
142
|
+
1. Add to `@theme { }` block in `src/styles/theme.css`:
|
|
143
|
+
```css
|
|
144
|
+
--color-mycolor: #hexvalue;
|
|
145
|
+
```
|
|
146
|
+
2. Run `npm run build` — the color will auto-appear in `llms.md`
|
|
146
147
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
<Card variant="featured" className="p-8 max-w-sm mx-auto">
|
|
153
|
-
<h2 className="text-gold text-2xl mb-6">Sign In</h2>
|
|
154
|
-
<Input placeholder="email@example.com"/>
|
|
155
|
-
<Button variant="primary" className="w-full mt-4">
|
|
156
|
-
Enter
|
|
157
|
-
</Button>
|
|
158
|
-
</Card>
|
|
159
|
-
)
|
|
160
|
-
}
|
|
161
|
-
```
|
|
148
|
+
### Update component documentation
|
|
149
|
+
|
|
150
|
+
1. Edit JSDoc comments in the component file
|
|
151
|
+
2. Run `npm run build` to regenerate `llms.md`
|
|
152
|
+
3. Commit both files
|