@yottagraph-app/aether-instructions 1.1.7 → 1.1.9

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 (37) hide show
  1. package/commands/build_my_app.md +2 -2
  2. package/commands/update_instructions.md +30 -23
  3. package/package.json +1 -1
  4. package/rules/aether.mdc +1 -1
  5. package/rules/api.mdc +10 -15
  6. package/skills/data-model/SKILL.md +58 -0
  7. package/skills/data-model/edgar/DATA_DICTIONARY.md +306 -0
  8. package/skills/data-model/edgar/schema.yaml +1893 -0
  9. package/skills/data-model/fdic/DATA_DICTIONARY.md +243 -0
  10. package/skills/data-model/fdic/schema.yaml +356 -0
  11. package/skills/data-model/fred/DATA_DICTIONARY.md +313 -0
  12. package/skills/data-model/fred/schema.yaml +155 -0
  13. package/skills/data-model/gleif/DATA_DICTIONARY.md +211 -0
  14. package/skills/data-model/gleif/schema.yaml +254 -0
  15. package/skills/data-model/newsdata/schema.yaml +650 -0
  16. package/skills/data-model/overview.md +77 -0
  17. package/skills/data-model/polymarket/DATA_DICTIONARY.md +384 -0
  18. package/skills/data-model/polymarket/schema.yaml +601 -0
  19. package/skills/data-model/sanctions/DATA_DICTIONARY.md +140 -0
  20. package/skills/data-model/sanctions/schema.yaml +153 -0
  21. package/skills/data-model/stocks/DATA_DICTIONARY.md +122 -0
  22. package/skills/data-model/stocks/schema.yaml +131 -0
  23. package/skills/data-model/system_schema.yaml +71 -0
  24. package/skills/data-model/wikipedia/DATA_DICTIONARY.md +185 -0
  25. package/skills/data-model/wikipedia/schema.yaml +255 -0
  26. package/skills/elemental-api/SKILL.md +37 -0
  27. package/skills/elemental-api/articles.md +386 -0
  28. package/skills/elemental-api/entities.md +393 -0
  29. package/skills/elemental-api/events.md +145 -0
  30. package/skills/elemental-api/find.md +279 -0
  31. package/skills/elemental-api/graph.md +239 -0
  32. package/skills/elemental-api/llm.md +18 -0
  33. package/skills/elemental-api/overview.md +51 -0
  34. package/skills/elemental-api/relationships.md +310 -0
  35. package/skills/elemental-api/schema.md +379 -0
  36. package/skills/elemental-api/sentiment.md +93 -0
  37. package/skills/elemental-api/server.md +186 -0
