@morphist/aspects 0.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.
Files changed (3) hide show
  1. package/README.md +324 -0
  2. package/dist/cli.js +24608 -0
  3. package/package.json +69 -0
package/README.md ADDED
@@ -0,0 +1,324 @@
1
+ ```text
2
+ █████╗ ███████╗██████╗ ███████╗ ██████╗████████╗███████╗
3
+ ██╔══██╗ ██╔════╝██╔══██╗██╔════╝██╔════╝╚══██╔══╝██╔════╝
4
+ ███████║ ███████╗██████╔╝█████╗ ██║ ██║ ███████╗
5
+ ██╔══██║ ╚════██║██╔═══╝ ██╔══╝ ██║ ██║ ╚════██║
6
+ ██║ ██║ ███████║██║ ███████╗╚██████╗ ██║ ███████║
7
+ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚══════╝
8
+ ```
9
+
10
+ > **Community Aspects Registry** — Personality modules for AI agents.
11
+
12
+ [![Validate PRs](https://github.com/aimorphist/aspects/actions/workflows/validate-pr.yml/badge.svg)](https://github.com/aimorphist/aspects/actions/workflows/validate-pr.yml)
13
+
14
+ ---
15
+
16
+ ## What are Aspects?
17
+
18
+ Aspects are personality modules for AI agents. They define how an AI speaks, thinks, and behaves — from quirky wizards to helpful assistants to domain experts.
19
+
20
+ Each aspect is a JSON file containing:
21
+
22
+ - **Identity** — Name, tagline, character description
23
+ - **Voice Hints** — Speaking speed, emotional tone, style guidance
24
+ - **Modes** — Different behavioral modes (e.g., "campaign mode" for a D&D wizard)
25
+ - **Prompt** — The core personality prompt
26
+
27
+ ## Quick Start
28
+
29
+ Browse and install aspects directly in the [Morphist app](https://morphist.ai):
30
+
31
+ 1. Open the **Aspects** tab in settings
32
+ 2. Browse community aspects
33
+ 3. Tap **Install** on any aspect you like
34
+ 4. Switch between aspects anytime
35
+
36
+ ## Registry Structure
37
+
38
+ ```text
39
+ registry/
40
+ ├── index.json # Registry index with all aspects
41
+ └── aspects/
42
+ ├── alaric/
43
+ │ └── aspect.json # Alaric the Wizard
44
+ └── default/
45
+ └── aspect.json # Morphist Default
46
+ ```
47
+
48
+ ## Aspect Format
49
+
50
+ Aspects are defined in `aspect.json`:
51
+
52
+ ```json
53
+ {
54
+ "schemaVersion": 1,
55
+ "name": "alaric",
56
+ "publisher": "morphist",
57
+ "version": "1.0.0",
58
+ "displayName": "Alaric the Wizard",
59
+ "tagline": "Quirky wizard, D&D expert, can run campaigns",
60
+ "category": "roleplay",
61
+ "tags": ["dnd", "wizard", "fantasy", "campaign", "tabletop"],
62
+ "icon": "wand",
63
+ "author": "Duke Jones",
64
+ "license": "MIT",
65
+ "voiceHints": {
66
+ "speed": "slow",
67
+ "emotions": ["curiosity", "warmth"],
68
+ "styleHints": "Speak slowly and deliberately, with warmth and occasional wry humor."
69
+ },
70
+ "modes": {
71
+ "campaign": {
72
+ "description": "Run a freeform or rules-based RPG campaign",
73
+ "autoNarration": true
74
+ }
75
+ },
76
+ "prompt": "## Aspect: Alaric the Wizard\n**YOU ARE ALARIC.**..."
77
+ }
78
+ ```
79
+
80
+ ### Required Fields
81
+
82
+ | Field | Description |
83
+ | --------------- | -------------------------------- |
84
+ | `schemaVersion` | Always `1` |
85
+ | `name` | Unique slug (lowercase, hyphens) |
86
+ | `publisher` | Publisher identifier |
87
+ | `version` | Semver version |
88
+ | `displayName` | Human-readable name |
89
+ | `tagline` | One-line description |
90
+ | `category` | Official category (see below) |
91
+ | `prompt` | The personality prompt |
92
+
93
+ ### Categories
94
+
95
+ Every aspect must have exactly one official category:
96
+
97
+ | Category | Description |
98
+ | -------------- | ---------------------------------- |
99
+ | `assistant` | General helpful AI assistants |
100
+ | `roleplay` | Characters, personas, storytelling |
101
+ | `creative` | Writing, art, brainstorming |
102
+ | `productivity` | Work, tasks, organization |
103
+ | `education` | Learning, tutoring, explanations |
104
+ | `gaming` | Games, campaigns, entertainment |
105
+ | `spiritual` | Mindfulness, wisdom, guidance |
106
+ | `pundit` | Commentary, analysis, opinions |
107
+
108
+ ### Optional Fields
109
+
110
+ | Field | Description |
111
+ | ------------ | ------------------------------------------ |
112
+ | `tags` | Discovery keywords (max 10, 30 chars each) |
113
+ | `icon` | Icon name (e.g., "wand", "bot") |
114
+ | `author` | Author name |
115
+ | `license` | License (e.g., "MIT") |
116
+ | `voiceHints` | Voice configuration |
117
+ | `modes` | Behavioral modes |
118
+ | `resources` | Recommended voice/model settings |
119
+
120
+ ### Field Limits
121
+
122
+ To prevent abuse, fields have maximum lengths:
123
+
124
+ | Field | Limit |
125
+ | ------------- | ----------------------- |
126
+ | `name` | 50 characters |
127
+ | `displayName` | 100 characters |
128
+ | `tagline` | 200 characters |
129
+ | `tags` | 10 items, 30 chars each |
130
+ | `prompt` | 50,000 characters |
131
+ | `modes` | 10 maximum |
132
+
133
+ ## Create & Submit an Aspect
134
+
135
+ ### Fork & Pull Request
136
+
137
+ The standard way to contribute:
138
+
139
+ 1. **Fork this repository** on GitHub
140
+
141
+ 2. **Clone your fork**
142
+
143
+ ```bash
144
+ git clone https://github.com/YOUR_USERNAME/aspects
145
+ cd aspects
146
+ ```
147
+
148
+ 3. **Create your aspect** (use the CLI or manually)
149
+
150
+ ```bash
151
+ # With CLI (recommended)
152
+ npx @aspect/cli create
153
+
154
+ # Or manually create the files:
155
+ mkdir -p registry/aspects/my-aspect
156
+ ```
157
+
158
+ 4. **If creating manually**, add `registry/aspects/my-aspect/aspect.json`:
159
+
160
+ ```json
161
+ {
162
+ "schemaVersion": 1,
163
+ "name": "my-aspect",
164
+ "publisher": "your-username",
165
+ "version": "1.0.0",
166
+ "displayName": "My Awesome Aspect",
167
+ "tagline": "A brief description",
168
+ "category": "assistant",
169
+ "tags": ["helpful", "friendly"],
170
+ "prompt": "Your personality prompt here..."
171
+ }
172
+ ```
173
+
174
+ 5. **If creating manually**, update `registry/index.json`:
175
+
176
+ ```json
177
+ {
178
+ "my-aspect": {
179
+ "latest": "1.0.0",
180
+ "versions": {
181
+ "1.0.0": {
182
+ "published": "2026-01-20T00:00:00Z",
183
+ "url": "https://raw.githubusercontent.com/aimorphist/aspects/main/registry/aspects/my-aspect/aspect.json"
184
+ }
185
+ },
186
+ "metadata": {
187
+ "displayName": "My Awesome Aspect",
188
+ "tagline": "A brief description",
189
+ "category": "assistant",
190
+ "publisher": "your-username",
191
+ "trust": "community"
192
+ }
193
+ }
194
+ }
195
+ ```
196
+
197
+ 6. **Commit and push**
198
+
199
+ ```bash
200
+ git add .
201
+ git commit -m "Add my-aspect"
202
+ git push origin main
203
+ ```
204
+
205
+ 7. **Open a Pull Request** at [github.com/aimorphist/aspects/compare](https://github.com/aimorphist/aspects/compare)
206
+
207
+ ### Automated Validation
208
+
209
+ All submissions are automatically validated:
210
+
211
+ - ✅ JSON schema validation
212
+ - ✅ Field length limits
213
+ - ✅ Category verification
214
+ - ✅ Security scan for prompt injection
215
+ - ✅ Registry entry consistency
216
+
217
+ ### Submit via Issue Form
218
+
219
+ Don't want to use git? Submit directly via our issue template:
220
+
221
+ **[Submit an Aspect →](https://github.com/aimorphist/aspects/issues/new?template=new-aspect.yml)**
222
+
223
+ ## Trust Levels
224
+
225
+ | Level | Badge | Description |
226
+ | ----------- | ----- | ----------------------------- |
227
+ | `verified` | 🛡️ | Official Morphist aspects |
228
+ | `community` | 👤 | Community-contributed aspects |
229
+
230
+ ## For App Developers
231
+
232
+ Fetch aspects from the registry:
233
+
234
+ ```typescript
235
+ const REGISTRY_URL =
236
+ "https://raw.githubusercontent.com/aimorphist/aspects/main/registry/index.json";
237
+
238
+ // Fetch registry index
239
+ const registry = await fetch(REGISTRY_URL).then((r) => r.json());
240
+
241
+ // Get aspect details
242
+ const alaricEntry = registry.aspects["alaric"];
243
+ const aspectUrl = alaricEntry.versions[alaricEntry.latest].url;
244
+
245
+ // Fetch full aspect
246
+ const aspect = await fetch(aspectUrl).then((r) => r.json());
247
+
248
+ console.log(aspect.prompt); // The personality prompt
249
+ console.log(aspect.voiceHints); // Voice configuration
250
+ ```
251
+
252
+ ## CLI
253
+
254
+ The Aspects CLI helps you create and manage aspects.
255
+
256
+ ```bash
257
+ # Install (npm coming soon, for now clone the repo)
258
+ git clone https://github.com/aimorphist/aspects
259
+ cd aspects && bun install
260
+
261
+ # Create a new aspect
262
+ bun run dev create
263
+
264
+ # Install aspects
265
+ bun run dev add alaric gandalf
266
+
267
+ # Search
268
+ bun run dev search wizard
269
+
270
+ # Publish to registry
271
+ bun run dev publish
272
+ ```
273
+
274
+ ### Commands
275
+
276
+ | Command | Description |
277
+ |---------|-------------|
278
+ | `create` | Interactive aspect wizard |
279
+ | `add` | Install aspects |
280
+ | `list` | List installed aspects |
281
+ | `search` | Search registry |
282
+ | `info` | Show aspect details |
283
+ | `remove` | Uninstall aspect |
284
+ | `validate` | Validate aspect.json |
285
+ | `publish` | Submit to registry |
286
+
287
+ See [CLI Documentation](./docs/CLI.md) for full reference.
288
+
289
+ ### Roadmap
290
+
291
+ Planned features:
292
+
293
+ - **`find`** — Advanced search with boolean operators (`-n wizard --not -t evil`)
294
+ - **`edit`** — Edit existing aspects with prepopulated wizard
295
+ - **`set`** — Manage collections of aspects
296
+ - **`generate`** — AI-powered aspect creation
297
+
298
+ See [CLI Roadmap](./docs/CLI-ROADMAP.md) for details.
299
+
300
+ ## Development
301
+
302
+ ```bash
303
+ # Install dependencies
304
+ bun install
305
+
306
+ # Run CLI locally
307
+ bun run dev create
308
+
309
+ # Validate all aspects
310
+ bun run validate
311
+
312
+ # Security scan
313
+ bun run scan
314
+ ```
315
+
316
+ ## Links
317
+
318
+ - **Website:** [getaspects.com](https://getaspects.com) _(coming soon)_
319
+ - **Registry:** [github.com/aimorphist/aspects](https://github.com/aimorphist/aspects)
320
+ - **Morphist App:** [morphist.ai](https://morphist.ai)
321
+
322
+ ## License
323
+
324
+ MIT © [Aspects](https://getaspects.com)