@@ -0,0 +1,393 @@
1
+ # Entities
2
+
3
+ Entities are the core objects in the Knowledge Graph: companies, people, organizations, products, and other named things that appear in the news. Each entity has a unique **Named Entity ID (NEID)**.
4
+
5
+ ## When to Use
6
+
7
+ - You have an entity name and need to find its NEID
8
+ - You have a NEID and need the entity's display name or details
9
+ - You're starting a new query and need to identify the subject
10
+ - You need entity metadata (industry, location, ticker, etc.)
11
+
12
+ ## Key Concepts
13
+
14
+ - **NEID**: A unique identifier for each entity. Required for most other API calls.
15
+ - Format: 20-character numeric string with zero-padding
16
+ - Example: `00416400910670863867`
17
+ - Always pad with leading zeros to exactly 20 characters when normalizing
18
+ - **EID**: The term EID is sometimes used interchangeably with NEID.
19
+ - **Entity Resolution**: The same real-world entity may have multiple names (e.g., "Apple", "Apple Inc.", "AAPL"). The API resolves these to a single NEID.
20
+ - **Entity Types (Flavors)**: Each entity has a type identified by a Flavor ID (FID) (ex. type "ship" is FID 1).
21
+
22
+ ## Tips
23
+
24
+ - Always start by searching for the entity to get the correct NEID
25
+ - After resolving an entity to an NEID, it's best to display the canonical entity name to the user to help them identify if something went wrong with the resolution.
26
+ - It's typically safe to resolve an entity to the top matching NEID. However, sometimes a useful pattern is to let the user give input that the resolution was incorrect, show them a longer list of matches, and let them choose a different resolution.
27
+ - Entity names are case-insensitive
28
+
29
+ ## Key Endpoints
30
+
31
+ | What you need | Endpoint | Client method | Returns |
32
+ |---------------|----------|---------------|---------|
33
+ | Find entities by expression | `POST /elemental/find` | `findEntities()` | Entity IDs matching expression |
34
+ | Find entity by name (simple lookup) | `GET /entities/lookup` | `getNEID()` | NEIDs matching a single name query |
35
+ | Basic info (name, aliases, type) | `GET /entities/{neid}` | — | Quick summary for display |
36
+ | Full property values | `POST /elemental/entities/properties` | `getPropertyValues()` | All properties with PIDs, values, timestamps |
37
+
38
+ **`findEntities()` vs `getNEID()` for entity search**:
39
+ - **`findEntities()`** → `POST /elemental/find` — expression-based search. Supports filtering by type, property value, relationship, and complex nested queries. See `find.md` for the expression language. **Use this for filtered or batch searches.**
40
+ - **`getNEID()`** → `GET /entities/lookup` — simple single-entity name lookup via query parameters (`entityName`, `maxResults`). Best for resolving one company/person name quickly.
41
+
42
+ **Important**: When a user asks for "entity properties," clarify which they mean:
43
+ - Basic info/metadata → use `/entities/{neid}`
44
+ - Detailed property data (like relationships, addresses, financial data) → use `/elemental/entities/properties`
45
+
46
+ ## Searching for Entities
47
+
48
+ ### Batch name search (direct HTTP only)
49
+
50
+ `POST /entities/search`
51
+
52
+ Search for entities by name with scored ranking and optional disambiguation. Supports batch queries (multiple entities in one request). Content-Type must be `application/json`.
53
+
54
+ **Note:** This endpoint is not exposed through the generated TypeScript client (`useElementalClient()`). For client-side entity search, use `findEntities()` (`POST /elemental/find`) or `getNEID()` (`GET /entities/lookup`).
55
+
56
+ ### Request Body
57
+
58
+ | Field | Type | Required | Description |
59
+ |-------|------|----------|-------------|
60
+ | queries | SearchQuery[] | yes | Array of search queries |
61
+ | minScore | number | no | Minimum match score, 0.0-1.0 (default: 0.8) |
62
+ | maxResults | integer | no | Maximum results per query (default: 10) |
63
+ | includeNames | boolean | no | Include entity names in response (default: true) |
64
+ | includeAliases | boolean | no | Include entity aliases in response (default: false) |
65
+ | includeFlavors | boolean | no | Include entity type/flavor in response (default: true) |
66
+ | includeScores | boolean | no | Include match scores in response (default: true) |
67
+
68
+ ### SearchQuery
69
+
70
+ | Field | Type | Required | Description |
71
+ |-------|------|----------|-------------|
72
+ | queryId | integer | yes | User-provided ID for matching queries to results |
73
+ | query | string | yes | Entity name or strong ID to search for |
74
+ | snippet | string | no | Free-text snippet for disambiguating entities with similar names |
75
+ | flavors | string[] | no | Limit results to these entity types (e.g., `["organization"]`) |
76
+ | contextType | string | no | Resolution context: `namedEntity` (default), `event`, or `strongId` |
77
+ | strongIdProperty | string | no | Property name to use as strong ID (when contextType is `strongId`) |
78
+
79
+ ### Response
80
+
81
+ The response contains a `results` array with one entry per query:
82
+
83
+ | Field | Type | Description |
84
+ |-------|------|-------------|
85
+ | results[].queryId | integer | Matches the queryId from the request |
86
+ | results[].matches[] | Match[] | Matches sorted by decreasing score |
87
+
88
+ Each Match contains:
89
+
90
+ | Field | Type | Description |
91
+ |-------|------|-------------|
92
+ | neid | string | 20-character entity ID |
93
+ | name | string | Entity display name (when includeNames is true) |
94
+ | aliases | string[] | Other names for this entity (when includeAliases is true) |
95
+ | flavor | string | Entity type name (when includeFlavors is true) |
96
+ | score | number | Match confidence 0.0-1.0 (when includeScores is true) |
97
+
98
+ ### Example
99
+
100
+ **Request:**
101
+
102
+ ```json
103
+ {
104
+ "queries": [
105
+ {"queryId": 1, "query": "Apple"},
106
+ {"queryId": 2, "query": "MSFT", "flavors": ["financial_instrument"]}
107
+ ],
108
+ "maxResults": 3
109
+ }
110
+ ```
111
+
112
+ **Response:**
113
+
114
+ ```json
115
+ {
116
+ "results": [
117
+ {
118
+ "queryId": 1,
119
+ "matches": [
120
+ {"neid": "00416400910670863867", "name": "Apple", "flavor": "organization", "score": 0.95},
121
+ {"neid": "07437212020357111309", "name": "AAPL", "flavor": "financial_instrument", "score": 0.82}
122
+ ]
123
+ },
124
+ {
125
+ "queryId": 2,
126
+ "matches": [
127
+ {"neid": "03016672914748108965", "name": "MSFT", "flavor": "financial_instrument", "score": 0.98}
128
+ ]
129
+ }
130
+ ]
131
+ }
132
+ ```
133
+
134
+ ## Form-Encoded JSON Parameters
135
+
136
+ Several Elemental API endpoints use `application/x-www-form-urlencoded` with
137
+ JSON-encoded values inside form fields. The `eids` and `pids` parameters on
138
+ `POST /elemental/entities/properties` are the most common example:
139
+
140
+ ```
141
+ eids=["00416400910670863867","03016672914748108965"]&pids=[8,22]
142
+ ```
143
+
144
+ The generated TypeScript client types show `eids: string` and `pids: string`
145
+ (not `string[]`) because the values are **JSON-stringified arrays passed as
146
+ strings**, not native arrays. When calling these endpoints:
147
+
148
+ ```typescript
149
+ // Correct — JSON-stringify the arrays
150
+ eids: JSON.stringify(["00416400910670863867"])
151
+ pids: JSON.stringify([8, 22])
152
+
153
+ // Wrong — passing raw arrays will not work
154
+ eids: ["00416400910670863867"] // ❌ type error or silent failure
155
+ ```
156
+
157
+ The same pattern applies to the `expression` parameter on `POST /elemental/find`.
158
+
159
+ ## Schema and Property Lookup
160
+
161
+ For understanding entity types (flavors), properties, and the data model, see **schema.md**. You'll need the schema because many API responses return only FIDs and PIDs — use it to translate these to human-readable names.
162
+
163
+
164
+ <!-- BEGIN GENERATED CONTENT -->
165
+
166
+ ## Endpoints
167
+
168
+ ### Get entity details
169
+
170
+ `GET /entities/{neid}`
171
+
172
+ Get details about a named entity including name, aliases, and type. This is an alias for /reports/{neid}. Response is cached for 5 minutes.
173
+
174
+ #### Guidance
175
+
176
+ Response is wrapped in a 'report' container object. Access entity data via response.report.
177
+
178
+ #### Parameters
179
+
180
+ | Name | Type | Required | Description |
181
+ |------|------|----------|-------------|
182
+ | neid | string | yes | Named Entity ID |
183
+
184
+ #### Responses
185
+
186
+ | Status | Description |
187
+ |--------|-------------|
188
+ | 200 | Entity details (`GetNamedEntityReportResponse`) |
189
+ | 400 | Invalid NEID (`Error`) |
190
+ | 404 | Entity not found (`Error`) |
191
+ | 500 | Internal server error (`Error`) |
192
+
193
+ #### Example
194
+
195
+ **Request:**
196
+
197
+ ```
198
+ GET /entities/00416400910670863867
199
+ ```
200
+
201
+ **Response:**
202
+
203
+ ```json
204
+ {"report": {"neid": "00416400910670863867", "name": "Apple", "aliases": ["AAPL", "APPLE", "APPLE INC", "Apple Inc"], "type": "organization"}}
205
+ ```
206
+
207
+ ---
208
+
209
+ ### Get entity report
210
+
211
+ `GET /reports/{neid}`
212
+
213
+ Get a report about a named entity including name, aliases, and type. Response is cached for 5 minutes.
214
+
215
+ #### Guidance
216
+
217
+ Response is wrapped in a 'report' container object. Access entity data via response.report.
218
+
219
+ #### Parameters
220
+
221
+ | Name | Type | Required | Description |
222
+ |------|------|----------|-------------|
223
+ | neid | string | yes | Named Entity ID |
224
+
225
+ #### Responses
226
+
227
+ | Status | Description |
228
+ |--------|-------------|
229
+ | 200 | Entity report (`GetNamedEntityReportResponse`) |
230
+ | 400 | Invalid NEID (`Error`) |
231
+ | 404 | Entity not found (`Error`) |
232
+ | 500 | Internal server error (`Error`) |
233
+
234
+ #### Example
235
+
236
+ **Request:**
237
+
238
+ ```
239
+ GET /reports/00416400910670863867
240
+ ```
241
+
242
+ **Response:**
243
+
244
+ ```json
245
+ {"report": {"neid": "00416400910670863867", "name": "Apple", "aliases": ["AAPL", "APPLE", "APPLE INC", "Apple Inc"], "type": "organization"}}
246
+ ```
247
+
248
+ ---
249
+
250
+ ### Find entities by expression
251
+
252
+ `POST /elemental/find`
253
+
254
+ Search for entities using a powerful expression language. The expression parameter supports complex nested queries with logical operators, geographic constraints, property comparisons, and more.
255
+
256
+ #### Guidance
257
+
258
+ CRITICAL: This endpoint REQUIRES Content-Type: application/x-www-form-urlencoded. Sending a JSON body will fail with 400 error. The expression parameter must be URL-encoded form data, not a JSON request body. For the full expression language reference including all expression types, comparison operators, and examples, see find.md.
259
+
260
+ #### Request Body
261
+
262
+ **Content-Type:** `application/x-www-form-urlencoded`
263
+
264
+ | Name | Type | Required | Description |
265
+ |------|------|----------|-------------|
266
+ | expression | string | yes | JSON-encoded expression object defining the search criteria |
267
+ | deadline | any | no | Response deadline in milliseconds or duration format |
268
+ | limit | integer | no | Maximum number of entity IDs to return in first response |
269
+
270
+ #### Responses
271
+
272
+ | Status | Description |
273
+ |--------|-------------|
274
+ | 200 | Find operation successful (`FindResponse`) |
275
+ | 400 | Bad request - invalid parameters or malformed expression (`Error`) |
276
+ | 500 | Internal server error (`Error`) |
277
+ | 501 | Elemental API capability not enabled (`Error`) |
278
+
279
+ #### Example
280
+
281
+ **Request:**
282
+
283
+ ```
284
+ POST /elemental/find
285
+ Content-Type: application/x-www-form-urlencoded
286
+
287
+ expression={"type":"is_type","is_type":{"fid":10}}&limit=5
288
+ ```
289
+
290
+ **Response:**
291
+
292
+ ```json
293
+ {"op_id": "98cc54e9-0108-4361-9c96-18ea97cda7a2", "follow_up": true, "eids": ["01601807036815568643", "08115040994665529432", "02045070050429461063"]}
294
+ ```
295
+
296
+ ---
297
+
298
+ ### Get property values for entities
299
+
300
+ `POST /elemental/entities/properties`
301
+
302
+ Retrieves property values for specified entities. Returns the current values of requested properties for each entity.
303
+
304
+ #### Guidance
305
+
306
+ Pass entity IDs as a JSON array in the 'eids' form field (eids and neids are interchangeable terms for entity IDs). Optionally filter to specific properties via 'pids'. If pids is omitted, returns all available properties. Set include_attributes=true to get additional metadata about each property value.
307
+
308
+ #### Request Body
309
+
310
+ **Content-Type:** `application/x-www-form-urlencoded`
311
+
312
+ | Name | Type | Required | Description |
313
+ |------|------|----------|-------------|
314
+ | eids | string | yes | JSON array of entity IDs to get properties for |
315
+ | pids | string | no | JSON array of property IDs to retrieve (optional, omit for all properties) |
316
+ | include_attributes | string | no | Include property attributes in response (true/false) |
317
+
318
+ #### Responses
319
+
320
+ | Status | Description |
321
+ |--------|-------------|
322
+ | 200 | Property values retrieved successfully (`GetPropertyValuesResponse`) |
323
+ | 400 | Bad request - invalid parameters or malformed expression (`Error`) |
324
+ | 500 | Internal server error (`Error`) |
325
+
326
+ #### Example
327
+
328
+ **Request:**
329
+
330
+ ```
331
+ POST /elemental/entities/properties
332
+ Content-Type: application/x-www-form-urlencoded
333
+
334
+ eids=["00416400910670863867"]&pids=[8]
335
+ ```
336
+
337
+ **Response:**
338
+
339
+ ```json
340
+ {"op_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "follow_up": false, "values": [{"eid": "00416400910670863867", "pid": 8, "value": "Apple", "recorded_at": "2026-01-15T10:30:00Z"}]}
341
+ ```
342
+
343
+ ## Types
344
+
345
+ ### GetNamedEntityReportResponse
346
+
347
+ Response containing a report about a named entity
348
+
349
+ | Field | Type | Description |
350
+ |-------|------|-------------|
351
+ | report | `NamedEntityReport` | |
352
+
353
+ ### NamedEntityReport
354
+
355
+ The named entity report
356
+
357
+ | Field | Type | Description |
358
+ |-------|------|-------------|
359
+ | aliases | string[] | Aliases of the Named Entity from the forwarding map (i.e., from ER) |
360
+ | name | string | Name of the Named Entity |
361
+ | neid | string | Named Entity ID |
362
+ | type | string | Entity type (flavor) |
363
+
364
+ ### FindResponse
365
+
366
+ | Field | Type | Description |
367
+ |-------|------|-------------|
368
+ | find | `FindData` | |
369
+
370
+ ### FindData
371
+
372
+ | Field | Type | Description |
373
+ |-------|------|-------------|
374
+ | **eids** | string[] | Array of 20-character entity IDs matching the search expression |
375
+
376
+ ### GetPropertyValuesResponse
377
+
378
+ | Field | Type | Description |
379
+ |-------|------|-------------|
380
+ | **values** | `PropertyValue`[] | Array of property values for the requested entities |
381
+
382
+ ### PropertyValue
383
+
384
+ | Field | Type | Description |
385
+ |-------|------|-------------|
386
+ | **eid** | string | Entity ID this property value belongs to |
387
+ | **pid** | integer | Property ID |
388
+ | **value** | any | Property value (type varies by property: string, number, boolean, or entity ID) |
389
+ | recorded_at | string (date-time) | Timestamp when this value was recorded |
390
+ | imputed | boolean | Whether this value was imputed (inferred) rather than directly observed |
391
+ | attributes | object | Additional metadata about this property value (when include_attributes=true) |
392
+
393
+ <!-- END GENERATED CONTENT -->
@@ -0,0 +1,145 @@
1
+ # Events
2
+
3
+ Events are significant occurrences involving entities: mergers, acquisitions, lawsuits, executive changes, product launches, and other newsworthy happenings. Events are extracted from article content and link multiple entities and articles together.
4
+
5
+ ## When to Use
6
+
7
+ - You want to know what happened to/with an entity (not just mentions)
8
+ - You want to see how different articles reference the same event(s), and understand that many articles may duplicate information about the same event(s).
9
+ - You want to see what entities participated in an event, and what their roles were.
10
+
11
+ ## Key Concepts
12
+
13
+ - **Event ID (EVEID)**: Unique identifier for each event.
14
+ - Format: 20-character numeric string (same format as NEIDs)
15
+ - Example: `08640179941787350436`
16
+ - **Event Roles**: Entities participate in events with roles (e.g., acquirer, target, plaintiff)
17
+ - **Event Summary**: Brief description of what occurred
18
+ - **Event Date**: When the event happened (may differ from article publication date)
19
+
20
+ ## Tips
21
+
22
+ - Multiple articles may reference the same event
23
+ - Check entity roles to understand the nature of involvement
24
+
25
+ <!-- BEGIN GENERATED CONTENT -->
26
+
27
+ ## Endpoints
28
+
29
+ ### Get events for an entity
30
+
31
+ `GET /events/lookup`
32
+
33
+ Get list of event IDs (EVEIDs) where an entity participates within a time interval. Response is cached for 5 minutes.
34
+
35
+ #### Guidance
36
+
37
+ Event IDs returned may not all be immediately retrievable via /events/{eveid}. Some events may return 404 due to event processing timing or data availability. Handle 404 responses gracefully.
38
+
39
+ #### Parameters
40
+
41
+ | Name | Type | Required | Description |
42
+ |------|------|----------|-------------|
43
+ | interval_start | string | yes | Start time of interval (RFC3339) |
44
+ | interval_end | string | yes | End time of interval (RFC3339) |
45
+ | neid | string | yes | Named Entity ID |
46
+
47
+ #### Responses
48
+
49
+ | Status | Description |
50
+ |--------|-------------|
51
+ | 200 | List of event IDs (`GetEventsForEntityResponse`) |
52
+ | 400 | Invalid parameters (`Error`) |
53
+ | 500 | Internal server error (`Error`) |
54
+
55
+ #### Example
56
+
57
+ **Request:**
58
+
59
+ ```
60
+ GET /events/lookup?interval_start=2026-01-28T00:00:00Z&interval_end=2026-01-29T00:00:00Z&neid=00416400910670863867
61
+ ```
62
+
63
+ **Response:**
64
+
65
+ ```json
66
+ {"event_ids": ["07880710486873721498", "07189853443333370710", "01188063638449369172"]}
67
+ ```
68
+
69
+ ---
70
+
71
+ ### Get event detail
72
+
73
+ `GET /events/{eveid}`
74
+
75
+ Get detailed information about an event by its ID. Response is cached for 15 minutes.
76
+
77
+ #### Guidance
78
+
79
+ Response is wrapped in a 'detail' container object. Access event data via response.detail.
80
+
81
+ #### Parameters
82
+
83
+ | Name | Type | Required | Description |
84
+ |------|------|----------|-------------|
85
+ | eveid | string | yes | Event ID |
86
+
87
+ #### Responses
88
+
89
+ | Status | Description |
90
+ |--------|-------------|
91
+ | 200 | Event detail (`GetEventResponse`) |
92
+ | 400 | Invalid EVEID (`Error`) |
93
+ | 404 | Event not found (`Error`) |
94
+ | 500 | Internal server error (`Error`) |
95
+
96
+ #### Example
97
+
98
+ **Request:**
99
+
100
+ ```
101
+ GET /events/08640179941787350436
102
+ ```
103
+
104
+ **Response:**
105
+
106
+ ```json
107
+ {"detail": {"eveid": "08640179941787350436", "name": "event|Apple plans to release a foldable device...|2026", "date": "2026", "description": "The new design and engineering changes in the iPhone Air could pave the way...", "category": "Product Development", "likelihood": "Medium", "severity": 0, "speculative": false, "participants": [{"neid": "00416400910670863867", "sentiment": 0.5, "explanation": "The launch of new products...", "role": "company", "snippet": "Apple is gearing up for the most extensive refresh...", "artid": "07521758285625650094"}]}}
108
+ ```
109
+
110
+ ## Types
111
+
112
+ ### EventDetail
113
+
114
+ The event detail
115
+
116
+ | Field | Type | Description |
117
+ |-------|------|-------------|
118
+ | artids | string[] | Article IDs where this event was found |
119
+ | category | string | Category of the event |
120
+ | date | string | Date of the event |
121
+ | description | string | Description of the event |
122
+ | eveid | string | Event ID |
123
+ | likelihood | string | Likelihood assessment of the event |
124
+ | name | string | Name of the event |
125
+ | participants | `EventParticipant`[] | Participants in the event |
126
+ | severity | integer | Severity level of the event |
127
+ | speculative | boolean | Whether the event is speculative |
128
+
129
+ ### GetEventResponse
130
+
131
+ Response containing detailed information about an event
132
+
133
+ | Field | Type | Description |
134
+ |-------|------|-------------|
135
+ | detail | `EventDetail` | |
136
+
137
+ ### GetEventsForEntityResponse
138
+
139
+ Response containing event IDs for an entity
140
+
141
+ | Field | Type | Description |
142
+ |-------|------|-------------|
143
+ | event_ids | string[] | List of event IDs |
144
+
145
+ <!-- END GENERATED CONTENT -->